diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 8e00fb7b7..5f48fbcc2 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -460,7 +460,7 @@ and pp_function ~return_unit ~is_method cxt ~fn_state (l : Ident.t list) param_body () | No_name { single_arg } -> (* see # 1692, add a paren for annoymous function for safety *) - cond_paren_group cxt (not single_arg) 1 (fun () -> + cond_paren_group cxt (not single_arg) (fun () -> string cxt L.function_; space cxt; param_body ()) @@ -552,7 +552,7 @@ and expression_desc cxt ~(level : int) x : cxt = bool cxt b; cxt | Seq (e1, e2) -> - cond_paren_group cxt (level > 0) 1 (fun () -> + cond_paren_group cxt (level > 0) (fun () -> let cxt = expression ~level:0 cxt e1 in comma_sp cxt; expression ~level:0 cxt e2) @@ -570,7 +570,7 @@ and expression_desc cxt ~(level : int) x : cxt = ]} *) | Call { expr = e; args = el; info } -> - cond_paren_group cxt (level > 15) 1 (fun () -> + cond_paren_group cxt (level > 15) (fun () -> group cxt 1 (fun () -> match (info, el) with | { arity = Full; _ }, _ | _, [] -> @@ -697,7 +697,7 @@ and expression_desc cxt ~(level : int) x : cxt = if need_paren then paren cxt action else action (); cxt | Is_null_or_undefined e -> - cond_paren_group cxt (level > 0) 1 (fun () -> + cond_paren_group cxt (level > 0) (fun () -> let cxt = expression ~level:1 cxt e in space cxt; string cxt "=="; @@ -705,7 +705,7 @@ and expression_desc cxt ~(level : int) x : cxt = string cxt L.null; cxt) | Js_not e -> - cond_paren_group cxt (level > 13) 1 (fun () -> + cond_paren_group cxt (level > 13) (fun () -> string cxt "!"; expression ~level:13 cxt e) | Typeof e -> @@ -730,7 +730,7 @@ and expression_desc cxt ~(level : int) x : cxt = {[ 0.000 - x ]} *) -> - cond_paren_group cxt (level > 13) 1 (fun () -> + cond_paren_group cxt (level > 13) (fun () -> string cxt (match desc with Float _ -> "- " | _ -> "-"); expression ~level:13 cxt e) | Bin { op; expr1 = e1; expr2 = e2 } -> @@ -740,7 +740,7 @@ and expression_desc cxt ~(level : int) x : cxt = in (* We are more conservative here, to make the generated code more readable to the user *) - cond_paren_group cxt need_paren 1 (fun () -> + cond_paren_group cxt need_paren (fun () -> let cxt = expression ~level:lft cxt e1 in space cxt; string cxt (Js_op.op_str op); @@ -752,7 +752,7 @@ and expression_desc cxt ~(level : int) x : cxt = let need_paren = level > out || match op with Lsl | Lsr | Asr -> true | _ -> false in - cond_paren_group cxt need_paren 1 (fun () -> + cond_paren_group cxt need_paren (fun () -> let cxt = expression ~level:lft cxt e1 in space cxt; string cxt "+"; @@ -857,12 +857,12 @@ and expression_desc cxt ~(level : int) x : cxt = cxt) | Array_index { expr = e; index = p } | String_index { expr = e; index = p } -> - cond_paren_group cxt (level > 15) 1 (fun () -> + cond_paren_group cxt (level > 15) (fun () -> group cxt 1 (fun () -> let cxt = expression ~level:15 cxt e in bracket_group cxt 1 (fun () -> expression ~level:0 cxt p))) | Static_index { expr = e; field = s; _ } -> - cond_paren_group cxt (level > 15) 1 (fun () -> + cond_paren_group cxt (level > 15) (fun () -> let cxt = expression ~level:15 cxt e in Js_dump_property.property_access cxt.pp s; (* See [ .obj_of_exports] @@ -872,13 +872,13 @@ and expression_desc cxt ~(level : int) x : cxt = cxt) | Length { expr = e; _ } -> (* Todo: check parens *) - cond_paren_group cxt (level > 15) 1 (fun () -> + cond_paren_group cxt (level > 15) (fun () -> let cxt = expression ~level:15 cxt e in string cxt L.dot; string cxt L.length; cxt) | New { expr = e; args = el } -> - cond_paren_group cxt (level > 15) 1 (fun () -> + cond_paren_group cxt (level > 15) (fun () -> group cxt 1 (fun () -> string cxt L.new_; space cxt; @@ -910,7 +910,7 @@ and expression_desc cxt ~(level : int) x : cxt = var f = { x : 2 , y : 2} ]} *) - cond_paren_group cxt (level > 1) 0 (fun () -> + cond_paren_group cxt (level > 1) (fun () -> if lst = [] then ( string cxt "{}"; cxt) diff --git a/jscomp/core/js_pp.ml b/jscomp/core/js_pp.ml index 7f8f03c34..8cdc7459f 100644 --- a/jscomp/core/js_pp.ml +++ b/jscomp/core/js_pp.ml @@ -188,8 +188,8 @@ let paren_vgroup st n action = let paren_group st n action = group st n (fun _ -> paren st action) -let cond_paren_group st b n action = - if b then paren_group st n action else action () +let cond_paren_group st b action = + if b then paren_group st 0 action else action () let brace_group st n action = group st n (fun _ -> brace st action) diff --git a/jscomp/core/js_pp.mli b/jscomp/core/js_pp.mli index 224d5fb06..07068fa42 100644 --- a/jscomp/core/js_pp.mli +++ b/jscomp/core/js_pp.mli @@ -64,7 +64,7 @@ val vgroup : t -> int -> (unit -> 'a) -> 'a val paren : t -> (unit -> 'a) -> 'a val brace : t -> (unit -> 'a) -> 'a val paren_group : t -> int -> (unit -> 'a) -> 'a -val cond_paren_group : t -> bool -> int -> (unit -> 'a) -> 'a +val cond_paren_group : t -> bool -> (unit -> 'a) -> 'a val paren_vgroup : t -> int -> (unit -> 'a) -> 'a val brace_group : t -> int -> (unit -> 'a) -> 'a val brace_vgroup : t -> int -> (unit -> 'a) -> 'a diff --git a/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_module_test.mjs b/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_module_test.mjs index 356725420..eaa46f843 100644 --- a/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_module_test.mjs +++ b/jscomp/test/dist-es6/jscomp/test/es6_tests/es6_module_test.mjs @@ -11,29 +11,29 @@ Mt.from_pair_suites("Es6_module_test", { hd: [ "list_length", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__List.length({ - hd: 1, - tl: { - hd: 2, - tl: /* [] */0 - } - }), - _1: 2 - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__List.length({ + hd: 1, + tl: { + hd: 2, + tl: /* [] */0 + } + }), + _1: 2 + }; + }) ], tl: { hd: [ "length", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: 3 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist-es6/jscomp/test/mt.mjs b/jscomp/test/dist-es6/jscomp/test/mt.mjs index 4704dcc87..19bc7fd07 100644 --- a/jscomp/test/dist-es6/jscomp/test/mt.mjs +++ b/jscomp/test/dist-es6/jscomp/test/mt.mjs @@ -32,13 +32,13 @@ function from_suites(name, suite) { const match = Stdlib__Array.to_list(Process.argv); if (match && is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const partial_arg = param[1]; - it(param[0], (function () { - return Curry._1(partial_arg, undefined); - })); - }), suite); - })); + return Stdlib__List.iter((function (param) { + const partial_arg = param[1]; + it(param[0], (function () { + return Curry._1(partial_arg, undefined); + })); + }), suite); + })); return; } @@ -100,13 +100,13 @@ function from_pair_suites(name, suites) { if (match) { if (is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const code = param[1]; - it(param[0], (function () { - return handleCode(Curry._1(code, undefined)); - })); - }), suites); - })); + return Stdlib__List.iter((function (param) { + const code = param[1]; + it(param[0], (function () { + return handleCode(Curry._1(code, undefined)); + })); + }), suites); + })); return; } else { console.log([ @@ -114,78 +114,78 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - const name = param[0]; - const _fn = Curry._1(param[1], undefined); - switch (_fn.TAG) { - case /* Eq */0 : - console.log([ - name, - _fn._0, - "eq?", - _fn._1 - ]); - return; - case /* Neq */1 : - console.log([ - name, - _fn._0, - "neq?", - _fn._1 - ]); - return; - case /* StrictEq */2 : - console.log([ - name, - _fn._0, - "strict_eq?", - _fn._1 - ]); - return; - case /* StrictNeq */3 : - console.log([ - name, - _fn._0, - "strict_neq?", - _fn._1 - ]); - return; - case /* Ok */4 : - console.log([ - name, - _fn._0, - "ok?" - ]); - return; - case /* Approx */5 : - console.log([ - name, - _fn._0, - "~", - _fn._1 - ]); - return; - case /* ApproxThreshold */6 : - console.log([ - name, - _fn._1, - "~", - _fn._2, - " (", - _fn._0, - ")" - ]); - return; - case /* ThrowAny */7 : - return; - case /* Fail */8 : - console.log("failed"); - return; - case /* FailWith */9 : - console.log("failed: " + _fn._0); - return; - - } - }), suites); + const name = param[0]; + const _fn = Curry._1(param[1], undefined); + switch (_fn.TAG) { + case /* Eq */0 : + console.log([ + name, + _fn._0, + "eq?", + _fn._1 + ]); + return; + case /* Neq */1 : + console.log([ + name, + _fn._0, + "neq?", + _fn._1 + ]); + return; + case /* StrictEq */2 : + console.log([ + name, + _fn._0, + "strict_eq?", + _fn._1 + ]); + return; + case /* StrictNeq */3 : + console.log([ + name, + _fn._0, + "strict_neq?", + _fn._1 + ]); + return; + case /* Ok */4 : + console.log([ + name, + _fn._0, + "ok?" + ]); + return; + case /* Approx */5 : + console.log([ + name, + _fn._0, + "~", + _fn._1 + ]); + return; + case /* ApproxThreshold */6 : + console.log([ + name, + _fn._1, + "~", + _fn._2, + " (", + _fn._0, + ")" + ]); + return; + case /* ThrowAny */7 : + return; + case /* Fail */8 : + console.log("failed"); + return; + case /* FailWith */9 : + console.log("failed: " + _fn._0); + return; + + } + }), suites); } } @@ -198,16 +198,16 @@ function from_promise_suites(name, suites) { if (match) { if (is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const code = param[1]; - it(param[0], (function () { - return code.then(function (x) { - handleCode(x); - return val_unit; - }); - })); - }), suites); - })); + return Stdlib__List.iter((function (param) { + const code = param[1]; + it(param[0], (function () { + return code.then(function (x) { + handleCode(x); + return val_unit; + }); + })); + }), suites); + })); } else { console.log("promise suites"); } @@ -222,12 +222,12 @@ function eq_suites(test_id, suites, loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -239,11 +239,11 @@ function bool_suites(test_id, suites, loc, x) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Ok */4, - _0: x - }; - }) + return { + TAG: /* Ok */4, + _0: x + }; + }) ], tl: suites.contents }; @@ -255,11 +255,11 @@ function throw_suites(test_id, suites, loc, x) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* ThrowAny */7, - _0: x - }; - }) + return { + TAG: /* ThrowAny */7, + _0: x + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/a_filename_test.js b/jscomp/test/dist/jscomp/test/a_filename_test.js index f107b349a..46fd9a10a 100644 --- a/jscomp/test/dist/jscomp/test/a_filename_test.js +++ b/jscomp/test/dist/jscomp/test/a_filename_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/a_list_test.js b/jscomp/test/dist/jscomp/test/a_list_test.js index 33bd37248..d7101b3d5 100644 --- a/jscomp/test/dist/jscomp/test/a_list_test.js +++ b/jscomp/test/dist/jscomp/test/a_list_test.js @@ -7,9 +7,30 @@ const Mt = require("./mt.js"); const suites_0 = [ "drop", (function (param) { + return { + TAG: /* Eq */0, + _0: Ext_list_test.drop(3, { + hd: 0, + tl: { + hd: 1, + tl: { + hd: 2, + tl: /* [] */0 + } + } + }), + _1: /* [] */0 + }; + }) +]; + +const suites_1 = { + hd: [ + "drop1", + (function (param) { return { TAG: /* Eq */0, - _0: Ext_list_test.drop(3, { + _0: Ext_list_test.drop(2, { hd: 0, tl: { hd: 1, @@ -19,86 +40,65 @@ const suites_0 = [ } } }), - _1: /* [] */0 + _1: { + hd: 2, + tl: /* [] */0 + } }; }) -]; - -const suites_1 = { - hd: [ - "drop1", - (function (param) { - return { - TAG: /* Eq */0, - _0: Ext_list_test.drop(2, { - hd: 0, - tl: { - hd: 1, - tl: { - hd: 2, - tl: /* [] */0 - } - } - }), - _1: { - hd: 2, - tl: /* [] */0 - } - }; - }) ], tl: { hd: [ "flat_map", (function (param) { - return { - TAG: /* Eq */0, - _0: { + return { + TAG: /* Eq */0, + _0: { + hd: 0, + tl: { hd: 0, tl: { - hd: 0, + hd: 1, tl: { hd: 1, tl: { + hd: 0, + tl: /* [] */0 + } + } + } + } + }, + _1: Ext_list_test.flat_map((function (x) { + if (x % 2 === 0) { + return { + hd: 0, + tl: /* [] */0 + }; + } else { + return { hd: 1, tl: { - hd: 0, + hd: 1, tl: /* [] */0 } - } + }; } - } - }, - _1: Ext_list_test.flat_map((function (x) { - if (x % 2 === 0) { - return { - hd: 0, - tl: /* [] */0 - }; - } else { - return { - hd: 1, - tl: { - hd: 1, - tl: /* [] */0 - } - }; - } - }), { + }), { + hd: 0, + tl: { hd: 0, tl: { - hd: 0, + hd: 3, tl: { - hd: 3, - tl: { - hd: 0, - tl: /* [] */0 - } + hd: 0, + tl: /* [] */0 } } - }) - }; - }) + } + }) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/a_string_test.js b/jscomp/test/dist/jscomp/test/a_string_test.js index 035e465a2..82d533aa4 100644 --- a/jscomp/test/dist/jscomp/test/a_string_test.js +++ b/jscomp/test/dist/jscomp/test/a_string_test.js @@ -8,101 +8,101 @@ const Stdlib__List = require("melange/list.js"); const suites_0 = [ "split", (function (param) { - return { - TAG: /* Eq */0, - _0: Ext_string_test.split(true, "hihi", /* 'i' */105), - _1: { + return { + TAG: /* Eq */0, + _0: Ext_string_test.split(true, "hihi", /* 'i' */105), + _1: { + hd: "h", + tl: { hd: "h", tl: { - hd: "h", - tl: { - hd: "", - tl: /* [] */0 - } + hd: "", + tl: /* [] */0 } } - }; - }) + } + }; + }) ]; const suites_1 = { hd: [ "split_non_empty", (function (param) { - return { - TAG: /* Eq */0, - _0: Ext_string_test.split(undefined, "hihi", /* 'i' */105), - _1: { + return { + TAG: /* Eq */0, + _0: Ext_string_test.split(undefined, "hihi", /* 'i' */105), + _1: { + hd: "h", + tl: { hd: "h", - tl: { - hd: "h", - tl: /* [] */0 - } + tl: /* [] */0 } - }; - }) + } + }; + }) ], tl: { hd: [ "split_empty", (function (param) { - return { - TAG: /* Eq */0, - _0: Ext_string_test.split(true, "", /* 'i' */105), - _1: /* [] */0 - }; - }) + return { + TAG: /* Eq */0, + _0: Ext_string_test.split(true, "", /* 'i' */105), + _1: /* [] */0 + }; + }) ], tl: { hd: [ "split_normal", (function (param) { - return { - TAG: /* Eq */0, - _0: Ext_string_test.split(true, "h i i", /* ' ' */32), - _1: { - hd: "h", + return { + TAG: /* Eq */0, + _0: Ext_string_test.split(true, "h i i", /* ' ' */32), + _1: { + hd: "h", + tl: { + hd: "i", tl: { hd: "i", - tl: { - hd: "i", - tl: /* [] */0 - } + tl: /* [] */0 } } - }; - }) + } + }; + }) ], tl: { hd: [ "split_by", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__List.filter((function (s) { - return s !== ""; - }), Ext_string_test.split_by(undefined, (function (x) { - if (x === /* ' ' */32) { - return true; - } else { - return x === /* '\t' */9; - } - }), "h hgso hgso \t hi")), - _1: { - hd: "h", + return { + TAG: /* Eq */0, + _0: Stdlib__List.filter((function (s) { + return s !== ""; + }), Ext_string_test.split_by(undefined, (function (x) { + if (x === /* ' ' */32) { + return true; + } else { + return x === /* '\t' */9; + } + }), "h hgso hgso \t hi")), + _1: { + hd: "h", + tl: { + hd: "hgso", tl: { hd: "hgso", tl: { - hd: "hgso", - tl: { - hd: "hi", - tl: /* [] */0 - } + hd: "hi", + tl: /* [] */0 } } } - }; - }) + } + }; + }) ], tl: /* [] */0 } 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 2699865ac..67b42b98f 100644 --- a/jscomp/test/dist/jscomp/test/and_or_tailcall_test.js +++ b/jscomp/test/dist/jscomp/test/and_or_tailcall_test.js @@ -34,24 +34,24 @@ function or_f(b, x, _n) { const suites_0 = [ "and_tail", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: f(true, 1, 0) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: f(true, 1, 0) + }; + }) ]; const suites_1 = { hd: [ "or_tail", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: or_f(false, 1, 0) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: or_f(false, 1, 0) + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/ari_regress_test.js b/jscomp/test/dist/jscomp/test/ari_regress_test.js index a66e886dd..97d516c15 100644 --- a/jscomp/test/dist/jscomp/test/ari_regress_test.js +++ b/jscomp/test/dist/jscomp/test/ari_regress_test.js @@ -31,46 +31,46 @@ function v(param) { const suites_0 = [ "curry", (function (param) { - return { - TAG: /* Eq */0, - _0: g, - _1: 7 - }; - }) + return { + TAG: /* Eq */0, + _0: g, + _1: 7 + }; + }) ]; const suites_1 = { hd: [ "curry2", (function (param) { - return { - TAG: /* Eq */0, - _0: 14, - _1: (Curry._1(v, 1), Curry._1(v, 1)) - }; - }) + return { + TAG: /* Eq */0, + _0: 14, + _1: (Curry._1(v, 1), Curry._1(v, 1)) + }; + }) ], tl: { hd: [ "curry3", (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: 14 - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: 14 + }; + }) ], tl: { hd: [ "File \"jscomp/test/ari_regress_test.ml\", line 20, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: h.contents, - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: h.contents, + _1: 1 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/arith_parser.js b/jscomp/test/dist/jscomp/test/arith_parser.js index 3ca78fff3..39242d18a 100644 --- a/jscomp/test/dist/jscomp/test/arith_parser.js +++ b/jscomp/test/dist/jscomp/test/arith_parser.js @@ -46,80 +46,80 @@ const yynames_block = "NUMERAL\0IDENT\0"; const yyact = [ (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "parser" - }); - }), + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "parser" + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Numeral */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Numeral */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Variable */6, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Variable */6, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Plus */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Plus */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Minus */2, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Minus */2, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Times */3, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Times */3, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Divide */4, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Divide */4, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Negate */5, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Negate */5, + _0: _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }) + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }) ]; const yytables = { diff --git a/jscomp/test/dist/jscomp/test/arity_deopt.js b/jscomp/test/dist/jscomp/test/arity_deopt.js index c2c3fc539..90862847f 100644 --- a/jscomp/test/dist/jscomp/test/arity_deopt.js +++ b/jscomp/test/dist/jscomp/test/arity_deopt.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -54,14 +54,14 @@ function f3(x) { eq("File \"jscomp/test/arity_deopt.ml\", line 45, characters 7-14", 6, f0(1, 2, 3)); eq("File \"jscomp/test/arity_deopt.ml\", line 46, characters 11-18", 6, (function (y, z) { - return (1 + y | 0) + z | 0; - })(2, 3)); + return (1 + y | 0) + z | 0; + })(2, 3)); eq("File \"jscomp/test/arity_deopt.ml\", line 47, characters 15-22", 6, Curry._1(f2(1, 2), 3)); eq("File \"jscomp/test/arity_deopt.ml\", line 48, characters 15-22", 6, (function (y, z) { - return (1 + y | 0) + z | 0; - })(2, 3)); + return (1 + y | 0) + z | 0; + })(2, 3)); Mt.from_pair_suites("Arity_deopt", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/arity_infer.js b/jscomp/test/dist/jscomp/test/arity_infer.js index a9d514ae8..64ec24dc4 100644 --- a/jscomp/test/dist/jscomp/test/arity_infer.js +++ b/jscomp/test/dist/jscomp/test/arity_infer.js @@ -9,8 +9,8 @@ function f0(x) { let tmp; if (x > 3) { tmp = (function (x) { - return x + 1 | 0; - }); + return x + 1 | 0; + }); } else { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -31,23 +31,23 @@ function f3(x) { switch (x) { case 0 : tmp = (function (x) { - return x + 1 | 0; - }); + return x + 1 | 0; + }); break; case 1 : tmp = (function (x) { - return x + 2 | 0; - }); + return x + 2 | 0; + }); break; case 2 : tmp = (function (x) { - return x + 3 | 0; - }); + return x + 3 | 0; + }); break; case 3 : tmp = (function (x) { - return x + 4 | 0; - }); + return x + 4 | 0; + }); break; default: throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { diff --git a/jscomp/test/dist/jscomp/test/arity_ml.js b/jscomp/test/dist/jscomp/test/arity_ml.js index 4d888ab89..ff4982ff1 100644 --- a/jscomp/test/dist/jscomp/test/arity_ml.js +++ b/jscomp/test/dist/jscomp/test/arity_ml.js @@ -4,8 +4,8 @@ const o = { hi: (function (x, y) { - return x + y | 0; - }) + return x + y | 0; + }) }; exports.o = o; diff --git a/jscomp/test/dist/jscomp/test/array_data_util.js b/jscomp/test/dist/jscomp/test/array_data_util.js index 7f418adae..3f4488150 100644 --- a/jscomp/test/dist/jscomp/test/array_data_util.js +++ b/jscomp/test/dist/jscomp/test/array_data_util.js @@ -5,14 +5,14 @@ const 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) { - return k + i | 0; - })); + return k + i | 0; + })); } function randomRange(i, j) { const v = Belt__Belt_Array.makeBy((j - i | 0) + 1 | 0, (function (k) { - return k + i | 0; - })); + return k + i | 0; + })); Belt__Belt_Array.shuffleInPlace(v); return v; } diff --git a/jscomp/test/dist/jscomp/test/array_subtle_test.js b/jscomp/test/dist/jscomp/test/array_subtle_test.js index 30e286da6..a2bc06feb 100644 --- a/jscomp/test/dist/jscomp/test/array_subtle_test.js +++ b/jscomp/test/dist/jscomp/test/array_subtle_test.js @@ -20,12 +20,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/array_test.js b/jscomp/test/dist/jscomp/test/array_test.js index 448c6d625..1cb67934f 100644 --- a/jscomp/test/dist/jscomp/test/array_test.js +++ b/jscomp/test/dist/jscomp/test/array_test.js @@ -57,171 +57,213 @@ function is_sorted(x) { const array_suites_0 = [ "init", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Array.init(5, (function (x) { - return x; - })), - _1: [ - 0, - 1, - 2, - 3, - 4 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Array.init(5, (function (x) { + return x; + })), + _1: [ + 0, + 1, + 2, + 3, + 4 + ] + }; + }) ]; const array_suites_1 = { hd: [ "toList", (function (param) { - const aux = function (xs) { - return Stdlib__List.fold_left((function (acc, param) { - return { - hd: [ - Stdlib__Array.to_list(param[0]), - param[1] - ], - tl: acc - }; - }), /* [] */0, xs); - }; - const match = Stdlib__List.split(aux({ - hd: [ - [], - /* [] */0 - ], - tl: /* [] */0 - })); - return { - TAG: /* Eq */0, - _0: match[0], - _1: match[1] - }; - }) + const aux = function (xs) { + return Stdlib__List.fold_left((function (acc, param) { + return { + hd: [ + Stdlib__Array.to_list(param[0]), + param[1] + ], + tl: acc + }; + }), /* [] */0, xs); + }; + const match = Stdlib__List.split(aux({ + hd: [ + [], + /* [] */0 + ], + tl: /* [] */0 + })); + return { + TAG: /* Eq */0, + _0: match[0], + _1: match[1] + }; + }) ], tl: { hd: [ "concat", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 0, - 1, - 2, - 3, - 4, - 5 - ], - _1: Caml_array.concat({ + return { + TAG: /* Eq */0, + _0: [ + 0, + 1, + 2, + 3, + 4, + 5 + ], + _1: Caml_array.concat({ + hd: [ + 0, + 1, + 2 + ], + tl: { hd: [ - 0, - 1, - 2 + 3, + 4 ], tl: { - hd: [ - 3, - 4 - ], + hd: [], tl: { - hd: [], - tl: { - hd: [5], - tl: /* [] */0 - } + hd: [5], + tl: /* [] */0 } } - }) - }; - }) + } + }) + }; + }) ], tl: { hd: [ "make", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + Caml_array.make(100, /* 'a' */97), + Caml_array.make_float(100) + ], + _1: [ + Stdlib__Array.init(100, (function (param) { + return /* 'a' */97; + })), + Stdlib__Array.init(100, (function (param) { + return 0; + })) + ] + }; + }) + ], + tl: { + hd: [ + "sub", + (function (param) { return { TAG: /* Eq */0, - _0: [ - Caml_array.make(100, /* 'a' */97), - Caml_array.make_float(100) - ], + _0: Stdlib__Array.sub([ + 0, + 1, + 2, + 3, + 4 + ], 2, 2), _1: [ - Stdlib__Array.init(100, (function (param) { - return /* 'a' */97; - })), - Stdlib__Array.init(100, (function (param) { - return 0; - })) + 2, + 3 ] }; }) - ], - tl: { - hd: [ - "sub", - (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Array.sub([ - 0, - 1, - 2, - 3, - 4 - ], 2, 2), - _1: [ - 2, - 3 - ] - }; - }) ], tl: { hd: [ "blit", (function (param) { - const u = [ - 100, - 0, - 0 - ]; - const v = Stdlib__Array.init(3, (function (x) { - return (x << 1); - })); - Stdlib__Array.blit(v, 1, u, 1, 2); - return { - TAG: /* Eq */0, - _0: [ - [ - 0, - 2, - 4 - ], - [ - 100, - 2, - 4 - ] + const u = [ + 100, + 0, + 0 + ]; + const v = Stdlib__Array.init(3, (function (x) { + return (x << 1); + })); + Stdlib__Array.blit(v, 1, u, 1, 2); + return { + TAG: /* Eq */0, + _0: [ + [ + 0, + 2, + 4 ], - _1: [ - v, - u + [ + 100, + 2, + 4 ] - }; - }) + ], + _1: [ + v, + u + ] + }; + }) ], tl: { hd: [ "File \"jscomp/test/array_test.ml\", line 62, characters 2-9", (function (param) { + const a0 = Stdlib__Array.init(100, (function (i) { + return (i << 0); + })); + Stdlib__Array.blit(a0, 10, a0, 5, 20); + return { + TAG: /* Eq */0, + _0: true, + _1: starts_with(a0, [ + 0, + 1, + 2, + 3, + 4, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19, + 20, + 21, + 22, + 23, + 24, + 25, + 26, + 27, + 28 + ], (function (prim0, prim1) { + return prim0 === prim1; + })) + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/array_test.ml\", line 71, characters 2-9", + (function (param) { const a0 = Stdlib__Array.init(100, (function (i) { - return (i << 0); - })); - Stdlib__Array.blit(a0, 10, a0, 5, 20); + return (i << 0); + })); + Stdlib__Array.blit(a0, 5, a0, 10, 20); return { TAG: /* Eq */0, _0: true, @@ -231,6 +273,16 @@ const array_suites_1 = { 2, 3, 4, + 5, + 6, + 7, + 8, + 9, + 5, + 6, + 7, + 8, + 9, 10, 11, 12, @@ -241,114 +293,62 @@ const array_suites_1 = { 17, 18, 19, - 20, - 21, - 22, - 23, - 24, - 25, - 26, - 27, - 28 + 20 ], (function (prim0, prim1) { - return prim0 === prim1; - })) + return prim0 === prim1; + })) }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/array_test.ml\", line 71, characters 2-9", - (function (param) { - const a0 = Stdlib__Array.init(100, (function (i) { - return (i << 0); - })); - Stdlib__Array.blit(a0, 5, a0, 10, 20); - return { - TAG: /* Eq */0, - _0: true, - _1: starts_with(a0, [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20 - ], (function (prim0, prim1) { - return prim0 === prim1; - })) - }; - }) ], tl: { hd: [ "make", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_array.make(2, 1), - _1: [ - 1, - 1 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_array.make(2, 1), + _1: [ + 1, + 1 + ] + }; + }) ], tl: { hd: [ "sort", (function (param) { - const u = [ - 3, - 0, - 1 - ]; - Stdlib__Array.sort(Caml.caml_int_compare, u); - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal([ - 0, - 1, - 3 - ], u), - _1: true - }; - }) + const u = [ + 3, + 0, + 1 + ]; + Stdlib__Array.sort(Caml.caml_int_compare, u); + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal([ + 0, + 1, + 3 + ], u), + _1: true + }; + }) ], tl: { hd: [ "sort_large", (function (param) { - const v = Stdlib__Array.init(4, (function (i) { - return i % 17; - })); - Stdlib__Array.sort(Caml.caml_int_compare, v); - return { - TAG: /* Eq */0, - _0: true, - _1: is_sorted(v) - }; - }) + const v = Stdlib__Array.init(4, (function (i) { + return i % 17; + })); + Stdlib__Array.sort(Caml.caml_int_compare, v); + return { + TAG: /* Eq */0, + _0: true, + _1: is_sorted(v) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/ast_abstract_test.js b/jscomp/test/dist/jscomp/test/ast_abstract_test.js index e1c9dce0b..d3c1b855d 100644 --- a/jscomp/test/dist/jscomp/test/ast_abstract_test.js +++ b/jscomp/test/dist/jscomp/test/ast_abstract_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; 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 24923ba69..e11a7d9c9 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 @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; 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 1ae77d24e..7b913f9e1 100644 --- a/jscomp/test/dist/jscomp/test/ast_mapper_defensive_test.js +++ b/jscomp/test/dist/jscomp/test/ast_mapper_defensive_test.js @@ -18,11 +18,11 @@ function $$throw(loc, x) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* ThrowAny */7, - _0: x - }; - }) + return { + TAG: /* ThrowAny */7, + _0: x + }; + }) ], tl: suites.contents }; @@ -39,8 +39,8 @@ function cFromJs(param) { } $$throw("File \"jscomp/test/ast_mapper_defensive_test.ml\", line 19, characters 15-22", (function (param) { - cFromJs(33); - })); + cFromJs(33); + })); Mt.from_pair_suites("Ast_mapper_defensive_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/attr_test.js b/jscomp/test/dist/jscomp/test/attr_test.js index a1e8c2185..2132aec4c 100644 --- a/jscomp/test/dist/jscomp/test/attr_test.js +++ b/jscomp/test/dist/jscomp/test/attr_test.js @@ -16,8 +16,8 @@ const hh = max2(1, 2); function f(x) { des(x, (function () { - console.log("hei"); - })); + console.log("hei"); + })); } exports.u = u; 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 0ff7ab8b5..bb046eee1 100644 --- a/jscomp/test/dist/jscomp/test/belt_result_alias_test.js +++ b/jscomp/test/dist/jscomp/test/belt_result_alias_test.js @@ -7,14 +7,14 @@ Belt__Belt_Result.map({ TAG: /* Ok */0, _0: "Test" }, (function (r) { - return "Value: " + r; - })); + return "Value: " + r; + })); Belt__Belt_Result.getWithDefault(Belt__Belt_Result.map({ TAG: /* Error */1, _0: "error" }, (function (r) { - return "Value: " + r; - })), "success"); + return "Value: " + r; + })), "success"); /* Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/bench.js b/jscomp/test/dist/jscomp/test/bench.js index 784d1f647..ca87c1632 100644 --- a/jscomp/test/dist/jscomp/test/bench.js +++ b/jscomp/test/dist/jscomp/test/bench.js @@ -48,14 +48,14 @@ function fold_left(f, x, a) { function f2(param) { const arr = init(3000000, (function (i) { - return i; - })); + return i; + })); const b = map((function (i) { - return i + i - 1; - }), arr); + return i + i - 1; + }), arr); const v = fold_left((function (prim0, prim1) { - return prim0 + prim1; - }), 0, b); + return prim0 + prim1; + }), 0, b); console.log(Stdlib.string_of_float(v)); } diff --git a/jscomp/test/dist/jscomp/test/bs_abstract_test.js b/jscomp/test/dist/jscomp/test/bs_abstract_test.js index 654f166b6..cba99b420 100644 --- a/jscomp/test/dist/jscomp/test/bs_abstract_test.js +++ b/jscomp/test/dist/jscomp/test/bs_abstract_test.js @@ -12,8 +12,8 @@ v.tl = v; const f = { k: (function (x, y) { - return x === y; - }), + return x === y; + }), y: "x" }; diff --git a/jscomp/test/dist/jscomp/test/bs_array_test.js b/jscomp/test/dist/jscomp/test/bs_array_test.js index 22e171a57..216f3dd84 100644 --- a/jscomp/test/dist/jscomp/test/bs_array_test.js +++ b/jscomp/test/dist/jscomp/test/bs_array_test.js @@ -35,12 +35,12 @@ function neq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Neq */1, - _0: x, - _1: y - }; - }) + return { + TAG: /* Neq */1, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -60,8 +60,8 @@ console.log([ }).map(function (x, i) { return x + i | 0; }).reduce((function (x, y) { - return x + y | 0; - }), 0)); + return x + y | 0; + }), 0)); const v = [ 1, @@ -83,18 +83,18 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 29, characters 5-12", [ ]); $$throw("File \"jscomp/test/bs_array_test.ml\", line 32, characters 8-15", (function (param) { - Belt__Belt_Array.getExn([ - 0, - 1 - ], -1); - })); + Belt__Belt_Array.getExn([ + 0, + 1 + ], -1); + })); $$throw("File \"jscomp/test/bs_array_test.ml\", line 33, characters 8-15", (function (param) { - Belt__Belt_Array.getExn([ - 0, - 1 - ], 2); - })); + Belt__Belt_Array.getExn([ + 0, + 1 + ], 2); + })); const partial_arg = [ 0, @@ -114,18 +114,18 @@ b("File \"jscomp/test/bs_array_test.ml\", line 34, characters 4-11", Caml_obj.ca ])); $$throw("File \"jscomp/test/bs_array_test.ml\", line 35, characters 8-15", (function (param) { - Belt__Belt_Array.setExn([ - 0, - 1 - ], -1, 0); - })); + Belt__Belt_Array.setExn([ + 0, + 1 + ], -1, 0); + })); $$throw("File \"jscomp/test/bs_array_test.ml\", line 36, characters 8-15", (function (param) { - Belt__Belt_Array.setExn([ - 0, - 1 - ], 2, 0); - })); + Belt__Belt_Array.setExn([ + 0, + 1 + ], 2, 0); + })); b("File \"jscomp/test/bs_array_test.ml\", line 37, characters 4-11", !Belt__Belt_Array.set([ 1, @@ -187,8 +187,8 @@ function add(x, y) { } const v$5 = Belt__Belt_Array.makeBy(3000, (function (i) { - return i; - })); + return i; + })); const u = Belt__Belt_Array.shuffle(v$5); @@ -233,15 +233,15 @@ b("File \"jscomp/test/bs_array_test.ml\", line 64, characters 4-11", Caml_obj.ca b("File \"jscomp/test/bs_array_test.ml\", line 65, characters 4-11", Caml_obj.caml_equal(Belt__Belt_Array.rangeBy(3, 3, 1), [3])); eq("File \"jscomp/test/bs_array_test.ml\", line 70, characters 5-12", Belt__Belt_Array.reduceReverse([], 100, (function (prim0, prim1) { - return prim0 - prim1 | 0; - })), 100); + return prim0 - prim1 | 0; + })), 100); eq("File \"jscomp/test/bs_array_test.ml\", line 71, characters 5-12", Belt__Belt_Array.reduceReverse([ 1, 2 ], 100, (function (prim0, prim1) { - return prim0 - prim1 | 0; - })), 97); + return prim0 - prim1 | 0; + })), 97); eq("File \"jscomp/test/bs_array_test.ml\", line 72, characters 5-12", Belt__Belt_Array.reduceReverse([ 1, @@ -249,8 +249,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 72, characters 5-12", Belt__Belt 3, 4 ], 100, (function (prim0, prim1) { - return prim0 - prim1 | 0; - })), 90); + return prim0 - prim1 | 0; + })), 90); eq("File \"jscomp/test/bs_array_test.ml\", line 73, characters 5-12", Belt__Belt_Array.reduceWithIndex([ 1, @@ -258,8 +258,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 73, characters 5-12", Belt__Belt 3, 4 ], 0, (function (acc, x, i) { - return (acc + x | 0) + i | 0; - })), 16); + return (acc + x | 0) + i | 0; + })), 16); b("File \"jscomp/test/bs_array_test.ml\", line 74, characters 4-11", Belt__Belt_Array.reduceReverse2([ 1, @@ -269,8 +269,8 @@ b("File \"jscomp/test/bs_array_test.ml\", line 74, characters 4-11", Belt__Belt_ 1, 2 ], 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })) === 6); + return (acc + x | 0) + y | 0; + })) === 6); function addone(x) { return x + 1 | 0; @@ -299,12 +299,12 @@ function makeMatrixExn(sx, sy, init) { } eq("File \"jscomp/test/bs_array_test.ml\", line 92, characters 5-12", Belt__Belt_Array.makeBy(0, (function (param) { - return 1; - })), []); + return 1; + })), []); eq("File \"jscomp/test/bs_array_test.ml\", line 93, characters 5-12", Belt__Belt_Array.makeBy(3, (function (i) { - return i; - })), [ + return i; + })), [ 0, 1, 2 @@ -344,8 +344,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 99, characters 5-12", makeMatrix eq("File \"jscomp/test/bs_array_test.ml\", line 100, characters 5-12", [].slice(0), []); eq("File \"jscomp/test/bs_array_test.ml\", line 101, characters 5-12", Belt__Belt_Array.map([], (function (prim) { - return prim + 1 | 0; - })), []); + return prim + 1 | 0; + })), []); eq("File \"jscomp/test/bs_array_test.ml\", line 102, characters 5-12", Belt__Belt_Array.mapWithIndex([], add), []); @@ -386,8 +386,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 107, characters 5-12", Belt__Bel 2, 3 ], (function (prim) { - return prim + 1 | 0; - })), [ + return prim + 1 | 0; + })), [ 2, 3, 4 @@ -427,23 +427,23 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 111, characters 5-12", Belt__Bel ]); const v$6 = Belt__Belt_Array.makeBy(10, (function (i) { - return i; - })); + return i; + })); const v0 = Belt__Belt_Array.keep(v$6, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const v1 = Belt__Belt_Array.keep(v$6, (function (x) { - return x % 3 === 0; - })); + return x % 3 === 0; + })); const v2 = Belt__Belt_Array.keepMap(v$6, (function (x) { - if (x % 2 === 0) { - return x + 1 | 0; - } - - })); + if (x % 2 === 0) { + return x + 1 | 0; + } + + })); eq("File \"jscomp/test/bs_array_test.ml\", line 118, characters 5-12", v0, [ 0, @@ -477,8 +477,8 @@ const a = [ ]; const match = Belt__Belt_Array.partition(a, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); eq("File \"jscomp/test/bs_array_test.ml\", line 125, characters 5-12", match[0], [ 2, @@ -492,8 +492,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 126, characters 5-12", match[1], ]); const match$1 = Belt__Belt_Array.partition(a, (function (x) { - return x === 2; - })); + return x === 2; + })); eq("File \"jscomp/test/bs_array_test.ml\", line 128, characters 5-12", match$1[0], [2]); @@ -505,8 +505,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 129, characters 5-12", match$1[1 ]); const match$2 = Belt__Belt_Array.partition([], (function (x) { - return false; - })); + return false; + })); eq("File \"jscomp/test/bs_array_test.ml\", line 131, characters 5-12", match$2[0], []); @@ -632,8 +632,8 @@ 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), []); const a$3 = Belt__Belt_Array.makeBy(10, (function (x) { - return x; - })); + return x; + })); Belt__Belt_Array.fill(a$3, 0, 3, 0); @@ -801,8 +801,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 190, characters 5-12", b$1, [ ]); const a0 = Belt__Belt_Array.makeBy(10, (function (x) { - return x; - })); + return x; + })); const b0 = Belt__Belt_Array.make(10, 3); @@ -875,8 +875,8 @@ 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); const aa = Belt__Belt_Array.makeBy(10, (function (x) { - return x; - })); + return x; + })); Belt__Belt_Array.blit(aa, -1, aa, 1, 2); @@ -1014,8 +1014,8 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 229, characters 5-12", Belt__Bel 2, 3 ], (function (prim0, prim1) { - return prim0 - prim1 | 0; - })), [ + return prim0 - prim1 | 0; + })), [ 1, 1, 1 @@ -1031,14 +1031,14 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 230, characters 5-12", Belt__Bel 4, 1 ], (function (prim0, prim1) { - return prim0 - prim1 | 0; - })), Belt__Belt_Array.map([ + return prim0 - prim1 | 0; + })), Belt__Belt_Array.map([ 1, 1, 1 ], (function (x) { - return -x | 0; - }))); + return -x | 0; + }))); eq("File \"jscomp/test/bs_array_test.ml\", line 231, characters 5-12", Belt__Belt_Array.unzip([ [ @@ -1071,8 +1071,8 @@ function sumUsingForEach(xs) { contents: 0 }; Belt__Belt_Array.forEach(xs, (function (x) { - v.contents = v.contents + x | 0; - })); + v.contents = v.contents + x | 0; + })); return v.contents; } @@ -1091,8 +1091,8 @@ b("File \"jscomp/test/bs_array_test.ml\", line 242, characters 4-11", !Belt__Bel 3, 4 ], (function (x) { - return x > 2; - }))); + return x > 2; + }))); b("File \"jscomp/test/bs_array_test.ml\", line 243, characters 4-11", Belt__Belt_Array.some([ 1, @@ -1100,35 +1100,35 @@ b("File \"jscomp/test/bs_array_test.ml\", line 243, characters 4-11", Belt__Belt 7, 8 ], (function (x) { - return x % 2 === 0; - }))); + return x % 2 === 0; + }))); b("File \"jscomp/test/bs_array_test.ml\", line 244, characters 4-11", !Belt__Belt_Array.some([ 1, 3, 7 ], (function (x) { - return x % 2 === 0; - }))); + return x % 2 === 0; + }))); b("File \"jscomp/test/bs_array_test.ml\", line 245, characters 4-11", !Belt__Belt_Array.eq([ 0, 1 ], [1], (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); const c$1 = { contents: 0 }; b("File \"jscomp/test/bs_array_test.ml\", line 246, characters 4-11", (Belt__Belt_Array.forEachWithIndex([ - 1, - 1, - 1 - ], (function (i, v) { - c$1.contents = (c$1.contents + i | 0) + v | 0; - })), c$1.contents === 6)); + 1, + 1, + 1 + ], (function (i, v) { + c$1.contents = (c$1.contents + i | 0) + v | 0; + })), c$1.contents === 6)); function id(loc, x) { const u = x.slice(0); @@ -1453,32 +1453,32 @@ eq("File \"jscomp/test/bs_array_test.ml\", line 305, characters 5-12", Belt__Bel 2, 3 ], (function (x) { - return x > 1; - })), 2); + return x > 1; + })), 2); eq("File \"jscomp/test/bs_array_test.ml\", line 306, characters 5-12", Belt__Belt_Array.getBy([ 1, 2, 3 ], (function (x) { - return x > 3; - })), undefined); + return x > 3; + })), undefined); eq("File \"jscomp/test/bs_array_test.ml\", line 309, characters 5-12", Belt__Belt_Array.getIndexBy([ 1, 2, 3 ], (function (x) { - return x > 1; - })), 1); + return x > 1; + })), 1); eq("File \"jscomp/test/bs_array_test.ml\", line 310, characters 5-12", Belt__Belt_Array.getIndexBy([ 1, 2, 3 ], (function (x) { - return x > 3; - })), undefined); + return x > 3; + })), undefined); const arr = []; diff --git a/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js b/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js index e2aa65930..bc45f673c 100644 --- a/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js +++ b/jscomp/test/dist/jscomp/test/bs_auto_uncurry.js @@ -14,8 +14,8 @@ const xbs = Array.prototype.map.call([ 3, 5 ], (function (x) { - return x + 1 | 0; - })); + return x + 1 | 0; + })); function f(cb) { return Array.prototype.map.call([ @@ -31,10 +31,10 @@ const xs = Array.prototype.map.call([ 1, 2 ], (function (x) { - return function (y) { - return (y + x | 0) + 1 | 0; - }; - })); + return function (y) { + return (y + x | 0) + 1 | 0; + }; + })); function f_0(param) { return hi(function () { @@ -80,26 +80,26 @@ function add3(x, y, z) { function h2(x) { return ff(x, (function (prim0, prim1) { - return prim0 + prim1 | 0; - })); + return prim0 + prim1 | 0; + })); } function h3(x) { return ff(x, (function (param, param$1) { - return add3(1, param, param$1); - })); + return add3(1, param, param$1); + })); } function h4(x) { return ff1(x, 3, (function (param, param$1) { - return add3(1, param, param$1); - })); + return add3(1, param, param$1); + })); } function h5(x) { return ff2(x, "3", (function (param, param$1) { - return add3(2, param, param$1); - })); + return add3(2, param, param$1); + })); } function add(x, y) { 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 42908c386..37108d8e8 100644 --- a/jscomp/test/dist/jscomp/test/bs_auto_uncurry_test.js +++ b/jscomp/test/dist/jscomp/test/bs_auto_uncurry_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -89,16 +89,16 @@ eq("File \"jscomp/test/bs_auto_uncurry_test.ml\", line 40, characters 7-14", [ 2, 3 ].reduce((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), 0), 6); + return prim0 + prim1 | 0; + }), 0), 6); eq("File \"jscomp/test/bs_auto_uncurry_test.ml\", line 44, characters 7-14", [ 1, 2, 3 ].reduce((function (x, y, i) { - return (x + y | 0) + i | 0; - }), 0), 9); + return (x + y | 0) + i | 0; + }), 0), 9); eq("File \"jscomp/test/bs_auto_uncurry_test.ml\", line 48, characters 7-14", [ 1, diff --git a/jscomp/test/dist/jscomp/test/bs_float_test.js b/jscomp/test/dist/jscomp/test/bs_float_test.js index 63566eaa5..193ed50f2 100644 --- a/jscomp/test/dist/jscomp/test/bs_float_test.js +++ b/jscomp/test/dist/jscomp/test/bs_float_test.js @@ -30,12 +30,12 @@ function neq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Neq */1, - _0: x, - _1: y - }; - }) + return { + TAG: /* Neq */1, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/bs_hashmap_test.js b/jscomp/test/dist/jscomp/test/bs_hashmap_test.js index 072a15589..a8aeb1d8c 100644 --- a/jscomp/test/dist/jscomp/test/bs_hashmap_test.js +++ b/jscomp/test/dist/jscomp/test/bs_hashmap_test.js @@ -97,8 +97,8 @@ for (let i$1 = 0; i$1 <= 2000; ++i$1) { eqx("File \"jscomp/test/bs_hashmap_test.ml\", line 56, characters 6-13", v$1.size, 98000); b("File \"jscomp/test/bs_hashmap_test.ml\", line 57, characters 4-11", Belt__Belt_Array.every(Array_data_util.range(2001, 100000), (function (x) { - return Belt__Belt_HashMap.has(v$1, x); - }))); + return Belt__Belt_HashMap.has(v$1, x); + }))); Mt.from_pair_suites("Bs_hashmap_test", suites.contents); 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 96948a7e7..786b1c9c8 100644 --- a/jscomp/test/dist/jscomp/test/bs_hashset_int_test.js +++ b/jscomp/test/dist/jscomp/test/bs_hashset_int_test.js @@ -34,8 +34,8 @@ function sum2(h) { contents: 0 }; Belt__Belt_HashSetInt.forEach(h, (function (x) { - v.contents = v.contents + x | 0; - })); + v.contents = v.contents + x | 0; + })); return v.contents; } 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 65b04b496..009be7c11 100644 --- a/jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js +++ b/jscomp/test/dist/jscomp/test/bs_hashtbl_string_test.js @@ -28,22 +28,22 @@ const hashString = (function(str){ ); const $$String = Belt__Belt_Id.hashable(Stdlib__Hashtbl.hash, (function (x, y) { - return x === y; - })); + return x === y; + })); const String1 = Belt__Belt_Id.hashable(hashString, (function (x, y) { - return x === y; - })); + return x === y; + })); const 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; - })); + return Caml_hash_primitive.caml_hash_final_mix(Caml_hash_primitive.caml_hash_mix_string(0, x)); + }), (function (x, y) { + return x === y; + })); const Int = Belt__Belt_Id.hashable(Stdlib__Hashtbl.hash, (function (x, y) { - return x === y; - })); + return x === y; + })); const empty = Belt__Belt_internalBucketsType.make(Int.hash, Int.eq, 500000); diff --git a/jscomp/test/dist/jscomp/test/bs_ignore_effect.js b/jscomp/test/dist/jscomp/test/bs_ignore_effect.js index afa73a0f2..85014c34a 100644 --- a/jscomp/test/dist/jscomp/test/bs_ignore_effect.js +++ b/jscomp/test/dist/jscomp/test/bs_ignore_effect.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -38,9 +38,9 @@ const v = { }; const h = (v.contents = v.contents + 1 | 0, { - hi: 2, - lo: 0 - }); + hi: 2, + lo: 0 +}); const z = (v.contents = v.contents + 1 | 0, add(3.0, 2.0)); diff --git a/jscomp/test/dist/jscomp/test/bs_int_test.js b/jscomp/test/dist/jscomp/test/bs_int_test.js index 44863758c..2a939cb67 100644 --- a/jscomp/test/dist/jscomp/test/bs_int_test.js +++ b/jscomp/test/dist/jscomp/test/bs_int_test.js @@ -30,12 +30,12 @@ function neq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Neq */1, - _0: x, - _1: y - }; - }) + return { + TAG: /* Neq */1, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/bs_list_test.js b/jscomp/test/dist/jscomp/test/bs_list_test.js index 6ac7f383a..8d6b5310c 100644 --- a/jscomp/test/dist/jscomp/test/bs_list_test.js +++ b/jscomp/test/dist/jscomp/test/bs_list_test.js @@ -32,8 +32,8 @@ function sum(xs) { contents: 0 }; Belt__Belt_List.forEach(xs, (function (x) { - v.contents = v.contents + x | 0; - })); + v.contents = v.contents + x | 0; + })); return v.contents; } @@ -42,14 +42,14 @@ function sum2(xs, ys) { contents: 0 }; Belt__Belt_List.forEach2(xs, ys, (function (x, y) { - v.contents = (v.contents + x | 0) + y | 0; - })); + v.contents = (v.contents + x | 0) + y | 0; + })); return v.contents; } const u = Belt__Belt_List.makeBy(5, (function (i) { - return Math.imul(i, i); - })); + return Math.imul(i, i); + })); 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)); @@ -60,8 +60,8 @@ for (let i = 0; i <= 4; ++i) { } eq("File \"jscomp/test/bs_list_test.ml\", line 30, characters 5-12", Belt__Belt_List.map(u, (function (i) { - return i + 1 | 0; - })), { + return i + 1 | 0; + })), { hd: 1, tl: { hd: 2, @@ -91,8 +91,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 31, characters 5-12", Belt__Belt_ } } }, (function (x) { - return x % 2 === 0; - })), 4); + return x % 2 === 0; + })), 4); eq("File \"jscomp/test/bs_list_test.ml\", line 32, characters 5-12", Belt__Belt_List.getBy({ hd: 1, @@ -107,8 +107,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 32, characters 5-12", Belt__Belt_ } } }, (function (x) { - return x % 5 === 0; - })), undefined); + return x % 5 === 0; + })), undefined); eq("FLATTEN", Belt__Belt_List.flatten({ hd: { @@ -129,8 +129,8 @@ eq("FLATTEN", Belt__Belt_List.flatten({ hd: /* [] */0, tl: { hd: Belt__Belt_List.makeBy(4, (function (i) { - return i; - })), + return i; + })), tl: /* [] */0 } } @@ -214,8 +214,8 @@ eq("CONCATMANY", Belt__Belt_List.concatMany([ }, /* [] */0, Belt__Belt_List.makeBy(4, (function (i) { - return i; - })) + return i; + })) ]), { hd: 1, tl: { @@ -322,14 +322,14 @@ eq("CONCATMANY", Belt__Belt_List.concatMany([{ }); eq("File \"jscomp/test/bs_list_test.ml\", line 57, characters 5-12", Belt__Belt_List.toArray(Belt__Belt_List.concat(Belt__Belt_List.makeBy(100, (function (i) { - return i; - })), Belt__Belt_List.makeBy(100, (function (i) { - return i; - })))), Belt__Belt_Array.concat(Belt__Belt_Array.makeBy(100, (function (i) { - return i; - })), Belt__Belt_Array.makeBy(100, (function (i) { - return i; - })))); + return i; + })), Belt__Belt_List.makeBy(100, (function (i) { + return i; + })))), Belt__Belt_Array.concat(Belt__Belt_Array.makeBy(100, (function (i) { + return i; + })), Belt__Belt_Array.makeBy(100, (function (i) { + return i; + })))); eq("APPEND", Belt__Belt_List.concat({ hd: 1, @@ -523,8 +523,8 @@ eq("PARTITION", Belt__Belt_List.partition({ } } }, (function (x) { - return !mod2(x); - })), [ + return !mod2(x); + })), [ /* [] */0, { hd: 2, @@ -727,8 +727,8 @@ function id(x) { } eq("MAP", Belt__Belt_List.map(Belt__Belt_List.makeBy(5, id), (function (x) { - return (x << 1); - })), { + return (x << 1); + })), { hd: 0, tl: { hd: 2, @@ -751,8 +751,8 @@ eq("MAP", Belt__Belt_List.map({ hd: 1, tl: /* [] */0 }, (function (x) { - return -x | 0; - })), { + return -x | 0; + })), { hd: -1, tl: /* [] */0 }); @@ -766,8 +766,8 @@ const length_10_id = Belt__Belt_List.makeBy(10, id); const length_8_id = Belt__Belt_List.makeBy(8, id); const d = Belt__Belt_List.makeBy(10, (function (x) { - return (x << 1); - })); + return (x << 1); + })); eq("MAP2", Belt__Belt_List.zipBy(length_10_id, length_10_id, add), d); @@ -784,8 +784,8 @@ eq("MAP2", Belt__Belt_List.zipBy({ eq("MAP2", Belt__Belt_List.zipBy(/* [] */0, /* [] */0, add), /* [] */0); eq("MAP2", Belt__Belt_List.zipBy(length_10_id, length_10_id, add), Belt__Belt_List.concat(Belt__Belt_List.map(length_8_id, (function (x) { - return (x << 1); - })), { + return (x << 1); + })), { hd: 16, tl: { hd: 18, @@ -794,12 +794,12 @@ eq("MAP2", Belt__Belt_List.zipBy(length_10_id, length_10_id, add), Belt__Belt_Li })); eq("MAP2", Belt__Belt_List.zipBy(length_10_id, length_8_id, add), Belt__Belt_List.mapWithIndex(length_8_id, (function (i, x) { - return i + x | 0; - }))); + return i + x | 0; + }))); eq("MAP2", Belt__Belt_List.reverse(Belt__Belt_List.mapReverse2(length_10_id, length_10_id, add)), Belt__Belt_List.map(length_10_id, (function (x) { - return (x << 1); - }))); + return (x << 1); + }))); const xs = Belt__Belt_List.reverse(Belt__Belt_List.mapReverse2(length_8_id, length_10_id, add)); @@ -823,8 +823,8 @@ eq("MAP2", Belt__Belt_List.mapReverse2({ tl: /* [] */0 } }, (function (x, y) { - return x + y | 0; - })), { + return x + y | 0; + })), { hd: 4, tl: { hd: 2, @@ -1018,8 +1018,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 182, characters 4-11", Belt__Belt_ } } }, 2, (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_list_test.ml\", line 183, characters 4-11", !Belt__Belt_List.hasAssoc({ hd: [ @@ -1040,8 +1040,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 183, characters 4-11", !Belt__Belt } } }, 4, (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_list_test.ml\", line 184, characters 4-11", Belt__Belt_List.hasAssoc({ hd: [ @@ -1062,8 +1062,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 184, characters 4-11", Belt__Belt_ } } }, 4, (function (x, y) { - return (x + 1 | 0) === y; - }))); + return (x + 1 | 0) === y; + }))); eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc({ hd: [ @@ -1084,8 +1084,8 @@ eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc({ } } }, 3, (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 1, "1" @@ -1118,8 +1118,8 @@ eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc({ } } }, 1, (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 2, "2" @@ -1152,8 +1152,8 @@ eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc({ } } }, 2, (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 1, "1" @@ -1186,8 +1186,8 @@ eq("REMOVEASSOQ", Belt__Belt_List.removeAssoc({ } } }, 0, (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 1, "1" @@ -1330,8 +1330,8 @@ const ll0 = Belt__Belt_List.removeAssoc(ll, 0, eqx); b("File \"jscomp/test/bs_list_test.ml\", line 196, characters 5-12", ll === ll0); const ll1 = Belt__Belt_List.setAssoc(ll, 2, "22", (function (prim0, prim1) { - return prim0 === prim1; - })); + return prim0 === prim1; + })); eq("File \"jscomp/test/bs_list_test.ml\", line 198, characters 5-12", ll1, { hd: [ @@ -1354,8 +1354,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 198, characters 5-12", ll1, { }); const ll2 = Belt__Belt_List.setAssoc(ll1, 22, "2", (function (prim0, prim1) { - return prim0 === prim1; - })); + return prim0 === prim1; + })); b("File \"jscomp/test/bs_list_test.ml\", line 200, characters 4-11", Caml_obj.caml_equal(ll2, { hd: [ @@ -1386,8 +1386,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 202, characters 4-11", Caml_obj.ca } } }, 2, "x", (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 1, "a" @@ -1420,8 +1420,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 204, characters 4-11", Caml_obj.ca tl: /* [] */0 } }, 2, "2", (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 2, "2" @@ -1442,8 +1442,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 204, characters 4-11", Caml_obj.ca })); eq("File \"jscomp/test/bs_list_test.ml\", line 206, characters 5-12", Belt__Belt_List.setAssoc(/* [] */0, 1, "1", (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 1, "1" @@ -1460,8 +1460,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 208, characters 5-12", Belt__Belt ], tl: /* [] */0 }, 1, "1", (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 1, "1" @@ -1482,8 +1482,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 210, characters 5-12", Belt__Belt tl: /* [] */0 } }, 1, "1", (function (prim0, prim1) { - return prim0 === prim1; - })), { + return prim0 === prim1; + })), { hd: [ 0, "0" @@ -1516,8 +1516,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 211, characters 4-11", Caml_obj.ca } } }, 2, (function (prim0, prim1) { - return prim0 === prim1; - })), "b")); + return prim0 === prim1; + })), "b")); b("File \"jscomp/test/bs_list_test.ml\", line 212, characters 4-11", Belt__Belt_List.getAssoc({ hd: [ @@ -1538,8 +1538,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 212, characters 4-11", Belt__Belt_ } } }, 4, (function (prim0, prim1) { - return prim0 === prim1; - })) === undefined); + return prim0 === prim1; + })) === undefined); eq("File \"jscomp/test/bs_list_test.ml\", line 216, characters 5-12", [ Belt__Belt_List.head(length_10_id), @@ -1552,32 +1552,32 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 216, characters 5-12", [ eq("File \"jscomp/test/bs_list_test.ml\", line 219, characters 5-12", Belt__Belt_List.head(/* [] */0), undefined); $$throw("File \"jscomp/test/bs_list_test.ml\", line 220, characters 8-15", (function (param) { - Belt__Belt_List.headExn(/* [] */0); - })); + Belt__Belt_List.headExn(/* [] */0); + })); $$throw("File \"jscomp/test/bs_list_test.ml\", line 221, characters 8-15", (function (param) { - Belt__Belt_List.tailExn(/* [] */0); - })); + Belt__Belt_List.tailExn(/* [] */0); + })); $$throw("File \"jscomp/test/bs_list_test.ml\", line 222, characters 8-15", (function (param) { - Belt__Belt_List.getExn({ - hd: 0, - tl: { - hd: 1, - tl: /* [] */0 - } - }, -1); - })); + Belt__Belt_List.getExn({ + hd: 0, + tl: { + hd: 1, + tl: /* [] */0 + } + }, -1); + })); $$throw("File \"jscomp/test/bs_list_test.ml\", line 223, characters 8-15", (function (param) { - Belt__Belt_List.getExn({ - hd: 0, - tl: { - hd: 1, - tl: /* [] */0 - } - }, 2); - })); + Belt__Belt_List.getExn({ + hd: 0, + tl: { + hd: 1, + tl: /* [] */0 + } + }, 2); + })); eq("File \"jscomp/test/bs_list_test.ml\", line 224, characters 5-12", Belt__Belt_List.map({ hd: 0, @@ -1586,14 +1586,14 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 224, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (i) { - return Belt__Belt_List.getExn({ - hd: 0, - tl: { - hd: 1, - tl: /* [] */0 - } - }, i); - })), { + return Belt__Belt_List.getExn({ + hd: 0, + tl: { + hd: 1, + tl: /* [] */0 + } + }, i); + })), { hd: 0, tl: { hd: 1, @@ -1612,16 +1612,16 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 226, characters 5-12", Belt__Belt }), /* [] */0); Belt__Belt_List.forEachWithIndex(length_10_id, (function (i, x) { - eq("File \"jscomp/test/bs_list_test.ml\", line 228, characters 9-16", Belt__Belt_List.get(length_10_id, i), x); - })); + eq("File \"jscomp/test/bs_list_test.ml\", line 228, characters 9-16", Belt__Belt_List.get(length_10_id, i), x); + })); eq("File \"jscomp/test/bs_list_test.ml\", line 229, characters 5-12", Belt__Belt_List.tail(/* [] */0), undefined); eq("File \"jscomp/test/bs_list_test.ml\", line 230, characters 5-12", Belt__Belt_List.drop(/* [] */0, 3), undefined); eq("File \"jscomp/test/bs_list_test.ml\", line 231, characters 5-12", Belt__Belt_List.mapWithIndex(/* [] */0, (function (i, x) { - return i + x | 0; - })), /* [] */0); + return i + x | 0; + })), /* [] */0); eq("File \"jscomp/test/bs_list_test.ml\", line 232, characters 5-12", Belt__Belt_List.get(length_10_id, -1), undefined); @@ -1646,10 +1646,10 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 243, characters 5-12", Belt__Belt eq("File \"jscomp/test/bs_list_test.ml\", line 245, characters 5-12", Belt__Belt_List.reduceReverse(length_10_id, 0, add), 45); eq("File \"jscomp/test/bs_list_test.ml\", line 247, characters 5-12", Belt__Belt_List.reduceReverse(Belt__Belt_List.makeBy(10000, (function (i) { - return i; - })), 0, (function (prim0, prim1) { - return prim0 + prim1 | 0; - })), 49995000); + return i; + })), 0, (function (prim0, prim1) { + return prim0 + prim1 | 0; + })), 49995000); eq("File \"jscomp/test/bs_list_test.ml\", line 252, characters 5-12", sum2(length_10_id, length_10_id), 90); @@ -1658,8 +1658,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 253, characters 5-12", sum2(lengt eq("File \"jscomp/test/bs_list_test.ml\", line 254, characters 5-12", sum2(length_10_id, length_8_id), 56); eq("File \"jscomp/test/bs_list_test.ml\", line 255, characters 5-12", Belt__Belt_List.reduce2(length_10_id, length_8_id, 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })), 56); + return (acc + x | 0) + y | 0; + })), 56); eq("File \"jscomp/test/bs_list_test.ml\", line 257, characters 5-12", Belt__Belt_List.reduce2({ hd: 1, @@ -1680,16 +1680,16 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 257, characters 5-12", Belt__Belt } } }, 0, (function (a, b, c) { - return (a + b | 0) + c | 0; - })), 18); + return (a + b | 0) + c | 0; + })), 18); eq("File \"jscomp/test/bs_list_test.ml\", line 258, characters 5-12", Belt__Belt_List.reduceReverse2(length_10_id, length_8_id, 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })), 56); + return (acc + x | 0) + y | 0; + })), 56); eq("File \"jscomp/test/bs_list_test.ml\", line 260, characters 5-12", Belt__Belt_List.reduceReverse2(length_10_id, length_10_id, 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })), 90); + return (acc + x | 0) + y | 0; + })), 90); eq("File \"jscomp/test/bs_list_test.ml\", line 262, characters 5-12", Belt__Belt_List.reduceReverse2({ hd: 1, @@ -1707,8 +1707,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 262, characters 5-12", Belt__Belt tl: /* [] */0 } }, 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })), 6); + return (acc + x | 0) + y | 0; + })), 6); eq("File \"jscomp/test/bs_list_test.ml\", line 263, characters 5-12", Belt__Belt_List.every({ hd: 2, @@ -1762,8 +1762,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 269, characters 5-12", Belt__Belt } } }, "2", (function (x, s) { - return String(x) === s; - })), true); + return String(x) === s; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 270, characters 5-12", Belt__Belt_List.has({ hd: 1, @@ -1775,8 +1775,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 270, characters 5-12", Belt__Belt } } }, "0", (function (x, s) { - return String(x) === s; - })), false); + return String(x) === s; + })), false); b("File \"jscomp/test/bs_list_test.ml\", line 272, characters 4-11", Belt__Belt_List.reduceReverse({ hd: 1, @@ -1791,8 +1791,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 272, characters 4-11", Belt__Belt_ } } }, 0, (function (prim0, prim1) { - return prim0 + prim1 | 0; - })) === 10); + return prim0 + prim1 | 0; + })) === 10); b("File \"jscomp/test/bs_list_test.ml\", line 273, characters 4-11", Belt__Belt_List.reduceReverse({ hd: 1, @@ -1807,8 +1807,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 273, characters 4-11", Belt__Belt_ } } }, 10, (function (prim0, prim1) { - return prim0 - prim1 | 0; - })) === 0); + return prim0 - prim1 | 0; + })) === 0); b("File \"jscomp/test/bs_list_test.ml\", line 274, characters 4-11", Caml_obj.caml_equal(Belt__Belt_List.reduceReverse({ hd: 1, @@ -1849,8 +1849,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 275, characters 4-11", Belt__Belt_ } } }, 0, (function (prim0, prim1) { - return prim0 + prim1 | 0; - })) === 10); + return prim0 + prim1 | 0; + })) === 10); b("File \"jscomp/test/bs_list_test.ml\", line 276, characters 4-11", Belt__Belt_List.reduce({ hd: 1, @@ -1865,8 +1865,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 276, characters 4-11", Belt__Belt_ } } }, 10, (function (prim0, prim1) { - return prim0 - prim1 | 0; - })) === 0); + return prim0 - prim1 | 0; + })) === 0); b("File \"jscomp/test/bs_list_test.ml\", line 277, characters 4-11", Caml_obj.caml_equal(Belt__Belt_List.reduce({ hd: 1, @@ -1907,8 +1907,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 278, characters 4-11", Belt__Belt_ } } }, 0, (function (acc, x, i) { - return (acc + x | 0) + i | 0; - })) === 16); + return (acc + x | 0) + i | 0; + })) === 16); b("File \"jscomp/test/bs_list_test.ml\", line 279, characters 4-11", Belt__Belt_List.reduceReverse2({ hd: 1, @@ -1926,26 +1926,26 @@ b("File \"jscomp/test/bs_list_test.ml\", line 279, characters 4-11", Belt__Belt_ tl: /* [] */0 } }, 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })) === 6); + return (acc + x | 0) + y | 0; + })) === 6); const a$1 = Belt__Belt_List.makeBy(10000, (function (i) { - return i; - })); + return i; + })); b("File \"jscomp/test/bs_list_test.ml\", line 282, characters 4-11", Belt__Belt_List.reduceReverse2(a$1, { hd: 0, tl: a$1 }, 0, (function (acc, x, y) { - return (acc + x | 0) + y | 0; - })) === 99980001); + return (acc + x | 0) + y | 0; + })) === 99980001); eq("File \"jscomp/test/bs_list_test.ml\", line 288, characters 5-12", Belt__Belt_List.every2(/* [] */0, { hd: 1, tl: /* [] */0 }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 289, characters 5-12", Belt__Belt_List.every2({ hd: 2, @@ -1957,8 +1957,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 289, characters 5-12", Belt__Belt hd: 1, tl: /* [] */0 }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 290, characters 5-12", Belt__Belt_List.every2({ hd: 2, @@ -1967,8 +1967,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 290, characters 5-12", Belt__Belt hd: 1, tl: /* [] */0 }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 291, characters 5-12", Belt__Belt_List.every2({ hd: 2, @@ -1983,8 +1983,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 291, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x > y; - })), false); + return x > y; + })), false); eq("File \"jscomp/test/bs_list_test.ml\", line 292, characters 5-12", Belt__Belt_List.every2({ hd: 2, @@ -1999,15 +1999,15 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 292, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 293, characters 5-12", Belt__Belt_List.some2(/* [] */0, { hd: 1, tl: /* [] */0 }, (function (x, y) { - return x > y; - })), false); + return x > y; + })), false); eq("File \"jscomp/test/bs_list_test.ml\", line 294, characters 5-12", Belt__Belt_List.some2({ hd: 2, @@ -2019,8 +2019,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 294, characters 5-12", Belt__Belt hd: 1, tl: /* [] */0 }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 295, characters 5-12", Belt__Belt_List.some2({ hd: 2, @@ -2035,8 +2035,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 295, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 296, characters 5-12", Belt__Belt_List.some2({ hd: 0, @@ -2051,8 +2051,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 296, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x > y; - })), false); + return x > y; + })), false); eq("File \"jscomp/test/bs_list_test.ml\", line 297, characters 5-12", Belt__Belt_List.some2({ hd: 0, @@ -2067,8 +2067,8 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 297, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x > y; - })), true); + return x > y; + })), true); eq("File \"jscomp/test/bs_list_test.ml\", line 298, characters 5-12", Belt__Belt_List.some2({ hd: 1, @@ -2086,13 +2086,13 @@ eq("File \"jscomp/test/bs_list_test.ml\", line 298, characters 5-12", Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x === y; - })), false); + return x === y; + })), false); function makeTest(n) { eq("File \"jscomp/test/bs_list_test.ml\", line 301, characters 5-12", Belt__Belt_List.make(n, 3), Belt__Belt_List.makeBy(n, (function (param) { - return 3; - }))); + return 3; + }))); } eq("File \"jscomp/test/bs_list_test.ml\", line 304, characters 5-12", { @@ -2372,8 +2372,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 337, characters 4-11", !Belt__Belt tl: /* [] */0 } }, (function (x, y) { - return x === y; - }))); + return x === y; + }))); b("File \"jscomp/test/bs_list_test.ml\", line 338, characters 4-11", Belt__Belt_List.eq({ hd: 1, @@ -2394,8 +2394,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 338, characters 4-11", Belt__Belt_ } } }, (function (x, y) { - return x === y; - }))); + return x === y; + }))); b("File \"jscomp/test/bs_list_test.ml\", line 339, characters 4-11", !Belt__Belt_List.eq({ hd: 1, @@ -2416,8 +2416,8 @@ b("File \"jscomp/test/bs_list_test.ml\", line 339, characters 4-11", !Belt__Belt } } }, (function (x, y) { - return x === y; - }))); + return x === y; + }))); b("File \"jscomp/test/bs_list_test.ml\", line 340, characters 4-11", !Belt__Belt_List.eq({ hd: 1, @@ -2441,19 +2441,19 @@ b("File \"jscomp/test/bs_list_test.ml\", line 340, characters 4-11", !Belt__Belt } } }, (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); const u0 = Belt__Belt_List.makeBy(20, (function (x) { - return x; - })); + return x; + })); const u1 = Belt__Belt_List.keepMap(u0, (function (x) { - if (x % 7 === 0) { - return x + 1 | 0; - } - - })); + if (x % 7 === 0) { + return x + 1 | 0; + } + + })); eq("File \"jscomp/test/bs_list_test.ml\", line 344, characters 5-12", u1, { hd: 1, @@ -2479,11 +2479,11 @@ b("File \"jscomp/test/bs_list_test.ml\", line 345, characters 4-11", Caml_obj.ca } } }, (function (x) { - if (x % 2 === 0) { - return -x | 0; - } - - })), { + if (x % 2 === 0) { + return -x | 0; + } + + })), { hd: -2, tl: { hd: -4, @@ -2504,11 +2504,11 @@ b("File \"jscomp/test/bs_list_test.ml\", line 349, characters 4-11", Caml_obj.ca } } }, (function (x) { - if (x % 5 === 0) { - return x; - } - - })), /* [] */0)); + if (x % 5 === 0) { + return x; + } + + })), /* [] */0)); Mt.from_pair_suites("Bs_list_test", suites.contents); 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 47317467b..21da41602 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 @@ -113,57 +113,57 @@ function $eq$tilde(a, b) { } const u0 = f(Belt__Belt_Array.map(Array_data_util.randomRange(0, 39), (function (x) { - return [ - x, - x - ]; - }))); + return [ + x, + x + ]; + }))); const 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 [ - x, - x - ]; - })), (function (param, param$1) { - if (param[0] === param$1[0]) { - return param[1] === param$1[1]; - } else { - return false; - } - }))); + return [ + x, + x + ]; + })), (function (param, param$1) { + if (param[0] === param$1[0]) { + return param[1] === param$1[1]; + } else { + return false; + } + }))); b("File \"jscomp/test/bs_map_set_dict_test.ml\", line 85, characters 4-11", Belt__Belt_List.every2(Belt__Belt_MapDict.toList(u0.data), Belt__Belt_List.fromArray(Belt__Belt_Array.map(Array_data_util.range(0, 39), (function (x) { - return [ - x, - x - ]; - }))), (function (param, param$1) { - if (param[0] === param$1[0]) { - return param[1] === param$1[1]; - } else { - return false; - } - }))); + return [ + x, + x + ]; + }))), (function (param, param$1) { + if (param[0] === param$1[0]) { + return param[1] === param$1[1]; + } else { + return false; + } + }))); eq("File \"jscomp/test/bs_map_set_dict_test.ml\", line 90, characters 5-12", Belt__Belt_Map.get(u0, 39), 39); eq("File \"jscomp/test/bs_map_set_dict_test.ml\", line 91, characters 5-12", Belt__Belt_Map.get(u1, 39), 120); const u = f(Belt__Belt_Array.makeByAndShuffle(10000, (function (x) { - return [ - x, - x - ]; - }))); + return [ + x, + x + ]; + }))); eq("File \"jscomp/test/bs_map_set_dict_test.ml\", line 97, characters 4-11", Belt__Belt_Array.makeBy(10000, (function (x) { - return [ - x, - x - ]; - })), Belt__Belt_MapDict.toArray(u.data)); + return [ + x, + x + ]; + })), Belt__Belt_MapDict.toArray(u.data)); Mt.from_pair_suites("Bs_map_set_dict_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/bs_map_test.js b/jscomp/test/dist/jscomp/test/bs_map_test.js index db8768e81..8f468758d 100644 --- a/jscomp/test/dist/jscomp/test/bs_map_test.js +++ b/jscomp/test/dist/jscomp/test/bs_map_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -37,11 +37,11 @@ function b(loc, v) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Ok */4, - _0: v - }; - }) + return { + TAG: /* Ok */4, + _0: v + }; + }) ], tl: suites.contents }; @@ -56,11 +56,11 @@ function emptyMap(param) { } const v = Belt__Belt_Array.makeByAndShuffle(1000000, (function (i) { - return [ - i, - i - ]; - })); + return [ + i, + i + ]; + })); const u = Belt__Belt_MapInt.fromArray(v); @@ -69,8 +69,8 @@ Belt__Belt_MapInt.checkInvariantInternal(u); const firstHalf = Belt__Belt_Array.slice(v, 0, 2000); const xx = Belt__Belt_Array.reduce(firstHalf, u, (function (acc, param) { - return Belt__Belt_MapInt.remove(acc, param[0]); - })); + return Belt__Belt_MapInt.remove(acc, param[0]); + })); Belt__Belt_MapInt.checkInvariantInternal(u); 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 129332556..979b21a43 100644 --- a/jscomp/test/dist/jscomp/test/bs_mutable_set_test.js +++ b/jscomp/test/dist/jscomp/test/bs_mutable_set_test.js @@ -114,32 +114,32 @@ const v = { }; const bs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 1499), (function (x) { - return Belt__Belt_MutableSetInt.removeCheck(v, x); - })); + return Belt__Belt_MutableSetInt.removeCheck(v, x); + })); const indeedRemoved = Belt__Belt_Array.reduce(bs, 0, (function (acc, x) { - if (x) { - return acc + 1 | 0; - } else { - return acc; - } - })); + if (x) { + return acc + 1 | 0; + } else { + return acc; + } + })); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 65, characters 5-12", indeedRemoved, 500); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 66, characters 5-12", Belt__Belt_internalAVLset.size(v.data), 501); const cs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 2000), (function (x) { - return Belt__Belt_MutableSetInt.addCheck(v, x); - })); + return Belt__Belt_MutableSetInt.addCheck(v, x); + })); const indeedAded = Belt__Belt_Array.reduce(cs, 0, (function (acc, x) { - if (x) { - return acc + 1 | 0; - } else { - return acc; - } - })); + if (x) { + return acc + 1 | 0; + } else { + return acc; + } + })); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 69, characters 5-12", indeedAded, 1000); @@ -158,14 +158,14 @@ eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 74, characters 5-12", Belt eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 75, characters 5-12", Belt__Belt_internalAVLset.maxUndefined(v.data), 2000); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 76, characters 5-12", Belt__Belt_MutableSetInt.reduce(v, 0, (function (x, y) { - return x + y | 0; - })), 1876250); + return x + y | 0; + })), 1876250); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 77, characters 4-11", Belt__Belt_List.eq(Belt__Belt_internalAVLset.toList(v.data), Belt__Belt_List.makeBy(1501, (function (i) { - return i + 500 | 0; - })), (function (x, y) { - return x === y; - }))); + return i + 500 | 0; + })), (function (x, y) { + return x === y; + }))); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 78, characters 5-12", Belt__Belt_internalAVLset.toArray(v.data), Array_data_util.range(500, 2000)); @@ -186,12 +186,12 @@ const aa = match$1[0]; b("File \"jscomp/test/bs_mutable_set_test.ml\", line 83, characters 4-11", match[1]); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 84, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(aa.data), Array_data_util.range(500, 999), (function (x, y) { - return x === y; - }))); + return x === y; + }))); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 85, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(bb.data), Array_data_util.range(1001, 2000), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 86, characters 5-12", Belt__Belt_MutableSetInt.subset(aa, v)); @@ -214,12 +214,12 @@ const aa$1 = match$3[0]; b("File \"jscomp/test/bs_mutable_set_test.ml\", line 92, characters 4-11", !match$2[1]); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 93, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(aa$1.data), Array_data_util.range(500, 999), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 94, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(bb$1.data), Array_data_util.range(1001, 2000), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 95, characters 5-12", Belt__Belt_MutableSetInt.subset(aa$1, v)); @@ -379,16 +379,16 @@ const a0 = { }; const a1 = Belt__Belt_MutableSetInt.keep(a0, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const a2 = Belt__Belt_MutableSetInt.keep(a0, (function (x) { - return x % 2 !== 0; - })); + return x % 2 !== 0; + })); const match$4 = Belt__Belt_MutableSetInt.partition(a0, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const a4 = match$4[1]; @@ -414,8 +414,8 @@ Belt__Belt_List.forEach({ } } }, (function (x) { - Belt__Belt_internalAVLset.checkInvariantInternal(x.data); - })); + Belt__Belt_internalAVLset.checkInvariantInternal(x.data); + })); const v$1 = { data: undefined @@ -428,8 +428,8 @@ for (let i$2 = 0; i$2 <= 100000; ++i$2) { Belt__Belt_internalAVLset.checkInvariantInternal(v$1.data); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 178, characters 4-11", Belt__Belt_Range.every(0, 100000, (function (i) { - return Belt__Belt_internalSetInt.has(v$1.data, i); - }))); + return Belt__Belt_internalSetInt.has(v$1.data, i); + }))); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 181, characters 5-12", Belt__Belt_internalAVLset.size(v$1.data), 100001); @@ -472,8 +472,8 @@ 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)); const xs$25 = Belt__Belt_Array.makeBy(30, (function (i) { - return i; - })); + return i; + })); const v$4 = { data: Belt__Belt_internalSetInt.fromArray(xs$25) @@ -505,8 +505,8 @@ function id(loc, x) { }; Belt__Belt_internalAVLset.checkInvariantInternal(u.data); b(loc, Belt__Belt_Array.every2(Belt__Belt_internalAVLset.toArray(u.data), x, (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); } id("File \"jscomp/test/bs_mutable_set_test.ml\", line 229, characters 5-12", []); @@ -599,16 +599,16 @@ const v$5 = { }; const copyV = Belt__Belt_MutableSetInt.keep(v$5, (function (x) { - return x % 8 === 0; - })); + return x % 8 === 0; + })); const match$5 = Belt__Belt_MutableSetInt.partition(v$5, (function (x) { - return x % 8 === 0; - })); + return x % 8 === 0; + })); const cc$1 = Belt__Belt_MutableSetInt.keep(v$5, (function (x) { - return x % 8 !== 0; - })); + return x % 8 !== 0; + })); for (let i$6 = 0; i$6 <= 200; ++i$6) { Belt__Belt_MutableSetInt.remove(v$5, i$6); @@ -617,8 +617,8 @@ for (let i$6 = 0; i$6 <= 200; ++i$6) { eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 250, characters 5-12", Belt__Belt_internalAVLset.size(copyV.data), 126); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 251, characters 5-12", Belt__Belt_internalAVLset.toArray(copyV.data), Belt__Belt_Array.makeBy(126, (function (i) { - return (i << 3); - }))); + return (i << 3); + }))); eq("File \"jscomp/test/bs_mutable_set_test.ml\", line 252, characters 5-12", Belt__Belt_internalAVLset.size(v$5.data), 800); @@ -649,8 +649,8 @@ b("File \"jscomp/test/bs_mutable_set_test.ml\", line 260, characters 4-11", Belt })); const xs$30 = Belt__Belt_Array.map(Array_data_util.randomRange(0, 1000), (function (x) { - return (x << 1); - })); + return (x << 1); + })); const d = { data: Belt__Belt_internalSetInt.fromArray(xs$30) @@ -661,16 +661,16 @@ const match$8 = Belt__Belt_MutableSetInt.split(d, 1001); const match$9 = match$8[0]; const xs$31 = Belt__Belt_Array.makeBy(501, (function (x) { - return (x << 1); - })); + return (x << 1); + })); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 263, characters 4-11", Belt__Belt_MutableSetInt.eq(match$9[0], { data: Belt__Belt_internalSetInt.fromArray(xs$31) })); const xs$32 = Belt__Belt_Array.makeBy(500, (function (x) { - return 1002 + (x << 1) | 0; - })); + return 1002 + (x << 1) | 0; + })); b("File \"jscomp/test/bs_mutable_set_test.ml\", line 264, characters 4-11", Belt__Belt_MutableSetInt.eq(match$9[1], { data: Belt__Belt_internalSetInt.fromArray(xs$32) 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 3069627ad..7979a3e52 100644 --- a/jscomp/test/dist/jscomp/test/bs_poly_map_test.js +++ b/jscomp/test/dist/jscomp/test/bs_poly_map_test.js @@ -46,41 +46,41 @@ function emptyMap(param) { function mergeInter(s1, s2) { const m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { - if (v1 !== undefined && v2 !== undefined) { - return Caml_option.some(undefined); - } - - })); + if (v1 !== undefined && v2 !== undefined) { + return Caml_option.some(undefined); + } + + })); return Belt__Belt_Set.fromArray(Belt__Belt_MapDict.keysToArray(m.data), Icmp); } function mergeUnion(s1, s2) { const m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { - if (v1 !== undefined || v2 !== undefined) { - return Caml_option.some(undefined); - } - - })); + if (v1 !== undefined || v2 !== undefined) { + return Caml_option.some(undefined); + } + + })); return Belt__Belt_Set.fromArray(Belt__Belt_MapDict.keysToArray(m.data), Icmp); } function mergeDiff(s1, s2) { const m = Belt__Belt_Map.merge(s1, s2, (function (k, v1, v2) { - if (v1 !== undefined && v2 === undefined) { - return Caml_option.some(undefined); - } - - })); + if (v1 !== undefined && v2 === undefined) { + return Caml_option.some(undefined); + } + + })); return Belt__Belt_Set.fromArray(Belt__Belt_MapDict.keysToArray(m.data), Icmp); } function randomRange(i, j) { return Belt__Belt_Array.map(Array_data_util.randomRange(i, j), (function (x) { - return [ - x, - x - ]; - })); + return [ + x, + x + ]; + })); } const u0 = Belt__Belt_Map.fromArray(randomRange(0, 100), Icmp); @@ -102,19 +102,19 @@ const a1 = Belt__Belt_Map.set(a0, 3, 33); const a2 = Belt__Belt_Map.remove(a1, 3); const a3 = Belt__Belt_Map.update(a2, 3, (function (k) { - if (k !== undefined) { - return k + 1 | 0; - } else { - return 11; - } - })); + if (k !== undefined) { + return k + 1 | 0; + } else { + return 11; + } + })); const a4 = Belt__Belt_Map.update(a2, 3, (function (k) { - if (k !== undefined) { - return k + 1 | 0; - } - - })); + if (k !== undefined) { + return k + 1 | 0; + } + + })); const a5 = Belt__Belt_Map.remove(a0, 3); @@ -169,14 +169,14 @@ eq("File \"jscomp/test/bs_poly_map_test.ml\", line 91, characters 5-12", Belt__B function acc(m, is) { return Belt__Belt_Array.reduce(is, m, (function (a, i) { - return Belt__Belt_Map.update(a, i, (function (n) { - if (n !== undefined) { - return n + 1 | 0; - } else { - return 1; - } - })); - })); + return Belt__Belt_Map.update(a, i, (function (n) { + if (n !== undefined) { + return n + 1 | 0; + } else { + return 1; + } + })); + })); } const m_cmp = Icmp.cmp; @@ -189,13 +189,13 @@ const m = { const 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 [ - i, - i >= 10 && i <= 20 ? 2 : 1 - ]; - })), Icmp), (function (x, y) { - return x === y; - }))); + return [ + i, + i >= 10 && i <= 20 ? 2 : 1 + ]; + })), Icmp), (function (x, y) { + return x === y; + }))); const v0_cmp = Icmp.cmp; @@ -205,22 +205,22 @@ const v0 = { }; const v1 = Belt__Belt_Map.mergeMany(v0, Belt__Belt_Array.map(Array_data_util.randomRange(0, 10000), (function (x) { - return [ - x, - x - ]; - }))); + return [ + x, + x + ]; + }))); const v2 = Belt__Belt_Map.fromArray(Belt__Belt_Array.map(Array_data_util.randomRange(0, 10000), (function (x) { - return [ - x, - x - ]; - })), Icmp); + return [ + x, + x + ]; + })), Icmp); b("File \"jscomp/test/bs_poly_map_test.ml\", line 117, characters 4-11", Belt__Belt_Map.eq(v1, v2, (function (x, y) { - return x === y; - }))); + return x === y; + }))); function inc(x) { if (x !== undefined) { @@ -269,16 +269,16 @@ b("File \"jscomp/test/bs_poly_map_test.ml\", line 130, characters 4-11", Belt__B b("File \"jscomp/test/bs_poly_map_test.ml\", line 131, characters 4-11", pres !== undefined ? pres === 5000 : false); b("File \"jscomp/test/bs_poly_map_test.ml\", line 132, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_MapDict.keysToArray(match$1[0].data), Belt__Belt_Array.makeBy(5000, (function (i) { - return i; - })), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return i; + })), (function (prim0, prim1) { + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_poly_map_test.ml\", line 133, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_MapDict.keysToArray(match$1[1].data), Belt__Belt_Array.makeBy(5000, (function (i) { - return 5001 + i | 0; - })), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return 5001 + i | 0; + })), (function (prim0, prim1) { + return prim0 === prim1; + }))); const v7 = Belt__Belt_Map.remove(v3, 5000); @@ -289,16 +289,16 @@ const match$6 = match$5[0]; b("File \"jscomp/test/bs_poly_map_test.ml\", line 137, characters 4-11", match$5[1] === undefined); b("File \"jscomp/test/bs_poly_map_test.ml\", line 138, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_MapDict.keysToArray(match$6[0].data), Belt__Belt_Array.makeBy(5000, (function (i) { - return i; - })), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return i; + })), (function (prim0, prim1) { + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_poly_map_test.ml\", line 139, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_MapDict.keysToArray(match$6[1].data), Belt__Belt_Array.makeBy(5000, (function (i) { - return 5001 + i | 0; - })), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return 5001 + i | 0; + })), (function (prim0, prim1) { + return prim0 === prim1; + }))); Mt.from_pair_suites("Bs_poly_map_test", suites.contents); 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 8623971ce..dd7af58f6 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 @@ -38,11 +38,11 @@ function ff(x) { function randomRange(i, j) { return Belt__Belt_Array.map(Array_data_util.randomRange(i, j), (function (x) { - return [ - x, - x - ]; - })); + return [ + x, + x + ]; + })); } const a0 = Belt__Belt_MutableMap.fromArray(randomRange(0, 10), Icmp); @@ -79,12 +79,12 @@ const a0$1 = Belt__Belt_MutableMap.fromArray(randomRange(0, 10000), Icmp); Belt__Belt_MutableMap.set(a0$1, 2000, 33); Belt__Belt_MutableMap.removeMany(a0$1, Belt__Belt_Array.map(randomRange(0, 1998), (function (prim) { - return prim[0]; - }))); + return prim[0]; + }))); Belt__Belt_MutableMap.removeMany(a0$1, Belt__Belt_Array.map(randomRange(2002, 11000), (function (prim) { - return prim[0]; - }))); + return prim[0]; + }))); eq("File \"jscomp/test/bs_poly_mutable_map_test.ml\", line 41, characters 6-13", Belt__Belt_internalAVLtree.toArray(a0$1.data), [ [ 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 64379f0dd..46c40eacb 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 @@ -118,32 +118,32 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 56, characters 4-11", const v = fromArray(Array_data_util.randomRange(1000, 2000)); const bs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 1499), (function (x) { - return Belt__Belt_MutableSet.removeCheck(v, x); - })); + return Belt__Belt_MutableSet.removeCheck(v, x); + })); const indeedRemoved = Belt__Belt_Array.reduce(bs, 0, (function (acc, x) { - if (x) { - return acc + 1 | 0; - } else { - return acc; - } - })); + if (x) { + return acc + 1 | 0; + } else { + return acc; + } + })); eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 63, characters 5-12", indeedRemoved, 500); eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 64, characters 5-12", Belt__Belt_internalAVLset.size(v.data), 501); const cs = Belt__Belt_Array.map(Array_data_util.randomRange(500, 2000), (function (x) { - return Belt__Belt_MutableSet.addCheck(v, x); - })); + return Belt__Belt_MutableSet.addCheck(v, x); + })); const indeedAded = Belt__Belt_Array.reduce(cs, 0, (function (acc, x) { - if (x) { - return acc + 1 | 0; - } else { - return acc; - } - })); + if (x) { + return acc + 1 | 0; + } else { + return acc; + } + })); eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 67, characters 5-12", indeedAded, 1000); @@ -163,14 +163,14 @@ eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 72, characters 5-12", eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 73, characters 5-12", Belt__Belt_internalAVLset.maxUndefined(v.data), 2000); eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 74, characters 5-12", Belt__Belt_MutableSet.reduce(v, 0, (function (x, y) { - return x + y | 0; - })), 1876250); + return x + y | 0; + })), 1876250); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 75, characters 4-11", Belt__Belt_List.eq(Belt__Belt_internalAVLset.toList(v.data), Belt__Belt_List.makeBy(1501, (function (i) { - return i + 500 | 0; - })), (function (x, y) { - return x === y; - }))); + return i + 500 | 0; + })), (function (x, y) { + return x === y; + }))); eq("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 76, characters 5-12", Belt__Belt_internalAVLset.toArray(v.data), Array_data_util.range(500, 2000)); @@ -191,12 +191,12 @@ const aa = match$1[0]; b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 81, characters 4-11", match[1]); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 82, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(aa.data), Array_data_util.range(500, 999), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 83, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(bb.data), Array_data_util.range(1001, 2000), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 84, characters 5-12", Belt__Belt_MutableSet.subset(aa, v)); @@ -219,12 +219,12 @@ const aa$1 = match$3[0]; b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 90, characters 4-11", !match$2[1]); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 91, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(aa$1.data), Array_data_util.range(500, 999), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 92, characters 4-11", Belt__Belt_Array.eq(Belt__Belt_internalAVLset.toArray(bb$1.data), Array_data_util.range(1001, 2000), (function (prim0, prim1) { - return prim0 === prim1; - }))); + return prim0 === prim1; + }))); b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 93, characters 5-12", Belt__Belt_MutableSet.subset(aa$1, v)); @@ -288,16 +288,16 @@ b("File \"jscomp/test/bs_poly_mutable_set_test.ml\", line 147, characters 4-11", const a0 = fromArray(Array_data_util.randomRange(0, 1000)); const a1 = Belt__Belt_MutableSet.keep(a0, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const a2 = Belt__Belt_MutableSet.keep(a0, (function (x) { - return x % 2 !== 0; - })); + return x % 2 !== 0; + })); const match$4 = Belt__Belt_MutableSet.partition(a0, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const a4 = match$4[1]; @@ -323,8 +323,8 @@ Belt__Belt_List.forEach({ } } }, (function (x) { - Belt__Belt_internalAVLset.checkInvariantInternal(x.data); - })); + Belt__Belt_internalAVLset.checkInvariantInternal(x.data); + })); Mt.from_pair_suites("Bs_poly_mutable_set_test", suites.contents); 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 55f388e0a..795f9cb28 100644 --- a/jscomp/test/dist/jscomp/test/bs_poly_set_test.js +++ b/jscomp/test/dist/jscomp/test/bs_poly_set_test.js @@ -146,8 +146,8 @@ const u26 = Belt__Belt_Set.add({ }, 3); const ss = Belt__Belt_Array.makeByAndShuffle(100, (function (i) { - return (i << 1); - })); + return (i << 1); + })); const u27 = Belt__Belt_Set.fromArray(ss, IntCmp); @@ -200,11 +200,11 @@ function testIterToList(xs) { contents: /* [] */0 }; Belt__Belt_Set.forEach(xs, (function (x) { - v.contents = { - hd: x, - tl: v.contents - }; - })); + v.contents = { + hd: x, + tl: v.contents + }; + })); return Belt__Belt_List.reverse(v.contents); } @@ -213,11 +213,11 @@ function testIterToList2(xs) { contents: /* [] */0 }; Belt__Belt_SetDict.forEach(xs.data, (function (x) { - v.contents = { - hd: x, - tl: v.contents - }; - })); + v.contents = { + hd: x, + tl: v.contents + }; + })); return Belt__Belt_List.reverse(v.contents); } @@ -228,48 +228,48 @@ const u1$1 = Belt__Belt_Set.remove(u0$1, 17); const 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; - })), (function (x, y) { - return x === y; - }))); + return i; + })), (function (x, y) { + return x === y; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 110, characters 4-11", Belt__Belt_List.every2(testIterToList2(u0$1), Belt__Belt_List.makeBy(21, (function (i) { - return i; - })), (function (x, y) { - return x === y; - }))); + return i; + })), (function (x, y) { + return x === y; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 111, characters 4-11", Belt__Belt_List.every2(testIterToList(u0$1), Belt__Belt_SetDict.toList(u0$1.data), (function (x, y) { - return x === y; - }))); + return x === y; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 112, characters 4-11", Belt__Belt_Set.some(u0$1, (function (x) { - return x === 17; - }))); + return x === 17; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 113, characters 4-11", !Belt__Belt_Set.some(u1$1, (function (x) { - return x === 17; - }))); + return x === 17; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 114, characters 4-11", Belt__Belt_Set.every(u0$1, (function (x) { - return x < 24; - }))); + return x < 24; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 115, characters 4-11", Belt__Belt_SetDict.every(u0$1.data, (function (x) { - return x < 24; - }))); + return x < 24; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 116, characters 4-11", !Belt__Belt_Set.every(u2$1, (function (x) { - return x < 24; - }))); + return x < 24; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 117, characters 4-11", !Belt__Belt_Set.every(Belt__Belt_Set.fromArray([ 1, 2, 3 ], IntCmp), (function (x) { - return x === 2; - }))); + return x === 2; + }))); b("File \"jscomp/test/bs_poly_set_test.ml\", line 118, characters 4-11", Belt__Belt_Set.cmp(u1$1, u0$1) < 0); @@ -278,16 +278,16 @@ b("File \"jscomp/test/bs_poly_set_test.ml\", line 119, characters 4-11", Belt__B const a0 = Belt__Belt_Set.fromArray(Array_data_util.randomRange(0, 1000), IntCmp); const a1 = Belt__Belt_Set.keep(a0, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const a2 = Belt__Belt_Set.keep(a0, (function (x) { - return x % 2 !== 0; - })); + return x % 2 !== 0; + })); const match = Belt__Belt_Set.partition(a0, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); const a4 = match[1]; @@ -302,12 +302,12 @@ eq("File \"jscomp/test/bs_poly_set_test.ml\", line 131, characters 5-12", Belt__ eq("File \"jscomp/test/bs_poly_set_test.ml\", line 132, characters 5-12", Belt__Belt_Set.getExn(a0, 4), 4); t("File \"jscomp/test/bs_poly_set_test.ml\", line 133, characters 4-11", (function (param) { - Belt__Belt_Set.getExn(a0, 1002); - })); + Belt__Belt_Set.getExn(a0, 1002); + })); t("File \"jscomp/test/bs_poly_set_test.ml\", line 134, characters 4-11", (function (param) { - Belt__Belt_Set.getExn(a0, -1); - })); + Belt__Belt_Set.getExn(a0, -1); + })); eq("File \"jscomp/test/bs_poly_set_test.ml\", line 135, characters 5-12", Belt__Belt_SetDict.size(a0.data), 1001); @@ -320,12 +320,12 @@ const match$2 = match$1[0]; b("File \"jscomp/test/bs_poly_set_test.ml\", line 138, characters 4-11", match$1[1]); eq("File \"jscomp/test/bs_poly_set_test.ml\", line 139, characters 5-12", Belt__Belt_SetDict.toArray(match$2[0].data), Belt__Belt_Array.makeBy(200, (function (i) { - return i; - }))); + return i; + }))); eq("File \"jscomp/test/bs_poly_set_test.ml\", line 140, characters 5-12", Belt__Belt_SetDict.toList(match$2[1].data), Belt__Belt_List.makeBy(800, (function (i) { - return i + 201 | 0; - }))); + return i + 201 | 0; + }))); const a7 = Belt__Belt_Set.remove(a0, 200); @@ -340,12 +340,12 @@ const a8 = match$4[0]; b("File \"jscomp/test/bs_poly_set_test.ml\", line 143, characters 4-11", !match$3[1]); eq("File \"jscomp/test/bs_poly_set_test.ml\", line 144, characters 5-12", Belt__Belt_SetDict.toArray(a8.data), Belt__Belt_Array.makeBy(200, (function (i) { - return i; - }))); + return i; + }))); eq("File \"jscomp/test/bs_poly_set_test.ml\", line 145, characters 5-12", Belt__Belt_SetDict.toList(a9.data), Belt__Belt_List.makeBy(800, (function (i) { - return i + 201 | 0; - }))); + return i + 201 | 0; + }))); eq("File \"jscomp/test/bs_poly_set_test.ml\", line 146, characters 5-12", Belt__Belt_SetDict.minimum(a8.data), 0); @@ -367,14 +367,14 @@ Belt__Belt_List.forEach({ } } }, (function (x) { - Belt__Belt_SetDict.checkInvariantInternal(x.data); - })); + Belt__Belt_SetDict.checkInvariantInternal(x.data); + })); const a = Belt__Belt_Set.fromArray([], IntCmp); const m = Belt__Belt_Set.keep(a, (function (x) { - return x % 2 === 0; - })); + return x % 2 === 0; + })); b("File \"jscomp/test/bs_poly_set_test.ml\", line 153, characters 4-11", Belt__Belt_SetDict.isEmpty(m.data)); diff --git a/jscomp/test/dist/jscomp/test/bs_queue_test.js b/jscomp/test/dist/jscomp/test/bs_queue_test.js index cf5884dc8..7b457507e 100644 --- a/jscomp/test/dist/jscomp/test/bs_queue_test.js +++ b/jscomp/test/dist/jscomp/test/bs_queue_test.js @@ -68,9 +68,9 @@ if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray((Belt__Belt_MutableQue } if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray((Belt__Belt_MutableQueue.add(q, 2), q)), [ - 1, - 2 - ]) && q.length === 2)) { + 1, + 2 + ]) && q.length === 2)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -82,10 +82,10 @@ if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray((Belt__Belt_MutableQue } if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray((Belt__Belt_MutableQueue.add(q, 3), q)), [ - 1, - 2, - 3 - ]) && q.length === 3)) { + 1, + 2, + 3 + ]) && q.length === 3)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -97,11 +97,11 @@ if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray((Belt__Belt_MutableQue } if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray((Belt__Belt_MutableQueue.add(q, 4), q)), [ - 1, - 2, - 3, - 4 - ]) && q.length === 4)) { + 1, + 2, + 3, + 4 + ]) && q.length === 4)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -124,10 +124,10 @@ if (Belt__Belt_MutableQueue.popExn(q) !== 1) { } if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q), [ - 2, - 3, - 4 - ]) && q.length === 3)) { + 2, + 3, + 4 + ]) && q.length === 3)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -150,9 +150,9 @@ if (Belt__Belt_MutableQueue.popExn(q) !== 2) { } if (!(Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q), [ - 3, - 4 - ]) && q.length === 2)) { + 3, + 4 + ]) && q.length === 2)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -677,18 +677,18 @@ const i$7 = { }; Belt__Belt_MutableQueue.forEach(q$5, (function (j) { - if (i$7.contents !== j) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/bs_queue_test.ml", - 100, - 24 - ] - }); - } - i$7.contents = i$7.contents + 1 | 0; - })); + if (i$7.contents !== j) { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/bs_queue_test.ml", + 100, + 24 + ] + }); + } + i$7.contents = i$7.contents + 1 | 0; + })); const q1$1 = { length: 0, @@ -1156,10 +1156,10 @@ if (!Caml_obj.caml_equal(Belt__Belt_MutableQueue.toArray(q2$4), v)) { } if (Belt__Belt_MutableQueue.reduce(q2$4, 0, (function (x, y) { - return x - y | 0; - })) !== Belt__Belt_Array.reduce(v, 0, (function (x, y) { - return x - y | 0; - }))) { + return x - y | 0; + })) !== Belt__Belt_Array.reduce(v, 0, (function (x, y) { + return x - y | 0; + }))) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -1180,8 +1180,8 @@ const q$6 = Belt__Belt_MutableQueue.fromArray([ ]); const q1$5 = Belt__Belt_MutableQueue.map(q$6, (function (x) { - return x - 1 | 0; - })); + return x - 1 | 0; + })); eq("File \"jscomp/test/bs_queue_test.ml\", line 154, characters 5-12", Belt__Belt_MutableQueue.toArray(q1$5), [ 0, @@ -1195,8 +1195,8 @@ const q$7 = Belt__Belt_MutableQueue.fromArray([]); b("File \"jscomp/test/bs_queue_test.ml\", line 155, characters 4-11", q$7.length === 0); const q$8 = Belt__Belt_MutableQueue.map(Belt__Belt_MutableQueue.fromArray([]), (function (x) { - return x + 1 | 0; - })); + return x + 1 | 0; + })); b("File \"jscomp/test/bs_queue_test.ml\", line 156, characters 4-11", q$8.length === 0); 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 7975f6d9c..bf065c753 100644 --- a/jscomp/test/dist/jscomp/test/bs_set_int_test.js +++ b/jscomp/test/dist/jscomp/test/bs_set_int_test.js @@ -56,14 +56,14 @@ b("File \"jscomp/test/bs_set_int_test.ml\", line 23, characters 4-11", Belt__Bel function range(i, j) { return Stdlib__Array.init((j - i | 0) + 1 | 0, (function (k) { - return k + i | 0; - })); + return k + i | 0; + })); } function revRange(i, j) { return Stdlib__Array.of_list(Stdlib__List.rev(Stdlib__Array.to_list(Stdlib__Array.init((j - i | 0) + 1 | 0, (function (k) { - return k + i | 0; - }))))); + return k + i | 0; + }))))); } const v = Belt__Belt_SetInt.fromArray(Stdlib__Array.append(range(100, 1000), revRange(400, 1500))); @@ -73,8 +73,8 @@ const 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)); const match = Belt__Belt_SetInt.partition(v, (function (x) { - return x % 3 === 0; - })); + return x % 3 === 0; + })); let l; @@ -163,10 +163,10 @@ function approx(loc, x, y) { } eq("File \"jscomp/test/bs_set_int_test.ml\", line 74, characters 5-12", Belt__Belt_SetInt.reduce(v$1, 0, (function (x, y) { - return x + y | 0; - })), Belt__Belt_Array.reduce(ss, 0, (function (prim0, prim1) { - return prim0 + prim1 | 0; - }))); + return x + y | 0; + })), Belt__Belt_Array.reduce(ss, 0, (function (prim0, prim1) { + return prim0 + prim1 | 0; + }))); approx("File \"jscomp/test/bs_set_int_test.ml\", line 75, characters 9-16", -1, minv); @@ -217,8 +217,8 @@ const 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)); const v$11 = Belt__Belt_Array.makeByAndShuffle(1000000, (function (i) { - return i; - })); + return i; + })); const u$1 = Belt__Belt_SetInt.fromArray(v$11); @@ -342,16 +342,16 @@ const v3 = Belt__Belt_SetInt.removeMany(v2, [ ]); const us = Belt__Belt_Array.map(Array_data_util.randomRange(1000, 3000), (function (x) { - return Belt__Belt_SetInt.has(v$12, x); - })); + return Belt__Belt_SetInt.has(v$12, x); + })); const counted = Belt__Belt_Array.reduce(us, 0, (function (acc, x) { - if (x) { - return acc + 1 | 0; - } else { - return acc; - } - })); + if (x) { + return acc + 1 | 0; + } else { + return acc; + } + })); eq("File \"jscomp/test/bs_set_int_test.ml\", line 168, characters 5-12", counted, 1001); diff --git a/jscomp/test/dist/jscomp/test/bs_sort_test.js b/jscomp/test/dist/jscomp/test/bs_sort_test.js index 483b249ac..5f275e62b 100644 --- a/jscomp/test/dist/jscomp/test/bs_sort_test.js +++ b/jscomp/test/dist/jscomp/test/bs_sort_test.js @@ -93,16 +93,16 @@ 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) { - const v = Array_data_util.randomRange(0, i); - Belt__Belt_SortArray.stableSortInPlaceBy(v, cmp); - return Belt__Belt_SortArray.isSorted(v, cmp); - }))); + const 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) { - const v = Array_data_util.randomRange(0, i); - Belt__Belt_SortArray.stableSortInPlaceBy(v, cmp); - return Belt__Belt_SortArray.isSorted(v, cmp); - }))); + const 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 62, characters 4-11", Belt__Belt_SortArray.isSorted([], cmp)); @@ -164,8 +164,8 @@ const u$1 = [ ]; eq("File \"jscomp/test/bs_sort_test.ml\", line 90, characters 5-12", Belt__Belt_SortArray.stableSortBy(u$1, (function (param, param$1) { - return param[0] - param$1[0] | 0; - })), [ + return param[0] - param$1[0] | 0; + })), [ [ 1, "a" @@ -200,8 +200,8 @@ const u$2 = [ ]; eq("File \"jscomp/test/bs_sort_test.ml\", line 96, characters 5-12", Belt__Belt_SortArray.stableSortBy(u$2, (function (param, param$1) { - return param[0] - param$1[0] | 0; - })), [ + return param[0] - param$1[0] | 0; + })), [ [ 1, "b" @@ -248,8 +248,8 @@ const u$3 = [ ]; eq("File \"jscomp/test/bs_sort_test.ml\", line 102, characters 5-12", Belt__Belt_SortArray.stableSortBy(u$3, (function (param, param$1) { - return param[0] - param$1[0] | 0; - })), [ + return param[0] - param$1[0] | 0; + })), [ [ 1, "c" @@ -336,12 +336,12 @@ eq("File \"jscomp/test/bs_sort_test.ml\", line 116, characters 5-12", Belt__Belt const 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; - }))); + return Belt__Belt_SortArray.binarySearchBy(aa, i, cmp) === i; + }))); const cc = Belt__Belt_Array.map(Array_data_util.range(0, 2000), (function (x) { - return (x << 1); - })); + return (x << 1); + })); eq("File \"jscomp/test/bs_sort_test.ml\", line 123, characters 5-12", Belt__Belt_SortArray.binarySearchBy(cc, 5000, cmp) ^ -1, 2001); @@ -352,8 +352,8 @@ eq("File \"jscomp/test/bs_sort_test.ml\", line 125, characters 5-12", Belt__Belt eq("File \"jscomp/test/bs_sort_test.ml\", line 127, characters 5-12", Belt__Belt_SortArray.binarySearchBy(cc, 1, cmp) ^ -1, 1); b("File \"jscomp/test/bs_sort_test.ml\", line 128, characters 4-11", Belt__Belt_Range.every(0, 1999, (function (i) { - return (Belt__Belt_SortArray.binarySearchBy(cc, (i << 1) + 1 | 0, cmp) ^ -1) === (i + 1 | 0); - }))); + return (Belt__Belt_SortArray.binarySearchBy(cc, (i << 1) + 1 | 0, cmp) ^ -1) === (i + 1 | 0); + }))); function lt(x, y) { return x < y; diff --git a/jscomp/test/dist/jscomp/test/bs_stack_test.js b/jscomp/test/dist/jscomp/test/bs_stack_test.js index 6d571a6c7..3bef6cced 100644 --- a/jscomp/test/dist/jscomp/test/bs_stack_test.js +++ b/jscomp/test/dist/jscomp/test/bs_stack_test.js @@ -63,14 +63,14 @@ function inOrder3(v) { current = v$1.left; }; Belt__Belt_MutableStack.dynamicPopIter(s, (function (popped) { - Belt__Belt_MutableQueue.add(q, popped.value); - let current = popped.right; - while(current !== undefined) { - const v = current; - Belt__Belt_MutableStack.push(s, v); - current = v.left; - }; - })); + Belt__Belt_MutableQueue.add(q, popped.value); + let current = popped.right; + while(current !== undefined) { + const v = current; + Belt__Belt_MutableStack.push(s, v); + current = v.left; + }; + })); return Belt__Belt_MutableQueue.toArray(q); } diff --git a/jscomp/test/dist/jscomp/test/bs_string_test.js b/jscomp/test/dist/jscomp/test/bs_string_test.js index b70b4262f..23a41b959 100644 --- a/jscomp/test/dist/jscomp/test/bs_string_test.js +++ b/jscomp/test/dist/jscomp/test/bs_string_test.js @@ -17,20 +17,20 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; } eq("File \"jscomp/test/bs_string_test.ml\", line 11, characters 5-12", "ghso ghso g".split(" ", undefined).reduce((function (x, y) { - return x + ("-" + y); - }), ""), "-ghso-ghso-g"); + return x + ("-" + y); + }), ""), "-ghso-ghso-g"); Mt.from_pair_suites("Bs_string_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/buffer_test.js b/jscomp/test/dist/jscomp/test/buffer_test.js index a2eb60247..80dcef1f4 100644 --- a/jscomp/test/dist/jscomp/test/buffer_test.js +++ b/jscomp/test/dist/jscomp/test/buffer_test.js @@ -11,53 +11,53 @@ const v = "gso"; const suites_0 = [ "equal", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + Caml_bytes.get(Stdlib__Bytes.make(3, /* 'a' */97), 0), + Stdlib__Bytes.make(3, /* 'a' */97)[0] + ], + _1: [ + /* 'a' */97, + /* 'a' */97 + ] + }; + }) +]; + +const suites_1 = { + hd: [ + "equal2", + (function (param) { + const u = Stdlib__Bytes.make(3, /* 'a' */97); + u[0] = /* 'b' */98; return { TAG: /* Eq */0, _0: [ - Caml_bytes.get(Stdlib__Bytes.make(3, /* 'a' */97), 0), - Stdlib__Bytes.make(3, /* 'a' */97)[0] + u[0], + /* 'g' */103 ], _1: [ - /* 'a' */97, - /* 'a' */97 + /* 'b' */98, + /* 'g' */103 ] }; }) -]; - -const suites_1 = { - hd: [ - "equal2", - (function (param) { - const u = Stdlib__Bytes.make(3, /* 'a' */97); - u[0] = /* 'b' */98; - return { - TAG: /* Eq */0, - _0: [ - u[0], - /* 'g' */103 - ], - _1: [ - /* 'b' */98, - /* 'g' */103 - ] - }; - }) ], tl: { hd: [ "buffer", (function (param) { - const v = Stdlib__Buffer.create(30); - for (let i = 0; i <= 10; ++i) { - Stdlib__Buffer.add_string(v, String(i)); - } - return { - TAG: /* Eq */0, - _0: Stdlib__Buffer.contents(v), - _1: "012345678910" - }; - }) + const v = Stdlib__Buffer.create(30); + for (let i = 0; i <= 10; ++i) { + Stdlib__Buffer.add_string(v, String(i)); + } + return { + TAG: /* Eq */0, + _0: Stdlib__Buffer.contents(v), + _1: "012345678910" + }; + }) ], tl: /* [] */0 } 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 831de4992..7d9d76cf1 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 @@ -21,12 +21,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; 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 dbe6e0641..780022bf9 100644 --- a/jscomp/test/dist/jscomp/test/caml_compare_bigint_test.js +++ b/jscomp/test/dist/jscomp/test/caml_compare_bigint_test.js @@ -10,199 +10,199 @@ function isLessThan(title, small, big) { hd: [ "compare: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_compare(big, small) > 0 - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_compare(big, small) > 0 + }; + }) ], tl: { hd: [ "compare: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_compare(small, big) < 0 - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_compare(small, big) < 0 + }; + }) ], tl: { hd: [ "< operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessthan(small, big) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan(small, big) + }; + }) ], tl: { hd: [ "<= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessequal(small, big) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessequal(small, big) + }; + }) ], tl: { hd: [ "> operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_greaterthan(big, small) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_greaterthan(big, small) + }; + }) ], tl: { hd: [ ">= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_greaterequal(big, small) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_greaterequal(big, small) + }; + }) ], tl: { hd: [ "min: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: small, - _1: Caml_obj.caml_min(big, small) - }; - }) + return { + TAG: /* Eq */0, + _0: small, + _1: Caml_obj.caml_min(big, small) + }; + }) ], tl: { hd: [ "min: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: small, - _1: Caml_obj.caml_min(small, big) - }; - }) + return { + TAG: /* Eq */0, + _0: small, + _1: Caml_obj.caml_min(small, big) + }; + }) ], tl: { hd: [ "max: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: big, - _1: Caml_obj.caml_max(big, small) - }; - }) + return { + TAG: /* Eq */0, + _0: big, + _1: Caml_obj.caml_max(big, small) + }; + }) ], tl: { hd: [ "max: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: big, - _1: Caml_obj.caml_max(small, big) - }; - }) + return { + TAG: /* Eq */0, + _0: big, + _1: Caml_obj.caml_max(small, big) + }; + }) ], tl: { hd: [ "!= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: big !== small - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: big !== small + }; + }) ], tl: { hd: [ "!= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: small !== big - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: small !== big + }; + }) ], tl: { hd: [ "<> operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_notequal(big, small) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_notequal(big, small) + }; + }) ], tl: { hd: [ "<> operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_notequal(small, big) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_notequal(small, big) + }; + }) ], tl: { hd: [ "= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_equal(big, small) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_equal(big, small) + }; + }) ], tl: { hd: [ "= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_equal(small, big) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_equal(small, big) + }; + }) ], tl: { hd: [ "== operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: big === small - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: big === small + }; + }) ], tl: { hd: [ "== operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: small === big - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: small === big + }; + }) ], tl: /* [] */0 } @@ -230,177 +230,177 @@ function isEqual(title, num1, num2) { hd: [ "< operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_lessthan(num2, num1) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_lessthan(num2, num1) + }; + }) ], tl: { hd: [ "<= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessequal(num2, num1) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessequal(num2, num1) + }; + }) ], tl: { hd: [ "> operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_greaterthan(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_greaterthan(num1, num2) + }; + }) ], tl: { hd: [ ">= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_greaterequal(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_greaterequal(num1, num2) + }; + }) ], tl: { hd: [ "min: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: num1, - _1: Caml_obj.caml_min(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: num1, + _1: Caml_obj.caml_min(num1, num2) + }; + }) ], tl: { hd: [ "max: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: num1, - _1: Caml_obj.caml_max(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: num1, + _1: Caml_obj.caml_max(num1, num2) + }; + }) ], tl: { hd: [ "compare: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: Caml_obj.caml_compare(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: Caml_obj.caml_compare(num1, num2) + }; + }) ], tl: { hd: [ "compare: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: Caml_obj.caml_compare(num2, num1) - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: Caml_obj.caml_compare(num2, num1) + }; + }) ], tl: { hd: [ "!= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: num1 !== num2 - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: num1 !== num2 + }; + }) ], tl: { hd: [ "!= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: num2 !== num1 - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: num2 !== num1 + }; + }) ], tl: { hd: [ "<> operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_notequal(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_notequal(num1, num2) + }; + }) ], tl: { hd: [ "<> operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_notequal(num2, num1) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_notequal(num2, num1) + }; + }) ], tl: { hd: [ "= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_equal(num1, num2) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_equal(num1, num2) + }; + }) ], tl: { hd: [ "= operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_equal(num2, num1) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_equal(num2, num1) + }; + }) ], tl: { hd: [ "== operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: num1 === num2 - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: num1 === num2 + }; + }) ], tl: { hd: [ "== operator: " + title, (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: num2 === num1 - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: num2 === num1 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/caml_compare_test.js b/jscomp/test/dist/jscomp/test/caml_compare_test.js index b6a9a1b9e..a23044f2c 100644 --- a/jscomp/test/dist/jscomp/test/caml_compare_test.js +++ b/jscomp/test/dist/jscomp/test/caml_compare_test.js @@ -10,10 +10,10 @@ let function_equal_test; try { function_equal_test = Caml_obj.caml_equal((function (x) { - return x + 1 | 0; - }), (function (x) { - return x + 2 | 0; - })); + return x + 1 | 0; + }), (function (x) { + return x + 2 | 0; + })); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -25,46 +25,75 @@ const suites = { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 9, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessthan(undefined, 1) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan(undefined, 1) + }; + }) ], tl: { hd: [ "option2", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessthan(1, 2) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan(1, 2) + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 11, characters 4-11", (function (param) { + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_greaterthan({ + hd: 1, + tl: /* [] */0 + }, /* [] */0) + }; + }) + ], + tl: { + hd: [ + "listeq", + (function (param) { return { TAG: /* Eq */0, _0: true, - _1: Caml_obj.caml_greaterthan({ + _1: Caml_obj.caml_equal({ + hd: 1, + tl: { + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } + } + }, { hd: 1, - tl: /* [] */0 - }, /* [] */0) + tl: { + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } + } + }) }; }) - ], - tl: { - hd: [ - "listeq", - (function (param) { + ], + tl: { + hd: [ + "listneq", + (function (param) { return { TAG: /* Eq */0, _0: true, - _1: Caml_obj.caml_equal({ + _1: Caml_obj.caml_greaterthan({ hd: 1, tl: { hd: 2, @@ -78,51 +107,61 @@ const suites = { tl: { hd: 2, tl: { - hd: 3, + hd: 2, tl: /* [] */0 } } }) }; }) - ], - tl: { - hd: [ - "listneq", - (function (param) { + ], + tl: { + hd: [ + "custom_u", + (function (param) { return { TAG: /* Eq */0, _0: true, - _1: Caml_obj.caml_greaterthan({ - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } + _1: Caml_obj.caml_greaterthan([ + { + TAG: /* A */0, + _0: 3 + }, + { + TAG: /* B */1, + _0: 2, + _1: false + }, + { + TAG: /* C */2, + _0: 1 } - }, { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 2, - tl: /* [] */0 - } + ], [ + { + TAG: /* A */0, + _0: 3 + }, + { + TAG: /* B */1, + _0: 2, + _1: false + }, + { + TAG: /* C */2, + _0: 0 } - }) + ]) }; }) - ], - tl: { - hd: [ - "custom_u", - (function (param) { + ], + tl: { + hd: [ + "custom_u2", + (function (param) { return { TAG: /* Eq */0, _0: true, - _1: Caml_obj.caml_greaterthan([ + _1: Caml_obj.caml_equal([ { TAG: /* A */0, _0: 3 @@ -148,128 +187,88 @@ const suites = { }, { TAG: /* C */2, - _0: 0 + _0: 1 } ]) }; }) - ], - tl: { - hd: [ - "custom_u2", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_equal([ - { - TAG: /* A */0, - _0: 3 - }, - { - TAG: /* B */1, - _0: 2, - _1: false - }, - { - TAG: /* C */2, - _0: 1 - } - ], [ - { - TAG: /* A */0, - _0: 3 - }, - { - TAG: /* B */1, - _0: 2, - _1: false - }, - { - TAG: /* C */2, - _0: 1 - } - ]) - }; - }) ], tl: { hd: [ "function", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: function_equal_test - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: function_equal_test + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 17, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessthan(undefined, 1) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan(undefined, 1) + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 28, characters 4-11", (function (param) { + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan(undefined, [ + 1, + 30 + ]) + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/caml_compare_test.ml\", line 31, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: true, - _1: Caml_obj.caml_lessthan(undefined, [ + _1: Caml_obj.caml_greaterthan([ 1, 30 - ]) + ], undefined) }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_compare_test.ml\", line 31, characters 4-11", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_greaterthan([ - 1, - 30 - ], undefined) - }; - }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 34, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessthan({ - hd: 2, + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan({ + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, - tl: { - hd: 1, - tl: /* [] */0 - } + hd: 1, + tl: /* [] */0 } } } @@ -277,28 +276,28 @@ const suites = { } } } - }, { - hd: 2, + } + }, { + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, - tl: { - hd: 409, - tl: /* [] */0 - } + hd: 409, + tl: /* [] */0 } } } @@ -307,73 +306,73 @@ const suites = { } } } - }) - }; - }) + } + }) + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 37, characters 4-11", (function (param) { + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_lessthan({ + hd: 1, + tl: /* [] */0 + }, { + hd: 1, + tl: { + hd: 409, + tl: /* [] */0 + } + }) + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/caml_compare_test.ml\", line 40, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: true, - _1: Caml_obj.caml_lessthan({ - hd: 1, + _1: Caml_obj.caml_lessthan(/* [] */0, { + hd: 409, tl: /* [] */0 - }, { - hd: 1, - tl: { - hd: 409, - tl: /* [] */0 - } }) }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_compare_test.ml\", line 40, characters 4-11", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_lessthan(/* [] */0, { - hd: 409, - tl: /* [] */0 - }) - }; - }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 43, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Caml_obj.caml_greaterthan({ - hd: 2, + return { + TAG: /* Eq */0, + _0: true, + _1: Caml_obj.caml_greaterthan({ + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, - tl: { - hd: 409, - tl: /* [] */0 - } + hd: 409, + tl: /* [] */0 } } } @@ -382,26 +381,26 @@ const suites = { } } } - }, { - hd: 2, + } + }, { + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, - tl: { - hd: 1, - tl: /* [] */0 - } + hd: 1, + tl: /* [] */0 } } } @@ -409,65 +408,65 @@ const suites = { } } } - }) - }; - }) + } + }) + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 47, characters 4-11", (function (param) { + return { + TAG: /* Eq */0, + _0: false, + _1: undefined === [ + 1, + 30 + ] + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/caml_compare_test.ml\", line 50, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: false, - _1: undefined === [ + _1: [ 1, 30 - ] + ] === undefined }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_compare_test.ml\", line 50, characters 4-11", - (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: [ - 1, - 30 - ] === undefined - }; - }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 53, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_equal({ - hd: 2, + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_equal({ + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, - tl: { - hd: 1, - tl: /* [] */0 - } + hd: 1, + tl: /* [] */0 } } } @@ -475,28 +474,28 @@ const suites = { } } } - }, { - hd: 2, + } + }, { + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, - tl: { - hd: 409, - tl: /* [] */0 - } + hd: 409, + tl: /* [] */0 } } } @@ -505,39 +504,39 @@ const suites = { } } } - }) - }; - }) + } + }) + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 56, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Caml_obj.caml_equal({ - hd: 2, + return { + TAG: /* Eq */0, + _0: false, + _1: Caml_obj.caml_equal({ + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, - tl: { - hd: 409, - tl: /* [] */0 - } + hd: 409, + tl: /* [] */0 } } } @@ -546,26 +545,26 @@ const suites = { } } } - }, { - hd: 2, + } + }, { + hd: 2, + tl: { + hd: 6, tl: { - hd: 6, + hd: 1, tl: { hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 1, tl: { - hd: 1, + hd: 4, tl: { - hd: 4, + hd: 2, tl: { - hd: 2, - tl: { - hd: 1, - tl: /* [] */0 - } + hd: 1, + tl: /* [] */0 } } } @@ -573,351 +572,373 @@ const suites = { } } } - }) - }; - }) + } + }) + }; + }) ], tl: { hd: [ "cmp_id", (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({ + x: 1, + y: 2 + }, { + x: 1, + y: 2 + }), + _1: 0 + }; + }) + ], + tl: { + hd: [ + "cmp_val", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ - x: 1, - y: 2 + x: 1 }, { - x: 1, - y: 2 + x: 2 }), - _1: 0 + _1: -1 }; }) - ], - tl: { - hd: [ - "cmp_val", - (function (param) { + ], + tl: { + hd: [ + "cmp_val2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ - x: 1 - }, { x: 2 + }, { + x: 1 }), - _1: -1 + _1: 1 }; }) - ], - tl: { - hd: [ - "cmp_val2", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({ - x: 2 - }, { - x: 1 - }), - _1: 1 - }; - }) ], tl: { hd: [ "cmp_empty", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({}, {}), - _1: 0 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({}, {}), + _1: 0 + }; + }) ], tl: { hd: [ "cmp_empty2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({}, {x:1}), - _1: -1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({}, {x:1}), + _1: -1 + }; + }) ], tl: { hd: [ "cmp_swap", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({ - x: 1, - y: 2 - }, { - y: 2, - x: 1 - }), - _1: 0 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({ + x: 1, + y: 2 + }, { + y: 2, + x: 1 + }), + _1: 0 + }; + }) ], tl: { hd: [ "cmp_size", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({x:1}, {x:1, y:2}), - _1: -1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({x:1}, {x:1, y:2}), + _1: -1 + }; + }) ], tl: { hd: [ "cmp_size2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({x:1, y:2}, {x:1}), - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({x:1, y:2}, {x:1}), + _1: 1 + }; + }) ], tl: { hd: [ "cmp_order", (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare({ + x: 0, + y: 1 + }, { + x: 1, + y: 0 + }), + _1: -1 + }; + }) + ], + tl: { + hd: [ + "cmp_order2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ - x: 0, - y: 1 - }, { x: 1, y: 0 + }, { + x: 0, + y: 1 }), - _1: -1 + _1: 1 }; }) - ], - tl: { - hd: [ - "cmp_order2", - (function (param) { + ], + tl: { + hd: [ + "cmp_in_list", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ - x: 1, - y: 0 + hd: { + x: 1 + }, + tl: /* [] */0 }, { - x: 0, - y: 1 + hd: { + x: 2 + }, + tl: /* [] */0 }), - _1: 1 + _1: -1 }; }) - ], - tl: { - hd: [ - "cmp_in_list", - (function (param) { + ], + tl: { + hd: [ + "cmp_in_list2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ hd: { - x: 1 + x: 2 }, tl: /* [] */0 }, { hd: { - x: 2 + x: 1 }, tl: /* [] */0 }), - _1: -1 + _1: 1 }; }) - ], - tl: { - hd: [ - "cmp_in_list2", - (function (param) { + ], + tl: { + hd: [ + "cmp_with_list", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ - hd: { - x: 2 - }, - tl: /* [] */0 + x: { + hd: 0, + tl: /* [] */0 + } }, { - hd: { - x: 1 - }, - tl: /* [] */0 + x: { + hd: 1, + tl: /* [] */0 + } }), - _1: 1 + _1: -1 }; }) - ], - tl: { - hd: [ - "cmp_with_list", - (function (param) { + ], + tl: { + hd: [ + "cmp_with_list2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_compare({ x: { - hd: 0, + hd: 1, tl: /* [] */0 } }, { x: { - hd: 1, + hd: 0, tl: /* [] */0 } }), - _1: -1 + _1: 1 }; }) - ], - tl: { - hd: [ - "cmp_with_list2", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({ - x: { - hd: 1, - tl: /* [] */0 - } - }, { - x: { - hd: 0, - tl: /* [] */0 - } - }), - _1: 1 - }; - }) ], tl: { hd: [ "eq_id", (function (param) { - return { - TAG: /* Ok */4, - _0: Caml_obj.caml_equal({ - x: 1, - y: 2 - }, { - x: 1, - y: 2 - }) - }; - }) + return { + TAG: /* Ok */4, + _0: Caml_obj.caml_equal({ + x: 1, + y: 2 + }, { + x: 1, + y: 2 + }) + }; + }) ], tl: { hd: [ "eq_val", (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({ + x: 1 + }, { + x: 2 + }), + _1: false + }; + }) + ], + tl: { + hd: [ + "eq_val2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_equal({ - x: 1 - }, { x: 2 + }, { + x: 1 }), _1: false }; }) - ], - tl: { - hd: [ - "eq_val2", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({ - x: 2 - }, { - x: 1 - }), - _1: false - }; - }) ], tl: { hd: [ "eq_empty", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({}, {}), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({}, {}), + _1: true + }; + }) ], tl: { hd: [ "eq_empty2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({}, {x:1}), - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({}, {x:1}), + _1: false + }; + }) ], tl: { hd: [ "eq_swap", (function (param) { - return { - TAG: /* Ok */4, - _0: Caml_obj.caml_equal({ - x: 1, - y: 2 - }, { - y: 2, - x: 1 - }) - }; - }) + return { + TAG: /* Ok */4, + _0: Caml_obj.caml_equal({ + x: 1, + y: 2 + }, { + y: 2, + x: 1 + }) + }; + }) ], tl: { hd: [ "eq_size", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({x:1}, {x:1, y:2}), - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({x:1}, {x:1, y:2}), + _1: false + }; + }) ], tl: { hd: [ "eq_size2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({x:1, y:2}, {x:1}), - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({x:1, y:2}, {x:1}), + _1: false + }; + }) ], tl: { hd: [ "eq_in_list", (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({ + hd: { + x: 1 + }, + tl: /* [] */0 + }, { + hd: { + x: 2 + }, + tl: /* [] */0 + }), + _1: false + }; + }) + ], + tl: { + hd: [ + "eq_in_list2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_equal({ hd: { - x: 1 + x: 2 }, tl: /* [] */0 }, { @@ -926,35 +947,35 @@ const suites = { }, tl: /* [] */0 }), - _1: false + _1: true }; }) - ], - tl: { - hd: [ - "eq_in_list2", - (function (param) { + ], + tl: { + hd: [ + "eq_with_list", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_equal({ - hd: { - x: 2 - }, - tl: /* [] */0 + x: { + hd: 0, + tl: /* [] */0 + } }, { - hd: { - x: 2 - }, - tl: /* [] */0 + x: { + hd: 0, + tl: /* [] */0 + } }), _1: true }; }) - ], - tl: { - hd: [ - "eq_with_list", - (function (param) { + ], + tl: { + hd: [ + "eq_with_list2", + (function (param) { return { TAG: /* Eq */0, _0: Caml_obj.caml_equal({ @@ -964,118 +985,97 @@ const suites = { } }, { x: { - hd: 0, + hd: 1, tl: /* [] */0 } }), - _1: true + _1: false }; }) - ], - tl: { - hd: [ - "eq_with_list2", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({ - x: { - hd: 0, - tl: /* [] */0 - } - }, { - x: { - hd: 1, - tl: /* [] */0 - } - }), - _1: false - }; - }) ], tl: { hd: [ "eq_no_prototype", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_equal({x:1}, ((function(){let o = Object.create(null);o.x = 1;return o;})() - )), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_equal({x:1}, ((function(){let o = Object.create(null);o.x = 1;return o;})() + )), + _1: true + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 88, characters 4-11", (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare(null, { + hd: 3, + tl: /* [] */0 + }), + _1: -1 + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/caml_compare_test.ml\", line 91, characters 4-11", + (function (param) { return { TAG: /* Eq */0, - _0: Caml_obj.caml_compare(null, { + _0: Caml_obj.caml_compare({ hd: 3, tl: /* [] */0 - }), - _1: -1 + }, null), + _1: 1 }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_compare_test.ml\", line 91, characters 4-11", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare({ - hd: 3, - tl: /* [] */0 - }, null), - _1: 1 - }; - }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 94, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare(null, 0), - _1: -1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare(null, 0), + _1: -1 + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 97, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare(0, null), - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare(0, null), + _1: 1 + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 100, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare(undefined, 0), - _1: -1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare(undefined, 0), + _1: -1 + }; + }) ], tl: { hd: [ "File \"jscomp/test/caml_compare_test.ml\", line 103, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare(0, undefined), - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare(0, undefined), + _1: 1 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/caml_format_test.js b/jscomp/test/dist/jscomp/test/caml_format_test.js index 03ad446c3..d4194ea34 100644 --- a/jscomp/test/dist/jscomp/test/caml_format_test.js +++ b/jscomp/test/dist/jscomp/test/caml_format_test.js @@ -86,37 +86,37 @@ const of_string = [ function from_float_of_string(xs) { return Stdlib__Array.mapi((function (i, param) { - return Stdlib.string_of_float; - }), xs); + return Stdlib.string_of_float; + }), xs); } function from_of_string(xs) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "of_string ", - _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, - _1: /* End_of_format */0 - } - }, - _1: "of_string %L" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_format.caml_int_of_string(b), - _1: a - }; - }) - ]; - }), of_string)); + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "of_string ", + _1: { + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, + _1: /* End_of_format */0 + } + }, + _1: "of_string %L" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_format.caml_int_of_string(b), + _1: a + }; + }) + ]; + }), of_string)); } function u(v) { @@ -197,94 +197,94 @@ const suites = Stdlib.$at(from_of_string(of_string), Stdlib.$at({ hd: [ "isnan_of_string", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Stdlib.classify_float(Caml_format.caml_float_of_string("nan")) === /* FP_nan */4 - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Stdlib.classify_float(Caml_format.caml_float_of_string("nan")) === /* FP_nan */4 + }; + }) ], tl: /* [] */0 }, Stdlib.$at(Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "infinity_of_string ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "infinity_of_string %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: a, - _1: Stdlib.classify_float(Caml_format.caml_float_of_string(b)) - }; - }) - ]; - }), pairs)), Stdlib.$at({ + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "infinity_of_string ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "infinity_of_string %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: a, + _1: Stdlib.classify_float(Caml_format.caml_float_of_string(b)) + }; + }) + ]; + }), pairs)), Stdlib.$at({ hd: [ "throw", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_format.caml_float_of_string(""); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_format.caml_float_of_string(""); + }) + }; + }) ], tl: { hd: [ "format_int", (function (param) { - return { - TAG: /* Eq */0, - _0: " 33", - _1: Caml_format.caml_format_int("%32d", 33) - }; - }) + return { + TAG: /* Eq */0, + _0: " 33", + _1: Caml_format.caml_format_int("%32d", 33) + }; + }) ], tl: /* [] */0 } }, Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "normal_float_of_string ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "normal_float_of_string %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: a, - _1: Caml_format.caml_float_of_string(b) - }; - }) - ]; - }), pairs$1)))))); + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "normal_float_of_string ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "normal_float_of_string %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: a, + _1: Caml_format.caml_float_of_string(b) + }; + }) + ]; + }), pairs$1)))))); function $caret$caret(param, param$1) { return { @@ -301,9 +301,81 @@ function ff(param) { const formatter_suites_0 = [ "fmt_concat", (function (param) { + return { + TAG: /* Eq */0, + _0: Curry._6(Stdlib__Format.asprintf($caret$caret({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: { + TAG: /* Lit_padding */0, + _0: /* Zeros */2, + _1: 3 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "%s %03d %L" + }, { + TAG: /* Format */0, + _0: { + TAG: /* Caml_string */3, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: { + TAG: /* Lit_padding */0, + _0: /* Zeros */2, + _1: 3 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "%S %03d %L" + })), "32", 33, 33, "a", 33, 3), + _1: "32 033 33\"a\" 033 3" + }; + }) +]; + +const formatter_suites_1 = { + hd: [ + "fmt_gen", + (function (param) { return { TAG: /* Eq */0, - _0: Curry._6(Stdlib__Format.asprintf($caret$caret({ + _0: Curry._8(Stdlib__Format.asprintf($caret$caret({ TAG: /* Format */0, _0: { TAG: /* String */2, @@ -356,386 +428,313 @@ const formatter_suites_0 = [ _1: { TAG: /* Scan_get_counter */21, _0: /* Token_counter */2, - _1: /* End_of_format */0 + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } } } } } }, - _1: "%S %03d %L" - })), "32", 33, 33, "a", 33, 3), - _1: "32 033 33\"a\" 033 3" + _1: "%S %03d %L %a" + })), "32", 33, 33, "a", 33, 3, (function (param, param$1) { + return Stdlib__Format.pp_print_list(undefined, Stdlib__Format.pp_print_int, param, param$1); + }), { + hd: 1, + tl: { + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } + } + }), + _1: "32 033 33\"a\" 033 3 12\n3" }; }) -]; - -const formatter_suites_1 = { - hd: [ - "fmt_gen", - (function (param) { + ], + tl: { + hd: [ + "long_fmt", + (function (param) { return { TAG: /* Eq */0, - _0: Curry._8(Stdlib__Format.asprintf($caret$caret({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: { - TAG: /* Lit_padding */0, - _0: /* Zeros */2, - _1: 3 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "%s %03d %L" - }, { - TAG: /* Format */0, - _0: { - TAG: /* Caml_string */3, - _0: /* No_padding */0, - _1: { + _0: Curry.app(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* Char_literal */12, _0: /* ' ' */32, _1: { TAG: /* Int */4, - _0: /* Int_d */0, - _1: { - TAG: /* Lit_padding */0, - _0: /* Zeros */2, - _1: 3 - }, + _0: /* Int_u */12, + _1: /* No_padding */0, _2: /* No_precision */0, _3: { TAG: /* Char_literal */12, _0: /* ' ' */32, _1: { TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, + _0: /* Char_counter */1, _1: { TAG: /* Char_literal */12, _0: /* ' ' */32, _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } - } - } - } - } - }, - _1: "%S %03d %L %a" - })), "32", 33, 33, "a", 33, 3, (function (param, param$1) { - return Stdlib__Format.pp_print_list(undefined, Stdlib__Format.pp_print_int, param, param$1); - }), { - hd: 1, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - } - }), - _1: "32 033 33\"a\" 033 3 12\n3" - }; - }) - ], - tl: { - hd: [ - "long_fmt", - (function (param) { - return { - TAG: /* Eq */0, - _0: Curry.app(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_u */12, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Scan_get_counter */21, - _0: /* Char_counter */1, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Scan_get_counter */21, + _0: /* Line_counter */0, _1: { - TAG: /* Scan_get_counter */21, - _0: /* Line_counter */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_X */8, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Int */4, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_X */8, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Caml_string */3, + _0: /* No_padding */0, _1: { - TAG: /* Caml_string */3, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Char */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Caml_char */1, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_f */0 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_F */5 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_e */1 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_E */2 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_g */3 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_G */4 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Char */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Caml_char */1, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_f */0 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_F */5 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_e */1 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_E */2 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_g */3 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_G */4 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Bool */9, + _0: /* No_padding */0, _1: { - TAG: /* Bool */9, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Bool */9, + _0: /* No_padding */0, _1: { - TAG: /* Bool */9, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_u */12, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_X */8, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_u */12, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " ", - _1: /* End_of_format */0 - } + TAG: /* Int32 */5, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_u */12, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_X */8, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_u */12, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: " ", + _1: /* End_of_format */0 } } } @@ -802,379 +801,379 @@ const formatter_suites_1 = { } } } - }, - _1: "%d %i %u %n %l %L %N %x %X %o %s %S %c %C %f %F %e %E %g %G %B %b %ld %li %lu %lx %lX %lo %d %i %u %x %x %o " - }), [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - "a", - "b", - /* 'c' */99, - /* 'd' */100, - 1, - 2, - 3, - 4, - 5, - 6, - true, - false, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ]), - _1: "1 2 3 4 5 6 7 8 9 12 a \"b\" c 'd' 1.000000 2. 3.000000e+00 4.000000E+00 5 6 true false 0 1 2 3 4 5 6 7 8 9 a 13 " - }; - }) + } + }, + _1: "%d %i %u %n %l %L %N %x %X %o %s %S %c %C %f %F %e %E %g %G %B %b %ld %li %lu %lx %lX %lo %d %i %u %x %x %o " + }), [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + "a", + "b", + /* 'c' */99, + /* 'd' */100, + 1, + 2, + 3, + 4, + 5, + 6, + true, + false, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ]), + _1: "1 2 3 4 5 6 7 8 9 12 a \"b\" c 'd' 1.000000 2. 3.000000e+00 4.000000E+00 5 6 true false 0 1 2 3 4 5 6 7 8 9 a 13 " + }; + }) ], tl: { hd: [ "long_fmt_2", (function (param) { - return { - TAG: /* Eq */0, - _0: Curry.app(Stdlib__Format.asprintf({ - TAG: /* Format */0, + return { + TAG: /* Eq */0, + _0: Curry.app(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 23 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 23 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, _1: { - TAG: /* Int */4, - _0: /* Int_i */3, + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 2 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 2 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Int */4, + _0: /* Int_u */12, _1: { - TAG: /* Int */4, - _0: /* Int_u */12, + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 3 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 3 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Scan_get_counter */21, + _0: /* Char_counter */1, _1: { - TAG: /* Scan_get_counter */21, - _0: /* Char_counter */1, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Int */4, + _0: /* Int_x */6, _1: { - TAG: /* Int */4, - _0: /* Int_x */6, + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 0 + }, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: "l ", _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 0 - }, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: "l ", + TAG: /* Int */4, + _0: /* Int_x */6, _1: { - TAG: /* Int */4, - _0: /* Int_x */6, + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 0 + }, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: "L ", _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 0 - }, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: "L ", + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Int */4, + _0: /* Int_x */6, _1: { - TAG: /* Int */4, - _0: /* Int_x */6, + TAG: /* Lit_padding */0, + _0: /* Zeros */2, + _1: 3 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Zeros */2, - _1: 3 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_X */8, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Int */4, + _0: /* Int_X */8, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Caml_string */3, + _0: /* No_padding */0, _1: { - TAG: /* Caml_string */3, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Char */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Caml_char */1, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Char */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Caml_char */1, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_f */0 + ], _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_f */0 - ], + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 3 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 3 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_F */5 + ], _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_F */5 - ], + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 2 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 2 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_e */1 + ], _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_e */1 - ], + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 2 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 2 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_E */2 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_g */3 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_G */4 - ], - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_E */2 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_g */3 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_G */4 + ], + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Bool */9, + _0: /* No_padding */0, _1: { - TAG: /* Bool */9, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Bool */9, + _0: /* No_padding */0, _1: { - TAG: /* Bool */9, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_u */12, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_X */8, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int32 */5, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_u */12, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_x */6, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " ", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Int32 */5, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_u */12, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_X */8, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int32 */5, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_u */12, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: " ", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -1243,115 +1242,141 @@ const formatter_suites_1 = { } } } - }, - _1: "@[%23d %2i %3u %n %0xl %0xL %N %03x %X %o %s %S %c %C %3f %2F %2e %E %g %G %B %b %ld %li %lu %lx %lX %lo %d %i %u %x %x %o @]" - }), [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - "a", - "b", - /* 'c' */99, - /* 'd' */100, - 1, - 2, - 3, - 4, - 5, - 6, - true, - false, - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11 - ]), - _1: " 1 2 3 4 5l 6L 7 008 9 12 a \"b\" c 'd' 1.000000 2. 3.000000e+00 4.000000E+00 5 6 true false 0 1 2 3 4 5 6 7 8 9 a 13 " - }; - }) + } + }, + _1: "@[%23d %2i %3u %n %0xl %0xL %N %03x %X %o %s %S %c %C %3f %2F %2e %E %g %G %B %b %ld %li %lu %lx %lX %lo %d %i %u %x %x %o @]" + }), [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + "a", + "b", + /* 'c' */99, + /* 'd' */100, + 1, + 2, + 3, + 4, + 5, + 6, + true, + false, + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11 + ]), + _1: " 1 2 3 4 5l 6L 7 008 9 12 a \"b\" c 'd' 1.000000 2. 3.000000e+00 4.000000E+00 5 6 true false 0 1 2 3 4 5 6 7 8 9 a 13 " + }; + }) ], tl: { hd: [ "width_1", (function (param) { + return { + TAG: /* Eq */0, + _0: Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: { + TAG: /* Lit_padding */0, + _0: /* Zeros */2, + _1: 14 + }, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%014d" + }), 32), + _1: "00000000000032" + }; + }) + ], + tl: { + hd: [ + "width_2", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { - TAG: /* Int */4, - _0: /* Int_d */0, + TAG: /* Float */8, + _0: [ + /* Float_flag_ */0, + /* Float_f */0 + ], _1: { TAG: /* Lit_padding */0, - _0: /* Zeros */2, - _1: 14 + _0: /* Right */1, + _1: 10 + }, + _2: { + TAG: /* Lit_precision */0, + _0: 3 }, - _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%014d" - }), 32), - _1: "00000000000032" + _1: "%10.3f" + }), 32333.02), + _1: " 32333.020" }; }) - ], - tl: { - hd: [ - "width_2", - (function (param) { + ], + tl: { + hd: [ + "alternate_1", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { - TAG: /* Float */8, - _0: [ - /* Float_flag_ */0, - /* Float_f */0 - ], + TAG: /* Int */4, + _0: /* Int_x */6, _1: { TAG: /* Lit_padding */0, _0: /* Right */1, - _1: 10 - }, - _2: { - TAG: /* Lit_precision */0, - _0: 3 + _1: 0 }, + _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%10.3f" - }), 32333.02), - _1: " 32333.020" + _1: "%0x" + }), 32333), + _1: "7e4d" }; }) - ], - tl: { - hd: [ - "alternate_1", - (function (param) { + ], + tl: { + hd: [ + "alternate_2", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int */4, - _0: /* Int_x */6, + _0: /* Int_Cx */7, _1: { TAG: /* Lit_padding */0, _0: /* Right */1, @@ -1360,96 +1385,96 @@ const formatter_suites_1 = { _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%0x" + _1: "%#0x" }), 32333), - _1: "7e4d" + _1: "0x7e4d" }; }) - ], - tl: { - hd: [ - "alternate_2", - (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_Cx */7, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 0 - }, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%#0x" - }), 32333), - _1: "0x7e4d" - }; - }) ], tl: { hd: [ "alternate_3", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_Co */11, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%#o" + }), 32), + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_o */10, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%o" + }), 32) + ], + _1: [ + "040", + "40" + ] + }; + }) + ], + tl: { + hd: [ + "justify_0", + (function (param) { return { TAG: /* Eq */0, - _0: [ - Curry._1(Stdlib__Format.asprintf({ + _0: Caml_format.caml_format_int("%-8d", 32), + _1: "32 " + }; + }) + ], + tl: { + hd: [ + "sign_p", + (function (param) { + return { + TAG: /* Eq */0, + _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int */4, - _0: /* Int_Co */11, - _1: /* No_padding */0, + _0: /* Int_pd */1, + _1: { + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 4 + }, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%#o" + _1: "%+4d" }), 32), - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_o */10, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%o" - }), 32) - ], - _1: [ - "040", - "40" - ] - }; - }) - ], - tl: { - hd: [ - "justify_0", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_format.caml_format_int("%-8d", 32), - _1: "32 " + _1: " +32" }; }) - ], - tl: { - hd: [ - "sign_p", - (function (param) { + ], + tl: { + hd: [ + "sign_2p", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int */4, - _0: /* Int_pd */1, + _0: /* Int_sd */2, _1: { TAG: /* Lit_padding */0, _0: /* Right */1, @@ -1458,146 +1483,121 @@ const formatter_suites_1 = { _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%+4d" + _1: "% 4d" }), 32), - _1: " +32" + _1: " 32" }; }) - ], - tl: { - hd: [ - "sign_2p", - (function (param) { + ], + tl: { + hd: [ + "sign_3p", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { - TAG: /* Int */4, - _0: /* Int_sd */2, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 4 - }, + TAG: /* Int32 */5, + _0: /* Int_u */12, + _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "% 4d" - }), 32), - _1: " 32" + _1: "%lu" + }), -1), + _1: "4294967295" }; }) - ], - tl: { - hd: [ - "sign_3p", - (function (param) { + ], + tl: { + hd: [ + "sign_4p", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int32 */5, - _0: /* Int_u */12, + _0: /* Int_d */0, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%lu" + _1: "%ld" }), -1), - _1: "4294967295" + _1: "-1" }; }) - ], - tl: { - hd: [ - "sign_4p", - (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int32 */5, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%ld" - }), -1), - _1: "-1" - }; - }) ], tl: { hd: [ "width_3", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_format.caml_format_int("%032d", 32), - _1: "00000000000000000000000000000032" - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_format.caml_format_int("%032d", 32), + _1: "00000000000000000000000000000032" + }; + }) ], tl: { hd: [ "prec_1", (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: { - TAG: /* Lit_precision */0, - _0: 10 - }, - _3: /* End_of_format */0 + return { + TAG: /* Eq */0, + _0: Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: { + TAG: /* Lit_precision */0, + _0: 10 }, - _1: "%.10d" - }), 32), - _1: "0000000032" - }; - }) + _3: /* End_of_format */0 + }, + _1: "%.10d" + }), 32), + _1: "0000000032" + }; + }) ], tl: { hd: [ "prec_2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_format.caml_format_int("%.10d", 32), - _1: "0000000032" - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_format.caml_format_int("%.10d", 32), + _1: "0000000032" + }; + }) ], tl: { hd: [ "prec_3", (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_format.caml_format_int("%.d", 32), + _1: "32" + }; + }) + ], + tl: { + hd: [ + "prec_4", + (function (param) { return { TAG: /* Eq */0, _0: Caml_format.caml_format_int("%.d", 32), _1: "32" }; }) - ], - tl: { - hd: [ - "prec_4", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_format.caml_format_int("%.d", 32), - _1: "32" - }; - }) ], tl: /* [] */0 } @@ -2009,46 +2009,78 @@ const lambda_suites = [ function from_lambda_pairs(p) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "lambda_print ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "lambda_print %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._1(string_of_lambda, a), - _1: b - }; - }) - ]; - }), lambda_suites)); + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "lambda_print ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "lambda_print %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: Curry._1(string_of_lambda, a), + _1: b + }; + }) + ]; + }), lambda_suites)); } const ksprintf_suites_0 = [ "ksprintf", (function (param) { - const f = function (fmt) { - return Stdlib__Format.ksprintf((function (x) { - return x + x; - }), fmt); - }; + const f = function (fmt) { + return Stdlib__Format.ksprintf((function (x) { + return x + x; + }), fmt); + }; + return { + TAG: /* Eq */0, + _0: Curry._2(f({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " a ", + _1: /* End_of_format */0 + } + } + } + }, + _1: "%s %s a " + }), "x", "xx"), + _1: "x xx a x xx a " + }; + }) +]; + +const ksprintf_suites_1 = { + hd: [ + "sprintf", + (function (param) { return { TAG: /* Eq */0, - _0: Curry._2(f({ + _0: Curry._2(Stdlib__Format.sprintf({ TAG: /* Format */0, _0: { TAG: /* String */2, @@ -2057,49 +2089,17 @@ const ksprintf_suites_0 = [ TAG: /* Char_literal */12, _0: /* ' ' */32, _1: { - TAG: /* String */2, + TAG: /* Caml_string */3, _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " a ", - _1: /* End_of_format */0 - } + _1: /* End_of_format */0 } } }, - _1: "%s %s a " - }), "x", "xx"), - _1: "x xx a x xx a " + _1: "%s %S" + }), "x", "X"), + _1: "x \"X\"" }; }) -]; - -const ksprintf_suites_1 = { - hd: [ - "sprintf", - (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._2(Stdlib__Format.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Caml_string */3, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - } - }, - _1: "%s %S" - }), "x", "X"), - _1: "x \"X\"" - }; - }) ], tl: /* [] */0 }; @@ -2112,210 +2112,247 @@ const ksprintf_suites = { const int64_suites_0 = [ "i32_simple", (function (param) { + return { + TAG: /* Eq */0, + _0: Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_x */6, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%x" + }), -1), + _1: "ffffffff" + }; + }) +]; + +const int64_suites_1 = { + hd: [ + "i32_simple1", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int */4, - _0: /* Int_x */6, + _0: /* Int_o */10, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%x" + _1: "%o" }), -1), - _1: "ffffffff" + _1: "37777777777" }; }) -]; - -const int64_suites_1 = { - hd: [ - "i32_simple1", - (function (param) { + ], + tl: { + hd: [ + "i64_simple", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { - TAG: /* Int */4, - _0: /* Int_o */10, + TAG: /* Int64 */7, + _0: /* Int_d */0, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%o" - }), -1), - _1: "37777777777" + _1: "%Ld" + }), [ + 0, + 3 + ]), + _1: "3" }; }) - ], - tl: { - hd: [ - "i64_simple", - (function (param) { + ], + tl: { + hd: [ + "i64_simple2", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_d */0, + _0: /* Int_x */6, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Ld" + _1: "%Lx" }), [ 0, - 3 + 33 ]), - _1: "3" + _1: "21" }; }) - ], - tl: { - hd: [ - "i64_simple2", - (function (param) { + ], + tl: { + hd: [ + "i64_simple3", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_x */6, + _0: /* Int_i */3, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Lx" + _1: "%Li" }), [ 0, 33 ]), - _1: "21" + _1: "33" }; }) - ], - tl: { - hd: [ - "i64_simple3", - (function (param) { + ], + tl: { + hd: [ + "i64_simple4", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_i */3, + _0: /* Int_X */8, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Li" + _1: "%LX" }), [ 0, - 33 + 44 ]), - _1: "33" + _1: "2C" }; }) - ], - tl: { - hd: [ - "i64_simple4", - (function (param) { + ], + tl: { + hd: [ + "i64_simple5", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_X */8, + _0: /* Int_x */6, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%LX" + _1: "%Lx" }), [ 0, 44 ]), - _1: "2C" + _1: "2c" }; }) - ], - tl: { - hd: [ - "i64_simple5", - (function (param) { + ], + tl: { + hd: [ + "i64_simple6", + (function (param) { return { TAG: /* Eq */0, - _0: Curry._1(Stdlib__Format.asprintf({ + _0: Curry._2(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, _0: /* Int_x */6, - _1: /* No_padding */0, + _1: { + TAG: /* Arg_padding */1, + _0: /* Right */1 + }, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Lx" - }), [ + _1: "%*Lx" + }), 5, [ 0, 44 ]), - _1: "2c" + _1: " 2c" }; }) - ], - tl: { - hd: [ - "i64_simple6", - (function (param) { + ], + tl: { + hd: [ + "i64_simple7", + (function (param) { return { TAG: /* Eq */0, - _0: Curry._2(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int64 */7, - _0: /* Int_x */6, - _1: { - TAG: /* Arg_padding */1, - _0: /* Right */1 - }, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%*Lx" - }), 5, [ + _0: Caml_format.caml_int64_format("%d", [ 0, - 44 + 3333 ]), - _1: " 2c" + _1: "3333" }; }) - ], - tl: { - hd: [ - "i64_simple7", - (function (param) { + ], + tl: { + hd: [ + "i64_simple8", + (function (param) { return { TAG: /* Eq */0, - _0: Caml_format.caml_int64_format("%d", [ + _0: Curry._2(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int64 */7, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Int64 */7, + _0: /* Int_d */0, + _1: { + TAG: /* Lit_padding */0, + _0: /* Zeros */2, + _1: 18 + }, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "%Ld%018Ld" + }), [ 0, - 3333 + 3 + ], [ + 0, + 3 ]), - _1: "3333" + _1: "3000000000000000003" }; }) - ], - tl: { - hd: [ - "i64_simple8", - (function (param) { + ], + tl: { + hd: [ + "i64_simple9", + (function (param) { return { TAG: /* Eq */0, _0: Curry._2(Stdlib__Format.asprintf({ @@ -2339,75 +2376,59 @@ const int64_suites_1 = { }, _1: "%Ld%018Ld" }), [ - 0, - 3 - ], [ - 0, - 3 - ]), - _1: "3000000000000000003" + 107288, + 1548746752 + ], Caml_int64.zero), + _1: "460800000000000000000000000000000" }; }) - ], - tl: { - hd: [ - "i64_simple9", - (function (param) { + ], + tl: { + hd: [ + "i64_simple10", + (function (param) { return { TAG: /* Eq */0, - _0: Curry._2(Stdlib__Format.asprintf({ + _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_d */0, + _0: /* Int_x */6, _1: /* No_padding */0, _2: /* No_precision */0, - _3: { - TAG: /* Int64 */7, - _0: /* Int_d */0, - _1: { - TAG: /* Lit_padding */0, - _0: /* Zeros */2, - _1: 18 - }, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } + _3: /* End_of_format */0 }, - _1: "%Ld%018Ld" - }), [ - 107288, - 1548746752 - ], Caml_int64.zero), - _1: "460800000000000000000000000000000" + _1: "%Lx" + }), Stdlib__Int64.max_int), + _1: "7fffffffffffffff" }; }) - ], - tl: { - hd: [ - "i64_simple10", - (function (param) { + ], + tl: { + hd: [ + "i64_simple15", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_x */6, + _0: /* Int_d */0, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Lx" - }), Stdlib__Int64.max_int), - _1: "7fffffffffffffff" + _1: "%Ld" + }), Caml_int64.neg_one), + _1: "-1" }; }) - ], - tl: { - hd: [ - "i64_simple15", - (function (param) { + ], + tl: { + hd: [ + "i64_simple16", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ @@ -2420,81 +2441,81 @@ const int64_suites_1 = { _3: /* End_of_format */0 }, _1: "%Ld" - }), Caml_int64.neg_one), - _1: "-1" + }), [ + -1, + 4294956185 + ]), + _1: "-11111" }; }) - ], - tl: { - hd: [ - "i64_simple16", - (function (param) { + ], + tl: { + hd: [ + "i64_simple14", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_d */0, + _0: /* Int_X */8, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Ld" - }), [ - -1, - 4294956185 - ]), - _1: "-11111" + _1: "%LX" + }), Caml_int64.neg_one), + _1: "FFFFFFFFFFFFFFFF" }; }) - ], - tl: { - hd: [ - "i64_simple14", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/caml_format_test.ml\", line 207, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_X */8, + _0: /* Int_x */6, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%LX" + _1: "%Lx" }), Caml_int64.neg_one), - _1: "FFFFFFFFFFFFFFFF" + _1: "ffffffffffffffff" }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_format_test.ml\", line 207, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "i64_simple11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_x */6, + _0: /* Int_X */8, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Lx" - }), Caml_int64.neg_one), - _1: "ffffffffffffffff" + _1: "%LX" + }), Stdlib__Int64.max_int), + _1: "7FFFFFFFFFFFFFFF" }; }) - ], - tl: { - hd: [ - "i64_simple11", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/caml_format_test.ml\", line 215, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ @@ -2507,36 +2528,36 @@ const int64_suites_1 = { _3: /* End_of_format */0 }, _1: "%LX" - }), Stdlib__Int64.max_int), - _1: "7FFFFFFFFFFFFFFF" + }), Stdlib__Int64.min_int), + _1: "8000000000000000" }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_format_test.ml\", line 215, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/caml_format_test.ml\", line 216, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_X */8, + _0: /* Int_u */12, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%LX" - }), Stdlib__Int64.min_int), - _1: "8000000000000000" + _1: "%Lu" + }), Caml_int64.neg_one), + _1: "18446744073709551615" }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_format_test.ml\", line 216, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/caml_format_test.ml\", line 220, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ @@ -2549,15 +2570,18 @@ const int64_suites_1 = { _3: /* End_of_format */0 }, _1: "%Lu" - }), Caml_int64.neg_one), - _1: "18446744073709551615" + }), [ + -1, + 4294967196 + ]), + _1: "18446744073709551516" }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_format_test.ml\", line 220, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/caml_format_test.ml\", line 223, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ @@ -2570,18 +2594,15 @@ const int64_suites_1 = { _3: /* End_of_format */0 }, _1: "%Lu" - }), [ - -1, - 4294967196 - ]), - _1: "18446744073709551516" + }), Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.one)), + _1: "9223372036854775809" }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_format_test.ml\", line 223, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/caml_format_test.ml\", line 226, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ @@ -2594,136 +2615,144 @@ const int64_suites_1 = { _3: /* End_of_format */0 }, _1: "%Lu" - }), Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.one)), - _1: "9223372036854775809" + }), [ + -1, + 4294957296 + ]), + _1: "18446744073709541616" }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/caml_format_test.ml\", line 226, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "i64_simple19", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_u */12, + _0: /* Int_o */10, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Lu" - }), [ - -1, - 4294957296 - ]), - _1: "18446744073709541616" + _1: "%Lo" + }), Stdlib__Int64.min_int), + _1: "1000000000000000000000" }; }) - ], - tl: { - hd: [ - "i64_simple19", - (function (param) { + ], + tl: { + hd: [ + "i64_simple13", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_o */10, + _0: /* Int_X */8, _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%Lo" - }), Stdlib__Int64.min_int), - _1: "1000000000000000000000" + _1: "%LX" + }), Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.one)), + _1: "8000000000000001" }; }) - ], - tl: { - hd: [ - "i64_simple13", - (function (param) { + ], + tl: { + hd: [ + "i64_simple20", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_X */8, - _1: /* No_padding */0, + _0: /* Int_x */6, + _1: { + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 12 + }, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%LX" - }), Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.one)), - _1: "8000000000000001" + _1: "%12Lx" + }), [ + 0, + 3 + ]), + _1: " 3" }; }) - ], - tl: { - hd: [ - "i64_simple20", - (function (param) { + ], + tl: { + hd: [ + "i64_simple21", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_x */6, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 12 - }, + _0: /* Int_X */8, + _1: /* No_padding */0, _2: /* No_precision */0, _3: /* End_of_format */0 }, - _1: "%12Lx" + _1: "%LX" }), [ - 0, - 3 + 1859194407, + 1163551168 ]), - _1: " 3" + _1: "6ED10E27455A61C0" }; }) - ], - tl: { - hd: [ - "i64_simple21", - (function (param) { + ], + tl: { + hd: [ + "missing_neline", + (function (param) { return { TAG: /* Eq */0, _0: Curry._1(Stdlib__Format.asprintf({ TAG: /* Format */0, _0: { TAG: /* Int64 */7, - _0: /* Int_X */8, + _0: /* Int_d */0, _1: /* No_padding */0, _2: /* No_precision */0, - _3: /* End_of_format */0 + _3: { + TAG: /* Char_literal */12, + _0: /* '\n' */10, + _1: /* End_of_format */0 + } }, - _1: "%LX" + _1: "%Ld\n" }), [ - 1859194407, - 1163551168 + 0, + 32 ]), - _1: "6ED10E27455A61C0" + _1: "32\n" }; }) - ], - tl: { - hd: [ - "missing_neline", - (function (param) { + ], + tl: { + hd: [ + "missing_newline2", + (function (param) { + const buf = Stdlib__Buffer.create(30); return { TAG: /* Eq */0, - _0: Curry._1(Stdlib__Format.asprintf({ + _0: (Curry._1(Stdlib__Printf.bprintf(buf, { TAG: /* Format */0, _0: { TAG: /* Int64 */7, @@ -2740,39 +2769,10 @@ const int64_suites_1 = { }), [ 0, 32 - ]), + ]), Stdlib__Buffer.contents(buf)), _1: "32\n" }; }) - ], - tl: { - hd: [ - "missing_newline2", - (function (param) { - const buf = Stdlib__Buffer.create(30); - return { - TAG: /* Eq */0, - _0: (Curry._1(Stdlib__Printf.bprintf(buf, { - TAG: /* Format */0, - _0: { - TAG: /* Int64 */7, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* '\n' */10, - _1: /* End_of_format */0 - } - }, - _1: "%Ld\n" - }), [ - 0, - 32 - ]), Stdlib__Buffer.contents(buf)), - _1: "32\n" - }; - }) ], tl: /* [] */0 } @@ -2866,65 +2866,65 @@ const 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) { - const str_result = param[2]; - const f = param[1]; - const fmt = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "float_format ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "float_format %d" - }), i), - (function (param) { + const str_result = param[2]; + const f = param[1]; + const fmt = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "float_format ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "float_format %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_format.caml_format_float(fmt, f), + _1: str_result + }; + }) + ]; + }), float_data)), Stdlib.$at(int64_suites, Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "int64_of_string ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + } + } + }, + _1: "int64_of_string %d " + }), i), + (function (param) { return { TAG: /* Eq */0, - _0: Caml_format.caml_format_float(fmt, f), - _1: str_result + _0: Caml_format.caml_int64_of_string(b), + _1: a }; }) - ]; - }), float_data)), Stdlib.$at(int64_suites, Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "int64_of_string ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } - } - }, - _1: "int64_of_string %d " - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_format.caml_int64_of_string(b), - _1: a - }; - }) - ]; - }), of_string_data))))))))); + ]; + }), of_string_data))))))))); const a = Stdlib__Format.asprintf; 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 8599af5cf..f671222dd 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 @@ -22,12 +22,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/chain_code_test.js b/jscomp/test/dist/jscomp/test/chain_code_test.js index 3cd877ffc..4555e6ea3 100644 --- a/jscomp/test/dist/jscomp/test/chain_code_test.js +++ b/jscomp/test/dist/jscomp/test/chain_code_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/chn_test.js b/jscomp/test/dist/jscomp/test/chn_test.js index ef731e982..a5471a7fb 100644 --- a/jscomp/test/dist/jscomp/test/chn_test.js +++ b/jscomp/test/dist/jscomp/test/chn_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -37,19 +37,19 @@ console.log("\x3f\u003f\b\t\n\v\f\r\0\"'"); function convert(s) { return Stdlib__Array.to_list(Array.from(s, (function (x) { - const x$1 = x.codePointAt(0); - if (x$1 !== undefined) { - return x$1; - } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/chn_test.ml", - 20, - 22 - ] - }); - }))); + const x$1 = x.codePointAt(0); + if (x$1 !== undefined) { + return x$1; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/chn_test.ml", + 20, + 22 + ] + }); + }))); } eq("File \"jscomp/test/chn_test.ml\", line 25, characters 7-14", "你好,\n世界", "你好,\n世界"); diff --git a/jscomp/test/dist/jscomp/test/class3_test.js b/jscomp/test/dist/jscomp/test/class3_test.js index 4393bac5c..5beff1580 100644 --- a/jscomp/test/dist/jscomp/test/class3_test.js +++ b/jscomp/test/dist/jscomp/test/class3_test.js @@ -85,12 +85,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -104,12 +104,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }) + self$1[x] = self$1[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -134,16 +134,16 @@ function adjusted_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$2) { - return self$2[x]; - }), + return self$2[x]; + }), get_offset, (function (self$2) { - return self$2[x] - self$2[origin] | 0; - }), + return self$2[x] - self$2[origin] | 0; + }), move, (function (self$2, d) { - self$2[x] = self$2[x] + d | 0; - }) + self$2[x] = self$2[x] + d | 0; + }) ]); return function (env, self, x_init) { const origin$1 = Math.imul(x_init / 10 | 0, 10); @@ -201,16 +201,16 @@ function printable_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$4) { - return self$4[x]; - }), + return self$4[x]; + }), move, (function (self$4, d) { - self$4[x] = self$4[x] + d | 0; - }), + self$4[x] = self$4[x] + d | 0; + }), print, (function (self$4) { - return Curry._1(self$4[0][get_x], self$4); - }) + return Curry._1(self$4[0][get_x], self$4); + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -242,19 +242,19 @@ const len = ids[2]; CamlinternalOO.set_methods($$class, [ n, (function (self$5) { - return 1; - }), + return 1; + }), register, (function (self$5) { - ints.contents = { - hd: self$5, - tl: ints.contents - }; - }), + ints.contents = { + hd: self$5, + tl: ints.contents + }; + }), len, (function (self$5) { - return Stdlib__List.length(ints.contents); - }) + return Stdlib__List.length(ints.contents); + }) ]); CamlinternalOO.init_class($$class); @@ -281,21 +281,21 @@ function printable_point2_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { - return self$6[x]; - }), + return self$6[x]; + }), move, (function (self$6, d) { - self$6[x] = self$6[x] + d | 0; - }), + self$6[x] = self$6[x] + d | 0; + }), print, (function (self$6) { - return Stdlib.print_int(Curry._1(self$6[0][get_x], self$6)); - }) + return Stdlib.print_int(Curry._1(self$6[0][get_x], self$6)); + }) ]); CamlinternalOO.add_initializer($$class, (function (self$6) { - console.log("initializingFile \"jscomp/test/class3_test.ml\", line 76, characters 50-57"); - return Caml_array.set(v, 0, self$6[x]); - })); + console.log("initializingFile \"jscomp/test/class3_test.ml\", line 76, characters 50-57"); + return Caml_array.set(v, 0, self$6[x]); + })); return function (env, self, x_init) { const origin = Math.imul(x_init / 10 | 0, 10); const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -319,8 +319,8 @@ function abstract_point_1($$class) { const get_x = ids[1]; const 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 Curry._1(self$7[0][get_x], self$7) - self$7[x_init] | 0; + })); return function (env, self, x_init$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x_init] = x_init$1; @@ -344,12 +344,12 @@ function vpoint_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$8) { - return self$8[x]; - }), + return self$8[x]; + }), move, (function (self$8, d) { - self$8[x] = self$8[x] + d | 0; - }) + self$8[x] = self$8[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -374,8 +374,8 @@ function abstract_point2_1($$class) { const move = ids[0]; const x = ids[1]; CamlinternalOO.set_method($$class, move, (function (self$9, d) { - self$9[x] = self$9[x] + d | 0; - })); + self$9[x] = self$9[x] + d | 0; + })); return function (env, self) { return CamlinternalOO.create_object_opt(self, $$class); }; @@ -395,8 +395,8 @@ function point2_init($$class) { const obj_init = inh[0]; const x = inh[1]; CamlinternalOO.set_method($$class, get_offset, (function (self$10) { - return self$10[x] - self$10[x_init] | 0; - })); + return self$10[x] - self$10[x_init] | 0; + })); return function (env, self, x_init$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x_init] = x_init$1; @@ -425,16 +425,16 @@ function restricted_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$11) { - return self$11[x]; - }), + return self$11[x]; + }), move, (function (self$11, d) { - self$11[x] = self$11[x] + d | 0; - }), + self$11[x] = self$11[x] + d | 0; + }), bump, (function (self$11) { - return Curry._2(self$11[0][move], self$11, 1); - }) + return Curry._2(self$11[0][move], self$11, 1); + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); diff --git a/jscomp/test/dist/jscomp/test/class4_test.js b/jscomp/test/dist/jscomp/test/class4_test.js index 041eb2c8e..05d381866 100644 --- a/jscomp/test/dist/jscomp/test/class4_test.js +++ b/jscomp/test/dist/jscomp/test/class4_test.js @@ -33,12 +33,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -57,16 +57,16 @@ function restricted_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }), + self$1[x] = self$1[x] + d | 0; + }), bump, (function (self$1) { - return Curry._2(self$1[0][move], self$1, 1); - }) + return Curry._2(self$1[0][move], self$1, 1); + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -107,8 +107,8 @@ function abstract_point_1($$class) { const get_x = ids[1]; const 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 Curry._1(self$5[0][get_x], self$5) - self$5[x_init] | 0; + })); return function (env, self, x_init$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x_init] = x_init$1; @@ -135,12 +135,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { - return self$6[x]; - }), + return self$6[x]; + }), move, (function (self$6, d) { - self$6[x] = self$6[x] + d | 0; - }) + self$6[x] = self$6[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -172,8 +172,8 @@ function colored_point_init($$class) { ], point, true); const obj_init = inh[0]; CamlinternalOO.set_method($$class, color, (function (self$7) { - return self$7[c]; - })); + return self$7[c]; + })); return function (env, self, x, c$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); diff --git a/jscomp/test/dist/jscomp/test/class5_test.js b/jscomp/test/dist/jscomp/test/class5_test.js index c81271063..dbcce8baa 100644 --- a/jscomp/test/dist/jscomp/test/class5_test.js +++ b/jscomp/test/dist/jscomp/test/class5_test.js @@ -35,12 +35,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -59,16 +59,16 @@ function printable_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }), + self$1[x] = self$1[x] + d | 0; + }), print, (function (self$1) { - return String(Curry._1(self$1[0][get_x], self$1)); - }) + return String(Curry._1(self$1[0][get_x], self$1)); + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -94,8 +94,8 @@ function printable_colored_point_init($$class) { const color = ids[3]; const c = ids[4]; CamlinternalOO.set_method($$class, color, (function (self$2) { - return self$2[c]; - })); + return self$2[c]; + })); const inh = CamlinternalOO.inherits($$class, shared$2, 0, [ "get_x", "move", @@ -104,8 +104,8 @@ function printable_colored_point_init($$class) { const obj_init = inh[0]; const 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 "(" + (Curry._1(print$1, self$2) + (", " + (Curry._1(self$2[0][color], self$2) + ")"))); + })); return function (env, self, y, c$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[c] = c$1; @@ -136,12 +136,12 @@ function ref_init($$class) { CamlinternalOO.set_methods($$class, [ get, (function (self$3) { - return self$3[x]; - }), + return self$3[x]; + }), set, (function (self$3, y) { - self$3[x] = y; - }) + self$3[x] = y; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -171,12 +171,12 @@ function intlist_init($$class) { CamlinternalOO.set_methods($$class, [ empty, (function (self$4) { - return Caml_obj.caml_equal(self$4[l], /* [] */0); - }), + return Caml_obj.caml_equal(self$4[l], /* [] */0); + }), fold, (function (self$4, f, accu) { - return Stdlib__List.fold_left(f, accu, self$4[l]); - }) + return Stdlib__List.fold_left(f, accu, self$4[l]); + }) ]); return function (env, self, l$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -199,8 +199,8 @@ const l = Curry._2(intlist[0], undefined, { }); eq("File \"jscomp/test/class5_test.ml\", line 54, characters 5-12", 6, Caml_oo_curry.js3(-1010803711, 4, l, (function (x, y) { - return x + y | 0; - }), 0)); + return x + y | 0; + }), 0)); function intlist2_init($$class) { const l = CamlinternalOO.new_variable($$class, ""); @@ -210,12 +210,12 @@ function intlist2_init($$class) { CamlinternalOO.set_methods($$class, [ empty, (function (self$5) { - return Caml_obj.caml_equal(self$5[l], /* [] */0); - }), + return Caml_obj.caml_equal(self$5[l], /* [] */0); + }), fold, (function (self$5, f, accu) { - return Stdlib__List.fold_left(f, accu, self$5[l]); - }) + return Stdlib__List.fold_left(f, accu, self$5[l]); + }) ]); return function (env, self, l$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -242,11 +242,11 @@ eq("File \"jscomp/test/class5_test.ml\", line 67, characters 5-12", [ "1 2 3 " ], [ Caml_oo_curry.js3(-1010803711, 5, l$1, (function (x, y) { - return x + y | 0; - }), 0), + return x + y | 0; + }), 0), Caml_oo_curry.js3(-1010803711, 6, l$1, (function (s, x) { - return s + (String(x) + " "); - }), "") + return s + (String(x) + " "); + }), "") ]); function point_init($$class) { @@ -257,12 +257,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { - return self$6[x]; - }), + return self$6[x]; + }), move, (function (self$6, d) { - self$6[x] = self$6[x] + d | 0; - }) + self$6[x] = self$6[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -287,8 +287,8 @@ function distance_point_init($$class) { const obj_init = inh[0]; const 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 Stdlib.abs(Caml_oo_curry.js1(291546447, 7, other) - self$7[x] | 0); + })); return function (env, self, x) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); diff --git a/jscomp/test/dist/jscomp/test/class6_test.js b/jscomp/test/dist/jscomp/test/class6_test.js index 7bd2ba6b5..480ad233c 100644 --- a/jscomp/test/dist/jscomp/test/class6_test.js +++ b/jscomp/test/dist/jscomp/test/class6_test.js @@ -33,12 +33,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -52,12 +52,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }) + self$1[x] = self$1[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -82,8 +82,8 @@ function colored_point_init($$class) { ], point, true); const obj_init = inh[0]; CamlinternalOO.set_method($$class, color, (function (self$2) { - return self$2[c]; - })); + return self$2[c]; + })); return function (env, self, x, c$1) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); @@ -126,8 +126,8 @@ function lookup_obj(obj, _param) { function c_init($$class) { const m = CamlinternalOO.get_method_label($$class, "m"); CamlinternalOO.set_method($$class, m, (function (self$3) { - return 1; - })); + return 1; + })); return function (env, self) { return CamlinternalOO.create_object_opt(self, $$class); }; @@ -148,12 +148,12 @@ function d_init($$class) { CamlinternalOO.set_methods($$class, [ n, (function (self$4) { - return 2; - }), + return 2; + }), as_c, (function (self$4) { - return self$4; - }) + return self$4; + }) ]); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -201,14 +201,14 @@ function functional_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$6) { - return self$6[x]; - }), + return self$6[x]; + }), move, (function (self$6, d) { - const copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$6)); - copy[x] = self$6[x] + d | 0; - return copy; - }) + const 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) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -241,12 +241,12 @@ function bad_functional_point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$7) { - return self$7[x]; - }), + return self$7[x]; + }), move, (function (self$7, d) { - return Curry._2(bad_functional_point[0], undefined, self$7[x] + d | 0); - }) + return Curry._2(bad_functional_point[0], undefined, self$7[x] + d | 0); + }) ]); return function (env, self, y) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); diff --git a/jscomp/test/dist/jscomp/test/class7_test.js b/jscomp/test/dist/jscomp/test/class7_test.js index f1884772e..15f46d433 100644 --- a/jscomp/test/dist/jscomp/test/class7_test.js +++ b/jscomp/test/dist/jscomp/test/class7_test.js @@ -46,12 +46,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -65,12 +65,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }) + self$1[x] = self$1[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -106,12 +106,12 @@ function ref_init($$class) { CamlinternalOO.set_methods($$class, [ get, (function (self$2) { - return self$2[x]; - }), + return self$2[x]; + }), set, (function (self$2, y) { - self$2[x] = y; - }) + self$2[x] = y; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -130,18 +130,18 @@ function backup_init($$class) { CamlinternalOO.set_methods($$class, [ save, (function (self$3) { - const 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)); - }), + const 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) { - const x = self$3[copy]; - if (x !== undefined) { - return Caml_option.valFromOption(x); - } else { - return self$3; - } - }) + const x = self$3[copy]; + if (x !== undefined) { + return Caml_option.valFromOption(x); + } else { + return self$3; + } + }) ]); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -231,21 +231,21 @@ function backup2_init($$class) { CamlinternalOO.set_methods($$class, [ save, (function (self$5) { - self$5[copy] = Caml_option.some(Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$5))); - }), + self$5[copy] = Caml_option.some(Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$5))); + }), restore, (function (self$5) { - const x = self$5[copy]; - if (x !== undefined) { - return Caml_option.valFromOption(x); - } else { - return self$5; - } - }), + const x = self$5[copy]; + if (x !== undefined) { + return Caml_option.valFromOption(x); + } else { + return self$5; + } + }), clear, (function (self$5) { - self$5[copy] = undefined; - }) + self$5[copy] = undefined; + }) ]); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -321,8 +321,8 @@ function window_init($$class) { const top_widget = ids[0]; const top_widget$1 = ids[1]; CamlinternalOO.set_method($$class, top_widget, (function (self$7) { - return self$7[top_widget$1]; - })); + return self$7[top_widget$1]; + })); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[top_widget$1] = undefined; @@ -337,8 +337,8 @@ function widget_init($$class) { const $$window = ids[0]; const $$window$1 = ids[1]; CamlinternalOO.set_method($$class, $$window, (function (self$8) { - return self$8[$$window$1]; - })); + return self$8[$$window$1]; + })); return function (env, self, w) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[$$window$1] = w; diff --git a/jscomp/test/dist/jscomp/test/class8_test.js b/jscomp/test/dist/jscomp/test/class8_test.js index 7ccd1bd41..cbcd8a23d 100644 --- a/jscomp/test/dist/jscomp/test/class8_test.js +++ b/jscomp/test/dist/jscomp/test/class8_test.js @@ -53,12 +53,12 @@ function money_init($$class) { CamlinternalOO.set_methods($$class, [ value, (function (self$2) { - return self$2[repr]; - }), + return self$2[repr]; + }), leq, (function (self$2, p) { - return self$2[repr] <= Caml_oo_curry.js1(834174833, 1, p); - }) + return self$2[repr] <= Caml_oo_curry.js1(834174833, 1, p); + }) ]); return function (env, self, x) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -81,10 +81,10 @@ function money2_init($$class) { const obj_init = inh[0]; const repr = inh[1]; CamlinternalOO.set_method($$class, times, (function (self$3, k) { - const copy = Caml_oo.caml_set_oo_id(Caml_obj.caml_obj_dup(self$3)); - copy[repr] = k * self$3[repr]; - return copy; - })); + const 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) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._2(obj_init, self$1, x); 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 714abbe99..5c84003b8 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 @@ -25,12 +25,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -39,12 +39,12 @@ function eq(loc, x, y) { function fib_init($$class) { const calc = CamlinternalOO.get_method_label($$class, "calc"); CamlinternalOO.set_method($$class, calc, (function (self$1, x) { - if (x === 0 || x === 1) { - return 1; - } else { - return Curry._2(self$1[0][calc], self$1, x - 1 | 0) + Curry._2(self$1[0][calc], self$1, x - 2 | 0) | 0; - } - })); + if (x === 0 || x === 1) { + return 1; + } else { + return Curry._2(self$1[0][calc], self$1, x - 1 | 0) + Curry._2(self$1[0][calc], self$1, x - 2 | 0) | 0; + } + })); return function (env, self) { return CamlinternalOO.create_object_opt(self, $$class); }; @@ -60,19 +60,19 @@ function memo_fib_init($$class) { const obj_init = inh[0]; const 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){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - const v = Curry._2(calc$1, self$2, x); - Stdlib__Hashtbl.add(self$2[cache], x, v); - return v; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + try { + return Stdlib__Hashtbl.find(self$2[cache], x); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + const v = Curry._2(calc$1, self$2, x); + Stdlib__Hashtbl.add(self$2[cache], x, v); + return v; } - })); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + })); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[cache] = Stdlib__Hashtbl.create(undefined, 31); diff --git a/jscomp/test/dist/jscomp/test/class_repr.js b/jscomp/test/dist/jscomp/test/class_repr.js index e7d284724..f991ed30d 100644 --- a/jscomp/test/dist/jscomp/test/class_repr.js +++ b/jscomp/test/dist/jscomp/test/class_repr.js @@ -34,8 +34,8 @@ function x_init($$class) { const get_x = ids[0]; const x = ids[1]; CamlinternalOO.set_method($$class, get_x, (function (self$2) { - return self$2[x]; - })); + return self$2[x]; + })); return function (env, self, v) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); self$1[x] = v; @@ -80,14 +80,14 @@ function xx_init($$class) { CamlinternalOO.set_methods($$class, [ get_money, (function (self$3) { - return self$3[money]; - }), + return self$3[money]; + }), incr, (function (self$3) { - const 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; - }) + const 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) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -145,12 +145,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$4) { - return self$4[x]; - }), + return self$4[x]; + }), get_x5, (function (self$4) { - return Curry._1(self$4[0][get_x], self$4) + 5 | 0; - }) + return Curry._1(self$4[0][get_x], self$4) + 5 | 0; + }) ]); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -194,15 +194,15 @@ function xx0_init($$class) { CamlinternalOO.set_methods($$class, [ get_money, (function (self$5) { - return self$5[money]; - }), + return self$5[money]; + }), incr, (function (self$5) { - const 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; - }) + const 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) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); diff --git a/jscomp/test/dist/jscomp/test/class_test.js b/jscomp/test/dist/jscomp/test/class_test.js index 37305fa76..7886397ca 100644 --- a/jscomp/test/dist/jscomp/test/class_test.js +++ b/jscomp/test/dist/jscomp/test/class_test.js @@ -21,12 +21,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }) + self$1[x] = self$1[x] + d | 0; + }) ]); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -57,12 +57,12 @@ function point2_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$2) { - return self$2[x]; - }), + return self$2[x]; + }), move, (function (self$2, d) { - self$2[x] = self$2[x] + d | 0; - }) + self$2[x] = self$2[x] + d | 0; + }) ]); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); @@ -85,54 +85,54 @@ const two = Caml_oo_curry.js1(291546447, 5, tmp$1); const u = { x: 3, getX: (function () { - let self = this; - return self.x; - }) + let self = this; + return self.x; + }) }; Mt.from_pair_suites("Class_test", { hd: [ "File \"jscomp/test/class_test.ml\", line 38, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: zero, - _1: 0 - }; - }) + return { + TAG: /* Eq */0, + _0: zero, + _1: 0 + }; + }) ], tl: { hd: [ "File \"jscomp/test/class_test.ml\", line 39, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: three, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: three, + _1: 3 + }; + }) ], tl: { hd: [ "File \"jscomp/test/class_test.ml\", line 40, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: one, - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: one, + _1: 1 + }; + }) ], tl: { hd: [ "File \"jscomp/test/class_test.ml\", line 41, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: two, - _1: 2 - }; - }) + return { + TAG: /* Eq */0, + _0: two, + _1: 2 + }; + }) ], tl: /* [] */0 } 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 3db5c5347..a12b682e4 100644 --- a/jscomp/test/dist/jscomp/test/class_type_ffi_test.js +++ b/jscomp/test/dist/jscomp/test/class_type_ffi_test.js @@ -70,21 +70,21 @@ function mk_f(param) { function omk_f(param) { return { huge_methdo: (function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) { - return Curry.app(a0, [ - a1, - a2, - a3, - a4, - a5, - a6, - a7, - a8, - a9, - a10, - a11, - a12 - ]); - }) + return Curry.app(a0, [ + a1, + a2, + a3, + a4, + a5, + a6, + a7, + a8, + a9, + a10, + a11, + a12 + ]); + }) }; } 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 389ec891f..e8a0bac12 100644 --- a/jscomp/test/dist/jscomp/test/coercion_module_alias_test.js +++ b/jscomp/test/dist/jscomp/test/coercion_module_alias_test.js @@ -29,8 +29,8 @@ const f = Stdlib__List.length; function g(x) { return Stdlib__List.length(Stdlib__List.map((function (prim) { - return prim + 1 | 0; - }), x)); + return prim + 1 | 0; + }), x)); } function F(X) { diff --git a/jscomp/test/dist/jscomp/test/complex_if_test.js b/jscomp/test/dist/jscomp/test/complex_if_test.js index e75cde0a1..e2096c693 100644 --- a/jscomp/test/dist/jscomp/test/complex_if_test.js +++ b/jscomp/test/dist/jscomp/test/complex_if_test.js @@ -125,12 +125,12 @@ function string_escaped(s) { const suites_0 = [ "complete_escape", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Bytes.to_string(escaped(Stdlib__Bytes.of_string("\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"))), - _1: "\\000\\001\\002\\003\\004\\005\\006\\007\\b\\t\\n\\011\\012\\r\\014\\015\\016\\017\\018\\019\\020\\021\\022\\023\\024\\025\\026\\027\\028\\029\\030\\031 !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\127\\128\\129\\130\\131\\132\\133\\134\\135\\136\\137\\138\\139\\140\\141\\142\\143\\144\\145\\146\\147\\148\\149\\150\\151\\152\\153\\154\\155\\156\\157\\158\\159\\160\\161\\162\\163\\164\\165\\166\\167\\168\\169\\170\\171\\172\\173\\174\\175\\176\\177\\178\\179\\180\\181\\182\\183\\184\\185\\186\\187\\188\\189\\190\\191\\192\\193\\194\\195\\196\\197\\198\\199\\200\\201\\202\\203\\204\\205\\206\\207\\208\\209\\210\\211\\212\\213\\214\\215\\216\\217\\218\\219\\220\\221\\222\\223\\224\\225\\226\\227\\228\\229\\230\\231\\232\\233\\234\\235\\236\\237\\238\\239\\240\\241\\242\\243\\244\\245\\246\\247\\248\\249\\250\\251\\252\\253\\254\\255" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Bytes.to_string(escaped(Stdlib__Bytes.of_string("\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"))), + _1: "\\000\\001\\002\\003\\004\\005\\006\\007\\b\\t\\n\\011\\012\\r\\014\\015\\016\\017\\018\\019\\020\\021\\022\\023\\024\\025\\026\\027\\028\\029\\030\\031 !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\\127\\128\\129\\130\\131\\132\\133\\134\\135\\136\\137\\138\\139\\140\\141\\142\\143\\144\\145\\146\\147\\148\\149\\150\\151\\152\\153\\154\\155\\156\\157\\158\\159\\160\\161\\162\\163\\164\\165\\166\\167\\168\\169\\170\\171\\172\\173\\174\\175\\176\\177\\178\\179\\180\\181\\182\\183\\184\\185\\186\\187\\188\\189\\190\\191\\192\\193\\194\\195\\196\\197\\198\\199\\200\\201\\202\\203\\204\\205\\206\\207\\208\\209\\210\\211\\212\\213\\214\\215\\216\\217\\218\\219\\220\\221\\222\\223\\224\\225\\226\\227\\228\\229\\230\\231\\232\\233\\234\\235\\236\\237\\238\\239\\240\\241\\242\\243\\244\\245\\246\\247\\248\\249\\250\\251\\252\\253\\254\\255" + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/complex_test.js b/jscomp/test/dist/jscomp/test/complex_test.js index 793ee5f54..6bd968c20 100644 --- a/jscomp/test/dist/jscomp/test/complex_test.js +++ b/jscomp/test/dist/jscomp/test/complex_test.js @@ -7,15 +7,15 @@ const Stdlib__Complex = require("melange/complex.js"); const suites_0 = [ "basic_add", (function (param) { - return { - TAG: /* Eq */0, - _0: { - re: 2, - im: 2 - }, - _1: Stdlib__Complex.add(Stdlib__Complex.add(Stdlib__Complex.add(Stdlib__Complex.one, Stdlib__Complex.one), Stdlib__Complex.i), Stdlib__Complex.i) - }; - }) + return { + TAG: /* Eq */0, + _0: { + re: 2, + im: 2 + }, + _1: Stdlib__Complex.add(Stdlib__Complex.add(Stdlib__Complex.add(Stdlib__Complex.one, Stdlib__Complex.one), Stdlib__Complex.i), Stdlib__Complex.i) + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/complex_while_loop.js b/jscomp/test/dist/jscomp/test/complex_while_loop.js index 5ea126220..f542bb8b1 100644 --- a/jscomp/test/dist/jscomp/test/complex_while_loop.js +++ b/jscomp/test/dist/jscomp/test/complex_while_loop.js @@ -5,15 +5,15 @@ function f(param) { let n = 0; while((function () { - const fib = function (n) { - if (n === 0 || n === 1) { - return 1; - } else { - return fib(n - 1 | 0) + fib(n - 2 | 0) | 0; - } - }; - return fib(n) > 10; - })()) { + const fib = function (n) { + if (n === 0 || n === 1) { + return 1; + } else { + return fib(n - 1 | 0) + fib(n - 2 | 0) | 0; + } + }; + return fib(n) > 10; + })()) { console.log(String(n)); n = n + 1 | 0; }; @@ -21,9 +21,9 @@ function f(param) { function ff(param) { while((function () { - const b = 9; - return (3 + b | 0) > 10; - })()) { + const b = 9; + return (3 + b | 0) > 10; + })()) { }; } diff --git a/jscomp/test/dist/jscomp/test/const_block_test.js b/jscomp/test/dist/jscomp/test/const_block_test.js index 946d3f3d9..09f773d12 100644 --- a/jscomp/test/dist/jscomp/test/const_block_test.js +++ b/jscomp/test/dist/jscomp/test/const_block_test.js @@ -58,21 +58,21 @@ const suites_1 = { hd: [ "avoid_mutable_inline_test", (function (param) { - Caml_array.set(c, 0, 3); - Caml_array.set(c, 1, 4); - return { - TAG: /* Eq */0, - _0: [ - 3, - 4, - 2, - 3, - 4, - 5 - ], - _1: c - }; - }) + Caml_array.set(c, 0, 3); + Caml_array.set(c, 1, 4); + return { + TAG: /* Eq */0, + _0: [ + 3, + 4, + 2, + 3, + 4, + 5 + ], + _1: c + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/cps_test.js b/jscomp/test/dist/jscomp/test/cps_test.js index 7157c51a5..30a49aa08 100644 --- a/jscomp/test/dist/jscomp/test/cps_test.js +++ b/jscomp/test/dist/jscomp/test/cps_test.js @@ -18,16 +18,16 @@ function test(param) { return Curry._1(acc, undefined); } _acc = (function (param) { - v.contents = v.contents + n | 0; - return Curry._1(acc, undefined); - }); + v.contents = v.contents + n | 0; + return Curry._1(acc, undefined); + }); _n = n - 1 | 0; continue; }; }; f(10, (function (param) { - - })); + + })); return v.contents; } @@ -36,16 +36,16 @@ function test_closure(param) { contents: 0 }; const arr = Caml_array.make(6, (function (x) { - return x; - })); + return x; + })); for (let i = 0; i <= 5; ++i) { Caml_array.set(arr, i, (function (param) { - return i; - })); + return i; + })); } Stdlib__Array.iter((function (i) { - v.contents = v.contents + Curry._1(i, 0) | 0; - }), arr); + v.contents = v.contents + Curry._1(i, 0) | 0; + }), arr); return v.contents; } @@ -54,17 +54,17 @@ function test_closure2(param) { contents: 0 }; const arr = Caml_array.make(6, (function (x) { - return x; - })); + return x; + })); for (let i = 0; i <= 5; ++i) { const j = i + i | 0; Caml_array.set(arr, i, (function (param) { - return j; - })); + return j; + })); } Stdlib__Array.iter((function (i) { - v.contents = v.contents + Curry._1(i, 0) | 0; - }), arr); + v.contents = v.contents + Curry._1(i, 0) | 0; + }), arr); return v.contents; } @@ -72,34 +72,34 @@ Mt.from_pair_suites("Cps_test", { hd: [ "cps_test_sum", (function (param) { - return { - TAG: /* Eq */0, - _0: 55, - _1: test(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 55, + _1: test(undefined) + }; + }) ], tl: { hd: [ "cps_test_closure", (function (param) { - return { - TAG: /* Eq */0, - _0: 15, - _1: test_closure(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 15, + _1: test_closure(undefined) + }; + }) ], tl: { hd: [ "cps_test_closure2", (function (param) { - return { - TAG: /* Eq */0, - _0: 30, - _1: test_closure2(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 30, + _1: test_closure2(undefined) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/demo.js b/jscomp/test/dist/jscomp/test/demo.js index 29dc3c11a..3bd351cc1 100644 --- a/jscomp/test/dist/jscomp/test/demo.js +++ b/jscomp/test/dist/jscomp/test/demo.js @@ -25,10 +25,10 @@ function ui_layout(compile, lookup, appContext) { const init = Curry._1(compile, "bid - ask"); const computeFunction = { contents: (function (env) { - return Curry._1(init, (function (key) { - return Curry._2(lookup, env, key); - })); - }) + return Curry._1(init, (function (key) { + return Curry._2(lookup, env, key); + })); + }) }; const hw1 = new BUI.HostedWindow(); const hc = new BUI.HostedContent(); @@ -91,36 +91,36 @@ function ui_layout(compile, lookup, appContext) { button.text = "update formula"; button.minHeight = 20; button.on("click", (function (_event) { - try { - const hot_function = Curry._1(compile, inputCode.text); - computeFunction.contents = (function (env) { - return Curry._1(hot_function, (function (key) { - return Curry._2(lookup, env, key); - })); - }); - return; - } - catch (e){ - return; - } - })); - Runtime.setInterval((function () { - grid.dataSource = Array.prototype.map.call(data, (function (param) { - const price = param.price; - const bid = price + 20 * Math.random(); - const ask = price + 20 * Math.random(); - const result = Curry._1(computeFunction.contents, { - bid: bid, - ask: ask - }); - return [ - mk_titleRow(param.ticker), - mk_titleRow(bid.toFixed(2)), - mk_titleRow(ask.toFixed(2)), - mk_titleRow(result.toFixed(2)) - ]; + try { + const hot_function = Curry._1(compile, inputCode.text); + computeFunction.contents = (function (env) { + return Curry._1(hot_function, (function (key) { + return Curry._2(lookup, env, key); })); - }), 100); + }); + return; + } + catch (e){ + return; + } + })); + Runtime.setInterval((function () { + grid.dataSource = Array.prototype.map.call(data, (function (param) { + const price = param.price; + const bid = price + 20 * Math.random(); + const ask = price + 20 * Math.random(); + const result = Curry._1(computeFunction.contents, { + bid: bid, + ask: ask + }); + return [ + mk_titleRow(param.ticker), + mk_titleRow(bid.toFixed(2)), + mk_titleRow(ask.toFixed(2)), + mk_titleRow(result.toFixed(2)) + ]; + })); + }), 100); return hw1; } diff --git a/jscomp/test/dist/jscomp/test/demo_page.js b/jscomp/test/dist/jscomp/test/demo_page.js index dc9924eee..6efea0d94 100644 --- a/jscomp/test/dist/jscomp/test/demo_page.js +++ b/jscomp/test/dist/jscomp/test/demo_page.js @@ -43,10 +43,10 @@ function f(param) { ReactDom.render(React.createClass({ render: (function (param) { - return React.DOM.div({ - alt: "pic" - }, React.DOM.h1(undefined, "hello react"), React.DOM.h2(undefined, "type safe!")); - }) + return React.DOM.div({ + alt: "pic" + }, React.DOM.h1(undefined, "hello react"), React.DOM.h2(undefined, "type safe!")); + }) }), document.getElementById("hi")); exports.fib = fib; diff --git a/jscomp/test/dist/jscomp/test/demo_pipe.js b/jscomp/test/dist/jscomp/test/demo_pipe.js index 1d40d535b..91cedf3cf 100644 --- a/jscomp/test/dist/jscomp/test/demo_pipe.js +++ b/jscomp/test/dist/jscomp/test/demo_pipe.js @@ -4,10 +4,10 @@ function register(rl) { return rl.on("line", (function (x) { - console.log(x); - })).on("close", (function (param) { - console.log("finished"); - })); + console.log(x); + })).on("close", (function (param) { + console.log("finished"); + })); } exports.register = register; diff --git a/jscomp/test/dist/jscomp/test/digest_test.js b/jscomp/test/dist/jscomp/test/digest_test.js index 62df5370a..c35412517 100644 --- a/jscomp/test/dist/jscomp/test/digest_test.js +++ b/jscomp/test/dist/jscomp/test/digest_test.js @@ -153,67 +153,67 @@ Mt.from_pair_suites("Digest_test", Stdlib.$at({ hd: [ "File \"jscomp/test/digest_test.ml\", line 6, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("value")), - _1: "2063c1608d6e0baf80249c42e2be5804" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("value")), + _1: "2063c1608d6e0baf80249c42e2be5804" + }; + }) ], tl: { hd: [ "File \"jscomp/test/digest_test.ml\", line 7, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog")), - _1: "9e107d9d372bb6826bd81d3542a419d6" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog")), + _1: "9e107d9d372bb6826bd81d3542a419d6" + }; + }) ], tl: { hd: [ "File \"jscomp/test/digest_test.ml\", line 9, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog.")), - _1: "e4d909c290d0fb1ca068ffaddf22cbd0" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog.")), + _1: "e4d909c290d0fb1ca068ffaddf22cbd0" + }; + }) ], tl: { hd: [ "File \"jscomp/test/digest_test.ml\", line 11, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("")), - _1: "d41d8cd98f00b204e9800998ecf8427e" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("")), + _1: "d41d8cd98f00b204e9800998ecf8427e" + }; + }) ], tl: { hd: [ "File \"jscomp/test/digest_test.ml\", line 12, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.")), - _1: "7065cc36bba1d155fb09f9d02f22e8bf" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.")), + _1: "7065cc36bba1d155fb09f9d02f22e8bf" + }; + }) ], tl: { hd: [ "File \"jscomp/test/digest_test.ml\", line 13, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.")), - _1: "b9193d1df4b7a8f0a25ffdd1005c5b2b" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string("The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.The quick brown fox jumps over the lazy dog.")), + _1: "b9193d1df4b7a8f0a25ffdd1005c5b2b" + }; + }) ], tl: /* [] */0 } @@ -222,27 +222,27 @@ Mt.from_pair_suites("Digest_test", Stdlib.$at({ } } }, Stdlib__Array.to_list(Stdlib__Array.map((function (i) { - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Digest.to_hex(Stdlib__Digest.string(Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, /* 'a' */97)))), - _1: Caml_array.get(ref, i) - }; - }) - ]; - }), Ext_array_test.range(0, 129))))); + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: Stdlib__Digest.to_hex(Stdlib__Digest.string(Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, /* 'a' */97)))), + _1: Caml_array.get(ref, i) + }; + }) + ]; + }), Ext_array_test.range(0, 129))))); exports.f = f; /* Not a pure module */ 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 2d749f419..cb7f6c211 100644 --- a/jscomp/test/dist/jscomp/test/div_by_zero_test.js +++ b/jscomp/test/dist/jscomp/test/div_by_zero_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -40,79 +40,79 @@ function add(suite) { add([ "File \"jscomp/test/div_by_zero_test.ml\", line 14, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_int32.div(3, 0); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_int32.div(3, 0); + }) + }; + }) ]); add([ "File \"jscomp/test/div_by_zero_test.ml\", line 15, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_int32.mod_(3, 0); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_int32.mod_(3, 0); + }) + }; + }) ]); add([ "File \"jscomp/test/div_by_zero_test.ml\", line 16, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_int32.div(3, 0); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_int32.div(3, 0); + }) + }; + }) ]); add([ "File \"jscomp/test/div_by_zero_test.ml\", line 17, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_int32.mod_(3, 0); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_int32.mod_(3, 0); + }) + }; + }) ]); add([ "File \"jscomp/test/div_by_zero_test.ml\", line 18, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_int64.div([ - 0, - 3 - ], Caml_int64.zero); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_int64.div([ + 0, + 3 + ], Caml_int64.zero); + }) + }; + }) ]); add([ "File \"jscomp/test/div_by_zero_test.ml\", line 19, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Caml_int64.mod_([ - 0, - 3 - ], Caml_int64.zero); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Caml_int64.mod_([ + 0, + 3 + ], Caml_int64.zero); + }) + }; + }) ]); function div(x, y) { diff --git a/jscomp/test/dist/jscomp/test/dollar_escape_test.js b/jscomp/test/dist/jscomp/test/dollar_escape_test.js index e94bfa20f..9014cbb26 100644 --- a/jscomp/test/dist/jscomp/test/dollar_escape_test.js +++ b/jscomp/test/dist/jscomp/test/dollar_escape_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/earger_curry_test.js b/jscomp/test/dist/jscomp/test/earger_curry_test.js index 10a971671..aebde5072 100644 --- a/jscomp/test/dist/jscomp/test/earger_curry_test.js +++ b/jscomp/test/dist/jscomp/test/earger_curry_test.js @@ -49,14 +49,14 @@ function fold_left(f, x, a) { function f2(param) { const arr = init(30000000, (function (i) { - return i; - })); + return i; + })); const b = map((function (i) { - return i + i - 1; - }), arr); + return i + i - 1; + }), arr); const v = fold_left((function (prim0, prim1) { - return prim0 + prim1; - }), 0, b); + return prim0 + prim1; + }), 0, b); console.log(Stdlib.string_of_float(v)); } @@ -76,12 +76,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/epsilon_test.js b/jscomp/test/dist/jscomp/test/epsilon_test.js index 1cbfcf424..baec59030 100644 --- a/jscomp/test/dist/jscomp/test/epsilon_test.js +++ b/jscomp/test/dist/jscomp/test/epsilon_test.js @@ -10,24 +10,24 @@ const v = (Number.EPSILON?Number.EPSILON:2.220446049250313e-16 const suites_0 = [ "epsilon", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib.epsilon_float, - _1: v - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib.epsilon_float, + _1: v + }; + }) ]; const suites_1 = { hd: [ "raw_epsilon", (function (param) { - return { - TAG: /* Eq */0, - _0: 2.220446049250313e-16, - _1: v - }; - }) + return { + TAG: /* Eq */0, + _0: 2.220446049250313e-16, + _1: v + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/exception_raise_test.js b/jscomp/test/dist/jscomp/test/exception_raise_test.js index 74f448090..8cff4539a 100644 --- a/jscomp/test/dist/jscomp/test/exception_raise_test.js +++ b/jscomp/test/dist/jscomp/test/exception_raise_test.js @@ -141,43 +141,43 @@ const suites = { hd: [ "File \"jscomp/test/exception_raise_test.ml\", line 114, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - f, - ff, - fff, - a0 - ], - _1: [ - 2, - 2, - 2, - 2 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: [ + f, + ff, + fff, + a0 + ], + _1: [ + 2, + 2, + 2, + 2 + ] + }; + }) ], tl: { hd: [ "File \"jscomp/test/exception_raise_test.ml\", line 116, characters 4-11", (function (param) { - if (a1.MEL_EXN_ID === Js__Js_exn.$$Error) { - return { - TAG: /* Eq */0, - _0: a1._1, - _1: 2 - }; - } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/exception_raise_test.ml", - 119, - 15 - ] - }); - }) + if (a1.MEL_EXN_ID === Js__Js_exn.$$Error) { + return { + TAG: /* Eq */0, + _0: a1._1, + _1: 2 + }; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/exception_raise_test.ml", + 119, + 15 + ] + }); + }) ], tl: /* [] */0 } 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 098316b5c..fc4be66cb 100644 --- a/jscomp/test/dist/jscomp/test/exception_rebound_err_test.js +++ b/jscomp/test/dist/jscomp/test/exception_rebound_err_test.js @@ -21,12 +21,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/exception_repr_test.js b/jscomp/test/dist/jscomp/test/exception_repr_test.js index a96cc31ee..14ae2b33d 100644 --- a/jscomp/test/dist/jscomp/test/exception_repr_test.js +++ b/jscomp/test/dist/jscomp/test/exception_repr_test.js @@ -22,12 +22,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/ext_array_test.js b/jscomp/test/dist/jscomp/test/ext_array_test.js index 7b2db5420..f380202ee 100644 --- a/jscomp/test/dist/jscomp/test/ext_array_test.js +++ b/jscomp/test/dist/jscomp/test/ext_array_test.js @@ -113,8 +113,8 @@ function range(from, to_) { }); } return Stdlib__Array.init((to_ - from | 0) + 1 | 0, (function (i) { - return i + from | 0; - })); + return i + from | 0; + })); } function map2i(f, a, b) { @@ -126,8 +126,8 @@ function map2i(f, a, b) { }); } return Stdlib__Array.mapi((function (i, a) { - return Curry._3(f, i, a, b[i]); - }), a); + return Curry._3(f, i, a, b[i]); + }), a); } function tolist_aux(a, f, _i, _res) { diff --git a/jscomp/test/dist/jscomp/test/ext_bytes_test.js b/jscomp/test/dist/jscomp/test/ext_bytes_test.js index 7651e3044..594d22f1a 100644 --- a/jscomp/test/dist/jscomp/test/ext_bytes_test.js +++ b/jscomp/test/dist/jscomp/test/ext_bytes_test.js @@ -171,16 +171,16 @@ const f = Stdlib__Char.chr; const a$2 = Caml_bytes.bytes_to_string(Stdlib__Bytes.init(100, f)); const b = Stdlib__Bytes.init(100, (function (i) { - return /* '\000' */0; - })); + return /* '\000' */0; + })); 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")); const s = Stdlib__Bytes.init(50000, (function (i) { - return Stdlib__Char.chr(i % 137); - })); + return Stdlib__Char.chr(i % 137); + })); const s1 = Stdlib__Bytes.to_string(s); diff --git a/jscomp/test/dist/jscomp/test/ext_filename_test.js b/jscomp/test/dist/jscomp/test/ext_filename_test.js index 94d5a34af..030beb536 100644 --- a/jscomp/test/dist/jscomp/test/ext_filename_test.js +++ b/jscomp/test/dist/jscomp/test/ext_filename_test.js @@ -27,8 +27,8 @@ const node_current = "."; const cwd = { LAZY_DONE: false, VAL: (function () { - return Caml_sys.caml_sys_getcwd(undefined); - }) + return Caml_sys.caml_sys_getcwd(undefined); + }) }; function path_as_directory(x) { @@ -131,8 +131,8 @@ function relative_path(file_or_dir_1, file_or_dir_2) { continue; } return Stdlib.$at(Stdlib__List.map((function (param) { - return node_parent; - }), dir2), dir1); + return node_parent; + }), dir2), dir1); }; }; const ys = go(dir1, dir2); @@ -232,9 +232,9 @@ function find_package_json_dir(cwd) { const package_dir = { LAZY_DONE: false, VAL: (function () { - const cwd$1 = CamlinternalLazy.force(cwd); - return find_root_filename(cwd$1, Test_literals.bsconfig_json); - }) + const cwd$1 = CamlinternalLazy.force(cwd); + return find_root_filename(cwd$1, Test_literals.bsconfig_json); + }) }; function module_name_of_file(file) { @@ -308,8 +308,8 @@ function rel_normalized_absolute_path(from, to_) { const xs = xss.tl; if (!yss) { return 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__Filename.concat(acc, Ext_string_test.parent_dir_lit); + }), Ext_string_test.parent_dir_lit, xs); } if (xss.hd === yss.hd) { _yss = yss.tl; @@ -317,8 +317,8 @@ function rel_normalized_absolute_path(from, to_) { continue; } const 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__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); }; } @@ -391,8 +391,8 @@ let simple_convert_node_path_to_os_path; if (Stdlib__Sys.unix) { simple_convert_node_path_to_os_path = (function (x) { - return x; - }); + return x; + }); } else if (Stdlib__Sys.win32 || false) { simple_convert_node_path_to_os_path = Ext_string_test.replace_slash_backward; } else { diff --git a/jscomp/test/dist/jscomp/test/ext_list_test.js b/jscomp/test/dist/jscomp/test/ext_list_test.js index aabfa8ff9..0378df9fc 100644 --- a/jscomp/test/dist/jscomp/test/ext_list_test.js +++ b/jscomp/test/dist/jscomp/test/ext_list_test.js @@ -618,8 +618,8 @@ function for_all_opt(p, _param) { function fold(f, l, init) { return Stdlib__List.fold_left((function (acc, i) { - return Curry._2(f, i, init); - }), init, l); + return Curry._2(f, i, init); + }), init, l); } function rev_map_acc(acc, f, l) { @@ -744,8 +744,8 @@ function reduce_from_right(fn, lst) { const match = Stdlib__List.rev(lst); if (match) { return Stdlib__List.fold_left((function (x, y) { - return Curry._2(fn, y, x); - }), match.hd, match.tl); + return Curry._2(fn, y, x); + }), match.hd, match.tl); } throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", diff --git a/jscomp/test/dist/jscomp/test/ext_pervasives_test.js b/jscomp/test/dist/jscomp/test/ext_pervasives_test.js index 2c44775cc..6980d027e 100644 --- a/jscomp/test/dist/jscomp/test/ext_pervasives_test.js +++ b/jscomp/test/dist/jscomp/test/ext_pervasives_test.js @@ -28,11 +28,11 @@ 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) { - const fmt = Stdlib__Format.formatter_of_out_channel(chan); - const v = Curry._1(f, fmt); - Stdlib__Format.pp_print_flush(fmt, undefined); - return v; - })); + const fmt = Stdlib__Format.formatter_of_out_channel(chan); + const v = Curry._1(f, fmt); + Stdlib__Format.pp_print_flush(fmt, undefined); + return v; + })); } function is_pos_pow(n) { @@ -70,12 +70,12 @@ function is_pos_pow(n) { function failwithf(loc, fmt) { return Stdlib__Format.ksprintf((function (s) { - const s$1 = loc + s; - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: s$1 - }); - }), fmt); + const s$1 = loc + s; + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: s$1 + }); + }), fmt); } function invalid_argf(fmt) { @@ -84,11 +84,11 @@ function invalid_argf(fmt) { function bad_argf(fmt) { return Stdlib__Format.ksprintf((function (x) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, - _1: x - }); - }), fmt); + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { + MEL_EXN_ID: Stdlib__Arg.Bad, + _1: x + }); + }), fmt); } function hash_variant(s) { diff --git a/jscomp/test/dist/jscomp/test/ext_string_test.js b/jscomp/test/dist/jscomp/test/ext_string_test.js index 050a8c87f..ef103ec70 100644 --- a/jscomp/test/dist/jscomp/test/ext_string_test.js +++ b/jscomp/test/dist/jscomp/test/ext_string_test.js @@ -56,24 +56,24 @@ function trim(s) { let i = 0; const j = s.length; while((function () { - let tmp = false; - if (i < j) { - const u = s.charCodeAt(i); - tmp = u === /* '\t' */9 || u === /* '\n' */10 || u === /* ' ' */32; - } - return tmp; - })()) { + let tmp = false; + if (i < j) { + const u = s.charCodeAt(i); + tmp = u === /* '\t' */9 || u === /* '\n' */10 || u === /* ' ' */32; + } + return tmp; + })()) { i = i + 1 | 0; }; let k = j - 1 | 0; while((function () { - let tmp = false; - if (k >= i) { - const u = s.charCodeAt(k); - tmp = u === /* '\t' */9 || u === /* '\n' */10 || u === /* ' ' */32; - } - return tmp; - })()) { + let tmp = false; + if (k >= i) { + const u = s.charCodeAt(k); + tmp = u === /* '\t' */9 || u === /* '\n' */10 || u === /* ' ' */32; + } + return tmp; + })()) { k = k - 1 | 0; }; return Stdlib__String.sub(s, i, (k - i | 0) + 1 | 0); @@ -84,19 +84,19 @@ function split(keep_empty, str, on) { return /* [] */0; } else { return split_by(keep_empty, (function (x) { - return x === on; - }), str); + return x === on; + }), str); } } function quick_split_by_ws(str) { return split_by(false, (function (x) { - if (x === /* '\t' */9 || x === /* '\n' */10) { - return true; - } else { - return x === /* ' ' */32; - } - }), str); + if (x === /* '\t' */9 || x === /* '\n' */10) { + return true; + } else { + return x === /* ' ' */32; + } + }), str); } function starts_with(s, beg) { @@ -149,8 +149,8 @@ function ends_with_then_chop(s, beg) { function check_any_suffix_case(s, suffixes) { return Stdlib__List.exists((function (x) { - return ends_with(s, x); - }), suffixes); + return ends_with(s, x); + }), suffixes); } function check_any_suffix_case_then_chop(s, suffixes) { @@ -401,12 +401,12 @@ function unsafe_concat_with_length(len, sep, l) { contents: hd_len }; Stdlib__List.iter((function (s) { - const 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); - pos.contents = pos.contents + s_len | 0; - }), l.tl); + const 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); + pos.contents = pos.contents + s_len | 0; + }), l.tl); return Caml_bytes.bytes_to_string(r); } @@ -461,18 +461,18 @@ function is_valid_module_file(s) { return false; } return unsafe_for_all_range(s, 1, len - 1 | 0, (function (x) { - if (x >= 65) { - if (x > 96 || x < 91) { - return x < 123; - } else { - return x === 95; - } - } else if (x >= 48) { - return x < 58; + if (x >= 65) { + if (x > 96 || x < 91) { + return x < 123; } else { - return x === 39; + return x === 95; } - })); + } else if (x >= 48) { + return x < 58; + } else { + return x === 39; + } + })); } function is_valid_npm_package_name(s) { @@ -493,18 +493,18 @@ function is_valid_npm_package_name(s) { return false; } return unsafe_for_all_range(s, 1, len - 1 | 0, (function (x) { - if (x >= 58) { - if (x >= 97) { - return x < 123; - } else { - return x === 95; - } - } else if (x !== 45) { - return x >= 48; + if (x >= 58) { + if (x >= 97) { + return x < 123; } else { - return true; + return x === 95; } - })); + } else if (x !== 45) { + return x >= 48; + } else { + return true; + } + })); } function is_valid_source_name(name) { @@ -585,12 +585,12 @@ function replace_slash_backward(x) { return x; } else { return Stdlib__String.map((function (x) { - if (x !== 47) { - return x; - } else { - return /* '\\' */92; - } - }), x); + if (x !== 47) { + return x; + } else { + return /* '\\' */92; + } + }), x); } } @@ -600,12 +600,12 @@ function replace_backward_slash(x) { return x; } else { return Stdlib__String.map((function (x) { - if (x !== 92) { - return x; - } else { - return /* '/' */47; - } - }), x); + if (x !== 92) { + return x; + } else { + return /* '/' */47; + } + }), x); } } diff --git a/jscomp/test/dist/jscomp/test/extensible_variant_test.js b/jscomp/test/dist/jscomp/test/extensible_variant_test.js index dd436b128..55bd2429e 100644 --- a/jscomp/test/dist/jscomp/test/extensible_variant_test.js +++ b/jscomp/test/dist/jscomp/test/extensible_variant_test.js @@ -38,46 +38,46 @@ function to_int(x) { const suites_0 = [ "test_int", (function (param) { + return { + TAG: /* Eq */0, + _0: 3, + _1: to_int({ + MEL_EXN_ID: Int, + _1: 3, + _2: 0 + }) + }; + }) +]; + +const suites_1 = { + hd: [ + "test_int2", + (function (param) { return { TAG: /* Eq */0, - _0: 3, + _0: 0, _1: to_int({ - MEL_EXN_ID: Int, + MEL_EXN_ID: Int$1, _1: 3, _2: 0 }) }; }) -]; - -const suites_1 = { - hd: [ - "test_int2", - (function (param) { + ], + tl: { + hd: [ + "test_string", + (function (param) { return { TAG: /* Eq */0, - _0: 0, + _0: -1, _1: to_int({ - MEL_EXN_ID: Int$1, - _1: 3, - _2: 0 + MEL_EXN_ID: Str, + _1: "x" }) }; }) - ], - tl: { - hd: [ - "test_string", - (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: to_int({ - MEL_EXN_ID: Str, - _1: "x" - }) - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/ffi_arity_test.js b/jscomp/test/dist/jscomp/test/ffi_arity_test.js index d0b23611d..e4e0502b9 100644 --- a/jscomp/test/dist/jscomp/test/ffi_arity_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_arity_test.js @@ -72,46 +72,46 @@ Mt.from_pair_suites("Ffi_arity_test", { hd: [ "File \"jscomp/test/ffi_arity_test.ml\", line 45, characters 4-11", (function (param) { + return { + TAG: /* Eq */0, + _0: v, + _1: [ + 0, + 1, + 4 + ] + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/ffi_arity_test.ml\", line 46, characters 4-11", + (function (param) { return { TAG: /* Eq */0, - _0: v, + _0: vv, _1: [ - 0, 1, - 4 + 3, + 5 ] }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/ffi_arity_test.ml\", line 46, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/ffi_arity_test.ml\", line 47, characters 4-11", + (function (param) { return { TAG: /* Eq */0, - _0: vv, + _0: hh, _1: [ 1, - 3, - 5 + 2, + 3 ] }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/ffi_arity_test.ml\", line 47, characters 4-11", - (function (param) { - return { - TAG: /* Eq */0, - _0: hh, - _1: [ - 1, - 2, - 3 - ] - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/ffi_array_test.js b/jscomp/test/dist/jscomp/test/ffi_array_test.js index 2e38398ea..4510ff4df 100644 --- a/jscomp/test/dist/jscomp/test/ffi_array_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_array_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/ffi_js_test.js b/jscomp/test/dist/jscomp/test/ffi_js_test.js index d68cce5a2..cb61e311c 100644 --- a/jscomp/test/dist/jscomp/test/ffi_js_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_js_test.js @@ -29,12 +29,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -84,8 +84,8 @@ const same_type = [ const v_obj = { hi: (function () { - console.log("hei"); - }) + console.log("hei"); + }) }; eq("File \"jscomp/test/ffi_js_test.ml\", line 44, characters 5-12", [ @@ -113,9 +113,9 @@ const u = { }; const side_effect_config = (u.contents = u.contents + 1 | 0, { - hi: 3, - low: 32 - }); + hi: 3, + low: 32 +}); eq("File \"jscomp/test/ffi_js_test.ml\", line 54, characters 5-12", [ u.contents, diff --git a/jscomp/test/dist/jscomp/test/ffi_splice_test.js b/jscomp/test/dist/jscomp/test/ffi_splice_test.js index 99d0e2ea4..0f53cbf3f 100644 --- a/jscomp/test/dist/jscomp/test/ffi_splice_test.js +++ b/jscomp/test/dist/jscomp/test/ffi_splice_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/flexible_array_test.js b/jscomp/test/dist/jscomp/test/flexible_array_test.js index 0abd368ed..a544e6353 100644 --- a/jscomp/test/dist/jscomp/test/flexible_array_test.js +++ b/jscomp/test/dist/jscomp/test/flexible_array_test.js @@ -273,11 +273,11 @@ function sort(s) { } const head = get(s, 0); const larger = sort(filter_from(1, (function (x) { - return Caml_obj.caml_greaterthan(x, head); - }), s)); + return Caml_obj.caml_greaterthan(x, head); + }), s)); const smaller = sort(filter_from(1, (function (x) { - return Caml_obj.caml_lessequal(x, head); - }), s)); + return Caml_obj.caml_lessequal(x, head); + }), s)); return append(smaller, push_front(larger, head)); } @@ -340,12 +340,12 @@ if (!Caml_obj.caml_equal(x, of_array([ } const v = Stdlib__Array.init(500, (function (i) { - return 500 - i | 0; - })); + return 500 - i | 0; + })); const y = Stdlib__Array.init(500, (function (i) { - return i + 1 | 0; - })); + return i + 1 | 0; + })); const x$1 = sort(of_array(v)); 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 bafa82707..7dc8b5c0e 100644 --- a/jscomp/test/dist/jscomp/test/float_of_bits_test.js +++ b/jscomp/test/dist/jscomp/test/float_of_bits_test.js @@ -28,15 +28,40 @@ const int32_pairs = [ function from_pairs(pair) { return Stdlib__List.concat(Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const f = param[1]; - const i32 = param[0]; - return { + const f = param[1]; + const i32 = param[0]; + return { + hd: [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "int32_float_of_bits ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "int32_float_of_bits %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_float.caml_int32_float_of_bits(i32), + _1: f + }; + }) + ], + tl: { hd: [ Curry._1(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "int32_float_of_bits ", + _0: "int32_bits_of_float ", _1: { TAG: /* Int */4, _0: /* Int_d */0, @@ -45,68 +70,43 @@ function from_pairs(pair) { _3: /* End_of_format */0 } }, - _1: "int32_float_of_bits %d" + _1: "int32_bits_of_float %d" }), i), (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_float.caml_int32_float_of_bits(i32), - _1: f - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_float.caml_int32_bits_of_float(f), + _1: i32 + }; + }) ], - tl: { - hd: [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "int32_bits_of_float ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "int32_bits_of_float %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_float.caml_int32_bits_of_float(f), - _1: i32 - }; - }) - ], - tl: /* [] */0 - } - }; - }), int32_pairs))); + tl: /* [] */0 + } + }; + }), int32_pairs))); } const suites = Stdlib.$at({ hd: [ "one", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.bits_of_float(1.0), - _1: one_float - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.bits_of_float(1.0), + _1: one_float + }; + }) ], tl: { hd: [ "two", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.float_of_bits(one_float), - _1: 1.0 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.float_of_bits(one_float), + _1: 1.0 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/float_test.js b/jscomp/test/dist/jscomp/test/float_test.js index 99d9513bb..abf531fac 100644 --- a/jscomp/test/dist/jscomp/test/float_test.js +++ b/jscomp/test/dist/jscomp/test/float_test.js @@ -126,33 +126,33 @@ const results = Stdlib__Array.append([ function from_pairs(ps) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "pair ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "pair %d" - }), i), - (function (param) { - return { - TAG: /* Approx */5, - _0: a, - _1: b - }; - }) - ]; - }), ps)); + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "pair ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "pair %d" + }), i), + (function (param) { + return { + TAG: /* Approx */5, + _0: a, + _1: b + }; + }) + ]; + }), ps)); } const float_compare = Caml.caml_float_compare; @@ -213,16 +213,16 @@ 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 63, characters 5-12", Stdlib__Array.map((function (x) { - if (x > 0) { - return 1; - } else if (x < 0) { - return -1; - } else { - return 0; - } - }), Stdlib__Array.map((function (param) { - return Caml.caml_float_compare(param[0], param[1]); - }), [ + if (x > 0) { + return 1; + } else if (x < 0) { + return -1; + } else { + return 0; + } + }), Stdlib__Array.map((function (param) { + return Caml.caml_float_compare(param[0], param[1]); + }), [ [ 1, 3 @@ -351,45 +351,45 @@ Mt.from_pair_suites("Float_test", Stdlib.$at({ hd: [ "mod_float", (function (param) { - return { - TAG: /* Approx */5, - _0: 3.2 % 0.5, - _1: 0.200000000000000178 - }; - }) + return { + TAG: /* Approx */5, + _0: 3.2 % 0.5, + _1: 0.200000000000000178 + }; + }) ], tl: { hd: [ "modf_float1", (function (param) { - return { - TAG: /* Approx */5, - _0: a, - _1: 0.299999999999997158 - }; - }) + return { + TAG: /* Approx */5, + _0: a, + _1: 0.299999999999997158 + }; + }) ], tl: { hd: [ "modf_float2", (function (param) { - return { - TAG: /* Approx */5, - _0: b, - _1: 32 - }; - }) + return { + TAG: /* Approx */5, + _0: b, + _1: 32 + }; + }) ], tl: { hd: [ "int_of_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: 3 + }; + }) ], tl: /* [] */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 439ee0f60..ea0180c56 100644 --- a/jscomp/test/dist/jscomp/test/flow_parser_reg_test.js +++ b/jscomp/test/dist/jscomp/test/flow_parser_reg_test.js @@ -2145,11 +2145,11 @@ function start(str) { contents: /* [] */0 }; Stdlib__String.iter((function (c) { - todo.contents = { - hd: c, - tl: todo.contents - }; - }), str); + todo.contents = { + hd: c, + tl: todo.contents + }; + }), str); return { negative: false, mantissa: 0, @@ -2511,8 +2511,8 @@ const keywords = Stdlib__Hashtbl.create(undefined, 53); const type_keywords = Stdlib__Hashtbl.create(undefined, 53); Stdlib__List.iter((function (param) { - Stdlib__Hashtbl.add(keywords, param[0], param[1]); - }), { + Stdlib__Hashtbl.add(keywords, param[0], param[1]); + }), { hd: [ "function", /* T_FUNCTION */13 @@ -2815,8 +2815,8 @@ Stdlib__List.iter((function (param) { }); Stdlib__List.iter((function (param) { - Stdlib__Hashtbl.add(type_keywords, param[0], param[1]); - }), { + Stdlib__Hashtbl.add(type_keywords, param[0], param[1]); + }), { hd: [ "static", /* T_STATIC */40 @@ -3456,8 +3456,8 @@ function jsx_text(env, mode, buf, raw, lexbuf) { Stdlib__Buffer.add_string(raw, s); const code = Caml_format.caml_int_of_string("0x" + n); Stdlib__List.iter((function (param) { - return Stdlib__Buffer.add_char(buf, param); - }), utf16to8(code)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code)); return jsx_text(env, mode, buf, raw, lexbuf); case 4 : const n$1 = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, lexbuf.lex_curr_pos - 1 | 0); @@ -3465,8 +3465,8 @@ function jsx_text(env, mode, buf, raw, lexbuf) { Stdlib__Buffer.add_string(raw, s$1); const 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 Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$1)); return jsx_text(env, mode, buf, raw, lexbuf); case 5 : const entity = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 1 | 0, lexbuf.lex_curr_pos - 1 | 0); @@ -4238,8 +4238,8 @@ function jsx_text(env, mode, buf, raw, lexbuf) { } if (code$2 !== undefined) { Stdlib__List.iter((function (param) { - return Stdlib__Buffer.add_char(buf, param); - }), utf16to8(code$2)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$2)); } else { Stdlib__Buffer.add_string(buf, "&" + (entity + ";")); } @@ -4709,8 +4709,8 @@ function string_escape(env, buf, lexbuf) { const b = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 2 | 0); const 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)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code)); return [ env, false @@ -4722,13 +4722,13 @@ function string_escape(env, buf, lexbuf) { const 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)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$1)); } else { const 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)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$2)); Stdlib__Buffer.add_char(buf, c); } return [ @@ -4740,8 +4740,8 @@ function string_escape(env, buf, lexbuf) { const b$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 1 | 0); const 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)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$3)); return [ env, true @@ -4792,8 +4792,8 @@ function string_escape(env, buf, lexbuf) { const a$3 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); const code$4 = oct_to_int(a$3); Stdlib__List.iter((function (param) { - return Stdlib__Buffer.add_char(buf, param); - }), utf16to8(code$4)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$4)); return [ env, true @@ -4805,8 +4805,8 @@ function string_escape(env, buf, lexbuf) { const d = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos + 4 | 0); const 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)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$5)); return [ env, false @@ -4819,8 +4819,8 @@ function string_escape(env, buf, lexbuf) { _0: "ILLEGAL" }) : env; Stdlib__List.iter((function (param) { - return Stdlib__Buffer.add_char(buf, param); - }), utf16to8(code$6)); + return Stdlib__Buffer.add_char(buf, param); + }), utf16to8(code$6)); return [ env$1, false @@ -5780,11 +5780,11 @@ function error_at(env, param) { function comment_list(env) { return function (param) { return Stdlib__List.iter((function (c) { - env.comments.contents = { - hd: c, - tl: env.comments.contents - }; - }), param); + env.comments.contents = { + hd: c, + tl: env.comments.contents + }; + }), param); }; } @@ -5892,8 +5892,8 @@ function with_error_callback(error_callback, env) { function error_list(env) { return function (param) { return Stdlib__List.iter((function (param) { - return error_at(env, param); - }), param); + return error_at(env, param); + }), param); }; } @@ -6130,11 +6130,11 @@ function error_unexpected(env) { function error_on_decorators(env) { return function (param) { return Stdlib__List.iter((function (decorator) { - error_at(env, [ - decorator[0], - /* UnsupportedDecorator */57 - ]); - }), param); + error_at(env, [ + decorator[0], + /* UnsupportedDecorator */57 + ]); + }), param); }; } @@ -6273,8 +6273,8 @@ function save_state(env) { last: /* Nil */0 }; env.token_sink.contents = (function (token_data) { - Stdlib__Queue.add(token_data, buffer); - }); + Stdlib__Queue.add(token_data, buffer); + }); token_buffer = [ orig_token_sink, buffer @@ -6768,23 +6768,23 @@ function mem$2(x, _param) { function filter_duplicate_errors(errs) { const errs$1 = Stdlib__List.rev(errs); const match = Stdlib__List.fold_left((function (param, err) { - const deduped = param[1]; - const set = param[0]; - if (Curry._2(mem$2, err, set)) { - return [ - set, - deduped - ]; - } else { - return [ - Curry._2(add$3, err, set), - { - hd: err, - tl: deduped - } - ]; - } - }), [ + const deduped = param[1]; + const set = param[0]; + if (Curry._2(mem$2, err, set)) { + return [ + set, + deduped + ]; + } else { + return [ + Curry._2(add$3, err, set), + { + hd: err, + tl: deduped + } + ]; + } + }), [ /* Empty */0, /* [] */0 ], errs$1); @@ -6796,9 +6796,9 @@ function with_loc(fn, env) { const result = Curry._1(fn, env); const loc = env.last_loc.contents; const 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)); + TAG: /* Assertion */0, + _0: "did not consume any tokens" + }), Curry._2(Parser_env_Peek.loc, undefined, env)); return [ btwn(start_loc, end_loc), result @@ -8474,18 +8474,18 @@ function $$const(env) { const match$1 = match[0]; const variable = match$1[1]; const errs = Stdlib__List.fold_left((function (errs, decl) { - if (decl[1].init !== undefined) { - return errs; - } else { - return { - hd: [ - decl[0], - /* NoUninitializedConst */42 - ], - tl: errs - }; - } - }), match[1], variable.declarations); + if (decl[1].init !== undefined) { + return errs; + } else { + return { + hd: [ + decl[0], + /* NoUninitializedConst */42 + ], + tl: errs + }; + } + }), match[1], variable.declarations); return [ [ match$1[0], @@ -8814,8 +8814,8 @@ function left_hand_side(env) { let exit = 0; if (/* tag */(typeof match === "number" || typeof match === "string") && match === /* T_NEW */42) { expr = _new(env, (function (new_expr, _args) { - return new_expr; - })); + return new_expr; + })); } else { exit = 1; } @@ -9242,29 +9242,29 @@ function primary$1(env) { pop_lex_mode(env); const filtered_flags = Stdlib__Buffer.create(raw_flags.length); Stdlib__String.iter((function (c) { - if (c >= 110) { - if (c !== 121) { - return; - } else { - return Stdlib__Buffer.add_char(filtered_flags, c); - } - } - if (c < 103) { + if (c >= 110) { + if (c !== 121) { return; + } else { + return Stdlib__Buffer.add_char(filtered_flags, c); } - switch (c) { - case 104 : - case 106 : - case 107 : - case 108 : - return; - case 103 : - case 105 : - case 109 : - return Stdlib__Buffer.add_char(filtered_flags, c); - - } - }), raw_flags); + } + if (c < 103) { + return; + } + switch (c) { + case 104 : + case 106 : + case 107 : + case 108 : + return; + case 103 : + case 105 : + case 109 : + return Stdlib__Buffer.add_char(filtered_flags, c); + + } + }), raw_flags); const flags = Stdlib__Buffer.contents(filtered_flags); if (flags !== raw_flags) { error$1(env, { @@ -10438,26 +10438,26 @@ function try_arrow_function(env) { token$4(env$2, /* T_ARROW */10); const env$3 = without_error_callback(env$2); const match$2 = with_loc((function (param) { - let generator = false; - const env = with_in_function(true, param); - const match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */(typeof match === "number" || typeof match === "string") && match === /* T_LCURLY */1) { - const match$1 = function_body(env, async, generator); - return [ - match$1[1], - match$1[2] - ]; - } - const env$1 = enter_function(env, async, generator); - const expr = Curry._1(Parse.assignment, env$1); + let generator = false; + const env = with_in_function(true, param); + const match = Curry._2(Parser_env_Peek.token, undefined, env); + if (/* tag */(typeof match === "number" || typeof match === "string") && match === /* T_LCURLY */1) { + const match$1 = function_body(env, async, generator); return [ - { - TAG: /* BodyExpression */1, - _0: expr - }, - env$1.in_strict_mode + match$1[1], + match$1[2] ]; - }), env$3); + } + const env$1 = enter_function(env, async, generator); + const expr = Curry._1(Parse.assignment, env$1); + return [ + { + TAG: /* BodyExpression */1, + _0: expr + }, + env$1.in_strict_mode + ]; + }), env$3); const match$3 = match$2[1]; const body = match$3[0]; const simple = is_simple_function_params(params, defaults, rest); @@ -12019,8 +12019,8 @@ function declare_export_declaration(allow_export_typeOpt, env) { const end_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_RCURLY */2); const 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); + return error_at(env$1, param); + }), match$6[1]), undefined); const loc$5 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); const end_loc$3 = loc$5 !== undefined ? loc$5 : ( source$2 !== undefined ? source$2[0] : end_loc$2 @@ -12424,24 +12424,24 @@ function fold(acc) { switch (match.TAG) { case /* Object */0 : return Stdlib__List.fold_left((function (acc, prop) { - if (prop.TAG === /* Property */0) { - return fold(acc)(prop._0[1].pattern); - } else { - return fold(acc)(prop._0[1].argument); - } - }), acc, match._0.properties); + if (prop.TAG === /* Property */0) { + return fold(acc)(prop._0[1].pattern); + } else { + return fold(acc)(prop._0[1].argument); + } + }), acc, match._0.properties); case /* Array */1 : return Stdlib__List.fold_left((function (acc, elem) { - if (elem !== undefined) { - if (elem.TAG === /* Element */0) { - return fold(acc)(elem._0); - } else { - return fold(acc)(elem._0[1].argument); - } + if (elem !== undefined) { + if (elem.TAG === /* Element */0) { + return fold(acc)(elem._0); } else { - return acc; + return fold(acc)(elem._0[1].argument); } - }), acc, match._0.elements); + } else { + return acc; + } + }), acc, match._0.elements); case /* Assignment */2 : return fold(acc)(match._0.left); case /* Identifier */3 : @@ -12591,8 +12591,8 @@ function var_or_const(env) { const end_loc$1 = end_loc !== undefined ? end_loc : start_loc; semicolon(env); Stdlib__List.iter((function (param) { - return error_at(env, param); - }), match[1]); + return error_at(env, param); + }), match[1]); return [ btwn(start_loc, end_loc$1), match$1[1] @@ -12780,57 +12780,57 @@ function from_expr(env, param) { expr._0 ]; const properties = Stdlib__List.map((function (param) { - if (param.TAG === /* Property */0) { - const match = param._0; - const match$1 = match[1]; - const key = match$1.key; - let key$1; - switch (key.TAG) { - case /* Literal */0 : - key$1 = { - TAG: /* Literal */0, - _0: key._0 - }; - break; - case /* Identifier */1 : - key$1 = { - TAG: /* Identifier */1, - _0: key._0 - }; - break; - case /* Computed */2 : - key$1 = { - TAG: /* Computed */2, - _0: key._0 - }; - break; - - } - const pattern = Curry._2(Parse.pattern_from_expr, env, match$1.value); - return { - TAG: /* Property */0, - _0: [ - match[0], - { - key: key$1, - pattern: pattern, - shorthand: match$1.shorthand - } - ] - }; + if (param.TAG === /* Property */0) { + const match = param._0; + const match$1 = match[1]; + const key = match$1.key; + let key$1; + switch (key.TAG) { + case /* Literal */0 : + key$1 = { + TAG: /* Literal */0, + _0: key._0 + }; + break; + case /* Identifier */1 : + key$1 = { + TAG: /* Identifier */1, + _0: key._0 + }; + break; + case /* Computed */2 : + key$1 = { + TAG: /* Computed */2, + _0: key._0 + }; + break; + } - const match$2 = param._0; - const argument = Curry._2(Parse.pattern_from_expr, env, match$2[1].argument); + const pattern = Curry._2(Parse.pattern_from_expr, env, match$1.value); return { - TAG: /* SpreadProperty */1, + TAG: /* Property */0, _0: [ - match$2[0], + match[0], { - argument: argument + key: key$1, + pattern: pattern, + shorthand: match$1.shorthand } ] }; - }), param$2[1].properties); + } + const match$2 = param._0; + const argument = Curry._2(Parse.pattern_from_expr, env, match$2[1].argument); + return { + TAG: /* SpreadProperty */1, + _0: [ + match$2[0], + { + argument: argument + } + ] + }; + }), param$2[1].properties); return [ param$2[0], { @@ -13893,8 +13893,8 @@ function module_item(env) { const end_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env$1); token$4(env$1, /* T_RCURLY */2); const 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); + return error_at(env$1, param); + }), match$7[1]), undefined); const loc$3 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env$1); const end_loc$5 = loc$3 !== undefined ? loc$3 : ( source$3 !== undefined ? source$3[0] : end_loc$4 @@ -13945,13 +13945,13 @@ function module_item(env) { break; case /* VariableDeclaration */19 : names = Stdlib__List.fold_left((function (names, param) { - const id = param[1].id; - let param$1 = { - hd: id, - tl: /* [] */0 - }; - return Stdlib__List.fold_left(fold, names, param$1); - }), /* [] */0, match$8._0.declarations); + const id = param[1].id; + let param$1 = { + hd: id, + tl: /* [] */0 + }; + return Stdlib__List.fold_left(fold, names, param$1); + }), /* [] */0, match$8._0.declarations); break; case /* ClassDeclaration */20 : const id$1 = match$8._0.id; @@ -13978,8 +13978,8 @@ function module_item(env) { }); } Stdlib__List.iter((function (param) { - return record_export(env$1, param); - }), names); + return record_export(env$1, param); + }), names); const declaration = { TAG: /* Declaration */0, _0: stmt @@ -14223,20 +14223,20 @@ function statement_list_item(decoratorsOpt, env) { token$4(env, /* T_LPAREN */3); const match$1 = helper(with_no_let(true, env), /* [] */0, /* [] */0); const head = Stdlib__List.map((function (param) { - const match = param[1]; - return { - id: match.id, - init: match.init - }; - }), match$1[1]); + const match = param[1]; + return { + id: match.id, + init: match.init + }; + }), match$1[1]); token$4(env, /* T_RPAREN */4); const body = Curry._1(Parse.statement, env); const end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); const end_loc$1 = end_loc !== undefined ? end_loc : match$1[0]; semicolon(env); Stdlib__List.iter((function (param) { - return error_at(env, param); - }), match$1[2]); + return error_at(env, param); + }), match$1[2]); return [ btwn(start_loc, end_loc$1), { @@ -14260,8 +14260,8 @@ function statement_list_item(decoratorsOpt, env) { const 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); - }), match$2[2]); + return error_at(env, param); + }), match$2[2]); return [ btwn(start_loc, end_loc$3), declaration @@ -14426,9 +14426,9 @@ function statement(env) { } const end_loc$3 = finalizer !== undefined ? finalizer[0] : ( handler !== undefined ? handler[0] : (error_at(env, [ - block[0], - /* NoCatchOrFinally */20 - ]), block[0]) + block[0], + /* NoCatchOrFinally */20 + ]), block[0]) ); return [ btwn(start_loc$3, end_loc$3), @@ -14726,8 +14726,8 @@ function statement(env) { } } Stdlib__List.iter((function (param) { - return error_at(env, param); - }), match$5[1]); + return error_at(env, param); + }), match$5[1]); token$4(env, /* T_SEMICOLON */7); const match$10 = Curry._2(Parser_env_Peek.token, undefined, env); let test$2; @@ -14974,23 +14974,23 @@ function directives(env, term_fn, item_fn) { ]); const env$1 = match[0]; Stdlib__List.iter((function (param) { - const token = param[1]; - if (!/* tag */(typeof token === "number" || typeof token === "string") && token.TAG === /* T_STRING */1) { - if (token._0[3]) { - return strict_error_at(env$1, [ - param[0], - /* StrictOctalLiteral */31 - ]); - } else { - return; - } + const token = param[1]; + if (!/* tag */(typeof token === "number" || typeof token === "string") && token.TAG === /* T_STRING */1) { + if (token._0[3]) { + return strict_error_at(env$1, [ + param[0], + /* StrictOctalLiteral */31 + ]); + } else { + return; } - const s = "Nooo: " + (token_to_string(token) + "\n"); - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: s - }); - }), Stdlib__List.rev(match[1])); + } + const s = "Nooo: " + (token_to_string(token) + "\n"); + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: s + }); + }), Stdlib__List.rev(match[1])); return [ env$1, match[2] @@ -15020,16 +15020,16 @@ const class_declaration$1 = class_declaration; function statement_list_with_directives(term_fn, env) { const match = Curry._3(directives, env, term_fn, (function (eta) { - return statement_list_item(undefined, eta); - })); + return statement_list_item(undefined, eta); + })); const env$1 = match[0]; const stmts = Curry._2(statement_list$1, term_fn, env$1); const stmts$1 = Stdlib__List.fold_left((function (acc, stmt) { - return { - hd: stmt, - tl: acc - }; - }), stmts, match[1]); + return { + hd: stmt, + tl: acc + }; + }), stmts, match[1]); return [ stmts$1, env$1.in_strict_mode @@ -15094,17 +15094,17 @@ function module_body_with_directives(env, term_fn) { const match = Curry._3(directives, env, term_fn, module_item); const stmts = Curry._2(module_body, term_fn, match[0]); return Stdlib__List.fold_left((function (acc, stmt) { - return { - hd: stmt, - tl: acc - }; - }), stmts, match[1]); + return { + hd: stmt, + tl: acc + }; + }), stmts, match[1]); } function program(env) { const stmts = module_body_with_directives(env, (function (param) { - return false; - })); + return false; + })); const end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); token$4(env, /* T_EOF */105); const loc = stmts ? btwn(Stdlib__List.hd(stmts)[0], Stdlib__List.hd(Stdlib__List.rev(stmts))[0]) : end_loc; @@ -15688,8 +15688,8 @@ function parse(content, options) { return node("ArrayExpression", loc, [[ "elements", array_of_list((function (param) { - return option(expression_or_spread, param); - }), arr._0.elements) + return option(expression_or_spread, param); + }), arr._0.elements) ]]); case /* Object */1 : return node("ObjectExpression", loc, [[ @@ -15718,8 +15718,8 @@ function parse(content, options) { [ "defaults", array_of_list((function (param) { - return option(expression, param); - }), arrow.defaults) + return option(expression, param); + }), arrow.defaults) ], [ "rest", @@ -16278,8 +16278,8 @@ function parse(content, options) { [ "elements", array_of_list((function (param) { - return option(array_pattern_element, param); - }), arr.elements) + return option(array_pattern_element, param); + }), arr.elements) ], [ "typeAnnotation", @@ -16713,8 +16713,8 @@ function parse(content, options) { [ "defaults", array_of_list((function (param) { - return option(expression, param); - }), _function.defaults) + return option(expression, param); + }), _function.defaults) ], [ "rest", @@ -17132,8 +17132,8 @@ function parse(content, options) { [ "defaults", array_of_list((function (param) { - return option(expression, param); - }), fn.defaults) + return option(expression, param); + }), fn.defaults) ], [ "rest", @@ -17338,37 +17338,37 @@ function parse(content, options) { case /* ImportDeclaration */29 : const $$import = b._0; const specifiers = Stdlib__List.map((function (id) { - switch (id.TAG) { - case /* ImportNamedSpecifier */0 : - const match = id._0; - let local_id = match.local; - let remote_id = match.remote; - const span_loc = local_id !== undefined ? btwn(remote_id[0], local_id[0]) : remote_id[0]; - return node("ImportSpecifier", span_loc, [ - [ - "id", - identifier(remote_id) - ], - [ - "name", - option(identifier, local_id) - ] - ]); - case /* ImportDefaultSpecifier */1 : - let id$1 = id._0; - return node("ImportDefaultSpecifier", id$1[0], [[ - "id", - identifier(id$1) - ]]); - case /* ImportNamespaceSpecifier */2 : - let param = id._0; - return node("ImportNamespaceSpecifier", param[0], [[ - "id", - identifier(param[1]) - ]]); - - } - }), $$import.specifiers); + switch (id.TAG) { + case /* ImportNamedSpecifier */0 : + const match = id._0; + let local_id = match.local; + let remote_id = match.remote; + const span_loc = local_id !== undefined ? btwn(remote_id[0], local_id[0]) : remote_id[0]; + return node("ImportSpecifier", span_loc, [ + [ + "id", + identifier(remote_id) + ], + [ + "name", + option(identifier, local_id) + ] + ]); + case /* ImportDefaultSpecifier */1 : + let id$1 = id._0; + return node("ImportDefaultSpecifier", id$1[0], [[ + "id", + identifier(id$1) + ]]); + case /* ImportNamespaceSpecifier */2 : + let param = id._0; + return node("ImportNamespaceSpecifier", param[0], [[ + "id", + identifier(param[1]) + ]]); + + } + }), $$import.specifiers); const match$5 = $$import.importKind; let import_kind; switch (match$5) { @@ -17827,12 +17827,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/for_loop_test.js b/jscomp/test/dist/jscomp/test/for_loop_test.js index e715e7dcf..7f0f6a8ac 100644 --- a/jscomp/test/dist/jscomp/test/for_loop_test.js +++ b/jscomp/test/dist/jscomp/test/for_loop_test.js @@ -11,19 +11,19 @@ function for_3(x) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); for (let i = 0 ,i_finish = x.length; i < i_finish; ++i) { const j = (i << 1); Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + j | 0; - })); + v.contents = v.contents + j | 0; + })); } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } @@ -32,20 +32,20 @@ function for_4(x) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); for (let i = 0 ,i_finish = x.length; i < i_finish; ++i) { const j = (i << 1); const k = (j << 1); Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + k | 0; - })); + v.contents = v.contents + k | 0; + })); } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } @@ -54,19 +54,19 @@ function for_5(x, u) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); for (let i = 0 ,i_finish = x.length; i < i_finish; ++i) { const k = Math.imul((u << 1), u); Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + k | 0; - })); + v.contents = v.contents + k | 0; + })); } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } @@ -75,10 +75,10 @@ function for_6(x, u) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); const v4 = { contents: 0 }; @@ -97,14 +97,14 @@ function for_6(x, u) { const h = (v5.contents << 1); v2.contents = v2.contents + 1 | 0; Caml_array.set(arr, i, (function (param) { - v.contents = (((((v.contents + k | 0) + v2.contents | 0) + v4.contents | 0) + v5.contents | 0) + h | 0) + u | 0; - })); + v.contents = (((((v.contents + k | 0) + v2.contents | 0) + v4.contents | 0) + v5.contents | 0) + h | 0) + u | 0; + })); } inspect_3 = v2.contents; } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return [ v.contents, v4.contents, @@ -118,18 +118,18 @@ function for_7(param) { contents: 0 }; const arr = Caml_array.make(21, (function (param) { - - })); + + })); for (let i = 0; i <= 6; ++i) { for (let j = 0; j <= 2; ++j) { Caml_array.set(arr, Math.imul(i, 3) + j | 0, (function (param) { - v.contents = (v.contents + i | 0) + j | 0; - })); + v.contents = (v.contents + i | 0) + j | 0; + })); } } Stdlib__Array.iter((function (f) { - Curry._1(f, undefined); - }), arr); + Curry._1(f, undefined); + }), arr); return v.contents; } @@ -138,20 +138,20 @@ function for_8(param) { contents: 0 }; const arr = Caml_array.make(21, (function (param) { - - })); + + })); for (let i = 0; i <= 6; ++i) { const k = (i << 1); for (let j = 0; j <= 2; ++j) { const h = i + j | 0; Caml_array.set(arr, Math.imul(i, 3) + j | 0, (function (param) { - v.contents = (((v.contents + i | 0) + j | 0) + h | 0) + k | 0; - })); + v.contents = (((v.contents + i | 0) + j | 0) + h | 0) + k | 0; + })); } } Stdlib__Array.iter((function (f) { - Curry._1(f, undefined); - }), arr); + Curry._1(f, undefined); + }), arr); return v.contents; } @@ -172,11 +172,11 @@ function for_9(param) { contents: 0 }; const arr = Caml_array.make(4, (function (param) { - - })); + + })); const arr2 = Caml_array.make(2, (function (param) { - - })); + + })); for (let i = 0; i <= 1; ++i) { const v$1 = { contents: 0 @@ -186,19 +186,19 @@ function for_9(param) { v$1.contents = v$1.contents + 1 | 0; collect(v$1.contents); Caml_array.set(arr, (i << 1) + j | 0, (function (param) { - vv.contents = vv.contents + v$1.contents | 0; - })); + vv.contents = vv.contents + v$1.contents | 0; + })); } Caml_array.set(arr2, i, (function (param) { - vv2.contents = vv2.contents + v$1.contents | 0; - })); + vv2.contents = vv2.contents + v$1.contents | 0; + })); } Stdlib__Array.iter((function (f) { - Curry._1(f, undefined); - }), arr); + Curry._1(f, undefined); + }), arr); Stdlib__Array.iter((function (f) { - Curry._1(f, undefined); - }), arr2); + Curry._1(f, undefined); + }), arr2); return [[ vv.contents, Stdlib__Array.of_list(Stdlib__List.rev(v.contents)), @@ -209,93 +209,93 @@ function for_9(param) { const suites_0 = [ "for_loop_test_3", (function (param) { - return { - TAG: /* Eq */0, - _0: 90, - _1: for_3(Caml_array.make(10, 2)) - }; - }) + return { + TAG: /* Eq */0, + _0: 90, + _1: for_3(Caml_array.make(10, 2)) + }; + }) ]; const suites_1 = { hd: [ "for_loop_test_4", (function (param) { - return { - TAG: /* Eq */0, - _0: 180, - _1: for_4(Caml_array.make(10, 2)) - }; - }) + return { + TAG: /* Eq */0, + _0: 180, + _1: for_4(Caml_array.make(10, 2)) + }; + }) ], tl: { hd: [ "for_loop_test_5", (function (param) { - return { - TAG: /* Eq */0, - _0: 2420, - _1: for_5(Caml_array.make(10, 2), 11) - }; - }) + return { + TAG: /* Eq */0, + _0: 2420, + _1: for_5(Caml_array.make(10, 2), 11) + }; + }) ], tl: { hd: [ "for_loop_test_6", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 30, - 1, - 2, - 3 - ], - _1: for_6(Caml_array.make(3, 0), 0) - }; - }) + return { + TAG: /* Eq */0, + _0: [ + 30, + 1, + 2, + 3 + ], + _1: for_6(Caml_array.make(3, 0), 0) + }; + }) ], tl: { hd: [ "for_loop_test_7", (function (param) { - return { - TAG: /* Eq */0, - _0: 84, - _1: for_7(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 84, + _1: for_7(undefined) + }; + }) ], tl: { hd: [ "for_loop_test_8", (function (param) { - return { - TAG: /* Eq */0, - _0: 294, - _1: for_8(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 294, + _1: for_8(undefined) + }; + }) ], tl: { hd: [ "for_loop_test_9", (function (param) { - return { - TAG: /* Eq */0, - _0: [[ - 10, - [ - 1, - 2, - 2, - 3 - ], - 5 - ]], - _1: for_9(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: [[ + 10, + [ + 1, + 2, + 2, + 3 + ], + 5 + ]], + _1: for_9(undefined) + }; + }) ], tl: /* [] */0 } 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 f9126e4ab..6a5faddc5 100644 --- a/jscomp/test/dist/jscomp/test/for_side_effect_test.js +++ b/jscomp/test/dist/jscomp/test/for_side_effect_test.js @@ -22,12 +22,12 @@ function test2(param) { const suites_0 = [ "for_order", (function (param) { - return { - TAG: /* Eq */0, - _0: 10, - _1: test2(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 10, + _1: test2(undefined) + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/format_test.js b/jscomp/test/dist/jscomp/test/format_test.js index a2a85c525..39118a1cf 100644 --- a/jscomp/test/dist/jscomp/test/format_test.js +++ b/jscomp/test/dist/jscomp/test/format_test.js @@ -25,12 +25,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -140,8 +140,8 @@ eq("File \"jscomp/test/format_test.ml\", line 71, characters 5-12", (1 + 65535 / function f(loc, ls) { Stdlib__List.iter((function (param) { - eq(loc, Caml_format.caml_float_of_string(param[0]), param[1]); - }), ls); + eq(loc, Caml_format.caml_float_of_string(param[0]), param[1]); + }), ls); } f("File \"jscomp/test/format_test.ml\", line 82, characters 6-13", { @@ -183,8 +183,8 @@ function sl(f) { function aux_list(loc, ls) { Stdlib__List.iter((function (param) { - eq(loc, sl(param[0]), param[1]); - }), ls); + eq(loc, sl(param[0]), param[1]); + }), ls); } const literals_0 = [ @@ -279,8 +279,8 @@ function scan_float(loc, s, expect) { }, _1: "%h" }), (function (result) { - eq(loc, result, expect); - })); + eq(loc, result, expect); + })); } scan_float("File \"jscomp/test/format_test.ml\", line 120, characters 13-20", "0x3f.p1", 126); @@ -288,8 +288,8 @@ scan_float("File \"jscomp/test/format_test.ml\", line 120, characters 13-20", "0 scan_float("File \"jscomp/test/format_test.ml\", line 121, characters 13-20", "0x1.3333333333333p-2", 0.3); Stdlib__List.iter((function (param) { - scan_float("File \"jscomp/test/format_test.ml\", line 123, characters 13-20", param[1], param[0]); - }), literals); + scan_float("File \"jscomp/test/format_test.ml\", line 123, characters 13-20", param[1], param[0]); + }), literals); const f1 = - -9.9; diff --git a/jscomp/test/dist/jscomp/test/fs_test.js b/jscomp/test/dist/jscomp/test/fs_test.js index 878e7cd8d..3261cd97e 100644 --- a/jscomp/test/dist/jscomp/test/fs_test.js +++ b/jscomp/test/dist/jscomp/test/fs_test.js @@ -21,12 +21,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/functor_app_test.js b/jscomp/test/dist/jscomp/test/functor_app_test.js index b66adf8d0..1845bb279 100644 --- a/jscomp/test/dist/jscomp/test/functor_app_test.js +++ b/jscomp/test/dist/jscomp/test/functor_app_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/functors.js b/jscomp/test/dist/jscomp/test/functors.js index c675334cc..31dcb77e8 100644 --- a/jscomp/test/dist/jscomp/test/functors.js +++ b/jscomp/test/dist/jscomp/test/functors.js @@ -49,13 +49,13 @@ function F2(X, Y) { const M = { F: (function (funarg, funarg$1) { - const sheep = function (x) { - return 1 + Curry._1(funarg$1.foo, Curry._1(funarg.foo, x)) | 0; - }; - return { - sheep: sheep - }; - }) + const sheep = function (x) { + return 1 + Curry._1(funarg$1.foo, Curry._1(funarg.foo, x)) | 0; + }; + return { + sheep: sheep + }; + }) }; exports.O = O; 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 3ded761d3..95e256cba 100644 --- a/jscomp/test/dist/jscomp/test/global_exception_regression_test.js +++ b/jscomp/test/dist/jscomp/test/global_exception_regression_test.js @@ -19,24 +19,24 @@ const s = { const suites_0 = [ "not_found_equal", (function (param) { - return { - TAG: /* Eq */0, - _0: u, - _1: v - }; - }) + return { + TAG: /* Eq */0, + _0: u, + _1: v + }; + }) ]; const suites_1 = { hd: [ "not_found_not_equal_end_of_file", (function (param) { - return { - TAG: /* Neq */1, - _0: u, - _1: s - }; - }) + return { + TAG: /* Neq */1, + _0: u, + _1: s + }; + }) ], tl: /* [] */0 }; 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 2a8e708f4..1b80e03d5 100644 --- a/jscomp/test/dist/jscomp/test/global_module_alias_test.js +++ b/jscomp/test/dist/jscomp/test/global_module_alias_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/google_closure_test.js b/jscomp/test/dist/jscomp/test/google_closure_test.js index 80f5a170c..c5930f23f 100644 --- a/jscomp/test/dist/jscomp/test/google_closure_test.js +++ b/jscomp/test/dist/jscomp/test/google_closure_test.js @@ -8,23 +8,23 @@ Mt.from_pair_suites("Closure", { hd: [ "partial", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - Test_google_closure.a, - Test_google_closure.b, - Test_google_closure.c - ], - _1: [ - "3", - 101, - [ - 1, - 2 - ] + return { + TAG: /* Eq */0, + _0: [ + Test_google_closure.a, + Test_google_closure.b, + Test_google_closure.c + ], + _1: [ + "3", + 101, + [ + 1, + 2 ] - }; - }) + ] + }; + }) ], tl: /* [] */0 }); diff --git a/jscomp/test/dist/jscomp/test/gpr496_test.js b/jscomp/test/dist/jscomp/test/gpr496_test.js index 9c352ad1a..302a5881c 100644 --- a/jscomp/test/dist/jscomp/test/gpr496_test.js +++ b/jscomp/test/dist/jscomp/test/gpr496_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1154_test.js b/jscomp/test/dist/jscomp/test/gpr_1154_test.js index 357a9b07a..960399820 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1154_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1154_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1285_test.js b/jscomp/test/dist/jscomp/test/gpr_1285_test.js index e1e63f4c4..7e8271463 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1285_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1285_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -50,20 +50,20 @@ function step1(param) { const $$class = CamlinternalOO.create_table(["step2"]); const step2 = CamlinternalOO.get_method_label($$class, "step2"); CamlinternalOO.set_method($$class, step2, (function (self$1) { - if (!object_tables$1.key) { - const $$class = CamlinternalOO.create_table(["step3"]); - const step3 = CamlinternalOO.get_method_label($$class, "step3"); - CamlinternalOO.set_method($$class, step3, (function (self$2) { - return 33; - })); - const env_init = function (env) { - return CamlinternalOO.create_object_opt(undefined, $$class); - }; - CamlinternalOO.init_class($$class); - object_tables$1.key = env_init; - } - return Curry._1(object_tables$1.key, undefined); - })); + if (!object_tables$1.key) { + const $$class = CamlinternalOO.create_table(["step3"]); + const step3 = CamlinternalOO.get_method_label($$class, "step3"); + CamlinternalOO.set_method($$class, step3, (function (self$2) { + return 33; + })); + const env_init = function (env) { + return CamlinternalOO.create_object_opt(undefined, $$class); + }; + CamlinternalOO.init_class($$class); + object_tables$1.key = env_init; + } + return Curry._1(object_tables$1.key, undefined); + })); const env_init = function (env) { return CamlinternalOO.create_object_opt(undefined, $$class); }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1409_test.js b/jscomp/test/dist/jscomp/test/gpr_1409_test.js index f93581710..654cf2a89 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1409_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1409_test.js @@ -21,12 +21,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -47,8 +47,8 @@ function map(f, x) { function make(foo) { const partial_arg = map((function (prim) { - return String(prim); - }), foo); + return String(prim); + }), foo); return function (param) { let tmp = {}; if (partial_arg !== undefined) { 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 d32e9cef3..fe5953623 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1423_app_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1423_app_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1501_test.js b/jscomp/test/dist/jscomp/test/gpr_1501_test.js index 2b6c2e318..4bd4e31c8 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1501_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1501_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1503_test.js b/jscomp/test/dist/jscomp/test/gpr_1503_test.js index d628c0432..71813ca13 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1503_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1503_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1539_test.js b/jscomp/test/dist/jscomp/test/gpr_1539_test.js index d702242e1..bb083405f 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1539_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1539_test.js @@ -23,8 +23,8 @@ Caml_module.update_mod({ ]] }, Point, { add: (function (prim0, prim1) { - return prim0.add(prim1); - }) + return prim0.add(prim1); + }) }); let CRS; diff --git a/jscomp/test/dist/jscomp/test/gpr_1600_test.js b/jscomp/test/dist/jscomp/test/gpr_1600_test.js index 5891aabd1..caf805d17 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1600_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1600_test.js @@ -4,27 +4,27 @@ const obj = { hi: (function (x) { - console.log(x); - }) + console.log(x); + }) }; const eventObj = { events: [], empty: (function () { - - }), + + }), push: (function (a) { - let self = this; - self.events[0] = a; - }), + let self = this; + self.events[0] = a; + }), needRebuild: (function () { - let self = this; - return self.events.length !== 0; - }), + let self = this; + return self.events.length !== 0; + }), currentEvents: (function () { - let self = this; - return self.events; - }) + let self = this; + return self.events; + }) }; function f(param) { diff --git a/jscomp/test/dist/jscomp/test/gpr_1658_test.js b/jscomp/test/dist/jscomp/test/gpr_1658_test.js index 6444c979b..9a74e2190 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1658_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1658_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1667_test.js b/jscomp/test/dist/jscomp/test/gpr_1667_test.js index 8d746c2cd..429116d2d 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1667_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1667_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1716_test.js b/jscomp/test/dist/jscomp/test/gpr_1716_test.js index 53ec688ae..c4f281b1a 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1716_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1716_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1728_test.js b/jscomp/test/dist/jscomp/test/gpr_1728_test.js index f9cb43b5c..7d4ce2c73 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1728_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1728_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1749_test.js b/jscomp/test/dist/jscomp/test/gpr_1749_test.js index 7fedd3842..172001f28 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1749_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1749_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1760_test.js b/jscomp/test/dist/jscomp/test/gpr_1760_test.js index 854b3ad41..37a6849b4 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1760_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1760_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1762_test.js b/jscomp/test/dist/jscomp/test/gpr_1762_test.js index 470a8d437..c143fd9cc 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1762_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1762_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1817_test.js b/jscomp/test/dist/jscomp/test/gpr_1817_test.js index 109400ad6..720c77ef6 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1817_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1817_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1822_test.js b/jscomp/test/dist/jscomp/test/gpr_1822_test.js index fd57c136b..8ddb0cde9 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1822_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1822_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_1943_test.js b/jscomp/test/dist/jscomp/test/gpr_1943_test.js index 355c447e9..e4a431306 100644 --- a/jscomp/test/dist/jscomp/test/gpr_1943_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_1943_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_2250_test.js b/jscomp/test/dist/jscomp/test/gpr_2250_test.js index b908af4da..abf1ce5bc 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2250_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2250_test.js @@ -20,12 +20,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -54,13 +54,13 @@ function create(param) { CamlinternalOO.set_methods($$class, [ add, (function (self$1, param) { - self$1[data] = self$1[data] + 1 | 0; - return self$1; - }), + self$1[data] = self$1[data] + 1 | 0; + return self$1; + }), get, (function (self$1, param) { - return self$1[data]; - }) + return self$1[data]; + }) ]); const env_init = function (env) { const self = CamlinternalOO.create_object_opt(undefined, $$class); diff --git a/jscomp/test/dist/jscomp/test/gpr_2316_test.js b/jscomp/test/dist/jscomp/test/gpr_2316_test.js index 64ee8cf1e..ead32373a 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2316_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2316_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_2487.js b/jscomp/test/dist/jscomp/test/gpr_2487.js index 916f36997..61fb5161e 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2487.js +++ b/jscomp/test/dist/jscomp/test/gpr_2487.js @@ -12,8 +12,8 @@ const b = Belt__Belt_Array.eq([ 2, 3 ], (function (prim0, prim1) { - return prim0 === prim1; - })); + return prim0 === prim1; + })); exports.b = b; /* b Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/gpr_2608_test.js b/jscomp/test/dist/jscomp/test/gpr_2608_test.js index 6f7ec9893..2adbedf86 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2608_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2608_test.js @@ -25,8 +25,8 @@ let huntGrootCondition = false; if (Stdlib__List.length(/* [] */0) > 0) { const x = Stdlib__List.filter((function (h) { - return Stdlib__List.hd(/* [] */0) <= 1000; - }), oppHeroes); + return Stdlib__List.hd(/* [] */0) <= 1000; + }), oppHeroes); huntGrootCondition = Stdlib__List.length(x) === 0; } @@ -34,8 +34,8 @@ let huntGrootCondition2 = true; if (Stdlib__List.length(/* [] */0) < 0) { const x$1 = Stdlib__List.filter((function (h) { - return Stdlib__List.hd(/* [] */0) <= 1000; - }), oppHeroes); + return Stdlib__List.hd(/* [] */0) <= 1000; + }), oppHeroes); huntGrootCondition2 = Stdlib__List.length(x$1) === 0; } diff --git a/jscomp/test/dist/jscomp/test/gpr_2682_test.js b/jscomp/test/dist/jscomp/test/gpr_2682_test.js index 3330eba23..5974631d2 100644 --- a/jscomp/test/dist/jscomp/test/gpr_2682_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_2682_test.js @@ -34,15 +34,15 @@ const N = { forIn({ x: 3 }, (function (x) { - console.log(x); - })); + console.log(x); + })); forIn({ x: 3, y: 3 }, (function (x) { - console.log(x); - })); + console.log(x); + })); const f3 = (()=>true ); diff --git a/jscomp/test/dist/jscomp/test/gpr_3536_test.js b/jscomp/test/dist/jscomp/test/gpr_3536_test.js index 007c67034..1c2911b6b 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3536_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3536_test.js @@ -25,12 +25,12 @@ function xx(obj, a0, a1, a2, a3, a4, a5) { eq("File \"jscomp/test/gpr_3536_test.ml\", line 29, characters 12-19", 5, 5); eq("File \"jscomp/test/gpr_3536_test.ml\", line 32, characters 6-13", xx(3, (function (prim0, prim1) { - return prim0 - prim1 | 0; - }), 2, (function (prim0, prim1) { - return prim0 + prim1 | 0; - }), 4, (function (prim0, prim1) { - return Math.imul(prim0, prim1); - }), 3), 11); + return prim0 - prim1 | 0; + }), 2, (function (prim0, prim1) { + return prim0 + prim1 | 0; + }), 4, (function (prim0, prim1) { + return Math.imul(prim0, prim1); + }), 3), 11); Mt.from_pair_suites("Gpr_3536_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/gpr_3697_test.js b/jscomp/test/dist/jscomp/test/gpr_3697_test.js index e5fcb2722..eef040ec2 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3697_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3697_test.js @@ -9,8 +9,8 @@ function fix(param) { _0: { LAZY_DONE: false, VAL: (function () { - return fix(undefined); - }) + return fix(undefined); + }) } }; } diff --git a/jscomp/test/dist/jscomp/test/gpr_3875_test.js b/jscomp/test/dist/jscomp/test/gpr_3875_test.js index 33db12a28..098175d90 100644 --- a/jscomp/test/dist/jscomp/test/gpr_3875_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_3875_test.js @@ -60,8 +60,8 @@ function eq(loc, x, y) { } compilerBug("x", undefined, true, (function (param) { - return true; - })); + return true; + })); eq("File \"jscomp/test/gpr_3875_test.ml\", line 34, characters 5-12", result.contents, "Some x, f returns true"); diff --git a/jscomp/test/dist/jscomp/test/gpr_4274_test.js b/jscomp/test/dist/jscomp/test/gpr_4274_test.js index 3b4b3eaf7..d858f6b96 100644 --- a/jscomp/test/dist/jscomp/test/gpr_4274_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_4274_test.js @@ -9,8 +9,8 @@ const N = {}; function f(X, xs) { X.forEach(xs, { i: (function (x) { - console.log(x.x); - }) + console.log(x.x); + }) }); } @@ -20,8 +20,8 @@ Belt__Belt_List.forEachU({ }, tl: /* [] */0 }, (function (x) { - console.log(x.x); - })); + console.log(x.x); + })); const Foo = {}; @@ -30,8 +30,8 @@ const bar = [{ }]; Belt__Belt_Array.mapU(bar, (function (b) { - return b.foo; - })); + return b.foo; + })); exports.N = N; exports.f = f; diff --git a/jscomp/test/dist/jscomp/test/gpr_459_test.js b/jscomp/test/dist/jscomp/test/gpr_459_test.js index 24df3925e..b7fcff587 100644 --- a/jscomp/test/dist/jscomp/test/gpr_459_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_459_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_627_test.js b/jscomp/test/dist/jscomp/test/gpr_627_test.js index c74f363a3..5bfafa8bf 100644 --- a/jscomp/test/dist/jscomp/test/gpr_627_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_627_test.js @@ -19,12 +19,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -32,25 +32,25 @@ function eq(loc, param) { const u = { say: (function (x, y) { - return x + y | 0; - }) + return x + y | 0; + }) }; const v = { hi: (function (x, y) { - let self = this; - const u = { - x: x - }; - return self.say(u.x) + y + x; - }), + let self = this; + const u = { + x: x + }; + return self.say(u.x) + y + x; + }), say: (function (x) { - let self = this; - return x * self.x(); - }), + let self = this; + return x * self.x(); + }), x: (function () { - return 3; - }) + return 3; + }) }; const p_1 = u.say(1, 2); 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 9d4efe9a1..cde8f6078 100644 --- a/jscomp/test/dist/jscomp/test/gpr_858_unit2_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_858_unit2_test.js @@ -6,8 +6,8 @@ const Curry = require("melange.js/curry.js"); const delayed = { contents: (function (param) { - - }) + + }) }; for (let i = 1; i <= 2; ++i) { @@ -15,9 +15,9 @@ for (let i = 1; i <= 2; ++i) { if (j !== 0) { const prev = delayed.contents; delayed.contents = (function (param) { - Curry._1(prev, undefined); - f(((n + 1 | 0) + i | 0) - i | 0, j - 1 | 0); - }); + Curry._1(prev, undefined); + f(((n + 1 | 0) + i | 0) - i | 0, j - 1 | 0); + }); return; } if (i === n) { diff --git a/jscomp/test/dist/jscomp/test/gpr_904_test.js b/jscomp/test/dist/jscomp/test/gpr_904_test.js index a661731a0..b5286aca4 100644 --- a/jscomp/test/dist/jscomp/test/gpr_904_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_904_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/gpr_977_test.js b/jscomp/test/dist/jscomp/test/gpr_977_test.js index 227e4d3b7..93dee3595 100644 --- a/jscomp/test/dist/jscomp/test/gpr_977_test.js +++ b/jscomp/test/dist/jscomp/test/gpr_977_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/hamming_test.js b/jscomp/test/dist/jscomp/test/hamming_test.js index 72bd85d6e..d30af6d50 100644 --- a/jscomp/test/dist/jscomp/test/hamming_test.js +++ b/jscomp/test/dist/jscomp/test/hamming_test.js @@ -138,13 +138,13 @@ function map(f, l) { return { LAZY_DONE: false, VAL: (function () { - const match = CamlinternalLazy.force(l); - return { - TAG: /* Cons */0, - _0: Curry._1(f, match._0), - _1: map(f, match._1) - }; - }) + const match = CamlinternalLazy.force(l); + return { + TAG: /* Cons */0, + _0: Curry._1(f, match._0), + _1: map(f, match._1) + }; + }) }; } @@ -152,33 +152,33 @@ function merge(cmp, l1, l2) { return { LAZY_DONE: false, VAL: (function () { - const match = CamlinternalLazy.force(l1); - const match$1 = CamlinternalLazy.force(l2); - const ll2 = match$1._1; - const x2 = match$1._0; - const ll1 = match._1; - const x1 = match._0; - const c = Curry._2(cmp, x1, x2); - if (c === 0) { - return { - TAG: /* Cons */0, - _0: x1, - _1: merge(cmp, ll1, ll2) - }; - } else if (c < 0) { - return { - TAG: /* Cons */0, - _0: x1, - _1: merge(cmp, ll1, l2) - }; - } else { - return { - TAG: /* Cons */0, - _0: x2, - _1: merge(cmp, l1, ll2) - }; - } - }) + const match = CamlinternalLazy.force(l1); + const match$1 = CamlinternalLazy.force(l2); + const ll2 = match$1._1; + const x2 = match$1._0; + const ll1 = match._1; + const x1 = match._0; + const c = Curry._2(cmp, x1, x2); + if (c === 0) { + return { + TAG: /* Cons */0, + _0: x1, + _1: merge(cmp, ll1, ll2) + }; + } else if (c < 0) { + return { + TAG: /* Cons */0, + _0: x1, + _1: merge(cmp, ll1, l2) + }; + } else { + return { + TAG: /* Cons */0, + _0: x2, + _1: merge(cmp, l1, ll2) + }; + } + }) }; } @@ -207,33 +207,33 @@ function iter_interval(f, _l, _param) { const hamming = { LAZY_DONE: false, VAL: (function () { - return { - TAG: /* Cons */0, - _0: nn1, - _1: merge(cmp, ham2, merge(cmp, ham3, ham5)) - }; - }) + return { + TAG: /* Cons */0, + _0: nn1, + _1: merge(cmp, ham2, merge(cmp, ham3, ham5)) + }; + }) }; const ham2 = { LAZY_DONE: false, VAL: (function () { - return CamlinternalLazy.force(map(x2, hamming)); - }) + return CamlinternalLazy.force(map(x2, hamming)); + }) }; const ham3 = { LAZY_DONE: false, VAL: (function () { - return CamlinternalLazy.force(map(x3, hamming)); - }) + return CamlinternalLazy.force(map(x3, hamming)); + }) }; const ham5 = { LAZY_DONE: false, VAL: (function () { - return CamlinternalLazy.force(map(x5, hamming)); - }) + return CamlinternalLazy.force(map(x5, hamming)); + }) }; iter_interval(pr, hamming, [ @@ -245,12 +245,12 @@ Mt.from_pair_suites("Hamming_test", { hd: [ "output", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Buffer.contents(buf), - _1: "6726050156250000000000000000000000000\n6729216728661136606575523242669244416\n6730293634611118019721084375000000000\n6731430439413948088320000000000000000\n6733644878411293029785156250000000000\n6736815026358904613608094481682268160\n6739031236724077363200000000000000000\n6743282904874568941599068856042651648\n6744421903677486140423997176256921600\n6746640616477458432000000000000000000\n6750000000000000000000000000000000000\n6750897085400702945836103937453588480\n6752037370304563380023474956271616000\n6754258588364960445000000000000000000\n6755399441055744000000000000000000000\n6757621765136718750000000000000000000\n6758519863481752323552044362431792300\n6759661435938757375539248533340160000\n6761885162088395001166534423828125000\n6763027302973440000000000000000000000\n6765252136392518877983093261718750000\n6767294110289640371843415775641600000\n6768437164792816653010961694720000000\n6770663777894400000000000000000000000\n6774935403077748181101173538816000000\n6776079748261363229431903027200000000\n6778308875544000000000000000000000000\n6782585324034592562287109312160000000\n6783730961356018699387011072000000000\n6785962605658597412109375000000000000\n6789341568946838378906250000000000000\n6791390813820928754681118720000000000\n6794772480000000000000000000000000000\n6799059315411241693033267200000000000\n6800207735332289107722240000000000000\n6802444800000000000000000000000000000\n6806736475893120841673472000000000000\n6807886192552970708582400000000000000\n6810125783203125000000000000000000000\n6814422305043756994967597929687500000\n6815573319906622439424000000000000000\n6817815439391434192657470703125000000\n6821025214188390921278195662703296512\n6821210263296961784362792968750000000\n6823269127183128330240000000000000000\n6828727177473454717179297140960133120\n6830973624183426662400000000000000000\n6834375000000000000000000000000000000\n6835283298968211732659055236671758336\n6836437837433370422273768393225011200\n6838686820719522450562500000000000000\n6839841934068940800000000000000000000\n6842092037200927734375000000000000000\n6844157203887991842733489140006912000\n6845313241232438768082197309030400000\n6847565144260608000000000000000000000\n6849817788097425363957881927490234375\n6851885286668260876491458472837120000\n6853042629352726861173598715904000000\n6855297075118080000000000000000000000\n6859622095616220033364938208051200000\n6860780745114630269799801815040000000\n6863037736488300000000000000000000000\n6866455078125000000000000000000000000\n6867367640585024969315698178562000000\n6868527598372968933129348710400000000\n6870787138229329879760742187500000000\n6871947673600000000000000000000000000\n6874208338558673858642578125000000000\n6876283198993690364114632704000000000\n6879707136000000000000000000000000000\n6884047556853882214196183040000000000\n6885210332023942721568768000000000000\n6887475360000000000000000000000000000\n6891820681841784852194390400000000000\n6892984769959882842439680000000000000\n6895252355493164062500000000000000000\n6899602583856803957404692903808593750\n6900767986405455219916800000000000000\n6903038132383827120065689086914062500\n6906475391588173806667327880859375000\n6908559991272917434368000000000000000\n6912000000000000000000000000000000000\n6914086267191872901144038355222134784\n6916360794485719495680000000000000000\n6917529027641081856000000000000000000\n6919804687500000000000000000000000000\n6921893310401287552552190498140323840\n6924170405978516481194531250000000000\n6925339958244802560000000000000000000\n6927618187665939331054687500000000000\n6929709168936591740767657754256998400\n6930879656747844252683224775393280000\n6933159708563865600000000000000000000\n6937533852751614137447601703747584000\n6938705662219635946938268699852800000\n6940988288557056000000000000000000000\n6945367371811422783781999935651840000\n6946540504428563148172299337728000000\n6948825708194403750000000000000000000\n" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Buffer.contents(buf), + _1: "6726050156250000000000000000000000000\n6729216728661136606575523242669244416\n6730293634611118019721084375000000000\n6731430439413948088320000000000000000\n6733644878411293029785156250000000000\n6736815026358904613608094481682268160\n6739031236724077363200000000000000000\n6743282904874568941599068856042651648\n6744421903677486140423997176256921600\n6746640616477458432000000000000000000\n6750000000000000000000000000000000000\n6750897085400702945836103937453588480\n6752037370304563380023474956271616000\n6754258588364960445000000000000000000\n6755399441055744000000000000000000000\n6757621765136718750000000000000000000\n6758519863481752323552044362431792300\n6759661435938757375539248533340160000\n6761885162088395001166534423828125000\n6763027302973440000000000000000000000\n6765252136392518877983093261718750000\n6767294110289640371843415775641600000\n6768437164792816653010961694720000000\n6770663777894400000000000000000000000\n6774935403077748181101173538816000000\n6776079748261363229431903027200000000\n6778308875544000000000000000000000000\n6782585324034592562287109312160000000\n6783730961356018699387011072000000000\n6785962605658597412109375000000000000\n6789341568946838378906250000000000000\n6791390813820928754681118720000000000\n6794772480000000000000000000000000000\n6799059315411241693033267200000000000\n6800207735332289107722240000000000000\n6802444800000000000000000000000000000\n6806736475893120841673472000000000000\n6807886192552970708582400000000000000\n6810125783203125000000000000000000000\n6814422305043756994967597929687500000\n6815573319906622439424000000000000000\n6817815439391434192657470703125000000\n6821025214188390921278195662703296512\n6821210263296961784362792968750000000\n6823269127183128330240000000000000000\n6828727177473454717179297140960133120\n6830973624183426662400000000000000000\n6834375000000000000000000000000000000\n6835283298968211732659055236671758336\n6836437837433370422273768393225011200\n6838686820719522450562500000000000000\n6839841934068940800000000000000000000\n6842092037200927734375000000000000000\n6844157203887991842733489140006912000\n6845313241232438768082197309030400000\n6847565144260608000000000000000000000\n6849817788097425363957881927490234375\n6851885286668260876491458472837120000\n6853042629352726861173598715904000000\n6855297075118080000000000000000000000\n6859622095616220033364938208051200000\n6860780745114630269799801815040000000\n6863037736488300000000000000000000000\n6866455078125000000000000000000000000\n6867367640585024969315698178562000000\n6868527598372968933129348710400000000\n6870787138229329879760742187500000000\n6871947673600000000000000000000000000\n6874208338558673858642578125000000000\n6876283198993690364114632704000000000\n6879707136000000000000000000000000000\n6884047556853882214196183040000000000\n6885210332023942721568768000000000000\n6887475360000000000000000000000000000\n6891820681841784852194390400000000000\n6892984769959882842439680000000000000\n6895252355493164062500000000000000000\n6899602583856803957404692903808593750\n6900767986405455219916800000000000000\n6903038132383827120065689086914062500\n6906475391588173806667327880859375000\n6908559991272917434368000000000000000\n6912000000000000000000000000000000000\n6914086267191872901144038355222134784\n6916360794485719495680000000000000000\n6917529027641081856000000000000000000\n6919804687500000000000000000000000000\n6921893310401287552552190498140323840\n6924170405978516481194531250000000000\n6925339958244802560000000000000000000\n6927618187665939331054687500000000000\n6929709168936591740767657754256998400\n6930879656747844252683224775393280000\n6933159708563865600000000000000000000\n6937533852751614137447601703747584000\n6938705662219635946938268699852800000\n6940988288557056000000000000000000000\n6945367371811422783781999935651840000\n6946540504428563148172299337728000000\n6948825708194403750000000000000000000\n" + }; + }) ], tl: /* [] */0 }); diff --git a/jscomp/test/dist/jscomp/test/hash_test.js b/jscomp/test/dist/jscomp/test/hash_test.js index 5b7515f0a..0aaf1289c 100644 --- a/jscomp/test/dist/jscomp/test/hash_test.js +++ b/jscomp/test/dist/jscomp/test/hash_test.js @@ -24,9 +24,9 @@ function eq(f) { } const test_strings = Stdlib__Array.init(32, (function (i) { - const c = Stdlib__Char.chr(i); - return Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, c)); - })); + const c = Stdlib__Char.chr(i); + return Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, c)); + })); const test_strings_hash_results = [ 0, diff --git a/jscomp/test/dist/jscomp/test/hashtbl_test.js b/jscomp/test/dist/jscomp/test/hashtbl_test.js index db3b9c3cb..427335361 100644 --- a/jscomp/test/dist/jscomp/test/hashtbl_test.js +++ b/jscomp/test/dist/jscomp/test/hashtbl_test.js @@ -11,14 +11,14 @@ const Stdlib__MoreLabels = require("melange/moreLabels.js"); function to_list(tbl) { return Stdlib__Hashtbl.fold((function (k, v, acc) { - return { - hd: [ - k, - v - ], - tl: acc - }; - }), tbl, /* [] */0); + return { + hd: [ + k, + v + ], + tl: acc + }; + }), tbl, /* [] */0); } function f(param) { @@ -26,8 +26,8 @@ function f(param) { Stdlib__Hashtbl.add(tbl, 1, /* '1' */49); Stdlib__Hashtbl.add(tbl, 2, /* '2' */50); return Stdlib__List.sort((function (param, param$1) { - return Caml.caml_int_compare(param[0], param$1[0]); - }), to_list(tbl)); + return Caml.caml_int_compare(param[0], param$1[0]); + }), to_list(tbl)); } function g(count) { @@ -40,61 +40,61 @@ function g(count) { } const 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)); + return Caml.caml_int_compare(param[0], param$1[0]); + }), v)); } const suites_0 = [ "simple", (function (param) { - return { - TAG: /* Eq */0, - _0: { + return { + TAG: /* Eq */0, + _0: { + hd: [ + 1, + /* '1' */49 + ], + tl: { hd: [ - 1, - /* '1' */49 + 2, + /* '2' */50 ], - tl: { - hd: [ - 2, - /* '2' */50 - ], - tl: /* [] */0 - } - }, - _1: f(undefined) - }; - }) + tl: /* [] */0 + } + }, + _1: f(undefined) + }; + }) ]; const suites_1 = { hd: [ "more_iterations", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Array.init(1001, (function (i) { - return [ - (i << 1), - String(i) - ]; - })), - _1: g(1000) - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Array.init(1001, (function (i) { + return [ + (i << 1), + String(i) + ]; + })), + _1: g(1000) + }; + }) ], tl: { hd: [ "More_labels_regressionfix_374", (function (param) { - const tbl = Curry._2(Stdlib__MoreLabels.Hashtbl.create, undefined, 30); - Stdlib__Hashtbl.add(tbl, 3, 3); - return { - TAG: /* Eq */0, - _0: tbl.size, - _1: 1 - }; - }) + const tbl = Curry._2(Stdlib__MoreLabels.Hashtbl.create, undefined, 30); + Stdlib__Hashtbl.add(tbl, 3, 3); + return { + TAG: /* Eq */0, + _0: tbl.size, + _1: 1 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/if_used_test.js b/jscomp/test/dist/jscomp/test/if_used_test.js index 2a3d63885..6ad876151 100644 --- a/jscomp/test/dist/jscomp/test/if_used_test.js +++ b/jscomp/test/dist/jscomp/test/if_used_test.js @@ -17,12 +17,12 @@ function point_init($$class) { CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), move, (function (self$1, d) { - self$1[x] = self$1[x] + d | 0; - }) + self$1[x] = self$1[x] + d | 0; + }) ]); return function (env, self, x_init) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); diff --git a/jscomp/test/dist/jscomp/test/ignore_test.js b/jscomp/test/dist/jscomp/test/ignore_test.js index 343c42594..253ba0bdd 100644 --- a/jscomp/test/dist/jscomp/test/ignore_test.js +++ b/jscomp/test/dist/jscomp/test/ignore_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/imm_map_bench.js b/jscomp/test/dist/jscomp/test/imm_map_bench.js index 669cf3fd5..2bae94751 100644 --- a/jscomp/test/dist/jscomp/test/imm_map_bench.js +++ b/jscomp/test/dist/jscomp/test/imm_map_bench.js @@ -26,11 +26,11 @@ function should(b) { } const shuffledDataAdd = Belt__Belt_Array.makeByAndShuffle(1000001, (function (i) { - return [ - i, - i - ]; - })); + return [ + i, + i + ]; + })); function test(param) { const v = fromArray(shuffledDataAdd); diff --git a/jscomp/test/dist/jscomp/test/inline_map2_test.js b/jscomp/test/dist/jscomp/test/inline_map2_test.js index 80a829859..b4a49cb0a 100644 --- a/jscomp/test/dist/jscomp/test/inline_map2_test.js +++ b/jscomp/test/dist/jscomp/test/inline_map2_test.js @@ -1273,8 +1273,8 @@ const IntMap = { }; const m = Stdlib__List.fold_left((function (acc, param) { - return add(param[0], param[1], acc); - }), /* Empty */0, { + return add(param[0], param[1], acc); + }), /* Empty */0, { hd: [ 10, /* 'a' */97 @@ -1948,8 +1948,8 @@ const SMap = { }; const s = Stdlib__List.fold_left((function (acc, param) { - return add$1(param[0], param[1], acc); - }), /* Empty */0, { + return add$1(param[0], param[1], acc); + }), /* Empty */0, { hd: [ "10", /* 'a' */97 @@ -1979,23 +1979,23 @@ Mt.from_pair_suites("Inline_map2_test", { hd: [ "assertion1", (function (param) { - return { - TAG: /* Eq */0, - _0: find(10, m), - _1: /* 'a' */97 - }; - }) + return { + TAG: /* Eq */0, + _0: find(10, m), + _1: /* 'a' */97 + }; + }) ], tl: { hd: [ "assertion2", (function (param) { - return { - TAG: /* Eq */0, - _0: find$1("10", s), - _1: /* 'a' */97 - }; - }) + return { + TAG: /* Eq */0, + _0: find$1("10", s), + _1: /* 'a' */97 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/inline_map_test.js b/jscomp/test/dist/jscomp/test/inline_map_test.js index b4449c0b7..36f987e2c 100644 --- a/jscomp/test/dist/jscomp/test/inline_map_test.js +++ b/jscomp/test/dist/jscomp/test/inline_map_test.js @@ -137,8 +137,8 @@ function find(x, _param) { } const m = Stdlib__List.fold_left((function (acc, param) { - return add(param[0], param[1], acc); - }), /* Empty */0, { + return add(param[0], param[1], acc); + }), /* Empty */0, { hd: [ 10, /* 'a' */97 @@ -168,12 +168,12 @@ Mt.from_pair_suites("Inline_map_test", { hd: [ "find", (function (param) { - return { - TAG: /* Eq */0, - _0: find(10, m), - _1: /* 'a' */97 - }; - }) + return { + TAG: /* Eq */0, + _0: find(10, m), + _1: /* 'a' */97 + }; + }) ], tl: /* [] */0 }); diff --git a/jscomp/test/dist/jscomp/test/inline_record_test.js b/jscomp/test/dist/jscomp/test/inline_record_test.js index bf5cf8320..2f1f1fe8a 100644 --- a/jscomp/test/dist/jscomp/test/inline_record_test.js +++ b/jscomp/test/dist/jscomp/test/inline_record_test.js @@ -38,12 +38,12 @@ const v1 = { function f(x) { if (x.TAG === /* A0 */0) { return Stdlib__List.fold_left((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), x.lbl, x.more); + return prim0 + prim1 | 0; + }), x.lbl, x.more); } else { return Stdlib__List.fold_left((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), 0, x.more); + return prim0 + prim1 | 0; + }), 0, x.more); } } diff --git a/jscomp/test/dist/jscomp/test/inline_regression_test.js b/jscomp/test/dist/jscomp/test/inline_regression_test.js index 658012a66..4f93c414a 100644 --- a/jscomp/test/dist/jscomp/test/inline_regression_test.js +++ b/jscomp/test/dist/jscomp/test/inline_regression_test.js @@ -40,19 +40,19 @@ function generic_basename(is_dir_sep, current_dir_name, name) { function basename(param) { return generic_basename((function (s, i) { - return Caml_string.get(s, i) === /* '/' */47; - }), Stdlib__Filename.current_dir_name, param); + return Caml_string.get(s, i) === /* '/' */47; + }), Stdlib__Filename.current_dir_name, param); } const suites_0 = [ "basename", (function (param) { - return { - TAG: /* Eq */0, - _0: basename("b/c/a.b"), - _1: "a.b" - }; - }) + return { + TAG: /* Eq */0, + _0: basename("b/c/a.b"), + _1: "a.b" + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/installation_test.js b/jscomp/test/dist/jscomp/test/installation_test.js index 23ee36c4e..19529f2f4 100644 --- a/jscomp/test/dist/jscomp/test/installation_test.js +++ b/jscomp/test/dist/jscomp/test/installation_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/int32_test.js b/jscomp/test/dist/jscomp/test/int32_test.js index 93063f95c..c752fd2be 100644 --- a/jscomp/test/dist/jscomp/test/int32_test.js +++ b/jscomp/test/dist/jscomp/test/int32_test.js @@ -19,8 +19,8 @@ function f(x) { } const shift_right_logical_tests_0 = Stdlib__Array.map((function (x) { - return (-1 >>> x) | 0; - }), Ext_array_test.range(0, 31)); + return (-1 >>> x) | 0; + }), Ext_array_test.range(0, 31)); const shift_right_logical_tests_1 = [ -1, @@ -63,8 +63,8 @@ const shift_right_logical_tests = [ ]; const shift_right_tests_0 = Stdlib__Array.map((function (x) { - return (Stdlib__Int32.min_int >> x); - }), Ext_array_test.range(0, 31)); + return (Stdlib__Int32.min_int >> x); + }), Ext_array_test.range(0, 31)); const shift_right_tests_1 = [ -2147483648, @@ -107,8 +107,8 @@ const shift_right_tests = [ ]; const shift_left_tests_0 = Stdlib__Array.map((function (x) { - return (1 << x); - }), Ext_array_test.range(0, 31)); + return (1 << x); + }), Ext_array_test.range(0, 31)); const shift_left_tests_1 = [ 1, @@ -159,102 +159,102 @@ const suites = { hd: [ "File \"jscomp/test/int32_test.ml\", line 31, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: 1 + }; + }) ], tl: { hd: [ "File \"jscomp/test/int32_test.ml\", line 32, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: -2147483647, - _1: -2147483647 - }; - }) + return { + TAG: /* Eq */0, + _0: -2147483647, + _1: -2147483647 + }; + }) ], tl: /* [] */0 } }, Stdlib.$at(Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { - return [ - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "shift_right_logical_cases ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "shift_right_logical_cases %d" - }), i), - (function (param) { + return [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "shift_right_logical_cases ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "shift_right_logical_cases %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: a, + _1: b + }; + }) + ]; + }), shift_right_logical_tests_0, shift_right_logical_tests_1)), Stdlib.$at(Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { + return [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "shift_right_cases ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "shift_right_cases %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: a, + _1: b + }; + }) + ]; + }), shift_right_tests_0, shift_right_tests_1)), Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { + return [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "shift_left_cases ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "shift_left_cases %d" + }), i), + (function (param) { return { TAG: /* Eq */0, _0: a, _1: b }; }) - ]; - }), shift_right_logical_tests_0, shift_right_logical_tests_1)), Stdlib.$at(Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { - return [ - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "shift_right_cases ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "shift_right_cases %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: a, - _1: b - }; - }) - ]; - }), shift_right_tests_0, shift_right_tests_1)), Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { - return [ - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "shift_left_cases ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "shift_left_cases %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: a, - _1: b - }; - }) - ]; - }), shift_left_tests_0, shift_left_tests_1))))) + ]; + }), shift_left_tests_0, shift_left_tests_1))))) }; const test_id = { 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 cb8c08e9e..e471ad8f3 100644 --- a/jscomp/test/dist/jscomp/test/int64_mul_div_test.js +++ b/jscomp/test/dist/jscomp/test/int64_mul_div_test.js @@ -310,34 +310,34 @@ const pairs = [ function from_pairs(prefix, pairs) { return Stdlib__Array.to_list(Stdlib__Array.mapi((function (i, param) { - const b = param[2]; - const a = param[1]; - const result = param[0]; - return [ - Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, + const b = param[2]; + const a = param[1]; + const result = param[0]; + return [ + Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* '_' */95, _1: { - TAG: /* Char_literal */12, - _0: /* '_' */95, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 } - }, - _1: "%s_%d" - }), prefix, i), - (function (param) { - return commutative_mul(result, a, b); - }) - ]; - }), pairs)); + } + }, + _1: "%s_%d" + }), prefix, i), + (function (param) { + return commutative_mul(result, a, b); + }) + ]; + }), pairs)); } const small_pairs = [ @@ -1531,39 +1531,39 @@ const simple_divs = [ function from(xs) { return Stdlib__List.mapi((function (i, param) { - const d = param[3]; - const c = param[2]; - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "small_divs ", - _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, - _1: /* End_of_format */0 - } - }, - _1: "small_divs %L" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - c, - d - ], - _1: [ - Caml_int64.div(a, b), - Caml_int64.mod_(a, b) - ] - }; - }) - ]; - }), Stdlib__Array.to_list(xs)); + const d = param[3]; + const c = param[2]; + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "small_divs ", + _1: { + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, + _1: /* End_of_format */0 + } + }, + _1: "small_divs %L" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: [ + c, + d + ], + _1: [ + Caml_int64.div(a, b), + Caml_int64.mod_(a, b) + ] + }; + }) + ]; + }), Stdlib__Array.to_list(xs)); } const to_string = [[ @@ -1600,163 +1600,163 @@ const int64_compare_tests = [ function from_compare(xs) { return Stdlib__List.mapi((function (i, param) { - const c = param[2]; - const b = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "int64_compare ", - _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, - _1: /* End_of_format */0 - } - }, - _1: "int64_compare %L" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: c, - _1: Caml_int64.compare(a, b) - }; - }) - ]; - }), Stdlib__Array.to_list(xs)); + const c = param[2]; + const b = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "int64_compare ", + _1: { + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, + _1: /* End_of_format */0 + } + }, + _1: "int64_compare %L" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: c, + _1: Caml_int64.compare(a, b) + }; + }) + ]; + }), Stdlib__Array.to_list(xs)); } function from_to_string(xs) { return Stdlib__List.mapi((function (i, param) { - const str_a = param[1]; - const a = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "to_string ", - _1: { - TAG: /* Scan_get_counter */21, - _0: /* Token_counter */2, - _1: /* End_of_format */0 - } - }, - _1: "to_string %L" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: str_a, - _1: Caml_format.caml_int64_format("%d", a) - }; - }) - ]; - }), Stdlib__Array.to_list(xs)); + const str_a = param[1]; + const a = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "to_string ", + _1: { + TAG: /* Scan_get_counter */21, + _0: /* Token_counter */2, + _1: /* End_of_format */0 + } + }, + _1: "to_string %L" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: str_a, + _1: Caml_format.caml_int64_format("%d", a) + }; + }) + ]; + }), Stdlib__Array.to_list(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) { - const f = param[1]; - const i64 = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "to_float_", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "to_float_%d" - }), i), - (function (param) { + const f = param[1]; + const i64 = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "to_float_", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "to_float_%d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: Caml_int64.to_float(i64), + _1: f + }; + }) + ]; + }), Stdlib__Array.to_list(to_floats)), Stdlib.$at(Stdlib__List.mapi((function (i, param) { + const i64 = param[1]; + const f = param[0]; + return [ + Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "of_float_", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "of_float_%d" + }), i), + (function (param) { return { TAG: /* Eq */0, - _0: Caml_int64.to_float(i64), - _1: f + _0: Caml_int64.of_float(f), + _1: i64 }; }) - ]; - }), Stdlib__Array.to_list(to_floats)), Stdlib.$at(Stdlib__List.mapi((function (i, param) { - const i64 = param[1]; - const f = param[0]; - return [ - Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "of_float_", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "of_float_%d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.of_float(f), - _1: i64 - }; - }) - ]; - }), Stdlib__Array.to_list(of_float_pairs)), Stdlib.$at({ + ]; + }), Stdlib__Array.to_list(of_float_pairs)), Stdlib.$at({ hd: [ "compare_check_complete", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Array.map((function (param) { - return true; - }), check_complete_compare), - _1: check_complete_compare - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Array.map((function (param) { + return true; + }), check_complete_compare), + _1: check_complete_compare + }; + }) ], tl: /* [] */0 }, Stdlib.$at(from(simple_divs), Stdlib.$at(from_compare(int64_compare_tests), { hd: [ "div_rem_0", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.zero, - _1: Caml_int64.zero - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.zero, + _1: Caml_int64.zero + }; + }) ], tl: { hd: [ "div_rem_1", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.neg_one, - _1: Caml_int64.neg_one - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.neg_one, + _1: Caml_int64.neg_one + }; + }) ], tl: { hd: [ "File \"jscomp/test/int64_mul_div_test.ml\", line 214, characters 5-12", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.to_float(Stdlib__Int64.max_int), - _1: 9.22337203685477581e+18 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.to_float(Stdlib__Int64.max_int), + _1: 9.22337203685477581e+18 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/int64_string_test.js b/jscomp/test/dist/jscomp/test/int64_string_test.js index 154b614b7..0738eeec5 100644 --- a/jscomp/test/dist/jscomp/test/int64_string_test.js +++ b/jscomp/test/dist/jscomp/test/int64_string_test.js @@ -1307,29 +1307,29 @@ const random_data = { }; Belt__Belt_List.forEach(random_data, (function (u) { - if (u) { - if (u.tl) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/int64_string_test.ml", - 161, - 9 - ] - }); - } - const 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]); + if (u) { + if (u.tl) { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/int64_string_test.ml", + 161, + 9 + ] + }); } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/int64_string_test.ml", - 161, - 9 - ] - }); - })); + const 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", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/int64_string_test.ml", + 161, + 9 + ] + }); + })); eq("File \"jscomp/test/int64_string_test.ml\", line 164, characters 7-14", Caml_format.caml_int64_format("%d", [ -2097152, diff --git a/jscomp/test/dist/jscomp/test/int64_test.js b/jscomp/test/dist/jscomp/test/int64_test.js index dd3aae8fe..72bac5d14 100644 --- a/jscomp/test/dist/jscomp/test/int64_test.js +++ b/jscomp/test/dist/jscomp/test/int64_test.js @@ -43,8 +43,8 @@ function commutative_add(result, a, b) { const generic_compare = Caml_obj.caml_compare; const shift_left_tests_0 = Stdlib__Array.map((function (i) { - return Caml_int64.lsl_(Caml_int64.one, i); - }), Ext_array_test.range(0, 63)); + return Caml_int64.lsl_(Caml_int64.one, i); + }), Ext_array_test.range(0, 63)); const shift_left_tests_1 = [ Caml_int64.one, @@ -305,8 +305,8 @@ const shift_left_tests = [ ]; const shift_right_tests_0 = Stdlib__Array.map((function (i) { - return Caml_int64.asr_(Caml_int64.min_int, i); - }), Ext_array_test.range(0, 63)); + return Caml_int64.asr_(Caml_int64.min_int, i); + }), Ext_array_test.range(0, 63)); const shift_right_tests_1 = [ Caml_int64.min_int, @@ -567,8 +567,8 @@ const shift_right_tests = [ ]; const 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)); + return Caml_int64.lsr_(Caml_int64.min_int, i); + }), Ext_array_test.range(0, 63)); const shift_right_logical_suites_1 = [ Caml_int64.min_int, @@ -860,158 +860,172 @@ const suites = Stdlib.$at({ hd: [ "add_one", (function (param) { - return { - TAG: /* Eq */0, - _0: v, - _1: [ - 0, - 2147483648 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: v, + _1: [ + 0, + 2147483648 + ] + }; + }) ], tl: { hd: [ "add_2", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 0, - 4294967294 - ], - _1: Caml_int64.add(a, a) - }; - }) + return { + TAG: /* Eq */0, + _0: [ + 0, + 4294967294 + ], + _1: Caml_int64.add(a, a) + }; + }) ], tl: { hd: [ "add_3", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.zero, - _1: Caml_int64.zero - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.zero, + _1: Caml_int64.zero + }; + }) ], tl: { hd: [ "add_4", (function (param) { + return commutative_add([ + -1, + 4294967294 + ], [ + -1, + 4294967293 + ], Caml_int64.one); + }) + ], + tl: { + hd: [ + "add_5", + (function (param) { return commutative_add([ -1, - 4294967294 + 4294967293 ], [ -1, 4294967293 - ], Caml_int64.one); + ], Caml_int64.zero); }) - ], - tl: { - hd: [ - "add_5", - (function (param) { - return commutative_add([ - -1, - 4294967293 - ], [ - -1, - 4294967293 - ], Caml_int64.zero); - }) ], tl: { hd: [ "add_6", (function (param) { + return commutative_add([ + 0, + 4 + ], [ + -1, + 4294967293 + ], [ + 0, + 7 + ]); + }) + ], + tl: { + hd: [ + "add_7", + (function (param) { return commutative_add([ - 0, - 4 + 1, + 0 ], [ - -1, - 4294967293 + 0, + 2147483648 ], [ 0, - 7 + 2147483648 ]); }) - ], - tl: { - hd: [ - "add_7", - (function (param) { + ], + tl: { + hd: [ + "add_8", + (function (param) { return commutative_add([ 1, 0 ], [ 0, - 2147483648 - ], [ - 0, - 2147483648 - ]); + 4294967295 + ], Caml_int64.one); }) - ], - tl: { - hd: [ - "add_8", - (function (param) { - return commutative_add([ - 1, - 0 - ], [ - 0, - 4294967295 - ], Caml_int64.one); - }) ], tl: { hd: [ "add_9", (function (param) { + return commutative_add([ + 0, + 4294967295 + ], [ + 0, + 2147483648 + ], [ + 0, + 2147483647 + ]); + }) + ], + tl: { + hd: [ + "add_10", + (function (param) { return commutative_add([ - 0, - 4294967295 - ], [ 0, 2147483648 ], [ 0, - 2147483647 - ]); + 2147483648 + ], Caml_int64.zero); }) - ], - tl: { - hd: [ - "add_10", - (function (param) { + ], + tl: { + hd: [ + "add_11", + (function (param) { return commutative_add([ 0, - 2147483648 + 4294967295 ], [ 0, - 2147483648 + 4294967295 ], Caml_int64.zero); }) - ], - tl: { - hd: [ - "add_11", - (function (param) { - return commutative_add([ - 0, - 4294967295 - ], [ - 0, - 4294967295 - ], Caml_int64.zero); - }) ], tl: { hd: [ "to_int32", (function (param) { + return { + TAG: /* Eq */0, + _0: 3, + _1: Caml_int64.to_int32([ + 0, + 3 + ]) + }; + }) + ], + tl: { + hd: [ + "to_int", + (function (param) { return { TAG: /* Eq */0, _0: 3, @@ -1021,1047 +1035,1033 @@ const suites = Stdlib.$at({ ]) }; }) - ], - tl: { - hd: [ - "to_int", - (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Caml_int64.to_int32([ - 0, - 3 - ]) - }; - }) ], tl: { hd: [ "of_int", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + 0, + 3 + ], + _1: [ + 0, + 3 + ] + }; + }) + ], + tl: { + hd: [ + "lognot", + (function (param) { return { TAG: /* Eq */0, _0: [ - 0, - 3 + -1, + 4294967293 ], _1: [ - 0, - 3 + -1, + 4294967293 ] }; }) - ], - tl: { - hd: [ - "lognot", - (function (param) { + ], + tl: { + hd: [ + "neg", + (function (param) { return { TAG: /* Eq */0, _0: [ -1, - 4294967293 + 4294967294 ], _1: [ -1, - 4294967293 + 4294967294 ] }; }) - ], - tl: { - hd: [ - "neg", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - -1, - 4294967294 - ], - _1: [ - -1, - 4294967294 - ] - }; - }) ], tl: { hd: [ "File \"jscomp/test/int64_test.ml\", line 80, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Int64.min_int, - _1: Caml_int64.neg(Stdlib__Int64.min_int) - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Int64.min_int, + _1: Caml_int64.neg(Stdlib__Int64.min_int) + }; + }) ], tl: { hd: [ "File \"jscomp/test/int64_test.ml\", line 81, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Int64.max_int, - _1: Caml_int64.neg(Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.one)) - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Int64.max_int, + _1: Caml_int64.neg(Caml_int64.add(Stdlib__Int64.min_int, Caml_int64.one)) + }; + }) ], tl: { hd: [ "sub1", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + 0, + 2 + ], + _1: [ + 0, + 2 + ] + }; + }) + ], + tl: { + hd: [ + "xor1", + (function (param) { return { TAG: /* Eq */0, _0: [ - 0, - 2 + [ + 0, + 286331153 + ], + Caml_int64.xor(a, [ + 0, + 4009750271 + ]) ], _1: [ - 0, - 2 + [ + 0, + 286331153 + ], + [ + 0, + 2432700672 + ] ] }; }) - ], - tl: { - hd: [ - "xor1", - (function (param) { + ], + tl: { + hd: [ + "or", + (function (param) { return { TAG: /* Eq */0, _0: [ - [ - 0, - 286331153 - ], - Caml_int64.xor(a, [ - 0, - 4009750271 - ]) + 0, + 4294967295 ], _1: [ - [ - 0, - 286331153 - ], - [ - 0, - 2432700672 - ] + 0, + 4294967295 ] }; }) - ], - tl: { - hd: [ - "or", - (function (param) { + ], + tl: { + hd: [ + "and", + (function (param) { return { TAG: /* Eq */0, _0: [ 0, - 4294967295 + 4008636142 ], _1: [ 0, - 4294967295 + 4008636142 ] }; }) - ], - tl: { - hd: [ - "and", - (function (param) { + ], + tl: { + hd: [ + "lsl", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 0, - 4008636142 - ], + _0: Stdlib__Array.map((function (x) { + return Caml_int64.lsl_(Caml_int64.one, x); + }), Stdlib__Array.init(64, (function (i) { + return i; + }))), _1: [ - 0, - 4008636142 + Caml_int64.one, + [ + 0, + 2 + ], + [ + 0, + 4 + ], + [ + 0, + 8 + ], + [ + 0, + 16 + ], + [ + 0, + 32 + ], + [ + 0, + 64 + ], + [ + 0, + 128 + ], + [ + 0, + 256 + ], + [ + 0, + 512 + ], + [ + 0, + 1024 + ], + [ + 0, + 2048 + ], + [ + 0, + 4096 + ], + [ + 0, + 8192 + ], + [ + 0, + 16384 + ], + [ + 0, + 32768 + ], + [ + 0, + 65536 + ], + [ + 0, + 131072 + ], + [ + 0, + 262144 + ], + [ + 0, + 524288 + ], + [ + 0, + 1048576 + ], + [ + 0, + 2097152 + ], + [ + 0, + 4194304 + ], + [ + 0, + 8388608 + ], + [ + 0, + 16777216 + ], + [ + 0, + 33554432 + ], + [ + 0, + 67108864 + ], + [ + 0, + 134217728 + ], + [ + 0, + 268435456 + ], + [ + 0, + 536870912 + ], + [ + 0, + 1073741824 + ], + [ + 0, + 2147483648 + ], + [ + 1, + 0 + ], + [ + 2, + 0 + ], + [ + 4, + 0 + ], + [ + 8, + 0 + ], + [ + 16, + 0 + ], + [ + 32, + 0 + ], + [ + 64, + 0 + ], + [ + 128, + 0 + ], + [ + 256, + 0 + ], + [ + 512, + 0 + ], + [ + 1024, + 0 + ], + [ + 2048, + 0 + ], + [ + 4096, + 0 + ], + [ + 8192, + 0 + ], + [ + 16384, + 0 + ], + [ + 32768, + 0 + ], + [ + 65536, + 0 + ], + [ + 131072, + 0 + ], + [ + 262144, + 0 + ], + [ + 524288, + 0 + ], + [ + 1048576, + 0 + ], + [ + 2097152, + 0 + ], + [ + 4194304, + 0 + ], + [ + 8388608, + 0 + ], + [ + 16777216, + 0 + ], + [ + 33554432, + 0 + ], + [ + 67108864, + 0 + ], + [ + 134217728, + 0 + ], + [ + 268435456, + 0 + ], + [ + 536870912, + 0 + ], + [ + 1073741824, + 0 + ], + Caml_int64.min_int ] }; }) - ], - tl: { - hd: [ - "lsl", - (function (param) { + ], + tl: { + hd: [ + "lsr", + (function (param) { return { TAG: /* Eq */0, _0: Stdlib__Array.map((function (x) { - return Caml_int64.lsl_(Caml_int64.one, x); - }), Stdlib__Array.init(64, (function (i) { - return i; - }))), + return Caml_int64.lsr_(Caml_int64.neg_one, x); + }), Stdlib__Array.init(64, (function (i) { + return i; + }))), _1: [ - Caml_int64.one, + Caml_int64.neg_one, + Caml_int64.max_int, [ - 0, - 2 + 1073741823, + 4294967295 ], [ - 0, - 4 + 536870911, + 4294967295 ], [ - 0, - 8 + 268435455, + 4294967295 ], [ - 0, - 16 + 134217727, + 4294967295 ], [ - 0, - 32 + 67108863, + 4294967295 ], [ - 0, - 64 + 33554431, + 4294967295 ], [ - 0, - 128 + 16777215, + 4294967295 ], [ - 0, - 256 + 8388607, + 4294967295 ], [ - 0, - 512 + 4194303, + 4294967295 ], [ - 0, - 1024 + 2097151, + 4294967295 ], [ - 0, - 2048 + 1048575, + 4294967295 ], [ - 0, - 4096 + 524287, + 4294967295 ], [ - 0, - 8192 + 262143, + 4294967295 ], [ - 0, - 16384 + 131071, + 4294967295 ], [ - 0, - 32768 + 65535, + 4294967295 ], [ - 0, - 65536 + 32767, + 4294967295 ], [ - 0, - 131072 + 16383, + 4294967295 ], [ - 0, - 262144 + 8191, + 4294967295 ], [ - 0, - 524288 + 4095, + 4294967295 ], [ - 0, - 1048576 + 2047, + 4294967295 ], [ - 0, - 2097152 + 1023, + 4294967295 ], [ - 0, - 4194304 + 511, + 4294967295 ], [ - 0, - 8388608 + 255, + 4294967295 ], [ - 0, - 16777216 + 127, + 4294967295 ], [ - 0, - 33554432 + 63, + 4294967295 ], [ - 0, - 67108864 + 31, + 4294967295 ], [ - 0, - 134217728 + 15, + 4294967295 ], [ - 0, - 268435456 + 7, + 4294967295 ], [ - 0, - 536870912 + 3, + 4294967295 ], [ - 0, - 1073741824 + 1, + 4294967295 ], [ 0, - 2147483648 - ], - [ - 1, - 0 + 4294967295 ], [ - 2, - 0 + 0, + 2147483647 ], [ - 4, - 0 + 0, + 1073741823 ], [ - 8, - 0 + 0, + 536870911 ], [ - 16, - 0 + 0, + 268435455 ], [ - 32, - 0 + 0, + 134217727 ], [ - 64, - 0 + 0, + 67108863 ], [ - 128, - 0 + 0, + 33554431 ], [ - 256, - 0 + 0, + 16777215 ], [ - 512, - 0 + 0, + 8388607 ], [ - 1024, - 0 + 0, + 4194303 ], [ - 2048, - 0 + 0, + 2097151 ], [ - 4096, - 0 + 0, + 1048575 ], [ - 8192, - 0 + 0, + 524287 ], [ - 16384, - 0 + 0, + 262143 ], [ - 32768, - 0 + 0, + 131071 ], [ - 65536, - 0 + 0, + 65535 ], [ - 131072, - 0 + 0, + 32767 ], [ - 262144, - 0 + 0, + 16383 ], [ - 524288, - 0 + 0, + 8191 ], [ - 1048576, - 0 + 0, + 4095 ], [ - 2097152, - 0 + 0, + 2047 ], [ - 4194304, - 0 + 0, + 1023 ], [ - 8388608, - 0 + 0, + 511 ], [ - 16777216, - 0 + 0, + 255 ], [ - 33554432, - 0 + 0, + 127 ], [ - 67108864, - 0 + 0, + 63 ], [ - 134217728, - 0 + 0, + 31 ], [ - 268435456, - 0 + 0, + 15 ], [ - 536870912, - 0 + 0, + 7 ], [ - 1073741824, - 0 + 0, + 3 ], - Caml_int64.min_int + Caml_int64.one ] }; }) - ], - tl: { - hd: [ - "lsr", - (function (param) { + ], + tl: { + hd: [ + "asr", + (function (param) { return { TAG: /* Eq */0, _0: Stdlib__Array.map((function (x) { - return Caml_int64.lsr_(Caml_int64.neg_one, x); - }), Stdlib__Array.init(64, (function (i) { - return i; - }))), + return Caml_int64.asr_(Caml_int64.neg_one, x); + }), Stdlib__Array.init(64, (function (i) { + return i; + }))), _1: [ Caml_int64.neg_one, - Caml_int64.max_int, - [ - 1073741823, - 4294967295 - ], - [ - 536870911, - 4294967295 - ], - [ - 268435455, - 4294967295 - ], - [ - 134217727, - 4294967295 - ], - [ - 67108863, - 4294967295 - ], - [ - 33554431, - 4294967295 - ], - [ - 16777215, - 4294967295 - ], - [ - 8388607, - 4294967295 - ], - [ - 4194303, - 4294967295 - ], - [ - 2097151, - 4294967295 - ], - [ - 1048575, - 4294967295 - ], - [ - 524287, - 4294967295 - ], - [ - 262143, - 4294967295 - ], - [ - 131071, - 4294967295 - ], - [ - 65535, - 4294967295 - ], - [ - 32767, - 4294967295 - ], - [ - 16383, - 4294967295 - ], - [ - 8191, - 4294967295 - ], - [ - 4095, - 4294967295 - ], - [ - 2047, - 4294967295 - ], - [ - 1023, - 4294967295 - ], - [ - 511, - 4294967295 - ], - [ - 255, - 4294967295 - ], - [ - 127, - 4294967295 - ], - [ - 63, - 4294967295 - ], - [ - 31, - 4294967295 - ], - [ - 15, - 4294967295 - ], - [ - 7, - 4294967295 - ], - [ - 3, - 4294967295 - ], - [ - 1, - 4294967295 - ], - [ - 0, - 4294967295 - ], - [ - 0, - 2147483647 - ], - [ - 0, - 1073741823 - ], - [ - 0, - 536870911 - ], - [ - 0, - 268435455 - ], - [ - 0, - 134217727 - ], - [ - 0, - 67108863 - ], - [ - 0, - 33554431 - ], - [ - 0, - 16777215 - ], - [ - 0, - 8388607 - ], - [ - 0, - 4194303 - ], - [ - 0, - 2097151 - ], - [ - 0, - 1048575 - ], - [ - 0, - 524287 - ], - [ - 0, - 262143 - ], - [ - 0, - 131071 - ], - [ - 0, - 65535 - ], - [ - 0, - 32767 - ], - [ - 0, - 16383 - ], - [ - 0, - 8191 - ], - [ - 0, - 4095 - ], - [ - 0, - 2047 - ], - [ - 0, - 1023 - ], - [ - 0, - 511 - ], - [ - 0, - 255 - ], - [ - 0, - 127 - ], - [ - 0, - 63 - ], - [ - 0, - 31 - ], - [ - 0, - 15 - ], - [ - 0, - 7 - ], - [ - 0, - 3 - ], - Caml_int64.one + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one, + Caml_int64.neg_one ] }; }) - ], - tl: { - hd: [ - "asr", - (function (param) { + ], + tl: { + hd: [ + "mul simple", + (function (param) { return { TAG: /* Eq */0, - _0: Stdlib__Array.map((function (x) { - return Caml_int64.asr_(Caml_int64.neg_one, x); - }), Stdlib__Array.init(64, (function (i) { - return i; - }))), + _0: [ + 0, + 6 + ], _1: [ - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one, - Caml_int64.neg_one + 0, + 6 ] }; }) - ], - tl: { - hd: [ - "mul simple", - (function (param) { + ], + tl: { + hd: [ + "of_int32", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 0, - 6 - ], + _0: Stdlib__Array.map(Caml_int64.of_int32, [ + 0, + -2147483648 + ]), _1: [ - 0, - 6 + Caml_int64.zero, + [ + -1, + 2147483648 + ] ] }; }) - ], - tl: { - hd: [ - "of_int32", - (function (param) { + ], + tl: { + hd: [ + "of_int32_singleton", + (function (param) { return { TAG: /* Eq */0, - _0: Stdlib__Array.map(Caml_int64.of_int32, [ - 0, - -2147483648 - ]), + _0: [ + -1, + 4294967293 + ], _1: [ - Caml_int64.zero, - [ - -1, - 2147483648 - ] + -1, + 4294967293 ] }; }) - ], - tl: { - hd: [ - "of_int32_singleton", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/int64_test.ml\", line 134, characters 4-11", + (function (param) { return { TAG: /* Eq */0, _0: [ - -1, - 4294967293 + 0, + 3 ], _1: [ - -1, - 4294967293 + 0, + 3 ] }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/int64_test.ml\", line 134, characters 4-11", - (function (param) { + ], + tl: { + hd: [ + "to_int32", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 0, - 3 - ], + _0: Stdlib__Array.map(Caml_int64.to_int32, [ + Caml_int64.zero, + [ + 0, + 2147483648 + ] + ]), _1: [ 0, - 3 + -2147483648 ] }; }) - ], - tl: { - hd: [ - "to_int32", - (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Array.map(Caml_int64.to_int32, [ - Caml_int64.zero, - [ - 0, - 2147483648 - ] - ]), - _1: [ - 0, - -2147483648 - ] - }; - }) ], tl: { hd: [ "discard_sign", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.discard_sign(Caml_int64.neg_one), - _1: Caml_int64.max_int - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.discard_sign(Caml_int64.neg_one), + _1: Caml_int64.max_int + }; + }) ], tl: { hd: [ "div_mod", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.div_mod([ - 0, - 7 - ], [ - 0, - 3 - ]), - _1: [ - [ + return { + TAG: /* Eq */0, + _0: Caml_int64.div_mod([ 0, - 2 - ], - Caml_int64.one - ] - }; - }) + 7 + ], [ + 0, + 3 + ]), + _1: [ + [ + 0, + 2 + ], + Caml_int64.one + ] + }; + }) ], tl: { hd: [ "to_hex", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.to_hex(Caml_int64.neg_one), - _1: "ffffffffffffffff" - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.to_hex(Caml_int64.neg_one), + _1: "ffffffffffffffff" + }; + }) ], tl: { hd: [ "generic_compare", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare([ - 1, - 0 - ], Caml_int64.one) > 0, - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare([ + 1, + 0 + ], Caml_int64.one) > 0, + _1: true + }; + }) ], tl: { hd: [ "test_compier_literal", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 0, - 4294967295 - ], - _1: [ - 0, - 4294967295 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: [ + 0, + 4294967295 + ], + _1: [ + 0, + 4294967295 + ] + }; + }) ], tl: { hd: [ "generic_compare2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_obj.caml_compare([ - 0, - 2147483648 - ], Caml_int64.one) > 0, - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_obj.caml_compare([ + 0, + 2147483648 + ], Caml_int64.one) > 0, + _1: true + }; + }) ], tl: { hd: [ "shift_left", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + 0, + 4294967040 + ], + _1: [ + 0, + 4294967040 + ] + }; + }) + ], + tl: { + hd: [ + "fib_int64", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 0, - 4294967040 - ], + _0: fib(1000, Caml_int64.one, [ + 0, + 2 + ]), _1: [ - 0, - 4294967040 + -1990564327, + 2874523960 ] }; }) - ], - tl: { - hd: [ - "fib_int64", - (function (param) { + ], + tl: { + hd: [ + "fac_int64", + (function (param) { return { TAG: /* Eq */0, - _0: fib(1000, Caml_int64.one, [ - 0, - 2 - ]), + _0: fac(30, Caml_int64.one), _1: [ - -1990564327, - 2874523960 + -2040662563, + 1409286144 ] }; }) - ], - tl: { - hd: [ - "fac_int64", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/int64_test.ml\", line 163, characters 6-13", + (function (param) { return { TAG: /* Eq */0, - _0: fac(30, Caml_int64.one), + _0: Caml_int64.add(Stdlib__Int64.max_int, Stdlib__Int64.max_int), _1: [ - -2040662563, - 1409286144 + -1, + 4294967294 ] }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/int64_test.ml\", line 163, characters 6-13", - (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.add(Stdlib__Int64.max_int, Stdlib__Int64.max_int), - _1: [ - -1, - 4294967294 - ] - }; - }) ], tl: { hd: [ "File \"jscomp/test/int64_test.ml\", line 166, characters 6-13", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.add(Stdlib__Int64.min_int, Stdlib__Int64.min_int), - _1: Caml_int64.zero - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.add(Stdlib__Int64.min_int, Stdlib__Int64.min_int), + _1: Caml_int64.zero + }; + }) ], tl: { hd: [ "File \"jscomp/test/int64_test.ml\", line 170, characters 6-13", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_int64.neg_one, - _1: Caml_int64.neg_one - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_int64.neg_one, + _1: Caml_int64.neg_one + }; + }) ], tl: /* [] */0 } @@ -2106,81 +2106,81 @@ const suites = Stdlib.$at({ } } }, Stdlib.$at(Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { - return [ - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "shift_left_cases ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "shift_left_cases %d" - }), i), - (function (param) { + return [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "shift_left_cases ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "shift_left_cases %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: a, + _1: b + }; + }) + ]; + }), shift_left_tests_0, shift_left_tests_1)), Stdlib.$at(Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { + return [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "shift_right_cases ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "shift_right_cases %d" + }), i), + (function (param) { return { TAG: /* Eq */0, _0: a, _1: b }; }) - ]; - }), shift_left_tests_0, shift_left_tests_1)), Stdlib.$at(Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { - return [ - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "shift_right_cases ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "shift_right_cases %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: a, - _1: b - }; - }) - ]; - }), shift_right_tests_0, shift_right_tests_1)), Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { - return [ - Curry._1(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "shift_right_logical_cases ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "shift_right_logical_cases %d" - }), i), - (function (param) { - return { - TAG: /* Eq */0, - _0: a, - _1: b - }; - }) - ]; - }), shift_right_logical_suites_0, shift_right_logical_suites_1))))); + ]; + }), shift_right_tests_0, shift_right_tests_1)), Stdlib__Array.to_list(Ext_array_test.map2i((function (i, a, b) { + return [ + Curry._1(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "shift_right_logical_cases ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "shift_right_logical_cases %d" + }), i), + (function (param) { + return { + TAG: /* Eq */0, + _0: a, + _1: b + }; + }) + ]; + }), shift_right_logical_suites_0, shift_right_logical_suites_1))))); const suites$1 = { contents: suites diff --git a/jscomp/test/dist/jscomp/test/int_hashtbl_test.js b/jscomp/test/dist/jscomp/test/int_hashtbl_test.js index 5bed092fd..e88d027e4 100644 --- a/jscomp/test/dist/jscomp/test/int_hashtbl_test.js +++ b/jscomp/test/dist/jscomp/test/int_hashtbl_test.js @@ -13,16 +13,16 @@ function f(H) { Curry._3(H.add, tbl, 1, /* '1' */49); Curry._3(H.add, tbl, 2, /* '2' */50); return Stdlib__List.sort((function (param, param$1) { - return Caml.caml_int_compare(param[0], param$1[0]); - }), Curry._3(H.fold, (function (k, v, acc) { - return { - hd: [ - k, - v - ], - tl: acc - }; - }), tbl, /* [] */0)); + return Caml.caml_int_compare(param[0], param$1[0]); + }), Curry._3(H.fold, (function (k, v, acc) { + return { + hd: [ + k, + v + ], + tl: acc + }; + }), tbl, /* [] */0)); } function g(H, count) { @@ -34,17 +34,17 @@ function g(H, count) { Curry._3(H.replace, tbl, (i$1 << 1), String(i$1)); } const v = Curry._3(H.fold, (function (k, v, acc) { - return { - hd: [ - k, - v - ], - tl: acc - }; - }), tbl, /* [] */0); + return { + hd: [ + k, + v + ], + tl: acc + }; + }), tbl, /* [] */0); return Stdlib__Array.of_list(Stdlib__List.sort((function (param, param$1) { - return Caml.caml_int_compare(param[0], param$1[0]); - }), v)); + return Caml.caml_int_compare(param[0], param$1[0]); + }), v)); } const hash = Stdlib__Hashtbl.hash; @@ -61,41 +61,41 @@ const Int_hash = Stdlib__Hashtbl.Make({ const suites_0 = [ "simple", (function (param) { - return { - TAG: /* Eq */0, - _0: { + return { + TAG: /* Eq */0, + _0: { + hd: [ + 1, + /* '1' */49 + ], + tl: { hd: [ - 1, - /* '1' */49 + 2, + /* '2' */50 ], - tl: { - hd: [ - 2, - /* '2' */50 - ], - tl: /* [] */0 - } - }, - _1: f(Int_hash) - }; - }) + tl: /* [] */0 + } + }, + _1: f(Int_hash) + }; + }) ]; const suites_1 = { hd: [ "more_iterations", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Array.init(1001, (function (i) { - return [ - (i << 1), - String(i) - ]; - })), - _1: g(Int_hash, 1000) - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Array.init(1001, (function (i) { + return [ + (i << 1), + String(i) + ]; + })), + _1: g(Int_hash, 1000) + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/int_map.js b/jscomp/test/dist/jscomp/test/int_map.js index 0a892ce72..4919a9067 100644 --- a/jscomp/test/dist/jscomp/test/int_map.js +++ b/jscomp/test/dist/jscomp/test/int_map.js @@ -984,14 +984,14 @@ function bindings(s) { function of_list(bs) { return Stdlib__List.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), /* Empty */0, bs); + return add(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), m, i); + return add(param[0], param[1], m); + }), m, i); } function of_seq(i) { @@ -1010,8 +1010,8 @@ function seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1053,8 +1053,8 @@ function rev_seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } diff --git a/jscomp/test/dist/jscomp/test/int_overflow_test.js b/jscomp/test/dist/jscomp/test/int_overflow_test.js index bc6604425..3bde2590f 100644 --- a/jscomp/test/dist/jscomp/test/int_overflow_test.js +++ b/jscomp/test/dist/jscomp/test/int_overflow_test.js @@ -42,155 +42,155 @@ Mt.from_pair_suites("Int_overflow_test", { hd: [ "plus_overflow", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: (Stdlib__Int32.max_int + 1 | 0) === Stdlib__Int32.min_int - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: (Stdlib__Int32.max_int + 1 | 0) === Stdlib__Int32.min_int + }; + }) ], tl: { hd: [ "minus_overflow", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: (Stdlib__Int32.min_int - Stdlib__Int32.one | 0) === Stdlib__Int32.max_int - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: (Stdlib__Int32.min_int - Stdlib__Int32.one | 0) === Stdlib__Int32.max_int + }; + }) ], tl: { hd: [ "flow_again", (function (param) { - return { - TAG: /* Eq */0, - _0: 2147483646, - _1: (Stdlib__Int32.max_int + Stdlib__Int32.max_int | 0) + Stdlib__Int32.min_int | 0 - }; - }) + return { + TAG: /* Eq */0, + _0: 2147483646, + _1: (Stdlib__Int32.max_int + Stdlib__Int32.max_int | 0) + Stdlib__Int32.min_int | 0 + }; + }) ], tl: { hd: [ "flow_again", (function (param) { - return { - TAG: /* Eq */0, - _0: -2, - _1: Stdlib__Int32.max_int + Stdlib__Int32.max_int | 0 - }; - }) + return { + TAG: /* Eq */0, + _0: -2, + _1: Stdlib__Int32.max_int + Stdlib__Int32.max_int | 0 + }; + }) ], tl: { hd: [ "hash_test", (function (param) { - return { - TAG: /* Eq */0, - _0: hash_variant("xxyyzzuuxxzzyy00112233"), - _1: 544087776 - }; - }) + return { + TAG: /* Eq */0, + _0: hash_variant("xxyyzzuuxxzzyy00112233"), + _1: 544087776 + }; + }) ], tl: { hd: [ "hash_test2", (function (param) { - return { - TAG: /* Eq */0, - _0: hash_variant("xxyyzxzzyy"), - _1: -449896130 - }; - }) + return { + TAG: /* Eq */0, + _0: hash_variant("xxyyzxzzyy"), + _1: -449896130 + }; + }) ], tl: { hd: [ "File \"jscomp/test/int_overflow_test.ml\", line 37, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: hash_variant2("xxyyzzuuxxzzyy00112233"), - _1: 544087776 - }; - }) + return { + TAG: /* Eq */0, + _0: hash_variant2("xxyyzzuuxxzzyy00112233"), + _1: 544087776 + }; + }) ], tl: { hd: [ "File \"jscomp/test/int_overflow_test.ml\", line 38, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: hash_variant2("xxyyzxzzyy"), - _1: -449896130 - }; - }) + return { + TAG: /* Eq */0, + _0: hash_variant2("xxyyzxzzyy"), + _1: -449896130 + }; + }) ], tl: { hd: [ "int_literal_flow", (function (param) { + return { + TAG: /* Eq */0, + _0: -1, + _1: -1 + }; + }) + ], + tl: { + hd: [ + "int_literal_flow2", + (function (param) { return { TAG: /* Eq */0, _0: -1, _1: -1 }; }) - ], - tl: { - hd: [ - "int_literal_flow2", - (function (param) { + ], + tl: { + hd: [ + "int_literal_flow3", + (function (param) { return { TAG: /* Eq */0, _0: -1, _1: -1 }; }) - ], - tl: { - hd: [ - "int_literal_flow3", - (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: -1 - }; - }) ], tl: { hd: [ "int32_mul", (function (param) { - return { - TAG: /* Eq */0, - _0: -33554431, - _1: -33554431 - }; - }) + return { + TAG: /* Eq */0, + _0: -33554431, + _1: -33554431 + }; + }) ], tl: { hd: [ "File \"jscomp/test/int_overflow_test.ml\", line 44, characters 3-10", (function (param) { - return { - TAG: /* Eq */0, - _0: Number("3") | 0, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: Number("3") | 0, + _1: 3 + }; + }) ], tl: { hd: [ "File \"jscomp/test/int_overflow_test.ml\", line 46, characters 3-10", (function (param) { - return { - TAG: /* Eq */0, - _0: Number("3.2") | 0, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: Number("3.2") | 0, + _1: 3 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_array_test.js b/jscomp/test/dist/jscomp/test/js_array_test.js index b7f815c6c..8e7318880 100644 --- a/jscomp/test/dist/jscomp/test/js_array_test.js +++ b/jscomp/test/dist/jscomp/test/js_array_test.js @@ -7,52 +7,75 @@ const Mt = require("./mt.js"); const suites_0 = [ "isArray_array", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Array.isArray([]) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Array.isArray([]) + }; + }) ]; const suites_1 = { hd: [ "isArray_int", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Array.isArray(34) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Array.isArray(34) + }; + }) ], tl: { hd: [ "length", (function (param) { + return { + TAG: /* Eq */0, + _0: 3, + _1: [ + 1, + 2, + 3 + ].length + }; + }) + ], + tl: { + hd: [ + "copyWithin", + (function (param) { return { TAG: /* Eq */0, - _0: 3, - _1: [ + _0: [ 1, 2, - 3 - ].length + 3, + 1, + 2 + ], + _1: [ + 1, + 2, + 3, + 4, + 5 + ].copyWithin(-2, undefined, undefined) }; }) - ], - tl: { - hd: [ - "copyWithin", - (function (param) { + ], + tl: { + hd: [ + "copyWithinFrom", + (function (param) { return { TAG: /* Eq */0, _0: [ - 1, - 2, + 4, + 5, 3, - 1, - 2 + 4, + 5 ], _1: [ 1, @@ -60,19 +83,19 @@ const suites_1 = { 3, 4, 5 - ].copyWithin(-2, undefined, undefined) + ].copyWithin(0, 3, undefined) }; }) - ], - tl: { - hd: [ - "copyWithinFrom", - (function (param) { + ], + tl: { + hd: [ + "copyWithinFromRange", + (function (param) { return { TAG: /* Eq */0, _0: [ 4, - 5, + 2, 3, 4, 5 @@ -83,41 +106,37 @@ const suites_1 = { 3, 4, 5 - ].copyWithin(0, 3, undefined) + ].copyWithin(0, 3, 4) }; }) - ], - tl: { - hd: [ - "copyWithinFromRange", - (function (param) { + ], + tl: { + hd: [ + "fillInPlace", + (function (param) { return { TAG: /* Eq */0, _0: [ 4, - 2, - 3, 4, - 5 + 4 ], _1: [ 1, 2, - 3, - 4, - 5 - ].copyWithin(0, 3, 4) + 3 + ].fill(4, undefined, undefined) }; }) - ], - tl: { - hd: [ - "fillInPlace", - (function (param) { + ], + tl: { + hd: [ + "fillFromInPlace", + (function (param) { return { TAG: /* Eq */0, _0: [ - 4, + 1, 4, 4 ], @@ -125,211 +144,222 @@ const suites_1 = { 1, 2, 3 - ].fill(4, undefined, undefined) + ].fill(4, 1, undefined) }; }) - ], - tl: { - hd: [ - "fillFromInPlace", - (function (param) { + ], + tl: { + hd: [ + "fillRangeInPlace", + (function (param) { return { TAG: /* Eq */0, _0: [ 1, 4, - 4 + 3 ], _1: [ 1, 2, 3 - ].fill(4, 1, undefined) + ].fill(4, 1, 2) }; }) - ], - tl: { - hd: [ - "fillRangeInPlace", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 1, - 4, - 3 - ], - _1: [ - 1, - 2, - 3 - ].fill(4, 1, 2) - }; - }) ], tl: { hd: [ "pop", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Caml_option.undefined_to_opt([ - 1, - 2, - 3 - ].pop()) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: Caml_option.undefined_to_opt([ + 1, + 2, + 3 + ].pop()) + }; + }) ], tl: { hd: [ "pop - empty array", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Caml_option.undefined_to_opt([].pop()) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: Caml_option.undefined_to_opt([].pop()) + }; + }) ], tl: { hd: [ "push", (function (param) { + return { + TAG: /* Eq */0, + _0: 4, + _1: [ + 1, + 2, + 3 + ].push(4) + }; + }) + ], + tl: { + hd: [ + "pushMany", + (function (param) { return { TAG: /* Eq */0, - _0: 4, + _0: 5, _1: [ 1, 2, 3 - ].push(4) + ].push(4, 5) }; }) - ], - tl: { - hd: [ - "pushMany", - (function (param) { + ], + tl: { + hd: [ + "reverseInPlace", + (function (param) { return { TAG: /* Eq */0, - _0: 5, + _0: [ + 3, + 2, + 1 + ], _1: [ 1, 2, 3 - ].push(4, 5) + ].reverse() }; }) - ], - tl: { - hd: [ - "reverseInPlace", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 3, - 2, - 1 - ], - _1: [ - 1, - 2, - 3 - ].reverse() - }; - }) ], tl: { hd: [ "shift", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: Caml_option.undefined_to_opt([ - 1, - 2, - 3 - ].shift()) - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: Caml_option.undefined_to_opt([ + 1, + 2, + 3 + ].shift()) + }; + }) ], tl: { hd: [ "shift - empty array", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Caml_option.undefined_to_opt([].shift()) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: Caml_option.undefined_to_opt([].shift()) + }; + }) ], tl: { hd: [ "sortInPlace", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + 1, + 2, + 3 + ], + _1: [ + 3, + 1, + 2 + ].sort() + }; + }) + ], + tl: { + hd: [ + "sortInPlaceWith", + (function (param) { return { TAG: /* Eq */0, _0: [ - 1, + 3, 2, - 3 + 1 ], _1: [ 3, 1, 2 - ].sort() + ].sort(function (a, b) { + return b - a | 0; + }) }; }) - ], - tl: { - hd: [ - "sortInPlaceWith", - (function (param) { + ], + tl: { + hd: [ + "spliceInPlace", + (function (param) { + const arr = [ + 1, + 2, + 3, + 4 + ]; + const removed = arr.splice(2, 0, 5); return { TAG: /* Eq */0, _0: [ - 3, - 2, - 1 + [ + 1, + 2, + 5, + 3, + 4 + ], + [] ], _1: [ - 3, - 1, - 2 - ].sort(function (a, b) { - return b - a | 0; - }) + arr, + removed + ] }; }) - ], - tl: { - hd: [ - "spliceInPlace", - (function (param) { + ], + tl: { + hd: [ + "removeFromInPlace", + (function (param) { const arr = [ 1, 2, 3, 4 ]; - const removed = arr.splice(2, 0, 5); + const removed = arr.splice(2); return { TAG: /* Eq */0, _0: [ [ 1, - 2, - 5, + 2 + ], + [ 3, 4 - ], - [] + ] ], _1: [ arr, @@ -337,29 +367,27 @@ const suites_1 = { ] }; }) - ], - tl: { - hd: [ - "removeFromInPlace", - (function (param) { + ], + tl: { + hd: [ + "removeCountInPlace", + (function (param) { const arr = [ 1, 2, 3, 4 ]; - const removed = arr.splice(2); + const removed = arr.splice(2, 1); return { TAG: /* Eq */0, _0: [ [ 1, - 2 - ], - [ - 3, + 2, 4 - ] + ], + [3] ], _1: [ arr, @@ -367,89 +395,85 @@ const suites_1 = { ] }; }) - ], - tl: { - hd: [ - "removeCountInPlace", - (function (param) { - const arr = [ - 1, - 2, - 3, - 4 - ]; - const removed = arr.splice(2, 1); + ], + tl: { + hd: [ + "unshift", + (function (param) { return { TAG: /* Eq */0, - _0: [ - [ + _0: 4, + _1: [ 1, 2, - 4 - ], - [3] - ], - _1: [ - arr, - removed - ] + 3 + ].unshift(4) }; }) - ], - tl: { - hd: [ - "unshift", - (function (param) { + ], + tl: { + hd: [ + "unshiftMany", + (function (param) { return { TAG: /* Eq */0, - _0: 4, + _0: 5, _1: [ 1, 2, 3 - ].unshift(4) + ].unshift(4, 5) }; }) - ], - tl: { - hd: [ - "unshiftMany", - (function (param) { + ], + tl: { + hd: [ + "append", + (function (param) { return { TAG: /* Eq */0, - _0: 5, + _0: [ + 1, + 2, + 3, + 4 + ], _1: [ 1, 2, 3 - ].unshift(4, 5) + ].concat([4]) }; }) - ], - tl: { - hd: [ - "append", - (function (param) { + ], + tl: { + hd: [ + "concat", + (function (param) { return { TAG: /* Eq */0, _0: [ 1, 2, 3, - 4 + 4, + 5 ], _1: [ 1, 2, 3 - ].concat([4]) + ].concat([ + 4, + 5 + ]) }; }) - ], - tl: { - hd: [ - "concat", - (function (param) { + ], + tl: { + hd: [ + "concatMany", + (function (param) { return { TAG: /* Eq */0, _0: [ @@ -457,7 +481,9 @@ const suites_1 = { 2, 3, 4, - 5 + 5, + 6, + 7 ], _1: [ 1, @@ -466,155 +492,152 @@ const suites_1 = { ].concat([ 4, 5 + ], [ + 6, + 7 ]) }; }) - ], - tl: { - hd: [ - "concatMany", - (function (param) { + ], + tl: { + hd: [ + "includes", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], + _0: true, _1: [ 1, 2, 3 - ].concat([ - 4, - 5 - ], [ - 6, - 7 - ]) + ].includes(3) }; }) - ], - tl: { - hd: [ - "includes", - (function (param) { + ], + tl: { + hd: [ + "indexOf", + (function (param) { return { TAG: /* Eq */0, - _0: true, + _0: 1, _1: [ 1, 2, 3 - ].includes(3) + ].indexOf(2, undefined) }; }) - ], - tl: { - hd: [ - "indexOf", - (function (param) { + ], + tl: { + hd: [ + "indexOfFrom", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: 3, _1: [ 1, 2, - 3 - ].indexOf(2, undefined) + 3, + 2 + ].indexOf(2, 2) }; }) - ], - tl: { - hd: [ - "indexOfFrom", - (function (param) { + ], + tl: { + hd: [ + "join", + (function (param) { return { TAG: /* Eq */0, - _0: 3, + _0: "1,2,3", _1: [ 1, 2, - 3, - 2 - ].indexOf(2, 2) + 3 + ].join(",") }; }) - ], - tl: { - hd: [ - "join", - (function (param) { + ], + tl: { + hd: [ + "joinWith", + (function (param) { return { TAG: /* Eq */0, - _0: "1,2,3", + _0: "1;2;3", _1: [ 1, 2, 3 - ].join(",") + ].join(";") }; }) - ], - tl: { - hd: [ - "joinWith", - (function (param) { + ], + tl: { + hd: [ + "lastIndexOf", + (function (param) { return { TAG: /* Eq */0, - _0: "1;2;3", + _0: 1, _1: [ 1, 2, 3 - ].join(";") + ].lastIndexOf(2) }; }) - ], - tl: { - hd: [ - "lastIndexOf", - (function (param) { + ], + tl: { + hd: [ + "lastIndexOfFrom", + (function (param) { return { TAG: /* Eq */0, _0: 1, _1: [ 1, 2, - 3 - ].lastIndexOf(2) + 3, + 2 + ].lastIndexOf(2, 2) }; }) - ], - tl: { - hd: [ - "lastIndexOfFrom", - (function (param) { + ], + tl: { + hd: [ + "slice", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: [ + 2, + 3 + ], _1: [ 1, 2, 3, - 2 - ].lastIndexOf(2, 2) + 4, + 5 + ].slice(1, 3) }; }) - ], - tl: { - hd: [ - "slice", - (function (param) { + ], + tl: { + hd: [ + "copy", + (function (param) { return { TAG: /* Eq */0, _0: [ + 1, 2, - 3 + 3, + 4, + 5 ], _1: [ 1, @@ -622,19 +645,17 @@ const suites_1 = { 3, 4, 5 - ].slice(1, 3) + ].slice() }; }) - ], - tl: { - hd: [ - "copy", - (function (param) { + ], + tl: { + hd: [ + "sliceFrom", + (function (param) { return { TAG: /* Eq */0, _0: [ - 1, - 2, 3, 4, 5 @@ -645,35 +666,29 @@ const suites_1 = { 3, 4, 5 - ].slice() + ].slice(2, undefined) }; }) - ], - tl: { - hd: [ - "sliceFrom", - (function (param) { + ], + tl: { + hd: [ + "toString", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 3, - 4, - 5 - ], + _0: "1,2,3", _1: [ 1, 2, - 3, - 4, - 5 - ].slice(2, undefined) + 3 + ].toString() }; }) - ], - tl: { - hd: [ - "toString", - (function (param) { + ], + tl: { + hd: [ + "toLocaleString", + (function (param) { return { TAG: /* Eq */0, _0: "1,2,3", @@ -681,213 +696,219 @@ const suites_1 = { 1, 2, 3 - ].toString() + ].toLocaleString() }; }) - ], - tl: { - hd: [ - "toLocaleString", - (function (param) { + ], + tl: { + hd: [ + "every", + (function (param) { return { TAG: /* Eq */0, - _0: "1,2,3", + _0: true, _1: [ 1, 2, 3 - ].toLocaleString() + ].every(function (n) { + return n > 0; + }) }; }) - ], - tl: { - hd: [ - "every", - (function (param) { + ], + tl: { + hd: [ + "everyi", + (function (param) { return { TAG: /* Eq */0, - _0: true, + _0: false, _1: [ 1, 2, 3 - ].every(function (n) { - return n > 0; + ].every(function (param, i) { + return i > 0; }) }; }) - ], - tl: { - hd: [ - "everyi", - (function (param) { + ], + tl: { + hd: [ + "filter", + (function (param) { return { TAG: /* Eq */0, - _0: false, + _0: [ + 2, + 4 + ], _1: [ 1, 2, - 3 - ].every(function (param, i) { - return i > 0; + 3, + 4 + ].filter(function (n) { + return n % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "filter", - (function (param) { + ], + tl: { + hd: [ + "filteri", + (function (param) { return { TAG: /* Eq */0, _0: [ - 2, - 4 + 1, + 3 ], _1: [ 1, 2, 3, 4 - ].filter(function (n) { - return n % 2 === 0; + ].filter(function (param, i) { + return i % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "filteri", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 1, - 3 - ], - _1: [ - 1, - 2, - 3, - 4 - ].filter(function (param, i) { - return i % 2 === 0; - }) - }; - }) ], tl: { hd: [ "find", (function (param) { + return { + TAG: /* Eq */0, + _0: 2, + _1: Caml_option.undefined_to_opt([ + 1, + 2, + 3, + 4 + ].find(function (n) { + return n % 2 === 0; + })) + }; + }) + ], + tl: { + hd: [ + "find - no match", + (function (param) { return { TAG: /* Eq */0, - _0: 2, + _0: undefined, _1: Caml_option.undefined_to_opt([ 1, 2, 3, 4 ].find(function (n) { - return n % 2 === 0; + return n % 2 === 5; })) }; }) - ], - tl: { - hd: [ - "find - no match", - (function (param) { + ], + tl: { + hd: [ + "findi", + (function (param) { return { TAG: /* Eq */0, - _0: undefined, + _0: 1, _1: Caml_option.undefined_to_opt([ 1, 2, 3, 4 - ].find(function (n) { - return n % 2 === 5; + ].find(function (param, i) { + return i % 2 === 0; })) }; }) - ], - tl: { - hd: [ - "findi", - (function (param) { + ], + tl: { + hd: [ + "findi - no match", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: undefined, _1: Caml_option.undefined_to_opt([ 1, 2, 3, 4 ].find(function (param, i) { - return i % 2 === 0; + return i % 2 === 5; })) }; }) - ], - tl: { - hd: [ - "findi - no match", - (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Caml_option.undefined_to_opt([ - 1, - 2, - 3, - 4 - ].find(function (param, i) { - return i % 2 === 5; - })) - }; - }) ], tl: { hd: [ "findIndex", (function (param) { + return { + TAG: /* Eq */0, + _0: 1, + _1: [ + 1, + 2, + 3, + 4 + ].findIndex(function (n) { + return n % 2 === 0; + }) + }; + }) + ], + tl: { + hd: [ + "findIndexi", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: 0, _1: [ 1, 2, 3, 4 - ].findIndex(function (n) { - return n % 2 === 0; + ].findIndex(function (param, i) { + return i % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "findIndexi", - (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: [ - 1, - 2, - 3, - 4 - ].findIndex(function (param, i) { - return i % 2 === 0; - }) - }; - }) ], tl: { hd: [ "forEach", (function (param) { + const sum = { + contents: 0 + }; + [ + 1, + 2, + 3 + ].forEach(function (n) { + sum.contents = sum.contents + n | 0; + }); + return { + TAG: /* Eq */0, + _0: 6, + _1: sum.contents + }; + }) + ], + tl: { + hd: [ + "forEachi", + (function (param) { const sum = { contents: 0 }; @@ -895,190 +916,169 @@ const suites_1 = { 1, 2, 3 - ].forEach(function (n) { - sum.contents = sum.contents + n | 0; + ].forEach(function (param, i) { + sum.contents = sum.contents + i | 0; }); return { TAG: /* Eq */0, - _0: 6, + _0: 3, _1: sum.contents }; }) - ], - tl: { - hd: [ - "forEachi", - (function (param) { - const sum = { - contents: 0 - }; - [ - 1, - 2, - 3 - ].forEach(function (param, i) { - sum.contents = sum.contents + i | 0; - }); - return { - TAG: /* Eq */0, - _0: 3, - _1: sum.contents - }; - }) ], tl: { hd: [ "map", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + 2, + 4, + 6, + 8 + ], + _1: [ + 1, + 2, + 3, + 4 + ].map(function (n) { + return (n << 1); + }) + }; + }) + ], + tl: { + hd: [ + "map", + (function (param) { return { TAG: /* Eq */0, _0: [ + 0, 2, 4, - 6, - 8 + 6 ], _1: [ 1, 2, 3, 4 - ].map(function (n) { - return (n << 1); + ].map(function (param, i) { + return (i << 1); }) }; }) - ], - tl: { - hd: [ - "map", - (function (param) { + ], + tl: { + hd: [ + "reduce", + (function (param) { return { TAG: /* Eq */0, - _0: [ - 0, - 2, - 4, - 6 - ], + _0: -10, _1: [ 1, 2, 3, 4 - ].map(function (param, i) { - return (i << 1); - }) + ].reduce((function (acc, n) { + return acc - n | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "reduce", - (function (param) { + ], + tl: { + hd: [ + "reducei", + (function (param) { return { TAG: /* Eq */0, - _0: -10, + _0: -6, _1: [ 1, 2, 3, 4 - ].reduce((function (acc, n) { - return acc - n | 0; - }), 0) + ].reduce((function (acc, param, i) { + return acc - i | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "reducei", - (function (param) { + ], + tl: { + hd: [ + "reduceRight", + (function (param) { return { TAG: /* Eq */0, - _0: -6, + _0: -10, _1: [ 1, 2, 3, 4 - ].reduce((function (acc, param, i) { - return acc - i | 0; - }), 0) + ].reduceRight((function (acc, n) { + return acc - n | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "reduceRight", - (function (param) { + ], + tl: { + hd: [ + "reduceRighti", + (function (param) { return { TAG: /* Eq */0, - _0: -10, + _0: -6, _1: [ 1, 2, 3, 4 - ].reduceRight((function (acc, n) { - return acc - n | 0; - }), 0) + ].reduceRight((function (acc, param, i) { + return acc - i | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "reduceRighti", - (function (param) { + ], + tl: { + hd: [ + "some", + (function (param) { return { TAG: /* Eq */0, - _0: -6, + _0: false, _1: [ 1, 2, 3, 4 - ].reduceRight((function (acc, param, i) { - return acc - i | 0; - }), 0) + ].some(function (n) { + return n <= 0; + }) }; }) - ], - tl: { - hd: [ - "some", - (function (param) { + ], + tl: { + hd: [ + "somei", + (function (param) { return { TAG: /* Eq */0, - _0: false, + _0: true, _1: [ 1, 2, 3, 4 - ].some(function (n) { - return n <= 0; + ].some(function (param, i) { + return i <= 0; }) }; }) - ], - tl: { - hd: [ - "somei", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: [ - 1, - 2, - 3, - 4 - ].some(function (param, i) { - return i <= 0; - }) - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_bool_test.js b/jscomp/test/dist/jscomp/test/js_bool_test.js index 585a4c3d8..35c48795a 100644 --- a/jscomp/test/dist/jscomp/test/js_bool_test.js +++ b/jscomp/test/dist/jscomp/test/js_bool_test.js @@ -34,35 +34,35 @@ const v = true; const suites_0 = [ "caml_bool_eq_caml_bool", (function (param) { - return { - TAG: /* Eq */0, - _0: u, - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: u, + _1: true + }; + }) ]; const suites_1 = { hd: [ "js_bool_eq_js_bool", (function (param) { - return { - TAG: /* Eq */0, - _0: v, - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: v, + _1: true + }; + }) ], tl: { hd: [ "js_bool_neq_acml_bool", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: true === true - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: true === true + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_date_test.js b/jscomp/test/dist/jscomp/test/js_date_test.js index fa747dc42..ec3aa2a86 100644 --- a/jscomp/test/dist/jscomp/test/js_date_test.js +++ b/jscomp/test/dist/jscomp/test/js_date_test.js @@ -13,142 +13,166 @@ function date(param) { const suites_0 = [ "valueOf", (function (param) { - return { - TAG: /* Eq */0, - _0: 195131516789, - _1: new Date("1976-03-08T12:34:56.789+01:23").valueOf() - }; - }) + return { + TAG: /* Eq */0, + _0: 195131516789, + _1: new Date("1976-03-08T12:34:56.789+01:23").valueOf() + }; + }) ]; const suites_1 = { hd: [ "make", (function (param) { - return { - TAG: /* Ok */4, - _0: new Date().getTime() > 1487223505382 - }; - }) + return { + TAG: /* Ok */4, + _0: new Date().getTime() > 1487223505382 + }; + }) ], tl: { hd: [ "parseAsFloat", (function (param) { - return { - TAG: /* Eq */0, - _0: Date.parse("1976-03-08T12:34:56.789+01:23"), - _1: 195131516789 - }; - }) + return { + TAG: /* Eq */0, + _0: Date.parse("1976-03-08T12:34:56.789+01:23"), + _1: 195131516789 + }; + }) ], tl: { hd: [ "parseAsFloat_invalid", (function (param) { - return { - TAG: /* Ok */4, - _0: Number.isNaN(Date.parse("gibberish")) - }; - }) + return { + TAG: /* Ok */4, + _0: Number.isNaN(Date.parse("gibberish")) + }; + }) ], tl: { hd: [ "fromFloat", (function (param) { - return { - TAG: /* Eq */0, - _0: "1976-03-08T11:11:56.789Z", - _1: new Date(195131516789).toISOString() - }; - }) + return { + TAG: /* Eq */0, + _0: "1976-03-08T11:11:56.789Z", + _1: new Date(195131516789).toISOString() + }; + }) ], tl: { hd: [ "fromString_valid", (function (param) { - return { - TAG: /* Eq */0, - _0: 195131516789, - _1: new Date("1976-03-08T12:34:56.789+01:23").getTime() - }; - }) + return { + TAG: /* Eq */0, + _0: 195131516789, + _1: new Date("1976-03-08T12:34:56.789+01:23").getTime() + }; + }) ], tl: { hd: [ "fromString_invalid", (function (param) { - return { - TAG: /* Ok */4, - _0: Number.isNaN(new Date("gibberish").getTime()) - }; - }) + return { + TAG: /* Ok */4, + _0: Number.isNaN(new Date("gibberish").getTime()) + }; + }) ], tl: { hd: [ "makeWithYM", (function (param) { - const d = new Date(1984, 4); + const d = new Date(1984, 4); + return { + TAG: /* Eq */0, + _0: [ + 1984, + 4 + ], + _1: [ + d.getFullYear(), + d.getMonth() + ] + }; + }) + ], + tl: { + hd: [ + "makeWithYMD", + (function (param) { + const d = new Date(1984, 4, 6); return { TAG: /* Eq */0, _0: [ 1984, - 4 + 4, + 6 ], _1: [ d.getFullYear(), - d.getMonth() + d.getMonth(), + d.getDate() ] }; }) - ], - tl: { - hd: [ - "makeWithYMD", - (function (param) { - const d = new Date(1984, 4, 6); + ], + tl: { + hd: [ + "makeWithYMDH", + (function (param) { + const d = new Date(1984, 4, 6, 3); return { TAG: /* Eq */0, _0: [ 1984, 4, - 6 + 6, + 3 ], _1: [ d.getFullYear(), d.getMonth(), - d.getDate() + d.getDate(), + d.getHours() ] }; }) - ], - tl: { - hd: [ - "makeWithYMDH", - (function (param) { - const d = new Date(1984, 4, 6, 3); + ], + tl: { + hd: [ + "makeWithYMDHM", + (function (param) { + const d = new Date(1984, 4, 6, 3, 59); return { TAG: /* Eq */0, _0: [ 1984, 4, 6, - 3 + 3, + 59 ], _1: [ d.getFullYear(), d.getMonth(), d.getDate(), - d.getHours() + d.getHours(), + d.getMinutes() ] }; }) - ], - tl: { - hd: [ - "makeWithYMDHM", - (function (param) { - const d = new Date(1984, 4, 6, 3, 59); + ], + tl: { + hd: [ + "makeWithYMDHMS", + (function (param) { + const d = new Date(1984, 4, 6, 3, 59, 27); return { TAG: /* Eq */0, _0: [ @@ -156,89 +180,88 @@ const suites_1 = { 4, 6, 3, - 59 + 59, + 27 ], _1: [ d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), - d.getMinutes() + d.getMinutes(), + d.getSeconds() ] }; }) - ], - tl: { - hd: [ - "makeWithYMDHMS", - (function (param) { - const d = new Date(1984, 4, 6, 3, 59, 27); + ], + tl: { + hd: [ + "utcWithYM", + (function (param) { + const d = Date.UTC(1984, 4); + const d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ 1984, - 4, - 6, - 3, - 59, - 27 + 4 ], _1: [ - d.getFullYear(), - d.getMonth(), - d.getDate(), - d.getHours(), - d.getMinutes(), - d.getSeconds() + d$1.getUTCFullYear(), + d$1.getUTCMonth() ] }; }) - ], - tl: { - hd: [ - "utcWithYM", - (function (param) { - const d = Date.UTC(1984, 4); + ], + tl: { + hd: [ + "utcWithYMD", + (function (param) { + const d = Date.UTC(1984, 4, 6); const d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ 1984, - 4 + 4, + 6 ], _1: [ d$1.getUTCFullYear(), - d$1.getUTCMonth() + d$1.getUTCMonth(), + d$1.getUTCDate() ] }; }) - ], - tl: { - hd: [ - "utcWithYMD", - (function (param) { - const d = Date.UTC(1984, 4, 6); + ], + tl: { + hd: [ + "utcWithYMDH", + (function (param) { + const d = Date.UTC(1984, 4, 6, 3); const d$1 = new Date(d); return { TAG: /* Eq */0, _0: [ 1984, 4, - 6 + 6, + 3 ], _1: [ d$1.getUTCFullYear(), d$1.getUTCMonth(), - d$1.getUTCDate() + d$1.getUTCDate(), + d$1.getUTCHours() ] }; }) - ], - tl: { - hd: [ - "utcWithYMDH", - (function (param) { - const d = Date.UTC(1984, 4, 6, 3); + ], + tl: { + hd: [ + "utcWithYMDHM", + (function (param) { + const d = Date.UTC(1984, 4, 6, 3, 59); const d$1 = new Date(d); return { TAG: /* Eq */0, @@ -246,22 +269,24 @@ const suites_1 = { 1984, 4, 6, - 3 + 3, + 59 ], _1: [ d$1.getUTCFullYear(), d$1.getUTCMonth(), d$1.getUTCDate(), - d$1.getUTCHours() + d$1.getUTCHours(), + d$1.getUTCMinutes() ] }; }) - ], - tl: { - hd: [ - "utcWithYMDHM", - (function (param) { - const d = Date.UTC(1984, 4, 6, 3, 59); + ], + tl: { + hd: [ + "utcWithYMDHMS", + (function (param) { + const d = Date.UTC(1984, 4, 6, 3, 59, 27); const d$1 = new Date(d); return { TAG: /* Eq */0, @@ -270,764 +295,739 @@ const suites_1 = { 4, 6, 3, - 59 + 59, + 27 ], _1: [ d$1.getUTCFullYear(), d$1.getUTCMonth(), d$1.getUTCDate(), d$1.getUTCHours(), - d$1.getUTCMinutes() + d$1.getUTCMinutes(), + d$1.getUTCSeconds() ] }; }) - ], - tl: { - hd: [ - "utcWithYMDHMS", - (function (param) { - const d = Date.UTC(1984, 4, 6, 3, 59, 27); - const d$1 = new Date(d); - return { - TAG: /* Eq */0, - _0: [ - 1984, - 4, - 6, - 3, - 59, - 27 - ], - _1: [ - d$1.getUTCFullYear(), - d$1.getUTCMonth(), - d$1.getUTCDate(), - d$1.getUTCHours(), - d$1.getUTCMinutes(), - d$1.getUTCSeconds() - ] - }; - }) ], tl: { hd: [ "getFullYear", (function (param) { - return { - TAG: /* Eq */0, - _0: 1976, - _1: new Date("1976-03-08T12:34:56.789+01:23").getFullYear() - }; - }) + return { + TAG: /* Eq */0, + _0: 1976, + _1: new Date("1976-03-08T12:34:56.789+01:23").getFullYear() + }; + }) ], tl: { hd: [ "getMilliseconds", (function (param) { - return { - TAG: /* Eq */0, - _0: 789, - _1: new Date("1976-03-08T12:34:56.789+01:23").getMilliseconds() - }; - }) + return { + TAG: /* Eq */0, + _0: 789, + _1: new Date("1976-03-08T12:34:56.789+01:23").getMilliseconds() + }; + }) ], tl: { hd: [ "getSeconds", (function (param) { - return { - TAG: /* Eq */0, - _0: 56, - _1: new Date("1976-03-08T12:34:56.789+01:23").getSeconds() - }; - }) + return { + TAG: /* Eq */0, + _0: 56, + _1: new Date("1976-03-08T12:34:56.789+01:23").getSeconds() + }; + }) ], tl: { hd: [ "getTime", (function (param) { - return { - TAG: /* Eq */0, - _0: 195131516789, - _1: new Date("1976-03-08T12:34:56.789+01:23").getTime() - }; - }) + return { + TAG: /* Eq */0, + _0: 195131516789, + _1: new Date("1976-03-08T12:34:56.789+01:23").getTime() + }; + }) ], tl: { hd: [ "getUTCDate", (function (param) { - return { - TAG: /* Eq */0, - _0: 8, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCDate() - }; - }) + return { + TAG: /* Eq */0, + _0: 8, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCDate() + }; + }) ], tl: { hd: [ "getUTCDay", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCDay() - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCDay() + }; + }) ], tl: { hd: [ "getUTCFUllYear", (function (param) { - return { - TAG: /* Eq */0, - _0: 1976, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCFullYear() - }; - }) + return { + TAG: /* Eq */0, + _0: 1976, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCFullYear() + }; + }) ], tl: { hd: [ "getUTCHours", (function (param) { - return { - TAG: /* Eq */0, - _0: 11, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCHours() - }; - }) + return { + TAG: /* Eq */0, + _0: 11, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCHours() + }; + }) ], tl: { hd: [ "getUTCMilliseconds", (function (param) { - return { - TAG: /* Eq */0, - _0: 789, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMilliseconds() - }; - }) + return { + TAG: /* Eq */0, + _0: 789, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMilliseconds() + }; + }) ], tl: { hd: [ "getUTCMinutes", (function (param) { - return { - TAG: /* Eq */0, - _0: 11, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMinutes() - }; - }) + return { + TAG: /* Eq */0, + _0: 11, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMinutes() + }; + }) ], tl: { hd: [ "getUTCMonth", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMonth() - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMonth() + }; + }) ], tl: { hd: [ "getUTCSeconds", (function (param) { - return { - TAG: /* Eq */0, - _0: 56, - _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCSeconds() - }; - }) + return { + TAG: /* Eq */0, + _0: 56, + _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCSeconds() + }; + }) ], tl: { hd: [ "getYear", (function (param) { - return { - TAG: /* Eq */0, - _0: 1976, - _1: new Date("1976-03-08T12:34:56.789+01:23").getFullYear() - }; - }) + return { + TAG: /* Eq */0, + _0: 1976, + _1: new Date("1976-03-08T12:34:56.789+01:23").getFullYear() + }; + }) ], tl: { hd: [ "setDate", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setDate(12); - return { - TAG: /* Eq */0, - _0: 12, - _1: d.getDate() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setDate(12); + return { + TAG: /* Eq */0, + _0: 12, + _1: d.getDate() + }; + }) ], tl: { hd: [ "setFullYear", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setFullYear(1986); - return { - TAG: /* Eq */0, - _0: 1986, - _1: d.getFullYear() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setFullYear(1986); + return { + TAG: /* Eq */0, + _0: 1986, + _1: d.getFullYear() + }; + }) ], tl: { hd: [ "setFullYearM", (function (param) { + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setFullYear(1986, 7); + return { + TAG: /* Eq */0, + _0: [ + 1986, + 7 + ], + _1: [ + d.getFullYear(), + d.getMonth() + ] + }; + }) + ], + tl: { + hd: [ + "setFullYearMD", + (function (param) { const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setFullYear(1986, 7); + d.setFullYear(1986, 7, 23); return { TAG: /* Eq */0, _0: [ 1986, - 7 + 7, + 23 ], _1: [ d.getFullYear(), - d.getMonth() + d.getMonth(), + d.getDate() ] }; }) - ], - tl: { - hd: [ - "setFullYearMD", - (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setFullYear(1986, 7, 23); - return { - TAG: /* Eq */0, - _0: [ - 1986, - 7, - 23 - ], - _1: [ - d.getFullYear(), - d.getMonth(), - d.getDate() - ] - }; - }) ], tl: { hd: [ "setHours", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setHours(22); - return { - TAG: /* Eq */0, - _0: 22, - _1: d.getHours() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setHours(22); + return { + TAG: /* Eq */0, + _0: 22, + _1: d.getHours() + }; + }) ], tl: { hd: [ "setHoursM", (function (param) { + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setHours(22, 48); + return { + TAG: /* Eq */0, + _0: [ + 22, + 48 + ], + _1: [ + d.getHours(), + d.getMinutes() + ] + }; + }) + ], + tl: { + hd: [ + "setHoursMS", + (function (param) { const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setHours(22, 48); + d.setHours(22, 48, 54); return { TAG: /* Eq */0, _0: [ 22, - 48 + 48, + 54 ], _1: [ d.getHours(), - d.getMinutes() + d.getMinutes(), + d.getSeconds() ] }; }) - ], - tl: { - hd: [ - "setHoursMS", - (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setHours(22, 48, 54); - return { - TAG: /* Eq */0, - _0: [ - 22, - 48, - 54 - ], - _1: [ - d.getHours(), - d.getMinutes(), - d.getSeconds() - ] - }; - }) ], tl: { hd: [ "setMilliseconds", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setMilliseconds(543); - return { - TAG: /* Eq */0, - _0: 543, - _1: d.getMilliseconds() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setMilliseconds(543); + return { + TAG: /* Eq */0, + _0: 543, + _1: d.getMilliseconds() + }; + }) ], tl: { hd: [ "setMinutes", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setMinutes(18); - return { - TAG: /* Eq */0, - _0: 18, - _1: d.getMinutes() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setMinutes(18); + return { + TAG: /* Eq */0, + _0: 18, + _1: d.getMinutes() + }; + }) ], tl: { hd: [ "setMinutesS", (function (param) { + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setMinutes(18, 42); + return { + TAG: /* Eq */0, + _0: [ + 18, + 42 + ], + _1: [ + d.getMinutes(), + d.getSeconds() + ] + }; + }) + ], + tl: { + hd: [ + "setMinutesSMs", + (function (param) { const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setMinutes(18, 42); + d.setMinutes(18, 42, 311); return { TAG: /* Eq */0, _0: [ 18, - 42 + 42, + 311 ], _1: [ d.getMinutes(), - d.getSeconds() + d.getSeconds(), + d.getMilliseconds() ] }; }) - ], - tl: { - hd: [ - "setMinutesSMs", - (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setMinutes(18, 42, 311); - return { - TAG: /* Eq */0, - _0: [ - 18, - 42, - 311 - ], - _1: [ - d.getMinutes(), - d.getSeconds(), - d.getMilliseconds() - ] - }; - }) ], tl: { hd: [ "setMonth", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setMonth(10); - return { - TAG: /* Eq */0, - _0: 10, - _1: d.getMonth() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setMonth(10); + return { + TAG: /* Eq */0, + _0: 10, + _1: d.getMonth() + }; + }) ], tl: { hd: [ "setMonthD", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setMonth(10, 14); - return { - TAG: /* Eq */0, - _0: [ - 10, - 14 - ], - _1: [ - d.getMonth(), - d.getDate() - ] - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setMonth(10, 14); + return { + TAG: /* Eq */0, + _0: [ + 10, + 14 + ], + _1: [ + d.getMonth(), + d.getDate() + ] + }; + }) ], tl: { hd: [ "setSeconds", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setSeconds(36); - return { - TAG: /* Eq */0, - _0: 36, - _1: d.getSeconds() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setSeconds(36); + return { + TAG: /* Eq */0, + _0: 36, + _1: d.getSeconds() + }; + }) ], tl: { hd: [ "setSecondsMs", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setSeconds(36, 420); - return { - TAG: /* Eq */0, - _0: [ - 36, - 420 - ], - _1: [ - d.getSeconds(), - d.getMilliseconds() - ] - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setSeconds(36, 420); + return { + TAG: /* Eq */0, + _0: [ + 36, + 420 + ], + _1: [ + d.getSeconds(), + d.getMilliseconds() + ] + }; + }) ], tl: { hd: [ "setUTCDate", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCDate(12); - return { - TAG: /* Eq */0, - _0: 12, - _1: d.getUTCDate() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCDate(12); + return { + TAG: /* Eq */0, + _0: 12, + _1: d.getUTCDate() + }; + }) ], tl: { hd: [ "setUTCFullYear", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCFullYear(1986); - return { - TAG: /* Eq */0, - _0: 1986, - _1: d.getUTCFullYear() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCFullYear(1986); + return { + TAG: /* Eq */0, + _0: 1986, + _1: d.getUTCFullYear() + }; + }) ], tl: { hd: [ "setUTCFullYearM", (function (param) { + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCFullYear(1986, 7); + return { + TAG: /* Eq */0, + _0: [ + 1986, + 7 + ], + _1: [ + d.getUTCFullYear(), + d.getUTCMonth() + ] + }; + }) + ], + tl: { + hd: [ + "setUTCFullYearMD", + (function (param) { const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCFullYear(1986, 7); + d.setUTCFullYear(1986, 7, 23); return { TAG: /* Eq */0, _0: [ 1986, - 7 + 7, + 23 ], _1: [ d.getUTCFullYear(), - d.getUTCMonth() + d.getUTCMonth(), + d.getUTCDate() ] }; }) - ], - tl: { - hd: [ - "setUTCFullYearMD", - (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCFullYear(1986, 7, 23); - return { - TAG: /* Eq */0, - _0: [ - 1986, - 7, - 23 - ], - _1: [ - d.getUTCFullYear(), - d.getUTCMonth(), - d.getUTCDate() - ] - }; - }) ], tl: { hd: [ "setUTCHours", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCHours(22); - return { - TAG: /* Eq */0, - _0: 22, - _1: d.getUTCHours() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCHours(22); + return { + TAG: /* Eq */0, + _0: 22, + _1: d.getUTCHours() + }; + }) ], tl: { hd: [ "setUTCHoursM", (function (param) { + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCHours(22, 48); + return { + TAG: /* Eq */0, + _0: [ + 22, + 48 + ], + _1: [ + d.getUTCHours(), + d.getUTCMinutes() + ] + }; + }) + ], + tl: { + hd: [ + "setUTCHoursMS", + (function (param) { const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCHours(22, 48); + d.setUTCHours(22, 48, 54); return { TAG: /* Eq */0, _0: [ 22, - 48 + 48, + 54 ], _1: [ d.getUTCHours(), - d.getUTCMinutes() + d.getUTCMinutes(), + d.getUTCSeconds() ] }; }) - ], - tl: { - hd: [ - "setUTCHoursMS", - (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCHours(22, 48, 54); - return { - TAG: /* Eq */0, - _0: [ - 22, - 48, - 54 - ], - _1: [ - d.getUTCHours(), - d.getUTCMinutes(), - d.getUTCSeconds() - ] - }; - }) ], tl: { hd: [ "setUTCMilliseconds", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCMilliseconds(543); - return { - TAG: /* Eq */0, - _0: 543, - _1: d.getUTCMilliseconds() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCMilliseconds(543); + return { + TAG: /* Eq */0, + _0: 543, + _1: d.getUTCMilliseconds() + }; + }) ], tl: { hd: [ "setUTCMinutes", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCMinutes(18); - return { - TAG: /* Eq */0, - _0: 18, - _1: d.getUTCMinutes() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCMinutes(18); + return { + TAG: /* Eq */0, + _0: 18, + _1: d.getUTCMinutes() + }; + }) ], tl: { hd: [ "setUTCMinutesS", (function (param) { + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCMinutes(18, 42); + return { + TAG: /* Eq */0, + _0: [ + 18, + 42 + ], + _1: [ + d.getUTCMinutes(), + d.getUTCSeconds() + ] + }; + }) + ], + tl: { + hd: [ + "setUTCMinutesSMs", + (function (param) { const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCMinutes(18, 42); + d.setUTCMinutes(18, 42, 311); return { TAG: /* Eq */0, _0: [ 18, - 42 + 42, + 311 ], _1: [ d.getUTCMinutes(), - d.getUTCSeconds() + d.getUTCSeconds(), + d.getUTCMilliseconds() ] }; }) - ], - tl: { - hd: [ - "setUTCMinutesSMs", - (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCMinutes(18, 42, 311); - return { - TAG: /* Eq */0, - _0: [ - 18, - 42, - 311 - ], - _1: [ - d.getUTCMinutes(), - d.getUTCSeconds(), - d.getUTCMilliseconds() - ] - }; - }) ], tl: { hd: [ "setUTCMonth", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCMonth(10); - return { - TAG: /* Eq */0, - _0: 10, - _1: d.getUTCMonth() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCMonth(10); + return { + TAG: /* Eq */0, + _0: 10, + _1: d.getUTCMonth() + }; + }) ], tl: { hd: [ "setUTCMonthD", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCMonth(10, 14); - return { - TAG: /* Eq */0, - _0: [ - 10, - 14 - ], - _1: [ - d.getUTCMonth(), - d.getUTCDate() - ] - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCMonth(10, 14); + return { + TAG: /* Eq */0, + _0: [ + 10, + 14 + ], + _1: [ + d.getUTCMonth(), + d.getUTCDate() + ] + }; + }) ], tl: { hd: [ "setUTCSeconds", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCSeconds(36); - return { - TAG: /* Eq */0, - _0: 36, - _1: d.getUTCSeconds() - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCSeconds(36); + return { + TAG: /* Eq */0, + _0: 36, + _1: d.getUTCSeconds() + }; + }) ], tl: { hd: [ "setUTCSecondsMs", (function (param) { - const d = new Date("1976-03-08T12:34:56.789+01:23"); - d.setUTCSeconds(36, 420); - return { - TAG: /* Eq */0, - _0: [ - 36, - 420 - ], - _1: [ - d.getUTCSeconds(), - d.getUTCMilliseconds() - ] - }; - }) + const d = new Date("1976-03-08T12:34:56.789+01:23"); + d.setUTCSeconds(36, 420); + return { + TAG: /* Eq */0, + _0: [ + 36, + 420 + ], + _1: [ + d.getUTCSeconds(), + d.getUTCMilliseconds() + ] + }; + }) ], tl: { hd: [ "toDateString", (function (param) { - return { - TAG: /* Eq */0, - _0: "Mon Mar 08 1976", - _1: new Date("1976-03-08T12:34:56.789+01:23").toDateString() - }; - }) + return { + TAG: /* Eq */0, + _0: "Mon Mar 08 1976", + _1: new Date("1976-03-08T12:34:56.789+01:23").toDateString() + }; + }) ], tl: { hd: [ "toGMTString", (function (param) { - return { - TAG: /* Eq */0, - _0: "Mon, 08 Mar 1976 11:11:56 GMT", - _1: new Date("1976-03-08T12:34:56.789+01:23").toUTCString() - }; - }) + return { + TAG: /* Eq */0, + _0: "Mon, 08 Mar 1976 11:11:56 GMT", + _1: new Date("1976-03-08T12:34:56.789+01:23").toUTCString() + }; + }) ], tl: { hd: [ "toISOString", (function (param) { - return { - TAG: /* Eq */0, - _0: "1976-03-08T11:11:56.789Z", - _1: new Date("1976-03-08T12:34:56.789+01:23").toISOString() - }; - }) + return { + TAG: /* Eq */0, + _0: "1976-03-08T11:11:56.789Z", + _1: new Date("1976-03-08T12:34:56.789+01:23").toISOString() + }; + }) ], tl: { hd: [ "toJSON", (function (param) { - return { - TAG: /* Eq */0, - _0: "1976-03-08T11:11:56.789Z", - _1: Stdlib__Option.get(Caml_option.undefined_to_opt(new Date("1976-03-08T12:34:56.789+01:23").toJSON())) - }; - }) + return { + TAG: /* Eq */0, + _0: "1976-03-08T11:11:56.789Z", + _1: Stdlib__Option.get(Caml_option.undefined_to_opt(new Date("1976-03-08T12:34:56.789+01:23").toJSON())) + }; + }) ], tl: { hd: [ "toJSONUnsafe", (function (param) { - return { - TAG: /* Eq */0, - _0: "1976-03-08T11:11:56.789Z", - _1: new Date("1976-03-08T12:34:56.789+01:23").toJSON() - }; - }) + return { + TAG: /* Eq */0, + _0: "1976-03-08T11:11:56.789Z", + _1: new Date("1976-03-08T12:34:56.789+01:23").toJSON() + }; + }) ], tl: { hd: [ "toUTCString", (function (param) { - return { - TAG: /* Eq */0, - _0: "Mon, 08 Mar 1976 11:11:56 GMT", - _1: new Date("1976-03-08T12:34:56.789+01:23").toUTCString() - }; - }) + return { + TAG: /* Eq */0, + _0: "Mon, 08 Mar 1976 11:11:56 GMT", + _1: new Date("1976-03-08T12:34:56.789+01:23").toUTCString() + }; + }) ], tl: { hd: [ "eq", (function (param) { - const a = new Date("2013-03-01T01:10:00"); - const b = new Date("2013-03-01T01:10:00"); - const 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) - }; - }) + const a = new Date("2013-03-01T01:10:00"); + const b = new Date("2013-03-01T01:10:00"); + const 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) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_dict_test.js b/jscomp/test/dist/jscomp/test/js_dict_test.js index aa8c1ae70..03160ac25 100644 --- a/jscomp/test/dist/jscomp/test/js_dict_test.js +++ b/jscomp/test/dist/jscomp/test/js_dict_test.js @@ -14,230 +14,230 @@ function obj(param) { const suites_0 = [ "empty", (function (param) { - return { - TAG: /* Eq */0, - _0: [], - _1: Object.keys({}) - }; - }) + return { + TAG: /* Eq */0, + _0: [], + _1: Object.keys({}) + }; + }) ]; const suites_1 = { hd: [ "get", (function (param) { + return { + TAG: /* Eq */0, + _0: 43, + _1: Js__Js_dict.get({ + foo: 43, + bar: 86 + }, "foo") + }; + }) + ], + tl: { + hd: [ + "get - property not in object", + (function (param) { return { TAG: /* Eq */0, - _0: 43, + _0: undefined, _1: Js__Js_dict.get({ foo: 43, bar: 86 - }, "foo") + }, "baz") }; }) - ], - tl: { - hd: [ - "get - property not in object", - (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Js__Js_dict.get({ - foo: 43, - bar: 86 - }, "baz") - }; - }) ], tl: { hd: [ "unsafe_get", (function (param) { - return { - TAG: /* Eq */0, - _0: 43, - _1: ({ - foo: 43, - bar: 86 - })["foo"] - }; - }) + return { + TAG: /* Eq */0, + _0: 43, + _1: ({ + foo: 43, + bar: 86 + })["foo"] + }; + }) ], tl: { hd: [ "set", (function (param) { - const o = { - foo: 43, - bar: 86 - }; - o["foo"] = 36; - return { - TAG: /* Eq */0, - _0: 36, - _1: Js__Js_dict.get(o, "foo") - }; - }) + const o = { + foo: 43, + bar: 86 + }; + o["foo"] = 36; + return { + TAG: /* Eq */0, + _0: 36, + _1: Js__Js_dict.get(o, "foo") + }; + }) ], tl: { hd: [ "keys", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + "foo", + "bar" + ], + _1: Object.keys({ + foo: 43, + bar: 86 + }) + }; + }) + ], + tl: { + hd: [ + "entries", + (function (param) { return { TAG: /* Eq */0, _0: [ - "foo", - "bar" + [ + "foo", + 43 + ], + [ + "bar", + 86 + ] ], - _1: Object.keys({ + _1: Js__Js_dict.entries({ foo: 43, bar: 86 }) }; }) - ], - tl: { - hd: [ - "entries", - (function (param) { + ], + tl: { + hd: [ + "values", + (function (param) { return { TAG: /* Eq */0, _0: [ - [ - "foo", - 43 - ], - [ - "bar", - 86 - ] + 43, + 86 ], - _1: Js__Js_dict.entries({ + _1: Js__Js_dict.values({ foo: 43, bar: 86 }) }; }) - ], - tl: { - hd: [ - "values", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 43, - 86 - ], - _1: Js__Js_dict.values({ - foo: 43, - bar: 86 - }) - }; - }) ], tl: { hd: [ "fromList - []", (function (param) { - return { - TAG: /* Eq */0, - _0: {}, - _1: Js__Js_dict.fromList(/* [] */0) - }; - }) + return { + TAG: /* Eq */0, + _0: {}, + _1: Js__Js_dict.fromList(/* [] */0) + }; + }) ], tl: { hd: [ "fromList", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - [ - "x", - 23 - ], - [ - "y", - 46 - ] + return { + TAG: /* Eq */0, + _0: [ + [ + "x", + 23 ], - _1: Js__Js_dict.entries(Js__Js_dict.fromList({ + [ + "y", + 46 + ] + ], + _1: Js__Js_dict.entries(Js__Js_dict.fromList({ + hd: [ + "x", + 23 + ], + tl: { hd: [ - "x", - 23 + "y", + 46 ], - tl: { - hd: [ - "y", - 46 - ], - tl: /* [] */0 - } - })) - }; - }) + tl: /* [] */0 + } + })) + }; + }) ], tl: { hd: [ "fromArray - []", (function (param) { - return { - TAG: /* Eq */0, - _0: {}, - _1: Js__Js_dict.fromArray([]) - }; - }) + return { + TAG: /* Eq */0, + _0: {}, + _1: Js__Js_dict.fromArray([]) + }; + }) ], tl: { hd: [ "fromArray", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - [ - "x", - 23 - ], - [ - "y", - 46 - ] + return { + TAG: /* Eq */0, + _0: [ + [ + "x", + 23 ], - _1: Js__Js_dict.entries(Js__Js_dict.fromArray([ - [ - "x", - 23 - ], - [ - "y", - 46 - ] - ])) - }; - }) + [ + "y", + 46 + ] + ], + _1: Js__Js_dict.entries(Js__Js_dict.fromArray([ + [ + "x", + 23 + ], + [ + "y", + 46 + ] + ])) + }; + }) ], tl: { hd: [ "map", (function (param) { - return { - TAG: /* Eq */0, - _0: { - foo: "43", - bar: "86" - }, - _1: Js__Js_dict.map((function (i) { - return String(i); - }), { - foo: 43, - bar: 86 - }) - }; - }) + return { + TAG: /* Eq */0, + _0: { + foo: "43", + bar: "86" + }, + _1: Js__Js_dict.map((function (i) { + return String(i); + }), { + foo: 43, + bar: 86 + }) + }; + }) ], tl: /* [] */0 } 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 7a843134a..787aaf509 100644 --- a/jscomp/test/dist/jscomp/test/js_exception_catch_test.js +++ b/jscomp/test/dist/jscomp/test/js_exception_catch_test.js @@ -30,30 +30,30 @@ function add_test(loc, test) { function eq(loc, x, y) { add_test(loc, (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - })); + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + })); } function false_(loc) { add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } function true_(loc) { add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - })); + return { + TAG: /* Ok */4, + _0: true + }; + })); } let exit = 0; @@ -68,11 +68,11 @@ catch (raw_x){ const x = Caml_js_exceptions.internalToOCamlException(raw_x); if (x.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 { - TAG: /* Ok */4, - _0: true - }; - })); + return { + TAG: /* Ok */4, + _0: true + }; + })); } else { throw new Caml_js_exceptions.MelangeError(x.MEL_EXN_ID, x); } @@ -80,11 +80,11 @@ catch (raw_x){ if (exit === 1) { add_test("File \"jscomp/test/js_exception_catch_test.ml\", line 22, characters 16-23", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } const A = /* @__PURE__ */Caml_exceptions.create("Js_exception_catch_test.A"); diff --git a/jscomp/test/dist/jscomp/test/js_float_test.js b/jscomp/test/dist/jscomp/test/js_float_test.js index bbe9f39d2..84af66773 100644 --- a/jscomp/test/dist/jscomp/test/js_float_test.js +++ b/jscomp/test/dist/jscomp/test/js_float_test.js @@ -7,484 +7,484 @@ const Stdlib = require("melange/stdlib.js"); const suites_0 = [ "_NaN <> _NaN", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: NaN === NaN - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: NaN === NaN + }; + }) ]; const suites_1 = { hd: [ "isNaN - _NaN", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Number.isNaN(NaN) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Number.isNaN(NaN) + }; + }) ], tl: { hd: [ "isNaN - 0.", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Number.isNaN(0) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Number.isNaN(0) + }; + }) ], tl: { hd: [ "isFinite - infinity", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Number.isFinite(Stdlib.infinity) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Number.isFinite(Stdlib.infinity) + }; + }) ], tl: { hd: [ "isFinite - neg_infinity", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Number.isFinite(Stdlib.neg_infinity) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Number.isFinite(Stdlib.neg_infinity) + }; + }) ], tl: { hd: [ "isFinite - _NaN", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Number.isFinite(NaN) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Number.isFinite(NaN) + }; + }) ], tl: { hd: [ "isFinite - 0.", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Number.isFinite(0) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Number.isFinite(0) + }; + }) ], tl: { hd: [ "toExponential", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.23456e+2", - _1: (123.456).toExponential(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.23456e+2", + _1: (123.456).toExponential(undefined) + }; + }) ], tl: { hd: [ "toExponential - large number", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2e+21", - _1: (1.2e21).toExponential(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2e+21", + _1: (1.2e21).toExponential(undefined) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.23e+2", - _1: (123.456).toExponential(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.23e+2", + _1: (123.456).toExponential(2) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:4", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2346e+2", - _1: (123.456).toExponential(4) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2346e+2", + _1: (123.456).toExponential(4) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:20", (function (param) { - return { - TAG: /* Eq */0, - _0: "0.00000000000000000000e+0", - _1: (0).toExponential(20) - }; - }) + return { + TAG: /* Eq */0, + _0: "0.00000000000000000000e+0", + _1: (0).toExponential(20) + }; + }) ], tl: { hd: [ "File \"jscomp/test/js_float_test.ml\", line 31, characters 3-10", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toExponential(101); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toExponential(101); + }) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toExponential(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toExponential(-1); + }) + }; + }) ], tl: { hd: [ "toFixed", (function (param) { - return { - TAG: /* Eq */0, - _0: "123", - _1: (123.456).toFixed(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "123", + _1: (123.456).toFixed(undefined) + }; + }) ], tl: { hd: [ "toFixed - large number", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2e+21", - _1: (1.2e21).toFixed(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2e+21", + _1: (1.2e21).toFixed(undefined) + }; + }) ], tl: { hd: [ "toFixedWithPrecision - digits:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "123.46", - _1: (123.456).toFixed(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "123.46", + _1: (123.456).toFixed(2) + }; + }) ], tl: { hd: [ "toFixedWithPrecision - digits:4", (function (param) { - return { - TAG: /* Eq */0, - _0: "123.4560", - _1: (123.456).toFixed(4) - }; - }) + return { + TAG: /* Eq */0, + _0: "123.4560", + _1: (123.456).toFixed(4) + }; + }) ], tl: { hd: [ "toFixedWithPrecision - digits:20", (function (param) { - return { - TAG: /* Eq */0, - _0: "0.00000000000000000000", - _1: (0).toFixed(20) - }; - }) + return { + TAG: /* Eq */0, + _0: "0.00000000000000000000", + _1: (0).toFixed(20) + }; + }) ], tl: { hd: [ "toFixedWithPrecision - digits:101", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toFixed(101); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toFixed(101); + }) + }; + }) ], tl: { hd: [ "toFixedWithPrecision - digits:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toFixed(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toFixed(-1); + }) + }; + }) ], tl: { hd: [ "toPrecision", (function (param) { - return { - TAG: /* Eq */0, - _0: "123.456", - _1: (123.456).toPrecision(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "123.456", + _1: (123.456).toPrecision(undefined) + }; + }) ], tl: { hd: [ "toPrecision - large number", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2e+21", - _1: (1.2e21).toPrecision(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2e+21", + _1: (1.2e21).toPrecision(undefined) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2e+2", - _1: (123.456).toPrecision(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2e+2", + _1: (123.456).toPrecision(2) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:4", (function (param) { - return { - TAG: /* Eq */0, - _0: "123.5", - _1: (123.456).toPrecision(4) - }; - }) + return { + TAG: /* Eq */0, + _0: "123.5", + _1: (123.456).toPrecision(4) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:20", (function (param) { - return { - TAG: /* Eq */0, - _0: "0.0000000000000000000", - _1: (0).toPrecision(20) - }; - }) + return { + TAG: /* Eq */0, + _0: "0.0000000000000000000", + _1: (0).toPrecision(20) + }; + }) ], tl: { hd: [ "File \"jscomp/test/js_float_test.ml\", line 61, characters 3-10", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toPrecision(101); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toPrecision(101); + }) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toPrecision(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toPrecision(-1); + }) + }; + }) ], tl: { hd: [ "toString", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.23", - _1: (1.23).toString(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.23", + _1: (1.23).toString(undefined) + }; + }) ], tl: { hd: [ "toString - large number", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2e+21", - _1: (1.2e21).toString(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2e+21", + _1: (1.2e21).toString(undefined) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "1111011.0111010010111100011010100111111011111001110111", - _1: (123.456).toString(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "1111011.0111010010111100011010100111111011111001110111", + _1: (123.456).toString(2) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:16", (function (param) { - return { - TAG: /* Eq */0, - _0: "7b.74bc6a7ef9dc", - _1: (123.456).toString(16) - }; - }) + return { + TAG: /* Eq */0, + _0: "7b.74bc6a7ef9dc", + _1: (123.456).toString(16) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:36", (function (param) { - return { - TAG: /* Eq */0, - _0: "3f", - _1: (123).toString(36) - }; - }) + return { + TAG: /* Eq */0, + _0: "3f", + _1: (123).toString(36) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:37", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toString(37); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toString(37); + }) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toString(1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toString(1); + }) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toString(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toString(-1); + }) + }; + }) ], tl: { hd: [ "fromString - 123", (function (param) { - return { - TAG: /* Eq */0, - _0: 123, - _1: Number("123") - }; - }) + return { + TAG: /* Eq */0, + _0: 123, + _1: Number("123") + }; + }) ], tl: { hd: [ "fromString - 12.3", (function (param) { - return { - TAG: /* Eq */0, - _0: 12.3, - _1: Number("12.3") - }; - }) + return { + TAG: /* Eq */0, + _0: 12.3, + _1: Number("12.3") + }; + }) ], tl: { hd: [ "fromString - empty string", (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: Number("") - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: Number("") + }; + }) ], tl: { hd: [ "fromString - 0x11", (function (param) { - return { - TAG: /* Eq */0, - _0: 17, - _1: Number("0x11") - }; - }) + return { + TAG: /* Eq */0, + _0: 17, + _1: Number("0x11") + }; + }) ], tl: { hd: [ "fromString - 0b11", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Number("0b11") - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: Number("0b11") + }; + }) ], tl: { hd: [ "fromString - 0o11", (function (param) { - return { - TAG: /* Eq */0, - _0: 9, - _1: Number("0o11") - }; - }) + return { + TAG: /* Eq */0, + _0: 9, + _1: Number("0o11") + }; + }) ], tl: { hd: [ "fromString - invalid string", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Number.isNaN(Number("foo")) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Number.isNaN(Number("foo")) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_global_test.js b/jscomp/test/dist/jscomp/test/js_global_test.js index 23dda09d5..74df70caa 100644 --- a/jscomp/test/dist/jscomp/test/js_global_test.js +++ b/jscomp/test/dist/jscomp/test/js_global_test.js @@ -6,74 +6,74 @@ const Mt = require("./mt.js"); const suites_0 = [ "setTimeout/clearTimeout sanity check", (function (param) { - const handle = setTimeout((function (param) { - - }), 0); - clearTimeout(handle); - return { - TAG: /* Ok */4, - _0: true - }; - }) + const handle = setTimeout((function (param) { + + }), 0); + clearTimeout(handle); + return { + TAG: /* Ok */4, + _0: true + }; + }) ]; const suites_1 = { hd: [ "setInerval/clearInterval sanity check", (function (param) { - const handle = setInterval((function (param) { - - }), 0); - clearInterval(handle); - return { - TAG: /* Ok */4, - _0: true - }; - }) + const handle = setInterval((function (param) { + + }), 0); + clearInterval(handle); + return { + TAG: /* Ok */4, + _0: true + }; + }) ], tl: { hd: [ "encodeURI", (function (param) { - return { - TAG: /* Eq */0, - _0: encodeURI("[-=-]"), - _1: "%5B-=-%5D" - }; - }) + return { + TAG: /* Eq */0, + _0: encodeURI("[-=-]"), + _1: "%5B-=-%5D" + }; + }) ], tl: { hd: [ "decodeURI", (function (param) { - return { - TAG: /* Eq */0, - _0: decodeURI("%5B-=-%5D"), - _1: "[-=-]" - }; - }) + return { + TAG: /* Eq */0, + _0: decodeURI("%5B-=-%5D"), + _1: "[-=-]" + }; + }) ], tl: { hd: [ "encodeURIComponent", (function (param) { - return { - TAG: /* Eq */0, - _0: encodeURIComponent("[-=-]"), - _1: "%5B-%3D-%5D" - }; - }) + return { + TAG: /* Eq */0, + _0: encodeURIComponent("[-=-]"), + _1: "%5B-%3D-%5D" + }; + }) ], tl: { hd: [ "decodeURIComponent", (function (param) { - return { - TAG: /* Eq */0, - _0: decodeURIComponent("%5B-%3D-%5D"), - _1: "[-=-]" - }; - }) + return { + TAG: /* Eq */0, + _0: decodeURIComponent("%5B-%3D-%5D"), + _1: "[-=-]" + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_int_test.js b/jscomp/test/dist/jscomp/test/js_int_test.js index 5b9046cf8..b2d84aa94 100644 --- a/jscomp/test/dist/jscomp/test/js_int_test.js +++ b/jscomp/test/dist/jscomp/test/js_int_test.js @@ -6,218 +6,218 @@ const Mt = require("./mt.js"); const suites_0 = [ "toExponential", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.23456e+5", - _1: (123456).toExponential(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.23456e+5", + _1: (123456).toExponential(undefined) + }; + }) ]; const suites_1 = { hd: [ "toExponentialWithPrecision - digits:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.23e+5", - _1: (123456).toExponential(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.23e+5", + _1: (123456).toExponential(2) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:4", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2346e+5", - _1: (123456).toExponential(4) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2346e+5", + _1: (123456).toExponential(4) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:20", (function (param) { - return { - TAG: /* Eq */0, - _0: "0.00000000000000000000e+0", - _1: (0).toExponential(20) - }; - }) + return { + TAG: /* Eq */0, + _0: "0.00000000000000000000e+0", + _1: (0).toExponential(20) + }; + }) ], tl: { hd: [ "File \"jscomp/test/js_int_test.ml\", line 12, characters 3-10", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toExponential(101); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toExponential(101); + }) + }; + }) ], tl: { hd: [ "toExponentialWithPrecision - digits:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toExponential(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toExponential(-1); + }) + }; + }) ], tl: { hd: [ "toPrecision", (function (param) { - return { - TAG: /* Eq */0, - _0: "123456", - _1: (123456).toPrecision(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "123456", + _1: (123456).toPrecision(undefined) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.2e+5", - _1: (123456).toPrecision(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.2e+5", + _1: (123456).toPrecision(2) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:4", (function (param) { - return { - TAG: /* Eq */0, - _0: "1.235e+5", - _1: (123456).toPrecision(4) - }; - }) + return { + TAG: /* Eq */0, + _0: "1.235e+5", + _1: (123456).toPrecision(4) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:20", (function (param) { - return { - TAG: /* Eq */0, - _0: "0.0000000000000000000", - _1: (0).toPrecision(20) - }; - }) + return { + TAG: /* Eq */0, + _0: "0.0000000000000000000", + _1: (0).toPrecision(20) + }; + }) ], tl: { hd: [ "File \"jscomp/test/js_int_test.ml\", line 25, characters 3-10", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toPrecision(101); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toPrecision(101); + }) + }; + }) ], tl: { hd: [ "toPrecisionWithPrecision - digits:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toPrecision(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toPrecision(-1); + }) + }; + }) ], tl: { hd: [ "toString", (function (param) { - return { - TAG: /* Eq */0, - _0: "123", - _1: (123).toString(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "123", + _1: (123).toString(undefined) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:2", (function (param) { - return { - TAG: /* Eq */0, - _0: "11110001001000000", - _1: (123456).toString(2) - }; - }) + return { + TAG: /* Eq */0, + _0: "11110001001000000", + _1: (123456).toString(2) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:16", (function (param) { - return { - TAG: /* Eq */0, - _0: "1e240", - _1: (123456).toString(16) - }; - }) + return { + TAG: /* Eq */0, + _0: "1e240", + _1: (123456).toString(16) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:36", (function (param) { - return { - TAG: /* Eq */0, - _0: "2n9c", - _1: (123456).toString(36) - }; - }) + return { + TAG: /* Eq */0, + _0: "2n9c", + _1: (123456).toString(36) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:37", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toString(37); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toString(37); + }) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toString(1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toString(1); + }) + }; + }) ], tl: { hd: [ "toStringWithRadix - radix:-1", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - (0).toString(-1); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + (0).toString(-1); + }) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_json_test.js b/jscomp/test/dist/jscomp/test/js_json_test.js index d2bd7dfb5..877b0a1aa 100644 --- a/jscomp/test/dist/jscomp/test/js_json_test.js +++ b/jscomp/test/dist/jscomp/test/js_json_test.js @@ -33,83 +33,71 @@ function add_test(loc, test) { function eq(loc, x, y) { add_test(loc, (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - })); + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + })); } function false_(loc) { add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } function true_(loc) { add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - })); + return { + TAG: /* Ok */4, + _0: true + }; + })); } const v = JSON.parse(" { \"x\" : [1, 2, 3 ] } "); add_test("File \"jscomp/test/js_json_test.ml\", line 24, characters 11-18", (function (param) { - const ty = Js__Js_json.classify(v); - if (/* tag */typeof ty === "number" || typeof ty === "string") { - return { - TAG: /* Ok */4, - _0: false - }; - } - if (ty.TAG !== /* JSONObject */2) { - return { - TAG: /* Ok */4, - _0: false - }; - } - const v$1 = Js__Js_dict.get(ty._0, "x"); - if (v$1 === undefined) { - return { - TAG: /* Ok */4, - _0: false - }; - } - const ty2 = Js__Js_json.classify(Caml_option.valFromOption(v$1)); - if (/* tag */typeof ty2 === "number" || typeof ty2 === "string") { - return { - TAG: /* Ok */4, - _0: false - }; - } - if (ty2.TAG !== /* JSONArray */3) { - return { - TAG: /* Ok */4, - _0: false - }; - } - ty2._0.forEach(function (x) { - const ty3 = Js__Js_json.classify(x); - if (/* tag */typeof ty3 === "number" || typeof ty3 === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/js_json_test.ml", - 38, - 21 - ] - }); - } - if (ty3.TAG === /* JSONNumber */1) { - return; - } + const ty = Js__Js_json.classify(v); + if (/* tag */typeof ty === "number" || typeof ty === "string") { + return { + TAG: /* Ok */4, + _0: false + }; + } + if (ty.TAG !== /* JSONObject */2) { + return { + TAG: /* Ok */4, + _0: false + }; + } + const v$1 = Js__Js_dict.get(ty._0, "x"); + if (v$1 === undefined) { + return { + TAG: /* Ok */4, + _0: false + }; + } + const ty2 = Js__Js_json.classify(Caml_option.valFromOption(v$1)); + if (/* tag */typeof ty2 === "number" || typeof ty2 === "string") { + return { + TAG: /* Ok */4, + _0: false + }; + } + if (ty2.TAG !== /* JSONArray */3) { + return { + TAG: /* Ok */4, + _0: false + }; + } + ty2._0.forEach(function (x) { + const ty3 = Js__Js_json.classify(x); + if (/* tag */typeof ty3 === "number" || typeof ty3 === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -118,12 +106,24 @@ add_test("File \"jscomp/test/js_json_test.ml\", line 24, characters 11-18", (fun 21 ] }); - }); - return { - TAG: /* Ok */4, - _0: true - }; - })); + } + if (ty3.TAG === /* JSONNumber */1) { + return; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/js_json_test.ml", + 38, + 21 + ] + }); + }); + return { + TAG: /* Ok */4, + _0: true + }; + })); eq("File \"jscomp/test/js_json_test.ml\", line 49, characters 5-12", Js__Js_json.test(v, /* Object */2), true); @@ -134,28 +134,28 @@ const ty = Js__Js_json.classify(json); if (/* tag */typeof ty === "number" || typeof ty === "string") { if (ty === /* JSONNull */2) { add_test("File \"jscomp/test/js_json_test.ml\", line 55, characters 24-31", (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - })); + return { + TAG: /* Ok */4, + _0: true + }; + })); } else { console.log(ty); add_test("File \"jscomp/test/js_json_test.ml\", line 56, characters 27-34", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); - } -} else { - console.log(ty); - add_test("File \"jscomp/test/js_json_test.ml\", line 56, characters 27-34", (function (param) { return { TAG: /* Ok */4, _0: false }; })); + } +} else { + console.log(ty); + add_test("File \"jscomp/test/js_json_test.ml\", line 56, characters 27-34", (function (param) { + return { + TAG: /* Ok */4, + _0: false + }; + })); } const json$1 = JSON.parse(JSON.stringify("test string")); @@ -164,20 +164,20 @@ const ty$1 = Js__Js_json.classify(json$1); if (/* tag */typeof ty$1 === "number" || typeof ty$1 === "string") { add_test("File \"jscomp/test/js_json_test.ml\", line 66, characters 16-23", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } else if (ty$1.TAG === /* JSONString */0) { eq("File \"jscomp/test/js_json_test.ml\", line 65, characters 25-32", ty$1._0, "test string"); } else { add_test("File \"jscomp/test/js_json_test.ml\", line 66, characters 16-23", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } const json$2 = JSON.parse(JSON.stringify(1.23456789)); @@ -194,11 +194,11 @@ if (/* tag */typeof ty$2 === "number" || typeof ty$2 === "string" || ty$2.TAG != if (exit === 1) { add_test("File \"jscomp/test/js_json_test.ml\", line 76, characters 18-25", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } const json$3 = JSON.parse(JSON.stringify(-1347440721)); @@ -215,11 +215,11 @@ if (/* tag */typeof ty$3 === "number" || typeof ty$3 === "string" || ty$3.TAG != if (exit$1 === 1) { add_test("File \"jscomp/test/js_json_test.ml\", line 86, characters 18-25", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } function test(v) { @@ -227,11 +227,11 @@ function test(v) { const ty = Js__Js_json.classify(json); if (!/* tag */(typeof ty === "number" || typeof ty === "string")) { return add_test("File \"jscomp/test/js_json_test.ml\", line 97, characters 18-25", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } switch (ty) { case /* JSONFalse */0 : @@ -240,11 +240,11 @@ function test(v) { return eq("File \"jscomp/test/js_json_test.ml\", line 95, characters 24-31", true, v); default: return add_test("File \"jscomp/test/js_json_test.ml\", line 97, characters 18-25", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } } @@ -278,173 +278,173 @@ const ty$4 = Js__Js_json.classify(json$4); if (/* tag */typeof ty$4 === "number" || typeof ty$4 === "string") { add_test("File \"jscomp/test/js_json_test.ml\", line 135, characters 16-23", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } else if (ty$4.TAG === /* JSONObject */2) { const x = ty$4._0; const ta = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "a"))); if (/* tag */typeof ta === "number" || typeof ta === "string") { add_test("File \"jscomp/test/js_json_test.ml\", line 133, characters 18-25", (function (param) { + return { + TAG: /* Ok */4, + _0: false + }; + })); + } else if (ta.TAG === /* JSONString */0) { + if (ta._0 !== "test string") { + add_test("File \"jscomp/test/js_json_test.ml\", line 124, characters 18-25", (function (param) { return { TAG: /* Ok */4, _0: false }; })); - } else if (ta.TAG === /* JSONString */0) { - if (ta._0 !== "test string") { - add_test("File \"jscomp/test/js_json_test.ml\", line 124, characters 18-25", (function (param) { + } else { + const ty$5 = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "b"))); + if (/* tag */typeof ty$5 === "number" || typeof ty$5 === "string") { + add_test("File \"jscomp/test/js_json_test.ml\", line 131, characters 22-29", (function (param) { return { TAG: /* Ok */4, _0: false }; })); - } else { - const ty$5 = Js__Js_json.classify(option_get(Js__Js_dict.get(x, "b"))); - if (/* tag */typeof ty$5 === "number" || typeof ty$5 === "string") { - add_test("File \"jscomp/test/js_json_test.ml\", line 131, characters 22-29", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); } else if (ty$5.TAG === /* JSONNumber */1) { const b = ty$5._0; add_test("File \"jscomp/test/js_json_test.ml\", line 130, characters 19-26", (function (param) { - return { - TAG: /* Approx */5, - _0: 123.0, - _1: b - }; - })); + return { + TAG: /* Approx */5, + _0: 123.0, + _1: b + }; + })); } else { add_test("File \"jscomp/test/js_json_test.ml\", line 131, characters 22-29", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } } } else { add_test("File \"jscomp/test/js_json_test.ml\", line 133, characters 18-25", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); - } -} else { - add_test("File \"jscomp/test/js_json_test.ml\", line 135, characters 16-23", (function (param) { return { TAG: /* Ok */4, _0: false }; })); + } +} else { + add_test("File \"jscomp/test/js_json_test.ml\", line 135, characters 16-23", (function (param) { + return { + TAG: /* Ok */4, + _0: false + }; + })); } function eq_at_i(loc, json, i, kind, expected) { const ty = Js__Js_json.classify(json); if (/* tag */typeof ty === "number" || typeof ty === "string") { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } if (ty.TAG !== /* JSONArray */3) { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } const ty$1 = Js__Js_json.classify(Caml_array.get(ty._0, i)); switch (kind) { case /* String */0 : if (/* tag */typeof ty$1 === "number" || typeof ty$1 === "string") { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } else if (ty$1.TAG === /* JSONString */0) { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } case /* Number */1 : if (/* tag */typeof ty$1 === "number" || typeof ty$1 === "string") { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } else if (ty$1.TAG === /* JSONNumber */1) { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } case /* Object */2 : if (/* tag */typeof ty$1 === "number" || typeof ty$1 === "string") { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } else if (ty$1.TAG === /* JSONObject */2) { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } case /* Array */3 : if (/* tag */typeof ty$1 === "number" || typeof ty$1 === "string") { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } else if (ty$1.TAG === /* JSONArray */3) { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } case /* Boolean */4 : if (!/* tag */(typeof ty$1 === "number" || typeof ty$1 === "string")) { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } switch (ty$1) { case /* JSONFalse */0 : @@ -453,44 +453,44 @@ function eq_at_i(loc, json, i, kind, expected) { return eq(loc, true, expected); default: return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } case /* Null */5 : if (/* tag */typeof ty$1 === "number" || typeof ty$1 === "string") { if (ty$1 === /* JSONNull */2) { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - })); + return { + TAG: /* Ok */4, + _0: true + }; + })); } else { return add_test(loc, (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); - } - } else { - return add_test(loc, (function (param) { return { TAG: /* Ok */4, _0: false }; })); + } + } else { + return add_test(loc, (function (param) { + return { + TAG: /* Ok */4, + _0: false + }; + })); } } } const json$5 = JSON.parse(JSON.stringify(Stdlib__Array.map((function (prim) { - return prim; - }), [ + return prim; + }), [ "string 0", "string 1", "string 2" @@ -535,8 +535,8 @@ const a$1 = [ ]; const json$8 = JSON.parse(JSON.stringify(Stdlib__Array.map((function (prim) { - return prim; - }), a$1))); + return prim; + }), a$1))); eq_at_i("File \"jscomp/test/js_json_test.ml\", line 235, characters 10-17", json$8, 0, /* Number */1, Caml_array.get(a$1, 0)); @@ -576,72 +576,72 @@ const ty$6 = Js__Js_json.classify(json$10); if (/* tag */typeof ty$6 === "number" || typeof ty$6 === "string") { add_test("File \"jscomp/test/js_json_test.ml\", line 283, characters 16-23", (function (param) { + return { + TAG: /* Ok */4, + _0: false + }; + })); +} else if (ty$6.TAG === /* JSONArray */3) { + const ty$7 = Js__Js_json.classify(Caml_array.get(ty$6._0, 1)); + if (/* tag */typeof ty$7 === "number" || typeof ty$7 === "string") { + add_test("File \"jscomp/test/js_json_test.ml\", line 281, characters 18-25", (function (param) { return { TAG: /* Ok */4, _0: false }; })); -} else if (ty$6.TAG === /* JSONArray */3) { - const ty$7 = Js__Js_json.classify(Caml_array.get(ty$6._0, 1)); - if (/* tag */typeof ty$7 === "number" || typeof ty$7 === "string") { - add_test("File \"jscomp/test/js_json_test.ml\", line 281, characters 18-25", (function (param) { + } else if (ty$7.TAG === /* JSONObject */2) { + const ty$8 = Js__Js_json.classify(option_get(Js__Js_dict.get(ty$7._0, "a"))); + if (/* tag */typeof ty$8 === "number" || typeof ty$8 === "string") { + add_test("File \"jscomp/test/js_json_test.ml\", line 279, characters 20-27", (function (param) { return { TAG: /* Ok */4, _0: false }; })); - } else if (ty$7.TAG === /* JSONObject */2) { - const ty$8 = Js__Js_json.classify(option_get(Js__Js_dict.get(ty$7._0, "a"))); - if (/* tag */typeof ty$8 === "number" || typeof ty$8 === "string") { - add_test("File \"jscomp/test/js_json_test.ml\", line 279, characters 20-27", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); } else if (ty$8.TAG === /* JSONString */0) { eq("File \"jscomp/test/js_json_test.ml\", line 278, characters 34-41", ty$8._0, "bbb"); } else { add_test("File \"jscomp/test/js_json_test.ml\", line 279, characters 20-27", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); - } - } else { - add_test("File \"jscomp/test/js_json_test.ml\", line 281, characters 18-25", (function (param) { return { TAG: /* Ok */4, _0: false }; })); - } -} else { - add_test("File \"jscomp/test/js_json_test.ml\", line 283, characters 16-23", (function (param) { + } + } else { + add_test("File \"jscomp/test/js_json_test.ml\", line 281, characters 18-25", (function (param) { return { TAG: /* Ok */4, _0: false }; })); + } +} else { + add_test("File \"jscomp/test/js_json_test.ml\", line 283, characters 16-23", (function (param) { + return { + TAG: /* Ok */4, + _0: false + }; + })); } try { JSON.parse("{{ A}"); add_test("File \"jscomp/test/js_json_test.ml\", line 289, characters 11-18", (function (param) { - return { - TAG: /* Ok */4, - _0: false - }; - })); + return { + TAG: /* Ok */4, + _0: false + }; + })); } catch (exn){ add_test("File \"jscomp/test/js_json_test.ml\", line 292, characters 10-17", (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - })); + return { + TAG: /* Ok */4, + _0: true + }; + })); } eq("File \"jscomp/test/js_json_test.ml\", line 296, characters 12-19", JSON.stringify([ @@ -754,20 +754,20 @@ idtest({ }); idtest(Belt__Belt_List.makeBy(500, (function (i) { - if (i % 2 === 0) { - return; - } else { - return 1; - } - }))); + if (i % 2 === 0) { + return; + } else { + return 1; + } + }))); idtest(Belt__Belt_Array.makeBy(500, (function (i) { - if (i % 2 === 0) { - return; - } else { - return 1; - } - }))); + if (i % 2 === 0) { + return; + } else { + return 1; + } + }))); Mt.from_pair_suites("Js_json_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/js_map_test.js b/jscomp/test/dist/jscomp/test/js_map_test.js index 167edc24a..bb3ba6aa8 100644 --- a/jscomp/test/dist/jscomp/test/js_map_test.js +++ b/jscomp/test/dist/jscomp/test/js_map_test.js @@ -7,91 +7,112 @@ const Mt = require("./mt.js"); const suites_0 = [ "fromArray/toArray", (function (param) { - const array = [ - [ - 1, - "a" - ], - [ - 2, - "b" - ], - [ - 3, - "c" - ] - ]; - const map = new Map(array); - return { - TAG: /* Eq */0, - _0: array, - _1: Array.from(map) - }; - }) + const array = [ + [ + 1, + "a" + ], + [ + 2, + "b" + ], + [ + 3, + "c" + ] + ]; + const map = new Map(array); + return { + TAG: /* Eq */0, + _0: array, + _1: Array.from(map) + }; + }) ]; const suites_1 = { hd: [ "size - empty map", (function (param) { - const map = new Map(); - return { - TAG: /* Eq */0, - _0: 0, - _1: map.size - }; - }) + const map = new Map(); + return { + TAG: /* Eq */0, + _0: 0, + _1: map.size + }; + }) ], tl: { hd: [ "size", (function (param) { + const map = new Map([ + [ + 1, + "one" + ], + [ + 2, + "two" + ], + [ + 2, + "two" + ] + ]); + return { + TAG: /* Eq */0, + _0: 2, + _1: map.size + }; + }) + ], + tl: { + hd: [ + "size - with duplicates", + (function (param) { const map = new Map([ [ 1, "one" ], [ - 2, - "two" - ], - [ - 2, - "two" + 1, + "one" ] ]); return { TAG: /* Eq */0, - _0: 2, + _0: 1, _1: map.size }; }) - ], - tl: { - hd: [ - "size - with duplicates", - (function (param) { + ], + tl: { + hd: [ + "has - true", + (function (param) { const map = new Map([ [ 1, "one" ], [ - 1, - "one" + 2, + "two" ] ]); return { TAG: /* Eq */0, - _0: 1, - _1: map.size + _0: true, + _1: map.has(1) }; }) - ], - tl: { - hd: [ - "has - true", - (function (param) { + ], + tl: { + hd: [ + "has - false", + (function (param) { const map = new Map([ [ 1, @@ -104,15 +125,15 @@ const suites_1 = { ]); return { TAG: /* Eq */0, - _0: true, - _1: map.has(1) + _0: false, + _1: map.has(3) }; }) - ], - tl: { - hd: [ - "has - false", - (function (param) { + ], + tl: { + hd: [ + "get", + (function (param) { const map = new Map([ [ 1, @@ -123,70 +144,77 @@ const suites_1 = { "two" ] ]); + const one = map.get(1); + const two = map.get(2); + const three = map.get(3); return { TAG: /* Eq */0, - _0: false, - _1: map.has(3) + _0: [ + "one", + "two", + undefined + ], + _1: [ + one === undefined ? undefined : Caml_option.some(one), + two === undefined ? undefined : Caml_option.some(two), + three === undefined ? undefined : Caml_option.some(three) + ] }; }) - ], - tl: { - hd: [ - "get", - (function (param) { - const map = new Map([ - [ - 1, - "one" - ], - [ - 2, - "two" - ] - ]); - const one = map.get(1); - const two = map.get(2); - const three = map.get(3); + ], + tl: { + hd: [ + "set", + (function (param) { + const map = new Map().set(1, "one").set(2, "two"); return { TAG: /* Eq */0, _0: [ - "one", - "two", - undefined + [ + 1, + "one" + ], + [ + 2, + "two" + ] ], - _1: [ - one === undefined ? undefined : Caml_option.some(one), - two === undefined ? undefined : Caml_option.some(two), - three === undefined ? undefined : Caml_option.some(three) - ] + _1: Array.from(map) }; }) - ], - tl: { - hd: [ - "set", - (function (param) { - const map = new Map().set(1, "one").set(2, "two"); + ], + tl: { + hd: [ + "delete", + (function (param) { + const map = new Map([ + [ + 1, + "one" + ], + [ + 2, + "two" + ] + ]); + const deleted = map.delete(2); return { TAG: /* Eq */0, _0: [ - [ - 1, - "one" - ], - [ - 2, - "two" - ] + true, + false ], - _1: Array.from(map) + _1: [ + deleted, + map.has(2) + ] }; }) - ], - tl: { - hd: [ - "delete", - (function (param) { + ], + tl: { + hd: [ + "clear", + (function (param) { const map = new Map([ [ 1, @@ -197,90 +225,41 @@ const suites_1 = { "two" ] ]); - const deleted = map.delete(2); + map.clear(); return { TAG: /* Eq */0, - _0: [ - true, - false - ], - _1: [ - deleted, - map.has(2) - ] + _0: 0, + _1: map.size }; }) - ], - tl: { - hd: [ - "clear", - (function (param) { - const map = new Map([ - [ - 1, - "one" - ], - [ - 2, - "two" - ] - ]); - map.clear(); - return { - TAG: /* Eq */0, - _0: 0, - _1: map.size - }; - }) ], tl: { hd: [ "set mutate + return new map", (function (param) { - const map_1 = new Map(); - const map_2 = map_1.set(1, "one"); - const map_3 = map_2.set(2, "two"); - const all_same_size = map_1.size === 2 && map_2.size === 2 && map_3.size === 2; - const all_same_ref = map_1 === map_2 && map_2 === map_3; - return { - TAG: /* Eq */0, - _0: [ - true, - true - ], - _1: [ - all_same_size, - all_same_ref - ] - }; - }) + const map_1 = new Map(); + const map_2 = map_1.set(1, "one"); + const map_3 = map_2.set(2, "two"); + const all_same_size = map_1.size === 2 && map_2.size === 2 && map_3.size === 2; + const all_same_ref = map_1 === map_2 && map_2 === map_3; + return { + TAG: /* Eq */0, + _0: [ + true, + true + ], + _1: [ + all_same_size, + all_same_ref + ] + }; + }) ], tl: { hd: [ "forEach", (function (param) { - const map = new Map([ - [ - 1, - "one" - ], - [ - 2, - "two" - ] - ]); - const arr = { - contents: [] - }; - map.forEach(function (value, key, param) { - arr.contents.push([ - key, - value - ]); - }); - return { - TAG: /* Eq */0, - _0: [ + const map = new Map([ [ 1, "one" @@ -289,16 +268,61 @@ const suites_1 = { 2, "two" ] + ]); + const arr = { + contents: [] + }; + map.forEach(function (value, key, param) { + arr.contents.push([ + key, + value + ]); + }); + return { + TAG: /* Eq */0, + _0: [ + [ + 1, + "one" ], - _1: arr.contents - }; - }) + [ + 2, + "two" + ] + ], + _1: arr.contents + }; + }) ], tl: { hd: [ "keys", (function (param) { - const keys = Array.from(new Map([ + const keys = Array.from(new Map([ + [ + 1, + "one" + ], + [ + 2, + "two" + ] + ]).keys()); + return { + TAG: /* Eq */0, + _0: [ + 1, + 2 + ], + _1: keys + }; + }) + ], + tl: { + hd: [ + "values", + (function (param) { + const values = Array.from(new Map([ [ 1, "one" @@ -307,62 +331,38 @@ const suites_1 = { 2, "two" ] - ]).keys()); + ]).values()); return { TAG: /* Eq */0, _0: [ - 1, - 2 + "one", + "two" ], - _1: keys + _1: values }; }) - ], - tl: { - hd: [ - "values", - (function (param) { - const values = Array.from(new Map([ - [ - 1, - "one" - ], - [ - 2, - "two" - ] - ]).values()); - return { - TAG: /* Eq */0, - _0: [ - "one", - "two" - ], - _1: values - }; - }) ], tl: { hd: [ "entries", (function (param) { - const array = [ - [ - 1, - "one" - ], - [ - 2, - "two" - ] - ]; - const entries = Array.from(new Map(array).entries()); - return { - TAG: /* Eq */0, - _0: array, - _1: entries - }; - }) + const array = [ + [ + 1, + "one" + ], + [ + 2, + "two" + ] + ]; + const entries = Array.from(new Map(array).entries()); + return { + TAG: /* Eq */0, + _0: array, + _1: entries + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_math_test.js b/jscomp/test/dist/jscomp/test/js_math_test.js index 7bcc9133c..6a7b657a7 100644 --- a/jscomp/test/dist/jscomp/test/js_math_test.js +++ b/jscomp/test/dist/jscomp/test/js_math_test.js @@ -7,670 +7,670 @@ const Mt = require("./mt.js"); const suites_0 = [ "_E", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 2.718, - _2: Math.E - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 2.718, + _2: Math.E + }; + }) ]; const suites_1 = { hd: [ "_LN2", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.693, - _2: Math.LN2 - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.693, + _2: Math.LN2 + }; + }) ], tl: { hd: [ "_LN10", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 2.303, - _2: Math.LN10 - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 2.303, + _2: Math.LN10 + }; + }) ], tl: { hd: [ "_LOG2E", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 1.443, - _2: Math.LOG2E - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 1.443, + _2: Math.LOG2E + }; + }) ], tl: { hd: [ "_LOG10E", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.434, - _2: Math.LOG10E - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.434, + _2: Math.LOG10E + }; + }) ], tl: { hd: [ "_PI", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.00001, - _1: 3.14159, - _2: Math.PI - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.00001, + _1: 3.14159, + _2: Math.PI + }; + }) ], tl: { hd: [ "_SQRT1_2", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.707, - _2: Math.SQRT1_2 - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.707, + _2: Math.SQRT1_2 + }; + }) ], tl: { hd: [ "_SQRT2", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 1.414, - _2: Math.SQRT2 - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 1.414, + _2: Math.SQRT2 + }; + }) ], tl: { hd: [ "abs_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Math.abs(-4) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Math.abs(-4) + }; + }) ], tl: { hd: [ "abs_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 1.2, - _1: Math.abs(-1.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 1.2, + _1: Math.abs(-1.2) + }; + }) ], tl: { hd: [ "acos", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 1.159, - _2: Math.acos(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 1.159, + _2: Math.acos(0.4) + }; + }) ], tl: { hd: [ "acosh", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.622, - _2: Math.acosh(1.2) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.622, + _2: Math.acosh(1.2) + }; + }) ], tl: { hd: [ "asin", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.411, - _2: Math.asin(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.411, + _2: Math.asin(0.4) + }; + }) ], tl: { hd: [ "asinh", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.390, - _2: Math.asinh(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.390, + _2: Math.asinh(0.4) + }; + }) ], tl: { hd: [ "atan", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.380, - _2: Math.atan(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.380, + _2: Math.atan(0.4) + }; + }) ], tl: { hd: [ "atanh", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.423, - _2: Math.atanh(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.423, + _2: Math.atanh(0.4) + }; + }) ], tl: { hd: [ "atan2", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.588, - _2: Math.atan2(0.4, 0.6) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.588, + _2: Math.atan2(0.4, 0.6) + }; + }) ], tl: { hd: [ "cbrt", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Math.cbrt(8) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Math.cbrt(8) + }; + }) ], tl: { hd: [ "unsafe_ceil_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Math.ceil(3.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Math.ceil(3.2) + }; + }) ], tl: { hd: [ "ceil_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Js__Js_math.ceil_int(3.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Js__Js_math.ceil_int(3.2) + }; + }) ], tl: { hd: [ "ceil_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Math.ceil(3.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Math.ceil(3.2) + }; + }) ], tl: { hd: [ "cos", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.921, - _2: Math.cos(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.921, + _2: Math.cos(0.4) + }; + }) ], tl: { hd: [ "cosh", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 1.081, - _2: Math.cosh(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 1.081, + _2: Math.cosh(0.4) + }; + }) ], tl: { hd: [ "exp", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 1.491, - _2: Math.exp(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 1.491, + _2: Math.exp(0.4) + }; + }) ], tl: { hd: [ "expm1", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.491, - _2: Math.expm1(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.491, + _2: Math.expm1(0.4) + }; + }) ], tl: { hd: [ "unsafe_floor_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Math.floor(3.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: Math.floor(3.2) + }; + }) ], tl: { hd: [ "floor_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Js__Js_math.floor_int(3.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: Js__Js_math.floor_int(3.2) + }; + }) ], tl: { hd: [ "floor_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Math.floor(3.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: Math.floor(3.2) + }; + }) ], tl: { hd: [ "fround", (function (param) { - return { - TAG: /* Approx */5, - _0: 3.2, - _1: Math.fround(3.2) - }; - }) + return { + TAG: /* Approx */5, + _0: 3.2, + _1: Math.fround(3.2) + }; + }) ], tl: { hd: [ "hypot", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.721, - _2: Math.hypot(0.4, 0.6) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.721, + _2: Math.hypot(0.4, 0.6) + }; + }) ], tl: { hd: [ "hypotMany", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 1.077, - _2: Math.hypot(0.4, 0.6, 0.8) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 1.077, + _2: Math.hypot(0.4, 0.6, 0.8) + }; + }) ], tl: { hd: [ "imul", (function (param) { - return { - TAG: /* Eq */0, - _0: 8, - _1: Math.imul(4, 2) - }; - }) + return { + TAG: /* Eq */0, + _0: 8, + _1: Math.imul(4, 2) + }; + }) ], tl: { hd: [ "log", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: -0.916, - _2: Math.log(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: -0.916, + _2: Math.log(0.4) + }; + }) ], tl: { hd: [ "log1p", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.336, - _2: Math.log1p(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.336, + _2: Math.log1p(0.4) + }; + }) ], tl: { hd: [ "log10", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: -0.397, - _2: Math.log10(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: -0.397, + _2: Math.log10(0.4) + }; + }) ], tl: { hd: [ "log2", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: -1.321, - _2: Math.log2(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: -1.321, + _2: Math.log2(0.4) + }; + }) ], tl: { hd: [ "max_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Math.max(2, 4) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Math.max(2, 4) + }; + }) ], tl: { hd: [ "maxMany_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Math.max(2, 4, 3) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Math.max(2, 4, 3) + }; + }) ], tl: { hd: [ "max_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 4.2, - _1: Math.max(2.7, 4.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 4.2, + _1: Math.max(2.7, 4.2) + }; + }) ], tl: { hd: [ "maxMany_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 4.2, - _1: Math.max(2.7, 4.2, 3.9) - }; - }) + return { + TAG: /* Eq */0, + _0: 4.2, + _1: Math.max(2.7, 4.2, 3.9) + }; + }) ], tl: { hd: [ "min_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Math.min(2, 4) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Math.min(2, 4) + }; + }) ], tl: { hd: [ "minMany_int", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Math.min(2, 4, 3) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Math.min(2, 4, 3) + }; + }) ], tl: { hd: [ "min_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 2.7, - _1: Math.min(2.7, 4.2) - }; - }) + return { + TAG: /* Eq */0, + _0: 2.7, + _1: Math.min(2.7, 4.2) + }; + }) ], tl: { hd: [ "minMany_float", (function (param) { - return { - TAG: /* Eq */0, - _0: 2.7, - _1: Math.min(2.7, 4.2, 3.9) - }; - }) + return { + TAG: /* Eq */0, + _0: 2.7, + _1: Math.min(2.7, 4.2, 3.9) + }; + }) ], tl: { hd: [ "random", (function (param) { - const a = Math.random(); - return { - TAG: /* Ok */4, - _0: a >= 0 && a < 1 - }; - }) + const a = Math.random(); + return { + TAG: /* Ok */4, + _0: a >= 0 && a < 1 + }; + }) ], tl: { hd: [ "random_int", (function (param) { - const a = Js__Js_math.random_int(1, 3); - return { - TAG: /* Ok */4, - _0: a >= 1 && a < 3 - }; - }) + const a = Js__Js_math.random_int(1, 3); + return { + TAG: /* Ok */4, + _0: a >= 1 && a < 3 + }; + }) ], tl: { hd: [ "unsafe_round", (function (param) { + return { + TAG: /* Eq */0, + _0: 3, + _1: Math.round(3.2) + }; + }) + ], + tl: { + hd: [ + "round", + (function (param) { return { TAG: /* Eq */0, _0: 3, _1: Math.round(3.2) }; }) - ], - tl: { - hd: [ - "round", - (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: Math.round(3.2) - }; - }) ], tl: { hd: [ "sign_int", (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: Math.sign(-4) - }; - }) + return { + TAG: /* Eq */0, + _0: -1, + _1: Math.sign(-4) + }; + }) ], tl: { hd: [ "sign_float", (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: Math.sign(-4.2) - }; - }) + return { + TAG: /* Eq */0, + _0: -1, + _1: Math.sign(-4.2) + }; + }) ], tl: { hd: [ "sign_float -0", (function (param) { - return { - TAG: /* Eq */0, - _0: -0, - _1: Math.sign(-0) - }; - }) + return { + TAG: /* Eq */0, + _0: -0, + _1: Math.sign(-0) + }; + }) ], tl: { hd: [ "sin", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.389, - _2: Math.sin(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.389, + _2: Math.sin(0.4) + }; + }) ], tl: { hd: [ "sinh", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.410, - _2: Math.sinh(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.410, + _2: Math.sinh(0.4) + }; + }) ], tl: { hd: [ "sqrt", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.632, - _2: Math.sqrt(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.632, + _2: Math.sqrt(0.4) + }; + }) ], tl: { hd: [ "tan", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.422, - _2: Math.tan(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.422, + _2: Math.tan(0.4) + }; + }) ], tl: { hd: [ "tanh", (function (param) { - return { - TAG: /* ApproxThreshold */6, - _0: 0.001, - _1: 0.379, - _2: Math.tanh(0.4) - }; - }) + return { + TAG: /* ApproxThreshold */6, + _0: 0.001, + _1: 0.379, + _2: Math.tanh(0.4) + }; + }) ], tl: { hd: [ "unsafe_trunc", (function (param) { + return { + TAG: /* Eq */0, + _0: 4, + _1: Math.trunc(4.2156) + }; + }) + ], + tl: { + hd: [ + "trunc", + (function (param) { return { TAG: /* Eq */0, _0: 4, _1: Math.trunc(4.2156) }; }) - ], - tl: { - hd: [ - "trunc", - (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Math.trunc(4.2156) - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_null_test.js b/jscomp/test/dist/jscomp/test/js_null_test.js index 3bfa7c204..399c3f9b8 100644 --- a/jscomp/test/dist/jscomp/test/js_null_test.js +++ b/jscomp/test/dist/jscomp/test/js_null_test.js @@ -8,139 +8,139 @@ const Mt = require("./mt.js"); const suites_0 = [ "toOption - empty", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: undefined - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: undefined + }; + }) ]; const suites_1 = { hd: [ "toOption - 'a", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_option.some(undefined), - _1: Caml_option.some(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_option.some(undefined), + _1: Caml_option.some(undefined) + }; + }) ], tl: { hd: [ "return", (function (param) { - return { - TAG: /* Eq */0, - _0: "something", - _1: Caml_option.null_to_opt("something") - }; - }) + return { + TAG: /* Eq */0, + _0: "something", + _1: Caml_option.null_to_opt("something") + }; + }) ], tl: { hd: [ "test - empty", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: true + }; + }) ], tl: { hd: [ "test - 'a", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: false + }; + }) ], tl: { hd: [ "bind - empty", (function (param) { - return { - TAG: /* StrictEq */2, - _0: null, - _1: Js__Js_null.bind((function (v) { - return v; - }), null) - }; - }) + return { + TAG: /* StrictEq */2, + _0: null, + _1: Js__Js_null.bind((function (v) { + return v; + }), null) + }; + }) ], tl: { hd: [ "bind - 'a", (function (param) { - return { - TAG: /* StrictEq */2, - _0: 4, - _1: Js__Js_null.map((function (n) { - return (n << 1); - }), 2) - }; - }) + return { + TAG: /* StrictEq */2, + _0: 4, + _1: Js__Js_null.map((function (n) { + return (n << 1); + }), 2) + }; + }) ], tl: { hd: [ "iter - empty", (function (param) { + const hit = { + contents: false + }; + Js__Js_null.iter((function (param) { + hit.contents = true; + }), null); + return { + TAG: /* Eq */0, + _0: false, + _1: hit.contents + }; + }) + ], + tl: { + hd: [ + "iter - 'a", + (function (param) { const hit = { - contents: false + contents: 0 }; - Js__Js_null.iter((function (param) { - hit.contents = true; - }), null); + Js__Js_null.iter((function (v) { + hit.contents = v; + }), 2); return { TAG: /* Eq */0, - _0: false, + _0: 2, _1: hit.contents }; }) - ], - tl: { - hd: [ - "iter - 'a", - (function (param) { - const hit = { - contents: 0 - }; - Js__Js_null.iter((function (v) { - hit.contents = v; - }), 2); - return { - TAG: /* Eq */0, - _0: 2, - _1: hit.contents - }; - }) ], tl: { hd: [ "fromOption - None", (function (param) { - return { - TAG: /* Eq */0, - _0: null, - _1: Js__Js_null.fromOption(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: null, + _1: Js__Js_null.fromOption(undefined) + }; + }) ], tl: { hd: [ "fromOption - Some", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Js__Js_null.fromOption(2) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Js__Js_null.fromOption(2) + }; + }) ], tl: /* [] */0 } 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 0a67ecb0c..4069a0279 100644 --- a/jscomp/test/dist/jscomp/test/js_null_undefined_test.js +++ b/jscomp/test/dist/jscomp/test/js_null_undefined_test.js @@ -8,283 +8,283 @@ const Mt = require("./mt.js"); const suites_0 = [ "toOption - null", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: undefined - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: undefined + }; + }) ]; const suites_1 = { hd: [ "toOption - undefined", (function (param) { + return { + TAG: /* Eq */0, + _0: undefined, + _1: undefined + }; + }) + ], + tl: { + hd: [ + "toOption - empty", + (function (param) { return { TAG: /* Eq */0, _0: undefined, _1: undefined }; }) - ], - tl: { - hd: [ - "toOption - empty", - (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: undefined - }; - }) ], tl: { hd: [ "File \"jscomp/test/js_null_undefined_test.ml\", line 7, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: "foo", - _1: Caml_option.nullable_to_opt("foo") - }; - }) + return { + TAG: /* Eq */0, + _0: "foo", + _1: Caml_option.nullable_to_opt("foo") + }; + }) ], tl: { hd: [ "return", (function (param) { - return { - TAG: /* Eq */0, - _0: "something", - _1: Caml_option.nullable_to_opt("something") - }; - }) + return { + TAG: /* Eq */0, + _0: "something", + _1: Caml_option.nullable_to_opt("something") + }; + }) ], tl: { hd: [ "test - null", (function (param) { + return { + TAG: /* Eq */0, + _0: true, + _1: true + }; + }) + ], + tl: { + hd: [ + "test - undefined", + (function (param) { return { TAG: /* Eq */0, _0: true, _1: true }; }) - ], - tl: { - hd: [ - "test - undefined", - (function (param) { + ], + tl: { + hd: [ + "test - empty", + (function (param) { return { TAG: /* Eq */0, _0: true, _1: true }; }) - ], - tl: { - hd: [ - "test - empty", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/js_null_undefined_test.ml\", line 12, characters 2-9", + (function (param) { return { TAG: /* Eq */0, _0: true, _1: true }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/js_null_undefined_test.ml\", line 12, characters 2-9", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: true - }; - }) ], tl: { hd: [ "map - null", (function (param) { - return { - TAG: /* StrictEq */2, - _0: null, - _1: Js__Js_nullable.map((function (v) { - return v; - }), null) - }; - }) + return { + TAG: /* StrictEq */2, + _0: null, + _1: Js__Js_nullable.map((function (v) { + return v; + }), null) + }; + }) ], tl: { hd: [ "map - undefined", (function (param) { + return { + TAG: /* StrictEq */2, + _0: undefined, + _1: Js__Js_nullable.map((function (v) { + return v; + }), undefined) + }; + }) + ], + tl: { + hd: [ + "map - empty", + (function (param) { return { TAG: /* StrictEq */2, _0: undefined, _1: Js__Js_nullable.map((function (v) { - return v; - }), undefined) + return v; + }), undefined) }; }) - ], - tl: { - hd: [ - "map - empty", - (function (param) { - return { - TAG: /* StrictEq */2, - _0: undefined, - _1: Js__Js_nullable.map((function (v) { - return v; - }), undefined) - }; - }) ], tl: { hd: [ "map - 'a", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Js__Js_nullable.map((function (n) { - return (n << 1); - }), 2) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Js__Js_nullable.map((function (n) { + return (n << 1); + }), 2) + }; + }) ], tl: { hd: [ "iter - null", (function (param) { + const hit = { + contents: false + }; + Js__Js_nullable.iter((function (param) { + hit.contents = true; + }), null); + return { + TAG: /* Eq */0, + _0: false, + _1: hit.contents + }; + }) + ], + tl: { + hd: [ + "iter - undefined", + (function (param) { const hit = { contents: false }; Js__Js_nullable.iter((function (param) { - hit.contents = true; - }), null); + hit.contents = true; + }), undefined); return { TAG: /* Eq */0, _0: false, _1: hit.contents }; }) - ], - tl: { - hd: [ - "iter - undefined", - (function (param) { + ], + tl: { + hd: [ + "iter - empty", + (function (param) { const hit = { contents: false }; Js__Js_nullable.iter((function (param) { - hit.contents = true; - }), undefined); + hit.contents = true; + }), undefined); return { TAG: /* Eq */0, _0: false, _1: hit.contents }; }) - ], - tl: { - hd: [ - "iter - empty", - (function (param) { + ], + tl: { + hd: [ + "iter - 'a", + (function (param) { const hit = { - contents: false + contents: 0 }; - Js__Js_nullable.iter((function (param) { - hit.contents = true; - }), undefined); + Js__Js_nullable.iter((function (v) { + hit.contents = v; + }), 2); return { TAG: /* Eq */0, - _0: false, + _0: 2, _1: hit.contents }; }) - ], - tl: { - hd: [ - "iter - 'a", - (function (param) { - const hit = { - contents: 0 - }; - Js__Js_nullable.iter((function (v) { - hit.contents = v; - }), 2); - return { - TAG: /* Eq */0, - _0: 2, - _1: hit.contents - }; - }) ], tl: { hd: [ "fromOption - None", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Js__Js_nullable.fromOption(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: Js__Js_nullable.fromOption(undefined) + }; + }) ], tl: { hd: [ "fromOption - Some", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Js__Js_nullable.fromOption(2) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Js__Js_nullable.fromOption(2) + }; + }) ], tl: { hd: [ "null <> undefined", (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - }) + return { + TAG: /* Ok */4, + _0: true + }; + }) ], tl: { hd: [ "null <> empty", (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - }) + return { + TAG: /* Ok */4, + _0: true + }; + }) ], tl: { hd: [ "undefined = empty", (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - }) + return { + TAG: /* Ok */4, + _0: true + }; + }) ], tl: { hd: [ "File \"jscomp/test/js_null_undefined_test.ml\", line 42, characters 2-9", (function (param) { - return { - TAG: /* Ok */4, - _0: true - }; - }) + return { + TAG: /* Ok */4, + _0: true + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_nullable_test.js b/jscomp/test/dist/jscomp/test/js_nullable_test.js index a376edc58..f7a1ea7fe 100644 --- a/jscomp/test/dist/jscomp/test/js_nullable_test.js +++ b/jscomp/test/dist/jscomp/test/js_nullable_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/js_obj_test.js b/jscomp/test/dist/jscomp/test/js_obj_test.js index a2da21a60..0a42c5e39 100644 --- a/jscomp/test/dist/jscomp/test/js_obj_test.js +++ b/jscomp/test/dist/jscomp/test/js_obj_test.js @@ -24,118 +24,118 @@ const object_tables = { const suites_0 = [ "caml_obj", (function (param) { - if (!object_tables.key) { - const $$class = CamlinternalOO.create_table(["say"]); - const say = CamlinternalOO.get_method_label($$class, "say"); - CamlinternalOO.set_method($$class, say, (function (self$1, x) { - return 1 + x | 0; - })); - const env_init = function (env) { - return CamlinternalOO.create_object_opt(undefined, $$class); - }; - CamlinternalOO.init_class($$class); - object_tables.key = env_init; - } - return { - TAG: /* Eq */0, - _0: 33, - _1: f(Curry._1(object_tables.key, undefined)) + if (!object_tables.key) { + const $$class = CamlinternalOO.create_table(["say"]); + const say = CamlinternalOO.get_method_label($$class, "say"); + CamlinternalOO.set_method($$class, say, (function (self$1, x) { + return 1 + x | 0; + })); + const env_init = function (env) { + return CamlinternalOO.create_object_opt(undefined, $$class); }; - }) + CamlinternalOO.init_class($$class); + object_tables.key = env_init; + } + return { + TAG: /* Eq */0, + _0: 33, + _1: f(Curry._1(object_tables.key, undefined)) + }; + }) ]; const suites_1 = { hd: [ "js_obj", (function (param) { + return { + TAG: /* Eq */0, + _0: 34, + _1: ({ + say: (function (x) { + return x + 2 | 0; + }) + }).say(32) + }; + }) + ], + tl: { + hd: [ + "js_obj2", + (function (param) { return { TAG: /* Eq */0, _0: 34, _1: ({ say: (function (x) { - return x + 2 | 0; - }) + return x + 2 | 0; + }) }).say(32) }; }) - ], - tl: { - hd: [ - "js_obj2", - (function (param) { - return { - TAG: /* Eq */0, - _0: 34, - _1: ({ - say: (function (x) { - return x + 2 | 0; - }) - }).say(32) - }; - }) ], tl: { hd: [ "empty", (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: Object.keys({}).length - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: Object.keys({}).length + }; + }) ], tl: { hd: [ "assign", (function (param) { + return { + TAG: /* Eq */0, + _0: { + a: 1 + }, + _1: Object.assign({}, { + a: 1 + }) + }; + }) + ], + tl: { + hd: [ + "merge", + (function (param) { + const original = { + a: 1 + }; return { TAG: /* Eq */0, _0: { - a: 1 + a: 2 }, - _1: Object.assign({}, { - a: 1 + _1: Object.assign({}, original, { + a: 2 }) }; }) - ], - tl: { - hd: [ - "merge", - (function (param) { + ], + tl: { + hd: [ + "merge-preserves-original", + (function (param) { const original = { a: 1 }; + Object.assign({}, original, { + a: 2 + }); return { TAG: /* Eq */0, _0: { - a: 2 + a: 1 }, - _1: Object.assign({}, original, { - a: 2 - }) + _1: original }; }) - ], - tl: { - hd: [ - "merge-preserves-original", - (function (param) { - const original = { - a: 1 - }; - Object.assign({}, original, { - a: 2 - }); - return { - TAG: /* Eq */0, - _0: { - a: 1 - }, - _1: original - }; - }) ], tl: /* [] */0 } 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 12558eed9..d75c2ef4b 100644 --- a/jscomp/test/dist/jscomp/test/js_promise_basic_test.js +++ b/jscomp/test/dist/jscomp/test/js_promise_basic_test.js @@ -23,12 +23,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -241,10 +241,10 @@ function raceTest(param) { function createPromiseRejectTest(param) { return new Promise((function (resolve, reject) { - reject({ - MEL_EXN_ID: Stdlib.Not_found - }); - })).catch(function (error) { + reject({ + MEL_EXN_ID: Stdlib.Not_found + }); + })).catch(function (error) { assert_bool(error.MEL_EXN_ID === Stdlib.Not_found); return h; }); @@ -252,8 +252,8 @@ function createPromiseRejectTest(param) { function createPromiseFulfillTest(param) { return new Promise((function (resolve, param) { - resolve("success"); - })).then(function (resolved) { + resolve("success"); + })).then(function (resolved) { assert_bool(resolved === "success"); return h; }).catch(fail); diff --git a/jscomp/test/dist/jscomp/test/js_re_test.js b/jscomp/test/dist/jscomp/test/js_re_test.js index 64b3031b4..2516e1143 100644 --- a/jscomp/test/dist/jscomp/test/js_re_test.js +++ b/jscomp/test/dist/jscomp/test/js_re_test.js @@ -8,119 +8,139 @@ const Mt = require("./mt.js"); const suites_0 = [ "captures", (function (param) { - const re = /(\d+)-(?:(\d+))?/g; - const result = re.exec("3-"); - if (result === null) { - return { - TAG: /* Fail */8, - _0: undefined - }; - } - const defined = Caml_array.get(result, 1); - const $$undefined = Caml_array.get(result, 2); + const re = /(\d+)-(?:(\d+))?/g; + const result = re.exec("3-"); + if (result === null) { return { - TAG: /* Eq */0, - _0: [ - "3", - null - ], - _1: [ - defined, - $$undefined - ] + TAG: /* Fail */8, + _0: undefined }; - }) + } + const defined = Caml_array.get(result, 1); + const $$undefined = Caml_array.get(result, 2); + return { + TAG: /* Eq */0, + _0: [ + "3", + null + ], + _1: [ + defined, + $$undefined + ] + }; + }) ]; const suites_1 = { hd: [ "fromString", (function (param) { - const contentOf = function (tag, xmlString) { - const result = new RegExp("<" + (tag + (">(.*?)<\\/" + (tag + ">")))).exec(xmlString); - if (result !== null) { - return Caml_option.nullable_to_opt(Caml_array.get(result, 1)); - } - - }; - return { - TAG: /* Eq */0, - _0: contentOf("div", "
Hi
"), - _1: "Hi" - }; - }) + const contentOf = function (tag, xmlString) { + const result = new RegExp("<" + (tag + (">(.*?)<\\/" + (tag + ">")))).exec(xmlString); + if (result !== null) { + return Caml_option.nullable_to_opt(Caml_array.get(result, 1)); + } + + }; + return { + TAG: /* Eq */0, + _0: contentOf("div", "
Hi
"), + _1: "Hi" + }; + }) ], tl: { hd: [ "exec_literal", (function (param) { - const res = /[^.]+/.exec("http://xxx.domain.com"); - if (res !== null) { + const res = /[^.]+/.exec("http://xxx.domain.com"); + if (res !== null) { + return { + TAG: /* Eq */0, + _0: "http://xxx", + _1: Caml_array.get(res, 0) + }; + } else { + return { + TAG: /* FailWith */9, + _0: "regex should match" + }; + } + }) + ], + tl: { + hd: [ + "exec_no_match", + (function (param) { + const match = /https:\/\/(.*)/.exec("http://xxx.domain.com"); + if (match !== null) { return { - TAG: /* Eq */0, - _0: "http://xxx", - _1: Caml_array.get(res, 0) + TAG: /* FailWith */9, + _0: "regex should not match" }; } else { return { - TAG: /* FailWith */9, - _0: "regex should match" + TAG: /* Ok */4, + _0: true }; } }) - ], - tl: { - hd: [ - "exec_no_match", - (function (param) { - const match = /https:\/\/(.*)/.exec("http://xxx.domain.com"); - if (match !== null) { - return { - TAG: /* FailWith */9, - _0: "regex should not match" - }; - } else { - return { - TAG: /* Ok */4, - _0: true - }; - } - }) ], tl: { hd: [ "test_str", (function (param) { - const res = new RegExp("foo").test("#foo#"); - return { - TAG: /* Eq */0, - _0: true, - _1: res - }; - }) + const res = new RegExp("foo").test("#foo#"); + return { + TAG: /* Eq */0, + _0: true, + _1: res + }; + }) ], tl: { hd: [ "fromStringWithFlags", (function (param) { - const res = new RegExp("foo", "g"); - return { - TAG: /* Eq */0, - _0: true, - _1: res.global - }; - }) + const res = new RegExp("foo", "g"); + return { + TAG: /* Eq */0, + _0: true, + _1: res.global + }; + }) ], tl: { hd: [ "result_index", (function (param) { - const res = new RegExp("zbar").exec("foobarbazbar"); + const res = new RegExp("zbar").exec("foobarbazbar"); + if (res !== null) { + return { + TAG: /* Eq */0, + _0: 8, + _1: res.index + }; + } else { + return { + TAG: /* Fail */8, + _0: undefined + }; + } + }) + ], + tl: { + hd: [ + "result_input", + (function (param) { + const input = "foobar"; + const res = /foo/g.exec(input); if (res !== null) { return { TAG: /* Eq */0, - _0: 8, - _1: res.index + _0: input, + _1: res.input }; } else { return { @@ -129,137 +149,117 @@ const suites_1 = { }; } }) - ], - tl: { - hd: [ - "result_input", - (function (param) { - const input = "foobar"; - const res = /foo/g.exec(input); - if (res !== null) { - return { - TAG: /* Eq */0, - _0: input, - _1: res.input - }; - } else { - return { - TAG: /* Fail */8, - _0: undefined - }; - } - }) ], tl: { hd: [ "t_flags", (function (param) { - return { - TAG: /* Eq */0, - _0: "gi", - _1: /./ig.flags - }; - }) + return { + TAG: /* Eq */0, + _0: "gi", + _1: /./ig.flags + }; + }) ], tl: { hd: [ "t_global", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: /./ig.global - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: /./ig.global + }; + }) ], tl: { hd: [ "t_ignoreCase", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: /./ig.ignoreCase - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: /./ig.ignoreCase + }; + }) ], tl: { hd: [ "t_lastIndex", (function (param) { - const re = /na/g; - re.exec("banana"); - return { - TAG: /* Eq */0, - _0: 4, - _1: re.lastIndex - }; - }) + const re = /na/g; + re.exec("banana"); + return { + TAG: /* Eq */0, + _0: 4, + _1: re.lastIndex + }; + }) ], tl: { hd: [ "t_setLastIndex", (function (param) { - const re = /na/g; - const before = re.lastIndex; - re.lastIndex = 42; - const after = re.lastIndex; - return { - TAG: /* Eq */0, - _0: [ - 0, - 42 - ], - _1: [ - before, - after - ] - }; - }) + const re = /na/g; + const before = re.lastIndex; + re.lastIndex = 42; + const after = re.lastIndex; + return { + TAG: /* Eq */0, + _0: [ + 0, + 42 + ], + _1: [ + before, + after + ] + }; + }) ], tl: { hd: [ "t_multiline", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: /./ig.multiline - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: /./ig.multiline + }; + }) ], tl: { hd: [ "t_source", (function (param) { - return { - TAG: /* Eq */0, - _0: "f.+o", - _1: /f.+o/ig.source - }; - }) + return { + TAG: /* Eq */0, + _0: "f.+o", + _1: /f.+o/ig.source + }; + }) ], tl: { hd: [ "t_sticky", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: /./yg.sticky - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: /./yg.sticky + }; + }) ], tl: { hd: [ "t_unicode", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: /./yg.unicode - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: /./yg.unicode + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_set_test.js b/jscomp/test/dist/jscomp/test/js_set_test.js index 8f88f14b9..191ce5a3d 100644 --- a/jscomp/test/dist/jscomp/test/js_set_test.js +++ b/jscomp/test/dist/jscomp/test/js_set_test.js @@ -6,280 +6,280 @@ const Mt = require("./mt.js"); const suites_0 = [ "fromArray/toArray", (function (param) { - const set = new Set([ - 1, - 2, - 3 - ]); - return { - TAG: /* Eq */0, - _0: [ + const set = new Set([ 1, 2, 3 - ], - _1: Array.from(set) - }; - }) + ]); + return { + TAG: /* Eq */0, + _0: [ + 1, + 2, + 3 + ], + _1: Array.from(set) + }; + }) ]; const suites_1 = { hd: [ "size - empty set", (function (param) { - const set = new Set(); - return { - TAG: /* Eq */0, - _0: 0, - _1: set.size - }; - }) + const set = new Set(); + return { + TAG: /* Eq */0, + _0: 0, + _1: set.size + }; + }) ], tl: { hd: [ "size", (function (param) { + const set = new Set([ + "one", + "two", + "two" + ]); + return { + TAG: /* Eq */0, + _0: 2, + _1: set.size + }; + }) + ], + tl: { + hd: [ + "size - with duplicates", + (function (param) { const set = new Set([ "one", - "two", - "two" + "one" ]); return { TAG: /* Eq */0, - _0: 2, + _0: 1, _1: set.size }; }) - ], - tl: { - hd: [ - "size - with duplicates", - (function (param) { + ], + tl: { + hd: [ + "has - true", + (function (param) { const set = new Set([ "one", - "one" + "two" ]); return { TAG: /* Eq */0, - _0: 1, - _1: set.size + _0: true, + _1: set.has("two") }; }) - ], - tl: { - hd: [ - "has - true", - (function (param) { + ], + tl: { + hd: [ + "has - false", + (function (param) { const set = new Set([ "one", "two" ]); return { TAG: /* Eq */0, - _0: true, - _1: set.has("two") + _0: false, + _1: set.has("three") }; }) - ], - tl: { - hd: [ - "has - false", - (function (param) { + ], + tl: { + hd: [ + "delete", + (function (param) { const set = new Set([ "one", "two" ]); + const deleted = set.delete("two"); return { TAG: /* Eq */0, - _0: false, - _1: set.has("three") + _0: [ + true, + false + ], + _1: [ + deleted, + set.has("two") + ] }; }) - ], - tl: { - hd: [ - "delete", - (function (param) { - const set = new Set([ - "one", - "two" - ]); - const deleted = set.delete("two"); + ], + tl: { + hd: [ + "add", + (function (param) { + const set = new Set().add("one").add("two"); return { TAG: /* Eq */0, _0: [ - true, - false + "one", + "two" ], - _1: [ - deleted, - set.has("two") - ] + _1: Array.from(set) }; }) - ], - tl: { - hd: [ - "add", - (function (param) { - const set = new Set().add("one").add("two"); - return { - TAG: /* Eq */0, - _0: [ - "one", - "two" - ], - _1: Array.from(set) - }; - }) ], tl: { hd: [ "clear", (function (param) { - const set = new Set([ - "one", - "two" - ]); - set.clear(); - return { - TAG: /* Eq */0, - _0: 0, - _1: set.size - }; - }) + const set = new Set([ + "one", + "two" + ]); + set.clear(); + return { + TAG: /* Eq */0, + _0: 0, + _1: set.size + }; + }) ], tl: { hd: [ "add mutate + return new set", (function (param) { - const set_1 = new Set(); - const set_2 = set_1.add("one"); - const set_3 = set_2.add("two"); - const all_same_size = set_1.size === 2 && set_2.size === 2 && set_3.size === 2; - const all_same_ref = set_1 === set_2 && set_2 === set_3; + const set_1 = new Set(); + const set_2 = set_1.add("one"); + const set_3 = set_2.add("two"); + const all_same_size = set_1.size === 2 && set_2.size === 2 && set_3.size === 2; + const all_same_ref = set_1 === set_2 && set_2 === set_3; + return { + TAG: /* Eq */0, + _0: [ + true, + true + ], + _1: [ + all_same_size, + all_same_ref + ] + }; + }) + ], + tl: { + hd: [ + "forEach", + (function (param) { + const set = new Set([ + "one", + "two" + ]); + const arr = { + contents: [] + }; + set.forEach(function (value) { + arr.contents.push(value); + }); return { TAG: /* Eq */0, _0: [ - true, - true + "one", + "two" ], - _1: [ - all_same_size, - all_same_ref - ] + _1: arr.contents }; }) - ], - tl: { - hd: [ - "forEach", - (function (param) { - const set = new Set([ - "one", - "two" - ]); - const arr = { - contents: [] - }; - set.forEach(function (value) { - arr.contents.push(value); - }); + ], + tl: { + hd: [ + "values", + (function (param) { + const values = Array.from(new Set([ + "one", + "two" + ]).values()); return { TAG: /* Eq */0, _0: [ "one", "two" ], - _1: arr.contents + _1: values }; }) - ], - tl: { - hd: [ - "values", - (function (param) { - const values = Array.from(new Set([ + ], + tl: { + hd: [ + "entries", + (function (param) { + const entries = Array.from(new Set([ "one", "two" - ]).values()); + ]).entries()); return { TAG: /* Eq */0, _0: [ - "one", - "two" + [ + "one", + "one" + ], + [ + "two", + "two" + ] ], - _1: values + _1: entries }; }) - ], - tl: { - hd: [ - "entries", - (function (param) { - const entries = Array.from(new Set([ - "one", - "two" - ]).entries()); + ], + tl: { + hd: [ + "iterator", + (function (param) { + const iterator = new Set([ + "one", + "two" + ]).values(); + const n1 = iterator.next(); + const n2 = iterator.next(); + const n3 = iterator.next(); return { TAG: /* Eq */0, _0: [ [ - "one", + n1.done, + n1.value + ], + [ + n2.done, + n2.value + ], + [ + n3.done, + n3.value + ] + ], + _1: [ + [ + false, "one" ], [ - "two", + false, "two" + ], + [ + true, + undefined ] - ], - _1: entries + ] }; }) - ], - tl: { - hd: [ - "iterator", - (function (param) { - const iterator = new Set([ - "one", - "two" - ]).values(); - const n1 = iterator.next(); - const n2 = iterator.next(); - const n3 = iterator.next(); - return { - TAG: /* Eq */0, - _0: [ - [ - n1.done, - n1.value - ], - [ - n2.done, - n2.value - ], - [ - n3.done, - n3.value - ] - ], - _1: [ - [ - false, - "one" - ], - [ - false, - "two" - ], - [ - true, - undefined - ] - ] - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_string_test.js b/jscomp/test/dist/jscomp/test/js_string_test.js index 093ac661e..bcf9b2faa 100644 --- a/jscomp/test/dist/jscomp/test/js_string_test.js +++ b/jscomp/test/dist/jscomp/test/js_string_test.js @@ -8,346 +8,364 @@ const Mt = require("./mt.js"); const suites_0 = [ "make", (function (param) { - return { - TAG: /* Eq */0, - _0: "null", - _1: String(null).concat("") - }; - }) + return { + TAG: /* Eq */0, + _0: "null", + _1: String(null).concat("") + }; + }) ]; const suites_1 = { hd: [ "fromCharCode", (function (param) { - return { - TAG: /* Eq */0, - _0: "a", - _1: String.fromCharCode(97) - }; - }) + return { + TAG: /* Eq */0, + _0: "a", + _1: String.fromCharCode(97) + }; + }) ], tl: { hd: [ "fromCharCodeMany", (function (param) { - return { - TAG: /* Eq */0, - _0: "az", - _1: String.fromCharCode(97, 122) - }; - }) + return { + TAG: /* Eq */0, + _0: "az", + _1: String.fromCharCode(97, 122) + }; + }) ], tl: { hd: [ "fromCodePoint", (function (param) { - return { - TAG: /* Eq */0, - _0: "a", - _1: String.fromCodePoint(97) - }; - }) + return { + TAG: /* Eq */0, + _0: "a", + _1: String.fromCodePoint(97) + }; + }) ], tl: { hd: [ "fromCodePointMany", (function (param) { - return { - TAG: /* Eq */0, - _0: "az", - _1: String.fromCodePoint(97, 122) - }; - }) + return { + TAG: /* Eq */0, + _0: "az", + _1: String.fromCodePoint(97, 122) + }; + }) ], tl: { hd: [ "length", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: "foo".length - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: "foo".length + }; + }) ], tl: { hd: [ "get", (function (param) { - return { - TAG: /* Eq */0, - _0: "a", - _1: "foobar"[4] - }; - }) + return { + TAG: /* Eq */0, + _0: "a", + _1: "foobar"[4] + }; + }) ], tl: { hd: [ "charAt", (function (param) { - return { - TAG: /* Eq */0, - _0: "a", - _1: "foobar".charAt(4) - }; - }) + return { + TAG: /* Eq */0, + _0: "a", + _1: "foobar".charAt(4) + }; + }) ], tl: { hd: [ "charCodeAt", (function (param) { - return { - TAG: /* Eq */0, - _0: 97, - _1: "foobar".charCodeAt(4) - }; - }) + return { + TAG: /* Eq */0, + _0: 97, + _1: "foobar".charCodeAt(4) + }; + }) ], tl: { hd: [ "codePointAt", (function (param) { - return { - TAG: /* Eq */0, - _0: 97, - _1: "foobar".codePointAt(4) - }; - }) + return { + TAG: /* Eq */0, + _0: 97, + _1: "foobar".codePointAt(4) + }; + }) ], tl: { hd: [ "codePointAt - out of bounds", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: "foobar".codePointAt(98) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: "foobar".codePointAt(98) + }; + }) ], tl: { hd: [ "concat", (function (param) { - return { - TAG: /* Eq */0, - _0: "foobar", - _1: "foo".concat("bar") - }; - }) + return { + TAG: /* Eq */0, + _0: "foobar", + _1: "foo".concat("bar") + }; + }) ], tl: { hd: [ "concatMany", (function (param) { - return { - TAG: /* Eq */0, - _0: "foobarbaz", - _1: "foo".concat("bar", "baz") - }; - }) + return { + TAG: /* Eq */0, + _0: "foobarbaz", + _1: "foo".concat("bar", "baz") + }; + }) ], tl: { hd: [ "endsWith", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: "foobar".endsWith("bar", undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: "foobar".endsWith("bar", undefined) + }; + }) ], tl: { hd: [ "endsWithFrom", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: "foobar".endsWith("bar", 1) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: "foobar".endsWith("bar", 1) + }; + }) ], tl: { hd: [ "includes", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: "foobarbaz".includes("bar", undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: "foobarbaz".includes("bar", undefined) + }; + }) ], tl: { hd: [ "includesFrom", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: "foobarbaz".includes("bar", 4) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: "foobarbaz".includes("bar", 4) + }; + }) ], tl: { hd: [ "indexOf", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: "foobarbaz".indexOf("bar", undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: "foobarbaz".indexOf("bar", undefined) + }; + }) ], tl: { hd: [ "indexOfFrom", (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: "foobarbaz".indexOf("bar", 4) - }; - }) + return { + TAG: /* Eq */0, + _0: -1, + _1: "foobarbaz".indexOf("bar", 4) + }; + }) ], tl: { hd: [ "lastIndexOf", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: "foobarbaz".lastIndexOf("bar", undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: "foobarbaz".lastIndexOf("bar", undefined) + }; + }) ], tl: { hd: [ "lastIndexOfFrom", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: "foobarbaz".lastIndexOf("bar", 4) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: "foobarbaz".lastIndexOf("bar", 4) + }; + }) ], tl: { hd: [ "localeCompare", (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: "foo".localeCompare("foo") - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: "foo".localeCompare("foo") + }; + }) ], tl: { hd: [ "match", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - "na", - "na" - ], - _1: Caml_option.null_to_opt("banana".match(/na+/g)) - }; - }) + return { + TAG: /* Eq */0, + _0: [ + "na", + "na" + ], + _1: Caml_option.null_to_opt("banana".match(/na+/g)) + }; + }) ], tl: { hd: [ "match - no match", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Caml_option.null_to_opt("banana".match(/nanana+/g)) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: Caml_option.null_to_opt("banana".match(/nanana+/g)) + }; + }) ], tl: { hd: [ "match - not found capture groups", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - "hello ", - undefined - ], - _1: Belt__Belt_Option.map(Caml_option.null_to_opt("hello word".match(/hello (world)?/)), (function (prim) { - return prim.slice(); - })) - }; - }) + return { + TAG: /* Eq */0, + _0: [ + "hello ", + undefined + ], + _1: Belt__Belt_Option.map(Caml_option.null_to_opt("hello word".match(/hello (world)?/)), (function (prim) { + return prim.slice(); + })) + }; + }) ], tl: { hd: [ "normalize", (function (param) { - return { - TAG: /* Eq */0, - _0: "foo", - _1: "foo".normalize(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "foo", + _1: "foo".normalize(undefined) + }; + }) ], tl: { hd: [ "normalizeByForm", (function (param) { - return { - TAG: /* Eq */0, - _0: "foo", - _1: "foo".normalize("NFKD") - }; - }) + return { + TAG: /* Eq */0, + _0: "foo", + _1: "foo".normalize("NFKD") + }; + }) ], tl: { hd: [ "repeat", (function (param) { - return { - TAG: /* Eq */0, - _0: "foofoofoo", - _1: "foo".repeat(3) - }; - }) + return { + TAG: /* Eq */0, + _0: "foofoofoo", + _1: "foo".repeat(3) + }; + }) ], tl: { hd: [ "replace", (function (param) { - return { - TAG: /* Eq */0, - _0: "fooBORKbaz", - _1: "foobarbaz".replace("bar", "BORK") - }; - }) + return { + TAG: /* Eq */0, + _0: "fooBORKbaz", + _1: "foobarbaz".replace("bar", "BORK") + }; + }) ], tl: { hd: [ "replaceByRe", (function (param) { - return { - TAG: /* Eq */0, - _0: "fooBORKBORK", - _1: "foobarbaz".replace(/ba./g, "BORK") - }; - }) + return { + TAG: /* Eq */0, + _0: "fooBORKBORK", + _1: "foobarbaz".replace(/ba./g, "BORK") + }; + }) ], tl: { hd: [ "unsafeReplaceBy0", (function (param) { - const replace = function (whole, offset, s) { + const replace = function (whole, offset, s) { + if (whole === "bar") { + return "BORK"; + } else { + return "DORK"; + } + }; + return { + TAG: /* Eq */0, + _0: "fooBORKDORK", + _1: "foobarbaz".replace(/ba./g, replace) + }; + }) + ], + tl: { + hd: [ + "unsafeReplaceBy1", + (function (param) { + const replace = function (whole, p1, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -360,12 +378,12 @@ const suites_1 = { _1: "foobarbaz".replace(/ba./g, replace) }; }) - ], - tl: { - hd: [ - "unsafeReplaceBy1", - (function (param) { - const replace = function (whole, p1, offset, s) { + ], + tl: { + hd: [ + "unsafeReplaceBy2", + (function (param) { + const replace = function (whole, p1, p2, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -378,12 +396,12 @@ const suites_1 = { _1: "foobarbaz".replace(/ba./g, replace) }; }) - ], - tl: { - hd: [ - "unsafeReplaceBy2", - (function (param) { - const replace = function (whole, p1, p2, offset, s) { + ], + tl: { + hd: [ + "unsafeReplaceBy3", + (function (param) { + const replace = function (whole, p1, p2, p3, offset, s) { if (whole === "bar") { return "BORK"; } else { @@ -396,273 +414,255 @@ const suites_1 = { _1: "foobarbaz".replace(/ba./g, replace) }; }) - ], - tl: { - hd: [ - "unsafeReplaceBy3", - (function (param) { - const replace = function (whole, p1, p2, p3, offset, s) { - if (whole === "bar") { - return "BORK"; - } else { - return "DORK"; - } - }; - return { - TAG: /* Eq */0, - _0: "fooBORKDORK", - _1: "foobarbaz".replace(/ba./g, replace) - }; - }) ], tl: { hd: [ "search", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: "foobarbaz".search(/ba./g) - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: "foobarbaz".search(/ba./g) + }; + }) ], tl: { hd: [ "slice", (function (param) { - return { - TAG: /* Eq */0, - _0: "bar", - _1: "foobarbaz".slice(3, 6) - }; - }) + return { + TAG: /* Eq */0, + _0: "bar", + _1: "foobarbaz".slice(3, 6) + }; + }) ], tl: { hd: [ "sliceToEnd", (function (param) { - return { - TAG: /* Eq */0, - _0: "barbaz", - _1: "foobarbaz".slice(3, undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "barbaz", + _1: "foobarbaz".slice(3, undefined) + }; + }) ], tl: { hd: [ "split", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + "foo", + "bar", + "baz" + ], + _1: "foo bar baz".split(" ", undefined) + }; + }) + ], + tl: { + hd: [ + "splitAtMost", + (function (param) { return { TAG: /* Eq */0, _0: [ "foo", - "bar", - "baz" + "bar" ], - _1: "foo bar baz".split(" ", undefined) + _1: "foo bar baz".split(" ", 2) }; }) - ], - tl: { - hd: [ - "splitAtMost", - (function (param) { + ], + tl: { + hd: [ + "splitByRe", + (function (param) { return { TAG: /* Eq */0, _0: [ - "foo", - "bar" + "a", + "#", + undefined, + "b", + "#", + ":", + "c" ], - _1: "foo bar baz".split(" ", 2) + _1: "a#b#:c".split(/(#)(:)?/, undefined) }; }) - ], - tl: { - hd: [ - "splitByRe", - (function (param) { + ], + tl: { + hd: [ + "splitByReAtMost", + (function (param) { return { TAG: /* Eq */0, _0: [ "a", "#", - undefined, - "b", - "#", - ":", - "c" + undefined ], - _1: "a#b#:c".split(/(#)(:)?/, undefined) + _1: "a#b#:c".split(/(#)(:)?/, 3) }; }) - ], - tl: { - hd: [ - "splitByReAtMost", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - "a", - "#", - undefined - ], - _1: "a#b#:c".split(/(#)(:)?/, 3) - }; - }) ], tl: { hd: [ "startsWith", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: "foobarbaz".startsWith("foo", undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: "foobarbaz".startsWith("foo", undefined) + }; + }) ], tl: { hd: [ "startsWithFrom", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: "foobarbaz".startsWith("foo", 1) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: "foobarbaz".startsWith("foo", 1) + }; + }) ], tl: { hd: [ "substr", (function (param) { - return { - TAG: /* Eq */0, - _0: "barbaz", - _1: "foobarbaz".substr(3, undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "barbaz", + _1: "foobarbaz".substr(3, undefined) + }; + }) ], tl: { hd: [ "substrAtMost", (function (param) { - return { - TAG: /* Eq */0, - _0: "bar", - _1: "foobarbaz".substr(3, 3) - }; - }) + return { + TAG: /* Eq */0, + _0: "bar", + _1: "foobarbaz".substr(3, 3) + }; + }) ], tl: { hd: [ "substring", (function (param) { - return { - TAG: /* Eq */0, - _0: "bar", - _1: "foobarbaz".substring(3, 6) - }; - }) + return { + TAG: /* Eq */0, + _0: "bar", + _1: "foobarbaz".substring(3, 6) + }; + }) ], tl: { hd: [ "substringToEnd", (function (param) { - return { - TAG: /* Eq */0, - _0: "barbaz", - _1: "foobarbaz".substring(3, undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: "barbaz", + _1: "foobarbaz".substring(3, undefined) + }; + }) ], tl: { hd: [ "toLowerCase", (function (param) { - return { - TAG: /* Eq */0, - _0: "bork", - _1: "BORK".toLowerCase() - }; - }) + return { + TAG: /* Eq */0, + _0: "bork", + _1: "BORK".toLowerCase() + }; + }) ], tl: { hd: [ "toLocaleLowerCase", (function (param) { - return { - TAG: /* Eq */0, - _0: "bork", - _1: "BORK".toLocaleLowerCase() - }; - }) + return { + TAG: /* Eq */0, + _0: "bork", + _1: "BORK".toLocaleLowerCase() + }; + }) ], tl: { hd: [ "toUpperCase", (function (param) { - return { - TAG: /* Eq */0, - _0: "FUBAR", - _1: "fubar".toUpperCase() - }; - }) + return { + TAG: /* Eq */0, + _0: "FUBAR", + _1: "fubar".toUpperCase() + }; + }) ], tl: { hd: [ "toLocaleUpperCase", (function (param) { - return { - TAG: /* Eq */0, - _0: "FUBAR", - _1: "fubar".toLocaleUpperCase() - }; - }) + return { + TAG: /* Eq */0, + _0: "FUBAR", + _1: "fubar".toLocaleUpperCase() + }; + }) ], tl: { hd: [ "trim", (function (param) { - return { - TAG: /* Eq */0, - _0: "foo", - _1: " foo ".trim() - }; - }) + return { + TAG: /* Eq */0, + _0: "foo", + _1: " foo ".trim() + }; + }) ], tl: { hd: [ "anchor", (function (param) { - return { - TAG: /* Eq */0, - _0: "foo", - _1: "foo".anchor("bar") - }; - }) + return { + TAG: /* Eq */0, + _0: "foo", + _1: "foo".anchor("bar") + }; + }) ], tl: { hd: [ "link", (function (param) { - return { - TAG: /* Eq */0, - _0: "foo", - _1: "foo".link("https://reason.ml") - }; - }) + return { + TAG: /* Eq */0, + _0: "foo", + _1: "foo".link("https://reason.ml") + }; + }) ], tl: { hd: [ "File \"jscomp/test/js_string_test.ml\", line 222, characters 4-11", (function (param) { - return { - TAG: /* Ok */4, - _0: "ab".includes("a", undefined) - }; - }) + return { + TAG: /* Ok */4, + _0: "ab".includes("a", undefined) + }; + }) ], tl: /* [] */0 } 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 73cf53ddb..2dcdc1080 100644 --- a/jscomp/test/dist/jscomp/test/js_typed_array_test.js +++ b/jscomp/test/dist/jscomp/test/js_typed_array_test.js @@ -28,158 +28,189 @@ const x = new Int8Array([ const suites_0 = [ "array_buffer - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 5, - _1: new ArrayBuffer(5).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 5, + _1: new ArrayBuffer(5).byteLength + }; + }) ]; const suites_1 = { hd: [ "array_buffer - byteLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 5, - _1: new ArrayBuffer(5).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 5, + _1: new ArrayBuffer(5).byteLength + }; + }) ], tl: { hd: [ "array_buffer - slice", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: new ArrayBuffer(5).slice(2, 4).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: new ArrayBuffer(5).slice(2, 4).byteLength + }; + }) ], tl: { hd: [ "array_buffer - sliceFrom", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new ArrayBuffer(5).slice(2, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new ArrayBuffer(5).slice(2, undefined).byteLength + }; + }) ], tl: { hd: [ "typed_array - unsafe_get", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])[3] - }; - }) - ], - tl: { - hd: [ - "typed_array - unsafe_set", - (function (param) { - const a = new Int8Array([ + return { + TAG: /* Eq */0, + _0: 4, + _1: new Int8Array([ 1, 2, 3, 4, 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + ])[3] + }; + }) + ], + tl: { + hd: [ + "typed_array - unsafe_set", + (function (param) { + const a = new Int8Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "typed_array - buffer", (function (param) { + return { + TAG: /* Eq */0, + _0: new Int8Array([ + 3, + 4, + 5 + ]), + _1: new Int8Array(new Int8Array([ + 1, + 2, + 3, + 4, + 5 + ]).buffer, 2, undefined) + }; + }) + ], + tl: { + hd: [ + "typed_array - byteLength", + (function (param) { return { TAG: /* Eq */0, - _0: new Int8Array([ + _0: 10, + _1: new Int16Array([ + 1, + 2, 3, 4, 5 - ]), - _1: new Int8Array(new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]).buffer, 2, undefined) + ]).byteLength }; }) - ], - tl: { - hd: [ - "typed_array - byteLength", - (function (param) { + ], + tl: { + hd: [ + "typed_array - byteOffset", + (function (param) { return { TAG: /* Eq */0, - _0: 10, - _1: new Int16Array([ + _0: 0, + _1: new Int8Array([ 1, 2, 3, 4, 5 - ]).byteLength + ]).byteOffset }; }) - ], - tl: { - hd: [ - "typed_array - byteOffset", - (function (param) { + ], + tl: { + hd: [ + "typed_array - setArray", + (function (param) { + const f = function (a) { + a.set([ + 9, + 8, + 7 + ]); + return a; + }; return { TAG: /* Eq */0, - _0: 0, - _1: new Int8Array([ - 1, - 2, - 3, + _0: new Int8Array([ + 9, + 8, + 7, 4, 5 - ]).byteOffset + ]), + _1: f(new Int8Array([ + 1, + 2, + 3, + 4, + 5 + ])) }; }) - ], - tl: { - hd: [ - "typed_array - setArray", - (function (param) { + ], + tl: { + hd: [ + "typed_array - setArrayOffset", + (function (param) { const f = function (a) { a.set([ 9, 8, 7 - ]); + ], 2); return a; }; return { TAG: /* Eq */0, _0: new Int8Array([ + 1, + 2, 9, 8, - 7, - 4, - 5 + 7 ]), _1: f(new Int8Array([ 1, @@ -190,67 +221,59 @@ const suites_1 = { ])) }; }) - ], - tl: { - hd: [ - "typed_array - setArrayOffset", - (function (param) { - const f = function (a) { - a.set([ - 9, - 8, - 7 - ], 2); - return a; - }; + ], + tl: { + hd: [ + "typed_array - length", + (function (param) { return { TAG: /* Eq */0, - _0: new Int8Array([ + _0: 5, + _1: new Int8Array([ 1, 2, - 9, - 8, - 7 - ]), - _1: f(new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ])) + 3, + 4, + 5 + ]).length }; }) - ], - tl: { - hd: [ - "typed_array - length", - (function (param) { + ], + tl: { + hd: [ + "typed_array - copyWithin", + (function (param) { return { TAG: /* Eq */0, - _0: 5, - _1: new Int8Array([ + _0: new Int8Array([ 1, 2, 3, - 4, - 5 - ]).length + 1, + 2 + ]), + _1: new Int8Array([ + 1, + 2, + 3, + 4, + 5 + ]).copyWithin(-2, undefined, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - copyWithin", - (function (param) { + ], + tl: { + hd: [ + "typed_array - copyWithinFrom", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 1, - 2, + 4, + 5, 3, - 1, - 2 + 4, + 5 ]), _1: new Int8Array([ 1, @@ -258,19 +281,19 @@ const suites_1 = { 3, 4, 5 - ]).copyWithin(-2, undefined, undefined) + ]).copyWithin(0, 3, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - copyWithinFrom", - (function (param) { + ], + tl: { + hd: [ + "typed_array - copyWithinFromRange", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ 4, - 5, + 2, 3, 4, 5 @@ -281,41 +304,37 @@ const suites_1 = { 3, 4, 5 - ]).copyWithin(0, 3, undefined) + ]).copyWithin(0, 3, 4) }; }) - ], - tl: { - hd: [ - "typed_array - copyWithinFromRange", - (function (param) { + ], + tl: { + hd: [ + "typed_array - fillInPlace", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ 4, - 2, - 3, 4, - 5 + 4 ]), _1: new Int8Array([ 1, 2, - 3, - 4, - 5 - ]).copyWithin(0, 3, 4) + 3 + ]).fill(4, undefined, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - fillInPlace", - (function (param) { + ], + tl: { + hd: [ + "typed_array - fillFromInPlace", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 4, + 1, 4, 4 ]), @@ -323,223 +342,227 @@ const suites_1 = { 1, 2, 3 - ]).fill(4, undefined, undefined) + ]).fill(4, 1, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - fillFromInPlace", - (function (param) { + ], + tl: { + hd: [ + "typed_array - fillRangeInPlace", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ 1, 4, - 4 + 3 ]), _1: new Int8Array([ 1, 2, 3 - ]).fill(4, 1, undefined) + ]).fill(4, 1, 2) }; }) - ], - tl: { - hd: [ - "typed_array - fillRangeInPlace", - (function (param) { + ], + tl: { + hd: [ + "typed_array - reverseInPlace", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 1, - 4, - 3 + 3, + 2, + 1 ]), _1: new Int8Array([ 1, 2, 3 - ]).fill(4, 1, 2) + ]).reverse() }; }) - ], - tl: { - hd: [ - "typed_array - reverseInPlace", - (function (param) { + ], + tl: { + hd: [ + "typed_array - sortInPlace", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 3, + 1, 2, - 1 + 3 ]), _1: new Int8Array([ + 3, 1, - 2, - 3 - ]).reverse() + 2 + ]).sort() }; }) - ], - tl: { - hd: [ - "typed_array - sortInPlace", - (function (param) { + ], + tl: { + hd: [ + "typed_array - sortInPlaceWith", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 1, + 3, 2, - 3 + 1 ]), _1: new Int8Array([ 3, 1, 2 - ]).sort() + ]).sort(function (a, b) { + return b - a | 0; + }) }; }) - ], - tl: { - hd: [ - "typed_array - sortInPlaceWith", - (function (param) { + ], + tl: { + hd: [ + "typed_array - includes", + (function (param) { return { TAG: /* Eq */0, - _0: new Int8Array([ - 3, - 2, - 1 - ]), + _0: true, _1: new Int8Array([ - 3, 1, - 2 - ]).sort(function (a, b) { - return b - a | 0; - }) + 2, + 3 + ]).includes(3) }; }) - ], - tl: { - hd: [ - "typed_array - includes", - (function (param) { + ], + tl: { + hd: [ + "typed_array - indexOf", + (function (param) { return { TAG: /* Eq */0, - _0: true, + _0: 1, _1: new Int8Array([ 1, 2, 3 - ]).includes(3) + ]).indexOf(2, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - indexOf", - (function (param) { + ], + tl: { + hd: [ + "typed_array - indexOfFrom", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: 3, _1: new Int8Array([ 1, 2, - 3 - ]).indexOf(2, undefined) + 3, + 2 + ]).indexOf(2, 2) }; }) - ], - tl: { - hd: [ - "typed_array - indexOfFrom", - (function (param) { + ], + tl: { + hd: [ + "typed_array - join", + (function (param) { return { TAG: /* Eq */0, - _0: 3, + _0: "1,2,3", _1: new Int8Array([ 1, 2, - 3, - 2 - ]).indexOf(2, 2) + 3 + ]).join(undefined) }; }) - ], - tl: { - hd: [ - "typed_array - join", - (function (param) { + ], + tl: { + hd: [ + "typed_array - joinWith", + (function (param) { return { TAG: /* Eq */0, - _0: "1,2,3", + _0: "1;2;3", _1: new Int8Array([ 1, 2, 3 - ]).join(undefined) + ]).join(";") }; }) - ], - tl: { - hd: [ - "typed_array - joinWith", - (function (param) { + ], + tl: { + hd: [ + "typed_array - lastIndexOf", + (function (param) { return { TAG: /* Eq */0, - _0: "1;2;3", + _0: 1, _1: new Int8Array([ 1, 2, 3 - ]).join(";") + ]).lastIndexOf(2) }; }) - ], - tl: { - hd: [ - "typed_array - lastIndexOf", - (function (param) { + ], + tl: { + hd: [ + "typed_array - lastIndexOfFrom", + (function (param) { return { TAG: /* Eq */0, _0: 1, _1: new Int8Array([ 1, 2, - 3 - ]).lastIndexOf(2) + 3, + 2 + ]).lastIndexOf(2, 2) }; }) - ], - tl: { - hd: [ - "typed_array - lastIndexOfFrom", - (function (param) { + ], + tl: { + hd: [ + "typed_array - slice", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: new Int8Array([ + 2, + 3 + ]), _1: new Int8Array([ 1, 2, 3, - 2 - ]).lastIndexOf(2, 2) + 4, + 5 + ]).slice(1, 3) }; }) - ], - tl: { - hd: [ - "typed_array - slice", - (function (param) { + ], + tl: { + hd: [ + "typed_array - copy", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ + 1, 2, - 3 + 3, + 4, + 5 ]), _1: new Int8Array([ 1, @@ -547,19 +570,17 @@ const suites_1 = { 3, 4, 5 - ]).slice(1, 3) + ]).slice() }; }) - ], - tl: { - hd: [ - "typed_array - copy", - (function (param) { + ], + tl: { + hd: [ + "typed_array - sliceFrom", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 1, - 2, 3, 4, 5 @@ -570,20 +591,19 @@ const suites_1 = { 3, 4, 5 - ]).slice() + ]).slice(2, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - sliceFrom", - (function (param) { + ], + tl: { + hd: [ + "typed_array - subarray", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 3, - 4, - 5 + 2, + 3 ]), _1: new Int8Array([ 1, @@ -591,19 +611,20 @@ const suites_1 = { 3, 4, 5 - ]).slice(2, undefined) + ]).subarray(1, 3) }; }) - ], - tl: { - hd: [ - "typed_array - subarray", - (function (param) { + ], + tl: { + hd: [ + "typed_array - subarrayFrom", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 2, - 3 + 3, + 4, + 5 ]), _1: new Int8Array([ 1, @@ -611,35 +632,29 @@ const suites_1 = { 3, 4, 5 - ]).subarray(1, 3) + ]).subarray(2, undefined) }; }) - ], - tl: { - hd: [ - "typed_array - subarrayFrom", - (function (param) { + ], + tl: { + hd: [ + "typed_array - toString", + (function (param) { return { TAG: /* Eq */0, - _0: new Int8Array([ - 3, - 4, - 5 - ]), + _0: "1,2,3", _1: new Int8Array([ 1, 2, - 3, - 4, - 5 - ]).subarray(2, undefined) + 3 + ]).toString() }; }) - ], - tl: { - hd: [ - "typed_array - toString", - (function (param) { + ], + tl: { + hd: [ + "typed_array - toLocaleString", + (function (param) { return { TAG: /* Eq */0, _0: "1,2,3", @@ -647,123 +662,126 @@ const suites_1 = { 1, 2, 3 - ]).toString() + ]).toLocaleString() }; }) - ], - tl: { - hd: [ - "typed_array - toLocaleString", - (function (param) { + ], + tl: { + hd: [ + "typed_array - every", + (function (param) { return { TAG: /* Eq */0, - _0: "1,2,3", + _0: true, _1: new Int8Array([ 1, 2, 3 - ]).toLocaleString() + ]).every(function (n) { + return n > 0; + }) }; }) - ], - tl: { - hd: [ - "typed_array - every", - (function (param) { + ], + tl: { + hd: [ + "typed_array - everyi", + (function (param) { return { TAG: /* Eq */0, - _0: true, + _0: false, _1: new Int8Array([ 1, 2, 3 - ]).every(function (n) { - return n > 0; + ]).every(function (param, i) { + return i > 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - everyi", - (function (param) { + ], + tl: { + hd: [ + "typed_array - filter", + (function (param) { return { TAG: /* Eq */0, - _0: false, + _0: new Int8Array([ + 2, + 4 + ]), _1: new Int8Array([ 1, 2, - 3 - ]).every(function (param, i) { - return i > 0; + 3, + 4 + ]).filter(function (n) { + return n % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - filter", - (function (param) { + ], + tl: { + hd: [ + "typed_array - filteri", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ - 2, - 4 + 1, + 3 ]), _1: new Int8Array([ 1, 2, 3, 4 - ]).filter(function (n) { - return n % 2 === 0; + ]).filter(function (param, i) { + return i % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - filteri", - (function (param) { + ], + tl: { + hd: [ + "typed_array - find", + (function (param) { return { TAG: /* Eq */0, - _0: new Int8Array([ - 1, - 3 - ]), + _0: 2, _1: new Int8Array([ 1, 2, 3, 4 - ]).filter(function (param, i) { - return i % 2 === 0; + ]).find(function (n) { + return n % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - find", - (function (param) { + ], + tl: { + hd: [ + "typed_array - findi", + (function (param) { return { TAG: /* Eq */0, - _0: 2, + _0: 1, _1: new Int8Array([ 1, 2, 3, 4 - ]).find(function (n) { - return n % 2 === 0; + ]).find(function (param, i) { + return i % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - findi", - (function (param) { + ], + tl: { + hd: [ + "typed_array - findIndex", + (function (param) { return { TAG: /* Eq */0, _0: 1, @@ -772,52 +790,55 @@ const suites_1 = { 2, 3, 4 - ]).find(function (param, i) { - return i % 2 === 0; + ]).findIndex(function (n) { + return n % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - findIndex", - (function (param) { + ], + tl: { + hd: [ + "typed_array - findIndexi", + (function (param) { return { TAG: /* Eq */0, - _0: 1, + _0: 0, _1: new Int8Array([ 1, 2, 3, 4 - ]).findIndex(function (n) { - return n % 2 === 0; + ]).findIndex(function (param, i) { + return i % 2 === 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - findIndexi", - (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: new Int8Array([ - 1, - 2, - 3, - 4 - ]).findIndex(function (param, i) { - return i % 2 === 0; - }) - }; - }) ], tl: { hd: [ "typed_array - forEach", (function (param) { + const sum = { + contents: 0 + }; + new Int8Array([ + 1, + 2, + 3 + ]).forEach(function (n) { + sum.contents = sum.contents + n | 0; + }); + return { + TAG: /* Eq */0, + _0: 6, + _1: sum.contents + }; + }) + ], + tl: { + hd: [ + "typed_array - forEachi", + (function (param) { const sum = { contents: 0 }; @@ -825,1363 +846,1342 @@ const suites_1 = { 1, 2, 3 - ]).forEach(function (n) { - sum.contents = sum.contents + n | 0; + ]).forEach(function (param, i) { + sum.contents = sum.contents + i | 0; }); return { TAG: /* Eq */0, - _0: 6, + _0: 3, _1: sum.contents }; }) - ], - tl: { - hd: [ - "typed_array - forEachi", - (function (param) { - const sum = { - contents: 0 - }; - new Int8Array([ - 1, - 2, - 3 - ]).forEach(function (param, i) { - sum.contents = sum.contents + i | 0; - }); - return { - TAG: /* Eq */0, - _0: 3, - _1: sum.contents - }; - }) ], tl: { hd: [ "typed_array - map", (function (param) { + return { + TAG: /* Eq */0, + _0: new Int8Array([ + 2, + 4, + 6, + 8 + ]), + _1: new Int8Array([ + 1, + 2, + 3, + 4 + ]).map(function (n) { + return (n << 1); + }) + }; + }) + ], + tl: { + hd: [ + "typed_array - map", + (function (param) { return { TAG: /* Eq */0, _0: new Int8Array([ + 0, 2, 4, - 6, - 8 + 6 ]), _1: new Int8Array([ 1, 2, 3, 4 - ]).map(function (n) { - return (n << 1); + ]).map(function (param, i) { + return (i << 1); }) }; }) - ], - tl: { - hd: [ - "typed_array - map", - (function (param) { + ], + tl: { + hd: [ + "typed_array - reduce", + (function (param) { return { TAG: /* Eq */0, - _0: new Int8Array([ - 0, - 2, - 4, - 6 - ]), + _0: -10, _1: new Int8Array([ 1, 2, 3, 4 - ]).map(function (param, i) { - return (i << 1); - }) + ]).reduce((function (acc, n) { + return acc - n | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "typed_array - reduce", - (function (param) { + ], + tl: { + hd: [ + "typed_array - reducei", + (function (param) { return { TAG: /* Eq */0, - _0: -10, + _0: -6, _1: new Int8Array([ 1, 2, 3, 4 - ]).reduce((function (acc, n) { - return acc - n | 0; - }), 0) + ]).reduce((function (acc, param, i) { + return acc - i | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "typed_array - reducei", - (function (param) { + ], + tl: { + hd: [ + "typed_array - reduceRight", + (function (param) { return { TAG: /* Eq */0, - _0: -6, + _0: -10, _1: new Int8Array([ 1, 2, 3, 4 - ]).reduce((function (acc, param, i) { - return acc - i | 0; - }), 0) + ]).reduceRight((function (acc, n) { + return acc - n | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "typed_array - reduceRight", - (function (param) { + ], + tl: { + hd: [ + "typed_array - reduceRighti", + (function (param) { return { TAG: /* Eq */0, - _0: -10, + _0: -6, _1: new Int8Array([ 1, 2, 3, 4 - ]).reduceRight((function (acc, n) { - return acc - n | 0; - }), 0) + ]).reduceRight((function (acc, param, i) { + return acc - i | 0; + }), 0) }; }) - ], - tl: { - hd: [ - "typed_array - reduceRighti", - (function (param) { + ], + tl: { + hd: [ + "typed_array - some", + (function (param) { return { TAG: /* Eq */0, - _0: -6, + _0: false, _1: new Int8Array([ 1, 2, 3, 4 - ]).reduceRight((function (acc, param, i) { - return acc - i | 0; - }), 0) + ]).some(function (n) { + return n <= 0; + }) }; }) - ], - tl: { - hd: [ - "typed_array - some", - (function (param) { + ], + tl: { + hd: [ + "typed_array - somei", + (function (param) { return { TAG: /* Eq */0, - _0: false, + _0: true, _1: new Int8Array([ 1, 2, 3, 4 - ]).some(function (n) { - return n <= 0; + ]).some(function (param, i) { + return i <= 0; }) }; }) - ], - tl: { - hd: [ - "typed_array - somei", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: new Int8Array([ - 1, - 2, - 3, - 4 - ]).some(function (param, i) { - return i <= 0; - }) - }; - }) ], tl: { hd: [ "int8_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: Int8Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: Int8Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "int8_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new Int8Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new Int8Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "int8_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Int8Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Int8Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "int8_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Int8Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Int8Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "int8_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 2, - _1: new Int8Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 2, + _1: new Int8Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "int8_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new Int8Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new Int8Array(3).byteLength + }; + }) ], tl: { hd: [ "int8_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Int8Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Int8Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "uint8_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: Uint8Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: Uint8Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "uint8_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new Uint8Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new Uint8Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "uint8_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Uint8Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Uint8Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "uint8_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Uint8Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Uint8Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "uint8_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 2, - _1: new Uint8Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 2, + _1: new Uint8Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "uint8_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new Uint8Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new Uint8Array(3).byteLength + }; + }) ], tl: { hd: [ "uint8_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Uint8Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Uint8Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "uint8clamped_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: Uint8ClampedArray.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: Uint8ClampedArray.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "uint8clamped_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new Uint8ClampedArray([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new Uint8ClampedArray([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "uint8clamped_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Uint8ClampedArray(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Uint8ClampedArray(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "uint8clamped_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Uint8ClampedArray(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Uint8ClampedArray(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "uint8clamped_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 2, - _1: new Uint8ClampedArray(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 2, + _1: new Uint8ClampedArray(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "uint8clamped_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: new Uint8ClampedArray(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: new Uint8ClampedArray(3).byteLength + }; + }) ], tl: { hd: [ "uint8clamped_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Uint8ClampedArray([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Uint8ClampedArray([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "int16_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Int16Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Int16Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "int16_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 6, - _1: new Int16Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 6, + _1: new Int16Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "int16_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Int16Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Int16Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "int16_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Int16Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Int16Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "int16_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 4, - _1: new Int16Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 4, + _1: new Int16Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "int16_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 6, - _1: new Int16Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 6, + _1: new Int16Array(3).byteLength + }; + }) ], tl: { hd: [ "int16_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Int16Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Int16Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "uint16_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Uint16Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Uint16Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "uint16_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 6, - _1: new Uint16Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 6, + _1: new Uint16Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "uint16_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Uint16Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Uint16Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "uint16_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Uint16Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Uint16Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "uint16_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 4, - _1: new Uint16Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 4, + _1: new Uint16Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "uint16_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 6, - _1: new Uint16Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 6, + _1: new Uint16Array(3).byteLength + }; + }) ], tl: { hd: [ "uint16_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Uint16Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Uint16Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "int32_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Int32Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Int32Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "int32_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 12, - _1: new Int32Array(Stdlib__Array.map((function (prim) { - return prim; - }), [ - 1, - 2, - 3 - ])).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 12, + _1: new Int32Array(Stdlib__Array.map((function (prim) { + return prim; + }), [ + 1, + 2, + 3 + ])).byteLength + }; + }) ], tl: { hd: [ "int32_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Int32Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Int32Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "int32_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Int32Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Int32Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "int32_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 8, - _1: new Int32Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 8, + _1: new Int32Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "int32_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 12, - _1: new Int32Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 12, + _1: new Int32Array(3).byteLength + }; + }) ], tl: { hd: [ "int32_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Int32Array(Stdlib__Array.map((function (prim) { - return prim; - }), [ - 1, - 2, - 3, - 4, - 5 - ])); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Int32Array(Stdlib__Array.map((function (prim) { + return prim; + }), [ + 1, + 2, + 3, + 4, + 5 + ])); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "uint32_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Uint32Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Uint32Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "uint32_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 12, - _1: new Uint32Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 12, + _1: new Uint32Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "uint32_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Uint32Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Uint32Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "uint32_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Uint32Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Uint32Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "uint32_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 8, - _1: new Uint32Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 8, + _1: new Uint32Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "uint32_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 12, - _1: new Uint32Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 12, + _1: new Uint32Array(3).byteLength + }; + }) ], tl: { hd: [ "uint32_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Uint32Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Uint32Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "float32_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Float32Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Float32Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "float32_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 12, - _1: new Float32Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 12, + _1: new Float32Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "float32_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Float32Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Float32Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "float32_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Float32Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Float32Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "float32_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 8, - _1: new Float32Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 8, + _1: new Float32Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "float32_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 12, - _1: new Float32Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 12, + _1: new Float32Array(3).byteLength + }; + }) ], tl: { hd: [ "float32_array - unsafe_set - typed_array sanity check", (function (param) { - const a = new Float32Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + const a = new Float32Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "float64_array - _BYTES_PER_ELEMENT", (function (param) { - return { - TAG: /* Eq */0, - _0: 8, - _1: Float64Array.BYTES_PER_ELEMENT - }; - }) + return { + TAG: /* Eq */0, + _0: 8, + _1: Float64Array.BYTES_PER_ELEMENT + }; + }) ], tl: { hd: [ "float64_array - make", (function (param) { - return { - TAG: /* Eq */0, - _0: 24, - _1: new Float64Array([ - 1, - 2, - 3 - ]).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 24, + _1: new Float64Array([ + 1, + 2, + 3 + ]).byteLength + }; + }) ], tl: { hd: [ "float64_array - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new Float64Array(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new Float64Array(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "float64_array - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new Float64Array(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new Float64Array(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "float64_array - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 16, - _1: new Float64Array(buffer, 8, 2).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 16, + _1: new Float64Array(buffer, 8, 2).byteLength + }; + }) ], tl: { hd: [ "float64_array - fromLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 24, - _1: new Float64Array(3).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 24, + _1: new Float64Array(3).byteLength + }; + }) ], tl: { hd: [ - "float64_array - unsafe_set - typed_array sanity check", - (function (param) { - const a = new Float64Array([ - 1, - 2, - 3, - 4, - 5 - ]); - a[3] = 14; - return { - TAG: /* Eq */0, - _0: 14, - _1: a[3] - }; - }) + "float64_array - unsafe_set - typed_array sanity check", + (function (param) { + const a = new Float64Array([ + 1, + 2, + 3, + 4, + 5 + ]); + a[3] = 14; + return { + TAG: /* Eq */0, + _0: 14, + _1: a[3] + }; + }) ], tl: { hd: [ "DataView - make, byteLength", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new DataView(new ArrayBuffer(32)).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new DataView(new ArrayBuffer(32)).byteLength + }; + }) ], tl: { hd: [ "DataView - fromBuffer", (function (param) { - return { - TAG: /* Eq */0, - _0: 32, - _1: new DataView(new ArrayBuffer(32), undefined, undefined).byteLength - }; - }) + return { + TAG: /* Eq */0, + _0: 32, + _1: new DataView(new ArrayBuffer(32), undefined, undefined).byteLength + }; + }) ], tl: { hd: [ "DataView - fromBufferOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 24, - _1: new DataView(buffer, 8, undefined).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 24, + _1: new DataView(buffer, 8, undefined).byteLength + }; + }) ], tl: { hd: [ "DataView - fromBufferRange", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 4, - _1: new DataView(buffer, 8, 4).byteLength - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 4, + _1: new DataView(buffer, 8, 4).byteLength + }; + }) ], tl: { hd: [ "DataView - buffer", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: buffer, - _1: new DataView(buffer, undefined, undefined).buffer - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: buffer, + _1: new DataView(buffer, undefined, undefined).buffer + }; + }) ], tl: { hd: [ "DataView - byteOffset", (function (param) { - const buffer = new ArrayBuffer(32); - return { - TAG: /* Eq */0, - _0: 8, - _1: new DataView(buffer, 8, undefined).byteOffset - }; - }) + const buffer = new ArrayBuffer(32); + return { + TAG: /* Eq */0, + _0: 8, + _1: new DataView(buffer, 8, undefined).byteOffset + }; + }) ], tl: { hd: [ "DataView - setInt8, getInt8", (function (param) { + const buffer = new ArrayBuffer(8); + const view = new DataView(buffer); + view.setInt8(0, 1); + return { + TAG: /* Eq */0, + _0: 1, + _1: view.getInt8(0) + }; + }) + ], + tl: { + hd: [ + "DataView - setUint8, getUint8", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setInt8(0, 1); + view.setUint8(0, 128); return { TAG: /* Eq */0, - _0: 1, - _1: view.getInt8(0) + _0: 128, + _1: view.getUint8(0) }; }) - ], - tl: { - hd: [ - "DataView - setUint8, getUint8", - (function (param) { + ], + tl: { + hd: [ + "DataView - setInt16, getInt16", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setUint8(0, 128); + view.setInt16(0, 257); return { TAG: /* Eq */0, - _0: 128, - _1: view.getUint8(0) + _0: 257, + _1: view.getInt16(0) }; }) - ], - tl: { - hd: [ - "DataView - setInt16, getInt16", - (function (param) { + ], + tl: { + hd: [ + "DataView - getInt16LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setInt16(0, 257); + view.setInt16(0, 25000, 1); return { TAG: /* Eq */0, - _0: 257, - _1: view.getInt16(0) + _0: 25000, + _1: view.getInt16(0, 1) }; }) - ], - tl: { - hd: [ - "DataView - getInt16LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setInt16LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); view.setInt16(0, 25000, 1); return { TAG: /* Eq */0, - _0: 25000, - _1: view.getInt16(0, 1) + _0: -22431, + _1: view.getInt16(0) }; }) - ], - tl: { - hd: [ - "DataView - setInt16LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setUint16, getUint16", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setInt16(0, 25000, 1); + view.setUint16(0, 32768); return { TAG: /* Eq */0, - _0: -22431, - _1: view.getInt16(0) + _0: 32768, + _1: view.getUint16(0) }; }) - ], - tl: { - hd: [ - "DataView - setUint16, getUint16", - (function (param) { + ], + tl: { + hd: [ + "DataView - getUint16LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setUint16(0, 32768); + view.setUint16(0, 32768, 1); return { TAG: /* Eq */0, _0: 32768, - _1: view.getUint16(0) + _1: view.getUint16(0, 1) }; }) - ], - tl: { - hd: [ - "DataView - getUint16LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setUint16LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); view.setUint16(0, 32768, 1); return { TAG: /* Eq */0, - _0: 32768, - _1: view.getUint16(0, 1) + _0: 128, + _1: view.getUint16(0) }; }) - ], - tl: { - hd: [ - "DataView - setUint16LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setInt32, getInt32", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setUint16(0, 32768, 1); + view.setInt32(0, 65537); return { TAG: /* Eq */0, - _0: 128, - _1: view.getUint16(0) + _0: 65537, + _1: view.getInt32(0) }; }) - ], - tl: { - hd: [ - "DataView - setInt32, getInt32", - (function (param) { + ], + tl: { + hd: [ + "DataView - getInt32LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setInt32(0, 65537); + view.setInt32(0, 65537, 1); return { TAG: /* Eq */0, _0: 65537, - _1: view.getInt32(0) + _1: view.getInt32(0, 1) }; }) - ], - tl: { - hd: [ - "DataView - getInt32LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setInt32LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); view.setInt32(0, 65537, 1); return { TAG: /* Eq */0, - _0: 65537, - _1: view.getInt32(0, 1) + _0: 16777472, + _1: view.getInt32(0) }; }) - ], - tl: { - hd: [ - "DataView - setInt32LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setUint32, getUint32", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setInt32(0, 65537, 1); + view.setUint32(0, 65537); return { TAG: /* Eq */0, - _0: 16777472, - _1: view.getInt32(0) + _0: 65537, + _1: view.getUint32(0) }; }) - ], - tl: { - hd: [ - "DataView - setUint32, getUint32", - (function (param) { + ], + tl: { + hd: [ + "DataView - getUint32LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setUint32(0, 65537); + view.setUint32(0, 65537, 1); return { TAG: /* Eq */0, _0: 65537, - _1: view.getUint32(0) + _1: view.getUint32(0, 1) }; }) - ], - tl: { - hd: [ - "DataView - getUint32LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setUint32LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); view.setUint32(0, 65537, 1); return { TAG: /* Eq */0, - _0: 65537, - _1: view.getUint32(0, 1) + _0: 16777472, + _1: view.getUint32(0) }; }) - ], - tl: { - hd: [ - "DataView - setUint32LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setFloat32, getFloat32", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setUint32(0, 65537, 1); + view.setFloat32(0, 65537.0); return { TAG: /* Eq */0, - _0: 16777472, - _1: view.getUint32(0) + _0: 65537.0, + _1: view.getFloat32(0) }; }) - ], - tl: { - hd: [ - "DataView - setFloat32, getFloat32", - (function (param) { + ], + tl: { + hd: [ + "DataView - getFloat32LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setFloat32(0, 65537.0); + view.setFloat32(0, 65537.0, 1); return { TAG: /* Eq */0, _0: 65537.0, - _1: view.getFloat32(0) + _1: view.getFloat32(0, 1) }; }) - ], - tl: { - hd: [ - "DataView - getFloat32LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setFloat32LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setFloat32(0, 65537.0, 1); + view.setFloat32(0, 1.0, 1); return { TAG: /* Eq */0, - _0: 65537.0, - _1: view.getFloat32(0, 1) + _0: 4.600602988224807e-41, + _1: view.getFloat32(0) }; }) - ], - tl: { - hd: [ - "DataView - setFloat32LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setFloat64, getFloat64", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setFloat32(0, 1.0, 1); + view.setFloat64(0, 1e200); return { TAG: /* Eq */0, - _0: 4.600602988224807e-41, - _1: view.getFloat32(0) + _0: 1e200, + _1: view.getFloat64(0) }; }) - ], - tl: { - hd: [ - "DataView - setFloat64, getFloat64", - (function (param) { + ], + tl: { + hd: [ + "DataView - getFloat64LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setFloat64(0, 1e200); + view.setFloat64(0, 1e200, 1); return { TAG: /* Eq */0, _0: 1e200, - _1: view.getFloat64(0) + _1: view.getFloat64(0, 1) }; }) - ], - tl: { - hd: [ - "DataView - getFloat64LittleEndian", - (function (param) { + ], + tl: { + hd: [ + "DataView - setFloat64LittleEndian", + (function (param) { const buffer = new ArrayBuffer(8); const view = new DataView(buffer); - view.setFloat64(0, 1e200, 1); + view.setFloat64(0, 1.0, 1); return { TAG: /* Eq */0, - _0: 1e200, - _1: view.getFloat64(0, 1) + _0: 3.03865e-319, + _1: view.getFloat64(0) }; }) - ], - tl: { - hd: [ - "DataView - setFloat64LittleEndian", - (function (param) { - const buffer = new ArrayBuffer(8); - const view = new DataView(buffer); - view.setFloat64(0, 1.0, 1); - return { - TAG: /* Eq */0, - _0: 3.03865e-319, - _1: view.getFloat64(0) - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_undefined_test.js b/jscomp/test/dist/jscomp/test/js_undefined_test.js index 0bee1d41a..9ec6ad572 100644 --- a/jscomp/test/dist/jscomp/test/js_undefined_test.js +++ b/jscomp/test/dist/jscomp/test/js_undefined_test.js @@ -8,139 +8,139 @@ const Mt = require("./mt.js"); const suites_0 = [ "toOption - empty", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: undefined - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: undefined + }; + }) ]; const suites_1 = { hd: [ "File \"jscomp/test/js_undefined_test.ml\", line 5, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: undefined - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: undefined + }; + }) ], tl: { hd: [ "return", (function (param) { - return { - TAG: /* Eq */0, - _0: "something", - _1: Caml_option.undefined_to_opt("something") - }; - }) + return { + TAG: /* Eq */0, + _0: "something", + _1: Caml_option.undefined_to_opt("something") + }; + }) ], tl: { hd: [ "test - empty", (function (param) { + return { + TAG: /* Eq */0, + _0: true, + _1: true + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/js_undefined_test.ml\", line 8, characters 2-9", + (function (param) { return { TAG: /* Eq */0, _0: true, _1: true }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/js_undefined_test.ml\", line 8, characters 2-9", - (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: true - }; - }) ], tl: { hd: [ "bind - empty", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Js__Js_undefined.bind((function (v) { - return v; - }), undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: Js__Js_undefined.bind((function (v) { + return v; + }), undefined) + }; + }) ], tl: { hd: [ "map - 'a", (function (param) { - return { - TAG: /* Eq */0, - _0: 4, - _1: Js__Js_undefined.map((function (n) { - return (n << 1); - }), 2) - }; - }) + return { + TAG: /* Eq */0, + _0: 4, + _1: Js__Js_undefined.map((function (n) { + return (n << 1); + }), 2) + }; + }) ], tl: { hd: [ "iter - empty", (function (param) { + const hit = { + contents: false + }; + Js__Js_undefined.iter((function (param) { + hit.contents = true; + }), undefined); + return { + TAG: /* Eq */0, + _0: false, + _1: hit.contents + }; + }) + ], + tl: { + hd: [ + "iter - 'a", + (function (param) { const hit = { - contents: false + contents: 0 }; - Js__Js_undefined.iter((function (param) { - hit.contents = true; - }), undefined); + Js__Js_undefined.iter((function (v) { + hit.contents = v; + }), 2); return { TAG: /* Eq */0, - _0: false, + _0: 2, _1: hit.contents }; }) - ], - tl: { - hd: [ - "iter - 'a", - (function (param) { - const hit = { - contents: 0 - }; - Js__Js_undefined.iter((function (v) { - hit.contents = v; - }), 2); - return { - TAG: /* Eq */0, - _0: 2, - _1: hit.contents - }; - }) ], tl: { hd: [ "fromOption - None", (function (param) { - return { - TAG: /* Eq */0, - _0: undefined, - _1: Js__Js_undefined.fromOption(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: undefined, + _1: Js__Js_undefined.fromOption(undefined) + }; + }) ], tl: { hd: [ "fromOption - Some", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Js__Js_undefined.fromOption(2) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Js__Js_undefined.fromOption(2) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_weakmap_test.js b/jscomp/test/dist/jscomp/test/js_weakmap_test.js index 5b112dd95..b99452984 100644 --- a/jscomp/test/dist/jscomp/test/js_weakmap_test.js +++ b/jscomp/test/dist/jscomp/test/js_weakmap_test.js @@ -6,118 +6,118 @@ const Mt = require("./mt.js"); const suites_0 = [ "add", (function (param) { - const key = {}; - const weakmap = new WeakMap().set(key, "value"); - return { - TAG: /* Eq */0, - _0: true, - _1: weakmap.has(key) - }; - }) + const key = {}; + const weakmap = new WeakMap().set(key, "value"); + return { + TAG: /* Eq */0, + _0: true, + _1: weakmap.has(key) + }; + }) ]; const suites_1 = { hd: [ "delete - true", (function (param) { + const key = {}; + const weakmap = new WeakMap().set(key, "value"); + const deleted = weakmap.delete(key); + return { + TAG: /* Eq */0, + _0: [ + true, + false + ], + _1: [ + deleted, + weakmap.has(key) + ] + }; + }) + ], + tl: { + hd: [ + "delete - false", + (function (param) { const key = {}; const weakmap = new WeakMap().set(key, "value"); - const deleted = weakmap.delete(key); + const deleted = weakmap.delete({}); return { TAG: /* Eq */0, - _0: [ - true, - false - ], - _1: [ - deleted, - weakmap.has(key) - ] + _0: false, + _1: deleted }; }) - ], - tl: { - hd: [ - "delete - false", - (function (param) { - const key = {}; - const weakmap = new WeakMap().set(key, "value"); - const deleted = weakmap.delete({}); - return { - TAG: /* Eq */0, - _0: false, - _1: deleted - }; - }) ], tl: { hd: [ "get", (function (param) { + const key_a = {}; + const key_b = {}; + const weakmap = new WeakMap().set(key_a, "value_a"); + const a = weakmap.get(key_a); + const b = weakmap.get(key_b); + return { + TAG: /* Eq */0, + _0: [ + "value_a", + undefined + ], + _1: [ + a, + b + ] + }; + }) + ], + tl: { + hd: [ + "has", + (function (param) { const key_a = {}; const key_b = {}; - const weakmap = new WeakMap().set(key_a, "value_a"); - const a = weakmap.get(key_a); - const b = weakmap.get(key_b); + const weakmap = new WeakMap().set(key_a, "value_a").set(key_b, "value_b"); + const has_b_before = weakmap.has(key_b); + weakmap.delete(key_b); + const has_b_after = weakmap.has(key_b); return { TAG: /* Eq */0, _0: [ - "value_a", - undefined + has_b_before, + has_b_after ], _1: [ - a, - b + true, + false ] }; }) - ], - tl: { - hd: [ - "has", - (function (param) { + ], + tl: { + hd: [ + "set mutate + return new weakmap", + (function (param) { const key_a = {}; const key_b = {}; - const weakmap = new WeakMap().set(key_a, "value_a").set(key_b, "value_b"); - const has_b_before = weakmap.has(key_b); - weakmap.delete(key_b); - const has_b_after = weakmap.has(key_b); + const weakmap_1 = new WeakMap(); + const weakmap_2 = weakmap_1.set(key_a, "value_a"); + const weakmap_3 = weakmap_2.set(key_b, "value_b"); + const all_has_b = weakmap_1.has(key_b) === true && weakmap_2.has(key_b) && weakmap_3.has(key_b); + const all_same_ref = weakmap_1 === weakmap_2 && weakmap_2 === weakmap_3; return { TAG: /* Eq */0, _0: [ - has_b_before, - has_b_after + true, + true ], _1: [ - true, - false + all_has_b, + all_same_ref ] }; }) - ], - tl: { - hd: [ - "set mutate + return new weakmap", - (function (param) { - const key_a = {}; - const key_b = {}; - const weakmap_1 = new WeakMap(); - const weakmap_2 = weakmap_1.set(key_a, "value_a"); - const weakmap_3 = weakmap_2.set(key_b, "value_b"); - const all_has_b = weakmap_1.has(key_b) === true && weakmap_2.has(key_b) && weakmap_3.has(key_b); - const all_same_ref = weakmap_1 === weakmap_2 && weakmap_2 === weakmap_3; - return { - TAG: /* Eq */0, - _0: [ - true, - true - ], - _1: [ - all_has_b, - all_same_ref - ] - }; - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/js_weakset_test.js b/jscomp/test/dist/jscomp/test/js_weakset_test.js index 17eb12eec..d4b546a14 100644 --- a/jscomp/test/dist/jscomp/test/js_weakset_test.js +++ b/jscomp/test/dist/jscomp/test/js_weakset_test.js @@ -6,111 +6,111 @@ const Mt = require("./mt.js"); const suites_0 = [ "add", (function (param) { - const value = {}; - const weakset = new WeakSet().add(value); - return { - TAG: /* Eq */0, - _0: true, - _1: weakset.has(value) - }; - }) + const value = {}; + const weakset = new WeakSet().add(value); + return { + TAG: /* Eq */0, + _0: true, + _1: weakset.has(value) + }; + }) ]; const suites_1 = { hd: [ "delete - true", (function (param) { - const value = {}; - const weakset = new WeakSet().add(value); - const deleted = weakset.delete(value); - return { - TAG: /* Eq */0, - _0: [ - true, - false - ], - _1: [ - deleted, - weakset.has(value) - ] - }; - }) + const value = {}; + const weakset = new WeakSet().add(value); + const deleted = weakset.delete(value); + return { + TAG: /* Eq */0, + _0: [ + true, + false + ], + _1: [ + deleted, + weakset.has(value) + ] + }; + }) ], tl: { hd: [ "delete - false", (function (param) { + const a = {}; + const b = {}; + const weakset = new WeakSet().add(a); + const deleted = weakset.delete(b); + return { + TAG: /* Eq */0, + _0: false, + _1: deleted + }; + }) + ], + tl: { + hd: [ + "has", + (function (param) { const a = {}; const b = {}; - const weakset = new WeakSet().add(a); - const deleted = weakset.delete(b); + const weakset = new WeakSet().add(a).add(b); + const has_b_before = weakset.has(b); + weakset.delete(b); + const has_b_after = weakset.has(b); return { TAG: /* Eq */0, - _0: false, - _1: deleted + _0: [ + has_b_before, + has_b_after + ], + _1: [ + true, + false + ] }; }) - ], - tl: { - hd: [ - "has", - (function (param) { + ], + tl: { + hd: [ + "add mutate + return new weakset", + (function (param) { const a = {}; const b = {}; - const weakset = new WeakSet().add(a).add(b); - const has_b_before = weakset.has(b); - weakset.delete(b); - const has_b_after = weakset.has(b); + const weakset_1 = new WeakSet(); + const weakset_2 = weakset_1.add(a); + const weakset_3 = weakset_2.add(b); + const all_has_b = weakset_1.has(b) === true && weakset_2.has(b) && weakset_3.has(b); + const all_same_ref = weakset_1 === weakset_2 && weakset_2 === weakset_3; return { TAG: /* Eq */0, _0: [ - has_b_before, - has_b_after + true, + true ], _1: [ - true, - false + all_has_b, + all_same_ref ] }; }) - ], - tl: { - hd: [ - "add mutate + return new weakset", - (function (param) { - const a = {}; - const b = {}; - const weakset_1 = new WeakSet(); - const weakset_2 = weakset_1.add(a); - const weakset_3 = weakset_2.add(b); - const all_has_b = weakset_1.has(b) === true && weakset_2.has(b) && weakset_3.has(b); - const all_same_ref = weakset_1 === weakset_2 && weakset_2 === weakset_3; - return { - TAG: /* Eq */0, - _0: [ - true, - true - ], - _1: [ - all_has_b, - all_same_ref - ] - }; - }) ], tl: { hd: [ "record", (function (param) { - const value = {}; - value["k"] = 1; - const weakset = new WeakSet().add(value); - return { - TAG: /* Eq */0, - _0: true, - _1: weakset.has(value) - }; - }) + const value = {}; + value["k"] = 1; + const weakset = new WeakSet().add(value); + return { + TAG: /* Eq */0, + _0: true, + _1: weakset.has(value) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/jsoo_400_test.js b/jscomp/test/dist/jscomp/test/jsoo_400_test.js index 15b90b79f..cd1779b6b 100644 --- a/jscomp/test/dist/jscomp/test/jsoo_400_test.js +++ b/jscomp/test/dist/jscomp/test/jsoo_400_test.js @@ -19,13 +19,13 @@ Mt.from_pair_suites("Jsoo_400_test", { hd: [ "File \"jscomp/test/jsoo_400_test.ml\", line 8, characters 3-10", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - u(undefined); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + u(undefined); + }) + }; + }) ], tl: /* [] */0 }); 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 fbe630362..06d324917 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 @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -45,8 +45,8 @@ eq("File \"jscomp/test/key_word_property_plus_test.ml\", line 10, characters 5-1 13, 14 ].reduce((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), 0), ((((((((((((Global_mangles.$$__dirname + Global_mangles.$$__filename | 0) + Global_mangles.$$clearImmediate | 0) + Global_mangles.$$clearInterval | 0) + Global_mangles.$$clearTimeout | 0) + Global_mangles.$$console | 0) + Global_mangles.$$exports | 0) + Global_mangles.$$global | 0) + Global_mangles._module | 0) + Global_mangles.$$process | 0) + Global_mangles.$$require | 0) + Global_mangles.$$setImmediate | 0) + Global_mangles.$$setInterval | 0) + Global_mangles.$$setTimeout | 0); + return prim0 + prim1 | 0; + }), 0), ((((((((((((Global_mangles.$$__dirname + Global_mangles.$$__filename | 0) + Global_mangles.$$clearImmediate | 0) + Global_mangles.$$clearInterval | 0) + Global_mangles.$$clearTimeout | 0) + Global_mangles.$$console | 0) + Global_mangles.$$exports | 0) + Global_mangles.$$global | 0) + Global_mangles._module | 0) + Global_mangles.$$process | 0) + Global_mangles.$$require | 0) + Global_mangles.$$setImmediate | 0) + Global_mangles.$$setInterval | 0) + Global_mangles.$$setTimeout | 0); Mt.from_pair_suites("Key_word_property_plus_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/large_obj_test.js b/jscomp/test/dist/jscomp/test/large_obj_test.js index 3b01af507..6b4ad1375 100644 --- a/jscomp/test/dist/jscomp/test/large_obj_test.js +++ b/jscomp/test/dist/jscomp/test/large_obj_test.js @@ -402,84 +402,84 @@ const field99 = ids[119]; CamlinternalOO.set_methods($$class, [ get0, (function (self$1) { - return self$1[field0] + 0 | 0; - }), + return self$1[field0] + 0 | 0; + }), get1, (function (self$1) { - return self$1[field1] + 1 | 0; - }), + return self$1[field1] + 1 | 0; + }), get2, (function (self$1) { - return self$1[field2] + 2 | 0; - }), + return self$1[field2] + 2 | 0; + }), get3, (function (self$1) { - return self$1[field3] + 3 | 0; - }), + return self$1[field3] + 3 | 0; + }), get4, (function (self$1) { - return self$1[field4] + 4 | 0; - }), + return self$1[field4] + 4 | 0; + }), get5, (function (self$1) { - return self$1[field5] + 5 | 0; - }), + return self$1[field5] + 5 | 0; + }), get6, (function (self$1) { - return self$1[field6] + 6 | 0; - }), + return self$1[field6] + 6 | 0; + }), get7, (function (self$1) { - return self$1[field7] + 7 | 0; - }), + return self$1[field7] + 7 | 0; + }), get8, (function (self$1) { - return self$1[field8] + 8 | 0; - }), + return self$1[field8] + 8 | 0; + }), get9, (function (self$1) { - return self$1[field9] + 9 | 0; - }), + return self$1[field9] + 9 | 0; + }), get10, (function (self$1) { - return self$1[field10] + 10 | 0; - }), + return self$1[field10] + 10 | 0; + }), get11, (function (self$1) { - return self$1[field11] + 11 | 0; - }), + return self$1[field11] + 11 | 0; + }), get12, (function (self$1) { - return self$1[field12] + 12 | 0; - }), + return self$1[field12] + 12 | 0; + }), get13, (function (self$1) { - return self$1[field13] + 13 | 0; - }), + return self$1[field13] + 13 | 0; + }), get14, (function (self$1) { - return self$1[field14] + 14 | 0; - }), + return self$1[field14] + 14 | 0; + }), get15, (function (self$1) { - return self$1[field15] + 15 | 0; - }), + return self$1[field15] + 15 | 0; + }), get16, (function (self$1) { - return self$1[field16] + 16 | 0; - }), + return self$1[field16] + 16 | 0; + }), get17, (function (self$1) { - return self$1[field17] + 17 | 0; - }), + return self$1[field17] + 17 | 0; + }), get18, (function (self$1) { - return self$1[field18] + 18 | 0; - }), + return self$1[field18] + 18 | 0; + }), get19, (function (self$1) { - return self$1[field19] + 19 | 0; - }) + return self$1[field19] + 19 | 0; + }) ]); function obj_init(env) { @@ -727,84 +727,84 @@ function raw_class_init($$class) { CamlinternalOO.set_methods($$class, [ get0, (function (self$2) { - return self$2[field0] + 0 | 0; - }), + return self$2[field0] + 0 | 0; + }), get1, (function (self$2) { - return self$2[field1] + 1 | 0; - }), + return self$2[field1] + 1 | 0; + }), get2, (function (self$2) { - return self$2[field2] + 2 | 0; - }), + return self$2[field2] + 2 | 0; + }), get3, (function (self$2) { - return self$2[field3] + 3 | 0; - }), + return self$2[field3] + 3 | 0; + }), get4, (function (self$2) { - return self$2[field4] + 4 | 0; - }), + return self$2[field4] + 4 | 0; + }), get5, (function (self$2) { - return self$2[field5] + 5 | 0; - }), + return self$2[field5] + 5 | 0; + }), get6, (function (self$2) { - return self$2[field6] + 6 | 0; - }), + return self$2[field6] + 6 | 0; + }), get7, (function (self$2) { - return self$2[field7] + 7 | 0; - }), + return self$2[field7] + 7 | 0; + }), get8, (function (self$2) { - return self$2[field8] + 8 | 0; - }), + return self$2[field8] + 8 | 0; + }), get9, (function (self$2) { - return self$2[field9] + 9 | 0; - }), + return self$2[field9] + 9 | 0; + }), get10, (function (self$2) { - return self$2[field10] + 10 | 0; - }), + return self$2[field10] + 10 | 0; + }), get11, (function (self$2) { - return self$2[field11] + 11 | 0; - }), + return self$2[field11] + 11 | 0; + }), get12, (function (self$2) { - return self$2[field12] + 12 | 0; - }), + return self$2[field12] + 12 | 0; + }), get13, (function (self$2) { - return self$2[field13] + 13 | 0; - }), + return self$2[field13] + 13 | 0; + }), get14, (function (self$2) { - return self$2[field14] + 14 | 0; - }), + return self$2[field14] + 14 | 0; + }), get15, (function (self$2) { - return self$2[field15] + 15 | 0; - }), + return self$2[field15] + 15 | 0; + }), get16, (function (self$2) { - return self$2[field16] + 16 | 0; - }), + return self$2[field16] + 16 | 0; + }), get17, (function (self$2) { - return self$2[field17] + 17 | 0; - }), + return self$2[field17] + 17 | 0; + }), get18, (function (self$2) { - return self$2[field18] + 18 | 0; - }), + return self$2[field18] + 18 | 0; + }), get19, (function (self$2) { - return self$2[field19] + 19 | 0; - }) + return self$2[field19] + 19 | 0; + }) ]); return function (env, self, value) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); diff --git a/jscomp/test/dist/jscomp/test/lazy_test.js b/jscomp/test/dist/jscomp/test/lazy_test.js index 7a7bffbc6..a5020e2fe 100644 --- a/jscomp/test/dist/jscomp/test/lazy_test.js +++ b/jscomp/test/dist/jscomp/test/lazy_test.js @@ -14,8 +14,8 @@ const u = { const v = { LAZY_DONE: false, VAL: (function () { - u.contents = 32; - }) + u.contents = 32; + }) }; function lazy_test(param) { @@ -56,15 +56,15 @@ const s = { const set_true = { LAZY_DONE: false, VAL: (function () { - s.contents = 1; - }) + s.contents = 1; + }) }; const set_false = { LAZY_DONE: false, VAL: (function () { - s.contents = undefined; - }) + s.contents = undefined; + }) }; let h; @@ -92,8 +92,8 @@ const u_v = { const u$1 = { LAZY_DONE: false, VAL: (function () { - u_v.contents = 2; - }) + u_v.contents = 2; + }) }; CamlinternalLazy.force(u$1); @@ -103,17 +103,17 @@ const exotic = CamlinternalLazy.force; const l_from_fun = { LAZY_DONE: false, VAL: (function () { - return 3; - }) + return 3; + }) }; const forward_test = { LAZY_DONE: false, VAL: (function () { - let u = 3; - u = u + 1 | 0; - return u; - }) + let u = 3; + u = u + 1 | 0; + return u; + }) }; const f005 = { @@ -124,29 +124,29 @@ const f005 = { const f006 = { LAZY_DONE: false, VAL: (function () { - return function (param) { - return 3; - }; - }) + return function (param) { + return 3; + }; + }) }; const f007 = { LAZY_DONE: false, VAL: (function () { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found - }); - }) + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { + MEL_EXN_ID: Stdlib.Not_found + }); + }) }; const f008 = { LAZY_DONE: false, VAL: (function () { - console.log("hi"); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found - }); - }) + console.log("hi"); + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { + MEL_EXN_ID: Stdlib.Not_found + }); + }) }; function a2(x) { @@ -184,157 +184,157 @@ Mt.from_pair_suites("Lazy_test", { hd: [ "simple", (function (param) { - return { - TAG: /* Eq */0, - _0: lazy_test(undefined), - _1: [ - 3, - 32 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: lazy_test(undefined), + _1: [ + 3, + 32 + ] + }; + }) ], tl: { hd: [ "lazy_match", (function (param) { - return { - TAG: /* Eq */0, - _0: h, - _1: 2 - }; - }) + return { + TAG: /* Eq */0, + _0: h, + _1: 2 + }; + }) ], tl: { hd: [ "lazy_force", (function (param) { - return { - TAG: /* Eq */0, - _0: u_v.contents, - _1: 2 - }; - }) + return { + TAG: /* Eq */0, + _0: u_v.contents, + _1: 2 + }; + }) ], tl: { hd: [ "lazy_from_fun", (function (param) { - return { - TAG: /* Eq */0, - _0: CamlinternalLazy.force(l_from_fun), - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: CamlinternalLazy.force(l_from_fun), + _1: 3 + }; + }) ], tl: { hd: [ "lazy_from_val", (function (param) { - return { - TAG: /* Eq */0, - _0: CamlinternalLazy.force({ - LAZY_DONE: true, - VAL: 3 - }), - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: CamlinternalLazy.force({ + LAZY_DONE: true, + VAL: 3 + }), + _1: 3 + }; + }) ], tl: { hd: [ "lazy_from_val2", (function (param) { + return { + TAG: /* Eq */0, + _0: CamlinternalLazy.force(CamlinternalLazy.force({ + LAZY_DONE: true, + VAL: { + LAZY_DONE: true, + VAL: 3 + } + })), + _1: 3 + }; + }) + ], + tl: { + hd: [ + "lazy_from_val3", + (function (param) { + debugger; return { TAG: /* Eq */0, _0: CamlinternalLazy.force(CamlinternalLazy.force({ LAZY_DONE: true, - VAL: { - LAZY_DONE: true, - VAL: 3 - } + VAL: forward_test })), - _1: 3 + _1: 4 }; }) - ], - tl: { - hd: [ - "lazy_from_val3", - (function (param) { - debugger; - return { - TAG: /* Eq */0, - _0: CamlinternalLazy.force(CamlinternalLazy.force({ - LAZY_DONE: true, - VAL: forward_test - })), - _1: 4 - }; - }) ], tl: { hd: [ "jscomp/test/lazy_test.ml", (function (param) { - return { - TAG: /* Eq */0, - _0: a3, - _1: a4 - }; - }) + return { + TAG: /* Eq */0, + _0: a3, + _1: a4 + }; + }) ], tl: { hd: [ "jscomp/test/lazy_test.ml", (function (param) { - return { - TAG: /* Eq */0, - _0: a7, - _1: undefined - }; - }) + return { + TAG: /* Eq */0, + _0: a7, + _1: undefined + }; + }) ], tl: { hd: [ "jscomp/test/lazy_test.ml", (function (param) { - return { - TAG: /* Eq */0, - _0: a8, - _1: undefined - }; - }) + return { + TAG: /* Eq */0, + _0: a8, + _1: undefined + }; + }) ], tl: { hd: [ "File \"jscomp/test/lazy_test.ml\", line 76, characters 0-7", (function (param) { - return { - TAG: /* Ok */4, - _0: Stdlib__Lazy.is_val({ - LAZY_DONE: true, - VAL: 3 - }) - }; - }) + return { + TAG: /* Ok */4, + _0: Stdlib__Lazy.is_val({ + LAZY_DONE: true, + VAL: 3 + }) + }; + }) ], tl: { hd: [ "File \"jscomp/test/lazy_test.ml\", line 77, characters 0-7", (function (param) { - return { - TAG: /* Ok */4, - _0: !Stdlib__Lazy.is_val({ - LAZY_DONE: false, - VAL: (function () { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found - }); - }) + return { + TAG: /* Ok */4, + _0: !Stdlib__Lazy.is_val({ + LAZY_DONE: false, + VAL: (function () { + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { + MEL_EXN_ID: Stdlib.Not_found + }); }) - }; - }) + }) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/lexer_test.js b/jscomp/test/dist/jscomp/test/lexer_test.js index 00228561e..c2f9955aa 100644 --- a/jscomp/test/dist/jscomp/test/lexer_test.js +++ b/jscomp/test/dist/jscomp/test/lexer_test.js @@ -53,114 +53,113 @@ function from_tokens(lst) { const lexer_suites_0 = [ "arith_token", (function (param) { - return { - TAG: /* Eq */0, - _0: get_tokens(Arith_lexer.lexeme, "x + 3 + 4 + y"), - _1: { - hd: { - TAG: /* IDENT */1, - _0: "x" - }, + return { + TAG: /* Eq */0, + _0: get_tokens(Arith_lexer.lexeme, "x + 3 + 4 + y"), + _1: { + hd: { + TAG: /* IDENT */1, + _0: "x" + }, + tl: { + hd: /* PLUS */0, tl: { - hd: /* PLUS */0, + hd: { + TAG: /* NUMERAL */0, + _0: 3 + }, tl: { - hd: { - TAG: /* NUMERAL */0, - _0: 3 - }, + hd: /* PLUS */0, tl: { - hd: /* PLUS */0, + hd: { + TAG: /* NUMERAL */0, + _0: 4 + }, tl: { - hd: { - TAG: /* NUMERAL */0, - _0: 4 - }, + hd: /* PLUS */0, tl: { - hd: /* PLUS */0, - tl: { - hd: { - TAG: /* IDENT */1, - _0: "y" - }, - tl: /* [] */0 - } + hd: { + TAG: /* IDENT */1, + _0: "y" + }, + tl: /* [] */0 } } } } } } - }; - }) + } + }; + }) ]; const lexer_suites_1 = { hd: [ "simple token", (function (param) { - return { - TAG: /* Eq */0, - _0: Arith_lexer.lexeme(Stdlib__Lexing.from_string(undefined, "10")), - _1: { - TAG: /* NUMERAL */0, - _0: 10 - } - }; - }) + return { + TAG: /* Eq */0, + _0: Arith_lexer.lexeme(Stdlib__Lexing.from_string(undefined, "10")), + _1: { + TAG: /* NUMERAL */0, + _0: 10 + } + }; + }) ], tl: { hd: [ "number_lexer", (function (param) { - const v = { - contents: /* [] */0 - }; - const add = function (t) { - v.contents = { - hd: t, - tl: v.contents - }; + const v = { + contents: /* [] */0 + }; + const add = function (t) { + v.contents = { + hd: t, + tl: v.contents }; - Number_lexer.token(add, Stdlib__Lexing.from_string(undefined, "32 + 32 ( ) * / ")); - return { - TAG: /* Eq */0, - _0: Stdlib__List.rev(v.contents), - _1: { - hd: "number", + }; + Number_lexer.token(add, Stdlib__Lexing.from_string(undefined, "32 + 32 ( ) * / ")); + return { + TAG: /* Eq */0, + _0: Stdlib__List.rev(v.contents), + _1: { + hd: "number", + tl: { + hd: "32", tl: { - hd: "32", + hd: "new line", tl: { - hd: "new line", + hd: "+", tl: { - hd: "+", + hd: "new line", tl: { - hd: "new line", + hd: "number", tl: { - hd: "number", + hd: "32", tl: { - hd: "32", + hd: "new line", tl: { - hd: "new line", + hd: "(", tl: { - hd: "(", + hd: "new line", tl: { - hd: "new line", + hd: ")", tl: { - hd: ")", + hd: "new line", tl: { - hd: "new line", + hd: "*", tl: { - hd: "*", + hd: "new line", tl: { - hd: "new line", + hd: "/", tl: { - hd: "/", + hd: "new line", tl: { - hd: "new line", - tl: { - hd: "eof", - tl: /* [] */0 - } + hd: "eof", + tl: /* [] */0 } } } @@ -177,30 +176,31 @@ const lexer_suites_1 = { } } } - }; - }) + } + }; + }) ], tl: { hd: [ "simple number", (function (param) { - return { - TAG: /* Eq */0, - _0: Arith_syntax.str(Arith_parser.toplevel(Arith_lexer.lexeme, Stdlib__Lexing.from_string(undefined, "10"))), - _1: "10." - }; - }) + return { + TAG: /* Eq */0, + _0: Arith_syntax.str(Arith_parser.toplevel(Arith_lexer.lexeme, Stdlib__Lexing.from_string(undefined, "10"))), + _1: "10." + }; + }) ], tl: { hd: [ "arith", (function (param) { - return { - TAG: /* Eq */0, - _0: Arith_syntax.str(Arith_parser.toplevel(Arith_lexer.lexeme, Stdlib__Lexing.from_string(undefined, "x + 3 + 4 + y"))), - _1: "x+3.+4.+y" - }; - }) + return { + TAG: /* Eq */0, + _0: Arith_syntax.str(Arith_parser.toplevel(Arith_lexer.lexeme, Stdlib__Lexing.from_string(undefined, "x + 3 + 4 + y"))), + _1: "x+3.+4.+y" + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/lib_js_test.js b/jscomp/test/dist/jscomp/test/lib_js_test.js index d8c329448..88247cc6d 100644 --- a/jscomp/test/dist/jscomp/test/lib_js_test.js +++ b/jscomp/test/dist/jscomp/test/lib_js_test.js @@ -19,12 +19,12 @@ console.log("hey"); const suites_0 = [ "anything_to_string", (function (param) { - return { - TAG: /* Eq */0, - _0: "3", - _1: String(3) - }; - }) + return { + TAG: /* Eq */0, + _0: "3", + _1: String(3) + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/libarg_test.js b/jscomp/test/dist/jscomp/test/libarg_test.js index 782f05c65..cdc0872b8 100644 --- a/jscomp/test/dist/jscomp/test/libarg_test.js +++ b/jscomp/test/dist/jscomp/test/libarg_test.js @@ -18,11 +18,11 @@ const accum = { function record(fmt) { return Stdlib__Printf.ksprintf((function (s) { - accum.contents = { - hd: s, - tl: accum.contents - }; - }), fmt); + accum.contents = { + hd: s, + tl: accum.contents + }; + }), fmt); } function f_unit(param) { diff --git a/jscomp/test/dist/jscomp/test/libqueue_test.js b/jscomp/test/dist/jscomp/test/libqueue_test.js index e3f6dab4e..338147244 100644 --- a/jscomp/test/dist/jscomp/test/libqueue_test.js +++ b/jscomp/test/dist/jscomp/test/libqueue_test.js @@ -9,11 +9,11 @@ const Stdlib__Queue = require("melange/queue.js"); function to_list(q) { return Stdlib__List.rev(Stdlib__Queue.fold((function (l, x) { - return { - hd: x, - tl: l - }; - }), /* [] */0, q)); + return { + hd: x, + tl: l + }; + }), /* [] */0, q)); } const Q = { @@ -75,9 +75,9 @@ if (!(Caml_obj.caml_equal(to_list(q), /* [] */0) && q.length === 0)) { Stdlib__Queue.add(1, q); if (!(Caml_obj.caml_equal(to_list(q), { - hd: 1, - tl: /* [] */0 - }) && q.length === 1)) { + hd: 1, + tl: /* [] */0 + }) && q.length === 1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -91,12 +91,12 @@ if (!(Caml_obj.caml_equal(to_list(q), { Stdlib__Queue.add(2, q); if (!(Caml_obj.caml_equal(to_list(q), { - hd: 1, - tl: { - hd: 2, - tl: /* [] */0 - } - }) && q.length === 2)) { + hd: 1, + tl: { + hd: 2, + tl: /* [] */0 + } + }) && q.length === 2)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -110,15 +110,15 @@ if (!(Caml_obj.caml_equal(to_list(q), { Stdlib__Queue.add(3, q); if (!(Caml_obj.caml_equal(to_list(q), { - hd: 1, + hd: 1, + tl: { + hd: 2, tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } + hd: 3, + tl: /* [] */0 } - }) && q.length === 3)) { + } + }) && q.length === 3)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -132,18 +132,18 @@ if (!(Caml_obj.caml_equal(to_list(q), { Stdlib__Queue.add(4, q); if (!(Caml_obj.caml_equal(to_list(q), { - hd: 1, + hd: 1, + tl: { + hd: 2, tl: { - hd: 2, + hd: 3, tl: { - hd: 3, - tl: { - hd: 4, - tl: /* [] */0 - } + hd: 4, + tl: /* [] */0 } } - }) && q.length === 4)) { + } + }) && q.length === 4)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -166,15 +166,15 @@ if (Stdlib__Queue.take(q) !== 1) { } if (!(Caml_obj.caml_equal(to_list(q), { - hd: 2, + hd: 2, + tl: { + hd: 3, tl: { - hd: 3, - tl: { - hd: 4, - tl: /* [] */0 - } + hd: 4, + tl: /* [] */0 } - }) && q.length === 3)) { + } + }) && q.length === 3)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -197,12 +197,12 @@ if (Stdlib__Queue.take(q) !== 2) { } if (!(Caml_obj.caml_equal(to_list(q), { - hd: 3, - tl: { - hd: 4, - tl: /* [] */0 - } - }) && q.length === 2)) { + hd: 3, + tl: { + hd: 4, + tl: /* [] */0 + } + }) && q.length === 2)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -225,9 +225,9 @@ if (Stdlib__Queue.take(q) !== 3) { } if (!(Caml_obj.caml_equal(to_list(q), { - hd: 4, - tl: /* [] */0 - }) && q.length === 1)) { + hd: 4, + tl: /* [] */0 + }) && q.length === 1)) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -778,18 +778,18 @@ const i$7 = { }; Stdlib__Queue.iter((function (j) { - if (i$7.contents !== j) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/libqueue_test.ml", - 107, - 19 - ] - }); - } - i$7.contents = i$7.contents + 1 | 0; - }), q$5); + if (i$7.contents !== j) { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/libqueue_test.ml", + 107, + 19 + ] + }); + } + i$7.contents = i$7.contents + 1 | 0; + }), q$5); const q1$1 = { length: 0, diff --git a/jscomp/test/dist/jscomp/test/limits_test.js b/jscomp/test/dist/jscomp/test/limits_test.js index 915c3c017..af9572c24 100644 --- a/jscomp/test/dist/jscomp/test/limits_test.js +++ b/jscomp/test/dist/jscomp/test/limits_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/list_stack.js b/jscomp/test/dist/jscomp/test/list_stack.js index 282a78e2d..b55234ff4 100644 --- a/jscomp/test/dist/jscomp/test/list_stack.js +++ b/jscomp/test/dist/jscomp/test/list_stack.js @@ -4,7 +4,7 @@ const Stdlib__List = require("melange/list.js"); Stdlib__List.find((function (x) { - return x > 3; - }), /* [] */0); + return x > 3; + }), /* [] */0); /* Not a pure module */ diff --git a/jscomp/test/dist/jscomp/test/list_test.js b/jscomp/test/dist/jscomp/test/list_test.js index f7630341b..9f18b969c 100644 --- a/jscomp/test/dist/jscomp/test/list_test.js +++ b/jscomp/test/dist/jscomp/test/list_test.js @@ -9,96 +9,96 @@ const Stdlib__List = require("melange/list.js"); const list_suites_0 = [ "length", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: Stdlib__List.length({ - hd: [ - 0, - 1, - 2, - 3, - 4 - ], - tl: /* [] */0 - }) - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: Stdlib__List.length({ + hd: [ + 0, + 1, + 2, + 3, + 4 + ], + tl: /* [] */0 + }) + }; + }) ]; const list_suites_1 = { hd: [ "length2", (function (param) { - return { - TAG: /* Eq */0, - _0: 5, - _1: Stdlib__List.length({ - hd: 0, + return { + TAG: /* Eq */0, + _0: 5, + _1: Stdlib__List.length({ + hd: 0, + tl: { + hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 3, tl: { - hd: 3, - tl: { - hd: 4, - tl: /* [] */0 - } + hd: 4, + tl: /* [] */0 } } } - }) - }; - }) + } + }) + }; + }) ], tl: { hd: [ "long_length", (function (param) { - return { - TAG: /* Eq */0, - _0: 30000, - _1: Stdlib__List.length(Stdlib__Array.to_list(Stdlib__Array.init(30000, (function (param) { - return 0; - })))) - }; - }) + return { + TAG: /* Eq */0, + _0: 30000, + _1: Stdlib__List.length(Stdlib__Array.to_list(Stdlib__Array.init(30000, (function (param) { + return 0; + })))) + }; + }) ], tl: { hd: [ "sort", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__List.sort(Caml.caml_int_compare, { - hd: 4, + return { + TAG: /* Eq */0, + _0: Stdlib__List.sort(Caml.caml_int_compare, { + hd: 4, + tl: { + hd: 1, tl: { - hd: 1, + hd: 2, tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } + hd: 3, + tl: /* [] */0 } } - }), - _1: { - hd: 1, + } + }), + _1: { + hd: 1, + tl: { + hd: 2, tl: { - hd: 2, + hd: 3, tl: { - hd: 3, - tl: { - hd: 4, - tl: /* [] */0 - } + hd: 4, + tl: /* [] */0 } } } - }; - }) + } + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/loop_regression_test.js b/jscomp/test/dist/jscomp/test/loop_regression_test.js index 45c5b279e..052d61f15 100644 --- a/jscomp/test/dist/jscomp/test/loop_regression_test.js +++ b/jscomp/test/dist/jscomp/test/loop_regression_test.js @@ -24,12 +24,12 @@ function f(param) { const suites_0 = [ "sum", (function (param) { - return { - TAG: /* Eq */0, - _0: 55, - _1: f(undefined) - }; - }) + return { + TAG: /* Eq */0, + _0: 55, + _1: f(undefined) + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/map_find_test.js b/jscomp/test/dist/jscomp/test/map_find_test.js index 25d9e6d9a..948bd27b7 100644 --- a/jscomp/test/dist/jscomp/test/map_find_test.js +++ b/jscomp/test/dist/jscomp/test/map_find_test.js @@ -158,8 +158,8 @@ function find(x, _param) { } const m = Stdlib__List.fold_left((function (acc, param) { - return Curry._3(add, param[0], param[1], acc); - }), /* Empty */0, { + return Curry._3(add, param[0], param[1], acc); + }), /* Empty */0, { hd: [ 10, /* 'a' */97 @@ -335,8 +335,8 @@ function find$1(x, _param) { } const s = Stdlib__List.fold_left((function (acc, param) { - return Curry._3(add$1, param[0], param[1], acc); - }), /* Empty */0, { + return Curry._3(add$1, param[0], param[1], acc); + }), /* Empty */0, { hd: [ "10", /* 'a' */97 @@ -366,23 +366,23 @@ Mt.from_pair_suites("Map_find_test", { hd: [ "int", (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._2(find, 10, m), - _1: /* 'a' */97 - }; - }) + return { + TAG: /* Eq */0, + _0: Curry._2(find, 10, m), + _1: /* 'a' */97 + }; + }) ], tl: { hd: [ "string", (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._2(find$1, "10", s), - _1: /* 'a' */97 - }; - }) + return { + TAG: /* Eq */0, + _0: Curry._2(find$1, "10", s), + _1: /* 'a' */97 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/map_test.js b/jscomp/test/dist/jscomp/test/map_test.js index 60a99200f..d5c294dd1 100644 --- a/jscomp/test/dist/jscomp/test/map_test.js +++ b/jscomp/test/dist/jscomp/test/map_test.js @@ -228,8 +228,8 @@ function cardinal(param) { function of_list(bs) { return Stdlib__List.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), /* Empty */0, bs); + return add(param[0], param[1], m); + }), /* Empty */0, bs); } const funarg = { @@ -382,6 +382,37 @@ function find(x, _param) { const int_map_suites_0 = [ "add", (function (param) { + const v = Curry._1(of_list, { + hd: [ + 1, + /* '1' */49 + ], + tl: { + hd: [ + 2, + /* '3' */51 + ], + tl: { + hd: [ + 3, + /* '4' */52 + ], + tl: /* [] */0 + } + } + }); + return { + TAG: /* Eq */0, + _0: Curry._1(cardinal, v), + _1: 3 + }; + }) +]; + +const int_map_suites_1 = { + hd: [ + "equal", + (function (param) { const v = Curry._1(of_list, { hd: [ 1, @@ -401,18 +432,36 @@ const int_map_suites_0 = [ } } }); + const u = Curry._1(of_list, { + hd: [ + 2, + /* '3' */51 + ], + tl: { + hd: [ + 3, + /* '4' */52 + ], + tl: { + hd: [ + 1, + /* '1' */49 + ], + tl: /* [] */0 + } + } + }); return { TAG: /* Eq */0, - _0: Curry._1(cardinal, v), - _1: 3 + _0: Curry._3(compare$1, Caml.caml_int_compare, u, v), + _1: 0 }; }) -]; - -const int_map_suites_1 = { - hd: [ - "equal", - (function (param) { + ], + tl: { + hd: [ + "equal2", + (function (param) { const v = Curry._1(of_list, { hd: [ 1, @@ -453,83 +502,34 @@ const int_map_suites_1 = { }); return { TAG: /* Eq */0, - _0: Curry._3(compare$1, Caml.caml_int_compare, u, v), - _1: 0 + _0: true, + _1: Curry._3(equal, (function (x, y) { + return x === y; + }), u, v) }; }) - ], - tl: { - hd: [ - "equal2", - (function (param) { - const v = Curry._1(of_list, { - hd: [ - 1, - /* '1' */49 - ], - tl: { - hd: [ - 2, - /* '3' */51 - ], - tl: { - hd: [ - 3, - /* '4' */52 - ], - tl: /* [] */0 - } - } - }); - const u = Curry._1(of_list, { - hd: [ - 2, - /* '3' */51 - ], - tl: { - hd: [ - 3, - /* '4' */52 - ], - tl: { - hd: [ - 1, - /* '1' */49 - ], - tl: /* [] */0 - } - } - }); - return { - TAG: /* Eq */0, - _0: true, - _1: Curry._3(equal, (function (x, y) { - return x === y; - }), u, v) - }; - }) ], tl: { hd: [ "iteration", (function (param) { - let m = /* Empty */0; - for (let i = 0; i <= 10000; ++i) { - m = Curry._3(add$1, String(i), String(i), m); - } - 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; - } - + let m = /* Empty */0; + for (let i = 0; i <= 10000; ++i) { + m = Curry._3(add$1, String(i), String(i), m); + } + 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; } - return { - TAG: /* Eq */0, - _0: v, - _1: -1 - }; - }) + + } + return { + TAG: /* Eq */0, + _0: v, + _1: -1 + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/mario_game.js b/jscomp/test/dist/jscomp/test/mario_game.js index ff8fcf4bb..a1b4612ee 100644 --- a/jscomp/test/dist/jscomp/test/mario_game.js +++ b/jscomp/test/dist/jscomp/test/mario_game.js @@ -959,47 +959,47 @@ function update_player(player, keys, context) { const prev_dir = player.dir; const prev_vx = Math.abs(player.vel.x); Stdlib__List.iter((function (param) { - const lr_acc = player.vel.x * 0.2; - switch (param) { - case /* CLeft */0 : - if (!player.crouch) { - if (player.vel.x > - player.params.speed) { - player.vel.x = player.vel.x - (0.4 - lr_acc); - } - player.dir = /* Left */0; - return; - } else { - return; - } - case /* CRight */1 : - if (!player.crouch) { - if (player.vel.x < player.params.speed) { - player.vel.x = player.vel.x + (0.4 + lr_acc); - } - player.dir = /* Right */1; - return; - } else { - return; - } - case /* CUp */2 : - if (!player.jumping && player.grounded) { - player.jumping = true; - player.grounded = false; - player.vel.y = Caml.caml_float_max(player.vel.y - (5.7 + Math.abs(player.vel.x) * 0.25), -6); - return; - } else { - return; + const lr_acc = player.vel.x * 0.2; + switch (param) { + case /* CLeft */0 : + if (!player.crouch) { + if (player.vel.x > - player.params.speed) { + player.vel.x = player.vel.x - (0.4 - lr_acc); } - case /* CDown */3 : - if (!player.jumping && player.grounded) { - player.crouch = true; - return; - } else { - return; + player.dir = /* Left */0; + return; + } else { + return; + } + case /* CRight */1 : + if (!player.crouch) { + if (player.vel.x < player.params.speed) { + player.vel.x = player.vel.x + (0.4 + lr_acc); } - - } - }), keys); + player.dir = /* Right */1; + return; + } else { + return; + } + case /* CUp */2 : + if (!player.jumping && player.grounded) { + player.jumping = true; + player.grounded = false; + player.vel.y = Caml.caml_float_max(player.vel.y - (5.7 + Math.abs(player.vel.x) * 0.25), -6); + return; + } else { + return; + } + case /* CDown */3 : + if (!player.jumping && player.grounded) { + player.crouch = true; + return; + } else { + return; + } + + } + }), keys); const v = player.vel.x * 0.9; const vel_damped = Math.abs(v) < 0.1 ? 0 : v; player.vel.x = vel_damped; @@ -2105,12 +2105,12 @@ function process_collision(dir, c1, c2, state) { function broad_phase(collid, all_collids, state) { const obj = collid._2; return Stdlib__List.filter((function (c) { - if (in_viewport(state.vpt, obj.pos) || is_player(collid)) { - return true; - } else { - return out_of_viewport_below(state.vpt, obj.pos.y); - } - }), all_collids); + if (in_viewport(state.vpt, obj.pos) || is_player(collid)) { + return true; + } else { + return out_of_viewport_below(state.vpt, obj.pos.y); + } + }), all_collids); } function check_collisions(collid, all_collids, state) { @@ -2225,15 +2225,15 @@ function translate_keys(param) { tl: ctrls_1 }; return Stdlib__List.fold_left((function (a, x) { - if (x[0]) { - return { - hd: x[1], - tl: a - }; - } else { - return a; - } - }), /* [] */0, ctrls); + if (x[0]) { + return { + hd: x[1], + tl: a + }; + } else { + return a; + } + }), /* [] */0, ctrls); } function run_update_collid(state, collid, all_collids) { @@ -2319,25 +2319,25 @@ function update_loop(canvas, param, map_dim) { game_over: state.game_over }; Stdlib__List.iter((function (obj) { - run_update_collid(state$1, obj, objs); - }), objs); + run_update_collid(state$1, obj, objs); + }), objs); Stdlib__List.iter((function (part) { - $$process(part); - const x = part.pos.x - state$1.vpt.pos.x; - const y = part.pos.y - state$1.vpt.pos.y; - render(part.params.sprite, [ - x, - y - ]); - if (!part.kill) { - particles.contents = { - hd: part, - tl: particles.contents - }; - return; - } - - }), parts); + $$process(part); + const x = part.pos.x - state$1.vpt.pos.x; + const y = part.pos.y - state$1.vpt.pos.y; + render(part.params.sprite, [ + x, + y + ]); + if (!part.kill) { + particles.contents = { + hd: part, + tl: particles.contents + }; + return; + } + + }), parts); fps(canvas, fps$1); hud(canvas, state$1.score, state$1.coins); requestAnimationFrame(function (t) { @@ -3359,14 +3359,14 @@ function inc_counter(param) { function preload(param) { return Stdlib__List.map((function (img_src) { - const img_src$1 = "sprites/" + img_src; - const img = document.createElement("img"); - img.src = img_src$1; - img.addEventListener("load", (function (ev) { - inc_counter(undefined); - return true; - }), true); - }), { + const img_src$1 = "sprites/" + img_src; + const img = document.createElement("img"); + img.src = img_src$1; + img.addEventListener("load", (function (ev) { + inc_counter(undefined); + return true; + }), true); + }), { hd: "blocks.png", tl: { hd: "items.png", @@ -3382,9 +3382,9 @@ function preload(param) { } window.onload = (function (param) { - preload(undefined); - return true; - }); + preload(undefined); + return true; +}); const Main = { loadCount: loadCount, diff --git a/jscomp/test/dist/jscomp/test/match_case_test.js b/jscomp/test/dist/jscomp/test/match_case_test.js index 95a2b27a6..21e168c40 100644 --- a/jscomp/test/dist/jscomp/test/match_case_test.js +++ b/jscomp/test/dist/jscomp/test/match_case_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/method_name_test.js b/jscomp/test/dist/jscomp/test/method_name_test.js index 7389f18c2..2b99ad479 100644 --- a/jscomp/test/dist/jscomp/test/method_name_test.js +++ b/jscomp/test/dist/jscomp/test/method_name_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/mock_mt.js b/jscomp/test/dist/jscomp/test/mock_mt.js index 02da87fbf..521a68675 100644 --- a/jscomp/test/dist/jscomp/test/mock_mt.js +++ b/jscomp/test/dist/jscomp/test/mock_mt.js @@ -10,78 +10,78 @@ function from_pair_suites(name, suites) { "testing" ]); Stdlib__List.iter((function (param) { - const name = param[0]; - const fn = Curry._1(param[1], undefined); - switch (fn.TAG) { - case /* Eq */0 : - console.log([ - name, - fn._0, - "eq?", - fn._1 - ]); - return; - case /* Neq */1 : - console.log([ - name, - fn._0, - "neq?", - fn._1 - ]); - return; - case /* StrictEq */2 : - console.log([ - name, - fn._0, - "strict_eq?", - fn._1 - ]); - return; - case /* StrictNeq */3 : - console.log([ - name, - fn._0, - "strict_neq?", - fn._1 - ]); - return; - case /* Ok */4 : - console.log([ - name, - fn._0, - "ok?" - ]); - return; - case /* Approx */5 : - console.log([ - name, - fn._0, - "~", - fn._1 - ]); - return; - case /* ApproxThreshold */6 : - console.log([ - name, - fn._1, - "~", - fn._2, - " (", - fn._0, - ")" - ]); - return; - case /* ThrowAny */7 : - return; - case /* Fail */8 : - console.log("failed"); - return; - case /* FailWith */9 : - console.log("failed: " + fn._0); - return; - - } - }), suites); + const name = param[0]; + const fn = Curry._1(param[1], undefined); + switch (fn.TAG) { + case /* Eq */0 : + console.log([ + name, + fn._0, + "eq?", + fn._1 + ]); + return; + case /* Neq */1 : + console.log([ + name, + fn._0, + "neq?", + fn._1 + ]); + return; + case /* StrictEq */2 : + console.log([ + name, + fn._0, + "strict_eq?", + fn._1 + ]); + return; + case /* StrictNeq */3 : + console.log([ + name, + fn._0, + "strict_neq?", + fn._1 + ]); + return; + case /* Ok */4 : + console.log([ + name, + fn._0, + "ok?" + ]); + return; + case /* Approx */5 : + console.log([ + name, + fn._0, + "~", + fn._1 + ]); + return; + case /* ApproxThreshold */6 : + console.log([ + name, + fn._1, + "~", + fn._2, + " (", + fn._0, + ")" + ]); + return; + case /* ThrowAny */7 : + return; + case /* Fail */8 : + console.log("failed"); + return; + case /* FailWith */9 : + console.log("failed: " + fn._0); + return; + + } + }), suites); } exports.from_pair_suites = from_pair_suites; diff --git a/jscomp/test/dist/jscomp/test/module_alias_test.js b/jscomp/test/dist/jscomp/test/module_alias_test.js index 3d18eda5e..d06ed949f 100644 --- a/jscomp/test/dist/jscomp/test/module_alias_test.js +++ b/jscomp/test/dist/jscomp/test/module_alias_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/module_parameter_test.js b/jscomp/test/dist/jscomp/test/module_parameter_test.js index 13d9f7796..f6ebedebf 100644 --- a/jscomp/test/dist/jscomp/test/module_parameter_test.js +++ b/jscomp/test/dist/jscomp/test/module_parameter_test.js @@ -21,24 +21,24 @@ function v(x) { const suites_0 = [ "const", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: 1 + }; + }) ]; const suites_1 = { hd: [ "other", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: 3 + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/module_splice_test.js b/jscomp/test/dist/jscomp/test/module_splice_test.js index 0293424cd..3f7101de1 100644 --- a/jscomp/test/dist/jscomp/test/module_splice_test.js +++ b/jscomp/test/dist/jscomp/test/module_splice_test.js @@ -21,12 +21,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/mpr_6033_test.js b/jscomp/test/dist/jscomp/test/mpr_6033_test.js index 6f60e776c..c7d4aea12 100644 --- a/jscomp/test/dist/jscomp/test/mpr_6033_test.js +++ b/jscomp/test/dist/jscomp/test/mpr_6033_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/mt.js b/jscomp/test/dist/jscomp/test/mt.js index e5a163955..394acb05e 100644 --- a/jscomp/test/dist/jscomp/test/mt.js +++ b/jscomp/test/dist/jscomp/test/mt.js @@ -33,13 +33,13 @@ function from_suites(name, suite) { const match = Stdlib__Array.to_list(Process.argv); if (match && is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const partial_arg = param[1]; - it(param[0], (function () { - return Curry._1(partial_arg, undefined); - })); - }), suite); - })); + return Stdlib__List.iter((function (param) { + const partial_arg = param[1]; + it(param[0], (function () { + return Curry._1(partial_arg, undefined); + })); + }), suite); + })); return; } @@ -101,13 +101,13 @@ function from_pair_suites(name, suites) { if (match) { if (is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const code = param[1]; - it(param[0], (function () { - return handleCode(Curry._1(code, undefined)); - })); - }), suites); - })); + return Stdlib__List.iter((function (param) { + const code = param[1]; + it(param[0], (function () { + return handleCode(Curry._1(code, undefined)); + })); + }), suites); + })); return; } else { console.log([ @@ -115,78 +115,78 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - const name = param[0]; - const _fn = Curry._1(param[1], undefined); - switch (_fn.TAG) { - case /* Eq */0 : - console.log([ - name, - _fn._0, - "eq?", - _fn._1 - ]); - return; - case /* Neq */1 : - console.log([ - name, - _fn._0, - "neq?", - _fn._1 - ]); - return; - case /* StrictEq */2 : - console.log([ - name, - _fn._0, - "strict_eq?", - _fn._1 - ]); - return; - case /* StrictNeq */3 : - console.log([ - name, - _fn._0, - "strict_neq?", - _fn._1 - ]); - return; - case /* Ok */4 : - console.log([ - name, - _fn._0, - "ok?" - ]); - return; - case /* Approx */5 : - console.log([ - name, - _fn._0, - "~", - _fn._1 - ]); - return; - case /* ApproxThreshold */6 : - console.log([ - name, - _fn._1, - "~", - _fn._2, - " (", - _fn._0, - ")" - ]); - return; - case /* ThrowAny */7 : - return; - case /* Fail */8 : - console.log("failed"); - return; - case /* FailWith */9 : - console.log("failed: " + _fn._0); - return; - - } - }), suites); + const name = param[0]; + const _fn = Curry._1(param[1], undefined); + switch (_fn.TAG) { + case /* Eq */0 : + console.log([ + name, + _fn._0, + "eq?", + _fn._1 + ]); + return; + case /* Neq */1 : + console.log([ + name, + _fn._0, + "neq?", + _fn._1 + ]); + return; + case /* StrictEq */2 : + console.log([ + name, + _fn._0, + "strict_eq?", + _fn._1 + ]); + return; + case /* StrictNeq */3 : + console.log([ + name, + _fn._0, + "strict_neq?", + _fn._1 + ]); + return; + case /* Ok */4 : + console.log([ + name, + _fn._0, + "ok?" + ]); + return; + case /* Approx */5 : + console.log([ + name, + _fn._0, + "~", + _fn._1 + ]); + return; + case /* ApproxThreshold */6 : + console.log([ + name, + _fn._1, + "~", + _fn._2, + " (", + _fn._0, + ")" + ]); + return; + case /* ThrowAny */7 : + return; + case /* Fail */8 : + console.log("failed"); + return; + case /* FailWith */9 : + console.log("failed: " + _fn._0); + return; + + } + }), suites); } } @@ -199,16 +199,16 @@ function from_promise_suites(name, suites) { if (match) { if (is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const code = param[1]; - it(param[0], (function () { - return code.then(function (x) { - handleCode(x); - return val_unit; - }); - })); - }), suites); - })); + return Stdlib__List.iter((function (param) { + const code = param[1]; + it(param[0], (function () { + return code.then(function (x) { + handleCode(x); + return val_unit; + }); + })); + }), suites); + })); } else { console.log("promise suites"); } @@ -223,12 +223,12 @@ function eq_suites(test_id, suites, loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -240,11 +240,11 @@ function bool_suites(test_id, suites, loc, x) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Ok */4, - _0: x - }; - }) + return { + TAG: /* Ok */4, + _0: x + }; + }) ], tl: suites.contents }; @@ -256,11 +256,11 @@ function throw_suites(test_id, suites, loc, x) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* ThrowAny */7, - _0: x - }; - }) + return { + TAG: /* ThrowAny */7, + _0: x + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/mt_global.js b/jscomp/test/dist/jscomp/test/mt_global.js index 2f2e010cf..dcc4f9cee 100644 --- a/jscomp/test/dist/jscomp/test/mt_global.js +++ b/jscomp/test/dist/jscomp/test/mt_global.js @@ -8,12 +8,12 @@ function collect_eq(test_id, suites, loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -25,12 +25,12 @@ function collect_neq(test_id, suites, loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Neq */1, - _0: x, - _1: y - }; - }) + return { + TAG: /* Neq */1, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -42,12 +42,12 @@ function collect_approx(test_id, suites, loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Approx */5, - _0: x, - _1: y - }; - }) + return { + TAG: /* Approx */5, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/mutable_obj_test.js b/jscomp/test/dist/jscomp/test/mutable_obj_test.js index 300ca983f..ccc1aa576 100644 --- a/jscomp/test/dist/jscomp/test/mutable_obj_test.js +++ b/jscomp/test/dist/jscomp/test/mutable_obj_test.js @@ -4,11 +4,11 @@ function f(x) { x.dec = (function (x) { - return { - x: x, - y: x - }; - }); + return { + x: x, + y: x + }; + }); } exports.f = f; diff --git a/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js b/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js index 49516c5ac..c86a901b3 100644 --- a/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js +++ b/jscomp/test/dist/jscomp/test/mutable_uncurry_test.js @@ -41,10 +41,10 @@ eqs("File \"jscomp/test/mutable_uncurry_test.ml\", line 15, characters 7-14", tr const u = { hi: (function (param, param$1) { - const x = param.contents; - const y = param$1.contents; - return x === y; - }) + const x = param.contents; + const y = param$1.contents; + return x === y; + }) }; const h = u.hi({ diff --git a/jscomp/test/dist/jscomp/test/name_mangle_test.js b/jscomp/test/dist/jscomp/test/name_mangle_test.js index c847a98da..e4bdf2a60 100644 --- a/jscomp/test/dist/jscomp/test/name_mangle_test.js +++ b/jscomp/test/dist/jscomp/test/name_mangle_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/obj_curry_test.js b/jscomp/test/dist/jscomp/test/obj_curry_test.js index d723dc729..3e51a8957 100644 --- a/jscomp/test/dist/jscomp/test/obj_curry_test.js +++ b/jscomp/test/dist/jscomp/test/obj_curry_test.js @@ -13,8 +13,8 @@ const $$class = CamlinternalOO.create_table(["hi"]); const hi = CamlinternalOO.get_method_label($$class, "hi"); const 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))); + return (x + y | 0) + z | 0; + })), CamlinternalOO.init_class($$class), CamlinternalOO.create_object_opt(undefined, $$class))); exports.f = f; exports.a = a; diff --git a/jscomp/test/dist/jscomp/test/obj_literal_ppx.js b/jscomp/test/dist/jscomp/test/obj_literal_ppx.js index 689bb3892..f75d4f6a3 100644 --- a/jscomp/test/dist/jscomp/test/obj_literal_ppx.js +++ b/jscomp/test/dist/jscomp/test/obj_literal_ppx.js @@ -12,8 +12,8 @@ const b = { y: [1], z: 3, u: (function (x, y) { - return x + y | 0; - }) + return x + y | 0; + }) }; function f(obj) { diff --git a/jscomp/test/dist/jscomp/test/obj_magic_test.js b/jscomp/test/dist/jscomp/test/obj_magic_test.js index 2c0b33da8..b0f8348c0 100644 --- a/jscomp/test/dist/jscomp/test/obj_magic_test.js +++ b/jscomp/test/dist/jscomp/test/obj_magic_test.js @@ -10,49 +10,49 @@ function is_block(x) { const suites_0 = [ "is_block_test1", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: false + }; + }) ]; const suites_1 = { hd: [ "is_block_test2", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: typeof ({ - hd: 3, - tl: /* [] */0 - }) !== "number" - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: typeof ({ + hd: 3, + tl: /* [] */0 + }) !== "number" + }; + }) ], tl: { hd: [ "is_block_test3", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: true + }; + }) ], tl: { hd: [ "is_block_test4", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: false + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/obj_test.js b/jscomp/test/dist/jscomp/test/obj_test.js index faaf79d9a..cbdfd0d5a 100644 --- a/jscomp/test/dist/jscomp/test/obj_test.js +++ b/jscomp/test/dist/jscomp/test/obj_test.js @@ -27,12 +27,12 @@ const hello = ids[1]; CamlinternalOO.set_methods($$class, [ hi, (function (self$1, x, y) { - return x + y | 0; - }), + return x + y | 0; + }), hello, (function (self$1, z) { - return Curry._3(self$1[0][hi], self$1, 10, z); - }) + return Curry._3(self$1[0][hi], self$1, 10, z); + }) ]); CamlinternalOO.init_class($$class); @@ -56,12 +56,12 @@ const x = ids$1[1]; CamlinternalOO.set_methods($$class$1, [ x, (function (self$2) { - return 3; - }), + return 3; + }), y, (function (self$2) { - return 32; - }) + return 32; + }) ]); CamlinternalOO.init_class($$class$1); @@ -93,20 +93,20 @@ const hello$1 = ids$2[3]; CamlinternalOO.set_methods($$class$2, [ hi$1, (function (self$3, v, z) { - return v + z | 0; - }), + return v + z | 0; + }), id1, (function (self$3) { - return 3; - }), + return 3; + }), id2, (function (self$3) { - return 4; - }), + return 4; + }), hello$1, (function (self$3, v) { - return v; - }) + return v; + }) ]); CamlinternalOO.init_class($$class$2); @@ -118,8 +118,8 @@ const $$class$3 = CamlinternalOO.create_table(["id"]); const id = CamlinternalOO.get_method_label($$class$3, "id"); CamlinternalOO.set_method($$class$3, id, (function (self$4) { - return "uu"; - })); + return "uu"; + })); CamlinternalOO.init_class($$class$3); @@ -130,8 +130,8 @@ const $$class$4 = CamlinternalOO.create_table(["add"]); const add = CamlinternalOO.get_method_label($$class$4, "add"); CamlinternalOO.set_method($$class$4, add, (function (self$5, x, y) { - return x + y | 0; - })); + return x + y | 0; + })); CamlinternalOO.init_class($$class$4); @@ -148,12 +148,12 @@ const add$1 = ids$3[1]; CamlinternalOO.set_methods($$class$5, [ add$1, (function (self$6, x, y) { - return x + y | 0; - }), + return x + y | 0; + }), hi$2, (function (self$6, x) { - return Curry._3(self$6[0][add$1], self$6, x, 32); - }) + return Curry._3(self$6[0][add$1], self$6, x, 32); + }) ]); CamlinternalOO.init_class($$class$5); @@ -163,6 +163,24 @@ const vvvv = CamlinternalOO.create_object_opt(undefined, $$class$5); const suites_0 = [ "single_obj", (function (param) { + return { + TAG: /* Eq */0, + _0: [ + 3, + 32 + ], + _1: [ + Caml_oo_curry.js1(120, 1, v), + Caml_oo_curry.js1(121, 2, v) + ] + }; + }) +]; + +const suites_1 = { + hd: [ + "single_obj_cache", + (function (param) { return { TAG: /* Eq */0, _0: [ @@ -170,150 +188,132 @@ const suites_0 = [ 32 ], _1: [ - Caml_oo_curry.js1(120, 1, v), - Caml_oo_curry.js1(121, 2, v) + Caml_oo_curry.js1(120, 3, v), + Caml_oo_curry.js1(121, 4, v) ] }; }) -]; - -const suites_1 = { - hd: [ - "single_obj_cache", - (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 3, - 32 - ], - _1: [ - Caml_oo_curry.js1(120, 3, v), - Caml_oo_curry.js1(121, 4, v) - ] - }; - }) ], tl: { hd: [ "self_obj", (function (param) { - return { - TAG: /* Eq */0, - _0: 13, - _1: Caml_oo_curry.js2(616641298, 5, vv, 3) - }; - }) + return { + TAG: /* Eq */0, + _0: 13, + _1: Caml_oo_curry.js2(616641298, 5, vv, 3) + }; + }) ], tl: { hd: [ "uu_id", (function (param) { - return { - TAG: /* Eq */0, - _0: "uu", - _1: Caml_oo_curry.js1(23515, 6, uu) - }; - }) + return { + TAG: /* Eq */0, + _0: "uu", + _1: Caml_oo_curry.js1(23515, 6, uu) + }; + }) ], tl: { hd: [ "uu_add", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js3(4846113, 7, uuu, 1, 20), - _1: 21 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js3(4846113, 7, uuu, 1, 20), + _1: 21 + }; + }) ], tl: { hd: [ "v_add", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js3(4846113, 8, vvvv, 3, 7), - _1: 10 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js3(4846113, 8, vvvv, 3, 7), + _1: 10 + }; + }) ], tl: { hd: [ "u_id1", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js1(5243894, 9, u), - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js1(5243894, 9, u), + _1: 3 + }; + }) ], tl: { hd: [ "u_id2", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js1(5243895, 10, u), - _1: 4 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js1(5243895, 10, u), + _1: 4 + }; + }) ], tl: { hd: [ "u hi", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js3(23297, 11, u, 1, 2), - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js3(23297, 11, u, 1, 2), + _1: 3 + }; + }) ], tl: { hd: [ "u hello", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js2(616641298, 12, u, 32), - _1: 32 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js2(616641298, 12, u, 32), + _1: 32 + }; + }) ], tl: { hd: [ "v hi", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js2(23297, 13, vvvv, 31), - _1: 63 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js2(23297, 13, vvvv, 31), + _1: 63 + }; + }) ], tl: { hd: [ "uuu add", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js3(4846113, 14, uuu, 3, 4), - _1: 7 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js3(4846113, 14, uuu, 3, 4), + _1: 7 + }; + }) ], tl: { hd: [ "v x", (function (param) { - return { - TAG: /* Eq */0, - _0: Caml_oo_curry.js1(120, 15, v), - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: Caml_oo_curry.js1(120, 15, v), + _1: 3 + }; + }) ], tl: /* [] */0 } 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 d4df4e15f..9e3cfcb7e 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_414_upgrade_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_414_upgrade_test.js @@ -8,8 +8,8 @@ const N = {}; function forEach(xs, f) { Belt__Belt_Array.forEach(xs, (function (x) { - Curry._1(f.i, x); - })); + Curry._1(f.i, x); + })); } const Y = { @@ -19,15 +19,15 @@ const Y = { function f(X, xs) { X.forEach(xs, { i: (function (x) { - console.log(x.x); - }) + console.log(x.x); + }) }); } function g(X, xs) { Belt__Belt_Array.forEach(xs, (function (x) { - console.log(x); - })); + console.log(x); + })); } const g_result = g(Y, []); diff --git a/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js b/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js index 5b0e81794..1e399b459 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_parsetree_test.js @@ -81,8 +81,8 @@ function fatal_error(msg) { function create_hashtable(size, init) { const tbl = Stdlib__Hashtbl.create(undefined, size); Stdlib__List.iter((function (param) { - Stdlib__Hashtbl.add(tbl, param[0], param[1]); - }), init); + Stdlib__Hashtbl.add(tbl, param[0], param[1]); + }), init); return tbl; } @@ -1353,13 +1353,13 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { bol = false; } if (Stdlib__List.exists((function (loc) { - return pos === loc.loc_start.pos_cnum; - }), locs)) { + return pos === loc.loc_start.pos_cnum; + }), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(true); } if (Stdlib__List.exists((function (loc) { - return pos === loc.loc_end.pos_cnum; - }), locs)) { + return pos === loc.loc_end.pos_cnum; + }), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(false); } const c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); @@ -1920,9 +1920,9 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { Curry._1(before, ppf); } return Stdlib__Format.kfprintf((function (param) { - Stdlib__Format.pp_print_flush(ppf, undefined); - return Curry._1(k, Stdlib__Buffer.contents(buf)); - }), ppf, fmt); + Stdlib__Format.pp_print_flush(ppf, undefined); + return Curry._1(k, Stdlib__Buffer.contents(buf)); + }), ppf, fmt); } const error_of_exn = { @@ -2043,56 +2043,56 @@ function from_pair_suites(name, suites) { if (match) { if (is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const code = param[1]; - it(param[0], (function () { - let spec = Curry._1(code, undefined); - switch (spec.TAG) { - case /* Eq */0 : - Assert.deepEqual(spec._0, spec._1); - return; - case /* Neq */1 : - Assert.notDeepEqual(spec._0, spec._1); - return; - case /* StrictEq */2 : - Assert.strictEqual(spec._0, spec._1); - return; - case /* StrictNeq */3 : - Assert.notStrictEqual(spec._0, spec._1); - return; - case /* Ok */4 : - Assert.ok(spec._0); - return; - case /* Approx */5 : - const b = spec._1; - const a = spec._0; - if (!close_enough(undefined, a, b)) { - Assert.deepEqual(a, b); - return; - } else { - return; - } - case /* ApproxThreshold */6 : - const b$1 = spec._2; - const a$1 = spec._1; - if (!close_enough(spec._0, a$1, b$1)) { - Assert.deepEqual(a$1, b$1); - return; - } else { - return; - } - case /* ThrowAny */7 : - Assert.throws(spec._0); - return; - case /* Fail */8 : - return assert_fail("failed"); - case /* FailWith */9 : - return assert_fail(spec._0); - + return Stdlib__List.iter((function (param) { + const code = param[1]; + it(param[0], (function () { + let spec = Curry._1(code, undefined); + switch (spec.TAG) { + case /* Eq */0 : + Assert.deepEqual(spec._0, spec._1); + return; + case /* Neq */1 : + Assert.notDeepEqual(spec._0, spec._1); + return; + case /* StrictEq */2 : + Assert.strictEqual(spec._0, spec._1); + return; + case /* StrictNeq */3 : + Assert.notStrictEqual(spec._0, spec._1); + return; + case /* Ok */4 : + Assert.ok(spec._0); + return; + case /* Approx */5 : + const b = spec._1; + const a = spec._0; + if (!close_enough(undefined, a, b)) { + Assert.deepEqual(a, b); + return; + } else { + return; } - })); - }), suites); - })); + case /* ApproxThreshold */6 : + const b$1 = spec._2; + const a$1 = spec._1; + if (!close_enough(spec._0, a$1, b$1)) { + Assert.deepEqual(a$1, b$1); + return; + } else { + return; + } + case /* ThrowAny */7 : + Assert.throws(spec._0); + return; + case /* Fail */8 : + return assert_fail("failed"); + case /* FailWith */9 : + return assert_fail(spec._0); + + } + })); + }), suites); + })); return; } else { console.log([ @@ -2100,78 +2100,78 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - const name = param[0]; - const fn = Curry._1(param[1], undefined); - switch (fn.TAG) { - case /* Eq */0 : - console.log([ - name, - fn._0, - "eq?", - fn._1 - ]); - return; - case /* Neq */1 : - console.log([ - name, - fn._0, - "neq?", - fn._1 - ]); - return; - case /* StrictEq */2 : - console.log([ - name, - fn._0, - "strict_eq?", - fn._1 - ]); - return; - case /* StrictNeq */3 : - console.log([ - name, - fn._0, - "strict_neq?", - fn._1 - ]); - return; - case /* Ok */4 : - console.log([ - name, - fn._0, - "ok?" - ]); - return; - case /* Approx */5 : - console.log([ - name, - fn._0, - "~", - fn._1 - ]); - return; - case /* ApproxThreshold */6 : - console.log([ - name, - fn._1, - "~", - fn._2, - " (", - fn._0, - ")" - ]); - return; - case /* ThrowAny */7 : - return; - case /* Fail */8 : - console.log("failed"); - return; - case /* FailWith */9 : - console.log("failed: " + fn._0); - return; - - } - }), suites); + const name = param[0]; + const fn = Curry._1(param[1], undefined); + switch (fn.TAG) { + case /* Eq */0 : + console.log([ + name, + fn._0, + "eq?", + fn._1 + ]); + return; + case /* Neq */1 : + console.log([ + name, + fn._0, + "neq?", + fn._1 + ]); + return; + case /* StrictEq */2 : + console.log([ + name, + fn._0, + "strict_eq?", + fn._1 + ]); + return; + case /* StrictNeq */3 : + console.log([ + name, + fn._0, + "strict_neq?", + fn._1 + ]); + return; + case /* Ok */4 : + console.log([ + name, + fn._0, + "ok?" + ]); + return; + case /* Approx */5 : + console.log([ + name, + fn._0, + "~", + fn._1 + ]); + return; + case /* ApproxThreshold */6 : + console.log([ + name, + fn._1, + "~", + fn._2, + " (", + fn._0, + ")" + ]); + return; + case /* ThrowAny */7 : + return; + case /* Fail */8 : + console.log("failed"); + return; + case /* FailWith */9 : + console.log("failed: " + fn._0); + return; + + } + }), suites); } } @@ -2189,31 +2189,31 @@ function warn_bad_docstrings(param) { _0: true })) { return Stdlib__List.iter((function (ds) { - const match = ds.ds_attached; - switch (match) { - case /* Unattached */0 : - return prerr_warning(ds.ds_loc, { - TAG: /* Bad_docstring */33, - _0: true - }); - case /* Info */1 : - return; - case /* Docs */2 : - const match$1 = ds.ds_associated; - switch (match$1) { - case /* Zero */0 : - case /* One */1 : - return; - case /* Many */2 : - return prerr_warning(ds.ds_loc, { - TAG: /* Bad_docstring */33, - _0: false - }); - - } - - } - }), Stdlib__List.rev(docstrings.contents)); + const match = ds.ds_attached; + switch (match) { + case /* Unattached */0 : + return prerr_warning(ds.ds_loc, { + TAG: /* Bad_docstring */33, + _0: true + }); + case /* Info */1 : + return; + case /* Docs */2 : + const match$1 = ds.ds_associated; + switch (match$1) { + case /* Zero */0 : + case /* One */1 : + return; + case /* Many */2 : + return prerr_warning(ds.ds_loc, { + TAG: /* Bad_docstring */33, + _0: false + }); + + } + + } + }), Stdlib__List.rev(docstrings.contents)); } } @@ -2408,18 +2408,18 @@ function get_docstrings(dsl) { function associate_docstrings(dsl) { Stdlib__List.iter((function (ds) { - const match = ds.ds_associated; - switch (match) { - case /* Zero */0 : - ds.ds_associated = /* One */1; - return; - case /* One */1 : - case /* Many */2 : - ds.ds_associated = /* Many */2; - return; - - } - }), dsl); + const match = ds.ds_associated; + switch (match) { + case /* Zero */0 : + ds.ds_associated = /* One */1; + return; + case /* One */1 : + case /* Many */2 : + ds.ds_associated = /* Many */2; + return; + + } + }), dsl); } const pre_table = Stdlib__Hashtbl.create(undefined, 50); @@ -2589,11 +2589,11 @@ function symbol_docs_lazy(param) { return { LAZY_DONE: false, VAL: (function () { - return { - docs_pre: get_pre_docs(p1), - docs_post: get_post_docs(p2) - }; - }) + return { + docs_pre: get_pre_docs(p1), + docs_post: get_post_docs(p2) + }; + }) }; } @@ -2612,8 +2612,8 @@ function symbol_text_lazy(param) { return { LAZY_DONE: false, VAL: (function () { - return get_text(pos); - }) + return get_text(pos); + }) }; } @@ -3031,13 +3031,13 @@ function mk$5(locOpt, d) { function text(txt) { return Stdlib__List.map((function (ds) { - const a = text_attr(ds); - const loc = ds.ds_loc; - return mk$5(loc, { - TAG: /* Psig_attribute */11, - _0: a - }); - }), txt); + const a = text_attr(ds); + const loc = ds.ds_loc; + return mk$5(loc, { + TAG: /* Psig_attribute */11, + _0: a + }); + }), txt); } function mk$6(locOpt, d) { @@ -3050,13 +3050,13 @@ function mk$6(locOpt, d) { function text$1(txt) { return Stdlib__List.map((function (ds) { - const a = text_attr(ds); - const loc = ds.ds_loc; - return mk$6(loc, { - TAG: /* Pstr_attribute */13, - _0: a - }); - }), txt); + const a = text_attr(ds); + const loc = ds.ds_loc; + return mk$6(loc, { + TAG: /* Pstr_attribute */13, + _0: a + }); + }), txt); } function mk$7(locOpt, attrsOpt, d) { @@ -3169,8 +3169,8 @@ function attribute(loc, a) { function text$2(txt) { return Stdlib__List.map((function (ds) { - return attribute(ds.ds_loc, text_attr(ds)); - }), txt); + return attribute(ds.ds_loc, text_attr(ds)); + }), txt); } function attr$7(d, a) { @@ -3259,8 +3259,8 @@ function attribute$1(loc, a) { function text$3(txt) { return Stdlib__List.map((function (ds) { - return attribute$1(ds.ds_loc, text_attr(ds)); - }), txt); + return attribute$1(ds.ds_loc, text_attr(ds)); + }), txt); } function virtual_(ct) { @@ -4250,12 +4250,12 @@ function varify_constructors(var_names, t) { desc = { TAG: /* Ptyp_object */4, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - loop(param[2]) - ]; - }), x._0), + return [ + param[0], + param[1], + loop(param[2]) + ]; + }), x._0), _1: x._1 }; break; @@ -4287,8 +4287,8 @@ function varify_constructors(var_names, t) { const string_lst = x._0; const partial_arg = t.ptyp_loc; Stdlib__List.iter((function (param) { - return check_variable(var_names, partial_arg, param); - }), string_lst); + return check_variable(var_names, partial_arg, param); + }), string_lst); desc = { TAG: /* Ptyp_poly */8, _0: string_lst, @@ -4302,11 +4302,11 @@ function varify_constructors(var_names, t) { _0: [ match[0], Stdlib__List.map((function (param) { - return [ - param[0], - loop(param[1]) - ]; - }), match[1]) + return [ + param[0], + loop(param[1]) + ]; + }), match[1]) ] }; break; @@ -4355,12 +4355,12 @@ function wrap_type_annotation(newtypes, core_type, body) { _1: core_type }); const exp$1 = Stdlib__List.fold_right((function (newtype, exp) { - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: newtype, - _1: exp - }); - }), newtypes, exp); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: newtype, + _1: exp + }); + }), newtypes, exp); return [ exp$1, ghtyp({ @@ -4587,6073 +4587,6073 @@ const yytransl_block = [ const yyact = [ (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "parser" - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return extra_text(text$1, 1, _1); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return extra_text(text, 1, _1); - }), + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "parser" + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_def */0, - _0: extra_text(text$1, 1, _1) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return extra_text(text$1, 1, _1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return extra_text(text, 1, _1); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_def */0, + _0: extra_text(text$1, 1, _1) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { + MEL_EXN_ID: Stdlib.End_of_file + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let pos = 1; - return extra_text((function (txt) { - return { - hd: { - TAG: /* Ptop_def */0, - _0: text$1(txt) - }, - tl: /* [] */0 - }; - }), pos, _1); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text_def(1), { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let pos = 1; + return extra_text((function (txt) { + return { hd: { TAG: /* Ptop_def */0, - _0: { - hd: mkstrexp(_1, _2), - tl: /* [] */0 - } + _0: text$1(txt) }, - tl: _3 - }); - }), + tl: /* [] */0 + }; + }), pos, _1); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib.$at(text_def(1), { + hd: { + TAG: /* Ptop_def */0, + _0: { + hd: mkstrexp(_1, _2), + tl: /* [] */0 + } + }, + tl: _3 + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), - (function (__caml_parser_env) { - return text_def(1); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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: { - TAG: /* Ptop_def */0, - _0: { - hd: mkstrexp(_2, _3), - tl: /* [] */0 - } - }, - tl: _4 - })); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, - _0: { - hd: _2, - tl: /* [] */0 - } - }, - tl: _3 - })); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, - tl: _3 - })); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text_def(1), { - hd: { - TAG: /* Ptop_def */0, - _0: { - hd: _1, - tl: /* [] */0 - } - }, - tl: _2 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_rhs_docs(1, 1); - return Stdlib.$at(text_def(1), { - hd: _1, - tl: _2 - }); - }), + return text_def(1); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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: { + TAG: /* Ptop_def */0, + _0: { + hd: mkstrexp(_2, _3), + tl: /* [] */0 + } + }, + tl: _4 + })); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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, + _0: { + hd: _2, + tl: /* [] */0 + } + }, + tl: _3 + })); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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, + tl: _3 + })); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib.$at(text_def(1), { + hd: { + TAG: /* Ptop_def */0, + _0: { + hd: _1, + tl: /* [] */0 + } + }, + tl: _2 + }); + }), (function (__caml_parser_env) { - return [ - { - txt: "*", - loc: rhs_loc(2) - }, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_rhs_docs(1, 1); + return Stdlib.$at(text_def(1), { + hd: _1, + tl: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - txt: _2, - loc: rhs_loc(2) - }, - _4 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return "_"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + return [ + { + txt: "*", + loc: rhs_loc(2) + }, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + txt: _2, + loc: rhs_loc(2) + }, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_structure */1, - _0: extra_text(text$1, 2, _2) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("struct", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib__List.fold_left((function (acc, param) { - return mkmod({ - TAG: /* Pmod_functor */2, - _0: param[0], - _1: param[1], - _2: acc - }); - }), _4, _2); - }), + return "_"; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_apply */3, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return mkmod({ - TAG: /* Pmod_apply */3, - _0: _1, - _1: mkmod({ - TAG: /* Pmod_structure */1, - _0: /* [] */0 - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 2, ")", 4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_constraint */4, - _0: _2, - _1: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_structure */1, + _0: extra_text(text$1, 2, _2) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("struct", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib__List.fold_left((function (acc, param) { + return mkmod({ + TAG: /* Pmod_functor */2, + _0: param[0], + _1: param[1], + _2: acc + }); + }), _4, _2); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_apply */3, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: _3 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_constraint */19, - _0: _3, - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }) - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_coerce */20, - _0: _3, - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }), - _2: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _7 - }) - }) - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_coerce */20, - _0: _3, - _1: undefined, - _2: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return mkmod({ + TAG: /* Pmod_apply */3, + _0: _1, + _1: mkmod({ + TAG: /* Pmod_structure */1, + _0: /* [] */0 + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 2, ")", 4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_constraint */4, + _0: _2, + _1: _4 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: _3 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_constraint */19, + _0: _3, + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }) + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_coerce */20, + _0: _3, + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }), + _2: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _7 + }) + }) + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_coerce */20, + _0: _3, + _1: undefined, + _2: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }) + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 4); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$4(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$4(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_extension */6, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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), - tl: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_extension */6, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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), + tl: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const bindings = lbs.lbs_bindings; - let str; - let exit = 0; - if (bindings) { - const lb = bindings.hd; - let tmp = lb.lb_pattern.ppat_desc; - if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && !bindings.tl) { - const exp = wrap_exp_attrs(lb.lb_expression, [ - undefined, - lbs.lbs_attributes - ]); - str = mkstr({ - TAG: /* Pstr_eval */0, - _0: exp, - _1: lb.lb_attributes - }); - } else { - exit = 1; - } - } else { - exit = 1; - } - if (exit === 1) { - if (Caml_obj.caml_notequal(lbs.lbs_attributes, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Not_expecting */2, - _0: lbs.lbs_loc, - _1: "attributes" - } - }); - } - const 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); + let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const bindings = lbs.lbs_bindings; + let str; + let exit = 0; + if (bindings) { + const lb = bindings.hd; + let tmp = lb.lb_pattern.ppat_desc; + if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && !bindings.tl) { + const exp = wrap_exp_attrs(lb.lb_expression, [ + undefined, + lbs.lbs_attributes + ]); str = mkstr({ - TAG: /* Pstr_value */1, - _0: lbs.lbs_rec, - _1: Stdlib__List.rev(bindings$1) + TAG: /* Pstr_eval */0, + _0: exp, + _1: lb.lb_attributes }); + } else { + exit = 1; } - const id = lbs.lbs_extension; - if (id !== undefined) { - let d = { - TAG: /* Pstr_extension */14, - _0: [ - id, - { - TAG: /* PStr */0, - _0: { - hd: str, - tl: /* [] */0 + } else { + exit = 1; + } + if (exit === 1) { + if (Caml_obj.caml_notequal(lbs.lbs_attributes, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Not_expecting */2, + _0: lbs.lbs_loc, + _1: "attributes" } - } - ], - _1: /* [] */0 - }; - return mk$6(symbol_gloc(undefined), d); - } else { - return str; + }); } - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_primitive */2, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_type */3, - _0: Stdlib__List.rev(_1) + const 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({ + TAG: /* Pstr_value */1, + _0: lbs.lbs_rec, + _1: Stdlib__List.rev(bindings$1) }); - }), + } + const id = lbs.lbs_extension; + if (id !== undefined) { + let d = { + TAG: /* Pstr_extension */14, + _0: [ + id, + { + TAG: /* PStr */0, + _0: { + hd: str, + tl: /* [] */0 + } + } + ], + _1: /* [] */0 + }; + return mk$6(symbol_gloc(undefined), d); + } else { + return str; + } + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_typext */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_primitive */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_exception */5, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_type */3, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_module */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_typext */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_recmodule */7, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_exception */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_modtype */8, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_module */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_open */9, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_recmodule */7, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_class */10, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_modtype */8, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_class_type */11, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_open */9, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_include */12, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_class */10, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_extension */14, - _0: _1, - _1: add_docs_attrs(symbol_docs(undefined), _2) - }); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkstr({ - TAG: /* Pstr_attribute */13, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_constraint */4, - _0: _4, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_functor */2, - _0: _1[0], - _1: _1[1], - _2: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_include */12, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_extension */14, + _0: _1, + _1: add_docs_attrs(symbol_docs(undefined), _2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkstr({ + TAG: /* Pstr_attribute */13, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_constraint */4, + _0: _4, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_functor */2, + _0: _1[0], + _1: _1[1], + _2: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmty({ - TAG: /* Pmty_signature */1, - _0: extra_text(text, 2, _2) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("sig", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib__List.fold_left((function (acc, param) { - return mkmty({ - TAG: /* Pmty_functor */2, - _0: param[0], - _1: param[1], - _2: acc - }); - }), _4, _2); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_with */3, - _0: _1, - _1: Stdlib__List.rev(_3) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_typeof */4, - _0: _4 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmty({ + TAG: /* Pmty_signature */1, + _0: extra_text(text, 2, _2) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("sig", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib__List.fold_left((function (acc, param) { + return mkmty({ + TAG: /* Pmty_functor */2, + _0: param[0], + _1: param[1], + _2: acc + }); + }), _4, _2); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_with */3, + _0: _1, + _1: Stdlib__List.rev(_3) + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_typeof */4, + _0: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_extension */5, - _0: _1 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$3(_1, _2); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_extension */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$3(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_value */0, - _0: _1 - }); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_value */0, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_type */1, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_value */0, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_typext */2, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_value */0, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_exception */3, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_type */1, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_module */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_typext */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_module */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_exception */3, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_recmodule */5, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_module */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_modtype */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_module */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_open */7, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_recmodule */5, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_include */8, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_modtype */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_class */9, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_open */7, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_class_type */10, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_include */8, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_extension */12, - _0: _1, - _1: add_docs_attrs(symbol_docs(undefined), _2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_class */9, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mksig({ - TAG: /* Psig_attribute */11, - _0: _1 - }); - }), + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_extension */12, + _0: _1, + _1: add_docs_attrs(symbol_docs(undefined), _2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mksig({ + TAG: /* Psig_attribute */11, + _0: _1 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_functor */2, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: _4, - _2: _6 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_functor */2, - _0: { - txt: "*", - loc: rhs_loc(1) - }, - _1: undefined, - _2: _3 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mk$12(symbol_rloc(undefined), _4, symbol_docs(undefined), undefined, { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_functor */2, + _0: { txt: _2, loc: rhs_loc(2) - }, _3); - }), + }, + _1: _4, + _2: _6 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, alias(rhs_loc(4), undefined, { - txt: _4, - loc: rhs_loc(4) - })); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_functor */2, + _0: { + txt: "*", + loc: rhs_loc(1) + }, + _1: undefined, + _2: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, alias(rhs_loc(4), undefined, { + txt: _4, + loc: rhs_loc(4) + })); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, _4); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, _4); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, _5); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constraint */5, - _0: _4, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return /* [] */0; - }), - (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, _5); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constraint */5, + _0: _4, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* [] */0; + }), + (function (__caml_parser_env) { + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _3 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_apply */3, - _0: _1, - _1: Stdlib__List.rev(_2) + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_apply */3, + _0: _1, + _1: Stdlib__List.rev(_2) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const 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, + _1: { + TAG: /* Not_expecting */2, + _0: lb.lb_loc, + _1: "item attribute" + } + }); + } + return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); + }), _1.lbs_bindings); + if (_1.lbs_extension !== undefined) { + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Not_expecting */2, + _0: _1.lbs_loc, + _1: "extension" + } }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const 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, - _1: { - TAG: /* Not_expecting */2, - _0: lb.lb_loc, - _1: "item attribute" - } - }); - } - return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); - }), _1.lbs_bindings); - if (_1.lbs_extension !== undefined) { - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Not_expecting */2, - _0: _1.lbs_loc, - _1: "extension" - } - }); - } - if (Caml_obj.caml_notequal(_1.lbs_attributes, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Not_expecting */2, - _0: _1.lbs_loc, - _1: "attributes" - } - }); - } - return mkclass({ - TAG: /* Pcl_let */4, - _0: _1.lbs_rec, - _1: Stdlib__List.rev(bindings), - _2: _3 + } + if (Caml_obj.caml_notequal(_1.lbs_attributes, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Not_expecting */2, + _0: _1.lbs_loc, + _1: "attributes" + } }); - }), + } + return mkclass({ + TAG: /* Pcl_let */4, + _0: _1.lbs_rec, + _1: Stdlib__List.rev(bindings), + _2: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$5(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$5(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_extension */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_extension */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constr */0, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constr */0, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constr */0, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constr */0, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkclass({ - TAG: /* Pcl_structure */1, - _0: _2 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkclass({ - TAG: /* Pcl_constraint */5, - _0: _2, - _1: _4 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkclass({ + TAG: /* Pcl_structure */1, + _0: _2 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkclass({ + TAG: /* Pcl_constraint */5, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - pcstr_self: _1, - pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + pcstr_self: _1, + pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) + }; + }), (function (__caml_parser_env) { - return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _2, - _1: _4 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - return ghpat(/* Ppat_any */0); - }), + return ghpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_5, symbol_docs(undefined), { - TAG: /* Pcf_inherit */0, - _0: _2, - _1: _3, - _2: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcf(_5, symbol_docs(undefined), { + TAG: /* Pcf_inherit */0, + _0: _2, + _1: _3, + _2: _4 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_val */1, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_method */2, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_constraint */3, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_initializer */4, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_2, symbol_docs(undefined), { - TAG: /* Pcf_extension */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkcf(undefined, undefined, { - TAG: /* Pcf_attribute */5, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkcf(undefined, undefined, { + TAG: /* Pcf_attribute */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); + + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 + }); + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + /* Mutable */1, + { + TAG: /* Cfk_virtual */0, + _0: _6 } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - /* Mutable */1, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_virtual */0, - _0: _5 - } - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_virtual */0, + _0: _5 + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: _5 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const e = mkexp_constraint(_6, _4); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: e - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: _5 } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - /* Private */0, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const e = mkexp_constraint(_6, _4); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: e } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - _3, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: _4, - _1: undefined - }) - } - ]; - }), + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: _7, - _1: _5 - }) - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = wrap_type_annotation(_6, _8, _10); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: match[0], - _1: match[1] - }) - } - ]; - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "?" + _2, - _1: mkoption(_4), - _2: _6 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "?" + _1, - _1: mkoption(_2), - _2: _4 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + /* Private */0, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: _1, - _1: _3, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "", - _1: _1, - _2: _3 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + _3, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_constr */0, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: _4, + _1: undefined + }) + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_constr */0, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: _7, + _1: _5 + }) + } + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = wrap_type_annotation(_6, _8, _10); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: match[0], + _1: match[1] + }) + } + ]; + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "?" + _2, + _1: mkoption(_4), + _2: _6 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "?" + _1, + _1: mkoption(_2), + _2: _4 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkcty({ - TAG: /* Pcty_signature */1, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: _1, + _1: _3, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "", + _1: _1, + _2: _3 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 3); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_constr */0, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$6(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_constr */0, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_extension */3, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkcty({ + TAG: /* Pcty_signature */1, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - pcsig_self: _1, - pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$6(_1, _2); + }), (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_extension */3, + _0: _1 + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + pcsig_self: _1, + pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_3, symbol_docs(undefined), { - TAG: /* Pctf_inherit */0, - _0: _2 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_6, symbol_docs(undefined), { - TAG: /* Pctf_method */2, - _0: [ - _3, - _2[0], - _2[1], - _5 - ] - }); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_3, symbol_docs(undefined), { - TAG: /* Pctf_constraint */3, - _0: _2 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_2, symbol_docs(undefined), { - TAG: /* Pctf_extension */5, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkctf(undefined, undefined, { - TAG: /* Pctf_attribute */4, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkctf(_6, symbol_docs(undefined), { + TAG: /* Pctf_method */2, + _0: [ + _3, + _2[0], + _2[1], + _5 + ] + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _3, - _2, - /* Virtual */0, - _5 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _3, - /* Mutable */1, - _2, - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - /* Immutable */0, - /* Concrete */1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkctf(undefined, undefined, { + TAG: /* Pctf_attribute */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3, - symbol_rloc(undefined) - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _3, + _2, + /* Virtual */0, + _5 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _3, + /* Mutable */1, + _2, + _5 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + /* Immutable */0, + /* Concrete */1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3, + symbol_rloc(undefined) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_sequence */16, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - "?" + _3[0], - _4, - _3[1] - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _2[0], - undefined, - _2[1] - ]; - }), + return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - "?" + _1, - _4, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_sequence */16, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _1, - undefined, - _2 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + "?" + _3[0], + _4, + _3[1] + ]; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _3[0], - undefined, - _3[1] - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _2[0], + undefined, + _2[1] + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2[0], - undefined, - _2[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + "?" + _1, + _4, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - undefined, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _1, + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "", - undefined, - _1 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _3[0], + undefined, + _3[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2[0], + undefined, + _2[1] + ]; + }), (function (__caml_parser_env) { - return mkpat(/* Ppat_any */0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "", + undefined, + _1 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_var */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return mkpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1[0], - mkpat({ - TAG: /* Ppat_constraint */10, - _0: _1[1], - _1: _3 - }) - ]; - }), + + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }) - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1[0], + mkpat({ TAG: /* Ppat_constraint */10, - _0: _1, + _0: _1[1], _1: _3 - }); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: _1, - _1: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const 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, - _1: { - TAG: /* Not_expecting */2, - _0: lb.lb_loc, - _1: "item attribute" - } - }); - } - return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); - }), _1.lbs_bindings); - const d_0 = _1.lbs_rec; - const d_1 = Stdlib__List.rev(bindings); - const d = { - TAG: /* Pexp_let */2, - _0: d_0, - _1: d_1, - _2: _3 - }; - return wrap_exp_attrs(mkexp(d), [ - _1.lbs_extension, - _1.lbs_attributes - ]); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_0 = { - txt: _4, - loc: rhs_loc(4) - }; - const d = { - TAG: /* Pexp_letmodule */25, - _0: d_0, - _1: _5, - _2: _7 - }; - return wrap_exp_attrs(mkexp(d), _3); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = { - txt: _5, - loc: rhs_loc(5) - }; - const d = { - TAG: /* Pexp_open */32, - _0: _3, - _1: d_1, - _2: _7 - }; - return wrap_exp_attrs(mkexp(d), _4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d = { - TAG: /* Pexp_function */3, - _0: Stdlib__List.rev(_4) - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_fun */4, - _0: _3[0], - _1: _3[1], - _2: _3[2], - _3: _4 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_newtype */30, - _0: _5, - _1: _7 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = Stdlib__List.rev(_6); - const d = { - TAG: /* Pexp_match */6, - _0: _3, - _1: d_1 - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = Stdlib__List.rev(_6); - const d = { - TAG: /* Pexp_try */7, - _0: _3, - _1: d_1 - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_tuple */8, - _0: Stdlib__List.rev(_1) - }); - }), + }) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_construct */9, + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + mkpat({ + TAG: /* Ppat_var */0, _0: { txt: _1, loc: rhs_loc(1) - }, - _1: _2 - }); - }), + } + }) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_variant */10, - _0: _1, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_ifthenelse */15, - _0: _3, - _1: _5, - _2: _7 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_ifthenelse */15, - _0: _3, - _1: _5, - _2: undefined - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_while */17, - _0: _3, - _1: _5 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_for */18, - _0: _3, - _1: _5, - _2: _7, - _3: _6, - _4: _9 - }), _2); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp_cons(rhs_loc(2), ghexp({ - TAG: /* Pexp_tuple */8, - _0: { - hd: _1, - tl: { - hd: _3, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp_cons(rhs_loc(2), ghexp({ - TAG: /* Pexp_tuple */8, - _0: { - hd: _5, - tl: { - hd: _7, - tl: /* [] */0 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _1, + _1: _3 + }); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: _1, + _1: Stdlib__List.rev(_2) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const 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, + _1: { + TAG: /* Not_expecting */2, + _0: lb.lb_loc, + _1: "item attribute" } - } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+.", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "-", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "-.", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "*", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "%", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "<", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, ">", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "or", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "||", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "&", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "&&", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, ":=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = _2.pexp_desc; - let exit = 0; - switch (_1) { - case "-" : - if (match.TAG === /* Pexp_constant */1) { - const n = match._0; - switch (n.TAG) { - case /* Const_int */0 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int */0, - _0: -n._0 | 0 - } - }); - case /* Const_int32 */4 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int32 */4, - _0: -n._0 | 0 - } - }); - case /* Const_int64 */5 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int64 */5, - _0: Caml_int64.neg(n._0) - } - }); - case /* Const_nativeint */6 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_nativeint */6, - _0: Caml_external_polyfill.resolve("nativeint_neg")(n._0) - } - }); - default: - exit = 2; - } - } else { - exit = 2; - } - break; - case "-." : - exit = 2; - break; - default: - - } - if (exit === 2 && match.TAG === /* Pexp_constant */1) { - const f = match._0; - if (f.TAG === /* Const_float */3) { - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_float */3, - _0: neg_float_string(f._0) - } - }); - } - - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("~" + _1, 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + }); + } + return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); + }), _1.lbs_bindings); + const d_0 = _1.lbs_rec; + const d_1 = Stdlib__List.rev(bindings); + const d = { + TAG: /* Pexp_let */2, + _0: d_0, + _1: d_1, + _2: _3 + }; + return wrap_exp_attrs(mkexp(d), [ + _1.lbs_extension, + _1.lbs_attributes + ]); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_0 = { + txt: _4, + loc: rhs_loc(4) + }; + const d = { + TAG: /* Pexp_letmodule */25, + _0: d_0, + _1: _5, + _2: _7 + }; + return wrap_exp_attrs(mkexp(d), _3); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = { + txt: _5, + loc: rhs_loc(5) + }; + const d = { + TAG: /* Pexp_open */32, + _0: _3, + _1: d_1, + _2: _7 + }; + return wrap_exp_attrs(mkexp(d), _4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d = { + TAG: /* Pexp_function */3, + _0: Stdlib__List.rev(_4) + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_fun */4, + _0: _3[0], + _1: _3[1], + _2: _3[2], + _3: _4 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_newtype */30, + _0: _5, + _1: _7 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = Stdlib__List.rev(_6); + const d = { + TAG: /* Pexp_match */6, + _0: _3, + _1: d_1 + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = Stdlib__List.rev(_6); + const d = { + TAG: /* Pexp_try */7, + _0: _3, + _1: d_1 + }; + return wrap_exp_attrs(mkexp(d), _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const desc = _2.pexp_desc; - let exit = 0; - switch (_1) { - case "+" : - if (desc.TAG === /* Pexp_constant */1) { - switch (desc._0.TAG) { - case /* Const_char */1 : - case /* Const_string */2 : - case /* Const_float */3 : - exit = 2; - break; - default: - return mkexp(desc); - } - } else { - exit = 2; - } - break; - case "+." : - exit = 2; - break; - default: - - } - if (exit === 2 && desc.TAG === /* Pexp_constant */1 && desc._0.TAG === /* Const_float */3) { - return mkexp(desc); - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("~" + _1, 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_setfield */13, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - }, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("Array", "set") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - _4 - ], + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_tuple */8, + _0: Stdlib__List.rev(_1) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_construct */9, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_variant */10, + _0: _1, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_ifthenelse */15, + _0: _3, + _1: _5, + _2: _7 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_ifthenelse */15, + _0: _3, + _1: _5, + _2: undefined + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_while */17, + _0: _3, + _1: _5 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_for */18, + _0: _3, + _1: _5, + _2: _7, + _3: _6, + _4: _9 + }), _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp_cons(rhs_loc(2), ghexp({ + TAG: /* Pexp_tuple */8, + _0: { + hd: _1, tl: { - hd: [ - "", - _7 - ], + hd: _3, tl: /* [] */0 } } - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("String", "set") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - _4 - ], + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp_cons(rhs_loc(2), ghexp({ + TAG: /* Pexp_tuple */8, + _0: { + hd: _5, tl: { - hd: [ - "", - _7 - ], + hd: _7, tl: /* [] */0 } } - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const set = fast.contents ? "unsafe_set" : "set"; - const coords = bigarray_untuplify(_4); - if (coords) { - const match = coords.tl; - const c1 = coords.hd; - if (!match) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array1", set) - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - c1 - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } - } - } - }); - } - const match$1 = match.tl; - const c2 = match.hd; - if (!match$1) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array2", set) - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - c1 - ], - tl: { - hd: [ - "", - c2 - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } - } - } - } - }); - } - if (!match$1.tl) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array3", set) - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - c1 - ], - tl: { - hd: [ - "", - c2 - ], - tl: { - hd: [ - "", - match$1.hd - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+.", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "-", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "-.", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "*", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "%", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "<", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, ">", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "or", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "||", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "&", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "&&", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, ":=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = _2.pexp_desc; + let exit = 0; + switch (_1) { + case "-" : + if (match.TAG === /* Pexp_constant */1) { + const n = match._0; + switch (n.TAG) { + case /* Const_int */0 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int */0, + _0: -n._0 | 0 } - } - } - } - } - }); - } - - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Genarray", "set") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - ghexp({ - TAG: /* Pexp_array */14, - _0: coords - }) - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } - } - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_setinstvar */23, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _3 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_object */29, - _0: _3 - }), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 4); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._2(Ast_helper_Exp.attr, _1, _2); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) + }); + case /* Const_int32 */4 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int32 */4, + _0: -n._0 | 0 + } + }); + case /* Const_int64 */5 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int64 */5, + _0: Caml_int64.neg(n._0) + } + }); + case /* Const_nativeint */6 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_nativeint */6, + _0: Caml_external_polyfill.resolve("nativeint_neg")(n._0) + } + }); + default: + exit = 2; } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_constant */1, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_construct */9, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: undefined - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_variant */10, - _0: _1, - _1: undefined - }); - }), - (function (__caml_parser_env) { - return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(reloc_exp(_3), _2); - }), + } else { + exit = 2; + } + break; + case "-." : + exit = 2; + break; + default: + + } + if (exit === 2 && match.TAG === /* Pexp_constant */1) { + const f = match._0; + if (f.TAG === /* Const_float */3) { + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_float */3, + _0: neg_float_string(f._0) + } + }); + } + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("~" + _1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const d_0 = { - txt: { - TAG: /* Lident */0, - _0: "()" - }, - loc: symbol_rloc(undefined) - }; - const d = { - TAG: /* Pexp_construct */9, - _0: d_0, - _1: undefined - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("begin", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp_constraint(_2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_field */12, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const desc = _2.pexp_desc; + let exit = 0; + switch (_1) { + case "+" : + if (desc.TAG === /* Pexp_constant */1) { + switch (desc._0.TAG) { + case /* Const_char */1 : + case /* Const_string */2 : + case /* Const_float */3 : + exit = 2; + break; + default: + return mkexp(desc); } - }); - }), + } else { + exit = 2; + } + break; + case "+." : + exit = 2; + break; + default: + + } + if (exit === 2 && desc.TAG === /* Pexp_constant */1 && desc._0.TAG === /* Const_float */3) { + return mkexp(desc); + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("~" + _1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: _4 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 3, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("Array", "get") - }), - _1: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_setfield */13, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + }, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("Array", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], tl: { hd: [ "", - _4 + _7 ], tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 3, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("String", "get") - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("String", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], tl: { hd: [ "", - _4 + _7 ], tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 3, "]", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const get = fast.contents ? "unsafe_get" : "get"; - const coords = bigarray_untuplify(_4); - if (coords) { - const match = coords.tl; - const c1 = coords.hd; - if (!match) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array1", get) - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const set = fast.contents ? "unsafe_set" : "set"; + const coords = bigarray_untuplify(_4); + if (coords) { + const match = coords.tl; + const c1 = coords.hd; + if (!match) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array1", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + _7 ], tl: /* [] */0 } } - }); - } - const match$1 = match.tl; - const c2 = match.hd; - if (!match$1) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array2", get) - }), - _1: { + } + }); + } + const match$1 = match.tl; + const c2 = match.hd; + if (!match$1) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array2", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + _7 ], tl: /* [] */0 } } } - }); - } - if (!match$1.tl) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array3", get) - }), - _1: { + } + }); + } + if (!match$1.tl) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array3", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + match$1.hd ], tl: { hd: [ "", - match$1.hd + _7 ], tl: /* [] */0 } } } } - }); - } - + } + }); } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Genarray", "get") - }), - _1: { + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Genarray", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + ghexp({ + TAG: /* Pexp_array */14, + _0: coords + }) ], tl: { hd: [ "", - ghexp({ - TAG: /* Pexp_array */14, - _0: coords - }) + _7 ], tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 3, "}", 5); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_record */11, - _0: _2[1], - _1: _2[0] - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 1, "}", 3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const rec_exp = mkexp({ - TAG: /* Pexp_record */11, - _0: _4[1], - _1: _4[0] - }); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: rec_exp - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 3, "}", 5); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_array */14, - _0: Stdlib__List.rev(_2) - }); - }), + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 1, "|]", 4); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_setinstvar */23, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _3 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_object */29, + _0: _3 + }), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 4); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._2(Ast_helper_Exp.attr, _1, _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - return mkexp({ - TAG: /* Pexp_array */14, - _0: /* [] */0 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_array */14, - _0: Stdlib__List.rev(_4) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 3, "|]", 6); - }), - (function (__caml_parser_env) { - const _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))); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 1, "]", 4); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: list_exp - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 3, "]", 6); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator(_1, 1), - _1: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_constant */1, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_construct */9, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: undefined + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_variant */10, + _0: _1, + _1: undefined + }); + }), + (function (__caml_parser_env) { + return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(reloc_exp(_3), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const d_0 = { + txt: { + TAG: /* Lident */0, + _0: "()" + }, + loc: symbol_rloc(undefined) + }; + const d = { + TAG: /* Pexp_construct */9, + _0: d_0, + _1: undefined + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("begin", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp_constraint(_2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_field */12, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: _4 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 3, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("Array", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + _4 + ], + tl: /* [] */0 + } + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 3, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("String", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + _4 + ], + tl: /* [] */0 + } + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 3, "]", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const get = fast.contents ? "unsafe_get" : "get"; + const coords = bigarray_untuplify(_4); + if (coords) { + const match = coords.tl; + const c1 = coords.hd; + if (!match) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array1", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + c1 + ], + tl: /* [] */0 + } + } + }); + } + const match$1 = match.tl; + const c2 = match.hd; + if (!match$1) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array2", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + c1 + ], + tl: { + hd: [ + "", + c2 + ], + tl: /* [] */0 + } + } + } + }); + } + if (!match$1.tl) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array3", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + c1 + ], + tl: { + hd: [ + "", + c2 + ], + tl: { + hd: [ + "", + match$1.hd + ], + tl: /* [] */0 + } + } + } + } + }); + } + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Genarray", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _2 + ghexp({ + TAG: /* Pexp_array */14, + _0: coords + }) ], tl: /* [] */0 } - }); - }), + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 3, "}", 5); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_record */11, + _0: _2[1], + _1: _2[0] + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 1, "}", 3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const rec_exp = mkexp({ + TAG: /* Pexp_record */11, + _0: _4[1], + _1: _4[0] + }); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: rec_exp + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("!", 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 3, "}", 5); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d = { - TAG: /* Pexp_new */22, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_override */24, - _0: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_array */14, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{<", 1, ">}", 4); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 1, "|]", 4); + }), (function (__caml_parser_env) { - return mkexp({ - TAG: /* Pexp_override */24, - _0: /* [] */0 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_override */24, - _0: Stdlib__List.rev(_4) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{<", 3, ">}", 6); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_send */21, - _0: _1, - _1: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_pack */31, - _0: _3 - }); - }), + return mkexp({ + TAG: /* Pexp_array */14, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_array */14, + _0: Stdlib__List.rev(_4) + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 3, "|]", 6); + }), + (function (__caml_parser_env) { + const _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))); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 1, "]", 4); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: list_exp + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 3, "]", 6); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator(_1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_constraint */19, - _0: ghexp({ - TAG: /* Pexp_pack */31, - _0: _3 - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_constraint */19, - _0: ghexp({ - TAG: /* Pexp_pack */31, - _0: _5 - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _7 - }) - }) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("!", 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 6); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 3, ")", 7); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d = { + TAG: /* Pexp_new */22, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }; + return wrap_exp_attrs(mkexp(d), _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_extension */33, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_override */24, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{<", 1, ">}", 4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + return mkexp({ + TAG: /* Pexp_override */24, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_override */24, + _0: Stdlib__List.rev(_4) + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{<", 3, ">}", 6); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_send */21, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "", - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_pack */31, + _0: _3 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_constraint */19, + _0: ghexp({ + TAG: /* Pexp_pack */31, + _0: _3 + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_constraint */19, + _0: ghexp({ + TAG: /* Pexp_pack */31, + _0: _5 + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _7 + }) + }) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _2 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 6); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 3, ")", 7); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_extension */33, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _2[0], - _2[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _1, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - mkexp({ - TAG: /* Pexp_ident */0, - _0: { - txt: { - TAG: /* Lident */0, - _0: _1 - }, - loc: rhs_loc(1) - } - }) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "", + _1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - mkpatvar(_1, 1), - _2 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: mkpatvar(_1, 1), - _1: ghtyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_3), - _1: _5 - }) - }), - _7 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _2[0], + _2[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = wrap_type_annotation(_4, _6, _8); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: mkpatvar(_1, 1), - _1: match[1] - }), - match[0] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _1, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + mkexp({ + TAG: /* Pexp_ident */0, + _0: { + txt: { + TAG: /* Lident */0, + _0: _1 + }, + loc: rhs_loc(1) + } + }) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: _1, - _1: _3 - }), - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - lbs_bindings: { - hd: _2, - tl: _1.lbs_bindings - }, - lbs_rec: _1.lbs_rec, - lbs_extension: _1.lbs_extension, - lbs_attributes: _1.lbs_attributes, - lbs_loc: _1.lbs_loc - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + mkpatvar(_1, 1), + _2 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let lb = mklb(_4, _5); - return { - lbs_bindings: { - hd: lb, - tl: /* [] */0 - }, - lbs_rec: _3, - lbs_extension: _2[0], - lbs_attributes: _2[1], - lbs_loc: symbol_rloc(undefined) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: mkpatvar(_1, 1), + _1: ghtyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_3), + _1: _5 + }) + }), + _7 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mklb(_2, _3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = wrap_type_annotation(_4, _6, _8); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: mkpatvar(_1, 1), + _1: match[1] + }), + match[0] + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp_constraint(_3, _1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: _1, + _1: _3 + }), + _5 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return ghexp({ - TAG: /* Pexp_fun */4, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: _3, - _1: _5 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + lbs_bindings: { + hd: _2, + tl: _1.lbs_bindings + }, + lbs_rec: _1.lbs_rec, + lbs_extension: _1.lbs_extension, + lbs_attributes: _1.lbs_attributes, + lbs_loc: _1.lbs_loc + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let lb = mklb(_4, _5); + return { + lbs_bindings: { + hd: lb, tl: /* [] */0 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return ghexp({ - TAG: /* Pexp_fun */4, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: _3, - _1: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + }, + lbs_rec: _3, + lbs_extension: _2[0], + lbs_attributes: _2[1], + lbs_loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: { - hd: _1, - tl: /* [] */0 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mklb(_2, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp_constraint(_3, _1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return ghexp({ + TAG: /* Pexp_fun */4, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: _3, + _1: _5 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - exp_of_label(_1, 1) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ], - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: [ - { - txt: _3, - loc: rhs_loc(3) - }, - _5 - ], - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return ghexp({ + TAG: /* Pexp_fun */4, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - undefined - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: _3, + _1: _5 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _4 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: { + hd: _1, + tl: /* [] */0 + } + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + _1 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_alias */1, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "identifier"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_tuple */4, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_construct */5, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + exp_of_label(_1, 1) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_variant */6, - _0: _1, - _1: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ], + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat_cons(rhs_loc(2), ghpat({ - TAG: /* Ppat_tuple */4, - _0: { - hd: _1, - tl: { - hd: _3, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: [ + { + txt: _3, + loc: rhs_loc(3) + }, + _5 + ], + tl: _1 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat_cons(rhs_loc(2), ghpat({ - TAG: /* Ppat_tuple */4, - _0: { - hd: _5, - tl: { - hd: _7, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 4, ")", 8); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_or */9, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + undefined + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_lazy */12, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _4 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_exception */14, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$1(_1, _2); - }), + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return mkpat(/* Ppat_any */0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_alias */1, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_constant */2, - _0: _1 - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "identifier"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_interval */3, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_tuple */4, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_construct */5, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_construct */5, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_variant */6, - _0: _1, - _1: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_variant */6, + _0: _1, + _1: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_type */11, - _0: { - txt: _2, - loc: rhs_loc(2) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat_cons(rhs_loc(2), ghpat({ + TAG: /* Ppat_tuple */4, + _0: { + hd: _1, + tl: { + hd: _3, + tl: /* [] */0 + } + } + }), symbol_rloc(undefined)); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_record */7, - _0: _2[0], - _1: _2[1] - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 1, "}", 3); - }), - (function (__caml_parser_env) { - const _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))); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 1, "]", 4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_array */8, - _0: Stdlib__List.rev(_2) - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - return mkpat({ - TAG: /* Ppat_array */8, - _0: /* [] */0 - }); - }), + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat_cons(rhs_loc(2), ghpat({ + TAG: /* Ppat_tuple */4, + _0: { + hd: _5, + tl: { + hd: _7, + tl: /* [] */0 + } + } + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 4, ")", 8); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_or */9, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 1, "|]", 4); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_lazy */12, + _0: _2 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_exception */14, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _2, - _1: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$1(_1, _2); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_var */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(4, "type"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_unpack */13, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + return mkpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: mkpat({ - TAG: /* Ppat_unpack */13, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_constant */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 6); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_interval */3, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_extension */15, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_construct */5, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: undefined + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_variant */6, + _0: _1, + _1: undefined + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: { - hd: _1, - tl: /* [] */0 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_type */11, + _0: { + txt: _2, + loc: rhs_loc(2) + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_record */7, + _0: _2[0], + _1: _2[1] + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 1, "}", 3); + }), + (function (__caml_parser_env) { + const _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))); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 1, "]", 4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_array */8, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return mkpat({ + TAG: /* Ppat_array */8, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 1, "|]", 4); + }), + (function (__caml_parser_env) { + return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(4, "type"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_unpack */13, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: mkpat({ + TAG: /* Ppat_unpack */13, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Open */1 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 6); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: _3[0] - }, - _3[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_extension */15, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - pat_of_label(_1, 1) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: { + hd: _1, + tl: /* [] */0 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1[0], - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1[0], - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: /* [] */0 + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { hd: _1, tl: /* [] */0 - }; - }), + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: /* [] */0 + }, + /* Open */1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: _3[0] + }, + _3[1] + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - return [ - /* Ptype_abstract */0, - /* Public */1, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + pat_of_label(_1, 1) + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* Ptype_abstract */0, - /* Public */1, - _2 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* Ptype_abstract */0, - /* Private */0, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1[0], + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_2) - }, - /* Public */1, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1[0], + tl: _2 + }; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_3) - }, - /* Private */0, - undefined - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return [ - /* Ptype_open */1, - /* Public */1, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - TAG: /* Ptype_record */1, - _0: _4 - }, - _2, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_5) - }, - _4, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return [ - /* Ptype_open */1, - /* Public */1, - _2 - ]; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - TAG: /* Ptype_record */1, - _0: _6 - }, - _4, - _2 - ]; - }), + return [ + /* Ptype_abstract */0, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* Ptype_abstract */0, + /* Public */1, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* Ptype_abstract */0, + /* Private */0, + _3 + ]; + }), (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_2) + }, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _1 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_3) + }, + /* Private */0, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return [ + /* Ptype_open */1, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + TAG: /* Ptype_record */1, + _0: _4 + }, + _2, + undefined + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_5) + }, + _4, + _2 + ]; + }), (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return [ + /* Ptype_open */1, + /* Public */1, + _2 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + TAG: /* Ptype_record */1, + _0: _6 + }, + _4, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return /* [] */0; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _1 + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return /* Invariant */2; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return /* Covariant */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - return /* Contravariant */1; - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return /* Invariant */2; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return /* Covariant */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + return /* Contravariant */1; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _4, - loc: rhs_loc(4) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return [ - /* [] */0, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - Stdlib__List.rev(_2), - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - Stdlib__List.rev(_2), - _4 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* [] */0, - _2 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, { + txt: _4, + loc: rhs_loc(4) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + return [ + /* [] */0, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); - const 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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - if (_2 !== /* Recursive */1) { - not_expecting(2, "nonrec flag"); - } - return mk$20(_8, symbol_docs(undefined), _3, _6, { - txt: _4, - loc: rhs_loc(4) - }, Stdlib__List.rev(_7)); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - if (_2 !== /* Recursive */1) { - not_expecting(2, "nonrec flag"); - } - return mk$20(_8, symbol_docs(undefined), _3, _6, { - txt: _4, - loc: rhs_loc(4) - }, Stdlib__List.rev(_7)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + Stdlib__List.rev(_2), + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + Stdlib__List.rev(_2), + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* [] */0, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); + const 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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + if (_2 !== /* Recursive */1) { + not_expecting(2, "nonrec flag"); + } + return mk$20(_8, symbol_docs(undefined), _3, _6, { + txt: _4, + loc: rhs_loc(4) + }, Stdlib__List.rev(_7)); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + if (_2 !== /* Recursive */1) { + not_expecting(2, "nonrec flag"); + } + return mk$20(_8, symbol_docs(undefined), _3, _6, { + txt: _4, + loc: rhs_loc(4) + }, Stdlib__List.rev(_7)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _3, - loc: rhs_loc(3) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _4, - loc: rhs_loc(4) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const rhs = last(_3); - return { - TAG: /* Pwith_type */0, - _0: { - txt: _3, - loc: rhs_loc(3) - }, - _1: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, Stdlib__List.rev(_6), undefined, _4, _5, { - txt: rhs, - loc: rhs_loc(3) - }) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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, { - txt: _3, - loc: rhs_loc(3) - }) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Pwith_module */1, - _0: { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) - }, - _1: { - txt: _4, - loc: rhs_loc(4) - } - }; - }), + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Pwith_modsubst */3, - _0: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, { + txt: _3, + loc: rhs_loc(3) + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) - }, - _1: { + }, { txt: _4, loc: rhs_loc(4) - } - }; - }), + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const rhs = last(_3); + return { + TAG: /* Pwith_type */0, + _0: { + txt: _3, + loc: rhs_loc(3) + }, + _1: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, Stdlib__List.rev(_6), undefined, _4, _5, { + txt: rhs, + loc: rhs_loc(3) + }) + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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, { + txt: _3, + loc: rhs_loc(3) + }) + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Pwith_module */1, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + txt: _4, + loc: rhs_loc(4) + } + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Pwith_modsubst */3, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + txt: _4, + loc: rhs_loc(4) + } + }; + }), (function (__caml_parser_env) { - return /* Public */1; - }), + return /* Public */1; + }), (function (__caml_parser_env) { - return /* Private */0; - }), + return /* Private */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_1), - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_1), + _1: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_1), - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_1), + _1: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_alias */6, - _0: _1, - _1: _4 - }); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "?" + _2, - _1: mkoption(_4), - _2: _6 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "?" + _1, - _1: mkoption(_2), - _2: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_alias */6, + _0: _1, + _1: _4 + }); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "?" + _2, + _1: mkoption(_4), + _2: _6 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "?" + _1, + _1: mkoption(_2), + _2: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: _1, - _1: _3, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "", - _1: _1, - _2: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: _1, + _1: _3, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "", + _1: _1, + _2: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (_2) { - if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - } - return _2.hd; + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (_2) { + if (_2.tl) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - }), + return _2.hd; + } + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (_2) { - if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - } - return _2.hd; + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (_2) { + if (_2.tl) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), - (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + return _2.hd; + } + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: { - hd: _1, - tl: /* [] */0 - } - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_object */4, - _0: _2[0], - _1: _2[1] - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - return mktyp({ - TAG: /* Ptyp_object */4, - _0: /* [] */0, - _1: /* Closed */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + hd: _1, + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: /* [] */0 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _3, - loc: rhs_loc(3) - }, - _1: { - hd: _1, - tl: /* [] */0 - } - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_object */4, + _0: _2[0], + _1: _2[1] + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _5, - loc: rhs_loc(5) - }, - _1: Stdlib__List.rev(_2) - }); - }), + return mktyp({ + TAG: /* Ptyp_object */4, + _0: /* [] */0, + _1: /* Closed */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: { - hd: _2, - tl: /* [] */0 - }, - _1: /* Closed */0, - _2: undefined - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: undefined - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: { - hd: _2, - tl: Stdlib__List.rev(_4) - }, - _1: /* Closed */0, - _2: undefined - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Open */1, - _2: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _3, + loc: rhs_loc(3) + }, + _1: { + hd: _1, + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: /* [] */0, - _1: /* Open */1, - _2: undefined - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: /* [] */0 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: Stdlib__List.rev(_5) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _5, + loc: rhs_loc(5) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_package */9, - _0: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: { + hd: _2, + tl: /* [] */0 + }, + _1: /* Closed */0, + _2: undefined + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: undefined + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_extension */10, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: { + hd: _2, + tl: Stdlib__List.rev(_4) + }, + _1: /* Closed */0, + _2: undefined + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Open */1, + _2: undefined + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - /* [] */0 - ]; - }), + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: /* [] */0, + _1: /* Open */1, + _2: undefined + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: /* [] */0 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: Stdlib__List.rev(_5) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_package */9, + _0: _3 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _2, - loc: rhs_loc(2) - }, - _4 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_extension */10, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + /* [] */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _2, + loc: rhs_loc(2) + }, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rinherit */1, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rtag */0, - _0: _1, - _1: _5, - _2: _3, - _3: Stdlib__List.rev(_4) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rtag */0, - _0: _1, - _1: _2, - _2: true, - _3: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return true; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rinherit */1, + _0: _1 + }; + }), (function (__caml_parser_env) { - return false; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rtag */0, + _0: _1, + _1: _5, + _2: _3, + _3: Stdlib__List.rev(_4) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rtag */0, + _0: _1, + _1: _2, + _2: true, + _3: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return true; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return false; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_tuple */2, - _0: { - hd: _1, - tl: Stdlib__List.rev(_3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_tuple */2, - _0: { - hd: _1, - tl: Stdlib__List.rev(_3) - } - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_tuple */2, + _0: { + hd: _1, + tl: Stdlib__List.rev(_3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_tuple */2, + _0: { + hd: _1, + tl: Stdlib__List.rev(_3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: _3[0] - }, - _3[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return [ - /* [] */0, - /* Open */1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _4, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: _3[0] + }, + _3[1] + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: /* [] */0 + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: _1 - }; - }), + return [ + /* [] */0, + /* Open */1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_char */1, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _4, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_string */2, - _0: _1[0], - _1: _1[1] - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_char */1, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_string */2, + _0: _1[0], + _1: _1[1] + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: -_2 | 0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: "-" + _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_nativeint */6, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: -_2 | 0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: Caml_int64.neg(_2) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: -_2 | 0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: Caml_external_polyfill.resolve("nativeint_neg")(_2) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: "-" + _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: -_2 | 0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: Caml_int64.neg(_2) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: _2 - }; - }), + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_nativeint */6, + _0: _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return expecting(2, "operator"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return expecting(3, "module-expr"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return expecting(2, "operator"); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return expecting(3, "module-expr"); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "!"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "+"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "+."; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "-"; - }), + return "!"; + }), (function (__caml_parser_env) { - return "-."; - }), + return "+"; + }), (function (__caml_parser_env) { - return "*"; - }), + return "+."; + }), (function (__caml_parser_env) { - return "="; - }), + return "-"; + }), (function (__caml_parser_env) { - return "<"; - }), + return "-."; + }), (function (__caml_parser_env) { - return ">"; - }), + return "*"; + }), (function (__caml_parser_env) { - return "or"; - }), + return "="; + }), (function (__caml_parser_env) { - return "||"; - }), + return "<"; + }), (function (__caml_parser_env) { - return "&"; - }), + return ">"; + }), (function (__caml_parser_env) { - return "&&"; - }), + return "or"; + }), (function (__caml_parser_env) { - return ":="; - }), + return "||"; + }), (function (__caml_parser_env) { - return "+="; - }), + return "&"; + }), (function (__caml_parser_env) { - return "%"; - }), + return "&&"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return ":="; + }), (function (__caml_parser_env) { - return "()"; - }), + return "+="; + }), (function (__caml_parser_env) { - return "::"; - }), + return "%"; + }), (function (__caml_parser_env) { - return "false"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "true"; - }), + return "()"; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + return "::"; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + return "false"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "true"; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "[]" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "()" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "false" - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "true" - }; - }), + return { + TAG: /* Lident */0, + _0: "[]" + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + return { + TAG: /* Lident */0, + _0: "()" + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + return { + TAG: /* Lident */0, + _0: "false" + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + return { + TAG: /* Lident */0, + _0: "true" + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (applicative_functors.contents) { - return { - TAG: /* Lapply */2, - _0: _1, - _1: _3 - }; - } - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Applicative_path */3, - _0: symbol_rloc(undefined) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (applicative_functors.contents) { return { - TAG: /* Ldot */1, + TAG: /* Lapply */2, _0: _1, _1: _3 }; - }), + } + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Applicative_path */3, + _0: symbol_rloc(undefined) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: /* Pdir_none */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_string */0, - _0: _3[0] - } - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_int */1, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: /* Pdir_none */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_ident */2, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_string */0, + _0: _3[0] + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_ident */2, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_int */1, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_bool */3, - _0: false - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_ident */2, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_bool */3, - _0: true - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_ident */2, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_bool */3, + _0: false + } + }; + }), (function (__caml_parser_env) { - return /* Nonrecursive */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_bool */3, + _0: true + } + }; + }), (function (__caml_parser_env) { - return /* Recursive */1; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return /* Recursive */1; - }), + return /* Nonrecursive */0; + }), (function (__caml_parser_env) { - return /* Nonrecursive */0; - }), + return /* Recursive */1; + }), (function (__caml_parser_env) { - return /* Upto */0; - }), + return /* Recursive */1; + }), (function (__caml_parser_env) { - return /* Downto */1; - }), + return /* Nonrecursive */0; + }), (function (__caml_parser_env) { - return /* Public */1; - }), + return /* Upto */0; + }), (function (__caml_parser_env) { - return /* Private */0; - }), + return /* Downto */1; + }), (function (__caml_parser_env) { - return /* Immutable */0; - }), + return /* Public */1; + }), (function (__caml_parser_env) { - return /* Mutable */1; - }), + return /* Private */0; + }), (function (__caml_parser_env) { - return /* Concrete */1; - }), + return /* Immutable */0; + }), (function (__caml_parser_env) { - return /* Virtual */0; - }), + return /* Mutable */1; + }), (function (__caml_parser_env) { - return [ - /* Public */1, - /* Concrete */1 - ]; - }), + return /* Concrete */1; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Concrete */1 - ]; - }), + return /* Virtual */0; + }), (function (__caml_parser_env) { - return [ - /* Public */1, - /* Virtual */0 - ]; - }), + return [ + /* Public */1, + /* Concrete */1 + ]; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Virtual */0 - ]; - }), + return [ + /* Private */0, + /* Concrete */1 + ]; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Virtual */0 - ]; - }), + return [ + /* Public */1, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return /* Fresh */1; - }), + return [ + /* Private */0, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return /* Override */0; - }), + return [ + /* Private */0, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - - }), + return /* Fresh */1; + }), (function (__caml_parser_env) { - - }), + return /* Override */0; + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - return "-"; - }), + + }), (function (__caml_parser_env) { - return "-."; - }), + + }), (function (__caml_parser_env) { - return "+"; - }), + return "-"; + }), (function (__caml_parser_env) { - return "+."; - }), + return "-."; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "+"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "+."; + }), (function (__caml_parser_env) { - return "and"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "as"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "assert"; - }), + return "and"; + }), (function (__caml_parser_env) { - return "begin"; - }), + return "as"; + }), (function (__caml_parser_env) { - return "class"; - }), + return "assert"; + }), (function (__caml_parser_env) { - return "constraint"; - }), + return "begin"; + }), (function (__caml_parser_env) { - return "do"; - }), + return "class"; + }), (function (__caml_parser_env) { - return "done"; - }), + return "constraint"; + }), (function (__caml_parser_env) { - return "downto"; - }), + return "do"; + }), (function (__caml_parser_env) { - return "else"; - }), + return "done"; + }), (function (__caml_parser_env) { - return "end"; - }), + return "downto"; + }), (function (__caml_parser_env) { - return "exception"; - }), + return "else"; + }), (function (__caml_parser_env) { - return "external"; - }), + return "end"; + }), (function (__caml_parser_env) { - return "false"; - }), + return "exception"; + }), (function (__caml_parser_env) { - return "for"; - }), + return "external"; + }), (function (__caml_parser_env) { - return "fun"; - }), + return "false"; + }), (function (__caml_parser_env) { - return "function"; - }), + return "for"; + }), (function (__caml_parser_env) { - return "functor"; - }), + return "fun"; + }), (function (__caml_parser_env) { - return "if"; - }), + return "function"; + }), (function (__caml_parser_env) { - return "in"; - }), + return "functor"; + }), (function (__caml_parser_env) { - return "include"; - }), + return "if"; + }), (function (__caml_parser_env) { - return "inherit"; - }), + return "in"; + }), (function (__caml_parser_env) { - return "initializer"; - }), + return "include"; + }), (function (__caml_parser_env) { - return "lazy"; - }), + return "inherit"; + }), (function (__caml_parser_env) { - return "let"; - }), + return "initializer"; + }), (function (__caml_parser_env) { - return "match"; - }), + return "lazy"; + }), (function (__caml_parser_env) { - return "method"; - }), + return "let"; + }), (function (__caml_parser_env) { - return "module"; - }), + return "match"; + }), (function (__caml_parser_env) { - return "mutable"; - }), + return "method"; + }), (function (__caml_parser_env) { - return "new"; - }), + return "module"; + }), (function (__caml_parser_env) { - return "object"; - }), + return "mutable"; + }), (function (__caml_parser_env) { - return "of"; - }), + return "new"; + }), (function (__caml_parser_env) { - return "open"; - }), + return "object"; + }), (function (__caml_parser_env) { - return "or"; - }), + return "of"; + }), (function (__caml_parser_env) { - return "private"; - }), + return "open"; + }), (function (__caml_parser_env) { - return "rec"; - }), + return "or"; + }), (function (__caml_parser_env) { - return "sig"; - }), + return "private"; + }), (function (__caml_parser_env) { - return "struct"; - }), + return "rec"; + }), (function (__caml_parser_env) { - return "then"; - }), + return "sig"; + }), (function (__caml_parser_env) { - return "to"; - }), + return "struct"; + }), (function (__caml_parser_env) { - return "true"; - }), + return "then"; + }), (function (__caml_parser_env) { - return "try"; - }), + return "to"; + }), (function (__caml_parser_env) { - return "type"; - }), + return "true"; + }), (function (__caml_parser_env) { - return "val"; - }), + return "try"; + }), (function (__caml_parser_env) { - return "virtual"; - }), + return "type"; + }), (function (__caml_parser_env) { - return "when"; - }), + return "val"; + }), (function (__caml_parser_env) { - return "while"; - }), + return "virtual"; + }), (function (__caml_parser_env) { - return "with"; - }), + return "when"; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - txt: _1, - loc: symbol_rloc(undefined) - }; - }), + return "while"; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - txt: _1 + ("." + _3.txt), - loc: symbol_rloc(undefined) - }; - }), + return "with"; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + txt: _1, + loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + txt: _1 + ("." + _3.txt), + loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - return [ - undefined, - /* [] */0 - ]; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - { - hd: _1, - tl: _2 - } - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _3 - ]; - }), + return [ + undefined, + /* [] */0 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + { + hd: _1, + tl: _2 + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PStr */0, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PTyp */1, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PPat */2, - _0: _2, - _1: undefined - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PStr */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PPat */2, - _0: _2, - _1: _4 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PTyp */1, + _0: _2 + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PPat */2, + _0: _2, + _1: undefined + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PPat */2, + _0: _2, + _1: _4 + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }) + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), + (function (__caml_parser_env) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), + (function (__caml_parser_env) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }) ]; const yytables = { @@ -11329,25 +11329,25 @@ function directive_parse(token_with_comments, lexbuf) { switch (curr_token.TAG) { case /* FLOAT */1 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_float */1 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_float */1 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_float */1, _0: Caml_format.caml_float_of_string(curr_token._0) }); case /* INT */7 : const v$1 = curr_token._0; return token_op(calc, (function (e) { - push(e); - return v$1 !== 0; - }), { + push(e); + return v$1 !== 0; + }), { TAG: /* Dir_int */2, _0: v$1 }); @@ -11393,37 +11393,37 @@ function directive_parse(token_with_comments, lexbuf) { break; case /* STRING */16 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_string */3 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_string */3 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_string */3, _0: curr_token._0[0] }); case /* UIDENT */17 : const value_v = query(curr_loc, curr_token._0); return token_op(calc, (function (e) { - push(e); - if (!/* tag */(typeof value_v === "number" || typeof value_v === "string") && value_v.TAG === /* Dir_bool */0) { - return value_v._0; - } - const ty = type_of_directive(value_v); - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: ty - }, - _2: curr_loc - }); - }), value_v); + push(e); + if (!/* tag */(typeof value_v === "number" || typeof value_v === "string") && value_v.TAG === /* Dir_bool */0) { + return value_v._0; + } + const ty = type_of_directive(value_v); + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: ty + }, + _2: curr_loc + }); + }), value_v); default: throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12580,9 +12580,9 @@ function token(lexbuf) { case 29 : const stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); const match$2 = with_comment_buffer((function (lexbuf) { - store_string("*" + stars); - return __ocaml_lex_comment_rec(lexbuf, 132); - }), lexbuf); + store_string("*" + stars); + return __ocaml_lex_comment_rec(lexbuf, 132); + }), lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -13587,12 +13587,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/ocaml_proto_test.js b/jscomp/test/dist/jscomp/test/ocaml_proto_test.js index 9051c6406..05785ec21 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_proto_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_proto_test.js @@ -841,708 +841,708 @@ const yytransl_block = [ const yyact = [ (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "parser" - }); - }), + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "parser" + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(_1, undefined, undefined, undefined, undefined, undefined, _2, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, _1, undefined, undefined, undefined, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, _1, undefined, undefined, undefined, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, _1, undefined, undefined, undefined, undefined, undefined, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, _1, undefined, undefined, undefined, undefined, undefined, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, _1, undefined, undefined, undefined, undefined, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, _1, undefined, undefined, undefined, undefined, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, undefined, _1, undefined, undefined, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, undefined, _1, undefined, undefined, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, undefined, undefined, _1, undefined, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, undefined, undefined, _1, undefined, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, undefined, undefined, undefined, undefined, _1, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, undefined, undefined, undefined, undefined, _1, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, _1, undefined, undefined, _2, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, _1, undefined, undefined, _2, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, _1, undefined, undefined, undefined, undefined, _2, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, _1, undefined, undefined, undefined, undefined, _2, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, _1, undefined, undefined, undefined, _2, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, _1, undefined, undefined, undefined, _2, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, undefined, _1, undefined, _2, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, undefined, _1, undefined, _2, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, undefined, undefined, _1, _2, undefined, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, undefined, undefined, _1, _2, undefined, undefined); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return proto(undefined, undefined, undefined, undefined, undefined, undefined, _2, _1, undefined); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return proto(undefined, undefined, undefined, undefined, undefined, undefined, _2, _1, undefined); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return _3; - }), + const _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); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return $$import(undefined, _2); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return $$import(Caml_option.some(undefined), _3); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _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) { - const _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); - throw new Caml_js_exceptions.MelangeError(Compilation_error, { - MEL_EXN_ID: Compilation_error, - _1: { - TAG: /* Invalid_import_qualifier */5, - _0: _1 - } - }); - }), + const _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); + throw new Caml_js_exceptions.MelangeError(Compilation_error, { + MEL_EXN_ID: Compilation_error, + _1: { + TAG: /* Invalid_import_qualifier */5, + _0: _1 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return _2[1]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return _2[1]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return message(_4, _2[1]); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return message(/* [] */0, _2[1]); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Message_field */0, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Message_field */0, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Message_map_field */1, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Message_map_field */1, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Message_oneof_field */2, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Message_oneof_field */2, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Message_sub */3, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Message_sub */3, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Message_enum */4, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Message_enum */4, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Message_extension */5, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Message_extension */5, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Compilation_error, { - MEL_EXN_ID: Compilation_error, - _1: /* Syntax_error */0 - }); - }), + throw new Caml_js_exceptions.MelangeError(Compilation_error, { + MEL_EXN_ID: Compilation_error, + _1: /* Syntax_error */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return extend(_2[1], _4); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return extend(_2[1], /* [] */0); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return _2; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return _2; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Extension_single_number */0, - _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }; - }), + return { + TAG: /* Extension_single_number */0, + _0: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return extension_range_range(_1, { - NAME: "Number", - VAL: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return extension_range_range(_1, { + NAME: "Number", + VAL: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return extension_range_range(_1, "Max"); - }), + const _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); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - oneof_name: _2[1], - oneof_fields: _4 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + oneof_name: _2[1], + oneof_fields: _4 + }; + }), (function (__caml_parser_env) { - const _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, { - MEL_EXN_ID: Compilation_error, - _1: { - TAG: /* Missing_one_of_name */12, - _0: _1 - } - }); - }), + const _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, { + MEL_EXN_ID: Compilation_error, + _1: { + TAG: /* Missing_one_of_name */12, + _0: _1 + } + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _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); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _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) { - const _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); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - throw new Caml_js_exceptions.MelangeError(Compilation_error, { - MEL_EXN_ID: Compilation_error, - _1: { - TAG: /* Missing_field_label */14, - _0: _1[0] - } - }); - }), + const _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); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + throw new Caml_js_exceptions.MelangeError(Compilation_error, { + MEL_EXN_ID: Compilation_error, + _1: { + TAG: /* Missing_field_label */14, + _0: _1[0] + } + }); + }), (function (__caml_parser_env) { - const _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); - throw new Caml_js_exceptions.MelangeError(Compilation_error, { - MEL_EXN_ID: Compilation_error, - _1: { - TAG: /* Missing_field_label */14, - _0: _1[0] - } - }); - }), + const _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); + throw new Caml_js_exceptions.MelangeError(Compilation_error, { + MEL_EXN_ID: Compilation_error, + _1: { + TAG: /* Missing_field_label */14, + _0: _1[0] + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0)[1]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0)[1]; + }), (function (__caml_parser_env) { - return "required"; - }), + return "required"; + }), (function (__caml_parser_env) { - return "optional"; - }), + return "optional"; + }), (function (__caml_parser_env) { - return "repeated"; - }), + return "repeated"; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return "oneof"; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return "oneof"; + }), (function (__caml_parser_env) { - return "enum"; - }), + return "enum"; + }), (function (__caml_parser_env) { - return "package"; - }), + return "package"; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return "import"; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return "import"; + }), (function (__caml_parser_env) { - return "public"; - }), + return "public"; + }), (function (__caml_parser_env) { - return "option"; - }), + return "option"; + }), (function (__caml_parser_env) { - return "extensions"; - }), + return "extensions"; + }), (function (__caml_parser_env) { - return "extend"; - }), + return "extend"; + }), (function (__caml_parser_env) { - return "syntax"; - }), + return "syntax"; + }), (function (__caml_parser_env) { - return "message"; - }), + return "message"; + }), (function (__caml_parser_env) { - return "to"; - }), + return "to"; + }), (function (__caml_parser_env) { - return "max"; - }), + return "max"; + }), (function (__caml_parser_env) { - return "map"; - }), + return "map"; + }), (function (__caml_parser_env) { - return "Required"; - }), + return "Required"; + }), (function (__caml_parser_env) { - return "Repeated"; - }), + return "Repeated"; + }), (function (__caml_parser_env) { - return "Optional"; - }), + return "Optional"; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - throw new Caml_js_exceptions.MelangeError(Compilation_error, { - MEL_EXN_ID: Compilation_error, - _1: { - TAG: /* Invalid_field_label */13, - _0: _1[0] - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + throw new Caml_js_exceptions.MelangeError(Compilation_error, { + MEL_EXN_ID: Compilation_error, + _1: { + TAG: /* Invalid_field_label */13, + _0: _1[0] + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1[1], - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1[1], + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2[1], - _5 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2[1], + _5 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0)[1]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0)[1]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1)[1]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1)[1]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return _1 + _2[1]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return _1 + _2[1]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _4 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Constant_int */2, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Constant_int */2, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Constant_float */3, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Constant_float */3, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const litteral = _1[1]; - switch (litteral) { - case "false" : - return { - TAG: /* Constant_bool */1, - _0: false - }; - case "true" : - return { - TAG: /* Constant_bool */1, - _0: true - }; - default: + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const litteral = _1[1]; + switch (litteral) { + case "false" : return { - TAG: /* Constant_litteral */4, - _0: litteral + TAG: /* Constant_bool */1, + _0: false }; - } - }), + case "true" : + return { + TAG: /* Constant_bool */1, + _0: true + }; + default: + return { + TAG: /* Constant_litteral */4, + _0: litteral + }; + } + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Constant_string */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Constant_string */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let enum_valuesOpt = _4; - let enum_name = _2[1]; - const enum_values = enum_valuesOpt !== undefined ? enum_valuesOpt : /* [] */0; - message_counter.contents = message_counter.contents + 1 | 0; - return { - enum_id: message_counter.contents, - enum_name: enum_name, - enum_values: enum_values - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let enum_valuesOpt = _4; + let enum_name = _2[1]; + const enum_values = enum_valuesOpt !== undefined ? enum_valuesOpt : /* [] */0; + message_counter.contents = message_counter.contents + 1 | 0; + return { + enum_id: message_counter.contents, + enum_name: enum_name, + enum_values: enum_values + }; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - enum_value_name: _1[1], - enum_value_int: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + enum_value_name: _1[1], + enum_value_int: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let enum_value = _1[1]; - let loc = _1[0]; - throw new Caml_js_exceptions.MelangeError(Compilation_error, { - MEL_EXN_ID: Compilation_error, - _1: { - TAG: /* Missing_semicolon_for_enum_value */9, - _0: enum_value, - _1: loc - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let enum_value = _1[1]; + let loc = _1[0]; + throw new Caml_js_exceptions.MelangeError(Compilation_error, { + MEL_EXN_ID: Compilation_error, + _1: { + TAG: /* Missing_semicolon_for_enum_value */9, + _0: enum_value, + _1: loc + } + }); + }), (function (__caml_parser_env) { - const _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]); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return invalid_enum_specification(_1[1], _1[0]); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return invalid_enum_specification(_1[1], _1[0]); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return invalid_enum_specification(_1[1], _1[0]); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return invalid_enum_specification(_1[1], _1[0]); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return invalid_enum_specification(_1[1], _1[0]); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return invalid_enum_specification(_1[1], _1[0]); + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }) + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }) ]; const yytables = { @@ -2315,31 +2315,31 @@ function gen_decode_record(and_, param, sc) { const r_fields = param.r_fields; const r_name = param.r_name; const all_lists = Stdlib__List.fold_left((function (acc, param) { - const rf_field_type = param.rf_field_type; - const rf_label = param.rf_label; - switch (rf_field_type.TAG) { - case /* Rft_repeated_field */2 : - if (rf_field_type._0[0] === /* Rt_list */0) { - return { - hd: rf_label, - tl: acc - }; - } else { - return acc; - } - case /* Rft_associative_field */3 : - if (rf_field_type._0[0] === /* At_list */0) { - return { - hd: rf_label, - tl: acc - }; - } else { - return acc; - } - default: - return acc; - } - }), /* [] */0, r_fields); + const rf_field_type = param.rf_field_type; + const rf_label = param.rf_label; + switch (rf_field_type.TAG) { + case /* Rft_repeated_field */2 : + if (rf_field_type._0[0] === /* Rt_list */0) { + return { + hd: rf_label, + tl: acc + }; + } else { + return acc; + } + case /* Rft_associative_field */3 : + if (rf_field_type._0[0] === /* At_list */0) { + return { + hd: rf_label, + tl: acc + }; + } else { + return acc; + } + default: + return acc; + } + }), /* [] */0, r_fields); const process_field_common = function (sc, encoding_number, pk_as_string, f) { line$1(sc, Curry._2(Stdlib__Printf.sprintf({ TAG: /* Format */0, @@ -2369,9 +2369,9 @@ function gen_decode_record(and_, param, sc) { _1: "| Some (%i, Pbrt.%s) -> (" }), encoding_number, pk_as_string)); scope(sc, (function (sc) { - Curry._1(f, sc); - line$1(sc, "loop ()"); - })); + Curry._1(f, sc); + line$1(sc, "loop ()"); + })); line$1(sc, ")"); line$1(sc, Curry._1(Stdlib__Printf.sprintf({ TAG: /* Format */0, @@ -2393,50 +2393,50 @@ function gen_decode_record(and_, param, sc) { _1: "| Some (%i, pk) -> raise (" }), encoding_number)); scope(sc, (function (sc) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Protobuf.Decoder.Failure (Protobuf.Decoder.Unexpected_payload (", + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Protobuf.Decoder.Failure (Protobuf.Decoder.Unexpected_payload (", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ", pk))", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: ", pk))", + _1: /* End_of_format */0 } - }, - _1: "Protobuf.Decoder.Failure (Protobuf.Decoder.Unexpected_payload (%s, pk))" - }), Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "\"Message(", + } + }, + _1: "Protobuf.Decoder.Failure (Protobuf.Decoder.Unexpected_payload (%s, pk))" + }), Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "\"Message(", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: "), field(", _1: { - TAG: /* String_literal */11, - _0: "), field(", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: ")\"", - _1: /* End_of_format */0 - } + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: ")\"", + _1: /* End_of_format */0 } } } - }, - _1: "\"Message(%s), field(%i)\"" - }), r_name, encoding_number))); - })); + } + }, + _1: "\"Message(%s), field(%i)\"" + }), r_name, encoding_number))); + })); line$1(sc, ")"); }; const mutable_record_name = r_name + "_mutable"; @@ -2462,77 +2462,177 @@ function gen_decode_record(and_, param, sc) { _1: "%s decode_%s d =" }), let_decl_of_and(and_), r_name)); scope(sc, (function (sc) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "let v = default_", + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let v = default_", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " () in", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " () in", + _1: /* End_of_format */0 } - }, - _1: "let v = default_%s () in" - }), mutable_record_name)); - line$1(sc, "let rec loop () = "); - scope(sc, (function (sc) { - line$1(sc, "match Pbrt.Decoder.key d with"); - line$1(sc, "| None -> ("); - scope(sc, (function (sc) { - Stdlib__List.iter((function (field_name) { - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "v.", + } + }, + _1: "let v = default_%s () in" + }), mutable_record_name)); + line$1(sc, "let rec loop () = "); + scope(sc, (function (sc) { + line$1(sc, "match Pbrt.Decoder.key d with"); + line$1(sc, "| None -> ("); + scope(sc, (function (sc) { + Stdlib__List.iter((function (field_name) { + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " <- List.rev v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "v.%s <- List.rev v.%s;" + }), field_name, field_name)); + }), all_lists); + })); + line$1(sc, ")"); + Stdlib__List.iter((function (param) { + const rf_field_type = param.rf_field_type; + const rf_label = param.rf_label; + switch (rf_field_type.TAG) { + case /* Rft_required */0 : + let param$1 = rf_field_type._0; + const pk = param$1[2]; + const 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({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: " <- ", _1: { - TAG: /* String_literal */11, - _0: " <- List.rev v.", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "v.%s <- %s;" + }), rf_label, decode_field_f(field_type, pk))); + })); + case /* Rft_optional */1 : + let param$2 = rf_field_type._0; + const pk$1 = param$2[2]; + const 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({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " <- Some (", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: ");", + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "v.%s <- Some (%s);" + }), rf_label, decode_field_f(field_type$1, pk$1))); + })); + case /* Rft_repeated_field */2 : + let param$3 = rf_field_type._0; + const is_packed = param$3[4]; + const pk$2 = param$3[3]; + const encoding_number = param$3[2]; + const field_type$2 = param$3[1]; + if (param$3[0] === /* Rt_list */0) { + if (is_packed) { + return process_field_common(sc, encoding_number, "Bytes", (function (sc) { + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " <- Pbrt.Decoder.packed_fold (fun l d -> (", _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: ")::l) [] d;", + _1: /* End_of_format */0 + } } } } - } - }, - _1: "v.%s <- List.rev v.%s;" - }), field_name, field_name)); - }), all_lists); - })); - line$1(sc, ")"); - Stdlib__List.iter((function (param) { - const rf_field_type = param.rf_field_type; - const rf_label = param.rf_label; - switch (rf_field_type.TAG) { - case /* Rft_required */0 : - let param$1 = rf_field_type._0; - const pk = param$1[2]; - const 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({ - TAG: /* Format */0, - _0: { + }, + _1: "v.%s <- Pbrt.Decoder.packed_fold (fun l d -> (%s)::l) [] d;" + }), rf_label, decode_field_f(field_type$2, pk$2))); + })); + } else { + return process_field_common(sc, encoding_number, string_of_payload_kind(Caml_option.some(undefined), pk$2, false), (function (sc) { + line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "v.", + _0: " <- (", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " <- ", + _0: ") :: v.", _1: { TAG: /* String */2, _0: /* No_padding */0, @@ -2544,379 +2644,279 @@ function gen_decode_record(and_, param, sc) { } } } - }, - _1: "v.%s <- %s;" - }), rf_label, decode_field_f(field_type, pk))); - })); - case /* Rft_optional */1 : - let param$2 = rf_field_type._0; - const pk$1 = param$2[2]; - const 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) { + } + } + }, + _1: "v.%s <- (%s) :: v.%s;" + }), rf_label, decode_field_f(field_type$2, pk$2), rf_label)); + })); + } + } else if (is_packed) { + return process_field_common(sc, encoding_number, "Bytes", (function (sc) { + line$1(sc, "Pbrt.Decoder.packed_fold (fun () d -> "); + scope(sc, (function (sc) { line$1(sc, Curry._2(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "v.", + _0: "Pbrt.Repeated_field.add (", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " <- Some (", + _0: ") v.", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: ");", + TAG: /* Char_literal */12, + _0: /* ';' */59, _1: /* End_of_format */0 } } } } }, - _1: "v.%s <- Some (%s);" - }), rf_label, decode_field_f(field_type$1, pk$1))); + _1: "Pbrt.Repeated_field.add (%s) v.%s;" + }), decode_field_f(field_type$2, pk$2), rf_label)); })); - case /* Rft_repeated_field */2 : - let param$3 = rf_field_type._0; - const is_packed = param$3[4]; - const pk$2 = param$3[3]; - const encoding_number = param$3[2]; - const field_type$2 = param$3[1]; - if (param$3[0] === /* Rt_list */0) { - if (is_packed) { - return process_field_common(sc, encoding_number, "Bytes", (function (sc) { - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " <- Pbrt.Decoder.packed_fold (fun l d -> (", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ")::l) [] d;", - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "v.%s <- Pbrt.Decoder.packed_fold (fun l d -> (%s)::l) [] d;" - }), rf_label, decode_field_f(field_type$2, pk$2))); - })); - } else { - return process_field_common(sc, encoding_number, string_of_payload_kind(Caml_option.some(undefined), pk$2, false), (function (sc) { - line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " <- (", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") :: v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - } - } - } - } - }, - _1: "v.%s <- (%s) :: v.%s;" - }), rf_label, decode_field_f(field_type$2, pk$2), rf_label)); - })); - } - } else if (is_packed) { - return process_field_common(sc, encoding_number, "Bytes", (function (sc) { - line$1(sc, "Pbrt.Decoder.packed_fold (fun () d -> "); - scope(sc, (function (sc) { - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Pbrt.Repeated_field.add (", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "Pbrt.Repeated_field.add (%s) v.%s;" - }), decode_field_f(field_type$2, pk$2), rf_label)); - })); - line$1(sc, ") () d;"); - })); - } else { - return process_field_common(sc, encoding_number, string_of_payload_kind(Caml_option.some(undefined), pk$2, false), (function (sc) { - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Pbrt.Repeated_field.add (", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: "; ", - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "Pbrt.Repeated_field.add (%s) v.%s; " - }), decode_field_f(field_type$2, pk$2), rf_label)); - })); - } - case /* Rft_associative_field */3 : - let param$4 = rf_field_type._0; - const match = param$4[3]; - const value_pk = match[1]; - const value_type = match[0]; - const match$1 = param$4[2]; - const at = param$4[0]; - const 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"); - const decode_expression = Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "(Pbrt.Decoder.map_entry d ~decode_key:", + line$1(sc, ") () d;"); + })); + } else { + return process_field_common(sc, encoding_number, string_of_payload_kind(Caml_option.some(undefined), pk$2, false), (function (sc) { + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Repeated_field.add (", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: ") v.", _1: { - TAG: /* String_literal */11, - _0: " ~decode_value)", - _1: /* End_of_format */0 + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "; ", + _1: /* End_of_format */0 + } } } - }, - _1: "(Pbrt.Decoder.map_entry d ~decode_key:%s ~decode_value)" - }), decode_key_f); - if (at === /* At_list */0) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + } + }, + _1: "Pbrt.Repeated_field.add (%s) v.%s; " + }), decode_field_f(field_type$2, pk$2), rf_label)); + })); + } + case /* Rft_associative_field */3 : + let param$4 = rf_field_type._0; + const match = param$4[3]; + const value_pk = match[1]; + const value_type = match[0]; + const match$1 = param$4[2]; + const at = param$4[0]; + const 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"); + const decode_expression = Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "(Pbrt.Decoder.map_entry d ~decode_key:", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " ~decode_value)", + _1: /* End_of_format */0 + } + } + }, + _1: "(Pbrt.Decoder.map_entry d ~decode_key:%s ~decode_value)" + }), decode_key_f); + if (at === /* At_list */0) { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " <- (", + _1: /* End_of_format */0 + } + } + }, + _1: "v.%s <- (" + }), rf_label)); + scope(sc, (function (sc) { + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "v.", + _0: "::v.", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " <- (", + TAG: /* Char_literal */12, + _0: /* ';' */59, _1: /* End_of_format */0 } } - }, - _1: "v.%s <- (" - }), rf_label)); - scope(sc, (function (sc) { - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: "::v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - } - }, - _1: "%s::v.%s;" - }), decode_expression, rf_label)); - })); - return line$1(sc, ");"); - } - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "let a, b = ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " in", - _1: /* End_of_format */0 - } } }, - _1: "let a, b = %s in" - }), decode_expression)); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + _1: "%s::v.%s;" + }), decode_expression, rf_label)); + })); + return line$1(sc, ");"); + } + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let a, b = ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " in", + _1: /* End_of_format */0 + } + } + }, + _1: "let a, b = %s in" + }), decode_expression)); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Hashtbl.add v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " a b;", + _1: /* End_of_format */0 + } + } + }, + _1: "Hashtbl.add v.%s a b;" + }), rf_label)); + })); + case /* Rft_variant_field */4 : + let param$5 = rf_field_type._0; + return Stdlib__List.iter((function (param) { + const pk = param.vc_payload_kind; + const vc_field_type = param.vc_field_type; + const 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 (!/* tag */(typeof vc_field_type === "number" || typeof vc_field_type === "string")) { + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "Hashtbl.add v.", + _0: "v.", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " a b;", - _1: /* End_of_format */0 - } - } - }, - _1: "Hashtbl.add v.%s a b;" - }), rf_label)); - })); - case /* Rft_variant_field */4 : - let param$5 = rf_field_type._0; - return Stdlib__List.iter((function (param) { - const pk = param.vc_payload_kind; - const vc_field_type = param.vc_field_type; - const 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 (!/* tag */(typeof vc_field_type === "number" || typeof vc_field_type === "string")) { - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " <- ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " (", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ");", - _1: /* End_of_format */0 - } - } - } - } - } - } - }, - _1: "v.%s <- %s (%s);" - }), rf_label, vc_constructor, decode_field_f(vc_field_type._0, pk))); - } - line$1(sc, "Pbrt.Decoder.empty_nested d;"); - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + _0: " <- ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "v.", + _0: " (", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " <- ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } + _0: ");", + _1: /* End_of_format */0 } } - }, - _1: "v.%s <- %s;" - }), rf_label, vc_constructor)); - })); - }), param$5.v_constructors); - - } - }), r_fields); - line$1(sc, "| Some (n, payload_kind) -> Pbrt.Decoder.skip d payload_kind; loop ()"); - })); - line$1(sc, "in"); - line$1(sc, "loop ();"); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "let v:", + } + } + } + } + }, + _1: "v.%s <- %s (%s);" + }), rf_label, vc_constructor, decode_field_f(vc_field_type._0, pk))); + } + line$1(sc, "Pbrt.Decoder.empty_nested d;"); + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " <- ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "v.%s <- %s;" + }), rf_label, vc_constructor)); + })); + }), param$5.v_constructors); + + } + }), r_fields); + line$1(sc, "| Some (n, payload_kind) -> Pbrt.Decoder.skip d payload_kind; loop ()"); + })); + line$1(sc, "in"); + line$1(sc, "loop ();"); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let v:", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " = Obj.magic v in", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " = Obj.magic v in", + _1: /* End_of_format */0 } - }, - _1: "let v:%s = Obj.magic v in" - }), r_name)); - line$1(sc, "v"); - })); + } + }, + _1: "let v:%s = Obj.magic v in" + }), r_name)); + line$1(sc, "v"); + })); } function gen_decode_variant(and_, param, sc) { @@ -2944,116 +2944,116 @@ function gen_decode_variant(and_, param, sc) { _1: "%s decode_%s d = " }), let_decl_of_and(and_), v_name)); scope(sc, (function (sc) { - line$1(sc, Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "let rec loop () = ", - _1: /* End_of_format */0 - }, - _1: "let rec loop () = " - })); - scope(sc, (function (sc) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + line$1(sc, Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let rec loop () = ", + _1: /* End_of_format */0 + }, + _1: "let rec loop () = " + })); + scope(sc, (function (sc) { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let ret:", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "let ret:", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " = match Pbrt.Decoder.key d with", - _1: /* End_of_format */0 - } - } - }, - _1: "let ret:%s = match Pbrt.Decoder.key d with" - }), v_name)); - scope(sc, (function (sc) { - line$1(sc, "| None -> failwith \"None of the known key is found\""); - Stdlib__List.iter((function (ctor) { - const vc_encoding_number = ctor.vc_encoding_number; - const vc_field_type = ctor.vc_field_type; - const vc_constructor = ctor.vc_constructor; - if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { - return line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| Some (", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: ", _) -> (Pbrt.Decoder.empty_nested d ; ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ')' */41, - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "| Some (%i, _) -> (Pbrt.Decoder.empty_nested d ; %s)" - }), vc_encoding_number, vc_constructor)); - } else { - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + _0: " = match Pbrt.Decoder.key d with", + _1: /* End_of_format */0 + } + } + }, + _1: "let ret:%s = match Pbrt.Decoder.key d with" + }), v_name)); + scope(sc, (function (sc) { + line$1(sc, "| None -> failwith \"None of the known key is found\""); + Stdlib__List.iter((function (ctor) { + const vc_encoding_number = ctor.vc_encoding_number; + const vc_field_type = ctor.vc_field_type; + const vc_constructor = ctor.vc_constructor; + if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { + return line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| Some (", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: ", _) -> (Pbrt.Decoder.empty_nested d ; ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ')' */41, + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "| Some (%i, _) -> (Pbrt.Decoder.empty_nested d ; %s)" + }), vc_encoding_number, vc_constructor)); + } else { + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| Some (", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: ", _) -> ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| Some (", + _0: " (", _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: ", _) -> ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " (", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ')' */41, - _1: /* End_of_format */0 - } - } - } - } + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ')' */41, + _1: /* End_of_format */0 } } - }, - _1: "| Some (%i, _) -> %s (%s)" - }), vc_encoding_number, vc_constructor, decode_field_f(vc_field_type._0, ctor.vc_payload_kind))); - } - }), v_constructors); - line$1(sc, "| Some (n, payload_kind) -> ("); - line$1(sc, " Pbrt.Decoder.skip d payload_kind; "); - line$1(sc, " loop () "); - line$1(sc, ")"); - })); - line$1(sc, "in"); - line$1(sc, "ret"); - })); - line$1(sc, "in"); - line$1(sc, "loop ()"); - })); + } + } + } + } + }, + _1: "| Some (%i, _) -> %s (%s)" + }), vc_encoding_number, vc_constructor, decode_field_f(vc_field_type._0, ctor.vc_payload_kind))); + } + }), v_constructors); + line$1(sc, "| Some (n, payload_kind) -> ("); + line$1(sc, " Pbrt.Decoder.skip d payload_kind; "); + line$1(sc, " loop () "); + line$1(sc, ")"); + })); + line$1(sc, "in"); + line$1(sc, "ret"); + })); + line$1(sc, "in"); + line$1(sc, "loop ()"); + })); } function gen_decode_const_variant(and_, param, sc) { @@ -3081,62 +3081,62 @@ function gen_decode_const_variant(and_, param, sc) { _1: "%s decode_%s d = " }), let_decl_of_and(and_), cv_name)); scope(sc, (function (sc) { - line$1(sc, "match Pbrt.Decoder.int_as_varint d with"); - Stdlib__List.iter((function (param) { - line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + line$1(sc, "match Pbrt.Decoder.int_as_varint d with"); + Stdlib__List.iter((function (param) { + line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* String_literal */11, - _0: "| ", + _0: " -> (", _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " -> (", + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ':' */58, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* Char_literal */12, - _0: /* ':' */58, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ')' */41, - _1: /* End_of_format */0 - } - } + _0: /* ')' */41, + _1: /* End_of_format */0 } } } } - }, - _1: "| %i -> (%s:%s)" - }), param[1], param[0], cv_name)); - }), cv_constructors); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| _ -> failwith \"Unknown value for enum ", + } + } + }, + _1: "| %i -> (%s:%s)" + }), param[1], param[0], cv_name)); + }), cv_constructors); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| _ -> failwith \"Unknown value for enum ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '"' */34, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* '"' */34, + _1: /* End_of_format */0 } - }, - _1: "| _ -> failwith \"Unknown value for enum %s\"" - }), cv_name)); - })); + } + }, + _1: "| _ -> failwith \"Unknown value for enum %s\"" + }), cv_name)); + })); } function gen_struct(and_, t, sc) { @@ -3345,111 +3345,200 @@ function gen_pp_record(and_, param, sc) { _1: "%s pp_%s fmt (v:%s) = " }), let_decl_of_and(and_), r_name, r_name)); scope(sc, (function (sc) { - line$1(sc, "let pp_i fmt () ="); - scope(sc, (function (sc) { - line$1(sc, "Format.pp_open_vbox fmt 1;"); - Stdlib__List.iter((function (record_field) { - const rf_field_type = record_field.rf_field_type; - const rf_label = record_field.rf_label; - const var_name = Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "v.%s" - }), rf_label); - switch (rf_field_type.TAG) { - case /* Rft_required */0 : - const field_string_of = gen_pp_field(rf_field_type._0[0]); - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + line$1(sc, "let pp_i fmt () ="); + scope(sc, (function (sc) { + line$1(sc, "Format.pp_open_vbox fmt 1;"); + Stdlib__List.iter((function (record_field) { + const rf_field_type = record_field.rf_field_type; + const rf_label = record_field.rf_label; + const var_name = Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "v.%s" + }), rf_label); + switch (rf_field_type.TAG) { + case /* Rft_required */0 : + const field_string_of = gen_pp_field(rf_field_type._0[0]); + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Pp.pp_record_field \"", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "\" ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " fmt ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + } + } + } + } + }, + _1: "Pbrt.Pp.pp_record_field \"%s\" %s fmt %s;" + }), rf_label, field_string_of, var_name)); + case /* Rft_optional */1 : + const field_string_of$1 = gen_pp_field(rf_field_type._0[0]); + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Pp.pp_record_field \"", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "\" (Pbrt.Pp.pp_option ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: ") fmt ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + } + } + } + } + }, + _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 : + const match = rf_field_type._0; + const field_string_of$2 = gen_pp_field(match[1]); + if (match[0] === /* Rt_list */0) { + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Pp.pp_record_field \"", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "Pbrt.Pp.pp_record_field \"", + _0: "\" (Pbrt.Pp.pp_list ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "\" ", + _0: ") fmt ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " fmt ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 } } } } - }, - _1: "Pbrt.Pp.pp_record_field \"%s\" %s fmt %s;" - }), rf_label, field_string_of, var_name)); - case /* Rft_optional */1 : - const field_string_of$1 = gen_pp_field(rf_field_type._0[0]); - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + } + } + }, + _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.pp_list %s) fmt %s;" + }), rf_label, field_string_of$2, var_name)); + } else { + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Pp.pp_record_field \"", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "Pbrt.Pp.pp_record_field \"", + _0: "\" (Pbrt.Pp.pp_list ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "\" (Pbrt.Pp.pp_option ", + _0: ") fmt (Pbrt.Repeated_field.to_list ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: ") fmt ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } + _0: ");", + _1: /* End_of_format */0 } } } } - }, - _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 : - const match = rf_field_type._0; - const field_string_of$2 = gen_pp_field(match[1]); - if (match[0] === /* Rt_list */0) { - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Pbrt.Pp.pp_record_field \"", + } + } + }, + _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.pp_list %s) fmt (Pbrt.Repeated_field.to_list %s);" + }), rf_label, field_string_of$2, var_name)); + } + case /* Rft_associative_field */3 : + const match$1 = rf_field_type._0; + let pp_runtime_function; + pp_runtime_function = match$1[0] === /* At_list */0 ? "pp_associative_list" : "pp_hastable"; + const pp_key = gen_pp_field({ + TAG: /* Ft_basic_type */0, + _0: match$1[2][0] + }); + const pp_value = gen_pp_field(match$1[3][0]); + return line$1(sc, Curry._5(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Pp.pp_record_field \"", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "\" (Pbrt.Pp.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: "\" (Pbrt.Pp.pp_list ", + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { TAG: /* String */2, _0: /* No_padding */0, @@ -3469,144 +3558,55 @@ function gen_pp_record(and_, param, sc) { } } } - }, - _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.pp_list %s) fmt %s;" - }), rf_label, field_string_of$2, var_name)); - } else { - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + } + } + } + } + }, + _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.%s %s %s) fmt %s;" + }), rf_label, pp_runtime_function, pp_key, pp_value, var_name)); + case /* Rft_variant_field */4 : + return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Pbrt.Pp.pp_record_field \"", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "\" ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "Pbrt.Pp.pp_record_field \"", + _0: " fmt ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: "\" (Pbrt.Pp.pp_list ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") fmt (Pbrt.Repeated_field.to_list ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ");", - _1: /* End_of_format */0 - } - } - } - } - } - } - }, - _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.pp_list %s) fmt (Pbrt.Repeated_field.to_list %s);" - }), rf_label, field_string_of$2, var_name)); - } - case /* Rft_associative_field */3 : - const match$1 = rf_field_type._0; - let pp_runtime_function; - pp_runtime_function = match$1[0] === /* At_list */0 ? "pp_associative_list" : "pp_hastable"; - const pp_key = gen_pp_field({ - TAG: /* Ft_basic_type */0, - _0: match$1[2][0] - }); - const pp_value = gen_pp_field(match$1[3][0]); - return line$1(sc, Curry._5(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Pbrt.Pp.pp_record_field \"", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: "\" (Pbrt.Pp.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") fmt ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - } - } - } - } - } - } - } - } - }, - _1: "Pbrt.Pp.pp_record_field \"%s\" (Pbrt.Pp.%s %s %s) fmt %s;" - }), rf_label, pp_runtime_function, pp_key, pp_value, var_name)); - case /* Rft_variant_field */4 : - return line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Pbrt.Pp.pp_record_field \"", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: "\" ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " fmt ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - } + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 } } } - }, - _1: "Pbrt.Pp.pp_record_field \"%s\" %s fmt %s;" - }), rf_label, "pp_" + rf_field_type._0.v_name, var_name)); - - } - }), r_fields); - line$1(sc, "Format.pp_close_box fmt ()"); - })); - line$1(sc, "in"); - line$1(sc, "Pbrt.Pp.pp_brk pp_i fmt ()"); - })); + } + } + } + }, + _1: "Pbrt.Pp.pp_record_field \"%s\" %s fmt %s;" + }), rf_label, "pp_" + rf_field_type._0.v_name, var_name)); + + } + }), r_fields); + line$1(sc, "Format.pp_close_box fmt ()"); + })); + line$1(sc, "in"); + line$1(sc, "Pbrt.Pp.pp_brk pp_i fmt ()"); + })); } function gen_pp_variant(and_, param, sc) { @@ -3642,86 +3642,84 @@ function gen_pp_variant(and_, param, sc) { _1: "%s pp_%s fmt (v:%s) =" }), let_decl_of_and(and_), v_name, v_name)); scope(sc, (function (sc) { - line$1(sc, "match v with"); - Stdlib__List.iter((function (param) { - const vc_field_type = param.vc_field_type; - const vc_constructor = param.vc_constructor; - if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { - return line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + line$1(sc, "match v with"); + Stdlib__List.iter((function (param) { + const vc_field_type = param.vc_field_type; + const vc_constructor = param.vc_constructor; + if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { + return line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| ", + _0: " -> Format.fprintf fmt \"", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " -> Format.fprintf fmt \"", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '"' */34, - _1: /* End_of_format */0 - } - } + TAG: /* Char_literal */12, + _0: /* '"' */34, + _1: /* End_of_format */0 } } - }, - _1: "| %s -> Format.fprintf fmt \"%s\"" - }), vc_constructor, vc_constructor)); - } - const field_string_of = gen_pp_field(vc_field_type._0); - line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + } + } + }, + _1: "| %s -> Format.fprintf fmt \"%s\"" + }), vc_constructor, vc_constructor)); + } + const field_string_of = gen_pp_field(vc_field_type._0); + line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| ", + _0: " x -> Format.fprintf fmt \"", _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, _1: { - TAG: /* String_literal */11, - _0: " x -> Format.fprintf fmt \"", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Char_literal */12, + _0: /* '(' */40, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* '%' */37, _1: { - TAG: /* Char_literal */12, - _0: /* '(' */40, + TAG: /* String_literal */11, + _0: "a)", _1: { - TAG: /* Char_literal */12, - _0: /* '%' */37, + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: { TAG: /* String_literal */11, - _0: "a)", + _0: "\" ", _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "\" ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " x", - _1: /* End_of_format */0 - } - } + _0: " x", + _1: /* End_of_format */0 } } } @@ -3731,11 +3729,13 @@ function gen_pp_variant(and_, param, sc) { } } } - }, - _1: "| %s x -> Format.fprintf fmt \"@[%s(%%a)@]\" %s x" - }), vc_constructor, vc_constructor, field_string_of)); - }), v_constructors); - })); + } + } + }, + _1: "| %s x -> Format.fprintf fmt \"@[%s(%%a)@]\" %s x" + }), vc_constructor, vc_constructor, field_string_of)); + }), v_constructors); + })); } function gen_pp_const_variant(and_, param, sc) { @@ -3771,36 +3771,36 @@ function gen_pp_const_variant(and_, param, sc) { _1: "%s pp_%s fmt (v:%s) =" }), let_decl_of_and(and_), cv_name, cv_name)); scope(sc, (function (sc) { - line$1(sc, "match v with"); - Stdlib__List.iter((function (param) { - const name = param[0]; - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + line$1(sc, "match v with"); + Stdlib__List.iter((function (param) { + const name = param[0]; + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| ", + _0: " -> Format.fprintf fmt \"", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " -> Format.fprintf fmt \"", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '"' */34, - _1: /* End_of_format */0 - } - } + TAG: /* Char_literal */12, + _0: /* '"' */34, + _1: /* End_of_format */0 } } - }, - _1: "| %s -> Format.fprintf fmt \"%s\"" - }), name, name)); - }), cv_constructors); - })); + } + } + }, + _1: "| %s -> Format.fprintf fmt \"%s\"" + }), name, name)); + }), cv_constructors); + })); } function gen_struct$1(and_, t, sc) { @@ -4130,13 +4130,13 @@ function string_of_option(f, x) { function reset(g) { return Curry._2(map$1, (function (core) { - return { - core: core, - index: undefined, - lowlink: undefined, - on_stack: false - }; - }), g); + return { + core: core, + index: undefined, + lowlink: undefined, + on_stack: false + }; + }), g); } function strong_connect(g, sccs, stack, index, v) { @@ -4177,64 +4177,64 @@ function strong_connect(g, sccs, stack, index, v) { }; v.on_stack = true; const match = Stdlib__List.fold_left((function (param, id) { - const index = param[2]; - const stack = param[1]; - const sccs = param[0]; - const w = Curry._2(find, id, g); - Curry._2(log({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "[Graph] sub w [", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: "], w.index: ", + const index = param[2]; + const stack = param[1]; + const sccs = param[0]; + const w = Curry._2(find, id, g); + Curry._2(log({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "[Graph] sub w [", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: "], w.index: ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '\n' */10, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* '\n' */10, + _1: /* End_of_format */0 } } } - }, - _1: "[Graph] sub w [%i], w.index: %s\n" - }), w.core.id, string_of_option((function (prim) { - return String(prim); - }), w.index)); - const match = w.index; - if (match !== undefined) { - if (w.on_stack) { - v.lowlink = min_value([ - v.lowlink, - w.index - ]); - } - return [ - sccs, - stack, - index - ]; + } + }, + _1: "[Graph] sub w [%i], w.index: %s\n" + }), w.core.id, string_of_option((function (prim) { + return String(prim); + }), w.index)); + const match = w.index; + if (match !== undefined) { + if (w.on_stack) { + v.lowlink = min_value([ + v.lowlink, + w.index + ]); } - const match$1 = strong_connect(g, sccs, stack, index + 1 | 0, w); - v.lowlink = min_value([ - v.lowlink, - w.lowlink - ]); return [ - match$1[0], - match$1[1], - match$1[2] + sccs, + stack, + index ]; - }), [ + } + const match$1 = strong_connect(g, sccs, stack, index + 1 | 0, w); + v.lowlink = min_value([ + v.lowlink, + w.lowlink + ]); + return [ + match$1[0], + match$1[1], + match$1[2] + ]; + }), [ sccs, stack$1, index @@ -4277,10 +4277,10 @@ function strong_connect(g, sccs, stack, index, v) { }, _1: "[Graph] after sub for v [%i], lowlink: %s, index: %s\n" }), v.core.id, string_of_option((function (prim) { - return String(prim); - }), v.lowlink), string_of_option((function (prim) { - return String(prim); - }), v.index)); + return String(prim); + }), v.lowlink), string_of_option((function (prim) { + return String(prim); + }), v.index)); Curry._1(log({ TAG: /* Format */0, _0: { @@ -4298,8 +4298,8 @@ function strong_connect(g, sccs, stack, index, v) { }, _1: "[Graph] -> stack : %s\n" }), "[" + (Stdlib__String.concat(";", Stdlib__List.map((function (param) { - return String(param.core.id); - }), stack$2)) + "]")); + return String(param.core.id); + }), stack$2)) + "]")); if (!eq_value([ v.lowlink, v.index @@ -4311,41 +4311,41 @@ function strong_connect(g, sccs, stack, index, v) { ]; } const match$1 = Stdlib__List.fold_left((function (param, n) { - const splitted = param[2]; - const stack = param[1]; - const scc = param[0]; - if (splitted) { + const splitted = param[2]; + const stack = param[1]; + const scc = param[0]; + if (splitted) { + return [ + scc, + { + hd: n, + tl: stack + }, + splitted + ]; + } else { + n.on_stack = false; + if (n.core.id === v.core.id) { return [ - scc, { - hd: n, - tl: stack + hd: n.core.id, + tl: scc }, - splitted + stack, + true ]; } else { - n.on_stack = false; - if (n.core.id === v.core.id) { - return [ - { - hd: n.core.id, - tl: scc - }, - stack, - true - ]; - } else { - return [ - { - hd: n.core.id, - tl: scc - }, - stack, - false - ]; - } + return [ + { + hd: n.core.id, + tl: scc + }, + stack, + false + ]; } - }), [ + } + }), [ /* [] */0, /* [] */0, false @@ -4363,20 +4363,20 @@ function strong_connect(g, sccs, stack, index, v) { function tarjan(g) { const g$1 = reset(g); return Curry._3(fold, (function (param, n, param$1) { - const index = param$1[2]; - const stack = param$1[1]; - const sccs = param$1[0]; - const match = n.index; - if (match !== undefined) { - return [ - sccs, - stack, - index - ]; - } else { - return strong_connect(g$1, sccs, stack, index, n); - } - }), g$1, [ + const index = param$1[2]; + const stack = param$1[1]; + const sccs = param$1[0]; + const match = n.index; + if (match !== undefined) { + return [ + sccs, + stack, + index + ]; + } else { + return strong_connect(g$1, sccs, stack, index, n); + } + }), g$1, [ /* [] */0, /* [] */0, 0 @@ -4432,8 +4432,8 @@ function type_id_of_type(param) { function type_of_id(all_types, id) { return Stdlib__List.find((function (t) { - return type_id_of_type(t) === id; - }), all_types); + return type_id_of_type(t) === id; + }), all_types); } function string_of_unresolved(param) { @@ -4594,12 +4594,12 @@ function compile_default_p2(all_types, field) { return invalid_default_value(field_name$1, "field of type message cannot have a default litteral value", undefined); } const default_enum_value$1 = apply_until((function (param) { - const enum_value_name = param.enum_value_name; - if (enum_value_name === default_enum_value) { - return enum_value_name; - } - - }), spec._0.enum_values); + const enum_value_name = param.enum_value_name; + if (enum_value_name === default_enum_value) { + return enum_value_name; + } + + }), spec._0.enum_values); if (default_enum_value$1 !== undefined) { return field_default$1; } else { @@ -4720,11 +4720,11 @@ function type_of_spec(file_name, file_options, id, scope, spec) { function compile_enum_p1(file_name, file_options, scope, param) { const 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 - }; - }), param.enum_values); + return { + enum_value_name: enum_value.enum_value_name, + enum_value_int: enum_value.enum_value_int + }; + }), param.enum_values); return type_of_spec(file_name, file_options, param.enum_id, scope, { TAG: /* Enum */0, _0: { @@ -4746,74 +4746,74 @@ function compile_message_p1(file_name, file_options, message_scope, param) { message_names: sub_scope_message_names }; const match = Stdlib__List.fold_left((function (param, f) { - const all_types = param[2]; - const extensions = param[1]; - const message_body = param[0]; - switch (f.TAG) { - case /* Message_field */0 : - const field = { - TAG: /* Message_field */0, - _0: compile_field_p1(f._0) - }; - return [ - { - hd: field, - tl: message_body - }, - extensions, - all_types - ]; - case /* Message_map_field */1 : - const field$1 = { - TAG: /* Message_map_field */2, - _0: compile_map_p1(f._0) - }; - return [ - { - hd: field$1, - tl: message_body - }, - extensions, - all_types - ]; - case /* Message_oneof_field */2 : - const field$2 = { - TAG: /* Message_oneof_field */1, - _0: compile_oneof_p1(f._0) - }; - return [ - { - hd: field$2, - tl: message_body - }, - extensions, - all_types - ]; - case /* Message_sub */3 : - const all_sub_types = compile_message_p1(file_name, file_options, sub_scope, f._0); - return [ - message_body, - extensions, - Stdlib.$at(all_types, all_sub_types) - ]; - case /* Message_enum */4 : - return [ - message_body, - extensions, - Stdlib.$at(all_types, { - hd: compile_enum_p1(file_name, file_options, sub_scope, f._0), - tl: /* [] */0 - }) - ]; - case /* Message_extension */5 : - return [ - message_body, - Stdlib.$at(extensions, f._0), - all_types - ]; - - } - }), [ + const all_types = param[2]; + const extensions = param[1]; + const message_body = param[0]; + switch (f.TAG) { + case /* Message_field */0 : + const field = { + TAG: /* Message_field */0, + _0: compile_field_p1(f._0) + }; + return [ + { + hd: field, + tl: message_body + }, + extensions, + all_types + ]; + case /* Message_map_field */1 : + const field$1 = { + TAG: /* Message_map_field */2, + _0: compile_map_p1(f._0) + }; + return [ + { + hd: field$1, + tl: message_body + }, + extensions, + all_types + ]; + case /* Message_oneof_field */2 : + const field$2 = { + TAG: /* Message_oneof_field */1, + _0: compile_oneof_p1(f._0) + }; + return [ + { + hd: field$2, + tl: message_body + }, + extensions, + all_types + ]; + case /* Message_sub */3 : + const all_sub_types = compile_message_p1(file_name, file_options, sub_scope, f._0); + return [ + message_body, + extensions, + Stdlib.$at(all_types, all_sub_types) + ]; + case /* Message_enum */4 : + return [ + message_body, + extensions, + Stdlib.$at(all_types, { + hd: compile_enum_p1(file_name, file_options, sub_scope, f._0), + tl: /* [] */0 + }) + ]; + case /* Message_extension */5 : + return [ + message_body, + Stdlib.$at(extensions, f._0), + all_types + ]; + + } + }), [ /* [] */0, /* [] */0, /* [] */0 @@ -4850,16 +4850,16 @@ function compile_message_p1(file_name, file_options, message_scope, param) { } }; Stdlib__List.fold_left((function (number_index, f) { - switch (f.TAG) { - case /* Message_field */0 : - return validate_duplicate(number_index, f._0); - case /* Message_oneof_field */1 : - return Stdlib__List.fold_left(validate_duplicate, number_index, f._0.oneof_fields); - case /* Message_map_field */2 : - return number_index; - - } - }), /* [] */0, message_body); + switch (f.TAG) { + case /* Message_field */0 : + return validate_duplicate(number_index, f._0); + case /* Message_oneof_field */1 : + return Stdlib__List.fold_left(validate_duplicate, number_index, f._0.oneof_fields); + case /* Message_map_field */2 : + return number_index; + + } + }), /* [] */0, message_body); return Stdlib.$at(match[2], { hd: type_of_spec(file_name, file_options, param.id, message_scope, { TAG: /* Message */1, @@ -4877,14 +4877,14 @@ function compile_proto_p1(file_name, param) { const file_options = param.file_options; const scope = scope_of_package(param.package); const pbtt_msgs = Stdlib__List.fold_right((function (e, pbtt_msgs) { - return { - hd: compile_enum_p1(file_name, file_options, scope, e), - tl: pbtt_msgs - }; - }), param.enums, /* [] */0); + return { + hd: compile_enum_p1(file_name, file_options, scope, e), + tl: pbtt_msgs + }; + }), param.enums, /* [] */0); return Stdlib__List.fold_left((function (pbtt_msgs, pbpt_msg) { - return Stdlib.$at(pbtt_msgs, compile_message_p1(file_name, file_options, scope, pbpt_msg)); - }), pbtt_msgs, param.messages); + return Stdlib.$at(pbtt_msgs, compile_message_p1(file_name, file_options, scope, pbpt_msg)); + }), pbtt_msgs, param.messages); } function type_scope_of_type(param) { @@ -4911,10 +4911,10 @@ function type_name_of_type(param) { function find_all_types_in_field_scope(all_types, scope) { return Stdlib__List.filter((function (t) { - const match = type_scope_of_type(t); - const dec_scope = Stdlib.$at(match.packages, match.message_names); - return Caml_obj.caml_equal(dec_scope, scope); - }), all_types); + const match = type_scope_of_type(t); + const 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) { @@ -5035,54 +5035,54 @@ function compile_message_p2(types, param, message) { _1: "[pbtt] message scope: %s\n" }), string_of_string_list(message_scope)); Stdlib__List.iteri((function (i, scope) { - Curry._2(log({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "[pbtt] search_scope[", + Curry._2(log({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "[pbtt] search_scope[", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, _1: { - TAG: /* Int */4, - _0: /* Int_i */3, + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 2 + }, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: "] : ", _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 2 - }, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: "] : ", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '\n' */10, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* '\n' */10, + _1: /* End_of_format */0 } } } - }, - _1: "[pbtt] search_scope[%2i] : %s\n" - }), i, string_of_string_list(scope)); - }), search_scopes$1); + } + }, + _1: "[pbtt] search_scope[%2i] : %s\n" + }), i, string_of_string_list(scope)); + }), search_scopes$1); const id = apply_until((function (scope) { - const types$1 = find_all_types_in_field_scope(types, scope); - try { - const 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){ - const 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); + const types$1 = find_all_types_in_field_scope(types, scope); + try { + const 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){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return; } - }), search_scopes$1); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), search_scopes$1); if (id !== undefined) { return { TAG: /* Field_type_type */0, @@ -5103,87 +5103,87 @@ function compile_message_p2(types, param, message) { } }; const message_body = Stdlib__List.fold_left((function (message_body, field) { - switch (field.TAG) { - case /* Message_field */0 : - const field$1 = field._0; - const field_name$1 = field_name(field$1); - const field_type$1 = field_type(field$1); - const field_field_parsed = field$1.field_parsed; - const field_field_type = compile_field_p2(field_name$1, field_type$1); - const field_field_default = field$1.field_default; - const field_field_options = field$1.field_options; - const field$2 = { - field_parsed: field_field_parsed, - field_type: field_field_type, - field_default: field_field_default, - field_options: field_field_options - }; - const field_field_parsed$1 = field_field_parsed; - const field_field_type$1 = field_field_type; - const field_field_default$1 = compile_default_p2(types, field$2); - const field_field_options$1 = field_field_options; - const field$3 = { - field_parsed: field_field_parsed$1, - field_type: field_field_type$1, - field_default: field_field_default$1, - field_options: field_field_options$1 - }; - return { - hd: { - TAG: /* Message_field */0, - _0: field$3 - }, - tl: message_body - }; - case /* Message_oneof_field */1 : - const oneof = field._0; - const oneof_fields = Stdlib__List.fold_left((function (oneof_fields, field) { - const field_name$2 = field_name(field); - const field_type$2 = field_type(field); - const field_type$3 = compile_field_p2(field_name$2, field_type$2); - return { - hd: { - field_parsed: field.field_parsed, - field_type: field_type$3, - field_default: field.field_default, - field_options: field.field_options - }, - tl: oneof_fields - }; - }), /* [] */0, oneof.oneof_fields); - const oneof_fields$1 = Stdlib__List.rev(oneof_fields); - return { - hd: { - TAG: /* Message_oneof_field */1, - _0: { - oneof_name: oneof.oneof_name, - oneof_fields: oneof_fields$1 - } - }, - tl: message_body - }; - case /* Message_map_field */2 : - const map = field._0; - const map_name = map.map_name; - const map_key_type = compile_field_p2(map_name, map.map_key_type); - const map_value_type = compile_field_p2(map_name, map.map_value_type); - const resolved_map = { - TAG: /* Message_map_field */2, + switch (field.TAG) { + case /* Message_field */0 : + const field$1 = field._0; + const field_name$1 = field_name(field$1); + const field_type$1 = field_type(field$1); + const field_field_parsed = field$1.field_parsed; + const field_field_type = compile_field_p2(field_name$1, field_type$1); + const field_field_default = field$1.field_default; + const field_field_options = field$1.field_options; + const field$2 = { + field_parsed: field_field_parsed, + field_type: field_field_type, + field_default: field_field_default, + field_options: field_field_options + }; + const field_field_parsed$1 = field_field_parsed; + const field_field_type$1 = field_field_type; + const field_field_default$1 = compile_default_p2(types, field$2); + const field_field_options$1 = field_field_options; + const field$3 = { + field_parsed: field_field_parsed$1, + field_type: field_field_type$1, + field_default: field_field_default$1, + field_options: field_field_options$1 + }; + return { + hd: { + TAG: /* Message_field */0, + _0: field$3 + }, + tl: message_body + }; + case /* Message_oneof_field */1 : + const oneof = field._0; + const oneof_fields = Stdlib__List.fold_left((function (oneof_fields, field) { + const field_name$2 = field_name(field); + const field_type$2 = field_type(field); + const field_type$3 = compile_field_p2(field_name$2, field_type$2); + return { + hd: { + field_parsed: field.field_parsed, + field_type: field_type$3, + field_default: field.field_default, + field_options: field.field_options + }, + tl: oneof_fields + }; + }), /* [] */0, oneof.oneof_fields); + const oneof_fields$1 = Stdlib__List.rev(oneof_fields); + return { + hd: { + TAG: /* Message_oneof_field */1, _0: { - map_name: map_name, - map_number: map.map_number, - map_key_type: map_key_type, - map_value_type: map_value_type, - map_options: map.map_options + oneof_name: oneof.oneof_name, + oneof_fields: oneof_fields$1 } - }; - return { - hd: resolved_map, - tl: message_body - }; - - } - }), /* [] */0, message.message_body); + }, + tl: message_body + }; + case /* Message_map_field */2 : + const map = field._0; + const map_name = map.map_name; + const map_key_type = compile_field_p2(map_name, map.map_key_type); + const map_value_type = compile_field_p2(map_name, map.map_value_type); + const resolved_map = { + TAG: /* Message_map_field */2, + _0: { + map_name: map_name, + map_number: map.map_number, + map_key_type: map_key_type, + map_value_type: map_value_type, + map_options: map.map_options + } + }; + return { + hd: resolved_map, + tl: message_body + }; + + } + }), /* [] */0, message.message_body); const message_body$1 = Stdlib__List.rev(message_body); return { extensions: message.extensions, @@ -5202,42 +5202,42 @@ function node_of_proto_type(param) { }; } const sub = Stdlib__List.flatten(Stdlib__List.map((function (param) { - switch (param.TAG) { - case /* Message_field */0 : - const field_type = param._0.field_type; - if (/* tag */typeof field_type === "number" || typeof field_type === "string") { - return /* [] */0; - } else { - return { - hd: field_type._0, - tl: /* [] */0 - }; - } - case /* Message_oneof_field */1 : - return Stdlib__List.flatten(Stdlib__List.map((function (param) { - const field_type = param.field_type; - if (/* tag */typeof field_type === "number" || typeof field_type === "string") { - return /* [] */0; - } else { - return { - hd: field_type._0, - tl: /* [] */0 - }; - } - }), param._0.oneof_fields)); - case /* Message_map_field */2 : - const map_value_type = param._0.map_value_type; - if (/* tag */typeof map_value_type === "number" || typeof map_value_type === "string") { - return /* [] */0; - } else { - return { - hd: map_value_type._0, - tl: /* [] */0 - }; - } - - } - }), match._0.message_body)); + switch (param.TAG) { + case /* Message_field */0 : + const field_type = param._0.field_type; + if (/* tag */typeof field_type === "number" || typeof field_type === "string") { + return /* [] */0; + } else { + return { + hd: field_type._0, + tl: /* [] */0 + }; + } + case /* Message_oneof_field */1 : + return Stdlib__List.flatten(Stdlib__List.map((function (param) { + const field_type = param.field_type; + if (/* tag */typeof field_type === "number" || typeof field_type === "string") { + return /* [] */0; + } else { + return { + hd: field_type._0, + tl: /* [] */0 + }; + } + }), param._0.oneof_fields)); + case /* Message_map_field */2 : + const map_value_type = param._0.map_value_type; + if (/* tag */typeof map_value_type === "number" || typeof map_value_type === "string") { + return /* [] */0; + } else { + return { + hd: map_value_type._0, + tl: /* [] */0 + }; + } + + } + }), match._0.message_body)); return { id: id, sub: sub @@ -5247,16 +5247,16 @@ function node_of_proto_type(param) { function group(proto) { const g = Stdlib__List.map(node_of_proto_type, proto); const g$1 = Stdlib__List.fold_left((function (m, n) { - return Curry._3(add, n.id, n, m); - }), empty_graph, g); + return Curry._3(add, n.id, n, m); + }), empty_graph, g); const sccs = tarjan(g$1); return Stdlib__List.map((function (l) { - return Stdlib__List.map((function (id) { - return Stdlib__List.find((function (param) { - return id === param.id; - }), proto); - }), l); - }), sccs); + return Stdlib__List.map((function (id) { + return Stdlib__List.find((function (param) { + return id === param.id; + }), proto); + }), l); + }), sccs); } function type_decl_of_and(param) { @@ -5319,37 +5319,37 @@ function gen_type_record(mutable_, and_, param, sc) { _1: "%s %s = {" }), type_decl_of_and(and_), r_name$1)); scope(sc, (function (sc) { - Stdlib__List.iter((function (param) { - const rf_field_type = param.rf_field_type; - const prefix = field_prefix(rf_field_type, param.rf_mutable); - const type_string = string_of_record_field_type(rf_field_type); - line$1(sc, Curry._3(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, + Stdlib__List.iter((function (param) { + const rf_field_type = param.rf_field_type; + const prefix = field_prefix(rf_field_type, param.rf_mutable); + const type_string = string_of_record_field_type(rf_field_type); + line$1(sc, Curry._3(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " : ", _1: { TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " : ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 } } - }, - _1: "%s%s : %s;" - }), prefix, param.rf_label, type_string)); - }), r_fields); - })); + } + } + }, + _1: "%s%s : %s;" + }), prefix, param.rf_label, type_string)); + }), r_fields); + })); line$1(sc, "}"); } @@ -5377,48 +5377,48 @@ function gen_type_variant(and_, variant, sc) { _1: "%s %s =" }), type_decl_of_and(and_), variant.v_name)); scope(sc, (function (sc) { - Stdlib__List.iter((function (param) { - const vc_field_type = param.vc_field_type; - const vc_constructor = param.vc_constructor; - if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { - return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "| %s" - }), vc_constructor)); - } - const type_string = string_of_field_type(vc_field_type._0); - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + Stdlib__List.iter((function (param) { + const vc_field_type = param.vc_field_type; + const vc_constructor = param.vc_constructor; + if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { + return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "| %s" + }), vc_constructor)); + } + const type_string = string_of_field_type(vc_field_type._0); + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| ", + _0: " of ", _1: { TAG: /* String */2, _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " of ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - } + _1: /* End_of_format */0 } - }, - _1: "| %s of %s" - }), vc_constructor, type_string)); - }), v_constructors); - })); + } + } + }, + _1: "| %s of %s" + }), vc_constructor, type_string)); + }), v_constructors); + })); } function gen_type_const_variant(and_, param, sc) { @@ -5445,26 +5445,26 @@ function gen_type_const_variant(and_, param, sc) { _1: "%s %s =" }), type_decl_of_and(and_), param.cv_name)); scope(sc, (function (sc) { - Stdlib__List.iter((function (param) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } - } - }, - _1: "| %s " - }), param[0])); - }), cv_constructors); - })); + Stdlib__List.iter((function (param) { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + } + } + }, + _1: "| %s " + }), param[0])); + }), cv_constructors); + })); } function gen_struct$2(and_, t, scope) { @@ -5690,106 +5690,132 @@ function gen_encode_record(and_, param, sc) { _1: "%s encode_%s (v:%s) encoder = " }), let_decl_of_and(and_), r_name, r_name)); scope(sc, (function (sc) { - Stdlib__List.iter((function (record_field) { - const rf_field_type = record_field.rf_field_type; - const rf_label = record_field.rf_label; - switch (rf_field_type.TAG) { - case /* Rft_required */0 : - const match = rf_field_type._0; - const var_name = Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, + Stdlib__List.iter((function (record_field) { + const rf_field_type = record_field.rf_field_type; + const rf_label = record_field.rf_label; + switch (rf_field_type.TAG) { + case /* Rft_required */0 : + const match = rf_field_type._0; + const var_name = Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "v.%s" + }), 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 : + const match$1 = rf_field_type._0; + const pk = match$1[2]; + const encoding_number = match$1[1]; + const field_type = match$1[0]; + line$1(sc, "("); + scope(sc, (function (sc) { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "match v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " with ", + _1: /* End_of_format */0 + } + } + }, + _1: "match v.%s with " + }), rf_label)); + line$1(sc, Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| Some x -> (", _1: /* End_of_format */0 - } - }, - _1: "v.%s" - }), 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 : - const match$1 = rf_field_type._0; - const pk = match$1[2]; - const encoding_number = match$1[1]; - const field_type = match$1[0]; - line$1(sc, "("); + }, + _1: "| Some x -> (" + })); + scope(sc, (function (sc) { + gen_encode_field_type(Caml_option.some(undefined), sc, "x", encoding_number, pk, false, field_type); + })); + line$1(sc, ")"); + line$1(sc, "| None -> ();"); + })); + return line$1(sc, ");"); + case /* Rft_repeated_field */2 : + const match$2 = rf_field_type._0; + const is_packed = match$2[4]; + const pk$1 = match$2[3]; + const encoding_number$1 = match$2[2]; + const field_type$1 = match$2[1]; + if (match$2[0] === /* Rt_list */0) { + if (is_packed) { + gen_encode_field_key(sc, encoding_number$1, pk$1, is_packed); + line$1(sc, "Pbrt.Encoder.nested (fun encoder ->"); scope(sc, (function (sc) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "match v.", + line$1(sc, "List.iter (fun x -> "); + scope(sc, (function (sc) { + gen_encode_field_type(undefined, sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); + })); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: ") v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " with ", - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 } - }, - _1: "match v.%s with " - }), rf_label)); - line$1(sc, Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| Some x -> (", + } + }, + _1: ") v.%s;" + }), rf_label)); + })); + return line$1(sc, ") encoder;"); + } else { + line$1(sc, "List.iter (fun x -> "); + scope(sc, (function (sc) { + gen_encode_field_type(Caml_option.some(undefined), sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); + })); + return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: ") v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, _1: /* End_of_format */0 - }, - _1: "| Some x -> (" - })); - scope(sc, (function (sc) { - gen_encode_field_type(Caml_option.some(undefined), sc, "x", encoding_number, pk, false, field_type); - })); - line$1(sc, ")"); - line$1(sc, "| None -> ();"); - })); - return line$1(sc, ");"); - case /* Rft_repeated_field */2 : - const match$2 = rf_field_type._0; - const is_packed = match$2[4]; - const pk$1 = match$2[3]; - const encoding_number$1 = match$2[2]; - const field_type$1 = match$2[1]; - if (match$2[0] === /* Rt_list */0) { - if (is_packed) { - gen_encode_field_key(sc, encoding_number$1, pk$1, is_packed); - line$1(sc, "Pbrt.Encoder.nested (fun encoder ->"); - scope(sc, (function (sc) { - line$1(sc, "List.iter (fun x -> "); - scope(sc, (function (sc) { - gen_encode_field_type(undefined, sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); - })); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: ") v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - }, - _1: ") v.%s;" - }), rf_label)); - })); - return line$1(sc, ") encoder;"); - } else { - line$1(sc, "List.iter (fun x -> "); + } + } + }, + _1: ") v.%s;" + }), rf_label)); + } + } else if (is_packed) { + gen_encode_field_key(sc, encoding_number$1, pk$1, is_packed); + line$1(sc, "Pbrt.Encoder.nested (fun encoder ->"); + scope(sc, (function (sc) { + line$1(sc, "Pbrt.Repeated_field.iter (fun x -> "); scope(sc, (function (sc) { - gen_encode_field_type(Caml_option.some(undefined), sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); - })); - return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + gen_encode_field_type(undefined, sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); + })); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, @@ -5806,218 +5832,192 @@ function gen_encode_record(and_, param, sc) { }, _1: ") v.%s;" }), rf_label)); - } - } else if (is_packed) { - gen_encode_field_key(sc, encoding_number$1, pk$1, is_packed); - line$1(sc, "Pbrt.Encoder.nested (fun encoder ->"); - scope(sc, (function (sc) { - line$1(sc, "Pbrt.Repeated_field.iter (fun x -> "); - scope(sc, (function (sc) { - gen_encode_field_type(undefined, sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); - })); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + })); + return line$1(sc, ") encoder;"); + } else { + line$1(sc, "Pbrt.Repeated_field.iter (fun x -> "); + scope(sc, (function (sc) { + gen_encode_field_type(Caml_option.some(undefined), sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); + })); + return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: ") v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + }, + _1: ") v.%s;" + }), rf_label)); + } + case /* Rft_associative_field */3 : + const match$3 = rf_field_type._0; + const match$4 = match$3[3]; + const value_pk = match$4[1]; + const value_type = match$4[0]; + const match$5 = match$3[2]; + const key_pk = match$5[1]; + const encoding_number$2 = match$3[1]; + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let encode_key = ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " in", + _1: /* End_of_format */0 + } + } + }, + _1: "let encode_key = %s in" + }), encode_basic_type(match$5[0], key_pk))); + line$1(sc, "let encode_value = (fun x encoder ->"); + scope(sc, (function (sc) { + gen_encode_field_type(undefined, sc, "x", -1, value_pk, false, value_type); + })); + line$1(sc, ") in"); + if (match$3[0] === /* At_list */0) { + line$1(sc, "List.iter (fun (k, v) ->"); + } else { + line$1(sc, "Hashtbl.iter (fun k v ->"); + } + scope(sc, (function (sc) { + gen_encode_field_key(sc, encoding_number$2, /* Pk_bytes */2, false); + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "let map_entry = (k, Pbrt.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "), (v, Pbrt.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: ") v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - }, - _1: ") v.%s;" - }), rf_label)); - })); - return line$1(sc, ") encoder;"); - } else { - line$1(sc, "Pbrt.Repeated_field.iter (fun x -> "); - scope(sc, (function (sc) { - gen_encode_field_type(Caml_option.some(undefined), sc, "x", encoding_number$1, pk$1, is_packed, field_type$1); - })); - return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + _0: ") in", + _1: /* End_of_format */0 + } + } + } + } + }, + _1: "let map_entry = (k, Pbrt.%s), (v, Pbrt.%s) in" + }), string_of_payload_kind(Caml_option.some(undefined), key_pk, false), string_of_payload_kind(Caml_option.some(undefined), value_pk, false))); + line$1(sc, "Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder"); + })); + return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: ") v.", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + }, + _1: ") v.%s;" + }), rf_label)); + case /* Rft_variant_field */4 : + const v_constructors = rf_field_type._0.v_constructors; + line$1(sc, "("); + scope(sc, (function (sc) { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: ") v.", + _0: "match v.", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, + TAG: /* String_literal */11, + _0: " with", _1: /* End_of_format */0 } } }, - _1: ") v.%s;" + _1: "match v.%s with" }), rf_label)); - } - case /* Rft_associative_field */3 : - const match$3 = rf_field_type._0; - const match$4 = match$3[3]; - const value_pk = match$4[1]; - const value_type = match$4[0]; - const match$5 = match$3[2]; - const key_pk = match$5[1]; - const encoding_number$2 = match$3[1]; - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "let encode_key = ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " in", - _1: /* End_of_format */0 - } - } - }, - _1: "let encode_key = %s in" - }), encode_basic_type(match$5[0], key_pk))); - line$1(sc, "let encode_value = (fun x encoder ->"); - scope(sc, (function (sc) { - gen_encode_field_type(undefined, sc, "x", -1, value_pk, false, value_type); - })); - line$1(sc, ") in"); - if (match$3[0] === /* At_list */0) { - line$1(sc, "List.iter (fun (k, v) ->"); - } else { - line$1(sc, "Hashtbl.iter (fun k v ->"); - } - scope(sc, (function (sc) { - gen_encode_field_key(sc, encoding_number$2, /* Pk_bytes */2, false); - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "let map_entry = (k, Pbrt.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, + Stdlib__List.iter((function (param) { + const vc_payload_kind = param.vc_payload_kind; + const vc_encoding_number = param.vc_encoding_number; + const vc_field_type = param.vc_field_type; + const vc_constructor = param.vc_constructor; + if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", _1: { - TAG: /* String_literal */11, - _0: "), (v, Pbrt.", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") in", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " -> (", + _1: /* End_of_format */0 } } - } - }, - _1: "let map_entry = (k, Pbrt.%s), (v, Pbrt.%s) in" - }), string_of_payload_kind(Caml_option.some(undefined), key_pk, false), string_of_payload_kind(Caml_option.some(undefined), value_pk, false))); - line$1(sc, "Pbrt.Encoder.map_entry ~encode_key ~encode_value map_entry encoder"); - })); - return line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: ") v.", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } - }, - _1: ") v.%s;" - }), rf_label)); - case /* Rft_variant_field */4 : - const v_constructors = rf_field_type._0.v_constructors; - line$1(sc, "("); - scope(sc, (function (sc) { + }, + _1: "| %s -> (" + }), vc_constructor)); + scope(sc, (function (sc) { + gen_encode_field_key(sc, vc_encoding_number, vc_payload_kind, false); + line$1(sc, "Pbrt.Encoder.empty_nested encoder"); + })); + return line$1(sc, ")"); + } + const field_type = vc_field_type._0; line$1(sc, Curry._1(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "match v.", + _0: "| ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " with", + _0: " x -> (", _1: /* End_of_format */0 } } }, - _1: "match v.%s with" - }), rf_label)); - Stdlib__List.iter((function (param) { - const vc_payload_kind = param.vc_payload_kind; - const vc_encoding_number = param.vc_encoding_number; - const vc_field_type = param.vc_field_type; - const vc_constructor = param.vc_constructor; - if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " -> (", - _1: /* End_of_format */0 - } - } - }, - _1: "| %s -> (" - }), vc_constructor)); - scope(sc, (function (sc) { - gen_encode_field_key(sc, vc_encoding_number, vc_payload_kind, false); - line$1(sc, "Pbrt.Encoder.empty_nested encoder"); - })); - return line$1(sc, ")"); - } - const field_type = vc_field_type._0; - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " x -> (", - _1: /* End_of_format */0 - } - } - }, - _1: "| %s x -> (" - }), vc_constructor)); - scope(sc, (function (sc) { - gen_encode_field_type(Caml_option.some(undefined), sc, "x", vc_encoding_number, vc_payload_kind, false, field_type); - })); - line$1(sc, ")"); - }), v_constructors); - })); - return line$1(sc, ");"); - - } - }), r_fields); - line$1(sc, "()"); - })); + _1: "| %s x -> (" + }), vc_constructor)); + scope(sc, (function (sc) { + gen_encode_field_type(Caml_option.some(undefined), sc, "x", vc_encoding_number, vc_payload_kind, false, field_type); + })); + line$1(sc, ")"); + }), v_constructors); + })); + return line$1(sc, ");"); + + } + }), r_fields); + line$1(sc, "()"); + })); } function gen_encode_variant(and_, variant, sc) { @@ -6053,60 +6053,60 @@ function gen_encode_variant(and_, variant, sc) { _1: "%s encode_%s (v:%s) encoder = " }), let_decl_of_and(and_), v_name, v_name)); scope(sc, (function (sc) { - line$1(sc, "match v with"); - Stdlib__List.iter((function (param) { - const vc_payload_kind = param.vc_payload_kind; - const vc_encoding_number = param.vc_encoding_number; - const vc_field_type = param.vc_field_type; - const vc_constructor = param.vc_constructor; - if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " -> (", - _1: /* End_of_format */0 - } - } - }, - _1: "| %s -> (" - }), vc_constructor)); - scope(sc, (function (sc) { - gen_encode_field_key(sc, vc_encoding_number, vc_payload_kind, false); - line$1(sc, "Pbrt.Encoder.empty_nested encoder"); - })); - return line$1(sc, ")"); - } - const field_type = vc_field_type._0; - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "| ", + line$1(sc, "match v with"); + Stdlib__List.iter((function (param) { + const vc_payload_kind = param.vc_payload_kind; + const vc_encoding_number = param.vc_encoding_number; + const vc_field_type = param.vc_field_type; + const vc_constructor = param.vc_constructor; + if (/* tag */typeof vc_field_type === "number" || typeof vc_field_type === "string") { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " x -> (", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " -> (", + _1: /* End_of_format */0 } - }, - _1: "| %s x -> (" - }), vc_constructor)); - scope(sc, (function (sc) { - gen_encode_field_type(Caml_option.some(undefined), sc, "x", vc_encoding_number, vc_payload_kind, false, field_type); - })); - line$1(sc, ")"); - }), v_constructors); - })); + } + }, + _1: "| %s -> (" + }), vc_constructor)); + scope(sc, (function (sc) { + gen_encode_field_key(sc, vc_encoding_number, vc_payload_kind, false); + line$1(sc, "Pbrt.Encoder.empty_nested encoder"); + })); + return line$1(sc, ")"); + } + const field_type = vc_field_type._0; + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " x -> (", + _1: /* End_of_format */0 + } + } + }, + _1: "| %s x -> (" + }), vc_constructor)); + scope(sc, (function (sc) { + gen_encode_field_type(Caml_option.some(undefined), sc, "x", vc_encoding_number, vc_payload_kind, false, field_type); + })); + line$1(sc, ")"); + }), v_constructors); + })); } function gen_encode_const_variant(and_, param, sc) { @@ -6142,65 +6142,65 @@ function gen_encode_const_variant(and_, param, sc) { _1: "%s encode_%s (v:%s) encoder =" }), let_decl_of_and(and_), cv_name, cv_name)); scope(sc, (function (sc) { - line$1(sc, "match v with"); - Stdlib__List.iter((function (param) { - const value = param[1]; - const name = param[0]; - line$1(sc, value > 0 ? Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + line$1(sc, "match v with"); + Stdlib__List.iter((function (param) { + const value = param[1]; + const name = param[0]; + line$1(sc, value > 0 ? Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| ", + _0: " -> Pbrt.Encoder.int_as_varint ", _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* String_literal */11, - _0: " -> Pbrt.Encoder.int_as_varint ", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " encoder", - _1: /* End_of_format */0 - } - } + _0: " encoder", + _1: /* End_of_format */0 } } - }, - _1: "| %s -> Pbrt.Encoder.int_as_varint %i encoder" - }), name, value) : Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + } + } + }, + _1: "| %s -> Pbrt.Encoder.int_as_varint %i encoder" + }), name, value) : Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "| ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "| ", + _0: " -> Pbrt.Encoder.int_as_varint (", _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* String_literal */11, - _0: " -> Pbrt.Encoder.int_as_varint (", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: ") encoder", - _1: /* End_of_format */0 - } - } + _0: ") encoder", + _1: /* End_of_format */0 } } - }, - _1: "| %s -> Pbrt.Encoder.int_as_varint (%i) encoder" - }), name, value)); - }), cv_constructors); - })); + } + } + }, + _1: "| %s -> Pbrt.Encoder.int_as_varint (%i) encoder" + }), name, value)); + }), cv_constructors); + })); } function gen_struct$3(and_, t, sc) { @@ -6592,30 +6592,30 @@ function gen_default_record(mutable_, and_, param, sc) { _1: "%s default_%s () : %s = {" }), let_decl_of_and(and_), rn, rn)); scope(sc, (function (sc) { - Stdlib__List.iter((function (param) { - line$1(sc, Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { + Stdlib__List.iter((function (param) { + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " = ", + _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " = ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 } - }, - _1: "%s = %s;" - }), param[0], param[1])); - }), fields_default_info); - })); + } + } + }, + _1: "%s = %s;" + }), param[0], param[1])); + }), fields_default_info); + })); } else { line$1(sc, Curry._2(Stdlib__Printf.sprintf({ TAG: /* Format */0, @@ -6639,85 +6639,85 @@ function gen_default_record(mutable_, and_, param, sc) { _1: "%s default_%s " }), let_decl_of_and(and_), r_name)); scope(sc, (function (sc) { - Stdlib__List.iter((function (param) { - const fname = param[0]; - line$1(sc, Curry._4(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* '?' */63, + Stdlib__List.iter((function (param) { + const fname = param[0]; + line$1(sc, Curry._4(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* '?' */63, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: ":((", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: ":((", + TAG: /* Char_literal */12, + _0: /* ':' */58, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* Char_literal */12, - _0: /* ':' */58, + TAG: /* String_literal */11, + _0: ") = ", _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: ") = ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ')' */41, - _1: /* End_of_format */0 - } - } + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ')' */41, + _1: /* End_of_format */0 } } } } } } - }, - _1: "?%s:((%s:%s) = %s)" - }), fname, fname, param[2], param[1])); - }), fields_default_info); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "() : ", + } + } + }, + _1: "?%s:((%s:%s) = %s)" + }), fname, fname, param[2], param[1])); + }), fields_default_info); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "() : ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " = {", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " = {", + _1: /* End_of_format */0 } - }, - _1: "() : %s = {" - }), r_name)); - })); + } + }, + _1: "() : %s = {" + }), r_name)); + })); scope(sc, (function (sc) { - Stdlib__List.iter((function (param) { - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - }, - _1: "%s;" - }), param[0])); - }), fields_default_info); - })); + Stdlib__List.iter((function (param) { + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } + }, + _1: "%s;" + }), param[0])); + }), fields_default_info); + })); } line$1(sc, "}"); } @@ -6918,36 +6918,36 @@ function gen_sig_record(sc, param) { }), r_name)); const 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({ - TAG: /* Format */0, - _0: { + Stdlib__List.iter((function (param) { + line$1(sc, Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* '?' */63, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* Char_literal */12, - _0: /* '?' */63, + _0: /* ':' */58, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* Char_literal */12, - _0: /* ':' */58, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " ->", - _1: /* End_of_format */0 - } - } + TAG: /* String_literal */11, + _0: " ->", + _1: /* End_of_format */0 } } - }, - _1: "?%s:%s ->" - }), param[0], param[2])); - }), fields_default_info); - line$1(sc, "unit ->"); - line$1(sc, r_name); - })); + } + } + }, + _1: "?%s:%s ->" + }), param[0], param[2])); + }), fields_default_info); + line$1(sc, "unit ->"); + line$1(sc, r_name); + })); line$1(sc, Curry._2(Stdlib__Printf.sprintf({ TAG: /* Format */0, _0: { @@ -7075,30 +7075,30 @@ function rev_split_by_naming_convention(s) { } }; const match = string_fold_lefti((function (param, i, c) { - const start_i = param[1]; - const l = param[0]; - if (c !== 95) { - if (param[2] || !is_uppercase(c)) { - return [ - l, - start_i, - is_uppercase(c) - ]; - } else { - return [ - add_sub_string(start_i, i, l), - i, - true - ]; - } + const start_i = param[1]; + const l = param[0]; + if (c !== 95) { + if (param[2] || !is_uppercase(c)) { + return [ + l, + start_i, + is_uppercase(c) + ]; } else { return [ add_sub_string(start_i, i, l), - i + 1 | 0, - false + i, + true ]; } - }), [ + } else { + return [ + add_sub_string(start_i, i, l), + i + 1 | 0, + false + ]; + } + }), [ /* [] */0, 0, false @@ -7210,8 +7210,8 @@ function type_name(message_scope, name) { tl: /* [] */0 }); const 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); + return Stdlib__List.map(Stdlib__String.lowercase_ascii, Stdlib__List.rev(rev_split_by_naming_convention(s))); + }), all_names); const all_names$2 = Stdlib__List.flatten(all_names$1); if (all_names$2) { if (all_names$2.tl) { @@ -7441,22 +7441,22 @@ function ocaml_container(field_options) { function variant_of_oneof(include_oneof_name, outer_message_names, all_types, file_options, file_name, oneof_field) { const v_constructors = Stdlib__List.map((function (field) { - const pbtt_field_type = field_type(field); - const field_type$1 = compile_field_type(field_name(field), all_types, file_options, field_options(field), file_name, pbtt_field_type); - const match = encoding_of_field(all_types, field); - const vc_constructor = constructor_name(field_name(field)); - let tmp; - tmp = /* tag */typeof field_type$1 === "number" || typeof field_type$1 === "string" ? /* Vct_nullary */0 : ({ - TAG: /* Vct_non_nullary_constructor */0, - _0: field_type$1 - }); - return { - vc_constructor: vc_constructor, - vc_field_type: tmp, - vc_encoding_number: match[1], - vc_payload_kind: match[0] - }; - }), oneof_field.oneof_fields); + const pbtt_field_type = field_type(field); + const field_type$1 = compile_field_type(field_name(field), all_types, file_options, field_options(field), file_name, pbtt_field_type); + const match = encoding_of_field(all_types, field); + const vc_constructor = constructor_name(field_name(field)); + let tmp; + tmp = /* tag */typeof field_type$1 === "number" || typeof field_type$1 === "string" ? /* Vct_nullary */0 : ({ + TAG: /* Vct_non_nullary_constructor */0, + _0: field_type$1 + }); + return { + vc_constructor: vc_constructor, + vc_field_type: tmp, + vc_encoding_number: match[1], + vc_payload_kind: match[0] + }; + }), oneof_field.oneof_fields); const 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, @@ -7467,11 +7467,11 @@ function variant_of_oneof(include_oneof_name, outer_message_names, all_types, fi function compile_enum(file_name, scope, param) { const module_ = module_of_file_name(file_name); const cv_constructors = Stdlib__List.map((function (param) { - return [ - constructor_name(param.enum_value_name), - param.enum_value_int - ]; - }), param.enum_values); + return [ + constructor_name(param.enum_value_name), + param.enum_value_int + ]; + }), param.enum_values); return { module_: module_, spec: { @@ -7515,348 +7515,348 @@ function compile(proto_definition) { } const all_pbtt_msgs = compile_proto_p1("tmp.proto", proto); const all_pbtt_msgs$1 = Stdlib__List.map((function (param) { - const m = param.spec; - const file_options = param.file_options; - const file_name = param.file_name; - const id = param.id; - const scope = param.scope; - if (m.TAG === /* Enum */0) { - return { - scope: scope, - id: id, - file_name: file_name, - file_options: file_options, - spec: m - }; - } else { - return { - scope: scope, - id: id, - file_name: file_name, - file_options: file_options, - spec: { - TAG: /* Message */1, - _0: compile_message_p2(all_pbtt_msgs, scope, m._0) - } - }; - } - }), all_pbtt_msgs); + const m = param.spec; + const file_options = param.file_options; + const file_name = param.file_name; + const id = param.id; + const scope = param.scope; + if (m.TAG === /* Enum */0) { + return { + scope: scope, + id: id, + file_name: file_name, + file_options: file_options, + spec: m + }; + } else { + return { + scope: scope, + id: id, + file_name: file_name, + file_options: file_options, + spec: { + TAG: /* Message */1, + _0: compile_message_p2(all_pbtt_msgs, scope, m._0) + } + }; + } + }), all_pbtt_msgs); const grouped_pbtt_msgs = Stdlib__List.rev(group(all_pbtt_msgs$1)); const grouped_ocaml_types = Stdlib__List.map((function (pbtt_msgs) { - return Stdlib__List.map((function (pbtt_msg) { - const m = pbtt_msg.spec; - const file_name = pbtt_msg.file_name; - const scope = pbtt_msg.scope; - if (m.TAG === /* Enum */0) { - return { - hd: compile_enum(file_name, scope, m._0), - tl: /* [] */0 - }; - } else { - let file_options = pbtt_msg.file_options; - let message = m._0; - const module_ = module_of_file_name(file_name); - const message_names = scope.message_names; - const message_body = message.message_body; - const message_name = message.message_name; - if (!message_body) { - return /* [] */0; - } - const f = message_body.hd; - switch (f.TAG) { - case /* Message_oneof_field */1 : - if (!message_body.tl) { + return Stdlib__List.map((function (pbtt_msg) { + const m = pbtt_msg.spec; + const file_name = pbtt_msg.file_name; + const scope = pbtt_msg.scope; + if (m.TAG === /* Enum */0) { + return { + hd: compile_enum(file_name, scope, m._0), + tl: /* [] */0 + }; + } else { + let file_options = pbtt_msg.file_options; + let message = m._0; + const module_ = module_of_file_name(file_name); + const message_names = scope.message_names; + const message_body = message.message_body; + const message_name = message.message_name; + if (!message_body) { + return /* [] */0; + } + const f = message_body.hd; + switch (f.TAG) { + case /* Message_oneof_field */1 : + if (!message_body.tl) { + const outer_message_names = Stdlib.$at(message_names, { + hd: message_name, + tl: /* [] */0 + }); + const variant = variant_of_oneof(undefined, outer_message_names, all_pbtt_msgs$1, file_options, file_name, f._0); + return { + hd: { + module_: module_, + spec: { + TAG: /* Variant */1, + _0: variant + } + }, + tl: /* [] */0 + }; + } + break; + case /* Message_field */0 : + case /* Message_map_field */2 : + break; + + } + const match = Stdlib__List.fold_left((function (param, field) { + const fields = param[1]; + const variants = param[0]; + switch (field.TAG) { + case /* Message_field */0 : + const field$1 = field._0; + const match = encoding_of_field(all_pbtt_msgs$1, field$1); + const encoding_number = match[1]; + const pk = match[0]; + const field_name$1 = field_name(field$1); + const field_options$1 = field_options(field$1); + const field_type$1 = compile_field_type(field_name$1, all_pbtt_msgs$1, file_options, field_options$1, file_name, field_type(field$1)); + const field_default$1 = field_default(field$1); + const mutable_ = is_mutable(field_name$1, field_options$1); + const match$1 = field_label(field$1); + let record_field_type; + if (match$1 === "Optional") { + record_field_type = { + TAG: /* Rft_optional */1, + _0: [ + field_type$1, + encoding_number, + pk, + field_default$1 + ] + }; + } else if (match$1 === "Required") { + record_field_type = { + TAG: /* Rft_required */0, + _0: [ + field_type$1, + encoding_number, + pk, + field_default$1 + ] + }; + } else { + const 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; + } else { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Invalid ocaml_container attribute value" + }); + } + } else { + repeated_type = /* Rt_list */0; + } + record_field_type = { + TAG: /* Rft_repeated_field */2, + _0: [ + repeated_type, + field_type$1, + encoding_number, + pk, + match[2] + ] + }; + } + const record_field_rf_label = label_name_of_field_name(field_name$1); + const record_field = { + rf_label: record_field_rf_label, + rf_field_type: record_field_type, + rf_mutable: mutable_ + }; + return [ + variants, + { + hd: record_field, + tl: fields + } + ]; + case /* Message_oneof_field */1 : + const field$2 = field._0; const outer_message_names = Stdlib.$at(message_names, { hd: message_name, tl: /* [] */0 }); - const variant = variant_of_oneof(undefined, outer_message_names, all_pbtt_msgs$1, file_options, file_name, f._0); - return { - hd: { - module_: module_, - spec: { - TAG: /* Variant */1, - _0: variant - } - }, - tl: /* [] */0 + const variant = variant_of_oneof(Caml_option.some(undefined), outer_message_names, all_pbtt_msgs$1, file_options, file_name, field$2); + const record_field_rf_label$1 = label_name_of_field_name(field$2.oneof_name); + const record_field_rf_field_type = { + TAG: /* Rft_variant_field */4, + _0: variant }; - } - break; - case /* Message_field */0 : - case /* Message_map_field */2 : - break; - - } - const match = Stdlib__List.fold_left((function (param, field) { - const fields = param[1]; - const variants = param[0]; - switch (field.TAG) { - case /* Message_field */0 : - const field$1 = field._0; - const match = encoding_of_field(all_pbtt_msgs$1, field$1); - const encoding_number = match[1]; - const pk = match[0]; - const field_name$1 = field_name(field$1); - const field_options$1 = field_options(field$1); - const field_type$1 = compile_field_type(field_name$1, all_pbtt_msgs$1, file_options, field_options$1, file_name, field_type(field$1)); - const field_default$1 = field_default(field$1); - const mutable_ = is_mutable(field_name$1, field_options$1); - const match$1 = field_label(field$1); - let record_field_type; - if (match$1 === "Optional") { - record_field_type = { - TAG: /* Rft_optional */1, - _0: [ - field_type$1, - encoding_number, - pk, - field_default$1 - ] - }; - } else if (match$1 === "Required") { - record_field_type = { - TAG: /* Rft_required */0, - _0: [ - field_type$1, - encoding_number, - pk, - field_default$1 - ] - }; - } else { - const 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; - } else { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Invalid ocaml_container attribute value" - }); - } - } else { - repeated_type = /* Rt_list */0; - } - record_field_type = { - TAG: /* Rft_repeated_field */2, - _0: [ - repeated_type, - field_type$1, - encoding_number, - pk, - match[2] - ] - }; - } - const record_field_rf_label = label_name_of_field_name(field_name$1); - const record_field = { - rf_label: record_field_rf_label, - rf_field_type: record_field_type, - rf_mutable: mutable_ - }; - return [ - variants, - { - hd: record_field, - tl: fields - } - ]; - case /* Message_oneof_field */1 : - const field$2 = field._0; - const outer_message_names = Stdlib.$at(message_names, { - hd: message_name, - tl: /* [] */0 - }); - const variant = variant_of_oneof(Caml_option.some(undefined), outer_message_names, all_pbtt_msgs$1, file_options, file_name, field$2); - const record_field_rf_label$1 = label_name_of_field_name(field$2.oneof_name); - const record_field_rf_field_type = { - TAG: /* Rft_variant_field */4, - _0: variant - }; - const record_field$1 = { - rf_label: record_field_rf_label$1, - rf_field_type: record_field_rf_field_type, - rf_mutable: false - }; - const variants_0 = { - module_: module_, - spec: { - TAG: /* Variant */1, - _0: variant - } - }; - const variants$1 = { - hd: variants_0, - tl: variants - }; - const fields$1 = { - hd: record_field$1, - tl: fields - }; - return [ - variants$1, - fields$1 - ]; - case /* Message_map_field */2 : - const mf = field._0; - const map_options = mf.map_options; - const map_value_type = mf.map_value_type; - const map_key_type = mf.map_key_type; - const map_name = mf.map_name; - const key_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "key of ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "key of %s" - }), map_name), all_pbtt_msgs$1, file_options, map_options, file_name, map_key_type); - const key_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_key_type); - let key_type$1; - if (/* tag */typeof key_type === "number" || typeof key_type === "string") { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Only Basic Types are supported for map keys" - }); - } - if (key_type.TAG === /* Ft_basic_type */0) { - key_type$1 = key_type._0; - } else { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Only Basic Types are supported for map keys" - }); - } - const value_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "value of ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "value of %s" - }), map_name), all_pbtt_msgs$1, file_options, map_options, file_name, map_value_type); - const value_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_value_type); - const match$3 = ocaml_container(map_options); - let associative_type; - if (match$3 !== undefined) { - if (match$3 === "hashtbl") { - associative_type = /* At_hashtable */1; - } else { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Invalid ocaml_container attribute value for map" - }); - } - } else { - associative_type = /* At_list */0; - } - const record_field_type$1 = { - TAG: /* Rft_associative_field */3, - _0: [ - associative_type, - mf.map_number, - [ - key_type$1, - key_pk - ], - [ - value_type, - value_pk - ] - ] - }; - const record_field_rf_label$2 = label_name_of_field_name(map_name); - const record_field_rf_mutable = is_mutable(map_name, map_options); - const record_field$2 = { - rf_label: record_field_rf_label$2, - rf_field_type: record_field_type$1, - rf_mutable: record_field_rf_mutable - }; - return [ - variants, - { - hd: record_field$2, - tl: fields - } - ]; - + const record_field$1 = { + rf_label: record_field_rf_label$1, + rf_field_type: record_field_rf_field_type, + rf_mutable: false + }; + const variants_0 = { + module_: module_, + spec: { + TAG: /* Variant */1, + _0: variant + } + }; + const variants$1 = { + hd: variants_0, + tl: variants + }; + const fields$1 = { + hd: record_field$1, + tl: fields + }; + return [ + variants$1, + fields$1 + ]; + case /* Message_map_field */2 : + const mf = field._0; + const map_options = mf.map_options; + const map_value_type = mf.map_value_type; + const map_key_type = mf.map_key_type; + const map_name = mf.map_name; + const key_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "key of ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "key of %s" + }), map_name), all_pbtt_msgs$1, file_options, map_options, file_name, map_key_type); + const key_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_key_type); + let key_type$1; + if (/* tag */typeof key_type === "number" || typeof key_type === "string") { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Only Basic Types are supported for map keys" + }); } - }), [ - /* [] */0, - /* [] */0 - ], message_body); - const record_r_name = type_name(message_names, message_name); - const record_r_fields = Stdlib__List.rev(match[1]); - const record = { - r_name: record_r_name, - r_fields: record_r_fields - }; - const type__spec = { - TAG: /* Record */0, - _0: record - }; - const type_ = { - module_: module_, - spec: type__spec - }; - return Stdlib__List.rev({ - hd: type_, - tl: match[0] - }); - } - }), pbtt_msgs); - }), grouped_pbtt_msgs); + if (key_type.TAG === /* Ft_basic_type */0) { + key_type$1 = key_type._0; + } else { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Only Basic Types are supported for map keys" + }); + } + const value_type = compile_field_type(Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "value of ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "value of %s" + }), map_name), all_pbtt_msgs$1, file_options, map_options, file_name, map_value_type); + const value_pk = encoding_info_of_field_type(all_pbtt_msgs$1, map_value_type); + const match$3 = ocaml_container(map_options); + let associative_type; + if (match$3 !== undefined) { + if (match$3 === "hashtbl") { + associative_type = /* At_hashtable */1; + } else { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Invalid ocaml_container attribute value for map" + }); + } + } else { + associative_type = /* At_list */0; + } + const record_field_type$1 = { + TAG: /* Rft_associative_field */3, + _0: [ + associative_type, + mf.map_number, + [ + key_type$1, + key_pk + ], + [ + value_type, + value_pk + ] + ] + }; + const record_field_rf_label$2 = label_name_of_field_name(map_name); + const record_field_rf_mutable = is_mutable(map_name, map_options); + const record_field$2 = { + rf_label: record_field_rf_label$2, + rf_field_type: record_field_type$1, + rf_mutable: record_field_rf_mutable + }; + return [ + variants, + { + hd: record_field$2, + tl: fields + } + ]; + + } + }), [ + /* [] */0, + /* [] */0 + ], message_body); + const record_r_name = type_name(message_names, message_name); + const record_r_fields = Stdlib__List.rev(match[1]); + const record = { + r_name: record_r_name, + r_fields: record_r_fields + }; + const type__spec = { + TAG: /* Record */0, + _0: record + }; + const type_ = { + module_: module_, + spec: type__spec + }; + return Stdlib__List.rev({ + hd: type_, + tl: match[0] + }); + } + }), pbtt_msgs); + }), grouped_pbtt_msgs); const all_ocaml_types = Stdlib__List.flatten(grouped_ocaml_types); let proto_file_name = "tmp.proto"; const gen = function (otypes, sc, fs) { Stdlib__List.iter((function (param) { - const ocamldoc_title = param[1]; - const f = param[0]; - if (ocamldoc_title !== undefined) { - line$1(sc, ""); - line$1(sc, Curry._1(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "(** {2 ", + const ocamldoc_title = param[1]; + const f = param[0]; + if (ocamldoc_title !== undefined) { + line$1(sc, ""); + line$1(sc, Curry._1(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "(** {2 ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: "} *)", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: "} *)", + _1: /* End_of_format */0 } - }, - _1: "(** {2 %s} *)" - }), ocamldoc_title)); - line$1(sc, ""); - } - Stdlib__List.iter((function (types) { - Stdlib__List.fold_left((function (first, type_) { - const 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; - } else { - return false; } - }), true, types); - }), otypes); - }), fs); + }, + _1: "(** {2 %s} *)" + }), ocamldoc_title)); + line$1(sc, ""); + } + Stdlib__List.iter((function (types) { + Stdlib__List.fold_left((function (first, type_) { + const 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; + } else { + return false; + } + }), true, types); + }), otypes); + }), fs); }; const sc = { items: /* [] */0 @@ -7864,11 +7864,11 @@ function compile(proto_definition) { line$1(sc, "[@@@ocaml.warning \"-30\"]"); line$1(sc, ""); gen(all_ocaml_types, sc, Stdlib__List.map((function (m) { - return [ - m.gen_struct, - undefined - ]; - }), all_code_gen)); + return [ + m.gen_struct, + undefined + ]; + }), all_code_gen)); const struct_string = print(sc); const sc$1 = { items: /* [] */0 @@ -7891,11 +7891,11 @@ function compile(proto_definition) { _1: "(** %s Generated Types and Encoding *)" }), Curry._1(Stdlib__Filename.basename, proto_file_name))); gen(all_ocaml_types, sc$1, Stdlib__List.map((function (m) { - return [ - m.gen_sig, - m.ocamldoc_title - ]; - }), all_code_gen)); + return [ + m.gen_sig, + m.ocamldoc_title + ]; + }), all_code_gen)); const sig_string = print(sc$1); return [ sig_string, @@ -7919,12 +7919,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/ocaml_re_test.js b/jscomp/test/dist/jscomp/test/ocaml_re_test.js index c96ea4d28..ce2cd38f1 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_re_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_re_test.js @@ -34,12 +34,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -800,8 +800,8 @@ function rename(ids, x) { return mk_expr(ids, { TAG: /* Alt */1, _0: Stdlib__List.map((function (param) { - return rename(ids, param); - }), l._0) + return rename(ids, param); + }), l._0) }); case /* Seq */2 : return mk_expr(ids, { @@ -1018,22 +1018,22 @@ function reset_table(a) { function mark_used_indices(tbl) { return function (param) { return Stdlib__List.iter((function (param) { - switch (param.TAG) { - case /* TSeq */0 : - return mark_used_indices(tbl)(param._0); - case /* TExp */1 : - case /* TMatch */2 : - break; - - } - Stdlib__List.iter((function (param) { - const i = param[1]; - if (i >= 0) { - return Caml_array.set(tbl, i, true); - } - - }), param._0.marks); - }), param); + switch (param.TAG) { + case /* TSeq */0 : + return mark_used_indices(tbl)(param._0); + case /* TExp */1 : + case /* TMatch */2 : + break; + + } + Stdlib__List.iter((function (param) { + const i = param[1]; + if (i >= 0) { + return Caml_array.set(tbl, i, true); + } + + }), param._0.marks); + }), param); }; } @@ -1062,15 +1062,15 @@ function free_index(tbl_ref, l) { function remove_matches(param) { return Stdlib__List.filter((function (param) { - switch (param.TAG) { - case /* TSeq */0 : - case /* TExp */1 : - return true; - case /* TMatch */2 : - return false; - - } - }), param); + switch (param.TAG) { + case /* TSeq */0 : + case /* TExp */1 : + return true; + case /* TMatch */2 : + return false; + + } + }), param); } function split_at_match_rec(_l$p, _param) { @@ -1217,13 +1217,13 @@ function set_idx(idx, param) { function filter_marks(b, e, marks) { return { marks: Stdlib__List.filter((function (param) { - const i = param[0]; - if (i < b) { - return true; - } else { - return i > e; - } - }), marks.marks), + const i = param[0]; + if (i < b) { + return true; + } else { + return i > e; + } + }), marks.marks), pmarks: marks.pmarks }; } @@ -1262,15 +1262,15 @@ function delta_1(marks, c, next_cat, prev_cat, x, rem) { const kind = s._1; const y$p$1 = delta_1(marks, c, next_cat, prev_cat, s._2, /* [] */0); const marks$p = first((function (marks) { - switch (marks.TAG) { - case /* TSeq */0 : - case /* TExp */1 : - return; - case /* TMatch */2 : - return marks._0; - - } - }), y$p$1); + switch (marks.TAG) { + case /* TSeq */0 : + case /* TExp */1 : + return; + case /* TMatch */2 : + return marks._0; + + } + }), y$p$1); const match = marks$p !== undefined ? [ remove_matches(y$p$1), marks$p @@ -1377,15 +1377,15 @@ function delta_2(marks, c, next_cat, prev_cat, l, rem) { function delta_seq(c, next_cat, prev_cat, kind, y, z, rem) { const marks = first((function (marks) { - switch (marks.TAG) { - case /* TSeq */0 : - case /* TExp */1 : - return; - case /* TMatch */2 : - return marks._0; - - } - }), y); + switch (marks.TAG) { + case /* TSeq */0 : + case /* TExp */1 : + return; + case /* TMatch */2 : + return marks._0; + + } + }), y); if (marks === undefined) { return tseq(kind, y, z, rem); } @@ -1432,12 +1432,12 @@ function delta(tbl_ref, next_cat, $$char, st) { function flatten_match(m) { const ma = Stdlib__List.fold_left((function (ma, param) { - return Caml.caml_int_max(ma, param[0]); - }), -1, m); + return Caml.caml_int_max(ma, param[0]); + }), -1, m); const res = Caml_array.make(ma + 1 | 0, -1); Stdlib__List.iter((function (param) { - Caml_array.set(res, param[0], param[1]); - }), m); + Caml_array.set(res, param[0], param[1]); + }), m); return res; } @@ -1753,8 +1753,8 @@ function trans_set(cache, cm, s) { const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { const 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); + 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); return l; } @@ -2416,9 +2416,9 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _s) } return [ alt(ids, Stdlib__List.map((function (r$p) { - const match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); - return enforce_kind(ids, kind, match[1], match[0]); - }), merged_sequences)), + const match = translate(ids, kind, ign_group, ign_case, greedy, pos, cache, c, r$p); + return enforce_kind(ids, kind, match[1], match[0]); + }), merged_sequences)), kind ]; case /* Repeat */3 : @@ -2430,30 +2430,30 @@ function translate(ids, kind, _ign_group, ign_case, _greedy, pos, cache, c, _s) let rem; if (j !== undefined) { const f = greedy === "Non_greedy" ? (function (rem) { - return alt(ids, { - hd: mk_expr(ids, /* Eps */0), - tl: { - hd: seq$1(ids, kind$p, rename(ids, cr), rem), - tl: /* [] */0 - } - }); - }) : (function (rem) { - return alt(ids, { + return alt(ids, { + hd: mk_expr(ids, /* Eps */0), + tl: { hd: seq$1(ids, kind$p, rename(ids, cr), rem), - tl: { - hd: mk_expr(ids, /* Eps */0), - tl: /* [] */0 - } - }); - }); + tl: /* [] */0 + } + }); + }) : (function (rem) { + return alt(ids, { + hd: seq$1(ids, kind$p, rename(ids, cr), rem), + tl: { + hd: mk_expr(ids, /* Eps */0), + tl: /* [] */0 + } + }); + }); rem = iter(j - i | 0, f, mk_expr(ids, /* Eps */0)); } else { rem = rep(ids, greedy, kind$p, cr); } return [ iter(i, (function (rem) { - return seq$1(ids, kind$p, rename(ids, cr), rem); - }), rem), + return seq$1(ids, kind$p, rename(ids, cr), rem); + }), rem), kind ]; case /* Sem */4 : @@ -2597,13 +2597,13 @@ function handle_case(_ign_case, _s) { return { TAG: /* Sequence */1, _0: Stdlib__List.map((function (param) { - return handle_case(ign_case, param); - }), s._0) + return handle_case(ign_case, param); + }), s._0) }; case /* Alternative */2 : const l$p = Stdlib__List.map((function (param) { - return handle_case(ign_case, param); - }), s._0); + return handle_case(ign_case, param); + }), s._0); if (is_charset({ TAG: /* Alternative */2, _0: l$p @@ -2611,8 +2611,8 @@ function handle_case(_ign_case, _s) { return { TAG: /* Set */0, _0: Stdlib__List.fold_left((function (s, r) { - return union(s, as_set(r)); - }), /* [] */0, l$p) + return union(s, as_set(r)); + }), /* [] */0, l$p) }; } else { return { @@ -2684,23 +2684,23 @@ function handle_case(_ign_case, _s) { continue; case /* Intersection */11 : const l$p$1 = Stdlib__List.map((function (r) { - return handle_case(ign_case, r); - }), s._0); + return handle_case(ign_case, r); + }), s._0); return { TAG: /* Set */0, _0: Stdlib__List.fold_left((function (s, r) { - return inter(s, as_set(r)); - }), cany, l$p$1) + return inter(s, as_set(r)); + }), cany, l$p$1) }; case /* Complement */12 : const l$p$2 = Stdlib__List.map((function (r) { - return handle_case(ign_case, r); - }), s._0); + return handle_case(ign_case, r); + }), s._0); return { TAG: /* Set */0, _0: diff(cany, Stdlib__List.fold_left((function (s, r) { - return union(s, as_set(r)); - }), /* [] */0, l$p$2)) + return union(s, as_set(r)); + }), /* [] */0, l$p$2)) }; case /* Difference */13 : return { @@ -4121,14 +4121,14 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { function re(flagsOpt, pat) { const flags = flagsOpt !== undefined ? flagsOpt : /* [] */0; const opts = Stdlib__List.map((function (param) { - if (param === "CASELESS") { - return "Caseless"; - } else if (param === "ANCHORED") { - return "Anchored"; - } else { - return "Multiline"; - } - }), flags); + if (param === "CASELESS") { + return "Caseless"; + } else if (param === "ANCHORED") { + return "Anchored"; + } else { + return "Multiline"; + } + }), flags); let optsOpt = opts; const opts$1 = optsOpt !== undefined ? optsOpt : /* [] */0; const 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); diff --git a/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js b/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js index 1ac293625..63a533a90 100644 --- a/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js +++ b/jscomp/test/dist/jscomp/test/ocaml_typedtree_test.js @@ -310,8 +310,8 @@ function remove_file(filename) { function create_hashtable(size, init) { const tbl = Stdlib__Hashtbl.create(undefined, size); Stdlib__List.iter((function (param) { - Stdlib__Hashtbl.add(tbl, param[0], param[1]); - }), init); + Stdlib__Hashtbl.add(tbl, param[0], param[1]); + }), init); return tbl; } @@ -1632,13 +1632,13 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { bol = false; } if (Stdlib__List.exists((function (loc) { - return pos === loc.loc_start.pos_cnum; - }), locs)) { + return pos === loc.loc_start.pos_cnum; + }), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(true); } if (Stdlib__List.exists((function (loc) { - return pos === loc.loc_end.pos_cnum; - }), locs)) { + return pos === loc.loc_end.pos_cnum; + }), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(false); } const c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); @@ -2199,9 +2199,9 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { Curry._1(before, ppf); } return Stdlib__Format.kfprintf((function (param) { - Stdlib__Format.pp_print_flush(ppf, undefined); - return Curry._1(k, Stdlib__Buffer.contents(buf)); - }), ppf, fmt); + Stdlib__Format.pp_print_flush(ppf, undefined); + return Curry._1(k, Stdlib__Buffer.contents(buf)); + }), ppf, fmt); } function error(locOpt, subOpt, if_highlightOpt, msg) { @@ -3897,14 +3897,14 @@ function bindings(s) { function of_list(bs) { return Stdlib__List.fold_left((function (m, param) { - return add$1(param[0], param[1], m); - }), /* Empty */0, bs); + return add$1(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add$1(param[0], param[1], m); - }), m, i); + return add$1(param[0], param[1], m); + }), m, i); } function of_seq(i) { @@ -3923,8 +3923,8 @@ function seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -3966,8 +3966,8 @@ function rev_seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } @@ -5424,13 +5424,13 @@ function static_row(row) { const row$1 = row_repr_aux(/* [] */0, row); if (row$1.row_closed) { return Stdlib__List.for_all((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG === /* Rpresent */0) { - return true; - } else { - return false; - } - }), row$1.row_fields); + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG === /* Rpresent */0) { + return true; + } else { + return false; + } + }), row$1.row_fields); } else { return false; } @@ -5568,19 +5568,19 @@ function iter_row(f, _row) { while(true) { const row = _row; Stdlib__List.iter((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG !== /* Rpresent */0) { - return Stdlib__List.iter(f, match._1); - } - const ty = match._0; - if (ty !== undefined) { - return Curry._1(f, ty); - } - - }), row.row_fields); + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG !== /* Rpresent */0) { + return Stdlib__List.iter(f, match._1); + } + const ty = match._0; + if (ty !== undefined) { + return Curry._1(f, ty); + } + + }), row.row_fields); const row$1 = repr(row.row_more).desc; if (!/* tag */(typeof row$1 === "number" || typeof row$1 === "string")) { switch (row$1.TAG) { @@ -5604,8 +5604,8 @@ function iter_row(f, _row) { } } return may((function (param) { - Stdlib__List.iter(f, param[1]); - }), row.row_name); + Stdlib__List.iter(f, param[1]); + }), row.row_name); }; } @@ -5757,12 +5757,12 @@ function it_class_type(it, cs) { const cs$1 = cs._0; Curry._2(it.it_type_expr, it, cs$1.csig_self); Curry._2(Meths.iter, (function (param, param$1) { - Curry._2(it.it_type_expr, it, param$1[2]); - }), cs$1.csig_vars); + Curry._2(it.it_type_expr, it, param$1[2]); + }), cs$1.csig_vars); return Stdlib__List.iter((function (param) { - Curry._1(it.it_path, param[0]); - Stdlib__List.iter(Curry._1(it.it_type_expr, it), param[1]); - }), cs$1.csig_inher); + Curry._1(it.it_path, param[0]); + Stdlib__List.iter(Curry._1(it.it_type_expr, it), param[1]); + }), cs$1.csig_inher); case /* Cty_arrow */2 : Curry._2(it.it_type_expr, it, cs._1); return Curry._2(it.it_class_type, it, cs._2); @@ -5775,13 +5775,13 @@ function it_type_kind(it, cl) { return; } else if (cl.TAG === /* Type_record */0) { return Stdlib__List.iter((function (ld) { - Curry._2(it.it_type_expr, it, ld.ld_type); - }), cl._0); + Curry._2(it.it_type_expr, it, ld.ld_type); + }), cl._0); } else { return Stdlib__List.iter((function (cd) { - Stdlib__List.iter(Curry._1(it.it_type_expr, it), cd.cd_args); - may(Curry._1(it.it_type_expr, it), cd.cd_res); - }), cl._0); + Stdlib__List.iter(Curry._1(it.it_type_expr, it), cd.cd_args); + may(Curry._1(it.it_type_expr, it), cd.cd_res); + }), cl._0); } } @@ -5801,8 +5801,8 @@ function it_do_type_expr(it, ty) { } case /* Tvariant */8 : return may((function (param) { - Curry._1(it.it_path, param[0]); - }), row_repr_aux(/* [] */0, row._0).row_name); + Curry._1(it.it_path, param[0]); + }), row_repr_aux(/* [] */0, row._0).row_name); case /* Tconstr */3 : case /* Tpackage */11 : return Curry._1(it.it_path, row._0); @@ -5817,36 +5817,36 @@ function it_path(p) { function copy_row(f, fixed, row, keep, more) { const fields = Stdlib__List.map((function (param) { - const fi = param[1]; - const match = row_field_repr_aux(/* [] */0, fi); - let tmp; - if (/* tag */typeof match === "number" || typeof match === "string") { - tmp = fi; - } else if (match.TAG === /* Rpresent */0) { - const ty = match._0; - tmp = ty !== undefined ? ({ - TAG: /* Rpresent */0, - _0: Curry._1(f, ty) - }) : fi; - } else { - const e = keep ? match._3 : ({ - contents: undefined - }); - const m = row.row_fixed ? fixed : match._2; - const tl = Stdlib__List.map(f, match._1); - tmp = { - TAG: /* Reither */1, - _0: match._0, - _1: tl, - _2: m, - _3: e - }; - } - return [ - param[0], - tmp - ]; - }), row.row_fields); + const fi = param[1]; + const match = row_field_repr_aux(/* [] */0, fi); + let tmp; + if (/* tag */typeof match === "number" || typeof match === "string") { + tmp = fi; + } else if (match.TAG === /* Rpresent */0) { + const ty = match._0; + tmp = ty !== undefined ? ({ + TAG: /* Rpresent */0, + _0: Curry._1(f, ty) + }) : fi; + } else { + const e = keep ? match._3 : ({ + contents: undefined + }); + const m = row.row_fixed ? fixed : match._2; + const tl = Stdlib__List.map(f, match._1); + tmp = { + TAG: /* Reither */1, + _0: match._0, + _1: tl, + _2: m, + _3: e + }; + } + return [ + param[0], + tmp + ]; + }), row.row_fields); const match = row.row_name; const name = match !== undefined ? [ match[0], @@ -6003,39 +6003,39 @@ function copy_type_desc(_keep_namesOpt, f, _ty) { return ty; case /* Tpoly */10 : const tyl = Stdlib__List.map((function (x) { - let _ty = Curry._1(f, x); - while(true) { - const ty = _ty; - const ty$1 = ty.desc; - if (!/* tag */(typeof ty$1 === "number" || typeof ty$1 === "string")) { - switch (ty$1.TAG) { - case /* Ttuple */2 : - const match = ty$1._0; - if (match) { - _ty = match.hd; - continue; - } - break; - case /* Tlink */6 : - _ty = ty$1._0; + let _ty = Curry._1(f, x); + while(true) { + const ty = _ty; + const ty$1 = ty.desc; + if (!/* tag */(typeof ty$1 === "number" || typeof ty$1 === "string")) { + switch (ty$1.TAG) { + case /* Ttuple */2 : + const match = ty$1._0; + if (match) { + _ty = match.hd; continue; - case /* Tsubst */7 : - case /* Tunivar */9 : - return ty; - default: - - } + } + break; + case /* Tlink */6 : + _ty = ty$1._0; + continue; + case /* Tsubst */7 : + case /* Tunivar */9 : + return ty; + default: + } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 5184, - 26 - ] - }); - }; - }), ty._1); + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 5184, + 26 + ] + }); + }; + }), ty._1); return { TAG: /* Tpoly */10, _0: Curry._1(f, ty._0), @@ -6109,11 +6109,11 @@ function dup_kind(r) { function cleanup_types(param) { Stdlib__List.iter((function (param) { - param[0].desc = param[1]; - }), saved_desc.contents); + param[0].desc = param[1]; + }), saved_desc.contents); Stdlib__List.iter((function (r) { - r.contents = undefined; - }), saved_kinds.contents); + r.contents = undefined; + }), saved_kinds.contents); saved_desc.contents = /* [] */0; saved_kinds.contents = /* [] */0; new_kinds.contents = /* [] */0; @@ -6186,8 +6186,8 @@ function unmark_extension_constructor(ext) { function unmark_class_signature(sign) { unmark_type(sign.csig_self); Curry._2(Meths.iter, (function (l, param) { - unmark_type(param[2]); - }), sign.csig_vars); + unmark_type(param[2]); + }), sign.csig_vars); } function find_expans(priv, p1, _param) { @@ -6215,8 +6215,8 @@ const memo = { function cleanup_abbrev(param) { Stdlib__List.iter((function (abbr) { - abbr.contents = /* Mnil */0; - }), memo.contents); + abbr.contents = /* Mnil */0; + }), memo.contents); memo.contents = /* [] */0; } @@ -6757,30 +6757,30 @@ function set$1(tbl, name, crc, source) { function extract(l, tbl) { const l$1 = Stdlib__List.sort_uniq(Stdlib__String.compare, l); return Stdlib__List.fold_left((function (assc, name) { - try { - const match = Stdlib__Hashtbl.find(tbl, name); + try { + const match = Stdlib__Hashtbl.find(tbl, name); + return { + hd: [ + name, + Caml_option.some(match[0]) + ], + tl: assc + }; + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: [ name, - Caml_option.some(match[0]) + undefined ], tl: assc }; } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return { - hd: [ - name, - undefined - ], - tl: assc - }; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }), /* [] */0, l$1); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), /* [] */0, l$1); } function free_vars(ty) { @@ -7504,12 +7504,12 @@ function build_initial_env(add_type, add_exception, empty_env) { } Stdlib__List.map((function (id) { - make_global(id); - return [ - id.name, - id - ]; - }), { + make_global(id); + return [ + id.name, + id + ]; + }), { hd: ident_match_failure, tl: { hd: ident_out_of_memory, @@ -7561,31 +7561,31 @@ function warn_bad_docstrings(param) { _0: true })) { return Stdlib__List.iter((function (ds) { - const match = ds.ds_attached; - switch (match) { - case /* Unattached */0 : - return prerr_warning(ds.ds_loc, { - TAG: /* Bad_docstring */33, - _0: true - }); - case /* Info */1 : - return; - case /* Docs */2 : - const match$1 = ds.ds_associated; - switch (match$1) { - case /* Zero */0 : - case /* One */1 : - return; - case /* Many */2 : - return prerr_warning(ds.ds_loc, { - TAG: /* Bad_docstring */33, - _0: false - }); - - } - - } - }), Stdlib__List.rev(docstrings.contents)); + const match = ds.ds_attached; + switch (match) { + case /* Unattached */0 : + return prerr_warning(ds.ds_loc, { + TAG: /* Bad_docstring */33, + _0: true + }); + case /* Info */1 : + return; + case /* Docs */2 : + const match$1 = ds.ds_associated; + switch (match$1) { + case /* Zero */0 : + case /* One */1 : + return; + case /* Many */2 : + return prerr_warning(ds.ds_loc, { + TAG: /* Bad_docstring */33, + _0: false + }); + + } + + } + }), Stdlib__List.rev(docstrings.contents)); } } @@ -7780,18 +7780,18 @@ function get_docstrings(dsl) { function associate_docstrings(dsl) { Stdlib__List.iter((function (ds) { - const match = ds.ds_associated; - switch (match) { - case /* Zero */0 : - ds.ds_associated = /* One */1; - return; - case /* One */1 : - case /* Many */2 : - ds.ds_associated = /* Many */2; - return; - - } - }), dsl); + const match = ds.ds_associated; + switch (match) { + case /* Zero */0 : + ds.ds_associated = /* One */1; + return; + case /* One */1 : + case /* Many */2 : + ds.ds_associated = /* Many */2; + return; + + } + }), dsl); } const pre_table = Stdlib__Hashtbl.create(undefined, 50); @@ -7961,11 +7961,11 @@ function symbol_docs_lazy(param) { return { LAZY_DONE: false, VAL: (function () { - return { - docs_pre: get_pre_docs(p1), - docs_post: get_post_docs(p2) - }; - }) + return { + docs_pre: get_pre_docs(p1), + docs_post: get_post_docs(p2) + }; + }) }; } @@ -7984,8 +7984,8 @@ function symbol_text_lazy(param) { return { LAZY_DONE: false, VAL: (function () { - return get_text(pos); - }) + return get_text(pos); + }) }; } @@ -8726,13 +8726,13 @@ function extension$5(loc, attrsOpt, a) { function text(txt) { return Stdlib__List.map((function (ds) { - const a = text_attr(ds); - const loc = ds.ds_loc; - return mk$5(loc, { - TAG: /* Psig_attribute */11, - _0: a - }); - }), txt); + const a = text_attr(ds); + const loc = ds.ds_loc; + return mk$5(loc, { + TAG: /* Psig_attribute */11, + _0: a + }); + }), txt); } function mk$6(locOpt, d) { @@ -8771,13 +8771,13 @@ function extension$6(loc, attrsOpt, a) { function text$1(txt) { return Stdlib__List.map((function (ds) { - const a = text_attr(ds); - const loc = ds.ds_loc; - return mk$6(loc, { - TAG: /* Pstr_attribute */13, - _0: a - }); - }), txt); + const a = text_attr(ds); + const loc = ds.ds_loc; + return mk$6(loc, { + TAG: /* Pstr_attribute */13, + _0: a + }); + }), txt); } function mk$7(locOpt, attrsOpt, d) { @@ -8978,8 +8978,8 @@ function attribute(loc, a) { function text$2(txt) { return Stdlib__List.map((function (ds) { - return attribute(ds.ds_loc, text_attr(ds)); - }), txt); + return attribute(ds.ds_loc, text_attr(ds)); + }), txt); } function attr$7(d, a) { @@ -9068,8 +9068,8 @@ function attribute$1(loc, a) { function text$3(txt) { return Stdlib__List.map((function (ds) { - return attribute$1(ds.ds_loc, text_attr(ds)); - }), txt); + return attribute$1(ds.ds_loc, text_attr(ds)); + }), txt); } function virtual_(ct) { @@ -9448,31 +9448,31 @@ function map$1(sub, param) { return alias(loc, attrs, Curry._2(sub.typ, sub, desc._0), desc._1); case /* Ptyp_variant */7 : return variant(loc, attrs, Stdlib__List.map((function (param) { - if (param.TAG === /* Rtag */0) { - return { - TAG: /* Rtag */0, - _0: param._0, - _1: Curry._2(sub.attributes, sub, param._1), - _2: param._2, - _3: Stdlib__List.map(Curry._1(sub.typ, sub), param._3) - }; - } else { - return { - TAG: /* Rinherit */1, - _0: Curry._2(sub.typ, sub, param._0) - }; - } - }), desc._0), desc._1, desc._2); + if (param.TAG === /* Rtag */0) { + return { + TAG: /* Rtag */0, + _0: param._0, + _1: Curry._2(sub.attributes, sub, param._1), + _2: param._2, + _3: Stdlib__List.map(Curry._1(sub.typ, sub), param._3) + }; + } else { + return { + TAG: /* Rinherit */1, + _0: Curry._2(sub.typ, sub, param._0) + }; + } + }), desc._0), desc._1, desc._2); case /* Ptyp_poly */8 : return poly(loc, attrs, desc._0, Curry._2(sub.typ, sub, desc._1)); case /* Ptyp_package */9 : const match = desc._0; const 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); - }), partial_arg, param); - }), match[1])); + return map_tuple((function (param) { + return map_loc(sub, param); + }), partial_arg, param); + }), match[1])); case /* Ptyp_extension */10 : return extension(loc, attrs, Curry._2(sub.extension, sub, desc._0)); @@ -9485,14 +9485,14 @@ function map_type_declaration(sub, param) { const partial_arg$2 = Curry._1(sub.typ, sub); const 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) { - return [ - Curry._1(partial_arg$3, param[0]), - Curry._1(partial_arg$2, param[1]), - Curry._1(partial_arg$1, param[2]) - ]; - }), param.ptype_cstrs), Curry._2(sub.type_kind, sub, param.ptype_kind), param.ptype_private, map_opt(Curry._1(sub.typ, sub), param.ptype_manifest), map_loc(sub, param.ptype_name)); + return map_fst(partial_arg, param); + }), param.ptype_params), Stdlib__List.map((function (param) { + return [ + Curry._1(partial_arg$3, param[0]), + Curry._1(partial_arg$2, param[1]), + Curry._1(partial_arg$1, param[2]) + ]; + }), param.ptype_cstrs), Curry._2(sub.type_kind, sub, param.ptype_kind), param.ptype_private, map_opt(Curry._1(sub.typ, sub), param.ptype_manifest), map_loc(sub, param.ptype_name)); } function map_type_kind(sub, l) { @@ -9518,8 +9518,8 @@ function map_type_kind(sub, l) { function map_type_extension(sub, param) { const 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)); + 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)); } function map_extension_constructor_kind(sub, li) { @@ -9850,8 +9850,8 @@ function map$5(sub, param) { case /* Pexp_apply */5 : const 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)); + return map_snd(partial_arg, param); + }), desc._1)); case /* Pexp_match */6 : return Curry._4(Ast_helper_Exp.match_, loc, attrs, Curry._2(sub.expr, sub, desc._0), Curry._2(sub.cases, sub, desc._1)); case /* Pexp_try */7 : @@ -9865,10 +9865,10 @@ function map$5(sub, param) { case /* Pexp_record */11 : const 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); - }), partial_arg$1, param); - }), desc._0), map_opt(Curry._1(sub.expr, sub), desc._1)); + return map_tuple((function (param) { + return map_loc(sub, param); + }), partial_arg$1, param); + }), desc._0), map_opt(Curry._1(sub.expr, sub), desc._1)); case /* Pexp_field */12 : return Curry._4(Ast_helper_Exp.field, loc, attrs, Curry._2(sub.expr, sub, desc._0), map_loc(sub, desc._1)); case /* Pexp_setfield */13 : @@ -9896,10 +9896,10 @@ function map$5(sub, param) { case /* Pexp_override */24 : const 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); - }), partial_arg$2, param); - }), desc._0)); + return map_tuple((function (param) { + return map_loc(sub, param); + }), partial_arg$2, param); + }), desc._0)); case /* Pexp_letmodule */25 : return Curry._5(Ast_helper_Exp.letmodule, loc, attrs, map_loc(sub, desc._0), Curry._2(sub.module_expr, sub, desc._1), Curry._2(sub.expr, sub, desc._2)); case /* Pexp_assert */26 : @@ -9947,10 +9947,10 @@ function map$6(sub, param) { case /* Ppat_record */7 : const 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); - }), partial_arg, param); - }), desc._0), desc._1); + return map_tuple((function (param) { + return map_loc(sub, param); + }), partial_arg, param); + }), desc._0), desc._1); case /* Ppat_array */8 : return array(loc, attrs, Stdlib__List.map(Curry._1(sub.pat, sub), desc._0)); case /* Ppat_or */9 : @@ -9985,8 +9985,8 @@ function map$7(sub, param) { case /* Pcl_apply */3 : const 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)); + return map_snd(partial_arg, param); + }), desc._1)); case /* Pcl_let */4 : return let_$1(loc, attrs, desc._0, Stdlib__List.map(Curry._1(sub.value_binding, sub), desc._1), Curry._2(sub.class_expr, sub, desc._2)); case /* Pcl_constraint */5 : @@ -10048,8 +10048,8 @@ function map_structure(sub, param) { function class_infos(sub, f, param) { const 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)); + return map_fst(partial_arg, param); + }), param.pci_params), map_loc(sub, param.pci_name), Curry._1(f, param.pci_expr)); } function default_mapper_attribute($$this, param) { @@ -10449,8 +10449,8 @@ function loc(s, x) { const newrecord = Caml_obj.caml_obj_dup(default_mapper); newrecord.location = (function (_this, _loc) { - return none; - }); + return none; +}); function is_not_doc(param) { switch (param[0].txt) { @@ -10645,8 +10645,8 @@ function typexp(s, ty) { TAG: /* Tconstr */3, _0: type_path(s, desc$1._0), _1: Stdlib__List.map((function (param) { - return typexp(s, param); - }), desc$1._1), + return typexp(s, param); + }), desc$1._1), _2: { contents: /* Mnil */0 } @@ -10661,8 +10661,8 @@ function typexp(s, ty) { contents: match !== undefined ? [ type_path(s, match[0]), Stdlib__List.map((function (param) { - return typexp(s, param); - }), match[1]) + return typexp(s, param); + }), match[1]) ] : undefined } }; @@ -10783,8 +10783,8 @@ function typexp(s, ty) { }) }; const row$1 = copy_row((function (param) { - return typexp(s, param); - }), true, row, !dup, more$p); + return typexp(s, param); + }), true, row, !dup, more$p); const match$6 = row$1.row_name; tmp = match$6 !== undefined ? ({ TAG: /* Tvariant */8, @@ -10811,8 +10811,8 @@ function typexp(s, ty) { _0: modtype_path(s, desc$1._0), _1: desc$1._1, _2: Stdlib__List.map((function (param) { - return typexp(s, param); - }), desc$1._2) + return typexp(s, param); + }), desc$1._2) }; break; default: @@ -10821,8 +10821,8 @@ function typexp(s, ty) { } if (exit$1 === 3) { tmp = copy_type_desc(undefined, (function (param) { - return typexp(s, param); - }), desc$1); + return typexp(s, param); + }), desc$1); } ty$p.desc = tmp; return ty$p; @@ -10856,36 +10856,36 @@ function type_declaration(s, decl) { cstrs.TAG === /* Type_record */0 ? ({ TAG: /* Type_record */0, _0: Stdlib__List.map((function (l) { - return { - ld_id: l.ld_id, - ld_mutable: l.ld_mutable, - ld_type: typexp(s, l.ld_type), - ld_loc: loc(s, l.ld_loc), - ld_attributes: attrs(s, l.ld_attributes) - }; - }), cstrs._0), + return { + ld_id: l.ld_id, + ld_mutable: l.ld_mutable, + ld_type: typexp(s, l.ld_type), + ld_loc: loc(s, l.ld_loc), + ld_attributes: attrs(s, l.ld_attributes) + }; + }), cstrs._0), _1: cstrs._1 }) : ({ TAG: /* Type_variant */1, _0: Stdlib__List.map((function (c) { - return { - cd_id: c.cd_id, - cd_args: Stdlib__List.map((function (param) { - return typexp(s, param); - }), c.cd_args), - cd_res: may_map((function (param) { - return typexp(s, param); - }), c.cd_res), - cd_loc: loc(s, c.cd_loc), - cd_attributes: attrs(s, c.cd_attributes) - }; - }), cstrs._0) + return { + cd_id: c.cd_id, + cd_args: Stdlib__List.map((function (param) { + return typexp(s, param); + }), c.cd_args), + cd_res: may_map((function (param) { + return typexp(s, param); + }), c.cd_res), + cd_loc: loc(s, c.cd_loc), + cd_attributes: attrs(s, c.cd_attributes) + }; + }), cstrs._0) }) ); const ty = decl.type_manifest; const decl_type_params = Stdlib__List.map((function (param) { - return typexp(s, param); - }), decl.type_params); + return typexp(s, param); + }), decl.type_params); const decl_type_arity = decl.type_arity; const decl_type_private = decl.type_private; const decl_type_manifest = ty !== undefined ? typexp(s, ty) : undefined; @@ -10911,21 +10911,21 @@ function class_signature(s, sign) { return { csig_self: typexp(s, sign.csig_self), csig_vars: Curry._2(Meths.map, (function (param) { - return [ - param[0], - param[1], - typexp(s, param[2]) - ]; - }), sign.csig_vars), + return [ + param[0], + param[1], + typexp(s, param[2]) + ]; + }), sign.csig_vars), csig_concr: sign.csig_concr, csig_inher: Stdlib__List.map((function (param) { - return [ - type_path(s, param[0]), - Stdlib__List.map((function (param) { - return typexp(s, param); - }), param[1]) - ]; - }), sign.csig_inher) + return [ + type_path(s, param[0]), + Stdlib__List.map((function (param) { + return typexp(s, param); + }), param[1]) + ]; + }), sign.csig_inher) }; } @@ -10936,8 +10936,8 @@ function class_type(s, sign) { TAG: /* Cty_constr */0, _0: type_path(s, sign._0), _1: Stdlib__List.map((function (param) { - return typexp(s, param); - }), sign._1), + return typexp(s, param); + }), sign._1), _2: class_type(s, sign._2) }; case /* Cty_signature */1 : @@ -10960,8 +10960,8 @@ function class_declaration(s, decl) { const ty = decl.cty_new; const decl$1 = { cty_params: Stdlib__List.map((function (param) { - return typexp(s, param); - }), decl.cty_params), + return typexp(s, param); + }), decl.cty_params), cty_type: class_type(s, decl.cty_type), cty_path: type_path(s, decl.cty_path), cty_new: ty !== undefined ? typexp(s, ty) : undefined, @@ -10977,8 +10977,8 @@ function class_declaration(s, decl) { function cltype_declaration(s, decl) { const decl_clty_params = Stdlib__List.map((function (param) { - return typexp(s, param); - }), decl.clty_params); + return typexp(s, param); + }), decl.clty_params); const decl_clty_type = class_type(s, decl.clty_type); const decl_clty_path = type_path(s, decl.clty_path); const decl_clty_variance = decl.clty_variance; @@ -11014,14 +11014,14 @@ function value_description(s, descr) { function extension_constructor(s, ext) { const ext_ext_type_path = type_path(s, ext.ext_type_path); const ext_ext_type_params = Stdlib__List.map((function (param) { - return typexp(s, param); - }), ext.ext_type_params); + return typexp(s, param); + }), ext.ext_type_params); const ext_ext_args = Stdlib__List.map((function (param) { - return typexp(s, param); - }), ext.ext_args); + return typexp(s, param); + }), ext.ext_args); const ext_ext_ret_type = may_map((function (param) { - return typexp(s, param); - }), ext.ext_ret_type); + return typexp(s, param); + }), ext.ext_ret_type); const ext_ext_private = ext.ext_private; const ext_ext_loc = s.for_saving ? none : ext.ext_loc; const ext_ext_attributes = attrs(s, ext.ext_attributes); @@ -11147,8 +11147,8 @@ function modtype(s, mty) { TAG: /* Mty_functor */2, _0: id$p, _1: may_map((function (param) { - return modtype(s, param); - }), mty._1), + return modtype(s, param); + }), mty._1), _2: modtype(add_module(id, { TAG: /* Pident */0, _0: id$p @@ -11167,57 +11167,57 @@ function signature$2(s, sg) { const match = rename_bound_idents(s, /* [] */0, sg); const s$p = match[1]; return Stdlib__List.map2((function (param, param$1) { - switch (param.TAG) { - case /* Sig_value */0 : - return { - TAG: /* Sig_value */0, - _0: param$1, - _1: value_description(s$p, param._1) - }; - case /* Sig_type */1 : - return { - TAG: /* Sig_type */1, - _0: param$1, - _1: type_declaration(s$p, param._1), - _2: param._2 - }; - case /* Sig_typext */2 : - return { - TAG: /* Sig_typext */2, - _0: param$1, - _1: extension_constructor(s$p, param._1), - _2: param._2 - }; - case /* Sig_module */3 : - return { - TAG: /* Sig_module */3, - _0: param$1, - _1: module_declaration(s$p, param._1), - _2: param._2 - }; - case /* Sig_modtype */4 : - return { - TAG: /* Sig_modtype */4, - _0: param$1, - _1: modtype_declaration(s$p, param._1) - }; - case /* Sig_class */5 : - return { - TAG: /* Sig_class */5, - _0: param$1, - _1: class_declaration(s$p, param._1), - _2: param._2 - }; - case /* Sig_class_type */6 : - return { - TAG: /* Sig_class_type */6, - _0: param$1, - _1: cltype_declaration(s$p, param._1), - _2: param._2 - }; - - } - }), sg, match[0]); + switch (param.TAG) { + case /* Sig_value */0 : + return { + TAG: /* Sig_value */0, + _0: param$1, + _1: value_description(s$p, param._1) + }; + case /* Sig_type */1 : + return { + TAG: /* Sig_type */1, + _0: param$1, + _1: type_declaration(s$p, param._1), + _2: param._2 + }; + case /* Sig_typext */2 : + return { + TAG: /* Sig_typext */2, + _0: param$1, + _1: extension_constructor(s$p, param._1), + _2: param._2 + }; + case /* Sig_module */3 : + return { + TAG: /* Sig_module */3, + _0: param$1, + _1: module_declaration(s$p, param._1), + _2: param._2 + }; + case /* Sig_modtype */4 : + return { + TAG: /* Sig_modtype */4, + _0: param$1, + _1: modtype_declaration(s$p, param._1) + }; + case /* Sig_class */5 : + return { + TAG: /* Sig_class */5, + _0: param$1, + _1: class_declaration(s$p, param._1), + _2: param._2 + }; + case /* Sig_class_type */6 : + return { + TAG: /* Sig_class_type */6, + _0: param$1, + _1: cltype_declaration(s$p, param._1), + _2: param._2 + }; + + } + }), sg, match[0]); } function module_declaration(s, decl) { @@ -11231,8 +11231,8 @@ function module_declaration(s, decl) { function modtype_declaration(s, decl) { return { mtd_type: may_map((function (param) { - return modtype(s, param); - }), decl.mtd_type), + return modtype(s, param); + }), decl.mtd_type), mtd_attributes: attrs(s, decl.mtd_attributes), mtd_loc: loc(s, decl.mtd_loc) }; @@ -11240,15 +11240,15 @@ function modtype_declaration(s, decl) { const add_delayed_check_forward = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 9717, - 46 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 9717, + 46 + ] + }); + }) }; const value_declarations = Stdlib__Hashtbl.create(undefined, 16); @@ -11336,9 +11336,9 @@ function already_defined(s, tbl) { function add$6(kind, slot, id, x, tbl, ref_tbl) { const slot$1 = slot !== undefined ? (function (param) { - const s = id.name; - Curry._3(slot, kind, s, already_defined(s, ref_tbl)); - }) : nothing; + const s = id.name; + Curry._3(slot, kind, s, already_defined(s, ref_tbl)); + }) : nothing; return add(id, [ x, slot$1 @@ -11460,67 +11460,67 @@ function is_implicit_coercion(env) { const components_of_module$p = { contents: (function (env, sub, path, mty) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 9965, - 32 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 9965, + 32 + ] + }); + }) }; const components_of_module_maker$p = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 9968, - 37 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 9968, + 37 + ] + }); + }) }; const components_of_functor_appl$p = { contents: (function (f, p1, p2) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 9971, - 23 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 9971, + 23 + ] + }); + }) }; const check_modtype_inclusion = { contents: (function (env, mty1, path1, mty2) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 9975, - 35 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 9975, + 35 + ] + }); + }) }; const strengthen = { contents: (function (env, mty, path) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 9979, - 28 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 9979, + 28 + ] + }); + }) }; const current_unit = { @@ -11693,36 +11693,36 @@ function check_consistency(ps) { } try { Stdlib__List.iter((function (param) { - const crco = param[1]; - if (crco === undefined) { + const crco = param[1]; + if (crco === undefined) { + return; + } + const name = param[0]; + add_import(name); + let source = ps.ps_filename; + try { + const match = Stdlib__Hashtbl.find(crc_units, name); + if (!Caml_obj.caml_notequal(crco, match[0])) { return; } - const name = param[0]; - add_import(name); - let source = ps.ps_filename; - try { - const match = Stdlib__Hashtbl.find(crc_units, name); - if (!Caml_obj.caml_notequal(crco, match[0])) { - return; - } - throw new Caml_js_exceptions.MelangeError(Inconsistency, { - MEL_EXN_ID: Inconsistency, - _1: name, - _2: source, - _3: match[1] - }); - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return Stdlib__Hashtbl.add(crc_units, name, [ - crco, - source - ]); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + throw new Caml_js_exceptions.MelangeError(Inconsistency, { + MEL_EXN_ID: Inconsistency, + _1: name, + _2: source, + _3: match[1] + }); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return Stdlib__Hashtbl.add(crc_units, name, [ + crco, + source + ]); } - }), ps.ps_crcs); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), ps.ps_crcs); ps.ps_crcs_checked = true; return; } @@ -11789,18 +11789,18 @@ function read_pers_struct(modname, filename) { } add_import(name); Stdlib__List.iter((function (param) { - if (recursive_types.contents) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Need_recursive_types */2, - _0: ps.ps_name, - _1: current_unit.contents - } - }); - }), ps.ps_flags); + if (recursive_types.contents) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Need_recursive_types */2, + _0: ps.ps_name, + _1: current_unit.contents + } + }); + }), ps.ps_flags); Stdlib__Hashtbl.add(persistent_structures, modname, ps); return ps; } @@ -11920,34 +11920,34 @@ function find$3(proj1, proj2, path, env) { function find_value(param, param$1) { return find$3((function (env) { - return env.values; - }), (function (sc) { - return sc.comp_values; - }), param, param$1); + return env.values; + }), (function (sc) { + return sc.comp_values; + }), param, param$1); } function find_type_full(param, param$1) { return find$3((function (env) { - return env.types; - }), (function (sc) { - return sc.comp_types; - }), param, param$1); + return env.types; + }), (function (sc) { + return sc.comp_types; + }), param, param$1); } function find_modtype(param, param$1) { return find$3((function (env) { - return env.modtypes; - }), (function (sc) { - return sc.comp_modtypes; - }), param, param$1); + return env.modtypes; + }), (function (sc) { + return sc.comp_modtypes; + }), param, param$1); } function find_class(param, param$1) { return find$3((function (env) { - return env.classes; - }), (function (sc) { - return sc.comp_classes; - }), param, param$1); + return env.classes; + }), (function (sc) { + return sc.comp_classes; + }), param, param$1); } function find_module(alias, path, env) { @@ -12040,8 +12040,8 @@ const required_globals = { function add_required_global(id) { if ($$global(id) && !transparent_modules.contents && !Stdlib__List.exists((function (param) { - return Caml_obj.caml_equal(id, param); - }), required_globals.contents)) { + return Caml_obj.caml_equal(id, param); + }), required_globals.contents)) { required_globals.contents = { hd: id, tl: required_globals.contents @@ -12157,8 +12157,8 @@ function find_type_expansion(path, env) { decl.type_params, body, may_map((function (prim) { - return prim[1]; - }), decl.type_newtype_level) + return prim[1]; + }), decl.type_newtype_level) ]; } const path$p = normalize_path$1(undefined, env, path); @@ -12178,8 +12178,8 @@ function find_type_expansion(path, env) { } }), may_map((function (prim) { - return prim[1]; - }), decl.type_newtype_level) + return prim[1]; + }), decl.type_newtype_level) ]; } @@ -12191,8 +12191,8 @@ function find_type_expansion_opt(path, env) { decl.type_params, body, may_map((function (prim) { - return prim[1]; - }), decl.type_newtype_level) + return prim[1]; + }), decl.type_newtype_level) ]; } const path$p = normalize_path$1(undefined, env, path); @@ -12212,8 +12212,8 @@ function find_type_expansion_opt(path, env) { } }), may_map((function (prim) { - return prim[1]; - }), decl.type_newtype_level) + return prim[1]; + }), decl.type_newtype_level) ]; } @@ -12476,8 +12476,8 @@ function lookup_all_simple(proj1, proj2, shadow, lid, env) { match[1] ], tl: do_shadow(Stdlib__List.filter((function (param) { - return !Curry._2(shadow, x, param[0]); - }), param.tl)) + return !Curry._2(shadow, x, param[0]); + }), param.tl)) }; }; return do_shadow(xl); @@ -12498,13 +12498,13 @@ function lookup_all_simple(proj1, proj2, shadow, lid, env) { } } return Stdlib__List.map((function (param) { - return [ - param[0], - (function (param) { - - }) - ]; - }), comps); + return [ + param[0], + (function (param) { + + }) + ]; + }), comps); } throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found @@ -12543,58 +12543,58 @@ function lbl_shadow(lbl1, lbl2) { function lookup_value(param, param$1) { return lookup((function (env) { - return env.values; - }), (function (sc) { - return sc.comp_values; - }), param, param$1); + return env.values; + }), (function (sc) { + return sc.comp_values; + }), param, param$1); } function lookup_all_constructors(param, param$1) { return lookup_all_simple((function (env) { - return env.constrs; - }), (function (sc) { - return sc.comp_constrs; - }), cstr_shadow, param, param$1); + return env.constrs; + }), (function (sc) { + return sc.comp_constrs; + }), cstr_shadow, param, param$1); } function lookup_all_labels(param, param$1) { return lookup_all_simple((function (env) { - return env.labels; - }), (function (sc) { - return sc.comp_labels; - }), lbl_shadow, param, param$1); + return env.labels; + }), (function (sc) { + return sc.comp_labels; + }), lbl_shadow, param, param$1); } function lookup_type(param, param$1) { return lookup((function (env) { - return env.types; - }), (function (sc) { - return sc.comp_types; - }), param, param$1); + return env.types; + }), (function (sc) { + return sc.comp_types; + }), param, param$1); } function lookup_modtype(param, param$1) { return lookup((function (env) { - return env.modtypes; - }), (function (sc) { - return sc.comp_modtypes; - }), param, param$1); + return env.modtypes; + }), (function (sc) { + return sc.comp_modtypes; + }), param, param$1); } function lookup_class(param, param$1) { return lookup((function (env) { - return env.classes; - }), (function (sc) { - return sc.comp_classes; - }), param, param$1); + return env.classes; + }), (function (sc) { + return sc.comp_classes; + }), param, param$1); } function lookup_cltype(param, param$1) { return lookup((function (env) { - return env.cltypes; - }), (function (sc) { - return sc.comp_cltypes; - }), param, param$1); + return env.cltypes; + }), (function (sc) { + return sc.comp_cltypes; + }), param, param$1); } function mark_value_used(env, name, vd) { @@ -12704,8 +12704,8 @@ function set_type_used_callback(name, td, callback) { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } Stdlib__Hashtbl.replace(type_declarations, key, (function (param) { - Curry._1(callback, old); - })); + Curry._1(callback, old); + })); } function lookup_value$1(lid, env) { @@ -12793,16 +12793,16 @@ function lookup_all_constructors$1(lid, env) { try { const cstrs = lookup_all_constructors(lid, env); return Stdlib__List.map((function (param) { - const use = param[1]; - const cstr = param[0]; - return [ - cstr, - (function (param) { - mark_type_path(env, ty_path(cstr.cstr_res)); - return Curry._1(use, undefined); - }) - ]; - }), cstrs); + const use = param[1]; + const cstr = param[0]; + return [ + cstr, + (function (param) { + mark_type_path(env, ty_path(cstr.cstr_res)); + return Curry._1(use, undefined); + }) + ]; + }), cstrs); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -12871,16 +12871,16 @@ function lookup_all_labels$1(lid, env) { try { const lbls = lookup_all_labels(lid, env); return Stdlib__List.map((function (param) { - const use = param[1]; - const lbl = param[0]; - return [ - lbl, - (function (param) { - mark_type_path(env, ty_path(lbl.lbl_res)); - return Curry._1(use, undefined); - }) - ]; - }), lbls); + const use = param[1]; + const lbl = param[0]; + return [ + lbl, + (function (param) { + mark_type_path(env, ty_path(lbl.lbl_res)); + return Curry._1(use, undefined); + }) + ]; + }), lbls); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -12947,8 +12947,8 @@ function scrape_alias_safe(env, _mty) { function run_iter_cont(l) { iter_env_cont.contents = /* [] */0; Stdlib__List.iter((function (c) { - Curry._1(c, undefined); - }), l); + Curry._1(c, undefined); + }), l); const cont = Stdlib__List.rev(iter_env_cont.contents); iter_env_cont.contents = /* [] */0; return cont; @@ -12963,11 +12963,11 @@ function iter_types(f) { return sc.comp_types; }; iter((function (id, param) { - Curry._2(f, { - TAG: /* Pident */0, - _0: id - }, param[0]); - }), Curry._1(proj1, param)); + Curry._2(f, { + TAG: /* Pident */0, + _0: id + }, param[0]); + }), Curry._1(proj1, param)); const iter_components = function (path, path$p, mcomps) { const cont = function (param) { const match = get_arg(mcomps); @@ -12996,36 +12996,36 @@ function iter_types(f) { } const comps$1 = comps._0; iter$2((function (s, param) { - const n = param[1]; - Curry._2(f, { - TAG: /* Pdot */1, - _0: path, - _1: s, - _2: n - }, [ - { - TAG: /* Pdot */1, - _0: path$p, - _1: s, - _2: n - }, - param[0] - ]); - }), Curry._1(proj2, comps$1)); - iter$2((function (s, param) { - const n = param[1]; - iter_components({ - TAG: /* Pdot */1, - _0: path, - _1: s, - _2: n - }, { + const n = param[1]; + Curry._2(f, { + TAG: /* Pdot */1, + _0: path, + _1: s, + _2: n + }, [ + { TAG: /* Pdot */1, _0: path$p, _1: s, _2: n - }, param[0]); - }), comps$1.comp_components); + }, + param[0] + ]); + }), Curry._1(proj2, comps$1)); + iter$2((function (s, param) { + const n = param[1]; + iter_components({ + TAG: /* Pdot */1, + _0: path, + _1: s, + _2: n + }, { + TAG: /* Pdot */1, + _0: path$p, + _1: s, + _2: n + }, param[0]); + }), comps$1.comp_components); }; iter_env_cont.contents = { hd: [ @@ -13036,26 +13036,26 @@ function iter_types(f) { }; }; Stdlib__Hashtbl.iter((function (s, pso) { - if (pso === undefined) { - return; + if (pso === undefined) { + return; + } + const id = { + TAG: /* Pident */0, + _0: { + stamp: 0, + name: s, + flags: 1 } - const id = { - TAG: /* Pident */0, - _0: { - stamp: 0, - name: s, - flags: 1 - } - }; - iter_components(id, id, pso.ps_comps); - }), persistent_structures); + }; + iter_components(id, id, pso.ps_comps); + }), persistent_structures); return iter((function (id, param) { - const match = param[0]; - iter_components({ - TAG: /* Pident */0, - _0: id - }, match[0], match[1]); - }), param.components); + const match = param[0]; + iter_components({ + TAG: /* Pident */0, + _0: id + }, match[0], match[1]); + }), param.components); }; } @@ -13072,12 +13072,12 @@ function used_persistent(param) { contents: /* Empty */0 }; Stdlib__Hashtbl.iter((function (s, pso) { - if (pso !== undefined) { - r.contents = Curry._2(add$2, s, r.contents); - return; - } - - }), persistent_structures); + if (pso !== undefined) { + r.contents = Curry._2(add$2, s, r.contents); + return; + } + + }), persistent_structures); return r.contents; } @@ -13114,16 +13114,16 @@ function find_shadowed_comps(path, env) { switch (path.TAG) { case /* Pident */0 : return Stdlib__List.map((function (prim) { - return prim[0]; - }), find_all(path._0.name, env.components)); + return prim[0]; + }), find_all(path._0.name, env.components)); case /* Pdot */1 : const s = path._1; const 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; - }), s, param); - }), l)); + return find_all_comps((function (comps) { + return comps.comp_components; + }), s, param); + }), l)); case /* Papply */2 : return /* [] */0; @@ -13134,14 +13134,14 @@ function find_shadowed(proj1, proj2, path, env) { switch (path.TAG) { case /* Pident */0 : return Stdlib__List.map((function (prim) { - return prim[0]; - }), find_all(path._0.name, Curry._1(proj1, env))); + return prim[0]; + }), find_all(path._0.name, Curry._1(proj1, env))); case /* Pdot */1 : const s = path._1; const l = find_shadowed_comps(path._0, env); return Stdlib__List.flatten(Stdlib__List.map((function (param) { - return find_all_comps(proj2, s, param); - }), l)); + return find_all_comps(proj2, s, param); + }), l)); case /* Papply */2 : return /* [] */0; @@ -13150,13 +13150,13 @@ function find_shadowed(proj1, proj2, path, env) { function find_shadowed_types(path, env) { const l = find_shadowed((function (env) { - return env.types; - }), (function (comps) { - return comps.comp_types; - }), path, env); + return env.types; + }), (function (comps) { + return comps.comp_types; + }), path, env); return Stdlib__List.map((function (prim) { - return prim[0]; - }), l); + return prim[0]; + }), l); } function add_gadt_instance_level(lv, env) { @@ -13206,8 +13206,8 @@ function gadt_instance_level(env, t) { const 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)); - }), r.contents, /* Empty */0); + return Curry._1(add$3, repr(ty)); + }), r.contents, /* Empty */0); } if (Curry._2(mem$3, t, r.contents)) { return Caml_option.some(match[0]); @@ -13336,17 +13336,17 @@ function constructors_of_type(ty_path, decl) { contents: 0 }; Stdlib__List.iter((function (param) { - if (Caml_obj.caml_equal(param.cd_args, /* [] */0)) { - num_consts.contents = num_consts.contents + 1 | 0; - } else { - num_nonconsts.contents = num_nonconsts.contents + 1 | 0; - } - if (param.cd_res === undefined) { - num_normal.contents = num_normal.contents + 1 | 0; - return; - } - - }), cstrs$1); + if (Caml_obj.caml_equal(param.cd_args, /* [] */0)) { + num_consts.contents = num_consts.contents + 1 | 0; + } else { + num_nonconsts.contents = num_nonconsts.contents + 1 | 0; + } + if (param.cd_res === undefined) { + num_normal.contents = num_normal.contents + 1 | 0; + return; + } + + }), cstrs$1); const describe_constructors = function (idx_const, idx_nonconst, param) { if (!param) { return /* [] */0; @@ -13732,59 +13732,59 @@ function prefix_idents_and_subst(root, sub, sg) { { LAZY_DONE: false, VAL: (function () { - return Stdlib__List.map((function (item) { - switch (item.TAG) { - case /* Sig_value */0 : - return { - TAG: /* Sig_value */0, - _0: item._0, - _1: value_description(sub$1, item._1) - }; - case /* Sig_type */1 : - return { - TAG: /* Sig_type */1, - _0: item._0, - _1: type_declaration(sub$1, item._1), - _2: item._2 - }; - case /* Sig_typext */2 : - return { - TAG: /* Sig_typext */2, - _0: item._0, - _1: extension_constructor(sub$1, item._1), - _2: item._2 - }; - case /* Sig_module */3 : - return { - TAG: /* Sig_module */3, - _0: item._0, - _1: module_declaration(sub$1, item._1), - _2: item._2 - }; - case /* Sig_modtype */4 : - return { - TAG: /* Sig_modtype */4, - _0: item._0, - _1: modtype_declaration(sub$1, item._1) - }; - case /* Sig_class */5 : - return { - TAG: /* Sig_class */5, - _0: item._0, - _1: class_declaration(sub$1, item._1), - _2: item._2 - }; - case /* Sig_class_type */6 : - return { - TAG: /* Sig_class_type */6, - _0: item._0, - _1: cltype_declaration(sub$1, item._1), - _2: item._2 - }; - - } - }), sg); - }) + return Stdlib__List.map((function (item) { + switch (item.TAG) { + case /* Sig_value */0 : + return { + TAG: /* Sig_value */0, + _0: item._0, + _1: value_description(sub$1, item._1) + }; + case /* Sig_type */1 : + return { + TAG: /* Sig_type */1, + _0: item._0, + _1: type_declaration(sub$1, item._1), + _2: item._2 + }; + case /* Sig_typext */2 : + return { + TAG: /* Sig_typext */2, + _0: item._0, + _1: extension_constructor(sub$1, item._1), + _2: item._2 + }; + case /* Sig_module */3 : + return { + TAG: /* Sig_module */3, + _0: item._0, + _1: module_declaration(sub$1, item._1), + _2: item._2 + }; + case /* Sig_modtype */4 : + return { + TAG: /* Sig_modtype */4, + _0: item._0, + _1: modtype_declaration(sub$1, item._1) + }; + case /* Sig_class */5 : + return { + TAG: /* Sig_class */5, + _0: item._0, + _1: class_declaration(sub$1, item._1), + _2: item._2 + }; + case /* Sig_class_type */6 : + return { + TAG: /* Sig_class_type */6, + _0: item._0, + _1: cltype_declaration(sub$1, item._1), + _2: item._2 + }; + + } + }), sg); + }) } ]; } @@ -13997,15 +13997,15 @@ function check_usage(loc, id, warn, tbl) { contents: false }; Stdlib__Hashtbl.add(tbl, key, (function (param) { - used.contents = true; - })); + used.contents = true; + })); if (!(name === "" || Caml_string.get(name, 0) === /* '_' */95 || Caml_string.get(name, 0) === /* '#' */35)) { return Curry._1(add_delayed_check_forward.contents, (function (param) { - if (!used.contents) { - return prerr_warning(loc, Curry._1(warn, name)); - } - - })); + if (!used.contents) { + return prerr_warning(loc, Curry._1(warn, name)); + } + + })); } } @@ -14037,126 +14037,126 @@ function components_of_module_maker(param) { contents: 0 }; Stdlib__List.iter2((function (item, path) { - switch (item.TAG) { - case /* Sig_value */0 : - const decl = item._1; - const decl$p = value_description(sub$1, decl); - c.comp_values = add$5(item._0.name, [ - decl$p, - pos.contents - ], c.comp_values); - const match = decl.val_kind; - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Val_prim */0) { - pos.contents = pos.contents + 1 | 0; - return; - } else { - return; - } - case /* Sig_type */1 : - const decl$1 = item._1; - const id = item._0; - const decl$p$1 = type_declaration(sub$1, decl$1); - const constructors = Stdlib__List.map((function (prim) { - return prim[1]; - }), constructors_of_type(path, decl$p$1)); - const labels = Stdlib__List.map((function (prim) { - return prim[1]; - }), labels_of_type(path, decl$p$1)); - c.comp_types = add$5(id.name, [ - [ - decl$p$1, - [ - constructors, - labels - ] - ], - -1 - ], c.comp_types); - Stdlib__List.iter((function (descr) { - c.comp_constrs = add_to_tbl(descr.cstr_name, [ - descr, - -1 - ], c.comp_constrs); - }), constructors); - Stdlib__List.iter((function (descr) { - c.comp_labels = add_to_tbl(descr.lbl_name, [ - descr, - -1 - ], c.comp_labels); - }), labels); - env$1.contents = store_type_infos(undefined, id, { - TAG: /* Pident */0, - _0: id - }, decl$1, env$1.contents, env$1.contents); - return; - case /* Sig_typext */2 : - const ext$p = extension_constructor(sub$1, item._1); - const descr = extension_descr(path, ext$p); - c.comp_constrs = add_to_tbl(item._0.name, [ - descr, - pos.contents - ], c.comp_constrs); + switch (item.TAG) { + case /* Sig_value */0 : + const decl = item._1; + const decl$p = value_description(sub$1, decl); + c.comp_values = add$5(item._0.name, [ + decl$p, + pos.contents + ], c.comp_values); + const match = decl.val_kind; + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Val_prim */0) { pos.contents = pos.contents + 1 | 0; return; - case /* Sig_module */3 : - const md = item._1; - const id$1 = item._0; - const mty = md.md_type; - const mty$p = { - contents: { - TAG: /* Thunk */2, - _0: [ - sub$1, - mty - ] - } - }; - c.comp_modules = add$5(id$1.name, [ - mty$p, - pos.contents - ], c.comp_modules); - const comps = components_of_module(env$1.contents, sub$1, path, mty); - c.comp_components = add$5(id$1.name, [ - comps, - pos.contents - ], c.comp_components); - env$1.contents = store_module(undefined, id$1, { - TAG: /* Pident */0, - _0: id$1 - }, md, env$1.contents, env$1.contents); - pos.contents = pos.contents + 1 | 0; - return; - case /* Sig_modtype */4 : - const decl$2 = item._1; - const id$2 = item._0; - const decl$p$2 = modtype_declaration(sub$1, decl$2); - c.comp_modtypes = add$5(id$2.name, [ - decl$p$2, - -1 - ], c.comp_modtypes); - env$1.contents = store_modtype(undefined, id$2, { - TAG: /* Pident */0, - _0: id$2 - }, decl$2, env$1.contents, env$1.contents); - return; - case /* Sig_class */5 : - const decl$p$3 = class_declaration(sub$1, item._1); - c.comp_classes = add$5(item._0.name, [ - decl$p$3, - pos.contents - ], c.comp_classes); - pos.contents = pos.contents + 1 | 0; - return; - case /* Sig_class_type */6 : - const decl$p$4 = cltype_declaration(sub$1, item._1); - c.comp_cltypes = add$5(item._0.name, [ - decl$p$4, - pos.contents - ], c.comp_cltypes); + } else { return; - - } - }), sg$1, match[0]); + } + case /* Sig_type */1 : + const decl$1 = item._1; + const id = item._0; + const decl$p$1 = type_declaration(sub$1, decl$1); + const constructors = Stdlib__List.map((function (prim) { + return prim[1]; + }), constructors_of_type(path, decl$p$1)); + const labels = Stdlib__List.map((function (prim) { + return prim[1]; + }), labels_of_type(path, decl$p$1)); + c.comp_types = add$5(id.name, [ + [ + decl$p$1, + [ + constructors, + labels + ] + ], + -1 + ], c.comp_types); + Stdlib__List.iter((function (descr) { + c.comp_constrs = add_to_tbl(descr.cstr_name, [ + descr, + -1 + ], c.comp_constrs); + }), constructors); + Stdlib__List.iter((function (descr) { + c.comp_labels = add_to_tbl(descr.lbl_name, [ + descr, + -1 + ], c.comp_labels); + }), labels); + env$1.contents = store_type_infos(undefined, id, { + TAG: /* Pident */0, + _0: id + }, decl$1, env$1.contents, env$1.contents); + return; + case /* Sig_typext */2 : + const ext$p = extension_constructor(sub$1, item._1); + const descr = extension_descr(path, ext$p); + c.comp_constrs = add_to_tbl(item._0.name, [ + descr, + pos.contents + ], c.comp_constrs); + pos.contents = pos.contents + 1 | 0; + return; + case /* Sig_module */3 : + const md = item._1; + const id$1 = item._0; + const mty = md.md_type; + const mty$p = { + contents: { + TAG: /* Thunk */2, + _0: [ + sub$1, + mty + ] + } + }; + c.comp_modules = add$5(id$1.name, [ + mty$p, + pos.contents + ], c.comp_modules); + const comps = components_of_module(env$1.contents, sub$1, path, mty); + c.comp_components = add$5(id$1.name, [ + comps, + pos.contents + ], c.comp_components); + env$1.contents = store_module(undefined, id$1, { + TAG: /* Pident */0, + _0: id$1 + }, md, env$1.contents, env$1.contents); + pos.contents = pos.contents + 1 | 0; + return; + case /* Sig_modtype */4 : + const decl$2 = item._1; + const id$2 = item._0; + const decl$p$2 = modtype_declaration(sub$1, decl$2); + c.comp_modtypes = add$5(id$2.name, [ + decl$p$2, + -1 + ], c.comp_modtypes); + env$1.contents = store_modtype(undefined, id$2, { + TAG: /* Pident */0, + _0: id$2 + }, decl$2, env$1.contents, env$1.contents); + return; + case /* Sig_class */5 : + const decl$p$3 = class_declaration(sub$1, item._1); + c.comp_classes = add$5(item._0.name, [ + decl$p$3, + pos.contents + ], c.comp_classes); + pos.contents = pos.contents + 1 | 0; + return; + case /* Sig_class_type */6 : + const decl$p$4 = cltype_declaration(sub$1, item._1); + c.comp_cltypes = add$5(item._0.name, [ + decl$p$4, + pos.contents + ], c.comp_cltypes); + return; + + } + }), sg$1, match[0]); return { TAG: /* Structure_comps */0, _0: c @@ -14167,8 +14167,8 @@ function components_of_module_maker(param) { _0: { fcomp_param: sg._0, fcomp_arg: may_map((function (param) { - return modtype(sub, param); - }), sg._1), + return modtype(sub, param); + }), sg._1), fcomp_res: sg._2, fcomp_env: env, fcomp_subst: sub, @@ -14200,8 +14200,8 @@ function components_of_module_maker(param) { function store_value(check, slot, id, path, decl, env, renv) { check_value_name(id.name, decl.val_loc); may((function (f) { - check_usage(decl.val_loc, id, f, value_declarations); - }), check); + check_usage(decl.val_loc, id, f, value_declarations); + }), check); return { values: add$6("value", slot, id, [ path, @@ -14232,20 +14232,20 @@ function store_type(check, slot, id, path, info, env, renv) { const loc = info.type_loc; if (check) { check_usage(loc, id, (function (s) { - return { - TAG: /* Unused_type_declaration */18, - _0: s - }; - }), type_declarations); + return { + TAG: /* Unused_type_declaration */18, + _0: s + }; + }), type_declarations); } const constructors = constructors_of_type(path, info); const labels = labels_of_type(path, info); const descrs_0 = Stdlib__List.map((function (prim) { - return prim[1]; - }), constructors); + return prim[1]; + }), constructors); const descrs_1 = Stdlib__List.map((function (prim) { - return prim[1]; - }), labels); + return prim[1]; + }), labels); const descrs = [ descrs_0, descrs_1 @@ -14258,47 +14258,47 @@ function store_type(check, slot, id, path, info, env, renv) { })) { const ty = id.name; Stdlib__List.iter((function (param) { - const c = param[1].cstr_name; - const k = [ - ty, - loc, - c - ]; - if (Stdlib__Hashtbl.mem(used_constructors, k)) { - return; - } - const used = { - cu_positive: false, - cu_pattern: false, - cu_privatize: false - }; - Stdlib__Hashtbl.add(used_constructors, k, (function (param) { - return add_constructor_usage(used, param); - })); - if (!(ty === "" || Caml_string.get(ty, 0) === /* '_' */95)) { - return Curry._1(add_delayed_check_forward.contents, (function (param) { - if (!is_in_signature(env) && !used.cu_positive) { - return prerr_warning(loc, { - TAG: /* Unused_constructor */21, - _0: c, - _1: used.cu_pattern, - _2: used.cu_privatize - }); - } - - })); - } - - }), constructors); + const c = param[1].cstr_name; + const k = [ + ty, + loc, + c + ]; + if (Stdlib__Hashtbl.mem(used_constructors, k)) { + return; + } + const used = { + cu_positive: false, + cu_pattern: false, + cu_privatize: false + }; + Stdlib__Hashtbl.add(used_constructors, k, (function (param) { + return add_constructor_usage(used, param); + })); + if (!(ty === "" || Caml_string.get(ty, 0) === /* '_' */95)) { + return Curry._1(add_delayed_check_forward.contents, (function (param) { + if (!is_in_signature(env) && !used.cu_positive) { + return prerr_warning(loc, { + TAG: /* Unused_constructor */21, + _0: c, + _1: used.cu_pattern, + _2: used.cu_privatize + }); + } + + })); + } + + }), constructors); } return { values: env.values, constrs: Stdlib__List.fold_right((function (param, constrs) { - return add$6("constructor", slot, param[0], param[1], constrs, renv.constrs); - }), constructors, env.constrs), + return add$6("constructor", slot, param[0], param[1], constrs, renv.constrs); + }), constructors, env.constrs), labels: Stdlib__List.fold_right((function (param, labels) { - return add$6("label", slot, param[0], param[1], labels, renv.labels); - }), labels, env.labels), + return add$6("label", slot, param[0], param[1], labels, renv.labels); + }), labels, env.labels), types: add$6("type", slot, id, [ path, [ @@ -14346,19 +14346,19 @@ function store_extension(check, slot, id, path, ext, env, renv) { cu_privatize: false }; Stdlib__Hashtbl.add(used_constructors, k, (function (param) { - return add_constructor_usage(used, param); - })); + return add_constructor_usage(used, param); + })); Curry._1(add_delayed_check_forward.contents, (function (param) { - if (!is_in_signature(env) && !used.cu_positive) { - return prerr_warning(loc, { - TAG: /* Unused_extension */22, - _0: n, - _1: used.cu_pattern, - _2: used.cu_privatize - }); - } - - })); + if (!is_in_signature(env) && !used.cu_positive) { + return prerr_warning(loc, { + TAG: /* Unused_extension */22, + _0: n, + _1: used.cu_pattern, + _2: used.cu_privatize + }); + } + + })); } } @@ -14617,15 +14617,15 @@ function enter(store_fun, name, data, env) { function enter_value(check) { return function (param, param$1, param$2) { return enter((function (param, param$1, param$2, param$3, param$4, param$5) { - return store_value(check, param, param$1, param$2, param$3, param$4, param$5); - }), param, param$1, param$2); + return store_value(check, param, param$1, param$2, param$3, param$4, param$5); + }), param, param$1, param$2); }; } function enter_type(param, param$1, param$2) { return enter((function (param, param$1, param$2, param$3, param$4, param$5) { - return store_type(true, param, param$1, param$2, param$3, param$4, param$5); - }), param, param$1, param$2); + return store_type(true, param, param$1, param$2, param$3, param$4, param$5); + }), param, param$1, param$2); } function enter_module_declaration(arg, name, md, env) { @@ -14685,24 +14685,24 @@ function open_signature(slot, root, sg, env0) { const match = prefix_idents_and_subst$1(root, identity, sg); const sg$1 = CamlinternalLazy.force(match[2]); const newenv = Stdlib__List.fold_left2((function (env, item, p) { - switch (item.TAG) { - case /* Sig_value */0 : - return store_value(undefined, slot, hide(item._0), p, item._1, env, env0); - case /* Sig_type */1 : - return store_type(false, slot, hide(item._0), p, item._1, env, env0); - case /* Sig_typext */2 : - return store_extension(false, slot, hide(item._0), p, item._1, env, env0); - case /* Sig_module */3 : - return store_module(slot, hide(item._0), p, item._1, env, env0); - case /* Sig_modtype */4 : - return store_modtype(slot, hide(item._0), p, item._1, env, env0); - case /* Sig_class */5 : - return store_class(slot, hide(item._0), p, item._1, env, env0); - case /* Sig_class_type */6 : - return store_cltype(slot, hide(item._0), p, item._1, env, env0); - - } - }), env0, sg$1, match[0]); + switch (item.TAG) { + case /* Sig_value */0 : + return store_value(undefined, slot, hide(item._0), p, item._1, env, env0); + case /* Sig_type */1 : + return store_type(false, slot, hide(item._0), p, item._1, env, env0); + case /* Sig_typext */2 : + return store_extension(false, slot, hide(item._0), p, item._1, env, env0); + case /* Sig_module */3 : + return store_module(slot, hide(item._0), p, item._1, env, env0); + case /* Sig_modtype */4 : + return store_modtype(slot, hide(item._0), p, item._1, env, env0); + case /* Sig_class */5 : + return store_class(slot, hide(item._0), p, item._1, env, env0); + case /* Sig_class_type */6 : + return store_cltype(slot, hide(item._0), p, item._1, env, env0); + + } + }), env0, sg$1, match[0]); return { values: newenv.values, constrs: newenv.constrs, @@ -14729,31 +14729,31 @@ function open_signature$1(locOpt, toplevelOpt, ovf, root, sg, env) { const loc = locOpt !== undefined ? locOpt : none; const toplevel = toplevelOpt !== undefined ? toplevelOpt : false; if (!(!toplevel && ovf === /* Fresh */1 && !loc.loc_ghost && (is_active({ - TAG: /* Unused_open */17, - _0: "" - }) || is_active({ - TAG: /* Open_shadow_identifier */27, - _0: "", - _1: "" - }) || is_active({ - TAG: /* Open_shadow_label_constructor */28, - _0: "", - _1: "" - })))) { + TAG: /* Unused_open */17, + _0: "" + }) || is_active({ + TAG: /* Open_shadow_identifier */27, + _0: "", + _1: "" + }) || is_active({ + TAG: /* Open_shadow_label_constructor */28, + _0: "", + _1: "" + })))) { return open_signature(undefined, root, sg, env); } const used = { contents: false }; Curry._1(add_delayed_check_forward.contents, (function (param) { - if (!used.contents) { - return prerr_warning(loc, { - TAG: /* Unused_open */17, - _0: name(undefined, root) - }); - } - - })); + if (!used.contents) { + return prerr_warning(loc, { + TAG: /* Unused_open */17, + _0: name(undefined, root) + }); + } + + })); const shadowed = { contents: /* [] */0 }; @@ -14803,15 +14803,15 @@ function imports(param) { const 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) { - return acc; - } else { - return { - hd: m, - tl: acc - }; - } - }), imported_units.contents, /* [] */0), crc_units); + if (m === dont_record_crc_unit$1) { + return acc; + } else { + return { + hd: m, + tl: acc + }; + } + }), imported_units.contents, /* [] */0), crc_units); } else { return extract(Curry._1(elements$2, imported_units.contents), crc_units); } @@ -14885,13 +14885,13 @@ function find_all$1(proj1, proj2, f, lid, env, acc) { const 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, { - TAG: /* Pdot */1, - _0: p, - _1: s, - _2: param[1] - }, param[0], acc); - }), Curry._1(proj2, c._0), acc); + return Curry._4(f, s, { + TAG: /* Pdot */1, + _0: p, + _1: s, + _2: param[1] + }, param[0], acc); + }), Curry._1(proj2, c._0), acc); } else { return acc; } @@ -14907,12 +14907,12 @@ function find_all_simple_list(proj1, proj2, f, lid, env, acc) { const c = force(components_of_module_maker, match[1]); if (c.TAG === /* Structure_comps */0) { return fold$4((function (s, comps, acc) { - if (comps) { - return Curry._2(f, comps.hd[0], acc); - } else { - return acc; - } - }), Curry._1(proj2, c._0), acc); + if (comps) { + return Curry._2(f, comps.hd[0], acc); + } else { + return acc; + } + }), Curry._1(proj2, c._0), acc); } else { return acc; } @@ -14925,18 +14925,18 @@ function fold_modules(f, lid, env, acc) { const c = force(components_of_module_maker, match[1]); if (c.TAG === /* Structure_comps */0) { return fold$4((function (s, param, acc) { - const md_type = force(subst_modtype_maker, param[0]); - return Curry._4(f, s, { - TAG: /* Pdot */1, - _0: p, - _1: s, - _2: param[1] - }, { - md_type: md_type, - md_attributes: /* [] */0, - md_loc: none - }, acc); - }), c._0.comp_modules, acc); + const md_type = force(subst_modtype_maker, param[0]); + return Curry._4(f, s, { + TAG: /* Pdot */1, + _0: p, + _1: s, + _2: param[1] + }, { + md_type: md_type, + md_attributes: /* [] */0, + md_loc: none + }, acc); + }), c._0.comp_modules, acc); } else { return acc; } @@ -14945,103 +14945,103 @@ function fold_modules(f, lid, env, acc) { return Curry._4(f, id.name, param[0], param[1], acc); })(env.modules, acc); return Stdlib__Hashtbl.fold((function (name, ps, acc) { - if (ps !== undefined) { - return Curry._4(f, name, { - TAG: /* Pident */0, - _0: { - stamp: 0, - name: name, - flags: 1 - } - }, { - md_type: { - TAG: /* Mty_signature */1, - _0: ps.ps_sig - }, - md_attributes: /* [] */0, - md_loc: none - }, acc); - } else { - return acc; - } - }), persistent_structures, acc$1); + if (ps !== undefined) { + return Curry._4(f, name, { + TAG: /* Pident */0, + _0: { + stamp: 0, + name: name, + flags: 1 + } + }, { + md_type: { + TAG: /* Mty_signature */1, + _0: ps.ps_sig + }, + md_attributes: /* [] */0, + md_loc: none + }, acc); + } else { + return acc; + } + }), persistent_structures, acc$1); } function fold_values(f) { return function (param, param$1, param$2) { return find_all$1((function (env) { - return env.values; - }), (function (sc) { - return sc.comp_values; - }), f, param, param$1, param$2); + return env.values; + }), (function (sc) { + return sc.comp_values; + }), f, param, param$1, param$2); }; } function fold_constructors(f) { return function (param, param$1, param$2) { return find_all_simple_list((function (env) { - return env.constrs; - }), (function (sc) { - return sc.comp_constrs; - }), f, param, param$1, param$2); + return env.constrs; + }), (function (sc) { + return sc.comp_constrs; + }), f, param, param$1, param$2); }; } function fold_labels(f) { return function (param, param$1, param$2) { return find_all_simple_list((function (env) { - return env.labels; - }), (function (sc) { - return sc.comp_labels; - }), f, param, param$1, param$2); + return env.labels; + }), (function (sc) { + return sc.comp_labels; + }), f, param, param$1, param$2); }; } function fold_types(f) { return function (param, param$1, param$2) { return find_all$1((function (env) { - return env.types; - }), (function (sc) { - return sc.comp_types; - }), f, param, param$1, param$2); + return env.types; + }), (function (sc) { + return sc.comp_types; + }), f, param, param$1, param$2); }; } function fold_modtypes(f) { return function (param, param$1, param$2) { return find_all$1((function (env) { - return env.modtypes; - }), (function (sc) { - return sc.comp_modtypes; - }), f, param, param$1, param$2); + return env.modtypes; + }), (function (sc) { + return sc.comp_modtypes; + }), f, param, param$1, param$2); }; } function fold_classs(f) { return function (param, param$1, param$2) { return find_all$1((function (env) { - return env.classes; - }), (function (sc) { - return sc.comp_classes; - }), f, param, param$1, param$2); + return env.classes; + }), (function (sc) { + return sc.comp_classes; + }), f, param, param$1, param$2); }; } function fold_cltypes(f) { return function (param, param$1, param$2) { return find_all$1((function (env) { - return env.cltypes; - }), (function (sc) { - return sc.comp_cltypes; - }), f, param, param$1, param$2); + return env.cltypes; + }), (function (sc) { + return sc.comp_cltypes; + }), f, param, param$1, param$2); }; } const 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); + 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); const initial_safe_string = match[0]; @@ -15547,56 +15547,56 @@ function from_pair_suites(name, suites) { if (match) { if (is_mocha(undefined)) { describe(name, (function () { - return Stdlib__List.iter((function (param) { - const code = param[1]; - it(param[0], (function () { - let spec = Curry._1(code, undefined); - switch (spec.TAG) { - case /* Eq */0 : - Assert.deepEqual(spec._0, spec._1); - return; - case /* Neq */1 : - Assert.notDeepEqual(spec._0, spec._1); - return; - case /* StrictEq */2 : - Assert.strictEqual(spec._0, spec._1); - return; - case /* StrictNeq */3 : - Assert.notStrictEqual(spec._0, spec._1); - return; - case /* Ok */4 : - Assert.ok(spec._0); - return; - case /* Approx */5 : - const b = spec._1; - const a = spec._0; - if (!close_enough(undefined, a, b)) { - Assert.deepEqual(a, b); - return; - } else { - return; - } - case /* ApproxThreshold */6 : - const b$1 = spec._2; - const a$1 = spec._1; - if (!close_enough(spec._0, a$1, b$1)) { - Assert.deepEqual(a$1, b$1); - return; - } else { - return; - } - case /* ThrowAny */7 : - Assert.throws(spec._0); - return; - case /* Fail */8 : - return assert_fail("failed"); - case /* FailWith */9 : - return assert_fail(spec._0); - + return Stdlib__List.iter((function (param) { + const code = param[1]; + it(param[0], (function () { + let spec = Curry._1(code, undefined); + switch (spec.TAG) { + case /* Eq */0 : + Assert.deepEqual(spec._0, spec._1); + return; + case /* Neq */1 : + Assert.notDeepEqual(spec._0, spec._1); + return; + case /* StrictEq */2 : + Assert.strictEqual(spec._0, spec._1); + return; + case /* StrictNeq */3 : + Assert.notStrictEqual(spec._0, spec._1); + return; + case /* Ok */4 : + Assert.ok(spec._0); + return; + case /* Approx */5 : + const b = spec._1; + const a = spec._0; + if (!close_enough(undefined, a, b)) { + Assert.deepEqual(a, b); + return; + } else { + return; } - })); - }), suites); - })); + case /* ApproxThreshold */6 : + const b$1 = spec._2; + const a$1 = spec._1; + if (!close_enough(spec._0, a$1, b$1)) { + Assert.deepEqual(a$1, b$1); + return; + } else { + return; + } + case /* ThrowAny */7 : + Assert.throws(spec._0); + return; + case /* Fail */8 : + return assert_fail("failed"); + case /* FailWith */9 : + return assert_fail(spec._0); + + } + })); + }), suites); + })); return; } else { console.log([ @@ -15604,78 +15604,78 @@ function from_pair_suites(name, suites) { "testing" ]); return Stdlib__List.iter((function (param) { - const name = param[0]; - const fn = Curry._1(param[1], undefined); - switch (fn.TAG) { - case /* Eq */0 : - console.log([ - name, - fn._0, - "eq?", - fn._1 - ]); - return; - case /* Neq */1 : - console.log([ - name, - fn._0, - "neq?", - fn._1 - ]); - return; - case /* StrictEq */2 : - console.log([ - name, - fn._0, - "strict_eq?", - fn._1 - ]); - return; - case /* StrictNeq */3 : - console.log([ - name, - fn._0, - "strict_neq?", - fn._1 - ]); - return; - case /* Ok */4 : - console.log([ - name, - fn._0, - "ok?" - ]); - return; - case /* Approx */5 : - console.log([ - name, - fn._0, - "~", - fn._1 - ]); - return; - case /* ApproxThreshold */6 : - console.log([ - name, - fn._1, - "~", - fn._2, - " (", - fn._0, - ")" - ]); - return; - case /* ThrowAny */7 : - return; - case /* Fail */8 : - console.log("failed"); - return; - case /* FailWith */9 : - console.log("failed: " + fn._0); - return; - - } - }), suites); + const name = param[0]; + const fn = Curry._1(param[1], undefined); + switch (fn.TAG) { + case /* Eq */0 : + console.log([ + name, + fn._0, + "eq?", + fn._1 + ]); + return; + case /* Neq */1 : + console.log([ + name, + fn._0, + "neq?", + fn._1 + ]); + return; + case /* StrictEq */2 : + console.log([ + name, + fn._0, + "strict_eq?", + fn._1 + ]); + return; + case /* StrictNeq */3 : + console.log([ + name, + fn._0, + "strict_neq?", + fn._1 + ]); + return; + case /* Ok */4 : + console.log([ + name, + fn._0, + "ok?" + ]); + return; + case /* Approx */5 : + console.log([ + name, + fn._0, + "~", + fn._1 + ]); + return; + case /* ApproxThreshold */6 : + console.log([ + name, + fn._1, + "~", + fn._2, + " (", + fn._0, + ")" + ]); + return; + case /* ThrowAny */7 : + return; + case /* Fail */8 : + console.log("failed"); + return; + case /* FailWith */9 : + console.log("failed: " + fn._0); + return; + + } + }), suites); } } @@ -16384,12 +16384,12 @@ function varify_constructors(var_names, t) { desc = { TAG: /* Ptyp_object */4, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - loop(param[2]) - ]; - }), x._0), + return [ + param[0], + param[1], + loop(param[2]) + ]; + }), x._0), _1: x._1 }; break; @@ -16421,8 +16421,8 @@ function varify_constructors(var_names, t) { const string_lst = x._0; const partial_arg = t.ptyp_loc; Stdlib__List.iter((function (param) { - return check_variable(var_names, partial_arg, param); - }), string_lst); + return check_variable(var_names, partial_arg, param); + }), string_lst); desc = { TAG: /* Ptyp_poly */8, _0: string_lst, @@ -16436,11 +16436,11 @@ function varify_constructors(var_names, t) { _0: [ match[0], Stdlib__List.map((function (param) { - return [ - param[0], - loop(param[1]) - ]; - }), match[1]) + return [ + param[0], + loop(param[1]) + ]; + }), match[1]) ] }; break; @@ -16489,12 +16489,12 @@ function wrap_type_annotation(newtypes, core_type, body) { _1: core_type }); const exp$1 = Stdlib__List.fold_right((function (newtype, exp) { - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: newtype, - _1: exp - }); - }), newtypes, exp); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: newtype, + _1: exp + }); + }), newtypes, exp); return [ exp$1, ghtyp({ @@ -16721,6073 +16721,6073 @@ const yytransl_block = [ const yyact = [ (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "parser" - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return extra_text(text$1, 1, _1); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return extra_text(text, 1, _1); - }), + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "parser" + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_def */0, - _0: extra_text(text$1, 1, _1) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return extra_text(text$1, 1, _1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return extra_text(text, 1, _1); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_def */0, + _0: extra_text(text$1, 1, _1) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { + MEL_EXN_ID: Stdlib.End_of_file + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let pos = 1; - return extra_text((function (txt) { - return { - hd: { - TAG: /* Ptop_def */0, - _0: text$1(txt) - }, - tl: /* [] */0 - }; - }), pos, _1); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text_def(1), { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let pos = 1; + return extra_text((function (txt) { + return { hd: { TAG: /* Ptop_def */0, - _0: { - hd: mkstrexp(_1, _2), - tl: /* [] */0 - } + _0: text$1(txt) }, - tl: _3 - }); - }), + tl: /* [] */0 + }; + }), pos, _1); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return text_def(1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib.$at(text_def(1), { + hd: { + TAG: /* Ptop_def */0, + _0: { + hd: mkstrexp(_1, _2), + tl: /* [] */0 + } + }, + tl: _3 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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: { - TAG: /* Ptop_def */0, - _0: { - hd: mkstrexp(_2, _3), - tl: /* [] */0 - } - }, - tl: _4 - })); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, - _0: { - hd: _2, - tl: /* [] */0 - } - }, - tl: _3 - })); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, - tl: _3 - })); - }), + return text_def(1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text_def(1), { - hd: { - TAG: /* Ptop_def */0, - _0: { - hd: _1, - tl: /* [] */0 - } - }, - tl: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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: { + TAG: /* Ptop_def */0, + _0: { + hd: mkstrexp(_2, _3), + tl: /* [] */0 + } + }, + tl: _4 + })); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_rhs_docs(1, 1); - return Stdlib.$at(text_def(1), { - hd: _1, - tl: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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, + _0: { + hd: _2, + tl: /* [] */0 + } + }, + tl: _3 + })); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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, + tl: _3 + })); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib.$at(text_def(1), { + hd: { + TAG: /* Ptop_def */0, + _0: { + hd: _1, + tl: /* [] */0 + } + }, + tl: _2 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_rhs_docs(1, 1); + return Stdlib.$at(text_def(1), { + hd: _1, + tl: _2 + }); + }), (function (__caml_parser_env) { - return [ - { - txt: "*", - loc: rhs_loc(2) - }, - undefined - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - txt: _2, - loc: rhs_loc(2) - }, - _4 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return "_"; - }), + return [ + { + txt: "*", + loc: rhs_loc(2) + }, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + txt: _2, + loc: rhs_loc(2) + }, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + return "_"; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_structure */1, - _0: extra_text(text$1, 2, _2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("struct", 1, "end", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib__List.fold_left((function (acc, param) { - return mkmod({ - TAG: /* Pmod_functor */2, - _0: param[0], - _1: param[1], - _2: acc - }); - }), _4, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_apply */3, - _0: _1, - _1: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_structure */1, + _0: extra_text(text$1, 2, _2) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("struct", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib__List.fold_left((function (acc, param) { + return mkmod({ + TAG: /* Pmod_functor */2, + _0: param[0], + _1: param[1], + _2: acc + }); + }), _4, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return mkmod({ - TAG: /* Pmod_apply */3, - _0: _1, - _1: mkmod({ - TAG: /* Pmod_structure */1, - _0: /* [] */0 - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 2, ")", 4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_constraint */4, - _0: _2, - _1: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_apply */3, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return mkmod({ + TAG: /* Pmod_apply */3, + _0: _1, + _1: mkmod({ + TAG: /* Pmod_structure */1, + _0: /* [] */0 + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 2, ")", 4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_constraint */4, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: _3 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_constraint */19, - _0: _3, - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }) - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_coerce */20, - _0: _3, - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }), - _2: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _7 - }) - }) - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_coerce */20, - _0: _3, - _1: undefined, - _2: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }) - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: _3 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_constraint */19, + _0: _3, + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }) + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_coerce */20, + _0: _3, + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }), + _2: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _7 + }) + }) + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_coerce */20, + _0: _3, + _1: undefined, + _2: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }) + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 4); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$4(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$4(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_extension */6, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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), - tl: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_extension */6, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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), + tl: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const bindings = lbs.lbs_bindings; - let str; - let exit = 0; - if (bindings) { - const lb = bindings.hd; - let tmp = lb.lb_pattern.ppat_desc; - if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && !bindings.tl) { - const exp = wrap_exp_attrs(lb.lb_expression, [ - undefined, - lbs.lbs_attributes - ]); - str = mkstr({ - TAG: /* Pstr_eval */0, - _0: exp, - _1: lb.lb_attributes - }); - } else { - exit = 1; - } + let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const bindings = lbs.lbs_bindings; + let str; + let exit = 0; + if (bindings) { + const lb = bindings.hd; + let tmp = lb.lb_pattern.ppat_desc; + if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && !bindings.tl) { + const exp = wrap_exp_attrs(lb.lb_expression, [ + undefined, + lbs.lbs_attributes + ]); + str = mkstr({ + TAG: /* Pstr_eval */0, + _0: exp, + _1: lb.lb_attributes + }); } else { exit = 1; } - if (exit === 1) { - if (Caml_obj.caml_notequal(lbs.lbs_attributes, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$3, { - MEL_EXN_ID: $$Error$3, - _1: { - TAG: /* Not_expecting */2, - _0: lbs.lbs_loc, - _1: "attributes" - } - }); - } - const 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({ - TAG: /* Pstr_value */1, - _0: lbs.lbs_rec, - _1: Stdlib__List.rev(bindings$1) + } else { + exit = 1; + } + if (exit === 1) { + if (Caml_obj.caml_notequal(lbs.lbs_attributes, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$3, { + MEL_EXN_ID: $$Error$3, + _1: { + TAG: /* Not_expecting */2, + _0: lbs.lbs_loc, + _1: "attributes" + } }); } - const id = lbs.lbs_extension; - if (id !== undefined) { - let d = { - TAG: /* Pstr_extension */14, - _0: [ - id, - { - TAG: /* PStr */0, - _0: { - hd: str, - tl: /* [] */0 - } + const 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({ + TAG: /* Pstr_value */1, + _0: lbs.lbs_rec, + _1: Stdlib__List.rev(bindings$1) + }); + } + const id = lbs.lbs_extension; + if (id !== undefined) { + let d = { + TAG: /* Pstr_extension */14, + _0: [ + id, + { + TAG: /* PStr */0, + _0: { + hd: str, + tl: /* [] */0 } - ], - _1: /* [] */0 - }; - return mk$6(symbol_gloc(undefined), d); - } else { - return str; - } - }), + } + ], + _1: /* [] */0 + }; + return mk$6(symbol_gloc(undefined), d); + } else { + return str; + } + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_primitive */2, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_primitive */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_type */3, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_type */3, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_typext */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_typext */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_exception */5, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_exception */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_module */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_module */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_recmodule */7, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_recmodule */7, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_modtype */8, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_modtype */8, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_open */9, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_open */9, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_class */10, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_class */10, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_class_type */11, - _0: Stdlib__List.rev(_1) - }); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_include */12, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_include */12, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_extension */14, - _0: _1, - _1: add_docs_attrs(symbol_docs(undefined), _2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_extension */14, + _0: _1, + _1: add_docs_attrs(symbol_docs(undefined), _2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkstr({ - TAG: /* Pstr_attribute */13, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_constraint */4, - _0: _4, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_functor */2, - _0: _1[0], - _1: _1[1], - _2: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkstr({ + TAG: /* Pstr_attribute */13, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_constraint */4, + _0: _4, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_functor */2, + _0: _1[0], + _1: _1[1], + _2: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmty({ - TAG: /* Pmty_signature */1, - _0: extra_text(text, 2, _2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmty({ + TAG: /* Pmty_signature */1, + _0: extra_text(text, 2, _2) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("sig", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib__List.fold_left((function (acc, param) { + return mkmty({ + TAG: /* Pmty_functor */2, + _0: param[0], + _1: param[1], + _2: acc + }); + }), _4, _2); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("sig", 1, "end", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_with */3, + _0: _1, + _1: Stdlib__List.rev(_3) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib__List.fold_left((function (acc, param) { - return mkmty({ - TAG: /* Pmty_functor */2, - _0: param[0], - _1: param[1], - _2: acc - }); - }), _4, _2); - }), + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_typeof */4, + _0: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_with */3, - _0: _1, - _1: Stdlib__List.rev(_3) - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_typeof */4, - _0: _4 - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_extension */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$3(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_extension */5, - _0: _1 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$3(_1, _2); - }), + const _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) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_value */0, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_value */0, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_value */0, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_type */1, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_value */0, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_typext */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_type */1, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_exception */3, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_typext */2, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_module */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_exception */3, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_module */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_module */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_recmodule */5, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_module */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_modtype */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_recmodule */5, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_open */7, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_modtype */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_include */8, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_open */7, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_class */9, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_include */8, - _0: _1 - }); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_class */9, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_extension */12, + _0: _1, + _1: add_docs_attrs(symbol_docs(undefined), _2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_class_type */10, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mksig({ + TAG: /* Psig_attribute */11, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_extension */12, - _0: _1, - _1: add_docs_attrs(symbol_docs(undefined), _2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mksig({ - TAG: /* Psig_attribute */11, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_functor */2, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: _4, + _2: _6 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_functor */2, + _0: { + txt: "*", + loc: rhs_loc(1) + }, + _1: undefined, + _2: _3 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_functor */2, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: _4, - _2: _6 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_functor */2, - _0: { - txt: "*", - loc: rhs_loc(1) - }, - _1: undefined, - _2: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, alias$2(rhs_loc(4), undefined, { + txt: _4, + loc: rhs_loc(4) + })); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, alias$2(rhs_loc(4), undefined, { - txt: _4, - loc: rhs_loc(4) - })); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, _4); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, _4); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, _5); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constraint */5, + _0: _4, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), + (function (__caml_parser_env) { + return /* [] */0; + }), + (function (__caml_parser_env) { + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _3 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_apply */3, + _0: _1, + _1: Stdlib__List.rev(_2) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const 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, + _1: { + TAG: /* Not_expecting */2, + _0: lb.lb_loc, + _1: "item attribute" + } + }); + } + return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); + }), _1.lbs_bindings); + if (_1.lbs_extension !== undefined) { + throw new Caml_js_exceptions.MelangeError($$Error$3, { + MEL_EXN_ID: $$Error$3, + _1: { + TAG: /* Not_expecting */2, + _0: _1.lbs_loc, + _1: "extension" + } + }); + } + if (Caml_obj.caml_notequal(_1.lbs_attributes, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$3, { + MEL_EXN_ID: $$Error$3, + _1: { + TAG: /* Not_expecting */2, + _0: _1.lbs_loc, + _1: "attributes" + } }); - }), + } + return mkclass({ + TAG: /* Pcl_let */4, + _0: _1.lbs_rec, + _1: Stdlib__List.rev(bindings), + _2: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$5(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_extension */6, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constr */0, + _0: { txt: _4, loc: rhs_loc(4) - }, _5); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constraint */5, - _0: _4, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), - (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constr */0, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkclass({ + TAG: /* Pcl_structure */1, + _0: _2 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkclass({ + TAG: /* Pcl_constraint */5, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_apply */3, - _0: _1, - _1: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const 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, - _1: { - TAG: /* Not_expecting */2, - _0: lb.lb_loc, - _1: "item attribute" - } - }); - } - return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); - }), _1.lbs_bindings); - if (_1.lbs_extension !== undefined) { - throw new Caml_js_exceptions.MelangeError($$Error$3, { - MEL_EXN_ID: $$Error$3, - _1: { - TAG: /* Not_expecting */2, - _0: _1.lbs_loc, - _1: "extension" - } - }); - } - if (Caml_obj.caml_notequal(_1.lbs_attributes, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$3, { - MEL_EXN_ID: $$Error$3, - _1: { - TAG: /* Not_expecting */2, - _0: _1.lbs_loc, - _1: "attributes" - } - }); - } - return mkclass({ - TAG: /* Pcl_let */4, - _0: _1.lbs_rec, - _1: Stdlib__List.rev(bindings), - _2: _3 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$5(_1, _2); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_extension */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + pcstr_self: _1, + pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constr */0, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constr */0, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkclass({ - TAG: /* Pcl_structure */1, - _0: _2 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkclass({ - TAG: /* Pcl_constraint */5, - _0: _2, - _1: _4 - }); - }), + return ghpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcf(_5, symbol_docs(undefined), { + TAG: /* Pcf_inherit */0, + _0: _2, + _1: _3, + _2: _4 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - pcstr_self: _1, - pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _2, - _1: _4 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return ghpat(/* Ppat_any */0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkcf(undefined, undefined, { + TAG: /* Pcf_attribute */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_5, symbol_docs(undefined), { - TAG: /* Pcf_inherit */0, - _0: _2, - _1: _3, - _2: _4 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_method */2, - _0: _2 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + /* Mutable */1, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_constraint */3, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_virtual */0, + _0: _5 + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_initializer */4, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: _5 + } + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const e = mkexp_constraint(_6, _4); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: e + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_2, symbol_docs(undefined), { - TAG: /* Pcf_extension */6, - _0: _1 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + /* Private */0, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkcf(undefined, undefined, { - TAG: /* Pcf_attribute */5, - _0: _1 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + _3, + { + TAG: /* Cfk_virtual */0, + _0: _6 } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - /* Mutable */1, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_virtual */0, - _0: _5 - } - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: _4, + _1: undefined + }) + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: _5 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const e = mkexp_constraint(_6, _4); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: e - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: _7, + _1: _5 + }) } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - /* Private */0, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = wrap_type_annotation(_6, _8, _10); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: match[0], + _1: match[1] + }) } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - _3, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), + ]; + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "?" + _2, + _1: mkoption(_4), + _2: _6 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "?" + _1, + _1: mkoption(_2), + _2: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: _4, - _1: undefined - }) - } - ]; - }), + _1: _3, + _2: _5 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: _7, - _1: _5 - }) - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = wrap_type_annotation(_6, _8, _10); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: match[0], - _1: match[1] - }) - } - ]; - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "?" + _2, - _1: mkoption(_4), - _2: _6 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "?" + _1, - _1: mkoption(_2), - _2: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "", + _1: _1, + _2: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: _1, - _1: _3, - _2: _5 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_constr */0, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "", - _1: _1, - _2: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_constr */0, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_constr */0, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkcty({ + TAG: /* Pcty_signature */1, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_constr */0, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 3); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkcty({ - TAG: /* Pcty_signature */1, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$6(_1, _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_extension */3, + _0: _1 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + pcsig_self: _1, + pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$6(_1, _2); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_extension */3, - _0: _1 - }); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - pcsig_self: _1, - pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) - }; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return mktyp(/* Ptyp_any */0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkctf(_6, symbol_docs(undefined), { + TAG: /* Pctf_method */2, + _0: [ + _3, + _2[0], + _2[1], + _5 + ] + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_3, symbol_docs(undefined), { - TAG: /* Pctf_inherit */0, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_6, symbol_docs(undefined), { - TAG: /* Pctf_method */2, - _0: [ - _3, - _2[0], - _2[1], - _5 - ] - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkctf(undefined, undefined, { + TAG: /* Pctf_attribute */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_3, symbol_docs(undefined), { - TAG: /* Pctf_constraint */3, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _3, + _2, + /* Virtual */0, + _5 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_2, symbol_docs(undefined), { - TAG: /* Pctf_extension */5, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _3, + /* Mutable */1, + _2, + _5 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkctf(undefined, undefined, { - TAG: /* Pctf_attribute */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + /* Immutable */0, + /* Concrete */1, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _3, - _2, - /* Virtual */0, - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3, + symbol_rloc(undefined) + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _3, - /* Mutable */1, - _2, - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - /* Immutable */0, - /* Concrete */1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3, - symbol_rloc(undefined) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_sequence */16, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + "?" + _3[0], + _4, + _3[1] + ]; + }), (function (__caml_parser_env) { - return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _2[0], + undefined, + _2[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_sequence */16, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + "?" + _1, + _4, + _3 + ]; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - "?" + _3[0], - _4, - _3[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _1, + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _2[0], - undefined, - _2[1] - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _3[0], + undefined, + _3[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - "?" + _1, - _4, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2[0], + undefined, + _2[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _1, - undefined, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _3[0], - undefined, - _3[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "", + undefined, + _1 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2[0], - undefined, - _2[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_var */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - undefined, - _2 - ]; - }), + return mkpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "", - undefined, - _1 - ]; - }), + + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1[0], + mkpat({ + TAG: /* Ppat_constraint */10, + _0: _1[1], + _1: _3 + }) + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + mkpat({ TAG: /* Ppat_var */0, _0: { txt: _1, loc: rhs_loc(1) } - }); - }), - (function (__caml_parser_env) { - return mkpat(/* Ppat_any */0); - }), - (function (__caml_parser_env) { - - }), + }) + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1[0], - mkpat({ - TAG: /* Ppat_constraint */10, - _0: _1[1], - _1: _3 - }) - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: _1, + _1: Stdlib__List.rev(_2) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const 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, + _1: { + TAG: /* Not_expecting */2, + _0: lb.lb_loc, + _1: "item attribute" + } + }); + } + return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); + }), _1.lbs_bindings); + const d_0 = _1.lbs_rec; + const d_1 = Stdlib__List.rev(bindings); + const d = { + TAG: /* Pexp_let */2, + _0: d_0, + _1: d_1, + _2: _3 + }; + return wrap_exp_attrs(mkexp(d), [ + _1.lbs_extension, + _1.lbs_attributes + ]); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_0 = { + txt: _4, + loc: rhs_loc(4) + }; + const d = { + TAG: /* Pexp_letmodule */25, + _0: d_0, + _1: _5, + _2: _7 + }; + return wrap_exp_attrs(mkexp(d), _3); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = { + txt: _5, + loc: rhs_loc(5) + }; + const d = { + TAG: /* Pexp_open */32, + _0: _3, + _1: d_1, + _2: _7 + }; + return wrap_exp_attrs(mkexp(d), _4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d = { + TAG: /* Pexp_function */3, + _0: Stdlib__List.rev(_4) + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_fun */4, + _0: _3[0], + _1: _3[1], + _2: _3[2], + _3: _4 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_newtype */30, + _0: _5, + _1: _7 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = Stdlib__List.rev(_6); + const d = { + TAG: /* Pexp_match */6, + _0: _3, + _1: d_1 + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = Stdlib__List.rev(_6); + const d = { + TAG: /* Pexp_try */7, + _0: _3, + _1: d_1 + }; + return wrap_exp_attrs(mkexp(d), _2); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_tuple */8, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_construct */9, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: _1, - _1: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const 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, - _1: { - TAG: /* Not_expecting */2, - _0: lb.lb_loc, - _1: "item attribute" - } - }); + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_variant */10, + _0: _1, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_ifthenelse */15, + _0: _3, + _1: _5, + _2: _7 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_ifthenelse */15, + _0: _3, + _1: _5, + _2: undefined + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_while */17, + _0: _3, + _1: _5 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_for */18, + _0: _3, + _1: _5, + _2: _7, + _3: _6, + _4: _9 + }), _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp_cons(rhs_loc(2), ghexp({ + TAG: /* Pexp_tuple */8, + _0: { + hd: _1, + tl: { + hd: _3, + tl: /* [] */0 + } } - return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); - }), _1.lbs_bindings); - const d_0 = _1.lbs_rec; - const d_1 = Stdlib__List.rev(bindings); - const d = { - TAG: /* Pexp_let */2, - _0: d_0, - _1: d_1, - _2: _3 - }; - return wrap_exp_attrs(mkexp(d), [ - _1.lbs_extension, - _1.lbs_attributes - ]); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_0 = { - txt: _4, - loc: rhs_loc(4) - }; - const d = { - TAG: /* Pexp_letmodule */25, - _0: d_0, - _1: _5, - _2: _7 - }; - return wrap_exp_attrs(mkexp(d), _3); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = { - txt: _5, - loc: rhs_loc(5) - }; - const d = { - TAG: /* Pexp_open */32, - _0: _3, - _1: d_1, - _2: _7 - }; - return wrap_exp_attrs(mkexp(d), _4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d = { - TAG: /* Pexp_function */3, - _0: Stdlib__List.rev(_4) - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_fun */4, - _0: _3[0], - _1: _3[1], - _2: _3[2], - _3: _4 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_newtype */30, - _0: _5, - _1: _7 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = Stdlib__List.rev(_6); - const d = { - TAG: /* Pexp_match */6, - _0: _3, - _1: d_1 - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = Stdlib__List.rev(_6); - const d = { - TAG: /* Pexp_try */7, - _0: _3, - _1: d_1 - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_tuple */8, - _0: Stdlib__List.rev(_1) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_construct */9, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _2 - }); - }), + }), symbol_rloc(undefined)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_variant */10, - _0: _1, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_ifthenelse */15, - _0: _3, - _1: _5, - _2: _7 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_ifthenelse */15, - _0: _3, - _1: _5, - _2: undefined - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_while */17, - _0: _3, - _1: _5 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_for */18, - _0: _3, - _1: _5, - _2: _7, - _3: _6, - _4: _9 - }), _2); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp_cons(rhs_loc(2), ghexp({ - TAG: /* Pexp_tuple */8, - _0: { - hd: _1, - tl: { - hd: _3, - tl: /* [] */0 - } + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp_cons(rhs_loc(2), ghexp({ + TAG: /* Pexp_tuple */8, + _0: { + hd: _5, + tl: { + hd: _7, + tl: /* [] */0 } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp_cons(rhs_loc(2), ghexp({ - TAG: /* Pexp_tuple */8, - _0: { - hd: _5, - tl: { - hd: _7, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+.", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "-", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "-.", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "*", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "%", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "<", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, ">", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "or", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "||", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "&", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "&&", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, ":=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = _2.pexp_desc; - let exit = 0; - switch (_1) { - case "-" : - if (match.TAG === /* Pexp_constant */1) { - const n = match._0; - switch (n.TAG) { - case /* Const_int */0 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int */0, - _0: -n._0 | 0 - } - }); - case /* Const_int32 */4 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int32 */4, - _0: -n._0 | 0 - } - }); - case /* Const_int64 */5 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int64 */5, - _0: Caml_int64.neg(n._0) - } - }); - case /* Const_nativeint */6 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_nativeint */6, - _0: Caml_external_polyfill.resolve("nativeint_neg")(n._0) - } - }); - default: - exit = 2; } - } else { - exit = 2; + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+.", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "-", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "-.", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "*", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "%", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "<", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, ">", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "or", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "||", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "&", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "&&", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, ":=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = _2.pexp_desc; + let exit = 0; + switch (_1) { + case "-" : + if (match.TAG === /* Pexp_constant */1) { + const n = match._0; + switch (n.TAG) { + case /* Const_int */0 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int */0, + _0: -n._0 | 0 + } + }); + case /* Const_int32 */4 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int32 */4, + _0: -n._0 | 0 + } + }); + case /* Const_int64 */5 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int64 */5, + _0: Caml_int64.neg(n._0) + } + }); + case /* Const_nativeint */6 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_nativeint */6, + _0: Caml_external_polyfill.resolve("nativeint_neg")(n._0) + } + }); + default: + exit = 2; } - break; - case "-." : + } else { exit = 2; - break; - default: - - } - if (exit === 2 && match.TAG === /* Pexp_constant */1) { - const f = match._0; - if (f.TAG === /* Const_float */3) { - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_float */3, - _0: neg_float_string(f._0) - } - }); - } + } + break; + case "-." : + exit = 2; + break; + default: + } + if (exit === 2 && match.TAG === /* Pexp_constant */1) { + const f = match._0; + if (f.TAG === /* Const_float */3) { + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_float */3, + _0: neg_float_string(f._0) + } + }); } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("~" + _1, 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("~" + _1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const desc = _2.pexp_desc; - let exit = 0; - switch (_1) { - case "+" : - if (desc.TAG === /* Pexp_constant */1) { - switch (desc._0.TAG) { - case /* Const_char */1 : - case /* Const_string */2 : - case /* Const_float */3 : - exit = 2; - break; - default: - return mkexp(desc); - } - } else { - exit = 2; + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const desc = _2.pexp_desc; + let exit = 0; + switch (_1) { + case "+" : + if (desc.TAG === /* Pexp_constant */1) { + switch (desc._0.TAG) { + case /* Const_char */1 : + case /* Const_string */2 : + case /* Const_float */3 : + exit = 2; + break; + default: + return mkexp(desc); } - break; - case "+." : + } else { exit = 2; - break; - default: - - } - if (exit === 2 && desc.TAG === /* Pexp_constant */1 && desc._0.TAG === /* Const_float */3) { - return mkexp(desc); - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("~" + _1, 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + } + break; + case "+." : + exit = 2; + break; + default: + + } + if (exit === 2 && desc.TAG === /* Pexp_constant */1 && desc._0.TAG === /* Const_float */3) { + return mkexp(desc); + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("~" + _1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_setfield */13, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - }, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("Array", "set") - }), - _1: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_setfield */13, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + }, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("Array", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], tl: { hd: [ "", - _4 + _7 ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("String", "set") - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("String", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], tl: { hd: [ "", - _4 + _7 ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const set = fast.contents ? "unsafe_set" : "set"; - const coords = bigarray_untuplify(_4); - if (coords) { - const match = coords.tl; - const c1 = coords.hd; - if (!match) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array1", set) - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const set = fast.contents ? "unsafe_set" : "set"; + const coords = bigarray_untuplify(_4); + if (coords) { + const match = coords.tl; + const c1 = coords.hd; + if (!match) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array1", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + _7 ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } - }); - } - const match$1 = match.tl; - const c2 = match.hd; - if (!match$1) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array2", set) - }), - _1: { + } + }); + } + const match$1 = match.tl; + const c2 = match.hd; + if (!match$1) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array2", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + _7 ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } } - }); - } - if (!match$1.tl) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array3", set) - }), - _1: { + } + }); + } + if (!match$1.tl) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array3", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + match$1.hd ], tl: { hd: [ "", - match$1.hd + _7 ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } } } - }); - } - + } + }); } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Genarray", "set") - }), - _1: { + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Genarray", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + ghexp({ + TAG: /* Pexp_array */14, + _0: coords + }) ], tl: { hd: [ "", - ghexp({ - TAG: /* Pexp_array */14, - _0: coords - }) + _7 ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_setinstvar */23, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _3 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_object */29, - _0: _3 - }), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 4); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._2(Ast_helper_Exp.attr, _1, _2); - }), + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_setinstvar */23, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _3 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_object */29, + _0: _3 + }), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 4); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._2(Ast_helper_Exp.attr, _1, _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_constant */1, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_constant */1, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_construct */9, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_construct */9, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: undefined + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_variant */10, - _0: _1, - _1: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_variant */10, + _0: _1, + _1: undefined + }); + }), (function (__caml_parser_env) { - return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(reloc_exp(_3), _2); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(reloc_exp(_3), _2); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const d_0 = { - txt: { - TAG: /* Lident */0, - _0: "()" - }, - loc: symbol_rloc(undefined) - }; - const d = { - TAG: /* Pexp_construct */9, - _0: d_0, - _1: undefined - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("begin", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp_constraint(_2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_field */12, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const d_0 = { + txt: { + TAG: /* Lident */0, + _0: "()" + }, + loc: symbol_rloc(undefined) + }; + const d = { + TAG: /* Pexp_construct */9, + _0: d_0, + _1: undefined + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("begin", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp_constraint(_2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_field */12, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: _4 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 3, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("Array", "get") - }), - _1: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: _4 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 3, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("Array", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], - tl: { - hd: [ - "", - _4 - ], - tl: /* [] */0 - } + tl: /* [] */0 } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 3, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("String", "get") - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 3, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("String", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], - tl: { + tl: /* [] */0 + } + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 3, "]", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const get = fast.contents ? "unsafe_get" : "get"; + const coords = bigarray_untuplify(_4); + if (coords) { + const match = coords.tl; + const c1 = coords.hd; + if (!match) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array1", get) + }), + _1: { hd: [ "", - _4 + _1 ], - tl: /* [] */0 - } - } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 3, "]", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const get = fast.contents ? "unsafe_get" : "get"; - const coords = bigarray_untuplify(_4); - if (coords) { - const match = coords.tl; - const c1 = coords.hd; - if (!match) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array1", get) - }), - _1: { + tl: { hd: [ "", - _1 + c1 ], - tl: { - hd: [ - "", - c1 - ], - tl: /* [] */0 - } + tl: /* [] */0 } - }); - } - const match$1 = match.tl; - const c2 = match.hd; - if (!match$1) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array2", get) - }), - _1: { + } + }); + } + const match$1 = match.tl; + const c2 = match.hd; + if (!match$1) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array2", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], - tl: { - hd: [ - "", - c2 - ], - tl: /* [] */0 - } + tl: /* [] */0 } } - }); - } - if (!match$1.tl) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array3", get) - }), - _1: { + } + }); + } + if (!match$1.tl) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array3", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + match$1.hd ], - tl: { - hd: [ - "", - match$1.hd - ], - tl: /* [] */0 - } + tl: /* [] */0 } } } - }); - } - - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Genarray", "get") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - ghexp({ - TAG: /* Pexp_array */14, - _0: coords - }) - ], - tl: /* [] */0 } - } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 3, "}", 5); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_record */11, - _0: _2[1], - _1: _2[0] - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 1, "}", 3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const rec_exp = mkexp({ - TAG: /* Pexp_record */11, - _0: _4[1], - _1: _4[0] - }); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: rec_exp - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 3, "}", 5); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_array */14, - _0: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 1, "|]", 4); - }), - (function (__caml_parser_env) { - return mkexp({ - TAG: /* Pexp_array */14, - _0: /* [] */0 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_array */14, - _0: Stdlib__List.rev(_4) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 3, "|]", 6); - }), - (function (__caml_parser_env) { - const _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))); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 1, "]", 4); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: list_exp - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 3, "]", 6); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator(_1, 1), - _1: { + }); + } + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Genarray", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _2 + ghexp({ + TAG: /* Pexp_array */14, + _0: coords + }) ], tl: /* [] */0 } - }); - }), + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 3, "}", 5); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_record */11, + _0: _2[1], + _1: _2[0] + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 1, "}", 3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const rec_exp = mkexp({ + TAG: /* Pexp_record */11, + _0: _4[1], + _1: _4[0] + }); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: rec_exp + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("!", 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 3, "}", 5); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d = { - TAG: /* Pexp_new */22, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_override */24, - _0: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_array */14, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{<", 1, ">}", 4); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 1, "|]", 4); + }), (function (__caml_parser_env) { - return mkexp({ - TAG: /* Pexp_override */24, - _0: /* [] */0 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_override */24, - _0: Stdlib__List.rev(_4) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{<", 3, ">}", 6); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_send */21, - _0: _1, - _1: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_pack */31, - _0: _3 - }); - }), + return mkexp({ + TAG: /* Pexp_array */14, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_array */14, + _0: Stdlib__List.rev(_4) + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 3, "|]", 6); + }), + (function (__caml_parser_env) { + const _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))); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 1, "]", 4); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: list_exp + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 3, "]", 6); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator(_1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_constraint */19, - _0: ghexp({ - TAG: /* Pexp_pack */31, - _0: _3 - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_constraint */19, - _0: ghexp({ - TAG: /* Pexp_pack */31, - _0: _5 - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _7 - }) - }) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("!", 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 6); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 3, ")", 7); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d = { + TAG: /* Pexp_new */22, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }; + return wrap_exp_attrs(mkexp(d), _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_extension */33, - _0: _1 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_override */24, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{<", 1, ">}", 4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + return mkexp({ + TAG: /* Pexp_override */24, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_override */24, + _0: Stdlib__List.rev(_4) + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{<", 3, ">}", 6); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_send */21, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "", - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_pack */31, + _0: _3 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_constraint */19, + _0: ghexp({ + TAG: /* Pexp_pack */31, + _0: _3 + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_constraint */19, + _0: ghexp({ + TAG: /* Pexp_pack */31, + _0: _5 + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _7 + }) + }) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _2 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 6); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 3, ")", 7); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_extension */33, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _2[0], - _2[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _1, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - mkexp({ - TAG: /* Pexp_ident */0, - _0: { - txt: { - TAG: /* Lident */0, - _0: _1 - }, - loc: rhs_loc(1) - } - }) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "", + _1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - mkpatvar(_1, 1), - _2 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: mkpatvar(_1, 1), - _1: ghtyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_3), - _1: _5 - }) - }), - _7 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _2[0], + _2[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = wrap_type_annotation(_4, _6, _8); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: mkpatvar(_1, 1), - _1: match[1] - }), - match[0] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _1, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + mkexp({ + TAG: /* Pexp_ident */0, + _0: { + txt: { + TAG: /* Lident */0, + _0: _1 + }, + loc: rhs_loc(1) + } + }) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: _1, - _1: _3 - }), - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - lbs_bindings: { - hd: _2, - tl: _1.lbs_bindings - }, - lbs_rec: _1.lbs_rec, - lbs_extension: _1.lbs_extension, - lbs_attributes: _1.lbs_attributes, - lbs_loc: _1.lbs_loc - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + mkpatvar(_1, 1), + _2 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let lb = mklb(_4, _5); - return { - lbs_bindings: { - hd: lb, - tl: /* [] */0 - }, - lbs_rec: _3, - lbs_extension: _2[0], - lbs_attributes: _2[1], - lbs_loc: symbol_rloc(undefined) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: mkpatvar(_1, 1), + _1: ghtyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_3), + _1: _5 + }) + }), + _7 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mklb(_2, _3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = wrap_type_annotation(_4, _6, _8); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: mkpatvar(_1, 1), + _1: match[1] + }), + match[0] + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp_constraint(_3, _1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: _1, + _1: _3 + }), + _5 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return ghexp({ - TAG: /* Pexp_fun */4, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: _3, - _1: _5 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + lbs_bindings: { + hd: _2, + tl: _1.lbs_bindings + }, + lbs_rec: _1.lbs_rec, + lbs_extension: _1.lbs_extension, + lbs_attributes: _1.lbs_attributes, + lbs_loc: _1.lbs_loc + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let lb = mklb(_4, _5); + return { + lbs_bindings: { + hd: lb, tl: /* [] */0 - }; - }), + }, + lbs_rec: _3, + lbs_extension: _2[0], + lbs_attributes: _2[1], + lbs_loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mklb(_2, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return ghexp({ - TAG: /* Pexp_fun */4, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: _3, - _1: _5 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return ghexp({ + TAG: /* Pexp_fun */4, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: _3, + _1: _5 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: { - hd: _1, - tl: /* [] */0 - } - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return ghexp({ + TAG: /* Pexp_fun */4, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: _3, + _1: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: { hd: _1, tl: /* [] */0 - }; - }), + } + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + _1 + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + exp_of_label(_1, 1) + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: [ { txt: _1, loc: rhs_loc(1) }, _3 - ]; - }), + ], + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: [ { - txt: _1, - loc: rhs_loc(1) + txt: _3, + loc: rhs_loc(3) }, - exp_of_label(_1, 1) - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ], - tl: /* [] */0 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: [ - { - txt: _3, - loc: rhs_loc(3) - }, - _5 - ], - tl: _1 - }; - }), + _5 + ], + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - undefined - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + undefined + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _4 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _4 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - _2 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_alias */1, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_alias */1, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "identifier"); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "identifier"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_tuple */4, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_tuple */4, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_construct */5, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_construct */5, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_variant */6, - _0: _1, - _1: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_variant */6, + _0: _1, + _1: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat_cons(rhs_loc(2), ghpat({ - TAG: /* Ppat_tuple */4, - _0: { - hd: _1, - tl: { - hd: _3, - tl: /* [] */0 - } + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat_cons(rhs_loc(2), ghpat({ + TAG: /* Ppat_tuple */4, + _0: { + hd: _1, + tl: { + hd: _3, + tl: /* [] */0 } - }), symbol_rloc(undefined)); - }), + } + }), symbol_rloc(undefined)); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat_cons(rhs_loc(2), ghpat({ - TAG: /* Ppat_tuple */4, - _0: { - hd: _5, - tl: { - hd: _7, - tl: /* [] */0 - } + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat_cons(rhs_loc(2), ghpat({ + TAG: /* Ppat_tuple */4, + _0: { + hd: _5, + tl: { + hd: _7, + tl: /* [] */0 } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 4, ")", 8); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_or */9, - _0: _1, - _1: _3 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_lazy */12, - _0: _2 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_exception */14, - _0: _2 - }); - }), + } + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 4, ")", 8); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_or */9, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$1(_1, _2); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_lazy */12, + _0: _2 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_exception */14, + _0: _2 + }); + }), (function (__caml_parser_env) { - return mkpat(/* Ppat_any */0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$1(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_constant */2, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_var */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_interval */3, - _0: _1, - _1: _3 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_construct */5, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: undefined - }); - }), + return mkpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_variant */6, - _0: _1, - _1: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_constant */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_type */11, - _0: { - txt: _2, - loc: rhs_loc(2) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_interval */3, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_record */7, - _0: _2[0], - _1: _2[1] - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 1, "}", 3); - }), - (function (__caml_parser_env) { - const _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))); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 1, "]", 4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_array */8, - _0: Stdlib__List.rev(_2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_construct */5, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: undefined + }); + }), (function (__caml_parser_env) { - return mkpat({ - TAG: /* Ppat_array */8, - _0: /* [] */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_variant */6, + _0: _1, + _1: undefined + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 1, "|]", 4); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_type */11, + _0: { + txt: _2, + loc: rhs_loc(2) + } + }); + }), (function (__caml_parser_env) { - return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_record */7, + _0: _2[0], + _1: _2[1] + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 1, "}", 3); + }), + (function (__caml_parser_env) { + const _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))); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 1, "]", 4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_array */8, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + return mkpat({ + TAG: /* Ppat_array */8, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 1, "|]", 4); + }), + (function (__caml_parser_env) { + return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _2, - _1: _4 - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(4, "type"); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(4, "type"); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_unpack */13, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: mkpat({ + TAG: /* Ppat_unpack */13, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_unpack */13, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 6); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: mkpat({ - TAG: /* Ppat_unpack */13, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_extension */15, + _0: _1 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 6); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_extension */15, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: { + hd: _1, + tl: /* [] */0 + } + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: { - hd: _1, - tl: /* [] */0 - } - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { hd: _1, tl: /* [] */0 - }; - }), + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Open */1 - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: _3[0] - }, - _3[1] - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - pat_of_label(_1, 1) - ]; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1[0], + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + hd: _1, tl: /* [] */0 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1[0], - tl: _2 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { hd: _1, tl: /* [] */0 - }; - }), + }, + /* Open */1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: _3[0] + }, + _3[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + pat_of_label(_1, 1) + ]; + }), (function (__caml_parser_env) { - return [ - /* Ptype_abstract */0, - /* Public */1, - undefined - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* Ptype_abstract */0, - /* Public */1, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1[0], + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* Ptype_abstract */0, - /* Private */0, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1[0], + tl: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_2) - }, - /* Public */1, - undefined - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_3) - }, - /* Private */0, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return [ - /* Ptype_open */1, - /* Public */1, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - TAG: /* Ptype_record */1, - _0: _4 - }, - _2, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_5) - }, - _4, - _2 - ]; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return [ - /* Ptype_open */1, - /* Public */1, - _2 - ]; - }), + return [ + /* Ptype_abstract */0, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - TAG: /* Ptype_record */1, - _0: _6 - }, - _4, - _2 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* Ptype_abstract */0, + /* Public */1, + _2 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* Ptype_abstract */0, + /* Private */0, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_2) + }, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_3) + }, + /* Private */0, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _1 - ]; - }), + return [ + /* Ptype_open */1, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + TAG: /* Ptype_record */1, + _0: _4 + }, + _2, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_5) + }, + _4, + _2 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return [ + /* Ptype_open */1, + /* Public */1, + _2 + ]; + }), (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + TAG: /* Ptype_record */1, + _0: _6 + }, + _4, + _2 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _1 + ]; + }), (function (__caml_parser_env) { - return /* Invariant */2; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return /* Covariant */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return /* Contravariant */1; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + return /* Invariant */2; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + return /* Covariant */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + return /* Contravariant */1; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _4, - loc: rhs_loc(4) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return [ - /* [] */0, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - Stdlib__List.rev(_2), - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - Stdlib__List.rev(_2), - _4 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* [] */0, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, { + txt: _4, + loc: rhs_loc(4) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); - const 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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - if (_2 !== /* Recursive */1) { - not_expecting(2, "nonrec flag"); - } - return mk$20(_8, symbol_docs(undefined), _3, _6, { - txt: _4, - loc: rhs_loc(4) - }, Stdlib__List.rev(_7)); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - if (_2 !== /* Recursive */1) { - not_expecting(2, "nonrec flag"); - } - return mk$20(_8, symbol_docs(undefined), _3, _6, { - txt: _4, - loc: rhs_loc(4) - }, Stdlib__List.rev(_7)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return [ + /* [] */0, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + Stdlib__List.rev(_2), + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + Stdlib__List.rev(_2), + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* [] */0, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); + const 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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + if (_2 !== /* Recursive */1) { + not_expecting(2, "nonrec flag"); + } + return mk$20(_8, symbol_docs(undefined), _3, _6, { + txt: _4, + loc: rhs_loc(4) + }, Stdlib__List.rev(_7)); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + if (_2 !== /* Recursive */1) { + not_expecting(2, "nonrec flag"); + } + return mk$20(_8, symbol_docs(undefined), _3, _6, { + txt: _4, + loc: rhs_loc(4) + }, Stdlib__List.rev(_7)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _3, - loc: rhs_loc(3) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _4, - loc: rhs_loc(4) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const rhs = last$1(_3); - return { - TAG: /* Pwith_type */0, - _0: { - txt: _3, - loc: rhs_loc(3) - }, - _1: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, Stdlib__List.rev(_6), undefined, _4, _5, { - txt: rhs, - loc: rhs_loc(3) - }) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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, { - txt: _3, - loc: rhs_loc(3) - }) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Pwith_module */1, - _0: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) - }, - _1: { - txt: _4, - loc: rhs_loc(4) - } - }; - }), + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Pwith_modsubst */3, - _0: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, { + txt: _3, + loc: rhs_loc(3) + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) - }, - _1: { + }, { txt: _4, loc: rhs_loc(4) - } - }; - }), + }); + }), (function (__caml_parser_env) { - return /* Public */1; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return /* Private */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const rhs = last$1(_3); + return { + TAG: /* Pwith_type */0, + _0: { + txt: _3, + loc: rhs_loc(3) + }, + _1: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, Stdlib__List.rev(_6), undefined, _4, _5, { + txt: rhs, + loc: rhs_loc(3) + }) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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, { + txt: _3, + loc: rhs_loc(3) + }) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Pwith_module */1, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + txt: _4, + loc: rhs_loc(4) + } + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Pwith_modsubst */3, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + txt: _4, + loc: rhs_loc(4) + } + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_1), - _1: _3 - }); - }), + return /* Public */1; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* Private */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_1), - _1: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr(_1, _2); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_1), + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_alias */6, - _0: _1, - _1: _4 - }); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "?" + _2, - _1: mkoption(_4), - _2: _6 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "?" + _1, - _1: mkoption(_2), - _2: _4 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: _1, - _1: _3, - _2: _5 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_1), + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "", - _1: _1, - _2: _3 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr(_1, _2); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (_2) { - if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - } - return _2.hd; + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_alias */6, + _0: _1, + _1: _4 + }); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "?" + _2, + _1: mkoption(_4), + _2: _6 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "?" + _1, + _1: mkoption(_2), + _2: _4 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: _1, + _1: _3, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "", + _1: _1, + _2: _3 + }); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (_2) { + if (_2.tl) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - }), + return _2.hd; + } + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (_2) { - if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - } - return _2.hd; + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (_2) { + if (_2.tl) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - }), + return _2.hd; + } + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: { - hd: _1, - tl: /* [] */0 - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + hd: _1, + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_object */4, - _0: _2[0], - _1: _2[1] - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_object */4, + _0: _2[0], + _1: _2[1] + }); + }), (function (__caml_parser_env) { - return mktyp({ - TAG: /* Ptyp_object */4, - _0: /* [] */0, - _1: /* Closed */0 - }); - }), + return mktyp({ + TAG: /* Ptyp_object */4, + _0: /* [] */0, + _1: /* Closed */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: /* [] */0 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _3, - loc: rhs_loc(3) - }, - _1: { - hd: _1, - tl: /* [] */0 - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _3, + loc: rhs_loc(3) + }, + _1: { + hd: _1, + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _5, - loc: rhs_loc(5) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _5, + loc: rhs_loc(5) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: { - hd: _2, - tl: /* [] */0 - }, - _1: /* Closed */0, - _2: undefined - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: { + hd: _2, + tl: /* [] */0 + }, + _1: /* Closed */0, + _2: undefined + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: undefined - }); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: undefined + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: { - hd: _2, - tl: Stdlib__List.rev(_4) - }, - _1: /* Closed */0, - _2: undefined - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Open */1, - _2: undefined - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: { + hd: _2, + tl: Stdlib__List.rev(_4) + }, + _1: /* Closed */0, + _2: undefined + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Open */1, + _2: undefined + }); + }), (function (__caml_parser_env) { - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: /* [] */0, - _1: /* Open */1, - _2: undefined - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: /* [] */0 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: Stdlib__List.rev(_5) - }); - }), + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: /* [] */0, + _1: /* Open */1, + _2: undefined + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: /* [] */0 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: Stdlib__List.rev(_5) + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_package */9, - _0: _3 - }); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_package */9, + _0: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_extension */10, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_extension */10, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - /* [] */0 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + /* [] */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _2, - loc: rhs_loc(2) - }, - _4 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _2, + loc: rhs_loc(2) + }, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rinherit */1, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rinherit */1, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rtag */0, - _0: _1, - _1: _5, - _2: _3, - _3: Stdlib__List.rev(_4) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rtag */0, + _0: _1, + _1: _5, + _2: _3, + _3: Stdlib__List.rev(_4) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rtag */0, - _0: _1, - _1: _2, - _2: true, - _3: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rtag */0, + _0: _1, + _1: _2, + _2: true, + _3: /* [] */0 + }; + }), (function (__caml_parser_env) { - return true; - }), + return true; + }), (function (__caml_parser_env) { - return false; - }), + return false; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_tuple */2, - _0: { - hd: _1, - tl: Stdlib__List.rev(_3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_tuple */2, + _0: { + hd: _1, + tl: Stdlib__List.rev(_3) + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_tuple */2, - _0: { - hd: _1, - tl: Stdlib__List.rev(_3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_tuple */2, + _0: { + hd: _1, + tl: Stdlib__List.rev(_3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: _3[0] + }, + _3[1] + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { hd: _1, tl: /* [] */0 - }; - }), + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return [ + /* [] */0, + /* Open */1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: _3[0] - }, - _3[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _4, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return [ - /* [] */0, - /* Open */1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _4, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_char */1, + _0: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_string */2, + _0: _1[0], + _1: _1[1] + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_char */1, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_string */2, - _0: _1[0], - _1: _1[1] - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_nativeint */6, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: _1 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: -_2 | 0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: "-" + _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: -_2 | 0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: -_2 | 0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: Caml_int64.neg(_2) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: "-" + _2 - }; - }), + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: -_2 | 0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: Caml_int64.neg(_2) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: Caml_external_polyfill.resolve("nativeint_neg")(_2) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_nativeint */6, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: _2 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: _2 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: _2 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return expecting(2, "operator"); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return expecting(3, "module-expr"); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return expecting(2, "operator"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return expecting(3, "module-expr"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "!"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "+"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "+."; + }), (function (__caml_parser_env) { - return "!"; - }), + return "-"; + }), (function (__caml_parser_env) { - return "+"; - }), + return "-."; + }), (function (__caml_parser_env) { - return "+."; - }), + return "*"; + }), (function (__caml_parser_env) { - return "-"; - }), + return "="; + }), (function (__caml_parser_env) { - return "-."; - }), + return "<"; + }), (function (__caml_parser_env) { - return "*"; - }), + return ">"; + }), (function (__caml_parser_env) { - return "="; - }), + return "or"; + }), (function (__caml_parser_env) { - return "<"; - }), + return "||"; + }), (function (__caml_parser_env) { - return ">"; - }), + return "&"; + }), (function (__caml_parser_env) { - return "or"; - }), + return "&&"; + }), (function (__caml_parser_env) { - return "||"; - }), + return ":="; + }), (function (__caml_parser_env) { - return "&"; - }), + return "+="; + }), (function (__caml_parser_env) { - return "&&"; - }), + return "%"; + }), (function (__caml_parser_env) { - return ":="; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "+="; - }), + return "()"; + }), (function (__caml_parser_env) { - return "%"; - }), + return "::"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "false"; + }), (function (__caml_parser_env) { - return "()"; - }), + return "true"; + }), (function (__caml_parser_env) { - return "::"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - return "false"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - return "true"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + return { + TAG: /* Lident */0, + _0: "[]" + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + return { + TAG: /* Lident */0, + _0: "()" + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return { + TAG: /* Lident */0, + _0: "false" + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "[]" - }; - }), + return { + TAG: /* Lident */0, + _0: "true" + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "()" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "false" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "true" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (applicative_functors.contents) { return { - TAG: /* Ldot */1, + TAG: /* Lapply */2, _0: _1, _1: _3 }; - }), + } + throw new Caml_js_exceptions.MelangeError($$Error$3, { + MEL_EXN_ID: $$Error$3, + _1: { + TAG: /* Applicative_path */3, + _0: symbol_rloc(undefined) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (applicative_functors.contents) { - return { - TAG: /* Lapply */2, - _0: _1, - _1: _3 - }; - } - throw new Caml_js_exceptions.MelangeError($$Error$3, { - MEL_EXN_ID: $$Error$3, - _1: { - TAG: /* Applicative_path */3, - _0: symbol_rloc(undefined) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: /* Pdir_none */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_string */0, + _0: _3[0] + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: /* Pdir_none */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_int */1, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_string */0, - _0: _3[0] - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_ident */2, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_int */1, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_ident */2, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_ident */2, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_bool */3, + _0: false + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_ident */2, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_bool */3, + _0: true + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_bool */3, - _0: false - } - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_bool */3, - _0: true - } - }; - }), + return /* Nonrecursive */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* Recursive */1; + }), (function (__caml_parser_env) { - return /* Nonrecursive */0; - }), + return /* Recursive */1; + }), (function (__caml_parser_env) { - return /* Recursive */1; - }), + return /* Nonrecursive */0; + }), (function (__caml_parser_env) { - return /* Recursive */1; - }), + return /* Upto */0; + }), (function (__caml_parser_env) { - return /* Nonrecursive */0; - }), + return /* Downto */1; + }), (function (__caml_parser_env) { - return /* Upto */0; - }), + return /* Public */1; + }), (function (__caml_parser_env) { - return /* Downto */1; - }), + return /* Private */0; + }), (function (__caml_parser_env) { - return /* Public */1; - }), + return /* Immutable */0; + }), (function (__caml_parser_env) { - return /* Private */0; - }), + return /* Mutable */1; + }), (function (__caml_parser_env) { - return /* Immutable */0; - }), + return /* Concrete */1; + }), (function (__caml_parser_env) { - return /* Mutable */1; - }), + return /* Virtual */0; + }), (function (__caml_parser_env) { - return /* Concrete */1; - }), + return [ + /* Public */1, + /* Concrete */1 + ]; + }), (function (__caml_parser_env) { - return /* Virtual */0; - }), + return [ + /* Private */0, + /* Concrete */1 + ]; + }), (function (__caml_parser_env) { - return [ - /* Public */1, - /* Concrete */1 - ]; - }), + return [ + /* Public */1, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Concrete */1 - ]; - }), + return [ + /* Private */0, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return [ - /* Public */1, - /* Virtual */0 - ]; - }), + return [ + /* Private */0, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Virtual */0 - ]; - }), + return /* Fresh */1; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Virtual */0 - ]; - }), + return /* Override */0; + }), (function (__caml_parser_env) { - return /* Fresh */1; - }), + + }), (function (__caml_parser_env) { - return /* Override */0; - }), + + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - - }), + return "-"; + }), (function (__caml_parser_env) { - - }), + return "-."; + }), (function (__caml_parser_env) { - return "-"; - }), + return "+"; + }), (function (__caml_parser_env) { - return "-."; - }), + return "+."; + }), (function (__caml_parser_env) { - return "+"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "+."; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "and"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "as"; + }), (function (__caml_parser_env) { - return "and"; - }), + return "assert"; + }), (function (__caml_parser_env) { - return "as"; - }), + return "begin"; + }), (function (__caml_parser_env) { - return "assert"; - }), + return "class"; + }), (function (__caml_parser_env) { - return "begin"; - }), + return "constraint"; + }), (function (__caml_parser_env) { - return "class"; - }), + return "do"; + }), (function (__caml_parser_env) { - return "constraint"; - }), + return "done"; + }), (function (__caml_parser_env) { - return "do"; - }), + return "downto"; + }), (function (__caml_parser_env) { - return "done"; - }), + return "else"; + }), (function (__caml_parser_env) { - return "downto"; - }), + return "end"; + }), (function (__caml_parser_env) { - return "else"; - }), + return "exception"; + }), (function (__caml_parser_env) { - return "end"; - }), + return "external"; + }), (function (__caml_parser_env) { - return "exception"; - }), + return "false"; + }), (function (__caml_parser_env) { - return "external"; - }), + return "for"; + }), (function (__caml_parser_env) { - return "false"; - }), + return "fun"; + }), (function (__caml_parser_env) { - return "for"; - }), + return "function"; + }), (function (__caml_parser_env) { - return "fun"; - }), + return "functor"; + }), (function (__caml_parser_env) { - return "function"; - }), + return "if"; + }), (function (__caml_parser_env) { - return "functor"; - }), + return "in"; + }), (function (__caml_parser_env) { - return "if"; - }), + return "include"; + }), (function (__caml_parser_env) { - return "in"; - }), + return "inherit"; + }), (function (__caml_parser_env) { - return "include"; - }), + return "initializer"; + }), (function (__caml_parser_env) { - return "inherit"; - }), + return "lazy"; + }), (function (__caml_parser_env) { - return "initializer"; - }), + return "let"; + }), (function (__caml_parser_env) { - return "lazy"; - }), + return "match"; + }), (function (__caml_parser_env) { - return "let"; - }), + return "method"; + }), (function (__caml_parser_env) { - return "match"; - }), + return "module"; + }), (function (__caml_parser_env) { - return "method"; - }), + return "mutable"; + }), (function (__caml_parser_env) { - return "module"; - }), + return "new"; + }), (function (__caml_parser_env) { - return "mutable"; - }), + return "object"; + }), (function (__caml_parser_env) { - return "new"; - }), + return "of"; + }), (function (__caml_parser_env) { - return "object"; - }), + return "open"; + }), (function (__caml_parser_env) { - return "of"; - }), + return "or"; + }), (function (__caml_parser_env) { - return "open"; - }), + return "private"; + }), (function (__caml_parser_env) { - return "or"; - }), + return "rec"; + }), (function (__caml_parser_env) { - return "private"; - }), + return "sig"; + }), (function (__caml_parser_env) { - return "rec"; - }), + return "struct"; + }), (function (__caml_parser_env) { - return "sig"; - }), + return "then"; + }), (function (__caml_parser_env) { - return "struct"; - }), + return "to"; + }), (function (__caml_parser_env) { - return "then"; - }), + return "true"; + }), (function (__caml_parser_env) { - return "to"; - }), + return "try"; + }), (function (__caml_parser_env) { - return "true"; - }), + return "type"; + }), (function (__caml_parser_env) { - return "try"; - }), + return "val"; + }), (function (__caml_parser_env) { - return "type"; - }), + return "virtual"; + }), (function (__caml_parser_env) { - return "val"; - }), + return "when"; + }), (function (__caml_parser_env) { - return "virtual"; - }), + return "while"; + }), (function (__caml_parser_env) { - return "when"; - }), + return "with"; + }), (function (__caml_parser_env) { - return "while"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + txt: _1, + loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - return "with"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + txt: _1 + ("." + _3.txt), + loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - txt: _1, - loc: symbol_rloc(undefined) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - txt: _1 + ("." + _3.txt), - loc: symbol_rloc(undefined) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return [ + undefined, + /* [] */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + { hd: _1, tl: _2 - }; - }), - (function (__caml_parser_env) { - return [ - undefined, - /* [] */0 - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - { - hd: _1, - tl: _2 - } - ]; - }), + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PStr */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PStr */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PTyp */1, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PTyp */1, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PPat */2, - _0: _2, - _1: undefined - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PPat */2, + _0: _2, + _1: undefined + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PPat */2, - _0: _2, - _1: _4 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PPat */2, + _0: _2, + _1: _4 + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }) + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }) ]; const yytables = { @@ -23444,31 +23444,31 @@ function directive_parse(token_with_comments, lexbuf) { switch (curr_token.TAG) { case /* FLOAT */1 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$4, { - MEL_EXN_ID: $$Error$4, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_float */1 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$4, { + MEL_EXN_ID: $$Error$4, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_float */1 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_float */1, _0: Caml_format.caml_float_of_string(curr_token._0) }); case /* INT */7 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$4, { - MEL_EXN_ID: $$Error$4, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_int */2 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$4, { + MEL_EXN_ID: $$Error$4, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_int */2 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_int */2, _0: curr_token._0 }); @@ -23514,37 +23514,37 @@ function directive_parse(token_with_comments, lexbuf) { break; case /* STRING */16 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$4, { - MEL_EXN_ID: $$Error$4, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_string */3 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$4, { + MEL_EXN_ID: $$Error$4, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_string */3 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_string */3, _0: curr_token._0[0] }); case /* UIDENT */17 : const value_v = query(curr_loc, curr_token._0); return token_op(calc, (function (e) { - push(e); - if (!/* tag */(typeof value_v === "number" || typeof value_v === "string") && value_v.TAG === /* Dir_bool */0) { - return value_v._0; - } - const ty = type_of_directive(value_v); - throw new Caml_js_exceptions.MelangeError($$Error$4, { - MEL_EXN_ID: $$Error$4, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: ty - }, - _2: curr_loc - }); - }), value_v); + push(e); + if (!/* tag */(typeof value_v === "number" || typeof value_v === "string") && value_v.TAG === /* Dir_bool */0) { + return value_v._0; + } + const ty = type_of_directive(value_v); + throw new Caml_js_exceptions.MelangeError($$Error$4, { + MEL_EXN_ID: $$Error$4, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: ty + }, + _2: curr_loc + }); + }), value_v); default: throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, @@ -24720,9 +24720,9 @@ function token(lexbuf) { case 29 : const stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); const match$2 = with_comment_buffer((function (lexbuf) { - store_string("*" + stars); - return __ocaml_lex_comment_rec(lexbuf, 132); - }), lexbuf); + store_string("*" + stars); + return __ocaml_lex_comment_rec(lexbuf, 132); + }), lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -25724,8 +25724,8 @@ function iter_pattern_desc(f, patl) { return may(f, patl._1); case /* Tpat_record */6 : return Stdlib__List.iter((function (param) { - Curry._1(f, param[2]); - }), patl._0); + Curry._1(f, param[2]); + }), patl._0); case /* Tpat_tuple */3 : case /* Tpat_array */7 : return Stdlib__List.iter(f, patl._0); @@ -25780,12 +25780,12 @@ function map_pattern_desc(f, d) { return { TAG: /* Tpat_record */6, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - Curry._1(f, param[2]) - ]; - }), d._0), + return [ + param[0], + param[1], + Curry._1(f, param[2]) + ]; + }), d._0), _1: d._1 }; case /* Tpat_array */7 : @@ -25861,8 +25861,8 @@ function pat_bound_idents(pat) { function rev_let_bound_idents_with_loc(bindings) { idents.contents = /* [] */0; Stdlib__List.iter((function (vb) { - bound_idents(vb.vb_pat); - }), bindings); + bound_idents(vb.vb_pat); + }), bindings); const res = idents.contents; idents.contents = /* [] */0; return res; @@ -25870,8 +25870,8 @@ function rev_let_bound_idents_with_loc(bindings) { function let_bound_idents(pat) { return Stdlib__List.map((function (prim) { - return prim[0]; - }), Stdlib__List.rev(rev_let_bound_idents_with_loc(pat))); + return prim[0]; + }), Stdlib__List.rev(rev_let_bound_idents_with_loc(pat))); } function alpha_pat(env, p) { @@ -25933,8 +25933,8 @@ function alpha_pat(env, p) { } return { pat_desc: map_pattern_desc((function (param) { - return alpha_pat(env, param); - }), d), + return alpha_pat(env, param); + }), d), pat_loc: p.pat_loc, pat_extra: p.pat_extra, pat_type: p.pat_type, @@ -26189,12 +26189,12 @@ function TypedtreeMap_MakeMap(funarg) { ctyp_desc = { TAG: /* Ttyp_object */4, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_core_type(param[2]) - ]; - }), list._0), + return [ + param[0], + param[1], + map_core_type(param[2]) + ]; + }), list._0), _1: list._1 }; break; @@ -26270,12 +26270,12 @@ function TypedtreeMap_MakeMap(funarg) { TAG: /* Tmty_with */3, _0: map_module_type(sg._0), _1: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_with_constraint(param[2]) - ]; - }), sg._1) + return [ + param[0], + param[1], + map_with_constraint(param[2]) + ]; + }), sg._1) }; break; case /* Tmty_typeof */4 : @@ -26325,14 +26325,14 @@ function TypedtreeMap_MakeMap(funarg) { TAG: /* Texp_apply */4, _0: map_expression(list._0), _1: Stdlib__List.map((function (param) { - const expo = param[1]; - const expo$1 = expo !== undefined ? map_expression(expo) : expo; - return [ - param[0], - expo$1, - param[2] - ]; - }), list._1) + const expo = param[1]; + const expo$1 = expo !== undefined ? map_expression(expo) : expo; + return [ + param[0], + expo$1, + param[2] + ]; + }), list._1) }; break; case /* Texp_match */5 : @@ -26377,12 +26377,12 @@ function TypedtreeMap_MakeMap(funarg) { case /* Texp_record */10 : const expo$2 = list._1; const list$1 = Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_expression(param[2]) - ]; - }), list._0); + return [ + param[0], + param[1], + map_expression(param[2]) + ]; + }), list._0); const expo$3 = expo$2 !== undefined ? map_expression(expo$2) : expo$2; exp_desc = { TAG: /* Texp_record */10, @@ -26475,12 +26475,12 @@ function TypedtreeMap_MakeMap(funarg) { TAG: /* Texp_override */22, _0: list._0, _1: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_expression(param[2]) - ]; - }), list._1) + return [ + param[0], + param[1], + map_expression(param[2]) + ]; + }), list._1) }; break; case /* Texp_letmodule */23 : @@ -26662,12 +26662,12 @@ function TypedtreeMap_MakeMap(funarg) { const decl$1 = Curry._1(funarg.enter_type_declaration, decl); const typ_params = Stdlib__List.map(map_type_parameter, decl$1.typ_params); const typ_cstrs = Stdlib__List.map((function (param) { - return [ - map_core_type(param[0]), - map_core_type(param[1]), - param[2] - ]; - }), decl$1.typ_cstrs); + return [ + map_core_type(param[0]), + map_core_type(param[1]), + param[2] + ]; + }), decl$1.typ_cstrs); const list = decl$1.typ_kind; let typ_kind; if (/* tag */typeof list === "number" || typeof list === "string") { @@ -26680,15 +26680,15 @@ function TypedtreeMap_MakeMap(funarg) { }; } else { const list$2 = Stdlib__List.map((function (ld) { - return { - ld_id: ld.ld_id, - ld_name: ld.ld_name, - ld_mutable: ld.ld_mutable, - ld_type: map_core_type(ld.ld_type), - ld_loc: ld.ld_loc, - ld_attributes: ld.ld_attributes - }; - }), list._0); + return { + ld_id: ld.ld_id, + ld_name: ld.ld_name, + ld_mutable: ld.ld_mutable, + ld_type: map_core_type(ld.ld_type), + ld_loc: ld.ld_loc, + ld_attributes: ld.ld_attributes + }; + }), list._0); typ_kind = { TAG: /* Ttype_record */1, _0: list$2 @@ -26821,12 +26821,12 @@ function TypedtreeMap_MakeMap(funarg) { break; case /* Tstr_class */10 : const list$1 = Stdlib__List.map((function (param) { - return [ - map_class_declaration(param[0]), - param[1], - param[2] - ]; - }), vd._0); + return [ + map_class_declaration(param[0]), + param[1], + param[2] + ]; + }), vd._0); str_desc = { TAG: /* Tstr_class */10, _0: list$1 @@ -26834,12 +26834,12 @@ function TypedtreeMap_MakeMap(funarg) { break; case /* Tstr_class_type */11 : const list$2 = Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_class_type_declaration(param[2]) - ]; - }), vd._0); + return [ + param[0], + param[1], + map_class_type_declaration(param[2]) + ]; + }), vd._0); str_desc = { TAG: /* Tstr_class_type */11, _0: list$2 @@ -26941,12 +26941,12 @@ function TypedtreeMap_MakeMap(funarg) { pat_desc = { TAG: /* Tpat_record */6, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_pattern(param[2]) - ]; - }), list._0), + return [ + param[0], + param[1], + map_pattern(param[2]) + ]; + }), list._0), _1: list._1 }; break; @@ -27017,12 +27017,12 @@ function TypedtreeMap_MakeMap(funarg) { _0: clstr._0, _1: map_pattern(clstr._1), _2: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_expression(param[2]) - ]; - }), clstr._2), + return [ + param[0], + param[1], + map_expression(param[2]) + ]; + }), clstr._2), _3: map_class_expr(clstr._3), _4: clstr._4 }; @@ -27032,12 +27032,12 @@ function TypedtreeMap_MakeMap(funarg) { TAG: /* Tcl_apply */3, _0: map_class_expr(clstr._0), _1: Stdlib__List.map((function (param) { - return [ - param[0], - may_map(map_expression, param[1]), - param[2] - ]; - }), clstr._1) + return [ + param[0], + may_map(map_expression, param[1]), + param[2] + ]; + }), clstr._1) }; break; case /* Tcl_let */4 : @@ -27047,12 +27047,12 @@ function TypedtreeMap_MakeMap(funarg) { _0: rec_flat, _1: Stdlib__List.map(map_binding, clstr._1), _2: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - map_expression(param[2]) - ]; - }), clstr._2), + return [ + param[0], + param[1], + map_expression(param[2]) + ]; + }), clstr._2), _3: map_class_expr(clstr._3) }; break; @@ -27293,14 +27293,14 @@ function TypedtreeMap_MakeMap(funarg) { sig_desc = { TAG: /* Tsig_recmodule */5, _0: Stdlib__List.map((function (md) { - return { - md_id: md.md_id, - md_name: md.md_name, - md_type: map_module_type(md.md_type), - md_attributes: md.md_attributes, - md_loc: md.md_loc - }; - }), vd._0) + return { + md_id: md.md_id, + md_name: md.md_name, + md_type: map_module_type(md.md_type), + md_attributes: md.md_attributes, + md_loc: md.md_loc + }; + }), vd._0) }; break; case /* Tsig_modtype */6 : @@ -27439,11 +27439,11 @@ function TypedtreeMap_MakeMap(funarg) { const map_package_type = function (pack) { const pack$1 = Curry._1(funarg.enter_package_type, pack); const pack_fields = Stdlib__List.map((function (param) { - return [ - param[0], - map_core_type(param[1]) - ]; - }), pack$1.pack_fields); + return [ + param[0], + map_core_type(param[1]) + ]; + }), pack$1.pack_fields); return Curry._1(funarg.leave_package_type, { pack_path: pack$1.pack_path, pack_fields: pack_fields, @@ -27548,23 +27548,23 @@ function leave_pattern(p) { function leave_expression(e) { const exp_extra = Stdlib__List.map((function (exp_extra) { - const match = exp_extra[0]; - if (match.TAG === /* Texp_open */2) { - return [ - { - TAG: /* Texp_open */2, - _0: match._0, - _1: match._1, - _2: match._2, - _3: keep_only_summary(match._3) - }, - exp_extra[1], - exp_extra[2] - ]; - } else { - return exp_extra; - } - }), e.exp_extra); + const match = exp_extra[0]; + if (match.TAG === /* Texp_open */2) { + return [ + { + TAG: /* Texp_open */2, + _0: match._0, + _1: match._1, + _2: match._2, + _3: keep_only_summary(match._3) + }, + exp_extra[1], + exp_extra[2] + ]; + } else { + return exp_extra; + } + }), e.exp_extra); return { exp_desc: e.exp_desc, exp_loc: e.exp_loc, @@ -27884,8 +27884,8 @@ function save_cmt(filename, modname, binary_annots, sourcefile, initial_env, sg) } if (exit === 1) { Caml_sys.caml_sys_system_command(cmd + (" -cmt-add " + (filename + ( - sourcefile !== undefined ? ":" + sourcefile : "" - )))); + sourcefile !== undefined ? ":" + sourcefile : "" + )))); } } @@ -28306,8 +28306,8 @@ function flatten_fields(ty) { const match = flatten(/* [] */0, ty); return [ Stdlib__List.sort((function (param, param$1) { - return Caml.caml_string_compare(param[0], param$1[0]); - }), match[0]), + return Caml.caml_string_compare(param[0], param$1[0]); + }), match[0]), match[1] ]; } @@ -28315,14 +28315,14 @@ function flatten_fields(ty) { function build_fields(level) { return function (param, param$1) { return Stdlib__List.fold_right((function (param, ty2) { - return newty2(level, { - TAG: /* Tfield */5, - _0: param[0], - _1: param[1], - _2: param[2], - _3: ty2 - }); - }), param, param$1); + return newty2(level, { + TAG: /* Tfield */5, + _0: param[0], + _1: param[1], + _2: param[2], + _3: ty2 + }); + }), param, param$1); }; } @@ -28617,13 +28617,13 @@ function hide_private_methods(ty) { match._1.contents = undefined; const match$1 = flatten_fields(match._0); return Stdlib__List.iter((function (param) { - const r = field_kind_repr(param[1]); - if (/* tag */typeof r === "number" || typeof r === "string") { - return; - } else { - return set_kind(r._0, /* Fabsent */1); - } - }), match$1[0]); + const r = field_kind_repr(param[1]); + if (/* tag */typeof r === "number" || typeof r === "string") { + return; + } else { + return set_kind(r._0, /* Fabsent */1); + } + }), match$1[0]); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -28668,8 +28668,8 @@ function class_type_arity(_param) { function sort_row_fields(param) { return Stdlib__List.sort((function (param, param$1) { - return Caml.caml_string_compare(param[0], param$1[0]); - }), param); + return Caml.caml_string_compare(param[0], param$1[0]); + }), param); } function merge_row_fields(fi1, fi2) { @@ -28870,8 +28870,8 @@ function free_vars_rec(_real, _ty) { const match$1 = really_closed.contents; if (/* tag */typeof match === "number" || typeof match === "string") { return iter_type_expr((function (param) { - return free_vars_rec(true, param); - }), ty$1); + return free_vars_rec(true, param); + }), ty$1); } switch (match.TAG) { case /* Tvar */0 : @@ -28886,8 +28886,8 @@ function free_vars_rec(_real, _ty) { case /* Tconstr */3 : if (match$1 === undefined) { return iter_type_expr((function (param) { - return free_vars_rec(true, param); - }), ty$1); + return free_vars_rec(true, param); + }), ty$1); } try { const match$2 = find_type_expansion(match._0, Caml_option.valFromOption(match$1)); @@ -28910,8 +28910,8 @@ function free_vars_rec(_real, _ty) { } return Stdlib__List.iter((function (param) { - return free_vars_rec(true, param); - }), match._1); + return free_vars_rec(true, param); + }), match._1); case /* Tobject */4 : _ty = match._0; _real = false; @@ -28924,8 +28924,8 @@ function free_vars_rec(_real, _ty) { case /* Tvariant */8 : const row = row_repr_aux(/* [] */0, match._0); iter_row((function (param) { - return free_vars_rec(true, param); - }), row); + return free_vars_rec(true, param); + }), row); if (static_row(row)) { return; } @@ -28934,8 +28934,8 @@ function free_vars_rec(_real, _ty) { continue; default: return iter_type_expr((function (param) { - return free_vars_rec(true, param); - }), ty$1); + return free_vars_rec(true, param); + }), ty$1); } }; } @@ -28952,8 +28952,8 @@ function free_vars$1(env, ty) { function free_variables$1(env, ty) { const tl = Stdlib__List.map((function (prim) { - return prim[0]; - }), free_vars$1(env, ty)); + return prim[0]; + }), free_vars$1(env, ty)); unmark_type(ty); return tl; } @@ -28999,16 +28999,16 @@ function closed_type_decl(decl) { v === /* Type_abstract */0; } else if (v.TAG === /* Type_record */0) { Stdlib__List.iter((function (l) { - closed_type(l.ld_type); - }), v._0); + closed_type(l.ld_type); + }), v._0); } else { Stdlib__List.iter((function (param) { - if (param.cd_res !== undefined) { - return; - } else { - return Stdlib__List.iter(closed_type, param.cd_args); - } - }), v._0); + if (param.cd_res !== undefined) { + return; + } else { + return Stdlib__List.iter(closed_type, param.cd_args); + } + }), v._0); } const ty = decl.type_manifest; if (ty !== undefined) { @@ -29058,38 +29058,38 @@ function closed_class(params, sign) { Stdlib__List.iter(mark_type, params); mark_type(match[1]); Stdlib__List.iter((function (param) { - if (param[0] === dummy_method) { - return mark_type(param[2]); - } - - }), fields); + if (param[0] === dummy_method) { + return mark_type(param[2]); + } + + }), fields); try { mark_type_node(repr(sign.csig_self)); Stdlib__List.iter((function (param) { - const ty = param[2]; - if (!Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0)) { - return; - } - try { - return closed_type(ty); - } - catch (raw_exn){ - const 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, - _1: { - TAG: /* CC_Method */0, - _0: exn._1, - _1: exn._2, - _2: param[0], - _3: ty - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + const ty = param[2]; + if (!Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0)) { + return; + } + try { + return closed_type(ty); + } + catch (raw_exn){ + const 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, + _1: { + TAG: /* CC_Method */0, + _0: exn._1, + _1: exn._2, + _2: param[0], + _3: ty + } + }); } - }), fields); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), fields); iter_type_expr(mark_type, repr(sign.csig_self)); Stdlib__List.iter(unmark_type, params); unmark_class_signature(sign); @@ -29120,12 +29120,12 @@ function iter_generalize(tyl, ty) { const match = ty$1.desc; if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tconstr */3) { iter_abbrev((function (param) { - return iter_generalize(tyl, param); - }), match._2.contents); + return iter_generalize(tyl, param); + }), match._2.contents); } iter_type_expr((function (param) { - return iter_generalize(tyl, param); - }), ty$1); + return iter_generalize(tyl, param); + }), ty$1); } function iter_generalize$1(tyl, ty) { @@ -29157,8 +29157,8 @@ function generalize_structure(var_level, ty) { if (tmp) { set_level(ty$1, 100000000); return iter_type_expr((function (param) { - return generalize_structure(var_level, param); - }), ty$1); + return generalize_structure(var_level, param); + }), ty$1); } } @@ -29211,10 +29211,10 @@ function generalize_spine(_ty) { const forward_try_expand_once = { contents: (function (env, ty) { - throw new Caml_js_exceptions.MelangeError(Cannot_expand, { - MEL_EXN_ID: Cannot_expand - }); - }) + throw new Caml_js_exceptions.MelangeError(Cannot_expand, { + MEL_EXN_ID: Cannot_expand + }); + }) }; function get_level(env, p) { @@ -29313,8 +29313,8 @@ function update_level(env, level, _ty) { }); } return iter_type_expr((function (param) { - return update_level(env, level, param); - }), ty$1); + return update_level(env, level, param); + }), ty$1); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -29366,8 +29366,8 @@ function update_level(env, level, _ty) { } set_level(ty$1, level); return iter_type_expr((function (param) { - return update_level(env, level, param); - }), ty$1); + return update_level(env, level, param); + }), ty$1); case /* Tpackage */11 : const p$1 = row._0; if (level < get_level(env, p$1)) { @@ -29404,8 +29404,8 @@ function update_level(env, level, _ty) { } set_level(ty$1, level); return iter_type_expr((function (param) { - return update_level(env, level, param); - }), ty$1); + return update_level(env, level, param); + }), ty$1); }; } @@ -29433,8 +29433,8 @@ function generalize_expansive(env, var_level, _ty) { const match = ty$1.desc; if (/* tag */typeof match === "number" || typeof match === "string") { return iter_type_expr((function (param) { - return generalize_expansive(env, var_level, param); - }), ty$1); + return generalize_expansive(env, var_level, param); + }), ty$1); } switch (match.TAG) { case /* Tarrow */1 : @@ -29451,29 +29451,29 @@ function generalize_expansive(env, var_level, _ty) { const 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; - }), tyl); + return Types_Variance.may_inv; + }), tyl); } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } match._2.contents = /* Mnil */0; return Stdlib__List.iter2((function (v, t) { - if (Curry._2(Types_Variance.mem, /* May_weak */2, v)) { - return generalize_contravariant(env)(var_level, t); - } else { - return generalize_expansive(env, var_level, t); - } - }), variance, tyl); + if (Curry._2(Types_Variance.mem, /* May_weak */2, v)) { + return generalize_contravariant(env)(var_level, t); + } else { + return generalize_expansive(env, var_level, t); + } + }), variance, tyl); case /* Tpackage */11 : const partial_arg = generalize_contravariant(env); return Stdlib__List.iter((function (param) { - return partial_arg(var_level, param); - }), match._2); + return partial_arg(var_level, param); + }), match._2); default: return iter_type_expr((function (param) { - return generalize_expansive(env, var_level, param); - }), ty$1); + return generalize_expansive(env, var_level, param); + }), ty$1); } }; } @@ -29543,8 +29543,8 @@ function limited_generalize(ty0, ty) { tl: /* [] */0 }; return iter_type_expr((function (param) { - return inverse(partial_arg, param); - }), ty$1); + return inverse(partial_arg, param); + }), ty$1); } if (ty$1.level >= 0) { return; @@ -29577,17 +29577,17 @@ function limited_generalize(ty0, ty) { inverse(/* [] */0, ty); if (ty0$1.level < 0) { iter_type_expr((function (param) { - return inverse(/* [] */0, param); - }), ty0$1); + return inverse(/* [] */0, param); + }), ty0$1); } Stdlib__List.iter(generalize_parents, roots.contents); Stdlib__Hashtbl.iter((function (param, param$1) { - const ty = param$1[0]; - if (ty.level !== 100000000) { - return set_level(ty, current_level.contents); - } - - }), graph); + const ty = param$1[0]; + if (ty.level !== 100000000) { + return set_level(ty, current_level.contents); + } + + }), graph); } function inv_type(hash, pty, ty) { @@ -29610,8 +29610,8 @@ function inv_type(hash, pty, ty) { tl: /* [] */0 }; return iter_type_expr((function (param) { - return inv_type(hash, partial_arg, param); - }), ty$1); + return inv_type(hash, partial_arg, param); + }), ty$1); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -29631,8 +29631,8 @@ function compute_univars(ty) { if (!Curry._2(mem$3, univ, univs.contents)) { univs.contents = Curry._2(add$3, univ, univs.contents); return Stdlib__List.iter((function (param) { - return add_univar(univ, param); - }), inv.inv_parents); + return add_univar(univ, param); + }), inv.inv_parents); } else { return; } @@ -29644,18 +29644,18 @@ function compute_univars(ty) { contents: Curry._1(singleton$2, univ) }); return Stdlib__List.iter((function (param) { - return add_univar(univ, param); - }), inv.inv_parents); + return add_univar(univ, param); + }), inv.inv_parents); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } }; Curry._2(TypeHash.iter, (function (ty, inv) { - if (is_Tunivar(ty)) { - return add_univar(ty, inv); - } - - }), inverted); + if (is_Tunivar(ty)) { + return add_univar(ty, inv); + } + + }), inverted); return function (ty) { try { return Curry._2(TypeHash.find, node_univars, ty).contents; @@ -30007,8 +30007,8 @@ function instance_def(sch) { function instance_list(env, schl) { const env$1 = gadt_env(env); const tyl = Stdlib__List.map((function (t) { - return copy(env$1, undefined, undefined, t); - }), schl); + return copy(env$1, undefined, undefined, t); + }), schl); cleanup_types(undefined); return tyl; } @@ -30123,8 +30123,8 @@ function instance_constructor(in_pattern, cstr) { function instance_parameterized_type(keep_names, sch_args, sch) { const ty_args = Stdlib__List.map((function (t) { - return copy(undefined, undefined, keep_names, t); - }), sch_args); + return copy(undefined, undefined, keep_names, t); + }), sch_args); const ty = copy(undefined, undefined, undefined, sch); cleanup_types(undefined); return [ @@ -30142,26 +30142,26 @@ function instance_declaration(decl) { cl.TAG === /* Type_record */0 ? ({ TAG: /* Type_record */0, _0: Stdlib__List.map((function (l) { - return { - ld_id: l.ld_id, - ld_mutable: l.ld_mutable, - ld_type: copy(undefined, undefined, undefined, l.ld_type), - ld_loc: l.ld_loc, - ld_attributes: l.ld_attributes - }; - }), cl._0), + return { + ld_id: l.ld_id, + ld_mutable: l.ld_mutable, + ld_type: copy(undefined, undefined, undefined, l.ld_type), + ld_loc: l.ld_loc, + ld_attributes: l.ld_attributes + }; + }), cl._0), _1: cl._1 }) : ({ TAG: /* Type_variant */1, _0: Stdlib__List.map((function (c) { - return { - cd_id: c.cd_id, - cd_args: Stdlib__List.map(simple_copy, c.cd_args), - cd_res: may_map(simple_copy, c.cd_res), - cd_loc: c.cd_loc, - cd_attributes: c.cd_attributes - }; - }), cl._0) + return { + cd_id: c.cd_id, + cd_args: Stdlib__List.map(simple_copy, c.cd_args), + cd_res: may_map(simple_copy, c.cd_res), + cd_loc: c.cd_loc, + cd_attributes: c.cd_attributes + }; + }), cl._0) }) ); const decl_type_params = Stdlib__List.map(simple_copy, decl.type_params); @@ -30204,19 +30204,19 @@ function instance_class(params, cty) { _0: { csig_self: copy(undefined, undefined, undefined, sign$1.csig_self), csig_vars: Curry._2(Meths.map, (function (param) { - return [ - param[0], - param[1], - copy(undefined, undefined, undefined, param[2]) - ]; - }), sign$1.csig_vars), + return [ + param[0], + param[1], + copy(undefined, undefined, undefined, param[2]) + ]; + }), sign$1.csig_vars), csig_concr: sign$1.csig_concr, csig_inher: Stdlib__List.map((function (param) { - return [ - param[0], - Stdlib__List.map(simple_copy, param[1]) - ]; - }), sign$1.csig_inher) + return [ + param[0], + Stdlib__List.map(simple_copy, param[1]) + ]; + }), sign$1.csig_inher) } }; case /* Cty_arrow */2 : @@ -30257,8 +30257,8 @@ function diff_list(l1, l2) { function conflicts(free, bound) { const bound$1 = Stdlib__List.map(repr, bound); return Curry._2(exists$1, (function (t) { - return Stdlib__List.memq(repr(t), bound$1); - }), free); + return Stdlib__List.memq(repr(t), bound$1); + }), free); } const delayed_copy = { @@ -30277,11 +30277,11 @@ function copy_sep(fixed, free, bound, visited, ty) { hd: { LAZY_DONE: false, VAL: (function () { - t.desc = { - TAG: /* Tlink */6, - _0: copy(undefined, undefined, undefined, ty$1) - }; - }) + t.desc = { + TAG: /* Tlink */6, + _0: copy(undefined, undefined, undefined, ty$1) + }; + }) }, tl: delayed_copy.contents }; @@ -30356,18 +30356,18 @@ function copy_sep(fixed, free, bound, visited, ty) { case /* Tpoly */10 : const tl = Stdlib__List.map(repr, row0._1); const tl$p = Stdlib__List.map((function (t) { - return newty2(current_level.contents, t.desc); - }), tl); + return newty2(current_level.contents, t.desc); + }), tl); const bound$1 = Stdlib.$at(tl, bound); const visited$2 = Stdlib.$at(Stdlib__List.map2((function (ty, t) { - return [ - ty, - [ - t, - bound$1 - ] - ]; - }), tl, tl$p), visited$1); + return [ + ty, + [ + t, + bound$1 + ] + ]; + }), tl, tl$p), visited$1); tmp = { TAG: /* Tpoly */10, _0: copy_sep(fixed, free, bound$1, visited$2, row0._0), @@ -30421,14 +30421,14 @@ function instance_poly(keep_namesOpt, fixed, univars, sch) { }; const vars = Stdlib__List.map(copy_var, univars$1); const pairs = Stdlib__List.map2((function (u, v) { - return [ - u, - [ - v, - /* [] */0 - ] - ]; - }), univars$1, vars); + return [ + u, + [ + v, + /* [] */0 + ] + ]; + }), univars$1, vars); delayed_copy.contents = /* [] */0; const ty = copy_sep(fixed, compute_univars(sch), /* [] */0, pairs, sch); Stdlib__List.iter(CamlinternalLazy.force, delayed_copy.contents); @@ -30467,11 +30467,11 @@ function instance_label(fixed, lbl) { const unify$p = { contents: (function (env, ty1, ty2) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - }) + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + }) }; function subst(env, level, priv, abbrev, ty, params, args, body) { @@ -31044,8 +31044,8 @@ function occur_rec(env, visited, ty0, ty) { tl: visited }; return iter_type_expr((function (param) { - return occur_rec(env, partial_arg, ty0, param); - }), ty); + return occur_rec(env, partial_arg, ty0, param); + }), ty); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -31079,8 +31079,8 @@ function occur_rec(env, visited, ty0, ty) { tl: visited }; return iter_type_expr((function (param) { - return occur_rec(env, partial_arg$1, ty0, param); - }), ty$p); + return occur_rec(env, partial_arg$1, ty0, param); + }), ty$p); } } @@ -31110,8 +31110,8 @@ function occur_rec(env, visited, ty0, ty) { } if (!occur_ok) { return iter_type_expr((function (param) { - return occur_rec(env, visited, ty0, param); - }), ty); + return occur_rec(env, visited, ty0, param); + }), ty); } } @@ -31173,8 +31173,8 @@ function unify_univar(t1, t2, _param) { const find_univ = function (t, cl) { try { const match = Stdlib__List.find((function (param) { - return t === repr(param[0]); - }), cl); + return t === repr(param[0]); + }), cl); return Caml_option.some(match[1]); } catch (raw_exn){ @@ -31255,8 +31255,8 @@ function occur_univar(env, ty) { try { const bound$p = Curry._2(find$1, ty$1, visited.contents); if (Curry._2(exists$1, (function (x) { - return !Curry._2(mem$3, x, bound); - }), bound$p)) { + return !Curry._2(mem$3, x, bound); + }), bound$p)) { visited.contents = Curry._3(add$4, ty$1, Curry._2(inter$2, bound, bound$p), visited.contents); tmp$1 = true; } else { @@ -31281,8 +31281,8 @@ function occur_univar(env, ty) { const match = ty$1.desc; if (/* tag */typeof match === "number" || typeof match === "string") { return iter_type_expr((function (param) { - return occur_rec(bound, param); - }), ty$1); + return occur_rec(bound, param); + }), ty$1); } switch (match.TAG) { case /* Tconstr */3 : @@ -31293,18 +31293,18 @@ function occur_univar(env, ty) { try { const 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_rec(bound, t); - } - - }), tl, td.type_variance); + if (Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v)) { + return occur_rec(bound, t); + } + + }), tl, td.type_variance); } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { return Stdlib__List.iter((function (param) { - return occur_rec(bound, param); - }), tl); + return occur_rec(bound, param); + }), tl); } throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } @@ -31332,8 +31332,8 @@ function occur_univar(env, ty) { continue; default: return iter_type_expr((function (param) { - return occur_rec(bound, param); - }), ty$1); + return occur_rec(bound, param); + }), ty$1); } }; }; @@ -31349,8 +31349,8 @@ function occur_univar(env, ty) { function add_univars(param, param$1) { return Stdlib__List.fold_left((function (s, param) { - return Curry._2(add$3, repr(param[0]), s); - }), param, param$1); + return Curry._2(add$3, repr(param[0]), s); + }), param, param$1); } function get_univar_family(univar_pairs, univars) { @@ -31360,8 +31360,8 @@ function get_univar_family(univar_pairs, univars) { const insert = function (s, param) { const cl2 = param[1]; if (cl2 && Stdlib__List.exists((function (param) { - return Curry._2(mem$3, repr(param[0]), s); - }), param[0])) { + return Curry._2(mem$3, repr(param[0]), s); + }), param[0])) { return add_univars(s, cl2); } else { return s; @@ -31397,11 +31397,11 @@ function univars_escape(env, univar_pairs, vl, ty) { try { const 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); - } - - }), tl, td.type_variance); + if (Curry._2(Types_Variance.mem, /* May_pos */0, v) || Curry._2(Types_Variance.mem, /* May_neg */1, v)) { + return occur(t); + } + + }), tl, td.type_variance); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -31419,8 +31419,8 @@ function univars_escape(env, univar_pairs, vl, ty) { }); case /* Tpoly */10 : if (Stdlib__List.exists((function (t) { - return Curry._2(mem$3, repr(t), family); - }), match._1)) { + return Curry._2(mem$3, repr(t), family); + }), match._1)) { return; } _t = match._0; @@ -31446,19 +31446,19 @@ function univars_escape(env, univar_pairs, vl, ty) { function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { const old_univars = univar_pairs.contents; const known_univars = Stdlib__List.fold_left((function (s, param) { - return add_univars(s, param[0]); - }), /* Empty */0, old_univars); + return add_univars(s, param[0]); + }), /* Empty */0, old_univars); const tl1$1 = Stdlib__List.map(repr, tl1); const 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, { + return Curry._2(mem$3, t, known_univars); + }), tl1$1) && univars_escape(env, old_univars, tl1$1, newty2(current_level.contents, { TAG: /* Tpoly */10, _0: t2, _1: tl2$1 })) || Stdlib__List.exists((function (t) { - return Curry._2(mem$3, t, known_univars); - }), tl2$1) && univars_escape(env, old_univars, tl2$1, newty2(current_level.contents, { + return Curry._2(mem$3, t, known_univars); + }), tl2$1) && univars_escape(env, old_univars, tl2$1, newty2(current_level.contents, { TAG: /* Tpoly */10, _0: t1, _1: tl1$1 @@ -31469,21 +31469,21 @@ function enter_poly(env, univar_pairs, t1, tl1, t2, tl2, f) { }); } const cl1 = Stdlib__List.map((function (t) { - return [ - t, - { - contents: undefined - } - ]; - }), tl1$1); + return [ + t, + { + contents: undefined + } + ]; + }), tl1$1); const cl2 = Stdlib__List.map((function (t) { - return [ - t, - { - contents: undefined - } - ]; - }), tl2$1); + return [ + t, + { + contents: undefined + } + ]; + }), tl2$1); univar_pairs.contents = { hd: [ cl1, @@ -31532,22 +31532,22 @@ function has_cached_expansion(p, _abbrev) { function expand_trace(env, trace) { return Stdlib__List.fold_right((function (param, rem) { - const t2 = param[1]; - const t1 = param[0]; - return { + const t2 = param[1]; + const t1 = param[0]; + return { + hd: [ + repr(t1), + full_expand(env, t1) + ], + tl: { hd: [ - repr(t1), - full_expand(env, t1) + repr(t2), + full_expand(env, t2) ], - tl: { - hd: [ - repr(t2), - full_expand(env, t2) - ], - tl: rem - } - }; - }), trace, /* [] */0); + tl: rem + } + }; + }), trace, /* [] */0); } function mkvariant(fields, closed) { @@ -31976,18 +31976,18 @@ function mcomp(type_pairs, env, _t1, _t2) { const 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; - }), tl1); + return false; + }), tl1); } else { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); } } return Stdlib__List.iter2((function (i, param) { - if (i) { - return mcomp(type_pairs, env, param[0], param[1]); - } - - }), inj, Stdlib__List.combine(tl1, tl2)); + if (i) { + return mcomp(type_pairs, env, param[0], param[1]); + } + + }), inj, Stdlib__List.combine(tl1, tl2)); } if (non_aliasable(p1, decl) && non_aliasable(p2, decl$p)) { throw new Caml_js_exceptions.MelangeError(Unify, { @@ -32225,119 +32225,48 @@ function mcomp(type_pairs, env, _t1, _t2) { }); } return Stdlib__List.iter((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - const match$1 = row_field_repr_aux(/* [] */0, param[2]); - let exit = 0; - let exit$1 = 0; - if (/* tag */typeof match === "number" || typeof match === "string") { - exit$1 = 2; - } else if (match.TAG === /* Rpresent */0) { - const t1 = match._0; - if (t1 !== undefined) { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1.TAG === /* Rpresent */0) { - const t2 = match$1._0; - if (t2 !== undefined) { - return mcomp(type_pairs, env, t1, t2); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1._0) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - return Stdlib__List.iter((function (param) { - return mcomp(type_pairs, env, t1, param); - }), match$1._1); - } else { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1.TAG === /* Rpresent */0) { - if (match$1._0 === undefined) { - return; - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (!match$1._1) { - return; - } + const match = row_field_repr_aux(/* [] */0, param[1]); + const match$1 = row_field_repr_aux(/* [] */0, param[2]); + let exit = 0; + let exit$1 = 0; + if (/* tag */typeof match === "number" || typeof match === "string") { + exit$1 = 2; + } else if (match.TAG === /* Rpresent */0) { + const t1 = match._0; + if (t1 !== undefined) { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - } else { - let exit$2 = 0; - if (match._0 || /* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Rpresent */0) { - exit$2 = 3; - } else { - const t2$1 = match$1._0; - if (t2$1 !== undefined) { - return Stdlib__List.iter((function (param) { - return mcomp(type_pairs, env, t2$1, param); - }), match._1); + if (match$1.TAG === /* Rpresent */0) { + const t2 = match$1._0; + if (t2 !== undefined) { + return mcomp(type_pairs, env, t1, t2); } - exit$2 = 3; + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } - if (exit$2 === 3) { - if (match._1) { - exit$1 = 2; - } else { - exit = 1; - } + if (match$1._0) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } - - } - if (exit$1 === 2) { + return Stdlib__List.iter((function (param) { + return mcomp(type_pairs, env, t1, param); + }), match$1._1); + } else { if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - return; - } - if (match$1.TAG !== /* Rpresent */0) { - return; - } - if (match$1._0 !== undefined) { - exit = 1; - } else { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - } - if (exit === 1) { - let exit$3 = 0; - if (/* tag */typeof match === "number" || typeof match === "string") { - exit$3 = 2; - } else { - if (!match._0) { - return; - } - exit$3 = 2; - } - if (exit$3 === 2) { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - return; - } - if (match$1.TAG !== /* Rpresent */0) { - return; - } + if (match$1.TAG === /* Rpresent */0) { if (match$1._0 === undefined) { return; } @@ -32346,10 +32275,81 @@ function mcomp(type_pairs, env, _t1, _t2) { _1: /* [] */0 }); } - + if (!match$1._1) { + return; + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + } else { + let exit$2 = 0; + if (match._0 || /* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Rpresent */0) { + exit$2 = 3; + } else { + const t2$1 = match$1._0; + if (t2$1 !== undefined) { + return Stdlib__List.iter((function (param) { + return mcomp(type_pairs, env, t2$1, param); + }), match._1); + } + exit$2 = 3; + } + if (exit$2 === 3) { + if (match._1) { + exit$1 = 2; + } else { + exit = 1; + } } - }), match$6[2]); + } + if (exit$1 === 2) { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + return; + } + if (match$1.TAG !== /* Rpresent */0) { + return; + } + if (match$1._0 !== undefined) { + exit = 1; + } else { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + } + if (exit === 1) { + let exit$3 = 0; + if (/* tag */typeof match === "number" || typeof match === "string") { + exit$3 = 2; + } else { + if (!match._0) { + return; + } + exit$3 = 2; + } + if (exit$3 === 2) { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + return; + } + if (match$1.TAG !== /* Rpresent */0) { + return; + } + if (match$1._0 === undefined) { + return; + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + + } + + }), match$6[2]); default: throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -32423,8 +32423,8 @@ function mcomp(type_pairs, env, _t1, _t2) { break; case /* Tpoly */10 : return enter_poly(env, univar_pairs, t1$2, tl1$1, match$3._0, match$3._1, (function (param, param$1) { - return mcomp(type_pairs, env, param, param$1); - })); + return mcomp(type_pairs, env, param, param$1); + })); default: throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -32510,8 +32510,8 @@ function mcomp_list(type_pairs, env, tl1, tl2) { }); } Stdlib__List.iter2((function (param, param$1) { - return mcomp(type_pairs, env, param, param$1); - }), tl1, tl2); + return mcomp(type_pairs, env, param, param$1); + }), tl1, tl2); } function mcomp_fields(type_pairs, env, ty1, ty2) { @@ -32536,9 +32536,9 @@ function mcomp_fields(type_pairs, env, ty1, ty2) { }); } Stdlib__List.iter((function (param) { - mcomp_kind(param[1], param[3]); - mcomp(type_pairs, env, param[2], param[4]); - }), match$2[0]); + mcomp_kind(param[1], param[3]); + mcomp(type_pairs, env, param[2], param[4]); + }), match$2[0]); } function mcomp_kind(k1, k2) { @@ -32736,28 +32736,28 @@ function eq_package_path(env, p1, p2) { const nondep_type$p = { contents: (function (param, param$1, param$2) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 32262, - 37 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 32262, + 37 + ] + }); + }) }; const 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", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 32263, - 48 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 32263, + 48 + ] + }); + }) }; function concat_longident(lid1) { @@ -32909,10 +32909,10 @@ function unify_package(env, unify_list, lv1, p1, n1, tl1, lv2, p2, n2, tl2) { _0: p1 }, n1, tl1); Curry._2(unify_list, Stdlib__List.map((function (prim) { - return prim[1]; - }), ntl1), Stdlib__List.map((function (prim) { - return prim[1]; - }), ntl2)); + return prim[1]; + }), ntl1), Stdlib__List.map((function (prim) { + return prim[1]; + }), ntl2)); if (eq_package_path(env, p1, p2) || Curry._7(package_subtype.contents, env, p1, n1, tl1, p2, n2, tl2) && Curry._7(package_subtype.contents, env, p2, n2, tl2, p1, n1, tl1)) { return; } @@ -33154,11 +33154,11 @@ function unify2(env, t1, t2) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: Stdlib__List.map((function (param) { - return [ - param[1], - param[0] - ]; - }), trace._1) + return [ + param[1], + param[0] + ]; + }), trace._1) }); } throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); @@ -33173,8 +33173,8 @@ function unify_list(env, tl1, tl2) { }); } Stdlib__List.iter2((function (param, param$1) { - return unify(env, param, param$1); - }), tl1, tl2); + return unify(env, param, param$1); + }), tl1, tl2); } function unify_fields(env, ty1, ty2) { @@ -33194,51 +33194,51 @@ function unify_fields(env, ty1, ty2) { unify(env, build_fields(l1)(miss1, va), rest2); unify(env, rest1, build_fields(l2)(miss2, va)); return Stdlib__List.iter((function (param) { - const t2 = param[4]; - const k2 = param[3]; - const t1 = param[2]; - const k1 = param[1]; - const n = param[0]; - unify_kind(k1, k2); - try { - if (trace_gadt_instances.contents) { - update_level(env.contents, va.level, t1); - } - return unify(env, t1, t2); + const t2 = param[4]; + const k2 = param[3]; + const t1 = param[2]; + const k1 = param[1]; + const n = param[0]; + unify_kind(k1, k2); + try { + if (trace_gadt_instances.contents) { + update_level(env.contents, va.level, t1); } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - const desc_3 = newty2(current_level.contents, /* Tnil */0); - const desc = { - TAG: /* Tfield */5, - _0: n, - _1: k1, - _2: t1, - _3: desc_3 - }; - const desc_3$1 = newty2(current_level.contents, /* Tnil */0); - const desc$1 = { - TAG: /* Tfield */5, - _0: n, - _1: k2, - _2: t2, - _3: desc_3$1 - }; - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: { - hd: [ - newty2(current_level.contents, desc), - newty2(current_level.contents, desc$1) - ], - tl: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + return unify(env, t1, t2); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + const desc_3 = newty2(current_level.contents, /* Tnil */0); + const desc = { + TAG: /* Tfield */5, + _0: n, + _1: k1, + _2: t1, + _3: desc_3 + }; + const desc_3$1 = newty2(current_level.contents, /* Tnil */0); + const desc$1 = { + TAG: /* Tfield */5, + _0: n, + _1: k2, + _2: t2, + _3: desc_3$1 + }; + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: { + hd: [ + newty2(current_level.contents, desc), + newty2(current_level.contents, desc$1) + ], + tl: trace._1 + } + }); } - }), match$2[0]); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), match$2[0]); } catch (exn){ log_type(rest1); @@ -33264,26 +33264,26 @@ function unify_row(env, row1, row2) { if (Caml_obj.caml_notequal(r1, /* [] */0) && Caml_obj.caml_notequal(r2, /* [] */0)) { const ht = Stdlib__Hashtbl.create(undefined, Stdlib__List.length(r1)); Stdlib__List.iter((function (param) { - const l = param[0]; - Stdlib__Hashtbl.add(ht, hash_variant(l), l); - }), r1); + const l = param[0]; + Stdlib__Hashtbl.add(ht, hash_variant(l), l); + }), r1); Stdlib__List.iter((function (param) { - const l = param[0]; - try { - throw new Caml_js_exceptions.MelangeError(Tags, { - MEL_EXN_ID: Tags, - _1: l, - _2: Stdlib__Hashtbl.find(ht, hash_variant(l)) - }); - } - catch (raw_exn){ - const 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); + const l = param[0]; + try { + throw new Caml_js_exceptions.MelangeError(Tags, { + MEL_EXN_ID: Tags, + _1: l, + _2: Stdlib__Hashtbl.find(ht, hash_variant(l)) + }); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return; } - }), r2); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), r2); } const fixed1 = row_fixed(row1$1); const fixed2 = row_fixed(row2$1); @@ -33297,26 +33297,26 @@ function unify_row(env, row1, row2) { const closed = row1$1.row_closed || row2$1.row_closed; const keep = function ($$switch) { return Stdlib__List.for_all((function (param) { - const 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 { - return Caml_obj.caml_notequal(row_field_repr_aux(/* [] */0, match[1]), /* Rabsent */0); - } - }), pairs); + const 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 { + return Caml_obj.caml_notequal(row_field_repr_aux(/* [] */0, match[1]), /* Rabsent */0); + } + }), pairs); }; const 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); + return Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0); + }), fields); }; if (closed && (empty(r1) || row2$1.row_closed) && (empty(r2) || row1$1.row_closed) && Stdlib__List.for_all((function (param) { - if (Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0)) { - return true; - } else { - return Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[2]), /* Rabsent */0); - } - }), pairs)) { + if (Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0)) { + return true; + } else { + return Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[2]), /* Rabsent */0); + } + }), pairs)) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: { @@ -33329,17 +33329,17 @@ function unify_row(env, row1, row2) { }); } const name = row1$1.row_name !== undefined && (row1$1.row_closed || empty(r2)) && (!row2$1.row_closed || keep(function (f1, f2) { - return [ - f1, - f2 - ]; - }) && empty(r1)) ? row1$1.row_name : ( + return [ + f1, + f2 + ]; + }) && empty(r1)) ? row1$1.row_name : ( row2$1.row_name !== undefined && (row2$1.row_closed || empty(r1)) && (!row1$1.row_closed || keep(function (f1, f2) { - return [ - f2, - f1 - ]; - }) && empty(r2)) ? row2$1.row_name : undefined + return [ + f2, + f1 + ]; + }) && empty(r2)) ? row2$1.row_name : undefined ); const set_more = function (row, rest) { const rest$1 = closed ? filter_row_fields(row.row_closed, rest) : rest; @@ -33398,307 +33398,307 @@ function unify_row(env, row1, row2) { set_more(row2$1, r1); set_more(row1$1, r2); return Stdlib__List.iter((function (param) { - const f2 = param[2]; - const f1 = param[1]; - const l = param[0]; - try { - let _f1 = f1; - let _f2 = f2; - while(true) { - const f2$1 = _f2; - const f1$1 = _f1; - const f1$2 = row_field_repr_aux(/* [] */0, f1$1); - const f2$2 = row_field_repr_aux(/* [] */0, f2$1); - if (f1$2 === f2$2) { + const f2 = param[2]; + const f1 = param[1]; + const l = param[0]; + try { + let _f1 = f1; + let _f2 = f2; + while(true) { + const f2$1 = _f2; + const f1$1 = _f1; + const f1$2 = row_field_repr_aux(/* [] */0, f1$1); + const f2$2 = row_field_repr_aux(/* [] */0, f2$1); + if (f1$2 === f2$2) { + return; + } + if (/* tag */typeof f1$2 === "number" || typeof f1$2 === "string") { + if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { return; } - if (/* tag */typeof f1$2 === "number" || typeof f1$2 === "string") { + if (f2$2.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (f2$2._2) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (!fixed2) { + return set_row_field(f2$2._3, f1$2); + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } else if (f1$2.TAG === /* Rpresent */0) { + const t1 = f1$2._0; + if (t1 !== undefined) { if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { - return; + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } if (f2$2.TAG === /* Rpresent */0) { + const t2 = f2$2._0; + if (t2 !== undefined) { + return unify(env, t1, t2); + } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (f2$2._2) { + if (f2$2._0) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (!fixed2) { - return set_row_field(f2$2._3, f1$2); + if (fixed2) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } else if (f1$2.TAG === /* Rpresent */0) { - const t1 = f1$2._0; - if (t1 !== undefined) { - if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (f2$2.TAG === /* Rpresent */0) { - const t2 = f2$2._0; - if (t2 !== undefined) { - return unify(env, t1, t2); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (f2$2._0) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); + const e2 = f2$2._3; + set_row_field(e2, f1$2); + update_level(env.contents, repr(more).level, t1); + try { + return Stdlib__List.iter((function (param) { + return unify(env, t1, param); + }), f2$2._1); + } + catch (exn){ + e2.contents = undefined; + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + } else { + if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (f2$2.TAG === /* Rpresent */0) { + if (f2$2._0 === undefined) { + return; } - if (fixed2) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (f2$2._0) { + if (f2$2._1) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - const e2 = f2$2._3; - set_row_field(e2, f1$2); - update_level(env.contents, repr(more).level, t1); - try { - return Stdlib__List.iter((function (param) { - return unify(env, t1, param); - }), f2$2._1); - } - catch (exn){ - e2.contents = undefined; - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + if (!fixed2) { + return set_row_field(f2$2._3, f1$2); } - } else { - if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + } else { + const c1 = f1$2._0; + const m1 = f1$2._2; + const tl1 = f1$2._1; + const e1 = f1$2._3; + if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { + if (m1) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (!fixed1) { + return set_row_field(f1$2._3, f2$2); + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (f2$2.TAG === /* Rpresent */0) { + if (c1) { + if (f1$2._1) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (f2$2.TAG === /* Rpresent */0) { - if (f2$2._0 === undefined) { - return; - } + if (f2$2._0 !== undefined) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (f2$2._0) { - if (f2$2._1) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (!fixed2) { - return set_row_field(f2$2._3, f1$2); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); + if (!fixed1) { + return set_row_field(f1$2._3, f2$2); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - } else { - const c1 = f1$2._0; - const m1 = f1$2._2; - const tl1 = f1$2._1; - const e1 = f1$2._3; - if (/* tag */typeof f2$2 === "number" || typeof f2$2 === "string") { - if (m1) { + const t2$1 = f2$2._0; + if (t2$1 !== undefined) { + if (fixed1) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (!fixed1) { - return set_row_field(f1$2._3, f2$2); + const e1$1 = f1$2._3; + set_row_field(e1$1, f2$2); + update_level(env.contents, repr(more).level, t2$1); + try { + return Stdlib__List.iter((function (t1) { + unify(env, t1, t2$1); + }), f1$2._1); } + catch (exn$1){ + e1$1.contents = undefined; + throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); + } + } else { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (f2$2.TAG === /* Rpresent */0) { - if (c1) { - if (f1$2._1) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (f2$2._0 !== undefined) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (!fixed1) { - return set_row_field(f1$2._3, f2$2); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - const t2$1 = f2$2._0; - if (t2$1 !== undefined) { - if (fixed1) { + } else { + const e2$1 = f2$2._3; + if (e1 === e2$1) { + return; + } + const m2 = f2$2._2; + const tl2 = f2$2._1; + const 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)) { + const match = Stdlib.$at(tl1, tl2); + let tmp; + if (match) { + const t1$1 = match.hd; + if (c1 || c2) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - const e1$1 = f1$2._3; - set_row_field(e1$1, f2$2); - update_level(env.contents, repr(more).level, t2$1); - try { - return Stdlib__List.iter((function (t1) { - unify(env, t1, t2$1); - }), f1$2._1); - } - catch (exn$1){ - e1$1.contents = undefined; - throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); - } + Stdlib__List.iter((function (param) { + return unify(env, t1$1, param); + }), match.tl); + tmp = e1.contents !== undefined || e2$1.contents !== undefined; } else { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - } else { - const e2$1 = f2$2._3; - if (e1 === e2$1) { - return; + tmp = false; } - const m2 = f2$2._2; - const tl2 = f2$2._1; - const 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)) { - const match = Stdlib.$at(tl1, tl2); - let tmp; - if (match) { - const t1$1 = match.hd; - if (c1 || c2) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - Stdlib__List.iter((function (param) { - return unify(env, t1$1, param); - }), match.tl); - tmp = e1.contents !== undefined || e2$1.contents !== undefined; - } else { - tmp = false; + redo = tmp; + } + if (redo) { + _f2 = f2$2; + _f1 = f1$2; + continue; + } + const tl1$1 = Stdlib__List.map(repr, tl1); + const tl2$1 = Stdlib__List.map(repr, tl2); + const remq = function (tl, _param) { + while(true) { + const param = _param; + if (!param) { + return /* [] */0; } - redo = tmp; - } - if (redo) { - _f2 = f2$2; - _f1 = f1$2; + const tl$p = param.tl; + const ty = param.hd; + if (!Stdlib__List.memq(ty, tl)) { + return { + hd: ty, + tl: remq(tl, tl$p) + }; + } + _param = tl$p; continue; - } - const tl1$1 = Stdlib__List.map(repr, tl1); - const tl2$1 = Stdlib__List.map(repr, tl2); - const remq = function (tl, _param) { - while(true) { - const param = _param; - if (!param) { - return /* [] */0; - } - const tl$p = param.tl; - const ty = param.hd; - if (!Stdlib__List.memq(ty, tl)) { - return { - hd: ty, - tl: remq(tl, tl$p) - }; - } - _param = tl$p; - continue; - }; - }; - const tl2$p = remq(tl2$1, tl1$1); - const tl1$p = remq(tl1$1, tl2$1); - const partial_arg = repr(more).level; - const partial_arg$1 = env.contents; - Stdlib__List.iter((function (param) { - return update_level(partial_arg$1, partial_arg, param); - }), Stdlib.$at(tl1$p, tl2$p)); - const e = { - contents: undefined }; - const f1$p_0 = c1 || c2; - const f1$p_2 = m1 || m2; - const f1$p = { - TAG: /* Reither */1, - _0: f1$p_0, - _1: tl1$p, - _2: f1$p_2, - _3: e - }; - const f2$p_0 = c1 || c2; - const f2$p_2 = m1 || m2; - const f2$p = { - TAG: /* Reither */1, - _0: f2$p_0, - _1: tl2$p, - _2: f2$p_2, - _3: e - }; - set_row_field(e1, f1$p); - return set_row_field(e2$1, f2$p); - } + }; + const tl2$p = remq(tl2$1, tl1$1); + const tl1$p = remq(tl1$1, tl2$1); + const partial_arg = repr(more).level; + const partial_arg$1 = env.contents; + Stdlib__List.iter((function (param) { + return update_level(partial_arg$1, partial_arg, param); + }), Stdlib.$at(tl1$p, tl2$p)); + const e = { + contents: undefined + }; + const f1$p_0 = c1 || c2; + const f1$p_2 = m1 || m2; + const f1$p = { + TAG: /* Reither */1, + _0: f1$p_0, + _1: tl1$p, + _2: f1$p_2, + _3: e + }; + const f2$p_0 = c1 || c2; + const f2$p_2 = m1 || m2; + const f2$p = { + TAG: /* Reither */1, + _0: f2$p_0, + _1: tl2$p, + _2: f2$p_2, + _3: e + }; + set_row_field(e1, f1$p); + return set_row_field(e2$1, f2$p); } - }; - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: { - hd: [ - mkvariant({ - hd: [ - l, - f1 - ], - tl: /* [] */0 - }, true), - mkvariant({ - hd: [ - l, - f2 - ], - tl: /* [] */0 - }, true) - ], - tl: trace._1 - } - }); } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + }; + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: { + hd: [ + mkvariant({ + hd: [ + l, + f1 + ], + tl: /* [] */0 + }, true), + mkvariant({ + hd: [ + l, + f2 + ], + tl: /* [] */0 + }, true) + ], + tl: trace._1 + } + }); } - }), pairs); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), pairs); } catch (exn){ log_type(rm1); @@ -33997,15 +33997,15 @@ function unify3(env, t1, t1$p, t2, t2$p) { unify_list(env, tl1, tl2); } else if (assume_injective.contents) { set_mode_pattern(true, false, (function (param) { - unify_list(env, tl1, tl2); - })); + unify_list(env, tl1, tl2); + })); } else { let tmp = true; if (!in_current_module(p1)) { const partial_arg = env.contents; tmp = Stdlib__List.exists((function (param) { - return expands_to_datatype(partial_arg, param); - }), { + return expands_to_datatype(partial_arg, param); + }), { hd: t1$p, tl: { hd: t1, @@ -34027,35 +34027,35 @@ function unify3(env, t1, t1$p, t2, t2$p) { const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Stdlib.Not_found) { inj = Stdlib__List.map((function (param) { - return false; - }), tl1); + return false; + }), tl1); } else { throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } Stdlib__List.iter2((function (i, param) { - const t2 = param[1]; - const t1 = param[0]; - if (i) { - return unify(env, t1, t2); - } else { - return set_mode_pattern(false, false, (function (param) { - const snap = snapshot(undefined); - try { - return unify(env, t1, t2); - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Unify) { - backtrack(snap); - reify(env, t1); - return reify(env, t2); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - })); - } - }), inj, Stdlib__List.combine(tl1, tl2)); + const t2 = param[1]; + const t1 = param[0]; + if (i) { + return unify(env, t1, t2); + } else { + return set_mode_pattern(false, false, (function (param) { + const snap = snapshot(undefined); + try { + return unify(env, t1, t2); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Unify) { + backtrack(snap); + reify(env, t1); + return reify(env, t2); + } + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + })); + } + }), inj, Stdlib__List.combine(tl1, tl2)); } } } else { @@ -34275,8 +34275,8 @@ function unify3(env, t1, t1$p, t2, t2$p) { break; case /* Tpoly */10 : enter_poly(env.contents, univar_pairs, t1$1, tl1$1, d2._0, d2._1, (function (param, param$1) { - return unify(env, param, param$1); - })); + return unify(env, param, param$1); + })); break; default: throw new Caml_js_exceptions.MelangeError(Unify, { @@ -34302,8 +34302,8 @@ function unify3(env, t1, t1$p, t2, t2$p) { const 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); + 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){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); @@ -34315,8 +34315,8 @@ function unify3(env, t1, t1$p, t2, t2$p) { }); } Stdlib__List.iter((function (param) { - return reify(env, param); - }), Stdlib.$at(tl1$2, tl2$1)); + return reify(env, param); + }), Stdlib.$at(tl1$2, tl2$1)); } else { throw new Caml_js_exceptions.MelangeError(exn$2.MEL_EXN_ID, exn$2); } @@ -35037,16 +35037,39 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } } return Stdlib__List.iter((function (param) { - const f1 = row_field_repr_aux(/* [] */0, param[1]); - const f2 = row_field_repr_aux(/* [] */0, param[2]); - if (f1 === f2) { + const f1 = row_field_repr_aux(/* [] */0, param[1]); + const f2 = row_field_repr_aux(/* [] */0, param[2]); + if (f1 === f2) { + return; + } + if (/* tag */typeof f1 === "number" || typeof f1 === "string") { + if (/* tag */typeof f2 === "number" || typeof f2 === "string") { return; } - if (/* tag */typeof f1 === "number" || typeof f1 === "string") { + if (f2.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } else if (f1.TAG === /* Rpresent */0) { + const t1 = f1._0; + if (t1 !== undefined) { if (/* tag */typeof f2 === "number" || typeof f2 === "string") { - return; + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } if (f2.TAG === /* Rpresent */0) { + const t2 = f2._0; + if (t2 !== undefined) { + return moregen(inst_nongen, type_pairs, env, t1, t2); + } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 @@ -35056,144 +35079,121 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { MEL_EXN_ID: Unify, _1: /* [] */0 }); - } else if (f1.TAG === /* Rpresent */0) { - const t1 = f1._0; - if (t1 !== undefined) { - if (/* tag */typeof f2 === "number" || typeof f2 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (f2.TAG === /* Rpresent */0) { - const t2 = f2._0; - if (t2 !== undefined) { - return moregen(inst_nongen, type_pairs, env, t1, t2); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } + } else { + if (/* tag */typeof f2 === "number" || typeof f2 === "string") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); - } else { - if (/* tag */typeof f2 === "number" || typeof f2 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (f2.TAG === /* Rpresent */0) { - if (f2._0 === undefined) { - return; - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); + } + if (f2.TAG === /* Rpresent */0) { + if (f2._0 === undefined) { + return; } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - } else { - const c1 = f1._0; - if (c1) { - if (!f1._1 && !/* tag */(typeof f2 === "number" || typeof f2 === "string") && f2.TAG === /* Rpresent */0) { - if (f2._0 !== undefined) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (may_inst) { - return set_row_field(f1._3, f2); - } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + } else { + const c1 = f1._0; + if (c1) { + if (!f1._1 && !/* tag */(typeof f2 === "number" || typeof f2 === "string") && f2.TAG === /* Rpresent */0) { + if (f2._0 !== undefined) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - - } else if (!/* tag */(typeof f2 === "number" || typeof f2 === "string") && f2.TAG === /* Rpresent */0) { - const t2$1 = f2._0; - if (t2$1 !== undefined) { - if (may_inst) { - set_row_field(f1._3, f2); - return Stdlib__List.iter((function (t1) { - moregen(inst_nongen, type_pairs, env, t1, t2$1); - }), f1._1); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); + if (may_inst) { + return set_row_field(f1._3, f2); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - const e1 = f1._3; - const tl1 = f1._1; - if (/* tag */typeof f2 === "number" || typeof f2 === "string") { + + } else if (!/* tag */(typeof f2 === "number" || typeof f2 === "string") && f2.TAG === /* Rpresent */0) { + const t2$1 = f2._0; + if (t2$1 !== undefined) { if (may_inst) { - return set_row_field(e1, f2); + set_row_field(f1._3, f2); + return Stdlib__List.iter((function (t1) { + moregen(inst_nongen, type_pairs, env, t1, t2$1); + }), f1._1); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - if (f2.TAG === /* Rpresent */0) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - const e2 = f2._3; - if (e1 === e2) { - return; - } - const tl2 = f2._1; - const c2 = f2._0; - if (c1 && !c2) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - set_row_field(e1, { - TAG: /* Reither */1, - _0: c2, - _1: /* [] */0, - _2: f2._2, - _3: e2 + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 }); - if (Stdlib__List.length(tl1) === Stdlib__List.length(tl2)) { - return Stdlib__List.iter2((function (param, param$1) { - return moregen(inst_nongen, type_pairs, env, param, param$1); - }), tl1, tl2); - } - if (tl2) { - const t2$2 = tl2.hd; - return Stdlib__List.iter((function (t1) { - moregen(inst_nongen, type_pairs, env, t1, t2$2); - }), tl1); - } - if (!Caml_obj.caml_notequal(tl1, /* [] */0)) { - return; + } + const e1 = f1._3; + const tl1 = f1._1; + if (/* tag */typeof f2 === "number" || typeof f2 === "string") { + if (may_inst) { + return set_row_field(e1, f2); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - }), match$4[2]); + if (f2.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + const e2 = f2._3; + if (e1 === e2) { + return; + } + const tl2 = f2._1; + const c2 = f2._0; + if (c1 && !c2) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + set_row_field(e1, { + TAG: /* Reither */1, + _0: c2, + _1: /* [] */0, + _2: f2._2, + _3: e2 + }); + if (Stdlib__List.length(tl1) === Stdlib__List.length(tl2)) { + return Stdlib__List.iter2((function (param, param$1) { + return moregen(inst_nongen, type_pairs, env, param, param$1); + }), tl1, tl2); + } + if (tl2) { + const t2$2 = tl2.hd; + return Stdlib__List.iter((function (t1) { + moregen(inst_nongen, type_pairs, env, t1, t2$2); + }), tl1); + } + if (!Caml_obj.caml_notequal(tl1, /* [] */0)) { + return; + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + }), match$4[2]); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35247,8 +35247,8 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } if (match$3.TAG === /* Tpoly */10) { return enter_poly(env, univar_pairs, t1$2, tl1, match$3._0, match$3._1, (function (param, param$1) { - return moregen(inst_nongen, type_pairs, env, param, param$1); - })); + return moregen(inst_nongen, type_pairs, env, param, param$1); + })); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35266,8 +35266,8 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { if (match$3.TAG === /* Tpackage */11) { try { return unify_package(env, (function (param, param$1) { - return moregen_list(inst_nongen, type_pairs, env, param, param$1); - }), 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); + return moregen_list(inst_nongen, type_pairs, env, param, param$1); + }), 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){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); @@ -35320,8 +35320,8 @@ function moregen_list(inst_nongen, type_pairs, env, tl1, tl2) { }); } Stdlib__List.iter2((function (param, param$1) { - return moregen(inst_nongen, type_pairs, env, param, param$1); - }), tl1, tl2); + return moregen(inst_nongen, type_pairs, env, param, param$1); + }), tl1, tl2); } function moregen_fields(inst_nongen, type_pairs, env, ty1, ty2) { @@ -35337,44 +35337,44 @@ 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) { - const t2 = param[4]; - const k2 = param[3]; - const t1 = param[2]; - const k1 = param[1]; - const n = param[0]; - moregen_kind(k1, k2); - try { - return moregen(inst_nongen, type_pairs, env, t1, t2); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: { - hd: [ - newty2(current_level.contents, { - TAG: /* Tfield */5, - _0: n, - _1: k1, - _2: t1, - _3: rest2 - }), - newty2(current_level.contents, { - TAG: /* Tfield */5, - _0: n, - _1: k2, - _2: t2, - _3: rest2 - }) - ], - tl: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + const t2 = param[4]; + const k2 = param[3]; + const t1 = param[2]; + const k1 = param[1]; + const n = param[0]; + moregen_kind(k1, k2); + try { + return moregen(inst_nongen, type_pairs, env, t1, t2); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: { + hd: [ + newty2(current_level.contents, { + TAG: /* Tfield */5, + _0: n, + _1: k1, + _2: t1, + _3: rest2 + }), + newty2(current_level.contents, { + TAG: /* Tfield */5, + _0: n, + _1: k2, + _2: t2, + _3: rest2 + }) + ], + tl: trace._1 + } + }); } - }), match$2[0]); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), match$2[0]); } function moregen_kind(k1, k2) { @@ -35460,8 +35460,8 @@ function rigidify_rec(vars, _ty) { const row = ty$1.desc; if (/* tag */typeof row === "number" || typeof row === "string") { return iter_type_expr((function (param) { - return rigidify_rec(vars, param); - }), ty$1); + return rigidify_rec(vars, param); + }), ty$1); } switch (row.TAG) { case /* Tvar */0 : @@ -35496,8 +35496,8 @@ function rigidify_rec(vars, _ty) { })); } iter_row((function (param) { - return rigidify_rec(vars, param); - }), row$1); + return rigidify_rec(vars, param); + }), row$1); if (static_row(row$1)) { return; } @@ -35505,8 +35505,8 @@ function rigidify_rec(vars, _ty) { continue; default: return iter_type_expr((function (param) { - return rigidify_rec(vars, param); - }), ty$1); + return rigidify_rec(vars, param); + }), ty$1); } }; } @@ -35525,17 +35525,17 @@ function all_distinct_vars(env, vars) { contents: /* [] */0 }; return Stdlib__List.for_all((function (ty) { - const ty$1 = expand_head(env, ty); - if (Stdlib__List.memq(ty$1, tyl.contents)) { - return false; - } else { - tyl.contents = { - hd: ty$1, - tl: tyl.contents - }; - return is_Tvar(ty$1); - } - }), vars); + const ty$1 = expand_head(env, ty); + if (Stdlib__List.memq(ty$1, tyl.contents)) { + return false; + } else { + tyl.contents = { + hd: ty$1, + tl: tyl.contents + }; + return is_Tvar(ty$1); + } + }), vars); } function matches(env, ty, ty$p) { @@ -35569,19 +35569,19 @@ function expand_head_rigid(env, ty) { function normalize_subst(subst) { if (Stdlib__List.exists((function (param) { - const match = param[0].desc; - if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tlink */6) { - return true; - } - const match$1 = param[1].desc; - return /* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Tlink */6 ? false : true; - }), subst.contents)) { + const match = param[0].desc; + if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tlink */6) { + return true; + } + const match$1 = param[1].desc; + return /* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Tlink */6 ? false : true; + }), subst.contents)) { subst.contents = Stdlib__List.map((function (param) { - return [ - repr(param[0]), - repr(param[1]) - ]; - }), subst.contents); + return [ + repr(param[0]), + repr(param[1]) + ]; + }), subst.contents); return; } @@ -35622,8 +35622,8 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { const 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; - }), subst.contents)) { + return param[1] === t2$1; + }), subst.contents)) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 @@ -35712,8 +35712,8 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { const 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; - }), subst.contents)) { + return param[1] === t2$p$1; + }), subst.contents)) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 @@ -35866,13 +35866,36 @@ 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) { - const match = row_field_repr_aux(/* [] */0, param[1]); - const match$1 = row_field_repr_aux(/* [] */0, param[2]); - if (/* tag */typeof match === "number" || typeof match === "string") { + const match = row_field_repr_aux(/* [] */0, param[1]); + const match$1 = row_field_repr_aux(/* [] */0, param[2]); + if (/* tag */typeof match === "number" || typeof match === "string") { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + return; + } + if (match$1.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } else if (match.TAG === /* Rpresent */0) { + const t1 = match._0; + if (t1 !== undefined) { if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - return; + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } if (match$1.TAG === /* Rpresent */0) { + const t2 = match$1._0; + if (t2 !== undefined) { + return eqtype(rename, type_pairs, subst, env, t1, t2); + } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 @@ -35882,57 +35905,64 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { MEL_EXN_ID: Unify, _1: /* [] */0 }); - } else if (match.TAG === /* Rpresent */0) { - const t1 = match._0; - if (t1 !== undefined) { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1.TAG === /* Rpresent */0) { - const t2 = match$1._0; - if (t2 !== undefined) { - return eqtype(rename, type_pairs, subst, env, t1, t2); - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } + } else { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); - } else { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1.TAG === /* Rpresent */0) { - if (match$1._0 === undefined) { - return; - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); + } + if (match$1.TAG === /* Rpresent */0) { + if (match$1._0 === undefined) { + return; } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } - } else if (match._0) { - if (match._1) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + } else if (match._0) { + if (match._1) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (match$1.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + if (match$1._0) { + if (match$1._1) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } + return; + } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } else { + const match$2 = match._1; + if (match$2) { + const tl1 = match$2.tl; + const t1$1 = match$2.hd; if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -35946,71 +35976,41 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { }); } if (match$1._0) { - if (match$1._1) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); + } + const match$3 = match$1._1; + if (match$3) { + const tl2 = match$3.tl; + const 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) { + return eqtype(rename, type_pairs, subst, env, param, param$1); + }), tl1, tl2); + } else { + Stdlib__List.iter((function (param) { + return eqtype(rename, type_pairs, subst, env, t1$1, param); + }), tl2); + return Stdlib__List.iter((function (t1) { + eqtype(rename, type_pairs, subst, env, t1, t2$1); + }), tl1); } - return; } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */0 }); } else { - const match$2 = match._1; - if (match$2) { - const tl1 = match$2.tl; - const t1$1 = match$2.hd; - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1.TAG === /* Rpresent */0) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - if (match$1._0) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } - const match$3 = match$1._1; - if (match$3) { - const tl2 = match$3.tl; - const 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) { - return eqtype(rename, type_pairs, subst, env, param, param$1); - }), tl1, tl2); - } else { - Stdlib__List.iter((function (param) { - return eqtype(rename, type_pairs, subst, env, t1$1, param); - }), tl2); - return Stdlib__List.iter((function (t1) { - eqtype(rename, type_pairs, subst, env, t1, t2$1); - }), tl1); - } - } - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } else { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: /* [] */0 - }); - } + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: /* [] */0 + }); } - }), match$5[2]); + } + }), match$5[2]); }; } throw new Caml_js_exceptions.MelangeError(Unify, { @@ -36065,8 +36065,8 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } if (match$3.TAG === /* Tpoly */10) { return enter_poly(env, univar_pairs, t1$2, tl1, match$3._0, match$3._1, (function (param, param$1) { - return eqtype(rename, type_pairs, subst, env, param, param$1); - })); + return eqtype(rename, type_pairs, subst, env, param, param$1); + })); } throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -36084,8 +36084,8 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { if (match$3.TAG === /* Tpackage */11) { try { return unify_package(env, (function (param, param$1) { - return eqtype_list(rename, type_pairs, subst, env, param, param$1); - }), 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); + return eqtype_list(rename, type_pairs, subst, env, param, param$1); + }), 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){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); @@ -36138,8 +36138,8 @@ function eqtype_list(rename, type_pairs, subst, env, tl1, tl2) { }); } Stdlib__List.iter2((function (param, param$1) { - return eqtype(rename, type_pairs, subst, env, param, param$1); - }), tl1, tl2); + return eqtype(rename, type_pairs, subst, env, param, param$1); + }), tl1, tl2); } function eqtype_fields(rename, type_pairs, subst, env, ty1, _ty2) { @@ -36174,44 +36174,44 @@ function eqtype_fields(rename, type_pairs, subst, env, ty1, _ty2) { }); } return Stdlib__List.iter((function (param) { - const t2 = param[4]; - const k2 = param[3]; - const t1 = param[2]; - const k1 = param[1]; - const n = param[0]; - eqtype_kind(k1, k2); - try { - return eqtype(rename, type_pairs, subst, env, t1, t2); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Unify, { - MEL_EXN_ID: Unify, - _1: { - hd: [ - newty2(current_level.contents, { - TAG: /* Tfield */5, - _0: n, - _1: k1, - _2: t1, - _3: rest2 - }), - newty2(current_level.contents, { - TAG: /* Tfield */5, - _0: n, - _1: k2, - _2: t2, - _3: rest2 - }) - ], - tl: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + const t2 = param[4]; + const k2 = param[3]; + const t1 = param[2]; + const k1 = param[1]; + const n = param[0]; + eqtype_kind(k1, k2); + try { + return eqtype(rename, type_pairs, subst, env, t1, t2); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Unify, { + MEL_EXN_ID: Unify, + _1: { + hd: [ + newty2(current_level.contents, { + TAG: /* Tfield */5, + _0: n, + _1: k1, + _2: t1, + _3: rest2 + }), + newty2(current_level.contents, { + TAG: /* Tfield */5, + _0: n, + _1: k2, + _2: t2, + _3: rest2 + }) + ], + tl: trace._1 + } + }); } - }), match$4[0]); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), match$4[0]); }; } @@ -36301,52 +36301,52 @@ function moregen_clty(trace, type_pairs, env, cty1, cty2) { const match$1 = flatten_fields(ty2); const 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_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Failure, { - MEL_EXN_ID: Failure, - _1: { - hd: { - TAG: /* CM_Meth_type_mismatch */5, - _0: param[0], - _1: env, - _2: expand_trace(env, trace._1) - }, - tl: /* [] */0 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return moregen$1(true, type_pairs, env, param[2], param[4]); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Failure, { + MEL_EXN_ID: Failure, + _1: { + hd: { + TAG: /* CM_Meth_type_mismatch */5, + _0: param[0], + _1: env, + _2: expand_trace(env, trace._1) + }, + tl: /* [] */0 + } + }); } - }), match$2[0]); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), match$2[0]); return Curry._2(Meths.iter, (function (lab, param) { - const match = Curry._2(Meths.find, lab, sign1.csig_vars); - try { - return moregen$1(true, type_pairs, env, match[2], param[2]); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Failure, { - MEL_EXN_ID: Failure, - _1: { - hd: { - TAG: /* CM_Val_type_mismatch */4, - _0: lab, - _1: env, - _2: expand_trace(env, trace._1) - }, - tl: /* [] */0 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + const match = Curry._2(Meths.find, lab, sign1.csig_vars); + try { + return moregen$1(true, type_pairs, env, match[2], param[2]); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Failure, { + MEL_EXN_ID: Failure, + _1: { + hd: { + TAG: /* CM_Val_type_mismatch */4, + _0: lab, + _1: env, + _2: expand_trace(env, trace._1) + }, + tl: /* [] */0 + } + }); } - }), sign2.csig_vars); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), sign2.csig_vars); case /* Cty_arrow */2 : throw new Caml_js_exceptions.MelangeError(Failure, { MEL_EXN_ID: Failure, @@ -36449,127 +36449,127 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { const match$3 = flatten_fields(object_fields(t2)); const match$4 = associate_fields(match$2[0], match$3[0]); const error = Stdlib__List.fold_right((function (param, err) { - const lab = param[0]; - const k = field_kind_repr(param[1]); - let err$1; - if (/* tag */typeof k === "number" || typeof k === "string") { - err$1 = { + const lab = param[0]; + const k = field_kind_repr(param[1]); + let err$1; + if (/* tag */typeof k === "number" || typeof k === "string") { + err$1 = { + hd: { + TAG: /* CM_Hide_public */10, + _0: lab + }, + tl: err + }; + } else { + set_kind(k._0, /* Fabsent */1); + err$1 = err; + } + if (Curry._2(mem$2, lab, sign1.csig_concr)) { + return err$1; + } else { + return { + hd: { + TAG: /* CM_Hide_virtual */11, + _0: "method", + _1: lab + }, + tl: err$1 + }; + } + }), match$4[1], /* [] */0); + const missing_method = Stdlib__List.map((function (param) { + return param[0]; + }), match$4[2]); + const 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]); + const error$2 = Stdlib__List.fold_right((function (param, err) { + try { + moregen_kind(param[1], param[3]); + return err; + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Unify) { + return { hd: { - TAG: /* CM_Hide_public */10, - _0: lab + TAG: /* CM_Public_method */12, + _0: param[0] }, tl: err }; - } else { - set_kind(k._0, /* Fabsent */1); - err$1 = err; } - if (Curry._2(mem$2, lab, sign1.csig_concr)) { - return err$1; - } else { + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), match$4[0], error$1); + const error$3 = Curry._3(Meths.fold, (function (lab, param, err) { + try { + const match = Curry._2(Meths.find, lab, sign1.csig_vars); + if (param[0] === /* Mutable */1 && match[0] !== /* Mutable */1) { return { hd: { - TAG: /* CM_Hide_virtual */11, - _0: "method", - _1: lab + TAG: /* CM_Non_mutable_value */6, + _0: lab }, - tl: err$1 + tl: err }; - } - }), match$4[1], /* [] */0); - const missing_method = Stdlib__List.map((function (param) { - return param[0]; - }), match$4[2]); - const 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]); - const error$2 = Stdlib__List.fold_right((function (param, err) { - try { - moregen_kind(param[1], param[3]); - return err; - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Unify) { - return { - hd: { - TAG: /* CM_Public_method */12, - _0: param[0] - }, - tl: err - }; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }), match$4[0], error$1); - const error$3 = Curry._3(Meths.fold, (function (lab, param, err) { - try { - const match = Curry._2(Meths.find, lab, sign1.csig_vars); - if (param[0] === /* Mutable */1 && match[0] !== /* Mutable */1) { - return { - hd: { - TAG: /* CM_Non_mutable_value */6, - _0: lab - }, - tl: err - }; - } else if (param[1] === /* Concrete */1 && match[1] !== /* Concrete */1) { - return { - hd: { - TAG: /* CM_Non_concrete_value */7, - _0: lab - }, - tl: err - }; - } else { - return err; - } - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return { - hd: { - TAG: /* CM_Missing_value */8, - _0: lab - }, - tl: err - }; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }), sign2.csig_vars, error$2); - const error$4 = Curry._3(Meths.fold, (function (lab, param, err) { - if (param[1] === /* Virtual */0 && !Curry._2(Meths.mem, lab, sign2.csig_vars)) { + } else if (param[1] === /* Concrete */1 && match[1] !== /* Concrete */1) { return { hd: { - TAG: /* CM_Hide_virtual */11, - _0: "instance variable", - _1: lab + TAG: /* CM_Non_concrete_value */7, + _0: lab }, tl: err }; } else { return err; } - }), sign1.csig_vars, error$3); - const error$5 = Stdlib__List.fold_right((function (e, l) { - if (Stdlib__List.mem(e, missing_method)) { - return l; - } else { + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: { - TAG: /* CM_Virtual_method */14, - _0: e + TAG: /* CM_Missing_value */8, + _0: lab }, - tl: l + tl: err }; } - }), Curry._1(elements, Curry._2(diff, sign2.csig_concr, sign1.csig_concr)), error$4); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), sign2.csig_vars, error$2); + const 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: { + TAG: /* CM_Hide_virtual */11, + _0: "instance variable", + _1: lab + }, + tl: err + }; + } else { + return err; + } + }), sign1.csig_vars, error$3); + const error$5 = Stdlib__List.fold_right((function (e, l) { + if (Stdlib__List.mem(e, missing_method)) { + return l; + } else { + return { + hd: { + TAG: /* CM_Virtual_method */14, + _0: e + }, + tl: l + }; + } + }), Curry._1(elements, Curry._2(diff, sign2.csig_concr, sign1.csig_concr)), error$4); let res; if (error$5) { res = { @@ -36632,52 +36632,52 @@ function equal_clty(trace, type_pairs, subst, env, cty1, cty2) { const match$1 = flatten_fields(ty2); const 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_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Failure, { - MEL_EXN_ID: Failure, - _1: { - hd: { - TAG: /* CM_Meth_type_mismatch */5, - _0: param[0], - _1: env, - _2: expand_trace(env, trace._1) - }, - tl: /* [] */0 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return eqtype$1(true, type_pairs, subst, env, param[2], param[4]); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Failure, { + MEL_EXN_ID: Failure, + _1: { + hd: { + TAG: /* CM_Meth_type_mismatch */5, + _0: param[0], + _1: env, + _2: expand_trace(env, trace._1) + }, + tl: /* [] */0 + } + }); } - }), match$2[0]); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), match$2[0]); return Curry._2(Meths.iter, (function (lab, param) { - const match = Curry._2(Meths.find, lab, sign1.csig_vars); - try { - return eqtype$1(true, type_pairs, subst, env, match[2], param[2]); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Failure, { - MEL_EXN_ID: Failure, - _1: { - hd: { - TAG: /* CM_Val_type_mismatch */4, - _0: lab, - _1: env, - _2: expand_trace(env, trace._1) - }, - tl: /* [] */0 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + const match = Curry._2(Meths.find, lab, sign1.csig_vars); + try { + return eqtype$1(true, type_pairs, subst, env, match[2], param[2]); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Failure, { + MEL_EXN_ID: Failure, + _1: { + hd: { + TAG: /* CM_Val_type_mismatch */4, + _0: lab, + _1: env, + _2: expand_trace(env, trace._1) + }, + tl: /* [] */0 + } + }); } - }), sign2.csig_vars); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), sign2.csig_vars); case /* Cty_arrow */2 : exit = 2; break; @@ -36782,148 +36782,148 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj const match$1 = flatten_fields(object_fields(t2)); const match$2 = associate_fields(match[0], match$1[0]); const error = Stdlib__List.fold_right((function (param, err) { - const lab = param[0]; - const k = field_kind_repr(param[1]); - let err$1; - err$1 = /* tag */typeof k === "number" || typeof k === "string" ? ({ - hd: { - TAG: /* CM_Hide_public */10, - _0: lab - }, - tl: err - }) : err; - if (Curry._2(mem$2, lab, sign1.csig_concr)) { - return err$1; - } else { - return { - hd: { - TAG: /* CM_Hide_virtual */11, - _0: "method", - _1: lab - }, - tl: err$1 - }; - } - }), match$2[1], /* [] */0); + const lab = param[0]; + const k = field_kind_repr(param[1]); + let err$1; + err$1 = /* tag */typeof k === "number" || typeof k === "string" ? ({ + hd: { + TAG: /* CM_Hide_public */10, + _0: lab + }, + tl: err + }) : err; + if (Curry._2(mem$2, lab, sign1.csig_concr)) { + return err$1; + } else { + return { + hd: { + TAG: /* CM_Hide_virtual */11, + _0: "method", + _1: lab + }, + tl: err$1 + }; + } + }), match$2[1], /* [] */0); const missing_method = Stdlib__List.map((function (param) { - return param[0]; - }), match$2[2]); + return param[0]; + }), match$2[2]); const error$1 = Stdlib.$at(Stdlib__List.map((function (m) { - return { - TAG: /* CM_Missing_method */9, - _0: m - }; - }), missing_method), error); + return { + TAG: /* CM_Missing_method */9, + _0: m + }; + }), missing_method), error); eqtype$1(true, type_pairs, subst, env, match[1], match$1[1]); const error$2 = Stdlib__List.fold_right((function (param, err) { - const lab = param[0]; - const k1 = field_kind_repr(param[1]); - const k2 = field_kind_repr(param[3]); - if (/* tag */typeof k1 === "number" || typeof k1 === "string") { - if (k1 === /* Fpresent */0) { - if (!/* tag */(typeof k2 === "number" || typeof k2 === "string")) { - return { - hd: { - TAG: /* CM_Public_method */12, - _0: lab - }, - tl: err - }; - } - if (k2 === /* Fpresent */0) { - return err; - } - - } - - } else { + const lab = param[0]; + const k1 = field_kind_repr(param[1]); + const k2 = field_kind_repr(param[3]); + if (/* tag */typeof k1 === "number" || typeof k1 === "string") { + if (k1 === /* Fpresent */0) { if (!/* tag */(typeof k2 === "number" || typeof k2 === "string")) { - return err; - } - if (k2 === /* Fpresent */0) { return { hd: { - TAG: /* CM_Private_method */13, + TAG: /* CM_Public_method */12, _0: lab }, tl: err }; } - - } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 33612, - 34 - ] - }); - }), match$2[0], error$1); - const error$3 = Curry._3(Meths.fold, (function (lab, param, err) { - try { - const match = Curry._2(Meths.find, lab, sign1.csig_vars); - if (param[0] === /* Mutable */1 && match[0] !== /* Mutable */1) { - return { - hd: { - TAG: /* CM_Non_mutable_value */6, - _0: lab - }, - tl: err - }; - } else if (param[1] === /* Concrete */1 && match[1] !== /* Concrete */1) { - return { - hd: { - TAG: /* CM_Non_concrete_value */7, - _0: lab - }, - tl: err - }; - } else { + if (k2 === /* Fpresent */0) { return err; } + } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return { - hd: { - TAG: /* CM_Missing_value */8, - _0: lab - }, - tl: err - }; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + + } else { + if (!/* tag */(typeof k2 === "number" || typeof k2 === "string")) { + return err; } - }), sign2.csig_vars, error$2); - const error$4 = Curry._3(Meths.fold, (function (lab, param, err) { - if (param[1] === /* Virtual */0 && !Curry._2(Meths.mem, lab, sign2.csig_vars)) { + if (k2 === /* Fpresent */0) { + return { + hd: { + TAG: /* CM_Private_method */13, + _0: lab + }, + tl: err + }; + } + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 33612, + 34 + ] + }); + }), match$2[0], error$1); + const error$3 = Curry._3(Meths.fold, (function (lab, param, err) { + try { + const match = Curry._2(Meths.find, lab, sign1.csig_vars); + if (param[0] === /* Mutable */1 && match[0] !== /* Mutable */1) { return { hd: { - TAG: /* CM_Hide_virtual */11, - _0: "instance variable", - _1: lab + TAG: /* CM_Non_mutable_value */6, + _0: lab + }, + tl: err + }; + } else if (param[1] === /* Concrete */1 && match[1] !== /* Concrete */1) { + return { + hd: { + TAG: /* CM_Non_concrete_value */7, + _0: lab }, tl: err }; } else { return err; } - }), sign1.csig_vars, error$3); - const error$5 = Stdlib__List.fold_right((function (e, l) { - if (Stdlib__List.mem(e, missing_method)) { - return l; - } else { + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { return { hd: { - TAG: /* CM_Virtual_method */14, - _0: e + TAG: /* CM_Missing_value */8, + _0: lab }, - tl: l + tl: err }; } - }), Curry._1(elements, Curry._2(diff, sign2.csig_concr, sign1.csig_concr)), error$4); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), sign2.csig_vars, error$2); + const 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: { + TAG: /* CM_Hide_virtual */11, + _0: "instance variable", + _1: lab + }, + tl: err + }; + } else { + return err; + } + }), sign1.csig_vars, error$3); + const error$5 = Stdlib__List.fold_right((function (e, l) { + if (Stdlib__List.mem(e, missing_method)) { + return l; + } else { + return { + hd: { + TAG: /* CM_Virtual_method */14, + _0: e + }, + tl: l + }; + } + }), Curry._1(elements, Curry._2(diff, sign2.csig_concr, sign1.csig_concr)), error$4); if (error$5) { return error$5; } @@ -36944,27 +36944,27 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj }); } Stdlib__List.iter2((function (p, s) { - try { - return eqtype$1(true, type_pairs, subst, env, p, s); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Failure, { - MEL_EXN_ID: Failure, - _1: { - hd: { - TAG: /* CM_Type_parameter_mismatch */1, - _0: env, - _1: expand_trace(env, trace._1) - }, - tl: /* [] */0 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return eqtype$1(true, type_pairs, subst, env, p, s); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Failure, { + MEL_EXN_ID: Failure, + _1: { + hd: { + TAG: /* CM_Type_parameter_mismatch */1, + _0: env, + _1: expand_trace(env, trace._1) + }, + tl: /* [] */0 + } + }); } - }), patt_params, subj_params); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), patt_params, subj_params); equal_clty(false, type_pairs, subst, env, { TAG: /* Cty_signature */1, _0: sign1 @@ -36974,13 +36974,13 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj }); const clty_params = function (param, param$1) { return Stdlib__List.fold_right((function (ty, cty) { - return { - TAG: /* Cty_arrow */2, - _0: "*", - _1: ty, - _2: cty - }; - }), param, param$1); + return { + TAG: /* Cty_arrow */2, + _0: "*", + _1: ty, + _2: cty + }; + }), param, param$1); }; return match_class_types(false, env, clty_params(patt_params, patt_type), clty_params(subj_params, subj_type)); } @@ -37015,8 +37015,8 @@ function pred_enlarge(n) { function collect(l) { return Stdlib__List.fold_left((function (c1, param) { - return Caml.caml_int_max(c1, param[1]); - }), /* Unchanged */0, l); + return Caml.caml_int_max(c1, param[1]); + }), /* Unchanged */0, l); } function filter_visited(_l) { @@ -37203,8 +37203,8 @@ function build_subtype(env, visited, loops, posi, level, t) { tl: visited }; const tlist$p = Stdlib__List.map((function (param) { - return build_subtype(env, visited$2, loops, posi, level, param); - }), tlist._0); + return build_subtype(env, visited$2, loops, posi, level, param); + }), tlist._0); const c$1 = collect(tlist$p); if (c$1 <= /* Unchanged */0) { return [ @@ -37215,8 +37215,8 @@ function build_subtype(env, visited, loops, posi, level, t) { const desc = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (prim) { - return prim[0]; - }), tlist$p) + return prim[0]; + }), tlist$p) }; return [ newty2(current_level.contents, desc), @@ -37271,8 +37271,8 @@ function build_subtype(env, visited, loops, posi, level, t) { } const tl1 = match$5[1]; if (Stdlib__List.exists((function (param) { - return deep_occur(ty$1, param); - }), tl1)) { + return deep_occur(ty$1, param); + }), tl1)) { throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { MEL_EXN_ID: Stdlib.Not_found }); @@ -37382,32 +37382,32 @@ function build_subtype(env, visited, loops, posi, level, t) { warn.contents = true; } const tl$p = Stdlib__List.map2((function (v, t) { - const match = Curry._1(Types_Variance.get_upper, v); - const co = match[0]; - if (match[1]) { - if (co) { - return [ - t, - /* Unchanged */0 - ]; - } else { - return build_subtype(env, visited$3, loops, !posi, level, t); - } - } else if (co) { - return build_subtype(env, visited$3, loops, posi, level, t); - } else { + const match = Curry._1(Types_Variance.get_upper, v); + const co = match[0]; + if (match[1]) { + if (co) { return [ - newvar(undefined, undefined), - /* Changed */2 + t, + /* Unchanged */0 ]; + } else { + return build_subtype(env, visited$3, loops, !posi, level, t); } - }), decl.type_variance, tlist._1); + } else if (co) { + return build_subtype(env, visited$3, loops, posi, level, t); + } else { + return [ + newvar(undefined, undefined), + /* Changed */2 + ]; + } + }), decl.type_variance, tlist._1); const c$3 = collect(tl$p); if (c$3 > /* Unchanged */0) { return [ newconstr(p, Stdlib__List.map((function (prim) { - return prim[0]; - }), tl$p)), + return prim[0]; + }), tl$p)), c$3 ]; } else { @@ -37508,69 +37508,9 @@ function build_subtype(env, visited, loops, posi, level, t) { }; const fields = filter_row_fields(false, row.row_fields); const fields$1 = Stdlib__List.map((function (orig) { - const l = orig[0]; - const match = row_field_repr_aux(/* [] */0, orig[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 33844, - 17 - ] - }); - } - if (match.TAG === /* Rpresent */0) { - const t = match._0; - if (t === undefined) { - if (posi) { - return [ - [ - l, - { - TAG: /* Reither */1, - _0: true, - _1: /* [] */0, - _2: false, - _3: { - contents: undefined - } - } - ], - /* Unchanged */0 - ]; - } else { - return [ - orig, - /* Unchanged */0 - ]; - } - } - const match$1 = build_subtype(env, visited$5, loops, posi, level$p$2, t); - const t$p = match$1[0]; - const f = posi && level > 0 ? ({ - TAG: /* Reither */1, - _0: false, - _1: { - hd: t$p, - tl: /* [] */0 - }, - _2: false, - _3: { - contents: undefined - } - }) : ({ - TAG: /* Rpresent */0, - _0: t$p - }); - return [ - [ - l, - f - ], - match$1[1] - ]; - } + const l = orig[0]; + const match = row_field_repr_aux(/* [] */0, orig[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -37579,11 +37519,71 @@ function build_subtype(env, visited, loops, posi, level, t) { 17 ] }); - }), fields); + } + if (match.TAG === /* Rpresent */0) { + const t = match._0; + if (t === undefined) { + if (posi) { + return [ + [ + l, + { + TAG: /* Reither */1, + _0: true, + _1: /* [] */0, + _2: false, + _3: { + contents: undefined + } + } + ], + /* Unchanged */0 + ]; + } else { + return [ + orig, + /* Unchanged */0 + ]; + } + } + const match$1 = build_subtype(env, visited$5, loops, posi, level$p$2, t); + const t$p = match$1[0]; + const f = posi && level > 0 ? ({ + TAG: /* Reither */1, + _0: false, + _1: { + hd: t$p, + tl: /* [] */0 + }, + _2: false, + _3: { + contents: undefined + } + }) : ({ + TAG: /* Rpresent */0, + _0: t$p + }); + return [ + [ + l, + f + ], + match$1[1] + ]; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 33844, + 17 + ] + }); + }), fields); const c$6 = collect(fields$1); const row_row_fields = Stdlib__List.map((function (prim) { - return prim[0]; - }), fields$1); + return prim[0]; + }), fields$1); const row_row_more = newvar(undefined, undefined); const row_row_name = c$6 > /* Unchanged */0 ? undefined : row.row_name; const row$1 = { @@ -37747,14 +37747,14 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { subtype_error(env, trace); } return Stdlib__List.fold_left2((function (cstrs, t1, t2) { - return subtype_rec(env, { - hd: [ - t1, - t2 - ], - tl: trace - }, t1, t2, cstrs); - }), cstrs, tl1, tl2); + return subtype_rec(env, { + hd: [ + t1, + t2 + ], + tl: trace + }, t1, t2, cstrs); + }), cstrs, tl1, tl2); case /* Tconstr */3 : exit$2 = 4; break; @@ -37847,16 +37847,16 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { tl: cstrs$2 }); return Stdlib__List.fold_left((function (cstrs, param) { - const t2 = param[4]; - const t1 = param[2]; - return subtype_rec(env, { - hd: [ - t1, - t2 - ], - tl: trace - }, t1, t2, cstrs); - }), cstrs$3, match$4[0]); + const t2 = param[4]; + const t1 = param[2]; + return subtype_rec(env, { + hd: [ + t1, + t2 + ], + tl: trace + }, t1, t2, cstrs); + }), cstrs$3, match$4[0]); } default: exit = 1; @@ -37927,65 +37927,94 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { tl: trace }, more1, more2, cstrs); return Stdlib__List.fold_left((function (cstrs, param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - const match$1 = row_field_repr_aux(/* [] */0, param[2]); - let t1; - let t2; - if (/* tag */typeof match === "number" || typeof match === "string") { + const match = row_field_repr_aux(/* [] */0, param[1]); + const match$1 = row_field_repr_aux(/* [] */0, param[2]); + let t1; + let t2; + if (/* tag */typeof match === "number" || typeof match === "string") { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + return cstrs; + } + if (match$1.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } else if (match.TAG === /* Rpresent */0) { + const t1$1 = match._0; + if (t1$1 !== undefined) { if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - return cstrs; - } - if (match$1.TAG === /* Rpresent */0) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } else if (match.TAG === /* Rpresent */0) { - const t1$1 = match._0; - if (t1$1 !== undefined) { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (match$1.TAG === /* Rpresent */0) { - const t2$1 = match$1._0; - if (t2$1 !== undefined) { - t1 = t1$1; - t2 = t2$1; - } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } + if (match$1.TAG === /* Rpresent */0) { + const t2$1 = match$1._0; + if (t2$1 !== undefined) { + t1 = t1$1; + t2 = t2$1; } else { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } } else { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + } else { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + if (match$1.TAG === /* Rpresent */0) { + if (match$1._0 !== undefined) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - if (match$1.TAG === /* Rpresent */0) { - if (match$1._0 !== undefined) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - return cstrs; - } + return cstrs; + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + } else if (match._0) { + if (match._1) { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + if (match$1.TAG === /* Rpresent */0) { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + if (match$1._0) { + if (match$1._1) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - } else if (match._0) { - if (match._1) { + return cstrs; + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } else { + const match$2 = match._1; + if (match$2) { + if (match$2.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); @@ -38001,67 +38030,38 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }); } if (match$1._0) { - if (match$1._1) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - return cstrs; + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } else { - const match$2 = match._1; - if (match$2) { - if (match$2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (match$1.TAG === /* Rpresent */0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (match$1._0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - const match$3 = match$1._1; - if (match$3) { - if (match$3.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - t1 = match$2.hd; - t2 = match$3.hd; - } else { + const match$3 = match$1._1; + if (match$3) { + if (match$3.tl) { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } + t1 = match$2.hd; + t2 = match$3.hd; } else { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } + } else { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); } - return subtype_rec(env, { - hd: [ - t1, - t2 - ], - tl: trace - }, t1, t2, cstrs); - }), cstrs$4, pairs); + } + return subtype_rec(env, { + hd: [ + t1, + t2 + ], + tl: trace + }, t1, t2, cstrs); + }), cstrs$4, pairs); } throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit @@ -38095,89 +38095,89 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { if (exit$6 === 2) { if (row1$1.row_closed && Caml_obj.caml_equal(r1, /* [] */0)) { return Stdlib__List.fold_left((function (cstrs, param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - const match$1 = row_field_repr_aux(/* [] */0, param[2]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return cstrs; - } - if (match.TAG === /* Rpresent */0) { - const t1 = match._0; - if (t1 !== undefined) { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (match$1.TAG === /* Rpresent */0) { - const t2 = match$1._0; - if (t2 !== undefined) { - return subtype_rec(env, { - hd: [ - t1, - t2 - ], - tl: trace - }, t1, t2, cstrs); - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } + const match = row_field_repr_aux(/* [] */0, param[1]); + const match$1 = row_field_repr_aux(/* [] */0, param[2]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return cstrs; + } + if (match.TAG === /* Rpresent */0) { + const t1 = match._0; + if (t1 !== undefined) { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - - } else if (!match._0) { - const match$2 = match._1; - if (match$2) { - const t1$1 = match$2.hd; - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (match$1.TAG === /* Rpresent */0) { - const t2$1 = match$1._0; - if (t2$1 !== undefined) { - return subtype_rec(env, { - hd: [ - t1$1, - t2$1 - ], - tl: trace - }, t1$1, t2$1, cstrs); - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); + if (match$1.TAG === /* Rpresent */0) { + const t2 = match$1._0; + if (t2 !== undefined) { + return subtype_rec(env, { + hd: [ + t1, + t2 + ], + tl: trace + }, t1, t2, cstrs); } throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); - } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); } - } - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - if (match$1.TAG === /* Rpresent */0) { - if (match$1._0 !== undefined) { + + } else if (!match._0) { + const match$2 = match._1; + if (match$2) { + const t1$1 = match$2.hd; + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + if (match$1.TAG === /* Rpresent */0) { + const t2$1 = match$1._0; + if (t2$1 !== undefined) { + return subtype_rec(env, { + hd: [ + t1$1, + t2$1 + ], + tl: trace + }, t1$1, t2$1, cstrs); + } throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - return cstrs; + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } else { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); } + } + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); - }), cstrs, pairs); + } + if (match$1.TAG === /* Rpresent */0) { + if (match$1._0 !== undefined) { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + return cstrs; + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + }), cstrs, pairs); } throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit @@ -38252,8 +38252,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { if (match$1._1) { try { return enter_poly(env, univar_pairs, u1$1, tl1$1, u2$1, match$1._1, (function (t1, t2) { - return subtype_rec(env, trace, t1, t2, cstrs); - })); + return subtype_rec(env, trace, t1, t2, cstrs); + })); } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); @@ -38310,21 +38310,21 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { _0: p2 }, nl2, tl2$1); const cstrs$p = Stdlib__List.map((function (param) { - return [ - trace, - Stdlib__List.assoc(param[0], ntl1), - param[1], - univar_pairs.contents - ]; - }), ntl2); + return [ + trace, + Stdlib__List.assoc(param[0], ntl1), + param[1], + univar_pairs.contents + ]; + }), ntl2); if (eq_package_path(env, p1, p2)) { return Stdlib.$at(cstrs$p, cstrs); } const snap = snapshot(undefined); try { Stdlib__List.iter((function (param) { - unify$2(env, param[1], param[2]); - }), cstrs$p); + unify$2(env, param[1], param[2]); + }), cstrs$p); if (Curry._7(package_subtype.contents, env, p1, nl1, tl1$2, p2, nl2, tl2$1)) { backtrack(snap); return Stdlib.$at(cstrs$p, cstrs); @@ -38412,54 +38412,54 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { try { const decl = find_type_full(p1$1, env)[0]; return Stdlib__List.fold_left2((function (cstrs, v, param) { - const t2 = param[1]; - const t1 = param[0]; - const match = Curry._1(Types_Variance.get_upper, v); - const cn = match[1]; - if (match[0]) { - if (cn) { - return { - hd: [ - trace, - newty2(t1.level, { - TAG: /* Ttuple */2, - _0: { - hd: t1, - tl: /* [] */0 - } - }), - newty2(t2.level, { - TAG: /* Ttuple */2, - _0: { - hd: t2, - tl: /* [] */0 - } - }), - univar_pairs.contents - ], - tl: cstrs - }; - } else { - return subtype_rec(env, { - hd: [ - t1, - t2 - ], - tl: trace - }, t1, t2, cstrs); - } - } else if (cn) { + const t2 = param[1]; + const t1 = param[0]; + const match = Curry._1(Types_Variance.get_upper, v); + const cn = match[1]; + if (match[0]) { + if (cn) { + return { + hd: [ + trace, + newty2(t1.level, { + TAG: /* Ttuple */2, + _0: { + hd: t1, + tl: /* [] */0 + } + }), + newty2(t2.level, { + TAG: /* Ttuple */2, + _0: { + hd: t2, + tl: /* [] */0 + } + }), + univar_pairs.contents + ], + tl: cstrs + }; + } else { return subtype_rec(env, { hd: [ - t2, - t1 + t1, + t2 ], tl: trace - }, t2, t1, cstrs); - } else { - return cstrs; + }, t1, t2, cstrs); } - }), cstrs, decl.type_variance, Stdlib__List.combine(match._1, match$1._1)); + } else if (cn) { + return subtype_rec(env, { + hd: [ + t2, + t1 + ], + tl: trace + }, t2, t1, cstrs); + } else { + return cstrs; + } + }), cstrs, decl.type_variance, Stdlib__List.combine(match._1, match$1._1)); } catch (raw_exn$5){ const exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); @@ -38522,23 +38522,23 @@ function subtype(env, ty1, ty2) { Curry._1(TypePairs.clear, subtypes); return function (param) { Stdlib__List.iter((function (param) { - try { - return unify_pairs({ - contents: env - }, param[1], param[2], param[3]); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Subtype, { - MEL_EXN_ID: Subtype, - _1: expand_trace(env, Stdlib__List.rev(param[0])), - _2: Stdlib__List.tl(Stdlib__List.tl(trace._1)) - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return unify_pairs({ + contents: env + }, param[1], param[2], param[3]); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError(Subtype, { + MEL_EXN_ID: Subtype, + _1: expand_trace(env, Stdlib__List.rev(param[0])), + _2: Stdlib__List.tl(Stdlib__List.tl(trace._1)) + }); } - }), Stdlib__List.rev(cstrs)); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), Stdlib__List.rev(cstrs)); }; } @@ -38738,61 +38738,61 @@ function normalize_type_rec(env, visited, ty) { case /* Tvariant */8 : const row$1 = row_repr_aux(/* [] */0, row._0); const fields = Stdlib__List.map((function (param) { - const f0 = param[1]; - const f = row_field_repr_aux(/* [] */0, f0); - let tmp; - if (/* tag */typeof f === "number" || typeof f === "string" || f.TAG === /* Rpresent */0) { - tmp = f; - } else { - const match = f._1; - if (match) { - const tyl = match.tl; - if (tyl) { - const tyl$p = Stdlib__List.fold_left((function (tyl, ty) { - if (Stdlib__List.exists((function (ty$p) { - return equal$5(env, false, { - hd: ty, - tl: /* [] */0 - }, { - hd: ty$p, - tl: /* [] */0 - }); - }), tyl)) { - return tyl; - } else { - return { - hd: ty, - tl: tyl - }; - } - }), { - hd: match.hd, - tl: /* [] */0 - }, tyl); - tmp = f !== f0 || Stdlib__List.length(tyl$p) < Stdlib__List.length(tyl) ? ({ - TAG: /* Reither */1, - _0: f._0, - _1: Stdlib__List.rev(tyl$p), - _2: f._2, - _3: f._3 - }) : f; - } else { - tmp = f; - } + const f0 = param[1]; + const f = row_field_repr_aux(/* [] */0, f0); + let tmp; + if (/* tag */typeof f === "number" || typeof f === "string" || f.TAG === /* Rpresent */0) { + tmp = f; + } else { + const match = f._1; + if (match) { + const tyl = match.tl; + if (tyl) { + const tyl$p = Stdlib__List.fold_left((function (tyl, ty) { + if (Stdlib__List.exists((function (ty$p) { + return equal$5(env, false, { + hd: ty, + tl: /* [] */0 + }, { + hd: ty$p, + tl: /* [] */0 + }); + }), tyl)) { + return tyl; + } else { + return { + hd: ty, + tl: tyl + }; + } + }), { + hd: match.hd, + tl: /* [] */0 + }, tyl); + tmp = f !== f0 || Stdlib__List.length(tyl$p) < Stdlib__List.length(tyl) ? ({ + TAG: /* Reither */1, + _0: f._0, + _1: Stdlib__List.rev(tyl$p), + _2: f._2, + _3: f._3 + }) : f; } else { tmp = f; } + } else { + tmp = f; } - return [ - param[0], - tmp - ]; - }), row$1.row_fields); + } + return [ + param[0], + tmp + ]; + }), row$1.row_fields); const 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); - }), fields)); + return Caml.caml_string_compare(param[0], param$1[0]); + }), Stdlib__List.filter((function (param) { + return Caml_obj.caml_notequal(param[1], /* Rabsent */0); + }), fields)); log_type(ty$1); ty$1.desc = { TAG: /* Tvariant */8, @@ -38811,8 +38811,8 @@ function normalize_type_rec(env, visited, ty) { } } iter_type_expr((function (param) { - return normalize_type_rec(env, visited, param); - }), ty$1); + return normalize_type_rec(env, visited, param); + }), ty$1); } function normalize_type(env, ty) { @@ -38891,8 +38891,8 @@ function nondep_type_rec(env, id, _ty) { TAG: /* Tconstr */3, _0: p, _1: Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), row._1), + return nondep_type_rec(env, id, param); + }), row._1), _2: { contents: /* Mnil */0 } @@ -38907,8 +38907,8 @@ function nondep_type_rec(env, id, _ty) { tmp$1 = isfree(id, p$1) ? undefined : [ p$1, Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), match[1]) + return nondep_type_rec(env, id, param); + }), match[1]) ]; } else { tmp$1 = undefined; @@ -38939,8 +38939,8 @@ function nondep_type_rec(env, id, _ty) { const $$static = static_row(row$1); const more$p = $$static ? newty2(100000000, /* Tnil */0) : more; const row$2 = copy_row((function (param) { - return nondep_type_rec(env, id, param); - }), true, row$1, true, more$p); + return nondep_type_rec(env, id, param); + }), true, row$1, true, more$p); const match$1 = row$2.row_name; tmp = match$1 !== undefined && isfree(id, match$1[0]) ? ({ TAG: /* Tvariant */8, @@ -38975,8 +38975,8 @@ function nondep_type_rec(env, id, _ty) { _0: p$p, _1: row._1, _2: Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), row._2) + return nondep_type_rec(env, id, param); + }), row._2) }; } else { exit$1 = 2; @@ -38988,8 +38988,8 @@ function nondep_type_rec(env, id, _ty) { } if (exit$1 === 2) { tmp = copy_type_desc(undefined, (function (param) { - return nondep_type_rec(env, id, param); - }), ty.desc); + return nondep_type_rec(env, id, param); + }), ty.desc); } ty$p.desc = tmp; return ty$p; @@ -39030,8 +39030,8 @@ function unroll_abbrev(id, tl, ty) { _0: id }; if (is_Tvar(ty$1) || Stdlib__List.exists((function (param) { - return deep_occur(ty$1, param); - }), tl) || is_object_type(path)) { + return deep_occur(ty$1, param); + }), tl) || is_object_type(path)) { return ty$1; } const ty$p = newty2(ty$1.level, ty$1.desc); @@ -39049,8 +39049,8 @@ function unroll_abbrev(id, tl, ty) { function nondep_type_decl(env, mid, id, is_covariant, decl) { try { const params = Stdlib__List.map((function (param) { - return nondep_type_rec(env, mid, param); - }), decl.type_params); + return nondep_type_rec(env, mid, param); + }), decl.type_params); let tk; try { const cstrs = decl.type_kind; @@ -39060,30 +39060,30 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { cstrs.TAG === /* Type_record */0 ? ({ TAG: /* Type_record */0, _0: Stdlib__List.map((function (l) { - return { - ld_id: l.ld_id, - ld_mutable: l.ld_mutable, - ld_type: nondep_type_rec(env, mid, l.ld_type), - ld_loc: l.ld_loc, - ld_attributes: l.ld_attributes - }; - }), cstrs._0), + return { + ld_id: l.ld_id, + ld_mutable: l.ld_mutable, + ld_type: nondep_type_rec(env, mid, l.ld_type), + ld_loc: l.ld_loc, + ld_attributes: l.ld_attributes + }; + }), cstrs._0), _1: cstrs._1 }) : ({ TAG: /* Type_variant */1, _0: Stdlib__List.map((function (c) { - return { - cd_id: c.cd_id, - cd_args: Stdlib__List.map((function (param) { - return nondep_type_rec(env, mid, param); - }), c.cd_args), - cd_res: may_map((function (param) { - return nondep_type_rec(env, mid, param); - }), c.cd_res), - cd_loc: c.cd_loc, - cd_attributes: c.cd_attributes - }; - }), cstrs._0) + return { + cd_id: c.cd_id, + cd_args: Stdlib__List.map((function (param) { + return nondep_type_rec(env, mid, param); + }), c.cd_args), + cd_res: may_map((function (param) { + return nondep_type_rec(env, mid, param); + }), c.cd_res), + cd_loc: c.cd_loc, + cd_attributes: c.cd_attributes + }; + }), cstrs._0) }) ); } @@ -39175,19 +39175,19 @@ function nondep_extension_constructor(env, mid, ext) { } } else { const type_params = Stdlib__List.map((function (param) { - return nondep_type_rec(env, mid, param); - }), ext.ext_type_params); + return nondep_type_rec(env, mid, param); + }), ext.ext_type_params); match = [ ext.ext_type_path, type_params ]; } const args = Stdlib__List.map((function (param) { - return nondep_type_rec(env, mid, param); - }), ext.ext_args); + return nondep_type_rec(env, mid, param); + }), ext.ext_args); const ret_type = may_map((function (param) { - return nondep_type_rec(env, mid, param); - }), ext.ext_ret_type); + return nondep_type_rec(env, mid, param); + }), ext.ext_ret_type); Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); return { @@ -39217,21 +39217,21 @@ function nondep_class_signature(env, id, sign) { return { csig_self: nondep_type_rec(env, id, sign.csig_self), csig_vars: Curry._2(Meths.map, (function (param) { - return [ - param[0], - param[1], - nondep_type_rec(env, id, param[2]) - ]; - }), sign.csig_vars), + return [ + param[0], + param[1], + nondep_type_rec(env, id, param[2]) + ]; + }), sign.csig_vars), csig_concr: sign.csig_concr, csig_inher: Stdlib__List.map((function (param) { - return [ - param[0], - Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), param[1]) - ]; - }), sign.csig_inher) + return [ + param[0], + Stdlib__List.map((function (param) { + return nondep_type_rec(env, id, param); + }), param[1]) + ]; + }), sign.csig_inher) }; } @@ -39246,8 +39246,8 @@ function nondep_class_type(env, id, _sign) { TAG: /* Cty_constr */0, _0: p, _1: Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), sign._1), + return nondep_type_rec(env, id, param); + }), sign._1), _2: nondep_class_type(env, id, sign._2) }; } @@ -39284,8 +39284,8 @@ function nondep_class_declaration(env, id, decl) { const ty = decl.cty_new; const decl$1 = { cty_params: Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), decl.cty_params), + return nondep_type_rec(env, id, param); + }), decl.cty_params), cty_type: nondep_class_type(env, id, decl.cty_type), cty_path: decl.cty_path, cty_new: ty !== undefined ? nondep_type_rec(env, id, ty) : undefined, @@ -39310,8 +39310,8 @@ function nondep_cltype_declaration(env, id, decl) { }); } const decl_clty_params = Stdlib__List.map((function (param) { - return nondep_type_rec(env, id, param); - }), decl.clty_params); + return nondep_type_rec(env, id, param); + }), decl.clty_params); const decl_clty_type = nondep_class_type(env, id, decl.clty_type); const decl_clty_path = decl.clty_path; const decl_clty_variance = decl.clty_variance; @@ -39342,57 +39342,57 @@ function collapse_conj(env, visited, ty) { const row = ty$1.desc; if (/* tag */typeof row === "number" || typeof row === "string") { return iter_type_expr((function (param) { - return collapse_conj(env, visited$1, param); - }), ty$1); + return collapse_conj(env, visited$1, param); + }), ty$1); } if (row.TAG !== /* Tvariant */8) { return iter_type_expr((function (param) { - return collapse_conj(env, visited$1, param); - }), ty$1); + return collapse_conj(env, visited$1, param); + }), ty$1); } const row$1 = row_repr_aux(/* [] */0, row._0); Stdlib__List.iter((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG === /* Rpresent */0) { - return; - } - const match$1 = match._1; - if (!match$1) { - return; - } - const tl = match$1.tl; - if (!tl) { - return; - } - const t1 = match$1.hd; - Stdlib__List.iter((function (param) { - return unify$2(env, t1, param); - }), tl); - set_row_field(match._3, { - TAG: /* Reither */1, - _0: match._0, - _1: { - hd: t1, - tl: /* [] */0 - }, - _2: match._2, - _3: { - contents: undefined - } - }); - }), row$1.row_fields); + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG === /* Rpresent */0) { + return; + } + const match$1 = match._1; + if (!match$1) { + return; + } + const tl = match$1.tl; + if (!tl) { + return; + } + const t1 = match$1.hd; + Stdlib__List.iter((function (param) { + return unify$2(env, t1, param); + }), tl); + set_row_field(match._3, { + TAG: /* Reither */1, + _0: match._0, + _1: { + hd: t1, + tl: /* [] */0 + }, + _2: match._2, + _3: { + contents: undefined + } + }); + }), row$1.row_fields); iter_row((function (param) { - return collapse_conj(env, visited$1, param); - }), row$1); + return collapse_conj(env, visited$1, param); + }), row$1); } function collapse_conj_params(env, params) { Stdlib__List.iter((function (param) { - return collapse_conj(env, /* [] */0, param); - }), params); + return collapse_conj(env, /* [] */0, param); + }), params); } const out_ident = { @@ -39516,68 +39516,68 @@ function print_list(pr, sep, ppf, _param) { function pr_present(param, param$1) { return print_list((function (ppf, s) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* '`' */96, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "`%s" - }), s); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 + TAG: /* Char_literal */12, + _0: /* '`' */96, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } }, - _1: /* End_of_format */0 + _1: "`%s" + }), s); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "@ " - }); - }), param, param$1); + _1: /* End_of_format */0 + }, + _1: "@ " + }); + }), param, param$1); } function pr_vars(param, param$1) { return print_list((function (ppf, s) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* '\'' */39, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "'%s" - }), s); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 + TAG: /* Char_literal */12, + _0: /* '\'' */39, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } }, - _1: /* End_of_format */0 + _1: "'%s" + }), s); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "@ " - }); - }), param, param$1); + _1: /* End_of_format */0 + }, + _1: "@ " + }); + }), param, param$1); } function print_out_type(ppf, ty) { @@ -39726,8 +39726,8 @@ function print_out_type_2(ppf, tyl) { }, _1: "@[<0>%a@]" }), (function (param, param$1) { - return print_typlist(print_simple_out_type, " *", param, param$1); - }), tyl._0); + return print_typlist(print_simple_out_type, " *", param, param$1); + }), tyl._0); } } @@ -39849,13 +39849,13 @@ function print_simple_out_type(ppf, s) { }; } else { return Stdlib__List.fold_right((function (x, acc) { - return { - TAG: /* Otyp_arrow */1, - _0: "", - _1: x, - _2: acc - }; - }), single._0, result); + return { + TAG: /* Otyp_arrow */1, + _0: "", + _1: x, + _2: acc + }; + }), single._0, result); } } if (tys.tl) { @@ -40009,13 +40009,13 @@ function print_simple_out_type(ppf, s) { }; } else { return Stdlib__List.fold_right((function (x, acc) { - return { - TAG: /* Otyp_arrow */1, - _0: "", - _1: x, - _2: acc - }; - }), single._0, result); + return { + TAG: /* Otyp_arrow */1, + _0: "", + _1: x, + _2: acc + }; + }), single._0, result); } } if (tys.tl) { @@ -40239,8 +40239,8 @@ function print_simple_out_type(ppf, s) { }, _1: "@[<2>< %a >@]" }), (function (param, param$1) { - return print_fields(rest, param, param$1); - }), s._0); + return print_fields(rest, param, param$1); + }), s._0); case /* Otyp_stuff */7 : return Stdlib__Format.pp_print_string(ppf, s._0); case /* Otyp_var */10 : @@ -40311,25 +40311,25 @@ function print_simple_out_type(ppf, s) { const print_fields$1 = function (ppf, fields) { if (fields.TAG === /* Ovar_fields */0) { return print_list(print_row_field, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@;<1 -2>", - _1: 1, - _2: -2 - }, - _1: { - TAG: /* String_literal */11, - _0: "| ", - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@;<1 -2>", + _1: 1, + _2: -2 }, - _1: "@;<1 -2>| " - }); - }), ppf, fields._0); + _1: { + TAG: /* String_literal */11, + _0: "| ", + _1: /* End_of_format */0 + } + }, + _1: "@;<1 -2>| " + }); + }), ppf, fields._0); } else { return Curry._4(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -40466,36 +40466,36 @@ function print_simple_out_type(ppf, s) { contents: true }; Stdlib__List.iter2((function (s, t) { - const sep = first.contents ? (first.contents = false, "with") : "and"; - Curry._4(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + const sep = first.contents ? (first.contents = false, "with") : "and"; + Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: " type ", _1: { - TAG: /* String_literal */11, - _0: " type ", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: " = ", _1: { - TAG: /* String_literal */11, - _0: " = ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } + TAG: /* Alpha */15, + _0: /* End_of_format */0 } } } } - }, - _1: " %s type %s = %a" - }), sep, s, print_out_type, t); - }), s._1, s._2); + } + }, + _1: " %s type %s = %a" + }), sep, s, print_out_type, t); + }), s._1, s._2); return Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { @@ -40576,8 +40576,8 @@ function print_fields(rest, ppf, _param) { }, _1: "%s : %a;@ %a" }), s, print_out_type, match[1], (function (param, param$1) { - return print_fields(rest, param, param$1); - }), param.tl); + return print_fields(rest, param, param$1); + }), param.tl); } Curry._3(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -40721,8 +40721,8 @@ function print_row_field(ppf, param) { }, _1: "@[`%s%t%a@]" }), param[0], pr_of, (function (param, param$1) { - return print_typlist(print_out_type, " &", param, param$1); - }), tyl); + return print_typlist(print_out_type, " &", param, param$1); + }), tyl); } function print_typlist(print_elem, sep, ppf, _param) { @@ -40830,18 +40830,18 @@ function print_out_class_params(ppf, tyl) { }, _1: "@[<1>[%a]@]@ " }), (function (param, param$1) { - return print_list(type_parameter, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: ", ", - _1: /* End_of_format */0 - }, - _1: ", " - }); - }), param, param$1); - }), tyl); + return print_list(type_parameter, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: ", ", + _1: /* End_of_format */0 + }, + _1: ", " + }); + }), param, param$1); + }), tyl); } } @@ -40898,8 +40898,8 @@ function print_out_class_type(ppf, param) { }, _1: "@[<1>[%a]@]@ " }), (function (param, param$1) { - return print_typlist(partial_arg, ",", param, param$1); - }), tyl); + return print_typlist(partial_arg, ",", param, param$1); + }), tyl); }; return Curry._4(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -41093,23 +41093,23 @@ function print_out_class_type(ppf, param) { }, _1: "@[@[<2>object%a@]@ %a@;<1 -2>end@]" }), pr_param, param._0, (function (param, param$1) { - return print_list(print_out_class_sig_item, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - }, - _1: "@ " - }); - }), param, param$1); - }), param._1); + return print_list(print_out_class_sig_item, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: /* End_of_format */0 + }, + _1: "@ " + }); + }), param, param$1); + }), param._1); } } @@ -41288,38 +41288,38 @@ const out_class_type = { const out_module_type = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Oprint.out_module_type" - }); - }) + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Oprint.out_module_type" + }); + }) }; const out_sig_item = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Oprint.out_sig_item" - }); - }) + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Oprint.out_sig_item" + }); + }) }; const out_signature = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Oprint.out_signature" - }); - }) + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Oprint.out_signature" + }); + }) }; const out_type_extension = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Oprint.out_type_extension" - }); - }) + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Oprint.out_type_extension" + }); + }) }; function print_out_functor(ppf, m) { @@ -41578,8 +41578,8 @@ function print_out_constr(ppf, param) { }, _1: "@[<2>%s :@ %a -> %a@]" }), name, (function (param, param$1) { - return print_typlist(print_simple_out_type, " *", param, param$1); - }), tyl, print_simple_out_type, ret_type_opt); + return print_typlist(print_simple_out_type, " *", param, param$1); + }), tyl, print_simple_out_type, ret_type_opt); } else { return Curry._3(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -41671,8 +41671,8 @@ function print_out_constr(ppf, param) { }, _1: "@[<2>%s of@ %a@]" }), name, (function (param, param$1) { - return print_typlist(print_simple_out_type, " *", param, param$1); - }), tyl); + return print_typlist(print_simple_out_type, " *", param, param$1); + }), tyl); } else { return Stdlib__Format.pp_print_string(ppf, name); } @@ -42080,27 +42080,27 @@ function print_out_sig_item(ppf, param) { }, _1: "@[(@[%a)@]@ %s@]" }), (function (param, param$1) { - return print_list(print_type_parameter, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + return print_list(print_type_parameter, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: ",@ " - }); - }), param, param$1); - }), ext.oext_type_params, ext.oext_type_name); + _1: /* End_of_format */0 + } + }, + _1: ",@ " + }); + }), param, param$1); + }), ext.oext_type_params, ext.oext_type_name); } else { return Curry._3(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -42465,63 +42465,63 @@ function print_out_sig_item(ppf, param) { let td = param._0; const print_constraints = function (ppf) { Stdlib__List.iter((function (param) { - Curry._4(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, + TAG: /* Format */0, _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<2>", - _1: /* End_of_format */0 - }, - _1: "<2>" - } - }, + TAG: /* String_literal */11, + _0: "<2>", + _1: /* End_of_format */0 + }, + _1: "<2>" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "constraint ", _1: { - TAG: /* String_literal */11, - _0: "constraint ", - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* String_literal */11, - _0: " =", + TAG: /* Alpha */15, + _0: { + TAG: /* String_literal */11, + _0: " =", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } - }, - _1: "@ @[<2>constraint %a =@ %a@]" - }), out_type.contents, param[0], out_type.contents, param[1]); - }), td.otype_cstrs); + } + }, + _1: "@ @[<2>constraint %a =@ %a@]" + }), out_type.contents, param[0], out_type.contents, param[1]); + }), td.otype_cstrs); }; const type_defined = function (ppf) { const match = td.otype_params; @@ -42586,27 +42586,27 @@ function print_out_sig_item(ppf, param) { }, _1: "@[(@[%a)@]@ %s@]" }), (function (param, param$1) { - return print_list(type_parameter, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + return print_list(type_parameter, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: ",@ " - }); - }), param, param$1); - }), td.otype_params, td.otype_name); + _1: /* End_of_format */0 + } + }, + _1: ",@ " + }); + }), param, param$1); + }), td.otype_params, td.otype_name); } else { return Curry._3(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -42764,34 +42764,34 @@ function print_out_sig_item(ppf, param) { }, _1: " =%a {%a@;<1 -2>}" }), print_private, td.otype_private, (function (param, param$1) { - const sep = function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + const sep = function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "@ " - }); - }; - let _param = param$1; - while(true) { - const param$2 = _param; - if (!param$2) { - return; - } - Curry._1(sep, param); - Curry._2(print_out_label, param, param$2.hd); - _param = param$2.tl; - continue; - }; - }), lbls._0); + _1: /* End_of_format */0 + }, + _1: "@ " + }); + }; + let _param = param$1; + while(true) { + const param$2 = _param; + if (!param$2) { + return; + } + Curry._1(sep, param); + Curry._2(print_out_label, param, param$2.hd); + _param = param$2.tl; + continue; + }; + }), lbls._0); case /* Otyp_sum */8 : return Curry._4(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -42817,27 +42817,27 @@ function print_out_sig_item(ppf, param) { }, _1: " =%a@;<1 2>%a" }), print_private, td.otype_private, (function (param, param$1) { - return print_list(print_out_constr, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "| ", - _1: /* End_of_format */0 - } - }, - _1: "@ | " - }); - }), param, param$1); - }), lbls._0); + return print_list(print_out_constr, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "| ", + _1: /* End_of_format */0 + } + }, + _1: "@ | " + }); + }), param, param$1); + }), lbls._0); default: return Curry._4(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -42949,55 +42949,55 @@ function print_out_sig_item(ppf, param) { _1: "@ = \"%s\"" }), param.hd); return Stdlib__List.iter((function (s) { - const 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)({ - TAG: /* Format */0, + const 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)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "\"BS-EXTERNAL\"", - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "@ \"BS-EXTERNAL\"" - }); - } else { - return Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + _1: { + TAG: /* String_literal */11, + _0: "\"BS-EXTERNAL\"", + _1: /* End_of_format */0 + } + }, + _1: "@ \"BS-EXTERNAL\"" + }); + } else { + return Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Char_literal */12, + _0: /* '"' */34, _1: { - TAG: /* Char_literal */12, - _0: /* '"' */34, + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '"' */34, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* '"' */34, + _1: /* End_of_format */0 } } - }, - _1: "@ \"%s\"" - }), s); - } - }), param.tl); + } + }, + _1: "@ \"%s\"" + }), s); + } + }), param.tl); } }; @@ -43134,27 +43134,27 @@ function print_out_type_extension(ppf, te) { }, _1: "@[(@[%a)@]@ %s@]" }), (function (param, param$1) { - return print_list(print_type_parameter, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + return print_list(print_type_parameter, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: ",@ " - }); - }), param, param$1); - }), te.otyext_params, te.otyext_name); + _1: /* End_of_format */0 + } + }, + _1: ",@ " + }); + }), param, param$1); + }), te.otyext_params, te.otyext_name); } else { return Curry._3(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -43256,27 +43256,27 @@ function print_out_type_extension(ppf, te) { }, _1: "@[type %t +=%s@;<1 2>%a@]" }), print_extended_type, te.otyext_private === /* Private */0 ? " private" : "", (function (param, param$1) { - return print_list(print_out_constr, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "| ", - _1: /* End_of_format */0 - } - }, - _1: "@ | " - }); - }), param, param$1); - }), te.otyext_constructors); + return print_list(print_out_constr, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "| ", + _1: /* End_of_format */0 + } + }, + _1: "@ | " + }); + }), param, param$1); + }), te.otyext_constructors); } out_module_type.contents = print_out_module_type; @@ -43553,30 +43553,30 @@ function raw_list(pr, ppf, param) { }, _1: "@[<1>[%a%t]@]" }), pr, param.hd, (function (ppf) { - Stdlib__List.iter((function (x) { - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + Stdlib__List.iter((function (x) { + Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 }, - _1: ";@,%a" - }), pr, x); - }), l); - })); + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + }, + _1: ";@,%a" + }), pr, x); + }), l); + })); } function safe_kind_repr(_v, _param) { @@ -44037,8 +44037,8 @@ function raw_type_desc(ppf, name) { }, _1: "@[Tconstr(@,%a,@,%a,@,%a)@]" }), path, name._0, raw_type_list, name._1, (function (param, param$1) { - return raw_list(path, param, param$1); - }), list_of_memo(name._2.contents)); + return raw_list(path, param, param$1); + }), list_of_memo(name._2.contents)); case /* Tobject */4 : const nm = name._1; return Curry._3(Stdlib__Format.fprintf(ppf)({ @@ -44124,61 +44124,61 @@ function raw_type_desc(ppf, name) { }, _1: "@[Tobject(@,%a,@,@[<1>ref%t@])@]" }), raw_type, name._0, (function (ppf) { - const match = nm.contents; - if (match !== undefined) { - return Curry._4(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "(Some(", + const match = nm.contents; + if (match !== undefined) { + return Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "(Some(", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* String_literal */11, - _0: "))", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: "))", + _1: /* End_of_format */0 } } } } } - }, - _1: "(Some(@,%a,@,%a))" - }), path, match[0], raw_type_list, match[1]); - } else { - return Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: " None", - _1: /* End_of_format */0 - }, - _1: " None" - }); - } - })); + } + }, + _1: "(Some(@,%a,@,%a))" + }), path, match[0], raw_type_list, match[1]); + } else { + return Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: " None", + _1: /* End_of_format */0 + }, + _1: " None" + }); + } + })); case /* Tfield */5 : return Curry._6(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -44548,49 +44548,49 @@ function raw_type_desc(ppf, name) { }), [ "row_fields=", (function (param, param$1) { - return raw_list((function (ppf, param) { - Curry._3(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + return raw_list((function (ppf, param) { + Curry._3(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ',' */44, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Char_literal */12, - _0: /* ',' */44, - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } - }, - _1: "@[%s,@ %a@]" - }), param[0], raw_field, param[1]); - }), param, param$1); - }), + } + } + }, + _1: "@[%s,@ %a@]" + }), param[0], raw_field, param[1]); + }), param, param$1); + }), row.row_fields, "row_more=", raw_type, @@ -44601,61 +44601,61 @@ function raw_type_desc(ppf, name) { row.row_fixed, "row_name=", (function (ppf) { - const match = row.row_name; - if (match !== undefined) { - return Curry._4(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Some(", + const match = row.row_name; + if (match !== undefined) { + return Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Some(", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ')' */41, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* ')' */41, + _1: /* End_of_format */0 } } } } } - }, - _1: "Some(@,%a,@,%a)" - }), path, match[0], raw_type_list, match[1]); - } else { - return Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "None", - _1: /* End_of_format */0 - }, - _1: "None" - }); - } - }) + } + }, + _1: "Some(@,%a,@,%a)" + }), path, match[0], raw_type_list, match[1]); + } else { + return Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "None", + _1: /* End_of_format */0 + }, + _1: "None" + }); + } + }) ]); case /* Tunivar */9 : return Curry._2(Stdlib__Format.fprintf(ppf)({ @@ -44972,64 +44972,64 @@ function raw_field(ppf, param) { }, _1: "@[Reither(%b,@,%a,@,%b,@,@[<1>ref%t@])@]" }), param._0, raw_type_list, param._1, param._2, (function (ppf) { - const f = e.contents; - if (f !== undefined) { - return Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + const f = e.contents; + if (f !== undefined) { + return Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, + _1: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "<1>", + _1: /* End_of_format */0 + }, + _1: "<1>" + } }, _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, + TAG: /* Char_literal */12, + _0: /* '(' */40, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<1>", + TAG: /* Char_literal */12, + _0: /* ')' */41, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: /* End_of_format */0 - }, - _1: "<1>" - } - }, - _1: { - TAG: /* Char_literal */12, - _0: /* '(' */40, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ')' */41, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } } } } } - }, - _1: "@,@[<1>(%a)@]" - }), raw_field, f); - } else { - return Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: " None", - _1: /* End_of_format */0 - }, - _1: " None" - }); - } - })); + } + }, + _1: "@,@[<1>(%a)@]" + }), raw_field, f); + } else { + return Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: " None", + _1: /* End_of_format */0 + }, + _1: " None" + }); + } + })); } function raw_type_expr(ppf, t) { @@ -45063,8 +45063,8 @@ function compose(l1, l2) { return { TAG: /* Map */1, _0: Stdlib__List.map((function (param) { - return Stdlib__List.nth(l1, param); - }), l2._0) + return Stdlib__List.nth(l1, param); + }), l2._0) }; } } @@ -45079,8 +45079,8 @@ function apply_subst(s1, tyl) { }; } else { return Stdlib__List.map((function (param) { - return Stdlib__List.nth(tyl, param); - }), s1._0); + return Stdlib__List.nth(tyl, param); + }), s1._0); } } @@ -45356,8 +45356,8 @@ function normalize_type_path(cacheOpt, env, p) { const p1 = match$1._0; const 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)) { + return prim0 === prim1; + }), params, tyl)) { return normalize_type_path(cache, env, p1); } if (cache || Stdlib__List.length(params) <= Stdlib__List.length(tyl) || !uniq(tyl)) { @@ -45367,8 +45367,8 @@ function normalize_type_path(cacheOpt, env, p) { ]; } const l1 = Stdlib__List.map((function (param) { - return index(params, param); - }), tyl); + return index(params, param); + }), tyl); const match$2 = normalize_type_path(cache, env, p1); return [ match$2[0], @@ -45490,15 +45490,15 @@ function set_printing_env(env) { function wrap_printing_env(env, f) { set_printing_env(env); return try_finally(f, (function (param) { - set_printing_env(empty); - })); + set_printing_env(empty); + })); } function is_unambiguous(path, env) { const l = find_shadowed_types(path, env); if (Stdlib__List.exists((function (param) { - return same(path, param); - }), l)) { + return same(path, param); + }), l)) { return true; } if (!l) { @@ -45511,14 +45511,14 @@ function is_unambiguous(path, env) { }; const p$p = normalize(p); if (Stdlib__List.for_all((function (p) { - return same(normalize(p), p$p); - }), rem)) { + return same(normalize(p), p$p); + }), rem)) { return true; } const 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)) { + return Caml_obj.caml_equal(lid_of_path(undefined, p), id); + }), rem)) { return same(p, lookup_type$1(id, env)[0]); } else { return false; @@ -45548,19 +45548,19 @@ function best_type_path(p) { _0: /* [] */0 }; Stdlib__List.iter((function (p) { - const p$p = r.contents; - if (p$p.TAG !== /* Paths */0 && Caml_obj.caml_greaterequal(path_size(p), path_size(p$p._0))) { - return; - } - if (is_unambiguous(p, printing_env.contents)) { - r.contents = { - TAG: /* Best */1, - _0: p - }; - return; - } - - }), l); + const p$p = r.contents; + if (p$p.TAG !== /* Paths */0 && Caml_obj.caml_greaterequal(path_size(p), path_size(p$p._0))) { + return; + } + if (is_unambiguous(p, printing_env.contents)) { + r.contents = { + TAG: /* Best */1, + _0: p + }; + return; + } + + }), l); continue; } throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { @@ -45569,28 +45569,28 @@ function best_type_path(p) { }; }; while((function () { - let tmp = false; - if (Caml_obj.caml_notequal(printing_cont.contents, /* [] */0)) { - let tmp$1; - try { - get_path(undefined); - tmp$1 = false; - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - tmp$1 = true; - } else { - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } + let tmp = false; + if (Caml_obj.caml_notequal(printing_cont.contents, /* [] */0)) { + let tmp$1; + try { + get_path(undefined); + tmp$1 = false; + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + tmp$1 = true; + } else { + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - tmp = tmp$1; } - return tmp; - })()) { + tmp = tmp$1; + } + return tmp; + })()) { printing_cont.contents = Stdlib__List.map((function (prim) { - return prim[1]; - }), run_iter_cont(printing_cont.contents)); + return prim[1]; + }), run_iter_cont(printing_cont.contents)); printing_depth.contents = printing_depth.contents + 1 | 0; }; let p$p$p; @@ -45664,8 +45664,8 @@ function new_name(_param) { } name_counter.contents = name_counter.contents + 1 | 0; if (!(Stdlib__List.mem(name, named_vars.contents) || Stdlib__List.exists((function (param) { - return name === param[1]; - }), names.contents))) { + return name === param[1]; + }), names.contents))) { return name; } _param = undefined; @@ -45703,8 +45703,8 @@ function name_of_type(t) { }; let i = 0; while(Stdlib__List.exists((function (param) { - return current_name.contents === param[1]; - }), names.contents)) { + return current_name.contents === param[1]; + }), names.contents)) { current_name.contents = name$1 + String(i); i = i + 1 | 0; }; @@ -45735,8 +45735,8 @@ function check_name_of_type(t) { function remove_names(tyl) { const tyl$1 = Stdlib__List.map(repr, tyl); names.contents = Stdlib__List.filter((function (param) { - return !Stdlib__List.memq(param[0], tyl$1); - }), names.contents); + return !Stdlib__List.memq(param[0], tyl$1); + }), names.contents); } const visited_objects = { @@ -45798,24 +45798,24 @@ function aliasable(ty) { function namable_row(row) { if (row.row_name !== undefined) { return Stdlib__List.for_all((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return true; - } - if (match.TAG === /* Rpresent */0) { - return true; - } - const l = match._1; - if (row.row_closed) { - if (match._0) { - return Caml_obj.caml_equal(l, /* [] */0); - } else { - return Stdlib__List.length(l) === 1; - } + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return true; + } + if (match.TAG === /* Rpresent */0) { + return true; + } + const l = match._1; + if (row.row_closed) { + if (match._0) { + return Caml_obj.caml_equal(l, /* [] */0); } else { - return false; + return Stdlib__List.length(l) === 1; } - }), row.row_fields); + } else { + return false; + } + }), row.row_fields); } else { return false; } @@ -45846,13 +45846,13 @@ function mark_loops_rec(_visited, _ty) { continue; case /* Ttuple */2 : return Stdlib__List.iter((function (param) { - return mark_loops_rec(visited$1, param); - }), tyl._0); + return mark_loops_rec(visited$1, param); + }), tyl._0); case /* Tconstr */3 : const match = best_type_path(tyl._0); return Stdlib__List.iter((function (param) { - return mark_loops_rec(visited$1, param); - }), apply_subst(match[1], tyl._1)); + return mark_loops_rec(visited$1, param); + }), apply_subst(match[1], tyl._1)); case /* Tobject */4 : if (Stdlib__List.memq(px, visited_objects.contents)) { return add_alias(px); @@ -45866,16 +45866,16 @@ function mark_loops_rec(_visited, _ty) { const match$1 = tyl._1.contents; if (match$1 !== undefined) { return Stdlib__List.iter((function (param) { - return mark_loops_rec(visited$1, param); - }), Stdlib__List.tl(match$1[1])); + return mark_loops_rec(visited$1, param); + }), Stdlib__List.tl(match$1[1])); } const match$2 = flatten_fields(tyl._0); return Stdlib__List.iter((function (param) { - if (Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0)) { - return mark_loops_rec(visited$1, param[2]); - } - - }), match$2[0]); + if (Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0)) { + return mark_loops_rec(visited$1, param[2]); + } + + }), match$2[0]); case /* Tfield */5 : if (Caml_obj.caml_equal(field_kind_repr(tyl._1), /* Fpresent */0)) { mark_loops_rec(visited$1, tyl._2); @@ -45907,17 +45907,17 @@ function mark_loops_rec(_visited, _ty) { if (match$3 !== undefined) { if (namable_row(row)) { return Stdlib__List.iter((function (param) { - return mark_loops_rec(visited$1, param); - }), match$3[1]); + return mark_loops_rec(visited$1, param); + }), match$3[1]); } else { return iter_row((function (param) { - return mark_loops_rec(visited$1, param); - }), row); + return mark_loops_rec(visited$1, param); + }), row); } } else { return iter_row((function (param) { - return mark_loops_rec(visited$1, param); - }), row); + return mark_loops_rec(visited$1, param); + }), row); } case /* Tvar */0 : case /* Tunivar */9 : @@ -45929,8 +45929,8 @@ function mark_loops_rec(_visited, _ty) { continue; case /* Tpackage */11 : return Stdlib__List.iter((function (param) { - return mark_loops_rec(visited$1, param); - }), tyl._2); + return mark_loops_rec(visited$1, param); + }), tyl._2); } }; @@ -46014,8 +46014,8 @@ function tree_of_typexp(sch, ty) { return { TAG: /* Otyp_tuple */9, _0: Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl._0) + return tree_of_typexp(sch, param); + }), tyl._0) }; case /* Tconstr */3 : const match$2 = best_type_path(tyl._0); @@ -46028,8 +46028,8 @@ function tree_of_typexp(sch, ty) { TAG: /* Otyp_constr */3, _0: tree_of_path(match$2[0]), _1: Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl$p) + return tree_of_typexp(sch, param); + }), tyl$p) }; } case /* Tobject */4 : @@ -46043,16 +46043,16 @@ function tree_of_typexp(sch, ty) { case /* Tvariant */8 : const row = row_repr_aux(/* [] */0, tyl._0); const 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; + return Caml_obj.caml_notequal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0); + }), row.row_fields) : row.row_fields; const present = Stdlib__List.filter((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Rpresent */0) { - return false; - } else { - return true; - } - }), fields); + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Rpresent */0) { + return false; + } else { + return true; + } + }), fields); const all_present = Stdlib__List.length(present) === Stdlib__List.length(fields); const match$3 = row.row_name; if (match$3 !== undefined) { @@ -46064,8 +46064,8 @@ function tree_of_typexp(sch, ty) { const id = tree_of_path(match$4[0]); const tyl$2 = apply_subst(s$1, tyl$1); const args = Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl$2); + return tree_of_typexp(sch, param); + }), tyl$2); if (row.row_closed && all_present) { if (is_nth(s$1)) { return Stdlib__List.hd(args); @@ -46079,8 +46079,8 @@ function tree_of_typexp(sch, ty) { } const non_gen = is_non_gen(sch, px); const tags = all_present ? undefined : Stdlib__List.map((function (prim) { - return prim[0]; - }), present); + return prim[0]; + }), present); let inh; let exit = 0; if (args) { @@ -46102,8 +46102,8 @@ function tree_of_typexp(sch, ty) { TAG: /* Ovar_name */1, _0: tree_of_path(p), _1: Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl$1) + return tree_of_typexp(sch, param); + }), tyl$1) }; } return { @@ -46118,64 +46118,64 @@ function tree_of_typexp(sch, ty) { } const non_gen$1 = !(row.row_closed && all_present) && is_non_gen(sch, px); const fields$1 = Stdlib__List.map((function (param) { - const l = param[0]; - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return [ - l, - false, - /* [] */0 - ]; - } - if (match.TAG === /* Rpresent */0) { - const ty = match._0; - if (ty !== undefined) { - return [ - l, - false, - { - hd: tree_of_typexp(sch, ty), - tl: /* [] */0 - } - ]; - } else { - return [ - l, - false, - /* [] */0 - ]; - } - } - const c = match._0; - if (c && !match._1) { + const l = param[0]; + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return [ + l, + false, + /* [] */0 + ]; + } + if (match.TAG === /* Rpresent */0) { + const ty = match._0; + if (ty !== undefined) { return [ l, false, - /* [] */0 - ]; - } - const tyl = match._1; - if (c) { - return [ - l, - true, - Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl) + { + hd: tree_of_typexp(sch, ty), + tl: /* [] */0 + } ]; } else { return [ l, false, - Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl) + /* [] */0 ]; } - }), fields); + } + const c = match._0; + if (c && !match._1) { + return [ + l, + false, + /* [] */0 + ]; + } + const tyl = match._1; + if (c) { + return [ + l, + true, + Stdlib__List.map((function (param) { + return tree_of_typexp(sch, param); + }), tyl) + ]; + } else { + return [ + l, + false, + Stdlib__List.map((function (param) { + return tree_of_typexp(sch, param); + }), tyl) + ]; + } + }), fields); const tags$1 = all_present ? undefined : Stdlib__List.map((function (prim) { - return prim[0]; - }), present); + return prim[0]; + }), present); return { TAG: /* Otyp_variant */11, _0: non_gen$1, @@ -46215,23 +46215,23 @@ function tree_of_typexp(sch, ty) { return tr; case /* Tpackage */11 : const n = Stdlib__List.map((function (li) { - return Stdlib__String.concat(".", flat(/* [] */0, li)); - }), tyl._1); + return Stdlib__String.concat(".", flat(/* [] */0, li)); + }), tyl._1); return { TAG: /* Otyp_module */13, _0: name(undefined, tyl._0), _1: n, _2: Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), tyl._2) + return tree_of_typexp(sch, param); + }), tyl._2) }; } }; if (Stdlib__List.memq(px, delayed.contents)) { delayed.contents = Stdlib__List.filter((function (param) { - return px !== param; - }), delayed.contents); + return px !== param; + }), delayed.contents); } if (is_aliased(px) && aliasable(ty$1)) { name_of_type(px); @@ -46253,8 +46253,8 @@ function tree_of_typobject(sch, fi, nm) { } const non_gen = is_non_gen(sch, repr(match.hd)); const args = Stdlib__List.map((function (param) { - return tree_of_typexp(sch, param); - }), match.tl); + return tree_of_typexp(sch, param); + }), match.tl); const 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", { @@ -46276,22 +46276,22 @@ function tree_of_typobject(sch, fi, nm) { const pr_fields = function (fi) { const match = flatten_fields(fi); const present_fields = Stdlib__List.fold_right((function (param, l) { - const match = field_kind_repr(param[1]); - if (/* tag */(typeof match === "number" || typeof match === "string") && match === /* Fpresent */0) { - return { - hd: [ - param[0], - param[2] - ], - tl: l - }; - } else { - return l; - } - }), match[0], /* [] */0); + const match = field_kind_repr(param[1]); + if (/* tag */(typeof match === "number" || typeof match === "string") && match === /* Fpresent */0) { + return { + hd: [ + param[0], + param[2] + ], + tl: l + }; + } else { + return l; + } + }), match[0], /* [] */0); const sorted_fields = Stdlib__List.sort((function (param, param$1) { - return Caml.caml_string_compare(param[0], param$1[0]); - }), present_fields); + return Caml.caml_string_compare(param[0], param$1[0]); + }), present_fields); return tree_of_typfields(sch, match[1], sorted_fields); }; const match$2 = pr_fields(fi); @@ -46373,39 +46373,39 @@ function tree_of_type_scheme(ty) { function tree_of_constraints(params) { return Stdlib__List.fold_right((function (ty, list) { - const ty$p = unalias(ty); - if (proxy(ty) === proxy(ty$p)) { - return list; - } - const tr = tree_of_typexp(true, ty); - return { - hd: [ - tr, - tree_of_typexp(true, ty$p) - ], - tl: list - }; - }), params, /* [] */0); + const ty$p = unalias(ty); + if (proxy(ty) === proxy(ty$p)) { + return list; + } + const tr = tree_of_typexp(true, ty); + return { + hd: [ + tr, + tree_of_typexp(true, ty$p) + ], + tl: list + }; + }), params, /* [] */0); } function filter_params(tyl) { return Stdlib__List.rev(Stdlib__List.fold_left((function (tyl, ty) { - const ty$1 = repr(ty); - if (Stdlib__List.memq(ty$1, tyl)) { - return { - hd: newty2(100000000, { - TAG: /* Tsubst */7, - _0: ty$1 - }), - tl: tyl - }; - } else { - return { - hd: ty$1, - tl: tyl - }; - } - }), /* [] */0, tyl)); + const ty$1 = repr(ty); + if (Stdlib__List.memq(ty$1, tyl)) { + return { + hd: newty2(100000000, { + TAG: /* Tsubst */7, + _0: ty$1 + }), + tl: tyl + }; + } else { + return { + hd: ty$1, + tl: tyl + }; + } + }), /* [] */0, tyl)); } function tree_of_constructor(cd) { @@ -46415,8 +46415,8 @@ function tree_of_constructor(cd) { return [ name, Stdlib__List.map((function (param) { - return tree_of_typexp(false, param); - }), cd.cd_args), + return tree_of_typexp(false, param); + }), cd.cd_args), undefined ]; } @@ -46424,8 +46424,8 @@ function tree_of_constructor(cd) { names.contents = /* [] */0; const ret = tree_of_typexp(false, res); const args = Stdlib__List.map((function (param) { - return tree_of_typexp(false, param); - }), cd.cd_args); + return tree_of_typexp(false, param); + }), cd.cd_args); names.contents = nm; return [ name, @@ -46449,23 +46449,23 @@ function tree_of_type_decl(id, decl) { if (ty !== undefined) { const vars = free_variables$1(undefined, ty); Stdlib__List.iter((function (ty) { - const match = ty.desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG !== /* Tvar */0) { - return; - } - const match$1 = match._0; - if (match$1 !== undefined && match$1 === "_" && Stdlib__List.memq(ty, vars)) { - ty.desc = { - TAG: /* Tvar */0, - _0: undefined - }; - return; - } - - }), params); + const match = ty.desc; + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG !== /* Tvar */0) { + return; + } + const match$1 = match._0; + if (match$1 !== undefined && match$1 === "_" && Stdlib__List.memq(ty, vars)) { + ty.desc = { + TAG: /* Tvar */0, + _0: undefined + }; + return; + } + + }), params); } Stdlib__List.iter(add_alias, params); Stdlib__List.iter(mark_loops, params); @@ -46517,13 +46517,13 @@ function tree_of_type_decl(id, decl) { cstrs === /* Type_abstract */0; } else if (cstrs.TAG === /* Type_record */0) { Stdlib__List.iter((function (l) { - mark_loops(l.ld_type); - }), cstrs._0); + mark_loops(l.ld_type); + }), cstrs._0); } else { Stdlib__List.iter((function (c) { - Stdlib__List.iter(mark_loops, c.cd_args); - may(mark_loops, c.cd_res); - }), cstrs._0); + Stdlib__List.iter(mark_loops, c.cd_args); + may(mark_loops, c.cd_res); + }), cstrs._0); } const type_param = function (param) { if (/* tag */typeof param === "number" || typeof param === "string" || param.TAG !== /* Otyp_var */10) { @@ -46539,27 +46539,27 @@ function tree_of_type_decl(id, decl) { tll === /* Type_abstract */0 ? decl.type_manifest === undefined || decl.type_private === /* Private */0 : decl.type_manifest === undefined ) : ( tll.TAG === /* Type_record */0 ? decl.type_private === /* Private */0 : decl.type_private === /* Private */0 || Stdlib__List.exists((function (cd) { - return cd.cd_res !== undefined; - }), tll._0) + return cd.cd_res !== undefined; + }), tll._0) ); const vari = Stdlib__List.map2((function (ty, v) { - if (abstr || !is_Tvar(repr(ty))) { - return Curry._1(Types_Variance.get_upper, v); - } else { - return [ - true, - true - ]; - } - }), decl.type_params, decl.type_variance); + if (abstr || !is_Tvar(repr(ty))) { + return Curry._1(Types_Variance.get_upper, v); + } else { + return [ + true, + true + ]; + } + }), decl.type_params, decl.type_variance); return [ id.name, Stdlib__List.map2((function (ty, cocn) { - return [ - type_param(tree_of_typexp(false, ty)), - cocn - ]; - }), params, vari) + return [ + type_param(tree_of_typexp(false, ty)), + cocn + ]; + }), params, vari) ]; }; const tree_of_manifest = function (ty1) { @@ -46636,13 +46636,13 @@ function tree_of_extension_constructor(id, ext, es) { Stdlib__List.iter(mark_loops, ext.ext_args); may(mark_loops, ext.ext_ret_type); const ty_params$1 = Stdlib__List.map((function (ty) { - let param = tree_of_typexp(false, ty); - if (/* tag */typeof param === "number" || typeof param === "string" || param.TAG !== /* Otyp_var */10) { - return "?"; - } else { - return param._1; - } - }), ty_params); + let param = tree_of_typexp(false, ty); + if (/* tag */typeof param === "number" || typeof param === "string" || param.TAG !== /* Otyp_var */10) { + return "?"; + } else { + return param._1; + } + }), ty_params); const name$1 = id.name; const res = ext.ext_ret_type; let match; @@ -46651,8 +46651,8 @@ function tree_of_extension_constructor(id, ext, es) { names.contents = /* [] */0; const ret = tree_of_typexp(false, res); const args = Stdlib__List.map((function (param) { - return tree_of_typexp(false, param); - }), ext.ext_args); + return tree_of_typexp(false, param); + }), ext.ext_args); names.contents = nm; match = [ args, @@ -46661,8 +46661,8 @@ function tree_of_extension_constructor(id, ext, es) { } else { match = [ Stdlib__List.map((function (param) { - return tree_of_typexp(false, param); - }), ext.ext_args), + return tree_of_typexp(false, param); + }), ext.ext_args), undefined ]; } @@ -46757,8 +46757,8 @@ function prepare_class_type(params, _sign) { const tyl = sign._1; const 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 (param) { - return deep_occur(sty, param); - }), tyl))) { + return deep_occur(sty, param); + }), tyl))) { return Stdlib__List.iter(mark_loops, tyl); } _sign = cty; @@ -46777,11 +46777,11 @@ function prepare_class_type(params, _sign) { } const match = flatten_fields(object_fields(sign$1.csig_self)); Stdlib__List.iter((function (met) { - mark_loops(method_type(met)[0]); - }), match[0]); + mark_loops(method_type(met)[0]); + }), match[0]); return Curry._2(Meths.iter, (function (param, param$1) { - mark_loops(param$1[2]); - }), sign$1.csig_vars); + mark_loops(param$1[2]); + }), sign$1.csig_vars); case /* Cty_arrow */2 : mark_loops(sign._1); _sign = sign._2; @@ -46803,8 +46803,8 @@ function tree_of_class_type(sch, params, _sign) { TAG: /* Octy_constr */0, _0: tree_of_path(sign._0), _1: Stdlib__List.map((function (param) { - return tree_of_typexp(true, param); - }), sign._1) + return tree_of_typexp(true, param); + }), sign._1) }; } _sign = cty; @@ -46819,66 +46819,66 @@ function tree_of_class_type(sch, params, _sign) { }) : undefined; const match = flatten_fields(object_fields(sign$1.csig_self)); const csil = Stdlib__List.fold_left((function (csil, param) { - return { - hd: { - TAG: /* Ocsg_constraint */0, - _0: param[0], - _1: param[1] - }, - tl: csil - }; - }), /* [] */0, tree_of_constraints(params)); + return { + hd: { + TAG: /* Ocsg_constraint */0, + _0: param[0], + _1: param[1] + }, + tl: csil + }; + }), /* [] */0, tree_of_constraints(params)); const all_vars = Curry._3(Meths.fold, (function (l, param, all) { - return { - hd: [ - l, - param[0], - param[1], - param[2] - ], - tl: all - }; - }), sign$1.csig_vars, /* [] */0); + return { + hd: [ + l, + param[0], + param[1], + param[2] + ], + tl: all + }; + }), sign$1.csig_vars, /* [] */0); const all_vars$1 = Stdlib__List.rev(all_vars); const csil$1 = Stdlib__List.fold_left((function (csil, param) { - return { - hd: { - TAG: /* Ocsg_value */2, - _0: param[0], - _1: param[1] === /* Mutable */1, - _2: param[2] === /* Virtual */0, - _3: tree_of_typexp(sch, param[3]) - }, - tl: csil - }; - }), csil, all_vars$1); + return { + hd: { + TAG: /* Ocsg_value */2, + _0: param[0], + _1: param[1] === /* Mutable */1, + _2: param[2] === /* Virtual */0, + _3: tree_of_typexp(sch, param[3]) + }, + tl: csil + }; + }), csil, all_vars$1); const partial_arg = sign$1.csig_concr; const csil$2 = Stdlib__List.fold_left((function (param, param$1) { - const lab = param$1[0]; - if (lab === dummy_method) { - return param; - } - const kind = field_kind_repr(param$1[1]); - const priv = Caml_obj.caml_notequal(kind, /* Fpresent */0); - const virt = !Curry._2(mem$2, lab, partial_arg); - const match = method_type([ - lab, - kind, - param$1[2] - ]); - const tty = tree_of_typexp(sch, match[0]); - remove_names(match[1]); - return { - hd: { - TAG: /* Ocsg_method */1, - _0: lab, - _1: priv, - _2: virt, - _3: tty - }, - tl: param - }; - }), csil$1, match[0]); + const lab = param$1[0]; + if (lab === dummy_method) { + return param; + } + const kind = field_kind_repr(param$1[1]); + const priv = Caml_obj.caml_notequal(kind, /* Fpresent */0); + const virt = !Curry._2(mem$2, lab, partial_arg); + const match = method_type([ + lab, + kind, + param$1[2] + ]); + const tty = tree_of_typexp(sch, match[0]); + remove_names(match[1]); + return { + hd: { + TAG: /* Ocsg_method */1, + _0: lab, + _1: priv, + _2: virt, + _3: tty + }, + tl: param + }; + }), csil$1, match[0]); return { TAG: /* Octy_signature */2, _0: self_ty, @@ -46945,11 +46945,11 @@ function tree_of_class_param(param, variance) { function class_variance(param) { return Stdlib__List.map((function (v) { - return [ - Curry._2(Types_Variance.mem, /* May_pos */0, v), - Curry._2(Types_Variance.mem, /* May_neg */1, v) - ]; - }), param); + return [ + Curry._2(Types_Variance.mem, /* May_pos */0, v), + Curry._2(Types_Variance.mem, /* May_neg */1, v) + ]; + }), param); } function tree_of_class_declaration(id, cl, rs) { @@ -46994,15 +46994,15 @@ function tree_of_cltype_declaration(id, cl, rs) { const sign = signature_of_class_type(cl.clty_type); const match = flatten_fields(object_fields(sign.csig_self)); const virt = Stdlib__List.exists((function (param) { - const 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) { - return true; - } else { - return b; - } - }), sign.csig_vars, false); + const 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) { + return true; + } else { + return b; + } + }), sign.csig_vars, false); return { TAG: /* Osig_class_type */1, _0: virt, @@ -47145,11 +47145,11 @@ function hide_rec_items(param) { tl: ids_1 }; set_printing_env(Stdlib__List.fold_right((function (id) { - const partial_arg = rename(id); - return function (param) { - return add_type$1(false, partial_arg, dummy, param); - }; - }), ids, printing_env.contents)); + const partial_arg = rename(id); + return function (param) { + return add_type$1(false, partial_arg, dummy, param); + }; + }), ids, printing_env.contents)); } function tree_of_modtype(p) { @@ -47172,8 +47172,8 @@ function tree_of_modtype(p) { if (ty_arg !== undefined) { const partial_arg = true; res = wrap_env((function (param$1) { - return add_module$1(partial_arg, param, ty_arg, param$1); - }), tree_of_modtype, ty_res); + return add_module$1(partial_arg, param, ty_arg, param$1); + }), tree_of_modtype, ty_res); } else { res = tree_of_modtype(ty_res); } @@ -47195,10 +47195,10 @@ function tree_of_modtype(p) { function tree_of_signature(sg) { const partial_arg = printing_env.contents; return wrap_env((function (env) { - return env; - }), (function (param) { - return tree_of_signature_rec(partial_arg, false, param); - }), sg); + return env; + }), (function (param) { + return tree_of_signature_rec(partial_arg, false, param); + }), sg); } function tree_of_signature_rec(env$p, in_type_group, param) { @@ -47656,12 +47656,12 @@ function trace(fst, txt, ppf, param) { }, _1: "@[Type@;<1 2>%a@ %s@;<1 2>%a@] %a" }), (function (param, param$1) { - return type_expansion(t1, param, param$1); - }), match$2[1], txt, (function (param, param$1) { - return type_expansion(t2, param, param$1); - }), match$1[1], (function (param, param$1) { - return trace(false, txt, param, param$1); - }), match.tl); + return type_expansion(t1, param, param$1); + }), match$2[1], txt, (function (param, param$1) { + return type_expansion(t2, param, param$1); + }), match$1[1], (function (param, param$1) { + return trace(false, txt, param, param$1); + }), match.tl); } function filter_trace(keep_last, param) { @@ -47728,8 +47728,8 @@ function type_path_list(ppf, param) { }, _1: "%a@;<2 0>%a" }), (function (param, param$1) { - return type_path_expansion(tp, param, param$1); - }), match[1], type_path_list, param.tl); + return type_path_expansion(tp, param, param$1); + }), match[1], type_path_list, param.tl); } else { return type_path_expansion(tp, ppf, match[1]); } @@ -47829,33 +47829,33 @@ function print_tags(ppf, fields) { _1: "`%s" }), fields.hd[0]); return Stdlib__List.iter((function (param) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Char_literal */12, + _0: /* '`' */96, _1: { - TAG: /* Char_literal */12, - _0: /* '`' */96, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 } } - }, - _1: ",@ `%s" - }), param[0]); - }), fields.tl); + } + }, + _1: ",@ `%s" + }), param[0]); + }), fields.tl); } } @@ -48976,96 +48976,95 @@ function trace_same_names(_param) { function report_unification_error(ppf, env, unifOpt, tr, txt1, txt2) { const unif = unifOpt !== undefined ? unifOpt : true; wrap_printing_env(env, (function (param) { - reset(undefined); - trace_same_names(tr); - const tr$1 = Stdlib__List.map((function (param) { - return [ - param[0], - hide_variant_name(param[1]) - ]; - }), tr); - const mis = mismatch(unif, tr$1); - if (tr$1) { - const match = tr$1.tl; - if (match) { - try { - const tr$2 = filter_trace(mis === undefined, match.tl); - const match$1 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), tr$1.hd); - const t1 = match$1[0]; - const match$2 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), match.hd); - const t2 = match$2[0]; - print_labels.contents = !classic.contents; - const tr$3 = Stdlib__List.map(prepare_expansion, tr$2); - Curry.app(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + reset(undefined); + trace_same_names(tr); + const tr$1 = Stdlib__List.map((function (param) { + return [ + param[0], + hide_variant_name(param[1]) + ]; + }), tr); + const mis = mismatch(unif, tr$1); + if (tr$1) { + const match = tr$1.tl; + if (match) { + try { + const tr$2 = filter_trace(mis === undefined, match.tl); + const match$1 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), tr$1.hd); + const t1 = match$1[0]; + const match$2 = may_prepare_expansion(Caml_obj.caml_equal(tr$2, /* [] */0), match.hd); + const t2 = match$2[0]; + print_labels.contents = !classic.contents; + const tr$3 = Stdlib__List.map(prepare_expansion, tr$2); + Curry.app(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { TAG: /* Formatting_gen */18, _0: { TAG: /* Open_box */1, _0: { TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" + _0: /* End_of_format */0, + _1: "" } }, _1: { - TAG: /* Formatting_gen */18, + TAG: /* Theta */16, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* Theta */16, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Theta */16, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Theta */16, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Theta */16, _0: { - TAG: /* Theta */16, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -49077,43 +49076,34 @@ function report_unification_error(ppf, env, unifOpt, tr, txt1, txt2) { } } } - }, - _1: "@[@[%t@;<1 2>%a@ %t@;<1 2>%a@]%a%t@]" - }), [ - txt1, - (function (param, param$1) { - return type_expansion(t1, param, param$1); - }), - match$1[1], - txt2, - (function (param, param$1) { - return type_expansion(t2, param, param$1); - }), - match$2[1], - (function (param, param$1) { - return trace(false, "is not compatible with type", param, param$1); - }), - tr$3, - (function (param) { - return explanation(unif, mis, param); - }) - ]); - print_labels.contents = true; - return; - } - catch (exn){ - print_labels.contents = true; - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - } else { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 36921, - 20 - ] - }); + } + }, + _1: "@[@[%t@;<1 2>%a@ %t@;<1 2>%a@]%a%t@]" + }), [ + txt1, + (function (param, param$1) { + return type_expansion(t1, param, param$1); + }), + match$1[1], + txt2, + (function (param, param$1) { + return type_expansion(t2, param, param$1); + }), + match$2[1], + (function (param, param$1) { + return trace(false, "is not compatible with type", param, param$1); + }), + tr$3, + (function (param) { + return explanation(unif, mis, param); + }) + ]); + print_labels.contents = true; + return; + } + catch (exn){ + print_labels.contents = true; + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -49125,7 +49115,17 @@ function report_unification_error(ppf, env, unifOpt, tr, txt1, txt2) { ] }); } - })); + } else { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 36921, + 20 + ] + }); + } + })); } function trace$1(fst, keep_last, txt, ppf, tr) { @@ -49205,81 +49205,80 @@ function include_err(ppf, lab) { }); case /* CM_Type_parameter_mismatch */1 : return report_unification_error(ppf, lab._0, false, lab._1, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "A type parameter has type", - _1: /* End_of_format */0 - }, - _1: "A type parameter has type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is expected to have type", - _1: /* End_of_format */0 - }, - _1: "but is expected to have type" - }); - })); + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "A type parameter has type", + _1: /* End_of_format */0 + }, + _1: "A type parameter has type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is expected to have type", + _1: /* End_of_format */0 + }, + _1: "but is expected to have type" + }); + })); case /* CM_Class_type_mismatch */2 : const cty2 = lab._2; const cty1 = lab._1; return wrap_printing_env(lab._0, (function (param) { - Curry._5(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + Curry._5(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The class type", _1: { - TAG: /* String_literal */11, - _0: "The class type", + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -49287,112 +49286,113 @@ function include_err(ppf, lab) { } } } - }, - _1: "@[The class type@;<1 2>%a@ %s@;<1 2>%a@]" - }), class_type$2, cty1, "is not matched by the class type", class_type$2, cty2); - })); + } + }, + _1: "@[The class type@;<1 2>%a@ %s@;<1 2>%a@]" + }), class_type$2, cty1, "is not matched by the class type", class_type$2, cty2); + })); case /* CM_Parameter_mismatch */3 : return report_unification_error(ppf, lab._0, false, lab._1, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "A parameter has type", - _1: /* End_of_format */0 - }, - _1: "A parameter has type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is expected to have type", - _1: /* End_of_format */0 - }, - _1: "but is expected to have type" - }); - })); + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "A parameter has type", + _1: /* End_of_format */0 + }, + _1: "A parameter has type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is expected to have type", + _1: /* End_of_format */0 + }, + _1: "but is expected to have type" + }); + })); case /* CM_Val_type_mismatch */4 : const lab$1 = lab._0; return report_unification_error(ppf, lab._1, false, lab._2, (function (ppf) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The instance variable ", + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The instance variable ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "has type", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: "has type", + _1: /* End_of_format */0 } } - }, - _1: "The instance variable %s@ has type" - }), lab$1); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is expected to have type", - _1: /* End_of_format */0 - }, - _1: "but is expected to have type" - }); - })); + } + }, + _1: "The instance variable %s@ has type" + }), lab$1); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is expected to have type", + _1: /* End_of_format */0 + }, + _1: "but is expected to have type" + }); + })); case /* CM_Meth_type_mismatch */5 : const lab$2 = lab._0; return report_unification_error(ppf, lab._1, false, lab._2, (function (ppf) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The method ", + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The method ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "has type", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: "has type", + _1: /* End_of_format */0 } } - }, - _1: "The method %s@ has type" - }), lab$2); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is expected to have type", - _1: /* End_of_format */0 - }, - _1: "but is expected to have type" - }); - })); + } + }, + _1: "The method %s@ has type" + }), lab$2); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is expected to have type", + _1: /* End_of_format */0 + }, + _1: "but is expected to have type" + }); + })); case /* CM_Non_mutable_value */6 : return Curry._1(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -49677,24 +49677,24 @@ function report_error$3(ppf, param) { } const print_errs = function (ppf, errs) { Stdlib__List.iter((function (err) { - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "@ %a" - }), include_err, err); - }), errs); + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "@ %a" + }), include_err, err); + }), errs); }; Curry._4(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -49821,11 +49821,11 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { return false; } const match$6 = Stdlib__List.split(Stdlib__List.map((function (param) { - return [ - param[2], - param[4] - ]; - }), match$5[0])); + return [ + param[2], + param[4] + ]; + }), match$5[0])); return equal$5(env, true, Stdlib.$at(params1, match$6[0]), Stdlib.$at(params2, match$6[1])); } @@ -49869,88 +49869,88 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { return false; } if (!Stdlib__List.for_all((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Rpresent */0) { - return true; - } else { - return false; - } - }), match$9[1])) { + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Rpresent */0) { + return true; + } else { + return false; + } + }), match$9[1])) { return false; } const to_equal = { contents: Stdlib__List.combine(params1, params2) }; if (!Stdlib__List.for_all((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - const match$1 = row_field_repr_aux(/* [] */0, param[2]); - if (/* tag */typeof match === "number" || typeof match === "string") { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Rpresent */0) { - return true; - } else { - return false; - } + const match = row_field_repr_aux(/* [] */0, param[1]); + const match$1 = row_field_repr_aux(/* [] */0, param[2]); + if (/* tag */typeof match === "number" || typeof match === "string") { + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Rpresent */0) { + return true; + } else { + return false; } - if (match.TAG === /* Rpresent */0) { - const t1 = match._0; - if (t1 === undefined) { - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { - return false; - } else if (match$1.TAG === /* Rpresent */0) { - return match$1._0 === undefined; - } else if (match$1._0 && !match$1._1) { - return true; - } else { - return false; - } - } - let t2; + } + if (match.TAG === /* Rpresent */0) { + const t1 = match._0; + if (t1 === undefined) { if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { return false; - } - if (match$1.TAG === /* Rpresent */0) { - const t2$1 = match$1._0; - if (t2$1 === undefined) { - return false; - } - t2 = t2$1; + } else if (match$1.TAG === /* Rpresent */0) { + return match$1._0 === undefined; + } else if (match$1._0 && !match$1._1) { + return true; } else { - if (match$1._0) { - return false; - } - const match$2 = match$1._1; - if (!match$2) { - return false; - } - if (match$2.tl) { - return false; - } - t2 = match$2.hd; + return false; } - to_equal.contents = { - hd: [ - t1, - t2 - ], - tl: to_equal.contents - }; - return true; } - const tl1 = match._1; + let t2; if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { return false; } if (match$1.TAG === /* Rpresent */0) { - return false; - } - const 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; + const t2$1 = match$1._0; + if (t2$1 === undefined) { + return false; + } + t2 = t2$1; } else { - return false; + if (match$1._0) { + return false; + } + const match$2 = match$1._1; + if (!match$2) { + return false; + } + if (match$2.tl) { + return false; + } + t2 = match$2.hd; } - }), match$9[2])) { + to_equal.contents = { + hd: [ + t1, + t2 + ], + tl: to_equal.contents + }; + return true; + } + const tl1 = match._1; + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string") { + return false; + } + if (match$1.TAG === /* Rpresent */0) { + return false; + } + const 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; + } else { + return false; + } + }), match$9[2])) { return false; } const match$10 = Stdlib__List.split(to_equal.contents); @@ -49993,218 +49993,224 @@ function type_manifest(env, ty1, params1, ty2, params2, priv2) { function report_type_mismatch(first, second, decl, ppf) { return function (param) { return Stdlib__List.iter((function (err) { - if (Caml_obj.caml_equal(err, /* Manifest */4)) { - return; - } else { - return Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + if (Caml_obj.caml_equal(err, /* Manifest */4)) { + return; + } else { + return Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* '.' */46, + _1: /* End_of_format */0 } - }, - _1: "@ %a." - }), (function (param, param$1) { - if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { - switch (param$1) { - case /* Arity */0 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "They have different arities", - _1: /* End_of_format */0 - }, - _1: "They have different arities" - }); - case /* Privacy */1 : - return Stdlib__Format.fprintf(param)({ + } + }, + _1: "@ %a." + }), (function (param, param$1) { + if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { + switch (param$1) { + case /* Arity */0 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "They have different arities", + _1: /* End_of_format */0 + }, + _1: "They have different arities" + }); + case /* Privacy */1 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "A private type would be revealed", + _1: /* End_of_format */0 + }, + _1: "A private type would be revealed" + }); + case /* Kind */2 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Their kinds differ", + _1: /* End_of_format */0 + }, + _1: "Their kinds differ" + }); + case /* Constraint */3 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Their constraints differ", + _1: /* End_of_format */0 + }, + _1: "Their constraints differ" + }); + case /* Manifest */4 : + return; + case /* Variance */5 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Their variances do not agree", + _1: /* End_of_format */0 + }, + _1: "Their variances do not agree" + }); + + } + } else { + switch (param$1.TAG) { + case /* Field_type */0 : + return Curry._1(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "A private type would be revealed", - _1: /* End_of_format */0 + _0: "The types for field ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " are not equal", + _1: /* End_of_format */0 + } + } }, - _1: "A private type would be revealed" - }); - case /* Kind */2 : - return Stdlib__Format.fprintf(param)({ + _1: "The types for field %s are not equal" + }), param$1._0.name); + case /* Field_mutable */1 : + return Curry._1(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "Their kinds differ", - _1: /* End_of_format */0 + _0: "The mutability of field ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " is different", + _1: /* End_of_format */0 + } + } }, - _1: "Their kinds differ" - }); - case /* Constraint */3 : - return Stdlib__Format.fprintf(param)({ + _1: "The mutability of field %s is different" + }), param$1._0.name); + case /* Field_arity */2 : + return Curry._1(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "Their constraints differ", - _1: /* End_of_format */0 + _0: "The arities for field ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " differ", + _1: /* End_of_format */0 + } + } }, - _1: "Their constraints differ" - }); - case /* Manifest */4 : - return; - case /* Variance */5 : - return Stdlib__Format.fprintf(param)({ + _1: "The arities for field %s differ" + }), param$1._0.name); + case /* Field_names */3 : + return Curry._3(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "Their variances do not agree", - _1: /* End_of_format */0 - }, - _1: "Their variances do not agree" - }); - - } - } else { - switch (param$1.TAG) { - case /* Field_type */0 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The types for field ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " are not equal", - _1: /* End_of_format */0 - } - } - }, - _1: "The types for field %s are not equal" - }), param$1._0.name); - case /* Field_mutable */1 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The mutability of field ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is different", - _1: /* End_of_format */0 - } - } - }, - _1: "The mutability of field %s is different" - }), param$1._0.name); - case /* Field_arity */2 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _0: "Fields number ", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* String_literal */11, - _0: "The arities for field ", + _0: " have different names, ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " differ", - _1: /* End_of_format */0 - } - } - }, - _1: "The arities for field %s differ" - }), param$1._0.name); - case /* Field_names */3 : - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Fields number ", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " have different names, ", + _0: " and ", _1: { TAG: /* String */2, _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " and ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - } + _1: /* End_of_format */0 } } } - }, - _1: "Fields number %i have different names, %s and %s" - }), param$1._0, param$1._1.name, param$1._2.name); - case /* Field_missing */4 : - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + } + } + }, + _1: "Fields number %i have different names, %s and %s" + }), param$1._0, param$1._1.name, param$1._2.name); + case /* Field_missing */4 : + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The field ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "The field ", + _0: " is only present in ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " is only present in ", + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { TAG: /* String */2, _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - } + _1: /* End_of_format */0 } } } - }, - _1: "The field %s is only present in %s %s" - }), param$1._1.name, param$1._0 ? second : first, decl); - case /* Record_representation */5 : - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "The field %s is only present in %s %s" + }), param$1._1.name, param$1._0 ? second : first, decl); + case /* Record_representation */5 : + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Their internal representations differ:", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: "Their internal representations differ:", + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { TAG: /* String */2, _0: /* No_padding */0, @@ -50214,28 +50220,22 @@ function report_type_mismatch(first, second, decl, ppf) { _1: { TAG: /* String */2, _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - } + _1: /* End_of_format */0 } } } } - }, - _1: "Their internal representations differ:@ %s %s %s" - }), param$1._0 ? second : first, decl, "uses unboxed float representation"); - - } - } - }), err); - } - }), param); + } + } + }, + _1: "Their internal representations differ:@ %s %s %s" + }), param$1._0 ? second : first, decl, "uses unboxed float representation"); + + } + } + }), err); + } + }), param); }; } @@ -50332,14 +50332,14 @@ function compare_variants(env, decl1, decl2, _n, _cstrs1, _cstrs2) { }; } if (!for_all2((function (ty1, ty2) { - return equal$5(env, true, { - hd: ty1, - tl: decl1.type_params - }, { - hd: ty2, - tl: decl2.type_params - }); - }), arg1, arg2)) { + return equal$5(env, true, { + hd: ty1, + tl: decl1.type_params + }, { + hd: ty2, + tl: decl2.type_params + }); + }), arg1, arg2)) { return { hd: { TAG: /* Field_type */0, @@ -50487,8 +50487,8 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { const cstrs2 = match$1._0; const mark = function (cstrs, usage, name, decl) { Stdlib__List.iter((function (c) { - mark_constructor_used(usage, env, name, decl, c.cd_id.name); - }), cstrs); + mark_constructor_used(usage, env, name, decl, c.cd_id.name); + }), cstrs); }; const usage = decl1.type_private === /* Private */0 || decl2.type_private === /* Public */1 ? /* Positive */0 : /* Privatize */2; mark(cstrs1, usage, name, decl1); @@ -50551,29 +50551,29 @@ function type_declarations$1(equalityOpt, env, name, decl1, id, decl2) { const abstr = decl2.type_private === /* Private */0 || Caml_obj.caml_equal(decl2.type_kind, /* Type_abstract */0) && decl2.type_manifest === undefined; const opn = Caml_obj.caml_equal(decl2.type_kind, /* Type_open */1) && decl2.type_manifest === undefined; if (Stdlib__List.for_all2((function (ty, param) { - const v2 = param[1]; - const v1 = param[0]; - const match = Curry._1(Types_Variance.get_upper, v1); - const cn1 = match[1]; - const co1 = match[0]; - const match$1 = Curry._1(Types_Variance.get_upper, v2); - const cn2 = match$1[1]; - const co2 = match$1[0]; - if (!( - abstr ? (!co1 || co2) && (!cn1 || cn2) : ( - opn || !is_Tvar(repr(ty)) ? co1 === co2 && cn1 === cn2 : true - ) - )) { - return false; - } - const match$2 = Curry._1(Types_Variance.get_lower, v1); - const 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 - ) : false - ) : true; - }), decl2.type_params, Stdlib__List.combine(decl1.type_variance, decl2.type_variance))) { + const v2 = param[1]; + const v1 = param[0]; + const match = Curry._1(Types_Variance.get_upper, v1); + const cn1 = match[1]; + const co1 = match[0]; + const match$1 = Curry._1(Types_Variance.get_upper, v2); + const cn2 = match$1[1]; + const co2 = match$1[0]; + if (!( + abstr ? (!co1 || co2) && (!cn1 || cn2) : ( + opn || !is_Tvar(repr(ty)) ? co1 === co2 && cn1 === cn2 : true + ) + )) { + return false; + } + const match$2 = Curry._1(Types_Variance.get_lower, v1); + const 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 + ) : false + ) : true; + }), decl2.type_params, Stdlib__List.combine(decl1.type_variance, decl2.type_variance))) { return /* [] */0; } else { return { @@ -50637,14 +50637,14 @@ function extension_constructors(env, id, ext1, ext2) { } if (exit === 1) { tmp = for_all2((function (ty1, ty2) { - return equal$5(env, true, { - hd: ty1, - tl: ext1.ext_type_params - }, { - hd: ty2, - tl: ext2.ext_type_params - }); - }), ext1.ext_args, ext2.ext_args); + return equal$5(env, true, { + hd: ty1, + tl: ext1.ext_type_params + }, { + hd: ty2, + tl: ext2.ext_type_params + }); + }), ext1.ext_args, ext2.ext_args); } if (!tmp) { return false; @@ -50870,8 +50870,8 @@ function nondep_supertype(env, mid, mty) { TAG: /* Mty_functor */2, _0: param, _1: may_map((function (param) { - return nondep_mty(env, var_inv, param); - }), arg), + return nondep_mty(env, var_inv, param); + }), arg), _2: nondep_mty(add_module$1(true, param, arg !== undefined ? arg : ({ TAG: /* Mty_signature */1, _0: /* [] */0 @@ -51012,8 +51012,8 @@ function nondep_supertype(env, mid, mty) { const nondep_modtype_decl = function (env, mtd) { return { mtd_type: may_map((function (param) { - return nondep_mty(env, /* Strict */2, param); - }), mtd.mtd_type), + return nondep_mty(env, /* Strict */2, param); + }), mtd.mtd_type), mtd_attributes: mtd.mtd_attributes, mtd_loc: mtd.mtd_loc }; @@ -51065,42 +51065,42 @@ function enrich_modtype(env, p, mty) { return { TAG: /* Mty_signature */1, _0: Stdlib__List.map((function (param) { - switch (param.TAG) { - case /* Sig_type */1 : - const id = param._0; - return { - TAG: /* Sig_type */1, - _0: id, - _1: enrich_typedecl(env, { + switch (param.TAG) { + case /* Sig_type */1 : + const id = param._0; + return { + TAG: /* Sig_type */1, + _0: id, + _1: enrich_typedecl(env, { + TAG: /* Pdot */1, + _0: p, + _1: id.name, + _2: -1 + }, param._1), + _2: param._2 + }; + case /* Sig_module */3 : + const md = param._1; + const id$1 = param._0; + return { + TAG: /* Sig_module */3, + _0: id$1, + _1: { + md_type: enrich_modtype(env, { TAG: /* Pdot */1, _0: p, - _1: id.name, + _1: id$1.name, _2: -1 - }, param._1), - _2: param._2 - }; - case /* Sig_module */3 : - const md = param._1; - const id$1 = param._0; - return { - TAG: /* Sig_module */3, - _0: id$1, - _1: { - md_type: enrich_modtype(env, { - TAG: /* Pdot */1, - _0: p, - _1: id$1.name, - _2: -1 - }, md.md_type), - md_attributes: md.md_attributes, - md_loc: md.md_loc - }, - _2: param._2 - }; - default: - return param; - } - }), mty._0) + }, md.md_type), + md_attributes: md.md_attributes, + md_loc: md.md_loc + }, + _2: param._2 + }; + default: + return param; + } + }), mty._0) }; } else { return mty; @@ -51208,38 +51208,38 @@ function contains_type(env, _path) { function contains_type_sig(env) { return function (param) { return Stdlib__List.iter((function (param) { - switch (param.TAG) { - case /* Sig_type */1 : - const match = param._1; - if (match.type_manifest !== undefined) { - let tmp = match.type_kind; - if (!/* tag */(typeof tmp === "number" || typeof tmp === "string")) { - return; - } - if (tmp !== /* Type_abstract */0) { - return; - } - if (match.type_private !== /* Private */0) { - return; - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); + switch (param.TAG) { + case /* Sig_type */1 : + const match = param._1; + if (match.type_manifest !== undefined) { + let tmp = match.type_kind; + if (!/* tag */(typeof tmp === "number" || typeof tmp === "string")) { + return; + } + if (tmp !== /* Type_abstract */0) { + return; + } + if (match.type_private !== /* Private */0) { + return; } - case /* Sig_module */3 : - return contains_type(env, param._1.md_type); - case /* Sig_modtype */4 : throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); - default: - return; - } - }), param); + } else { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + case /* Sig_module */3 : + return contains_type(env, param._1.md_type); + case /* Sig_modtype */4 : + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + default: + return; + } + }), param); }; } @@ -51992,20 +51992,20 @@ function collect_arg_paths(mty) { switch (p.TAG) { case /* Mty_signature */1 : return Stdlib__List.iter((function (param) { - if (param.TAG !== /* Sig_module */3) { - return; - } - const id$p = param._0; - subst.contents = Curry._3(add$10, { - TAG: /* Pdot */1, - _0: { - TAG: /* Pident */0, - _0: id - }, - _1: id$p.name, - _2: -1 - }, id$p, subst.contents); - }), p._0); + if (param.TAG !== /* Sig_module */3) { + return; + } + const id$p = param._0; + subst.contents = Curry._3(add$10, { + TAG: /* Pdot */1, + _0: { + TAG: /* Pident */0, + _0: id + }, + _1: id$p.name, + _2: -1 + }, id$p, subst.contents); + }), p._0); case /* Mty_ident */0 : case /* Mty_functor */2 : return; @@ -52035,8 +52035,8 @@ function collect_arg_paths(mty) { it_module_type(it, mty); it_module_type(unmark_iterators, mty); return Curry._3(fold$6, (function (p) { - return Curry._1(union$5, collect_ids(subst.contents, bindings.contents, p)); - }), paths.contents, /* Empty */0); + return Curry._1(union$5, collect_ids(subst.contents, bindings.contents, p)); + }), paths.contents, /* Empty */0); } function remove_aliases(env, excl, _mty) { @@ -52732,27 +52732,27 @@ function try_modtypes(env, cxt, subst, _mty1, mty2) { function signatures(env, cxt, subst, sig1, sig2) { const new_env = add_signature(sig1, in_signature(env)); const match = Stdlib__List.fold_left((function (param, item) { - const pos = param[1]; - const l = param[0]; - if (item.TAG === /* Sig_module */3) { - return [ - { - hd: [ - item._0, - pos, - /* Tcoerce_none */0 - ], - tl: l - }, - pos + 1 | 0 - ]; - } else { - return [ - l, - is_runtime_component(item) ? pos + 1 | 0 : pos - ]; - } - }), [ + const pos = param[1]; + const l = param[0]; + if (item.TAG === /* Sig_module */3) { + return [ + { + hd: [ + item._0, + pos, + /* Tcoerce_none */0 + ], + tl: l + }, + pos + 1 | 0 + ]; + } else { + return [ + l, + is_runtime_component(item) ? pos + 1 | 0 : pos + ]; + } + }), [ /* [] */0, 0 ], sig1); @@ -52785,12 +52785,12 @@ function signatures(env, cxt, subst, sig1, sig2) { const comps1 = match$1[1]; const len1 = match$1[0]; const len2 = Stdlib__List.fold_left((function (n, i) { - if (is_runtime_component(i)) { - return n + 1 | 0; - } else { - return n; - } - }), 0, sig2); + if (is_runtime_component(i)) { + return n + 1 | 0; + } else { + return n; + } + }), 0, sig2); const pair_components = function (subst, paired, _unpaired, _param) { while(true) { const param = _param; @@ -53350,10 +53350,10 @@ function include_err$1(ppf, path$1) { }, _1: "@[Values do not match:@ %a@;<1 -2>is not included in@ %a@]" }), (function (param, param$1) { - return value_description$1(id, param, param$1); - }), d1, (function (param, param$1) { - return value_description$1(id, param, param$1); - }), d2); + return value_description$1(id, param, param$1); + }), d1, (function (param, param$1) { + return value_description$1(id, param, param$1); + }), d2); return show_locs(ppf, [ d1.val_loc, d2.val_loc @@ -53458,13 +53458,13 @@ function include_err$1(ppf, path$1) { }), [ "Type declarations do not match", (function (param, param$1) { - return type_declaration$1(id$1, param, param$1); - }), + return type_declaration$1(id$1, param, param$1); + }), d1$1, "is not included in", (function (param, param$1) { - return type_declaration$1(id$1, param, param$1); - }), + return type_declaration$1(id$1, param, param$1); + }), d2$1, show_locs, [ @@ -53472,8 +53472,8 @@ function include_err$1(ppf, path$1) { d2$1.type_loc ], (function (param) { - return report_type_mismatch("the first", "the second", "declaration", param); - }), + return report_type_mismatch("the first", "the second", "declaration", param); + }), path$1._3 ]); case /* Extension_constructors */3 : @@ -53545,10 +53545,10 @@ function include_err$1(ppf, path$1) { }, _1: "@[Extension declarations do not match:@ %a@;<1 -2>is not included in@ %a@]" }), (function (param, param$1) { - return extension_constructor$1(id$2, param, param$1); - }), x1, (function (param, param$1) { - return extension_constructor$1(id$2, param, param$1); - }), x2); + return extension_constructor$1(id$2, param, param$1); + }), x1, (function (param, param$1) { + return extension_constructor$1(id$2, param, param$1); + }), x2); return show_locs(ppf, [ x1.ext_loc, x2.ext_loc @@ -53686,10 +53686,10 @@ function include_err$1(ppf, path$1) { }, _1: "@[Module type declarations do not match:@ %a@;<1 -2>does not match@ %a@]" }), (function (param, param$1) { - return modtype_declaration$1(id$3, param, param$1); - }), path$1._1, (function (param, param$1) { - return modtype_declaration$1(id$3, param, param$1); - }), path$1._2); + return modtype_declaration$1(id$3, param, param$1); + }), path$1._1, (function (param, param$1) { + return modtype_declaration$1(id$3, param, param$1); + }), path$1._2); case /* Interface_mismatch */6 : return Curry._2(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -53815,10 +53815,10 @@ function include_err$1(ppf, path$1) { }, _1: "@[Class type declarations do not match:@ %a@;<1 -2>does not match@ %a@]@ %a" }), (function (param, param$1) { - return cltype_declaration$1(id$4, param, param$1); - }), path$1._1, (function (param, param$1) { - return cltype_declaration$1(id$4, param, param$1); - }), path$1._2, report_error$3, path$1._3); + return cltype_declaration$1(id$4, param, param$1); + }), path$1._1, (function (param, param$1) { + return cltype_declaration$1(id$4, param, param$1); + }), path$1._2, report_error$3, path$1._3); case /* Class_declarations */8 : const id$5 = path$1._0; return Curry._6(Stdlib__Format.fprintf(ppf)({ @@ -53898,10 +53898,10 @@ function include_err$1(ppf, path$1) { }, _1: "@[Class declarations do not match:@ %a@;<1 -2>does not match@ %a@]@ %a" }), (function (param, param$1) { - return class_declaration$1(id$5, param, param$1); - }), path$1._1, (function (param, param$1) { - return class_declaration$1(id$5, param, param$1); - }), path$1._2, report_error$3, path$1._3); + return class_declaration$1(id$5, param, param$1); + }), path$1._1, (function (param, param$1) { + return class_declaration$1(id$5, param, param$1); + }), path$1._2, report_error$3, path$1._3); case /* Unbound_modtype_path */9 : return Curry._2(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -54327,8 +54327,8 @@ function context$1(ppf, cxt) { if (Caml_obj.caml_equal(cxt, /* [] */0)) { return; } else if (Stdlib__List.for_all((function (param) { - return param.TAG === /* Module */0 ? true : false; - }), cxt)) { + return param.TAG === /* Module */0 ? true : false; + }), cxt)) { return Curry._2(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { @@ -54411,37 +54411,37 @@ function include_err$2(ppf, param) { const err = param[2]; const cxt = param[0]; wrap_printing_env(param[1], (function (param) { - Curry._4(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, + TAG: /* Format */0, _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Alpha */15, _0: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } - }, - _1: "@[%a%a@]" - }), context$1, Stdlib__List.rev(cxt), include_err$1, err); - })); + } + }, + _1: "@[%a%a@]" + }), context$1, Stdlib__List.rev(cxt), include_err$1, err); + })); } const buffer = { @@ -54476,14 +54476,37 @@ function report_error$4(ppf, errs) { const print_errs = function (ppf) { return function (param) { return Stdlib__List.iter((function (param) { - if (is_big(param[2])) { - if (pe.contents) { - Stdlib__Format.fprintf(ppf)({ + if (is_big(param[2])) { + if (pe.contents) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "...", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: /* End_of_format */0 + } + }, + _1: "...@ " + }); + pe.contents = false; + return; + } else { + return; + } + } else { + return Curry._2(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { - TAG: /* String_literal */11, - _0: "...", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -54494,33 +54517,10 @@ function report_error$4(ppf, errs) { _1: /* End_of_format */0 } }, - _1: "...@ " - }); - pe.contents = false; - return; - } else { - return; - } - } else { - return Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } - }, - _1: "%a@ " - }), include_err$2, param); - } - }), param); + _1: "%a@ " + }), include_err$2, param); + } + }), param); }; }; Curry._4(Stdlib__Format.fprintf(ppf)({ @@ -55388,8 +55388,8 @@ function pretty_val(ppf, v) { }, _1: "@[(%a)@]" }), (function (param, param$1) { - return pretty_vals(",", param, param$1); - }), c._0); + return pretty_vals(",", param, param$1); + }), c._0); case /* Tpat_construct */4 : const match$1 = c._2; const cstr = c._1; @@ -55556,8 +55556,8 @@ function pretty_val(ppf, v) { }, _1: "@[<2>%s@ @[(%a)@]@]" }), name, (function (param, param$1) { - return pretty_vals(",", param, param$1); - }), vs); + return pretty_vals(",", param, param$1); + }), vs); break; case /* Tpat_variant */5 : const w = c._1; @@ -55654,13 +55654,13 @@ function pretty_val(ppf, v) { }, _1: "@[{%a}@]" }), pretty_lvals, Stdlib__List.filter((function (param) { - let tmp = param[2].pat_desc; - if (/* tag */typeof tmp === "number" || typeof tmp === "string") { - return false; - } else { - return true; - } - }), c._0)); + let tmp = param[2].pat_desc; + if (/* tag */typeof tmp === "number" || typeof tmp === "string") { + return false; + } else { + return true; + } + }), c._0)); case /* Tpat_array */7 : return Curry._2(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -55693,8 +55693,8 @@ function pretty_val(ppf, v) { }, _1: "@[[| %a |]@]" }), (function (param, param$1) { - return pretty_vals(" ;", param, param$1); - }), c._0); + return pretty_vals(" ;", param, param$1); + }), c._0); case /* Tpat_or */8 : return Curry._4(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -55965,8 +55965,8 @@ function pretty_vals(sep, ppf, param) { }, _1: "%a%s@ %a" }), pretty_val, v, sep, (function (param, param$1) { - return pretty_vals(sep, param, param$1); - }), param.tl); + return pretty_vals(sep, param, param$1); + }), param.tl); } else { return pretty_val(ppf, v); } @@ -56173,8 +56173,8 @@ function record_arg(p) { function get_field(pos, arg) { return Stdlib__List.find((function (param) { - return pos === param[1].lbl_pos; - }), arg)[2]; + return pos === param[1].lbl_pos; + }), arg)[2]; } function simple_match_args(p1, _p2) { @@ -56204,17 +56204,17 @@ function simple_match_args(p1, _p2) { let omegas = record_arg(p1); let arg$1 = args._0; return Stdlib__List.map((function (param) { - try { - return get_field(param[1].lbl_pos, arg$1); - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return omega; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + try { + return get_field(param[1].lbl_pos, arg$1); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return omega; } - }), omegas); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), omegas); case /* Tpat_tuple */3 : case /* Tpat_array */7 : return args._0; @@ -56236,12 +56236,12 @@ function simple_match_args(p1, _p2) { switch (args$1.TAG) { case /* Tpat_tuple */3 : return Stdlib__List.map((function (param) { - return omega; - }), args$1._0); + return omega; + }), args$1._0); case /* Tpat_construct */4 : return Stdlib__List.map((function (param) { - return omega; - }), args$1._2); + return omega; + }), args$1._2); case /* Tpat_variant */5 : if (args$1._1 !== undefined) { return { @@ -56253,12 +56253,12 @@ function simple_match_args(p1, _p2) { } case /* Tpat_record */6 : return Stdlib__List.map((function (param) { - return omega; - }), args$1._0); + return omega; + }), args$1._0); case /* Tpat_array */7 : return Stdlib__List.map((function (param) { - return omega; - }), args$1._0); + return omega; + }), args$1._0); case /* Tpat_lazy */9 : return { hd: omega, @@ -56289,8 +56289,8 @@ function normalize_pat(_q) { return make_pat({ TAG: /* Tpat_tuple */3, _0: Stdlib__List.map((function (param) { - return omega; - }), args._0) + return omega; + }), args._0) }, q.pat_type, q.pat_env); case /* Tpat_construct */4 : return make_pat({ @@ -56298,36 +56298,36 @@ function normalize_pat(_q) { _0: args._0, _1: args._1, _2: Stdlib__List.map((function (param) { - return omega; - }), args._2) + return omega; + }), args._2) }, q.pat_type, q.pat_env); case /* Tpat_variant */5 : return make_pat({ TAG: /* Tpat_variant */5, _0: args._0, _1: may_map((function (param) { - return omega; - }), args._1), + return omega; + }), args._1), _2: args._2 }, q.pat_type, q.pat_env); case /* Tpat_record */6 : return make_pat({ TAG: /* Tpat_record */6, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - omega - ]; - }), args._0), + return [ + param[0], + param[1], + omega + ]; + }), args._0), _1: args._1 }, q.pat_type, q.pat_env); case /* Tpat_array */7 : return make_pat({ TAG: /* Tpat_array */7, _0: Stdlib__List.map((function (param) { - return omega; - }), args._0) + return omega; + }), args._0) }, q.pat_type, q.pat_env); case /* Tpat_or */8 : return fatal_error("Parmatch.normalize_pat"); @@ -56378,26 +56378,26 @@ function discr_pat(q, pss) { continue; case /* Tpat_record */6 : const new_omegas = Stdlib__List.fold_right((function (param, r) { - const lbl = param[1]; - try { - get_field(lbl.lbl_pos, r); - return r; - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return { - hd: [ - param[0], - lbl, - omega - ], - tl: r - }; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + const lbl = param[1]; + try { + get_field(lbl.lbl_pos, r); + return r; + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return { + hd: [ + param[0], + lbl, + omega + ], + tl: r + }; } - }), match$1._0, record_arg(acc)); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), match$1._0, record_arg(acc)); _pss = pss$1.tl; _acc = make_pat({ TAG: /* Tpat_record */6, @@ -56527,29 +56527,29 @@ function do_set_args(erase_mutable, q, r) { hd: make_pat({ TAG: /* Tpat_record */6, _0: Stdlib__List.map2((function (param, arg) { - const lbl = param[1]; - const lid = param[0]; - let tmp = false; - if (erase_mutable) { - const match = lbl.lbl_mut; - let tmp$1; - tmp$1 = match === /* Immutable */0 ? false : true; - tmp = tmp$1; - } - if (tmp) { - return [ - lid, - lbl, - omega - ]; - } else { - return [ - lid, - lbl, - arg - ]; - } - }), omegas$1, match$3[0]), + const lbl = param[1]; + const lid = param[0]; + let tmp = false; + if (erase_mutable) { + const match = lbl.lbl_mut; + let tmp$1; + tmp$1 = match === /* Immutable */0 ? false : true; + tmp = tmp$1; + } + if (tmp) { + return [ + lid, + lbl, + omega + ]; + } else { + return [ + lid, + lbl, + arg + ]; + } + }), omegas$1, match$3[0]), _1: omegas._1 }, q.pat_type, q.pat_env), tl: match$3[1] @@ -56860,15 +56860,15 @@ function filter_all(pat0, pss) { const ps$1 = match$1.tl; _param = param.tl; _env = Stdlib__List.map((function (param) { - const q = param[0]; - return [ - q, - { - hd: Stdlib.$at(simple_match_args(q, omega), ps$1), - tl: param[1] - } - ]; - }), env); + const q = param[0]; + return [ + q, + { + hd: Stdlib.$at(simple_match_args(q, omega), ps$1), + tl: param[1] + } + ]; + }), env); continue; } _param = param.tl; @@ -56954,14 +56954,14 @@ function mark_partial(_param) { function close_variant(env, row) { const row$1 = row_repr_aux(/* [] */0, row); const nm = Stdlib__List.fold_left((function (nm, param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG === /* Rpresent */0 || match._2) { - return nm; - } else { - set_row_field(match._3, /* Rabsent */0); - return; - } - }), row$1.row_name, row$1.row_fields); + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG === /* Rpresent */0 || match._2) { + return nm; + } else { + set_row_field(match._3, /* Rabsent */0); + return; + } + }), row$1.row_name, row$1.row_fields); if (!row$1.row_closed || nm !== row$1.row_name) { return unify$2(env, row$1.row_more, newty2(100000000, { TAG: /* Tvariant */8, @@ -57082,20 +57082,8 @@ function full_match(ignore_generalized, closing, env) { return Stdlib__List.length(env$1) === c.cstr_normal; case /* Tpat_variant */5 : const fields = Stdlib__List.map((function (param) { - const match = param[0].pat_desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39675, - 17 - ] - }); - } - if (match.TAG === /* Tpat_variant */5) { - return match._0; - } + const match = param[0].pat_desc; + if (/* tag */typeof match === "number" || typeof match === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -57104,26 +57092,38 @@ function full_match(ignore_generalized, closing, env) { 17 ] }); - }), env); + } + if (match.TAG === /* Tpat_variant */5) { + return match._0; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39675, + 17 + ] + }); + }), env); const row = row_of_pat(p); if (closing && !row_fixed(row)) { return Stdlib__List.for_all((function (param) { - const tag = param[0]; - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string" || !(match.TAG === /* Rpresent */0 || match._2)) { - return true; - } else { - return Stdlib__List.mem(tag, fields); - } - }), row.row_fields); + const tag = param[0]; + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string" || !(match.TAG === /* Rpresent */0 || match._2)) { + return true; + } else { + return Stdlib__List.mem(tag, fields); + } + }), row.row_fields); } else if (row.row_closed) { return Stdlib__List.for_all((function (param) { - if (Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0)) { - return true; - } else { - return Stdlib__List.mem(param[0], fields); - } - }), row.row_fields); + if (Caml_obj.caml_equal(row_field_repr_aux(/* [] */0, param[1]), /* Rabsent */0)) { + return true; + } else { + return Stdlib__List.mem(param[0], fields); + } + }), row.row_fields); } else { return false; } @@ -57184,23 +57184,23 @@ function complete_tags(nconsts, nconstrs, tags) { const seen_const = Caml_array.make(nconsts, false); const seen_constr = Caml_array.make(nconstrs, false); Stdlib__List.iter((function (i) { - switch (i.TAG) { - case /* Cstr_constant */0 : - return Caml_array.set(seen_const, i._0, true); - case /* Cstr_block */1 : - return Caml_array.set(seen_constr, i._0, true); - case /* Cstr_extension */2 : - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39738, - 14 - ] - }); - - } - }), tags); + switch (i.TAG) { + case /* Cstr_constant */0 : + return Caml_array.set(seen_const, i._0, true); + case /* Cstr_block */1 : + return Caml_array.set(seen_constr, i._0, true); + case /* Cstr_extension */2 : + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39738, + 14 + ] + }); + + } + }), tags); let r = /* [] */0; for (let i = 0; i < nconsts; ++i) { if (!Caml_array.get(seen_const, i)) { @@ -57332,19 +57332,19 @@ function complete_constrs(p, all_tags) { const not_tags = complete_tags(c.cstr_consts, c.cstr_nonconsts, all_tags); const 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); - }), not_tags)) { - return cnstr; - } - - }), constrs); + if (Stdlib__List.exists((function (tag) { + return equal_tag(tag, cnstr.cstr_tag); + }), not_tags)) { + return cnstr; + } + + }), constrs); } function build_other_constant(proj, make, first, next, p, env) { const all = Stdlib__List.map((function (param) { - return Curry._1(proj, param[0].pat_desc); - }), env); + return Curry._1(proj, param[0].pat_desc); + }), env); let _i = first; while(true) { const i = _i; @@ -57370,51 +57370,51 @@ function build_other(ext, env) { switch (args._0.TAG) { case /* Const_int */0 : return build_other_constant((function (param) { - if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { - const i = param._0; - if (i.TAG === /* Const_int */0) { - return i._0; - } - + if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { + const i = param._0; + if (i.TAG === /* Const_int */0) { + return i._0; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39892, - 55 - ] - }); - }), (function (i) { - return { - TAG: /* Tpat_constant */2, - _0: { - TAG: /* Const_int */0, - _0: i - } - }; - }), 0, (function (prim) { - return prim + 1 | 0; - }), p, env); + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39892, + 55 + ] + }); + }), (function (i) { + return { + TAG: /* Tpat_constant */2, + _0: { + TAG: /* Const_int */0, + _0: i + } + }; + }), 0, (function (prim) { + return prim + 1 | 0; + }), p, env); case /* Const_char */1 : const all_chars = Stdlib__List.map((function (param) { - const match = param[0].pat_desc; - if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tpat_constant */2) { - const c = match._0; - if (c.TAG === /* Const_char */1) { - return c._0; - } - + const match = param[0].pat_desc; + if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tpat_constant */2) { + const c = match._0; + if (c.TAG === /* Const_char */1) { + return c._0; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39867, - 15 - ] - }); - }), env); + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39867, + 15 + ] + }); + }), env); let _param = { hd: [ /* 'a' */97, @@ -57487,113 +57487,113 @@ function build_other(ext, env) { }; case /* Const_string */2 : return build_other_constant((function (param) { - if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { - const match = param._0; - if (match.TAG === /* Const_string */2) { - return match._0.length; - } - + if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { + const match = param._0; + if (match.TAG === /* Const_string */2) { + return match._0.length; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39913, - 21 - ] - }); - }), (function (i) { - return { - TAG: /* Tpat_constant */2, - _0: { - TAG: /* Const_string */2, - _0: Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, /* '*' */42)), - _1: undefined - } - }; - }), 0, (function (prim) { - return prim + 1 | 0; - }), p, env); + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39913, + 21 + ] + }); + }), (function (i) { + return { + TAG: /* Tpat_constant */2, + _0: { + TAG: /* Const_string */2, + _0: Caml_bytes.bytes_to_string(Stdlib__Bytes.make(i, /* '*' */42)), + _1: undefined + } + }; + }), 0, (function (prim) { + return prim + 1 | 0; + }), p, env); case /* Const_float */3 : return build_other_constant((function (param) { - if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { - const f = param._0; - if (f.TAG === /* Const_float */3) { - return Caml_format.caml_float_of_string(f._0); - } - + if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { + const f = param._0; + if (f.TAG === /* Const_float */3) { + return Caml_format.caml_float_of_string(f._0); } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39919, - 21 - ] - }); - }), (function (f) { - return { - TAG: /* Tpat_constant */2, - _0: { - TAG: /* Const_float */3, - _0: Stdlib.string_of_float(f) - } - }; - }), 0.0, (function (f) { - return f + 1.0; - }), p, env); + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39919, + 21 + ] + }); + }), (function (f) { + return { + TAG: /* Tpat_constant */2, + _0: { + TAG: /* Const_float */3, + _0: Stdlib.string_of_float(f) + } + }; + }), 0.0, (function (f) { + return f + 1.0; + }), p, env); case /* Const_int32 */4 : return build_other_constant((function (param) { - if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { - const i = param._0; - if (i.TAG === /* Const_int32 */4) { - return i._0; - } - + if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { + const i = param._0; + if (i.TAG === /* Const_int32 */4) { + return i._0; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39897, - 57 - ] - }); - }), (function (i) { - return { - TAG: /* Tpat_constant */2, - _0: { - TAG: /* Const_int32 */4, - _0: i - } - }; - }), 0, Stdlib__Int32.succ, p, env); + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39897, + 57 + ] + }); + }), (function (i) { + return { + TAG: /* Tpat_constant */2, + _0: { + TAG: /* Const_int32 */4, + _0: i + } + }; + }), 0, Stdlib__Int32.succ, p, env); case /* Const_int64 */5 : return build_other_constant((function (param) { - if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { - const i = param._0; - if (i.TAG === /* Const_int64 */5) { - return i._0; - } - + if (!/* tag */(typeof param === "number" || typeof param === "string") && param.TAG === /* Tpat_constant */2) { + const i = param._0; + if (i.TAG === /* Const_int64 */5) { + return i._0; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39902, - 57 - ] - }); - }), (function (i) { - return { - TAG: /* Tpat_constant */2, - _0: { - TAG: /* Const_int64 */5, - _0: i - } - }; - }), Caml_int64.zero, Stdlib__Int64.succ, p, env); + + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39902, + 57 + ] + }); + }), (function (i) { + return { + TAG: /* Tpat_constant */2, + _0: { + TAG: /* Const_int64 */5, + _0: i + } + }; + }), Caml_int64.zero, Stdlib__Int64.succ, p, env); case /* Const_nativeint */6 : throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -57661,14 +57661,14 @@ function build_other(ext, env) { } if (exit$1 === 2) { const all_tags = Stdlib__List.map((function (param) { - let param$1 = param[0]; - const match = param$1.pat_desc; - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Tpat_construct */4) { - return fatal_error("Parmatch.get_tag"); - } else { - return match._1.cstr_tag; - } - }), env); + let param$1 = param[0]; + const match = param$1.pat_desc; + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Tpat_construct */4) { + return fatal_error("Parmatch.get_tag"); + } else { + return match._1.cstr_tag; + } + }), env); return pat_of_constrs(p, complete_constrs(p, all_tags)); } @@ -57677,20 +57677,8 @@ function build_other(ext, env) { case /* Tpat_variant */5 : const r = args._2; const tags = Stdlib__List.map((function (param) { - const match = param[0].pat_desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39836, - 23 - ] - }); - } - if (match.TAG === /* Tpat_variant */5) { - return match._0; - } + const match = param[0].pat_desc; + if (/* tag */typeof match === "number" || typeof match === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -57699,7 +57687,19 @@ function build_other(ext, env) { 23 ] }); - }), env); + } + if (match.TAG === /* Tpat_variant */5) { + return match._0; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39836, + 23 + ] + }); + }), env); const row = row_of_pat(p); const make_other_pat = function (tag, $$const) { const arg = $$const ? undefined : omega; @@ -57711,53 +57711,41 @@ function build_other(ext, env) { }, p.pat_type, p.pat_env); }; const match$1 = Stdlib__List.fold_left((function (others, param) { - const tag = param[0]; - if (Stdlib__List.mem(tag, tags)) { - return others; - } - const arg = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof arg === "number" || typeof arg === "string") { - return others; - } else if (arg.TAG === /* Rpresent */0) { - return { - hd: make_other_pat(tag, arg._0 === undefined), - tl: others - }; - } else { - return { - hd: make_other_pat(tag, arg._0), - tl: others - }; - } - }), /* [] */0, row.row_fields); + const tag = param[0]; + if (Stdlib__List.mem(tag, tags)) { + return others; + } + const arg = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof arg === "number" || typeof arg === "string") { + return others; + } else if (arg.TAG === /* Rpresent */0) { + return { + hd: make_other_pat(tag, arg._0 === undefined), + tl: others + }; + } else { + return { + hd: make_other_pat(tag, arg._0), + tl: others + }; + } + }), /* [] */0, row.row_fields); if (match$1) { return Stdlib__List.fold_left((function (p_res, pat) { - return make_pat({ - TAG: /* Tpat_or */8, - _0: pat, - _1: p_res, - _2: undefined - }, p.pat_type, p.pat_env); - }), match$1.hd, match$1.tl); + return make_pat({ + TAG: /* Tpat_or */8, + _0: pat, + _1: p_res, + _2: undefined + }, p.pat_type, p.pat_env); + }), match$1.hd, match$1.tl); } else { return make_other_pat("AnyExtraTag", true); } case /* Tpat_array */7 : const all_lengths = Stdlib__List.map((function (param) { - const args = param[0].pat_desc; - if (/* tag */typeof args === "number" || typeof args === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 39928, - 15 - ] - }); - } - if (args.TAG === /* Tpat_array */7) { - return Stdlib__List.length(args._0); - } + const args = param[0].pat_desc; + if (/* tag */typeof args === "number" || typeof args === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -57766,7 +57754,19 @@ function build_other(ext, env) { 15 ] }); - }), env); + } + if (args.TAG === /* Tpat_array */7) { + return Stdlib__List.length(args._0); + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 39928, + 15 + ] + }); + }), env); let _l = 0; while(true) { const l = _l; @@ -57790,18 +57790,18 @@ function build_other_gadt(ext, env) { let tmp = p.pat_desc; if (!/* tag */(typeof tmp === "number" || typeof tmp === "string") && tmp.TAG === /* Tpat_construct */4) { const all_tags = Stdlib__List.map((function (param) { - let param$1 = param[0]; - const match = param$1.pat_desc; - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Tpat_construct */4) { - return fatal_error("Parmatch.get_tag"); - } else { - return match._1.cstr_tag; - } - }), env); + let param$1 = param[0]; + const match = param$1.pat_desc; + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Tpat_construct */4) { + return fatal_error("Parmatch.get_tag"); + } else { + return match._1.cstr_tag; + } + }), env); const cnstrs = complete_constrs(p, all_tags); return Stdlib__List.map((function (param) { - return pat_of_constr(p, param); - }), cnstrs); + return pat_of_constr(p, param); + }), cnstrs); } } @@ -57837,8 +57837,8 @@ function has_instance(_p) { continue; case /* Tpat_record */6 : return has_instances(Stdlib__List.map((function (param) { - return param[2]; - }), p$1._0)); + return param[2]; + }), p$1._0)); case /* Tpat_tuple */3 : case /* Tpat_array */7 : return has_instances(p$1._0); @@ -57927,13 +57927,13 @@ function satisfiable(_pss, _qs) { if (constrs) { if (full_match(false, false, constrs)) { return Stdlib__List.exists((function (param) { - const p = param[0]; - if (is_absent_pat(p)) { - return false; - } else { - return satisfiable(param[1], Stdlib.$at(simple_match_args(p, omega), qs$2)); - } - }), constrs); + const p = param[0]; + if (is_absent_pat(p)) { + return false; + } else { + return satisfiable(param[1], Stdlib.$at(simple_match_args(p, omega), qs$2)); + } + }), constrs); } _qs = qs$2; _pss = filter_extra(pss); @@ -58129,8 +58129,8 @@ function exhaust_gadt(ext, pss, n) { return { TAG: /* Rsome */0, _0: Stdlib__List.map((function (row) { - return do_set_args(false, p, row); - }), r._0) + return do_set_args(false, p, row); + }), r._0) }; } }; @@ -58145,11 +58145,11 @@ function exhaust_gadt(ext, pss, n) { try { const missing_trailing = build_other_gadt(ext, constrs); const dug = combinations((function (head, tail) { - return { - hd: head, - tl: tail - }; - }), missing_trailing, r._0); + return { + hd: head, + tl: tail + }; + }), missing_trailing, r._0); if (/* tag */typeof before === "number" || typeof before === "string") { return { TAG: /* Rsome */0, @@ -58177,11 +58177,11 @@ function exhaust_gadt(ext, pss, n) { return { TAG: /* Rsome */0, _0: Stdlib__List.map((function (row) { - return { - hd: q0, - tl: row - }; - }), r$1._0) + return { + hd: q0, + tl: row + }; + }), r$1._0) }; } } @@ -58200,28 +58200,28 @@ function exhaust_gadt$1(ext, pss, n) { }; } const singletons = Stdlib__List.map((function (param) { - if (param) { - if (param.tl) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 40200, - 19 - ] - }); - } - return param.hd; + if (param) { + if (param.tl) { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 40200, + 19 + ] + }); } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 40200, - 19 - ] - }); - }), lst); + return param.hd; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 40200, + 19 + ] + }); + }), lst); return { TAG: /* Rsome */0, _0: { @@ -58310,25 +58310,25 @@ function unalias$1(_p) { function is_var_column(rs) { return Stdlib__List.for_all((function (r) { - const match = r.active; - if (match) { - let p = match.hd; - const match$1 = unalias$1(p).pat_desc; - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG === /* Tpat_var */0) { - return true; - } else { - return false; - } + const match = r.active; + if (match) { + let p = match.hd; + const match$1 = unalias$1(p).pat_desc; + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG === /* Tpat_var */0) { + return true; + } else { + return false; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 40309, - 14 - ] - }); - }), rs); + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 40309, + 14 + ] + }); + }), rs); } function or_args(_p) { @@ -58432,8 +58432,8 @@ function push_or(r) { function discr_pat$1(q, rs) { return discr_pat(q, Stdlib__List.map((function (r) { - return r.active; - }), rs)); + return r.active; + }), rs)); } function filter_one$1(q, rs) { @@ -58552,19 +58552,19 @@ function extract_columns(pss, qs) { let rs = Stdlib__List.map(extract_elements, pss); if (rs) { const i = Stdlib__List.map((function (x) { - return { - hd: x, - tl: /* [] */0 - }; - }), rs.hd); + return { + hd: x, + tl: /* [] */0 + }; + }), rs.hd); return Stdlib__List.fold_left((function (param, param$1) { - return Stdlib__List.map2((function (r, x) { - return { - hd: x, - tl: r - }; - }), param, param$1); - }), i, rs.tl); + return Stdlib__List.map2((function (r, x) { + return { + hd: x, + tl: r + }; + }), param, param$1); + }), i, rs.tl); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -58576,8 +58576,8 @@ function extract_columns(pss, qs) { }); } else { return Stdlib__List.map((function (param) { - return /* [] */0; - }), qs.ors); + return /* [] */0; + }), qs.ors); } } @@ -58642,55 +58642,55 @@ function every_satisfiables(_pss, _qs) { const match$2 = qs.ors; if (match$2) { return Stdlib__List.fold_right2((function (pss, qs, r) { - if (/* tag */(typeof r === "number" || typeof r === "string") && r !== /* Used */0) { - return /* Unused */1; + if (/* tag */(typeof r === "number" || typeof r === "string") && r !== /* Used */0) { + return /* Unused */1; + } + const match = qs.active; + if (match) { + if (match.tl) { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 40429, + 23 + ] + }); } - const match = qs.active; - if (match) { - if (match.tl) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 40429, - 23 - ] - }); + const match$1 = or_args(match.hd); + const r_loc = every_both(pss, qs, match$1[0], match$1[1]); + if (/* tag */typeof r === "number" || typeof r === "string") { + if (r !== /* Used */0) { + return /* Unused */1; } - const match$1 = or_args(match.hd); - const r_loc = every_both(pss, qs, match$1[0], match$1[1]); - if (/* tag */typeof r === "number" || typeof r === "string") { - if (r !== /* Used */0) { - return /* Unused */1; - } - - } else { - if (!/* tag */(typeof r_loc === "number" || typeof r_loc === "string")) { - return { - TAG: /* Upartial */0, - _0: Stdlib.$at(r._0, r_loc._0) - }; - } - if (r_loc === /* Used */0) { - return r; - } - + + } else { + if (!/* tag */(typeof r_loc === "number" || typeof r_loc === "string")) { + return { + TAG: /* Upartial */0, + _0: Stdlib.$at(r._0, r_loc._0) + }; } - if (/* tag */(typeof r_loc === "number" || typeof r_loc === "string") && r_loc !== /* Used */0) { - return /* Unused */1; - } else { - return r_loc; + if (r_loc === /* Used */0) { + return r; } + } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 40429, - 23 - ] - }); - }), extract_columns(pss, qs), extract_elements(qs), /* Used */0); + if (/* tag */(typeof r_loc === "number" || typeof r_loc === "string") && r_loc !== /* Used */0) { + return /* Unused */1; + } else { + return r_loc; + } + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 40429, + 23 + ] + }); + }), extract_columns(pss, qs), extract_elements(qs), /* Used */0); } else if (satisfiable(Stdlib__List.map(make_vector, pss), qs.no_ors)) { return /* Used */0; } else { @@ -58984,8 +58984,8 @@ function get_mins(le, ps) { const ps = param.tl; const p = param.hd; if (Stdlib__List.exists((function (p0) { - return Curry._2(le, p0, p); - }), ps)) { + return Curry._2(le, p0, p); + }), ps)) { _param = ps; continue; } @@ -59002,14 +59002,14 @@ function get_mins(le, ps) { function pressure_variants$1(tdefs, patl) { const pss = Stdlib__List.map((function (p) { - return { - hd: p, - tl: { - hd: omega, - tl: /* [] */0 - } - }; - }), patl); + return { + hd: p, + tl: { + hd: omega, + tl: /* [] */0 + } + }; + }), patl); pressure_variants(Caml_option.some(tdefs), pss); } @@ -59234,11 +59234,11 @@ function select(param) { const xs = param.hd; if (!param.tl) { return Stdlib__List.map((function (y) { - return { - hd: y, - tl: /* [] */0 - }; - }), xs); + return { + hd: y, + tl: /* [] */0 + }; + }), xs); } if (!xs) { return /* [] */0; @@ -59246,11 +59246,11 @@ function select(param) { const ys = param.tl; const x = xs.hd; return Stdlib.$at(Stdlib__List.map((function (lst) { - return { - hd: x, - tl: lst - }; - }), select(ys)), select({ + return { + hd: x, + tl: lst + }; + }), select(ys)), select({ hd: xs.tl, tl: ys })); @@ -59286,11 +59286,11 @@ function conv(typed) { case /* Tpat_tuple */3 : const results = select(Stdlib__List.map(loop, lst._0)); return Stdlib__List.map((function (lst) { - return mk$1(undefined, undefined, { - TAG: /* Ppat_tuple */4, - _0: lst - }); - }), results); + return mk$1(undefined, undefined, { + TAG: /* Ppat_tuple */4, + _0: lst + }); + }), results); case /* Tpat_construct */4 : const lst$1 = lst._2; const cstr = lst._1; @@ -59308,28 +59308,28 @@ function conv(typed) { const results$1 = select(Stdlib__List.map(loop, lst$1)); if (lst$1) { return Stdlib__List.map((function (lst) { - let arg; - if (lst) { - arg = lst.tl ? mk$1(undefined, undefined, { - TAG: /* Ppat_tuple */4, - _0: lst - }) : lst.hd; - } else { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 40764, - 28 - ] - }); - } - return mk$1(undefined, undefined, { - TAG: /* Ppat_construct */5, - _0: lid, - _1: arg + let arg; + if (lst) { + arg = lst.tl ? mk$1(undefined, undefined, { + TAG: /* Ppat_tuple */4, + _0: lst + }) : lst.hd; + } else { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 40764, + 28 + ] }); - }), results$1); + } + return mk$1(undefined, undefined, { + TAG: /* Ppat_construct */5, + _0: lid, + _1: arg + }); + }), results$1); } else { return { hd: mk$1(undefined, undefined, { @@ -59355,60 +59355,60 @@ function conv(typed) { } const results$2 = loop(p_opt); return Stdlib__List.map((function (p) { - return mk$1(undefined, undefined, { - TAG: /* Ppat_variant */6, - _0: label, - _1: p - }); - }), results$2); + return mk$1(undefined, undefined, { + TAG: /* Ppat_variant */6, + _0: label, + _1: p + }); + }), results$2); case /* Tpat_record */6 : const subpatterns = lst._0; const pats = select(Stdlib__List.map((function (param) { - return loop(param[2]); - }), subpatterns)); + return loop(param[2]); + }), subpatterns)); const label_idents = Stdlib__List.map((function (param) { - const lbl = param[1]; - const id = fresh(lbl.lbl_name); - Stdlib__Hashtbl.add(labels, id, lbl); - return { - TAG: /* Lident */0, - _0: id - }; - }), subpatterns); + const lbl = param[1]; + const id = fresh(lbl.lbl_name); + Stdlib__Hashtbl.add(labels, id, lbl); + return { + TAG: /* Lident */0, + _0: id + }; + }), subpatterns); return Stdlib__List.map((function (lst) { - const lst$1 = Stdlib__List.map2((function (lid, pat) { - return [ - { - txt: lid, - loc: none - }, - pat - ]; - }), label_idents, lst); - return mk$1(undefined, undefined, { - TAG: /* Ppat_record */7, - _0: lst$1, - _1: /* Open */1 - }); - }), pats); + const lst$1 = Stdlib__List.map2((function (lid, pat) { + return [ + { + txt: lid, + loc: none + }, + pat + ]; + }), label_idents, lst); + return mk$1(undefined, undefined, { + TAG: /* Ppat_record */7, + _0: lst$1, + _1: /* Open */1 + }); + }), pats); case /* Tpat_array */7 : const results$3 = select(Stdlib__List.map(loop, lst._0)); return Stdlib__List.map((function (lst) { - return mk$1(undefined, undefined, { - TAG: /* Ppat_array */8, - _0: lst - }); - }), results$3); + return mk$1(undefined, undefined, { + TAG: /* Ppat_array */8, + _0: lst + }); + }), results$3); case /* Tpat_or */8 : return Stdlib.$at(loop(lst._0), loop(lst._1)); case /* Tpat_lazy */9 : const results$4 = loop(lst._0); return Stdlib__List.map((function (p) { - return mk$1(undefined, undefined, { - TAG: /* Ppat_lazy */12, - _0: p - }); - }), results$4); + return mk$1(undefined, undefined, { + TAG: /* Ppat_lazy */12, + _0: p + }); + }), results$4); default: return { hd: mk$1(undefined, undefined, /* Ppat_any */0), @@ -59539,8 +59539,8 @@ function collect_paths_from_pat(_r, _p) { continue; case /* Tpat_record */6 : return Stdlib__List.fold_left((function (r, param) { - return collect_paths_from_pat(r, param[2]); - }), r, p$1._0); + return collect_paths_from_pat(r, param[2]); + }), r, p$1._0); case /* Tpat_tuple */3 : case /* Tpat_array */7 : return Stdlib__List.fold_left(collect_paths_from_pat, r, p$1._0); @@ -59560,8 +59560,8 @@ function collect_paths_from_pat(_r, _p) { function do_check_fragile_param(exhaust, loc, casel, pss) { const exts = Stdlib__List.fold_left((function (r, c) { - return collect_paths_from_pat(r, c.c_lhs); - }), /* [] */0, casel); + return collect_paths_from_pat(r, c.c_lhs); + }), /* [] */0, casel); if (!exts) { return; } @@ -59570,15 +59570,15 @@ function do_check_fragile_param(exhaust, loc, casel, pss) { } const ps = pss.hd; Stdlib__List.iter((function (ext) { - const match = Curry._3(exhaust, ext, pss, Stdlib__List.length(ps)); - if (/* tag */typeof match === "number" || typeof match === "string") { - return prerr_warning(loc, { - TAG: /* Fragile_match */1, - _0: name(undefined, ext) - }); - } - - }), exts); + const match = Curry._3(exhaust, ext, pss, Stdlib__List.length(ps)); + if (/* tag */typeof match === "number" || typeof match === "string") { + return prerr_warning(loc, { + TAG: /* Fragile_match */1, + _0: name(undefined, ext) + }); + } + + }), exts); } function do_check_fragile_normal(param, param$1, param$2) { @@ -59793,84 +59793,84 @@ function error_of_extension(ext) { function check_deprecated(loc, attrs, s) { Stdlib__List.iter((function (param) { - switch (param[0].txt) { - case "deprecated" : - case "ocaml.deprecated" : - break; - default: - return; - } - const txt = string_of_payload(param[1]); - if (txt !== undefined) { - if (bs_vscode) { - return prerr_warning(loc, { - TAG: /* Deprecated */0, - _0: s + (" " + txt) - }); - } else { - return prerr_warning(loc, { - TAG: /* Deprecated */0, - _0: s + ("\n" + txt) - }); - } + switch (param[0].txt) { + case "deprecated" : + case "ocaml.deprecated" : + break; + default: + return; + } + const txt = string_of_payload(param[1]); + if (txt !== undefined) { + if (bs_vscode) { + return prerr_warning(loc, { + TAG: /* Deprecated */0, + _0: s + (" " + txt) + }); } else { return prerr_warning(loc, { TAG: /* Deprecated */0, - _0: s + _0: s + ("\n" + txt) }); } - }), attrs); + } else { + return prerr_warning(loc, { + TAG: /* Deprecated */0, + _0: s + }); + } + }), attrs); } const newrecord$1 = Caml_obj.caml_obj_dup(default_mapper); newrecord$1.attribute = (function (param, a) { - let exit = 0; - switch (a[0].txt) { - case "ocaml.ppwarning" : - case "ppwarning" : - exit = 1; - break; - default: - - } - if (exit === 1) { - const match = a[1]; - switch (match.TAG) { - case /* PStr */0 : - const match$1 = match._0; - if (match$1) { - const match$2 = match$1.hd; - const match$3 = match$2.pstr_desc; - if (match$3.TAG === /* Pstr_eval */0) { - const match$4 = match$3._0.pexp_desc; - if (match$4.TAG === /* Pexp_constant */1) { - const match$5 = match$4._0; - if (match$5.TAG === /* Const_string */2) { - if (match$1.tl) { - - } else { - prerr_warning(match$2.pstr_loc, { - TAG: /* Preprocessor */10, - _0: match$5._0 - }); - } + let exit = 0; + switch (a[0].txt) { + case "ocaml.ppwarning" : + case "ppwarning" : + exit = 1; + break; + default: + + } + if (exit === 1) { + const match = a[1]; + switch (match.TAG) { + case /* PStr */0 : + const match$1 = match._0; + if (match$1) { + const match$2 = match$1.hd; + const match$3 = match$2.pstr_desc; + if (match$3.TAG === /* Pstr_eval */0) { + const match$4 = match$3._0.pexp_desc; + if (match$4.TAG === /* Pexp_constant */1) { + const match$5 = match$4._0; + if (match$5.TAG === /* Const_string */2) { + if (match$1.tl) { + + } else { + prerr_warning(match$2.pstr_loc, { + TAG: /* Preprocessor */10, + _0: match$5._0 + }); } - } } } - break; - case /* PTyp */1 : - case /* PPat */2 : - break; - - } + + } + break; + case /* PTyp */1 : + case /* PPat */2 : + break; + } - return a; - }); + } + return a; +}); const warning_scope = { contents: /* [] */0 @@ -59926,29 +59926,29 @@ function warning_attribute(attrs) { } }; Stdlib__List.iter((function (param) { - const match = param[0]; - const txt = match.txt; - let exit = 0; - switch (txt) { - case "ocaml.warnerror" : - case "warnerror" : - exit = 2; - break; - case "ocaml.warning" : - case "warning" : - exit = 1; - break; - default: - return; - } - switch (exit) { - case 1 : - return $$process(match.loc, txt, false, param[1]); - case 2 : - return $$process(match.loc, txt, true, param[1]); - - } - }), attrs); + const match = param[0]; + const txt = match.txt; + let exit = 0; + switch (txt) { + case "ocaml.warnerror" : + case "warnerror" : + exit = 2; + break; + case "ocaml.warning" : + case "warning" : + exit = 1; + break; + default: + return; + } + switch (exit) { + case 1 : + return $$process(match.loc, txt, false, param[1]); + case 2 : + return $$process(match.loc, txt, true, param[1]); + + } + }), attrs); } function narrow_unbound_lid_error(env, loc, lid, make_error) { @@ -59961,11 +59961,11 @@ function narrow_unbound_lid_error(env, loc, lid, make_error) { const 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 { - TAG: /* Unbound_module */20, - _0: lid - }; - })); + return { + TAG: /* Unbound_module */20, + _0: lid + }; + })); } if (exn.MEL_EXN_ID === Recmodule) { throw new Caml_js_exceptions.MelangeError($$Error$6, { @@ -60065,49 +60065,49 @@ function find_component(lookup, make_error, env, loc, lid) { function find_type(env, loc, lid) { const r = find_component(lookup_type$1, (function (lid) { - return { - TAG: /* Unbound_type_constructor */1, - _0: lid - }; - }), env, loc, lid); + return { + TAG: /* Unbound_type_constructor */1, + _0: lid + }; + }), env, loc, lid); check_deprecated(loc, r[1].type_attributes, name(undefined, r[0])); return r; } function find_constructor(param, param$1, param$2) { return find_component(lookup_constructor, (function (lid) { - return { - TAG: /* Unbound_constructor */18, - _0: lid - }; - }), param, param$1, param$2); + return { + TAG: /* Unbound_constructor */18, + _0: lid + }; + }), param, param$1, param$2); } function find_all_constructors(param, param$1, param$2) { return find_component(lookup_all_constructors$1, (function (lid) { - return { - TAG: /* Unbound_constructor */18, - _0: lid - }; - }), param, param$1, param$2); + return { + TAG: /* Unbound_constructor */18, + _0: lid + }; + }), param, param$1, param$2); } function find_all_labels(param, param$1, param$2) { return find_component(lookup_all_labels$1, (function (lid) { - return { - TAG: /* Unbound_label */19, - _0: lid - }; - }), param, param$1, param$2); + return { + TAG: /* Unbound_label */19, + _0: lid + }; + }), param, param$1, param$2); } function find_class$1(env, loc, lid) { const r = find_component(lookup_class$1, (function (lid) { - return { - TAG: /* Unbound_class */21, - _0: lid - }; - }), env, loc, lid); + return { + TAG: /* Unbound_class */21, + _0: lid + }; + }), env, loc, lid); check_deprecated(loc, r[1].cty_attributes, name(undefined, r[0])); return r; } @@ -60115,11 +60115,11 @@ function find_class$1(env, loc, lid) { function find_value$1(env, loc, lid) { check_value_name(last$1(lid), loc); const r = find_component(lookup_value$1, (function (lid) { - return { - TAG: /* Unbound_value */17, - _0: lid - }; - }), env, loc, lid); + return { + TAG: /* Unbound_value */17, + _0: lid + }; + }), env, loc, lid); check_deprecated(loc, r[1].val_attributes, name(undefined, r[0])); return r; } @@ -60127,16 +60127,16 @@ function find_value$1(env, loc, lid) { function lookup_module$1(loadOpt, env, loc, lid) { const load = loadOpt !== undefined ? loadOpt : false; return find_component((function (lid, env) { - return [ - lookup_module(load, lid, env), - undefined - ]; - }), (function (lid) { - return { - TAG: /* Unbound_module */20, - _0: lid - }; - }), env, loc, lid)[0]; + return [ + lookup_module(load, lid, env), + undefined + ]; + }), (function (lid) { + return { + TAG: /* Unbound_module */20, + _0: lid + }; + }), env, loc, lid)[0]; } function find_module$1(env, loc, lid) { @@ -60151,122 +60151,122 @@ function find_module$1(env, loc, lid) { function find_modtype$1(env, loc, lid) { const r = find_component(lookup_modtype, (function (lid) { - return { - TAG: /* Unbound_modtype */22, - _0: lid - }; - }), env, loc, lid); + return { + TAG: /* Unbound_modtype */22, + _0: lid + }; + }), env, loc, lid); check_deprecated(loc, r[1].mtd_attributes, name(undefined, r[0])); return r; } function find_class_type(env, loc, lid) { const r = find_component(lookup_cltype$1, (function (lid) { - return { - TAG: /* Unbound_cltype */23, - _0: lid - }; - }), env, loc, lid); + return { + TAG: /* Unbound_cltype */23, + _0: lid + }; + }), env, loc, lid); check_deprecated(loc, r[1].clty_attributes, name(undefined, r[0])); return r; } function unbound_constructor_error(env, lid) { return narrow_unbound_lid_error(env, lid.loc, lid.txt, (function (lid) { - return { - TAG: /* Unbound_constructor */18, - _0: lid - }; - })); + return { + TAG: /* Unbound_constructor */18, + _0: lid + }; + })); } function unbound_label_error(env, lid) { return narrow_unbound_lid_error(env, lid.loc, lid.txt, (function (lid) { - return { - TAG: /* Unbound_label */19, - _0: lid - }; - })); + return { + TAG: /* Unbound_label */19, + _0: lid + }; + })); } const transl_modtype_longident = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 41489, - 45 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 41489, + 45 + ] + }); + }) }; const transl_modtype = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 41490, - 35 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 41490, + 35 + ] + }); + }) }; function create_package_mty(fake, loc, env, param) { const l = Stdlib__List.sort((function (param, param$1) { - const s2 = param$1[0]; - const 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, - _1: loc, - _2: env, - _3: { - TAG: /* Multiple_constraints_on_type */15, - _0: s1.txt - } - }); - } - return Caml_obj.caml_compare(s1.txt, s2.txt); - }), param[1]); + const s2 = param$1[0]; + const 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, + _1: loc, + _2: env, + _3: { + TAG: /* Multiple_constraints_on_type */15, + _0: s1.txt + } + }); + } + return Caml_obj.caml_compare(s1.txt, s2.txt); + }), param[1]); return [ l, Stdlib__List.fold_left((function (mty, param) { - const s = param[0]; - const d_ptype_name = { - txt: last$1(s.txt), - loc: s.loc - }; - const d_ptype_manifest = fake ? undefined : param[1]; - const d = { - ptype_name: d_ptype_name, - ptype_params: /* [] */0, - ptype_cstrs: /* [] */0, - ptype_kind: /* Ptype_abstract */0, - ptype_private: /* Public */1, - ptype_manifest: d_ptype_manifest, - ptype_attributes: /* [] */0, - ptype_loc: loc - }; - return mk$3(loc, undefined, { - TAG: /* Pmty_with */3, - _0: mty, - _1: { - hd: { - TAG: /* Pwith_type */0, - _0: { - txt: s.txt, - loc: loc - }, - _1: d + const s = param[0]; + const d_ptype_name = { + txt: last$1(s.txt), + loc: s.loc + }; + const d_ptype_manifest = fake ? undefined : param[1]; + const d = { + ptype_name: d_ptype_name, + ptype_params: /* [] */0, + ptype_cstrs: /* [] */0, + ptype_kind: /* Ptype_abstract */0, + ptype_private: /* Public */1, + ptype_manifest: d_ptype_manifest, + ptype_attributes: /* [] */0, + ptype_loc: loc + }; + return mk$3(loc, undefined, { + TAG: /* Pmty_with */3, + _0: mty, + _1: { + hd: { + TAG: /* Pwith_type */0, + _0: { + txt: s.txt, + loc: loc }, - tl: /* [] */0 - } - }); - }), mk$3(loc, undefined, { + _1: d + }, + tl: /* [] */0 + } + }); + }), mk$3(loc, undefined, { TAG: /* Pmty_ident */0, _0: param[0] }), l) @@ -60514,13 +60514,13 @@ function transl_type(env, policy, styp) { ill_formed_ast(loc, "Tuples must have at least 2 components."); } const ctys = Stdlib__List.map((function (param) { - return transl_type(env, policy, param); - }), stl); + return transl_type(env, policy, param); + }), stl); const desc = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (ctyp) { - return ctyp.ctyp_type; - }), ctys) + return ctyp.ctyp_type; + }), ctys) }; const ty$3 = newty2(current_level.contents, desc); return ctyp({ @@ -60538,8 +60538,8 @@ function transl_type(env, policy, styp) { const t = stl$1.hd; let tmp = t.ptyp_desc; stl$2 = /* tag */(typeof tmp === "number" || typeof tmp === "string") && !(stl$1.tl || decl.type_arity <= 1) ? Stdlib__List.map((function (param) { - return t; - }), decl.type_params) : stl$1; + return t; + }), decl.type_params) : stl$1; } else { stl$2 = stl$1; } @@ -60557,34 +60557,34 @@ function transl_type(env, policy, styp) { }); } const args = Stdlib__List.map((function (param) { - return transl_type(env, policy, param); - }), stl$2); + return transl_type(env, policy, param); + }), stl$2); const params = instance_list(empty, decl.type_params); const ty$4 = decl.type_manifest; const 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_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$6, { - MEL_EXN_ID: $$Error$6, - _1: param[0].ptyp_loc, - _2: env, - _3: { - TAG: /* Type_mismatch */6, - _0: swap_list(trace._1) - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return Curry._3(unify_param, env, ty$p, param[1].ctyp_type); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$6, { + MEL_EXN_ID: $$Error$6, + _1: param[0].ptyp_loc, + _2: env, + _3: { + TAG: /* Type_mismatch */6, + _0: swap_list(trace._1) + } + }); } - }), Stdlib__List.combine(stl$2, args), params); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), Stdlib__List.combine(stl$2, args), params); const constr = newconstr(path, Stdlib__List.map((function (ctyp) { - return ctyp.ctyp_type; - }), args)); + return ctyp.ctyp_type; + }), args)); try { enforce_constraints(env, constr); } @@ -60612,12 +60612,12 @@ function transl_type(env, policy, styp) { case /* Ptyp_object */4 : const o = name._1; const fields = Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - transl_poly_type(env, policy, param[2]) - ]; - }), name._0); + return [ + param[0], + param[1], + transl_poly_type(env, policy, param[2]) + ]; + }), name._0); const ty$5 = newobj(transl_fields(loc, env, policy, /* [] */0, o, fields)); return ctyp({ TAG: /* Ttyp_object */4, @@ -60743,32 +60743,32 @@ function transl_type(env, policy, styp) { }); } const args$1 = Stdlib__List.map((function (param) { - return transl_type(env, policy, param); - }), stl$3); + return transl_type(env, policy, param); + }), stl$3); const 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_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$6, { - MEL_EXN_ID: $$Error$6, - _1: param[0].ptyp_loc, - _2: env, - _3: { - TAG: /* Type_mismatch */6, - _0: swap_list(trace._1) - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return unify_var(env, ty$p, param[1].ctyp_type); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$6, { + MEL_EXN_ID: $$Error$6, + _1: param[0].ptyp_loc, + _2: env, + _3: { + TAG: /* Type_mismatch */6, + _0: swap_list(trace._1) + } + }); } - }), Stdlib__List.combine(stl$3, args$1), params$1); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), Stdlib__List.combine(stl$3, args$1), params$1); const ty_args = Stdlib__List.map((function (ctyp) { - return ctyp.ctyp_type; - }), args$1); + return ctyp.ctyp_type; + }), args$1); let ty$6; try { ty$6 = expand_head(env, newconstr(path$1, ty_args)); @@ -60814,39 +60814,39 @@ function transl_type(env, policy, styp) { case /* Tvariant */8 : const row$1 = row_repr_aux(/* [] */0, row._0); const fields$1 = Stdlib__List.map((function (param) { - const f = param[1]; - const match = row_field_repr_aux(/* [] */0, f); - let tmp; - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Rpresent */0) { - tmp = f; - } else { - const ty = match._0; - tmp = ty !== undefined ? ({ - TAG: /* Reither */1, - _0: false, - _1: { - hd: ty, - tl: /* [] */0 - }, - _2: false, - _3: { - contents: undefined - } - }) : ({ - TAG: /* Reither */1, - _0: true, - _1: /* [] */0, - _2: false, - _3: { - contents: undefined - } - }); - } - return [ - param[0], - tmp - ]; - }), row$1.row_fields); + const f = param[1]; + const match = row_field_repr_aux(/* [] */0, f); + let tmp; + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Rpresent */0) { + tmp = f; + } else { + const ty = match._0; + tmp = ty !== undefined ? ({ + TAG: /* Reither */1, + _0: false, + _1: { + hd: ty, + tl: /* [] */0 + }, + _2: false, + _3: { + contents: undefined + } + }) : ({ + TAG: /* Reither */1, + _0: true, + _1: /* [] */0, + _2: false, + _3: { + contents: undefined + } + }); + } + return [ + param[0], + tmp + ]; + }), row$1.row_fields); const row_row_more = newvar(validate_name(undefined), undefined); const row_row_name = [ path$1, @@ -61113,14 +61113,14 @@ function transl_type(env, policy, styp) { const l = sty._0; name$2.contents = undefined; const tl = Stdlib__List.map((function (param) { - return transl_type(env, policy, param); - }), stl); + return transl_type(env, policy, param); + }), stl); let f; let exit = 0; if (present !== undefined && !Stdlib__List.mem(l, present)) { const ty_tl = Stdlib__List.map((function (cty) { - return cty.ctyp_type; - }), tl); + return cty.ctyp_type; + }), tl); f = { TAG: /* Reither */1, _0: c, @@ -61174,10 +61174,10 @@ function transl_type(env, policy, styp) { ]; try { Stdlib__Hashtbl.iter((function (param, param$1) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - }), hfields); + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + }), hfields); name$2.contents = nm; } catch (raw_exn){ @@ -61234,57 +61234,57 @@ function transl_type(env, policy, styp) { }); } Stdlib__List.iter((function (param) { - const f = param[1]; - const l = param[0]; - let f$1; - if (present !== undefined && !Stdlib__List.mem(l, present)) { - if (/* tag */typeof f === "number" || typeof f === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 41862, - 24 - ] - }); - } - if (f.TAG === /* Rpresent */0) { - const ty = f._0; - f$1 = ty !== undefined ? ({ - TAG: /* Reither */1, - _0: false, - _1: { - hd: ty, - tl: /* [] */0 - }, - _2: false, - _3: { - contents: undefined - } - }) : ({ - TAG: /* Reither */1, - _0: true, - _1: /* [] */0, - _2: false, - _3: { - contents: undefined - } + const f = param[1]; + const l = param[0]; + let f$1; + if (present !== undefined && !Stdlib__List.mem(l, present)) { + if (/* tag */typeof f === "number" || typeof f === "string") { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 41862, + 24 + ] }); - } else { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 41862, - 24 - ] - }); - } + } + if (f.TAG === /* Rpresent */0) { + const ty = f._0; + f$1 = ty !== undefined ? ({ + TAG: /* Reither */1, + _0: false, + _1: { + hd: ty, + tl: /* [] */0 + }, + _2: false, + _3: { + contents: undefined + } + }) : ({ + TAG: /* Reither */1, + _0: true, + _1: /* [] */0, + _2: false, + _3: { + contents: undefined + } + }); } else { - f$1 = f; + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 41862, + 24 + ] + }); } - add_typed_field(sty$1.ptyp_loc, l, f$1); - }), fl); + } else { + f$1 = f; + } + add_typed_field(sty$1.ptyp_loc, l, f$1); + }), fl); return { TAG: /* Tinherit */1, _0: cty @@ -61292,26 +61292,26 @@ function transl_type(env, policy, styp) { }; const tfields = Stdlib__List.map(add_field, name._0); const fields$2 = Stdlib__Hashtbl.fold((function (param, p, l) { - return { - hd: p, - tl: l - }; - }), hfields, /* [] */0); + return { + hd: p, + tl: l + }; + }), hfields, /* [] */0); if (present !== undefined) { Stdlib__List.iter((function (l) { - if (Stdlib__List.mem_assoc(l, fields$2)) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$6, { - MEL_EXN_ID: $$Error$6, - _1: styp.ptyp_loc, - _2: env, - _3: { - TAG: /* Present_has_no_type */9, - _0: l - } - }); - }), present); + if (Stdlib__List.mem_assoc(l, fields$2)) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$6, { + MEL_EXN_ID: $$Error$6, + _1: styp.ptyp_loc, + _2: env, + _3: { + TAG: /* Present_has_no_type */9, + _0: l + } + }); + }), present); } const row_row_fields = Stdlib__List.rev(fields$2); const row_row_more$1 = newvar(validate_name(undefined), undefined); @@ -61357,11 +61357,11 @@ function transl_type(env, policy, styp) { const vars = name._0; begin_def(undefined); const new_univars = Stdlib__List.map((function (name) { - return [ - name, - newvar(validate_name(name), undefined) - ]; - }), vars); + return [ + name, + newvar(validate_name(name), undefined) + ]; + }), vars); const old_univars = univars.contents; univars.contents = Stdlib.$at(new_univars, univars.contents); const cty$1 = transl_type(env, policy, name._1); @@ -61372,32 +61372,32 @@ function transl_type(env, policy, styp) { contents: /* [] */0 }, ty$11); const ty_list = Stdlib__List.fold_left((function (tyl, param) { - const v = proxy(param[1]); - if (!deep_occur(v, ty$11)) { - return tyl; - } - const name = v.desc; - if (!/* tag */(typeof name === "number" || typeof name === "string") && name.TAG === /* Tvar */0 && v.level === 100000000) { - v.desc = { - TAG: /* Tunivar */9, - _0: name._0 - }; - return { - hd: v, - tl: tyl - }; - } - throw new Caml_js_exceptions.MelangeError($$Error$6, { - MEL_EXN_ID: $$Error$6, - _1: styp.ptyp_loc, - _2: env, - _3: { - TAG: /* Cannot_quantify */14, - _0: param[0], - _1: v - } - }); - }), /* [] */0, new_univars); + const v = proxy(param[1]); + if (!deep_occur(v, ty$11)) { + return tyl; + } + const name = v.desc; + if (!/* tag */(typeof name === "number" || typeof name === "string") && name.TAG === /* Tvar */0 && v.level === 100000000) { + v.desc = { + TAG: /* Tunivar */9, + _0: name._0 + }; + return { + hd: v, + tl: tyl + }; + } + throw new Caml_js_exceptions.MelangeError($$Error$6, { + MEL_EXN_ID: $$Error$6, + _1: styp.ptyp_loc, + _2: env, + _3: { + TAG: /* Cannot_quantify */14, + _0: param[0], + _1: v + } + }); + }), /* [] */0, new_univars); const ty$p = newty2(100000000, { TAG: /* Tpoly */10, _0: ty$11, @@ -61421,18 +61421,18 @@ function transl_type(env, policy, styp) { const mty = Curry._2(transl_modtype.contents, env, match$7[1]); widen(z); const ptys = Stdlib__List.map((function (param) { - return [ - param[0], - transl_type(env, policy, param[1]) - ]; - }), l$1); + return [ + param[0], + transl_type(env, policy, param[1]) + ]; + }), l$1); const path$2 = Curry._3(transl_modtype_longident.contents, styp.ptyp_loc, env, p.txt); const desc_1 = Stdlib__List.map((function (param) { - return param[0].txt; - }), l$1); + return param[0].txt; + }), l$1); const desc_2 = Stdlib__List.map((function (param) { - return param[1].ctyp_type; - }), ptys); + return param[1].ctyp_type; + }), ptys); const desc$1 = { TAG: /* Tpackage */11, _0: path$2, @@ -61521,22 +61521,22 @@ function make_fixed_univars(ty) { TAG: /* Tvariant */8, _0: { row_fields: Stdlib__List.map((function (p) { - const match = row_field_repr_aux(/* [] */0, p[1]); - if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG === /* Rpresent */0) { - return p; - } else { - return [ - p[0], - { - TAG: /* Reither */1, - _0: match._0, - _1: match._1, - _2: true, - _3: match._3 - } - ]; - } - }), row$1.row_fields), + const match = row_field_repr_aux(/* [] */0, p[1]); + if (/* tag */typeof match === "number" || typeof match === "string" || match.TAG === /* Rpresent */0) { + return p; + } else { + return [ + p[0], + { + TAG: /* Reither */1, + _0: match._0, + _1: match._1, + _2: true, + _3: match._3 + } + ]; + } + }), row$1.row_fields), row_more: row$1.row_more, row_bound: row$1.row_bound, row_closed: row$1.row_closed, @@ -61553,84 +61553,84 @@ function globalize_used_variables(env, fixed) { contents: /* [] */0 }; iter$2((function (name, param) { - const loc = param[1]; - const ty = param[0]; - const v = new_global_var(validate_name(undefined), undefined); - const snap = snapshot(undefined); - let tmp; - try { - unify$2(env, v, ty); - tmp = true; - } - catch (exn){ - backtrack(snap); - tmp = false; - } - if (!tmp) { - return; - } - try { + const loc = param[1]; + const ty = param[0]; + const v = new_global_var(validate_name(undefined), undefined); + const snap = snapshot(undefined); + let tmp; + try { + unify$2(env, v, ty); + tmp = true; + } + catch (exn){ + backtrack(snap); + tmp = false; + } + if (!tmp) { + return; + } + try { + r.contents = { + hd: [ + loc, + v, + find$2(name, type_variables.contents) + ], + tl: r.contents + }; + return; + } + catch (raw_exn){ + const 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, { + MEL_EXN_ID: $$Error$6, + _1: loc, + _2: env, + _3: { + TAG: /* Unbound_type_variable */0, + _0: "'" + name + } + }); + } + const v2 = new_global_var(validate_name(undefined), undefined); r.contents = { hd: [ loc, v, - find$2(name, type_variables.contents) + v2 ], tl: r.contents }; + type_variables.contents = add$5(name, v2, type_variables.contents); return; } - catch (raw_exn){ - const 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, { - MEL_EXN_ID: $$Error$6, - _1: loc, - _2: env, - _3: { - TAG: /* Unbound_type_variable */0, - _0: "'" + name - } - }); - } - const v2 = new_global_var(validate_name(undefined), undefined); - r.contents = { - hd: [ - loc, - v, - v2 - ], - tl: r.contents - }; - type_variables.contents = add$5(name, v2, type_variables.contents); - return; - } - throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); - } - }), used_variables.contents); + throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); + } + }), used_variables.contents); used_variables.contents = /* Empty */0; return function (param) { Stdlib__List.iter((function (param) { - try { - return unify$2(env, param[1], param[2]); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$6, { - MEL_EXN_ID: $$Error$6, - _1: param[0], - _2: env, - _3: { - TAG: /* Type_mismatch */6, - _0: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + try { + return unify$2(env, param[1], param[2]); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$6, { + MEL_EXN_ID: $$Error$6, + _1: param[0], + _2: env, + _3: { + TAG: /* Type_mismatch */6, + _0: trace._1 + } + }); } - }), r.contents); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), r.contents); }; } @@ -61654,33 +61654,33 @@ function transl_simple_type_univars(env, styp) { const new_variables = used_variables.contents; used_variables.contents = /* Empty */0; iter$2((function (name, p) { - if (mem$4(name, type_variables.contents)) { - used_variables.contents = add$5(name, p, used_variables.contents); - return; - } - - }), new_variables); + if (mem$4(name, type_variables.contents)) { + used_variables.contents = add$5(name, p, used_variables.contents); + return; + } + + }), new_variables); globalize_used_variables(env, false)(undefined); end_def(undefined); iter_generalize$1({ contents: /* [] */0 }, typ.ctyp_type); const univs = Stdlib__List.fold_left((function (acc, v) { - const v$1 = repr(v); - const name = v$1.desc; - if (/* tag */typeof name === "number" || typeof name === "string" || !(name.TAG === /* Tvar */0 && v$1.level === 100000000)) { - return acc; - } else { - v$1.desc = { - TAG: /* Tunivar */9, - _0: name._0 - }; - return { - hd: v$1, - tl: acc - }; - } - }), /* [] */0, pre_univars.contents); + const v$1 = repr(v); + const name = v$1.desc; + if (/* tag */typeof name === "number" || typeof name === "string" || !(name.TAG === /* Tvar */0 && v$1.level === 100000000)) { + return acc; + } else { + v$1.desc = { + TAG: /* Tunivar */9, + _0: name._0 + }; + return { + hd: v$1, + tl: acc + }; + } + }), /* [] */0, pre_univars.contents); const ty = typ.ctyp_type; make_fixed_univars(ty); unmark_type(ty); @@ -61805,13 +61805,13 @@ function spellcheck(ppf, fold, env, lid) { case /* Lident */0 : const s = lid._0; return handle(Curry._4(fold, (function (param, param$1) { - return compare(s, param, param$1); - }), undefined, env, init)); + return compare(s, param, param$1); + }), undefined, env, init)); case /* Ldot */1 : const s$1 = lid._1; return handle(Curry._4(fold, (function (param, param$1) { - return compare(s$1, param, param$1); - }), lid._0, env, init)); + return compare(s$1, param, param$1); + }), lid._0, env, init)); case /* Lapply */2 : return; @@ -61821,20 +61821,20 @@ function spellcheck(ppf, fold, env, lid) { function spellcheck_simple(ppf, fold, extr) { return function (param, param$1) { return spellcheck(ppf, (function (f) { - return Curry._1(fold, (function (decl, x) { - return Curry._2(f, Curry._1(extr, decl), x); - })); - }), param, param$1); + return Curry._1(fold, (function (decl, x) { + return Curry._2(f, Curry._1(extr, decl), x); + })); + }), param, param$1); }; } function spellcheck$1(ppf, fold) { return function (param, param$1) { return spellcheck(ppf, (function (f) { - return Curry._1(fold, (function (s, param, param$1, x) { - return Curry._2(f, s, x); - })); - }), param, param$1); + return Curry._1(fold, (function (s, param, param$1, x) { + return Curry._2(f, s, x); + })); + }), param, param$1); }; } @@ -61848,159 +61848,158 @@ register_error_of_exn(function (err) { } const env = err._2; return error_of_printer(err._1, (function (param, param$1) { - if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { - if (param$1 === /* Recursive_type */0) { - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This type is recursive", - _1: /* End_of_format */0 - }, - _1: "This type is recursive" - }); - } else { - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Illegal recursive module reference", - _1: /* End_of_format */0 - }, - _1: "Illegal recursive module reference" - }); - } + if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { + if (param$1 === /* Recursive_type */0) { + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This type is recursive", + _1: /* End_of_format */0 + }, + _1: "This type is recursive" + }); + } else { + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Illegal recursive module reference", + _1: /* End_of_format */0 + }, + _1: "Illegal recursive module reference" + }); } - switch (param$1.TAG) { - case /* Unbound_type_variable */0 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound type parameter ", + } + switch (param$1.TAG) { + case /* Unbound_type_variable */0 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound type parameter ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Flush_newline */4, + _1: /* End_of_format */0 } - }, - _1: "Unbound type parameter %s@." - }), param$1._0); - case /* Unbound_type_constructor */1 : - const lid = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound type constructor ", + } + }, + _1: "Unbound type parameter %s@." + }), param$1._0); + case /* Unbound_type_constructor */1 : + const lid = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound type constructor ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound type constructor %a" + }), longident, lid); + return spellcheck$1(param, fold_types)(env, lid); + case /* Unbound_type_constructor_2 */2 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The type constructor", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound type constructor %a" - }), longident, lid); - return spellcheck$1(param, fold_types)(env, lid); - case /* Unbound_type_constructor_2 */2 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The type constructor", - _1: { - TAG: /* Formatting_lit */17, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "is not yet completely defined", - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "is not yet completely defined", + _1: /* End_of_format */0 } } } - }, - _1: "The type constructor@ %a@ is not yet completely defined" - }), path, param$1._0); - case /* Type_arity_mismatch */3 : - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "The type constructor@ %a@ is not yet completely defined" + }), path, param$1._0); + case /* Type_arity_mismatch */3 : + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type constructor ", _1: { - TAG: /* String_literal */11, - _0: "The type constructor ", - _1: { - TAG: /* Alpha */15, + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "expects ", _1: { - TAG: /* String_literal */11, - _0: "expects ", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " argument(s),", + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: " argument(s),", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "but is here applied to ", _1: { - TAG: /* String_literal */11, - _0: "but is here applied to ", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " argument(s)", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: " argument(s)", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -62011,152 +62010,164 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[The type constructor %a@ expects %i argument(s),@ but is here applied to %i argument(s)@]" - }), longident, param$1._0, param$1._1, param$1._2); - case /* Bound_type_variable */4 : - return Curry._1(Stdlib__Format.fprintf(param)({ + } + }, + _1: "@[The type constructor %a@ expects %i argument(s),@ but is here applied to %i argument(s)@]" + }), longident, param$1._0, param$1._1, param$1._2); + case /* Bound_type_variable */4 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Already bound type parameter '", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "Already bound type parameter '%s" + }), param$1._0); + case /* Unbound_row_variable */5 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound row variable in #", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound row variable in #%a" + }), longident, param$1._0); + case /* Type_mismatch */6 : + return report_unification_error(param, empty, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "Already bound type parameter '", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } + _0: "This type", + _1: /* End_of_format */0 }, - _1: "Already bound type parameter '%s" - }), param$1._0); - case /* Unbound_row_variable */5 : - return Curry._2(Stdlib__Format.fprintf(param)({ + _1: "This type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "Unbound row variable in #", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } + _0: "should be an instance of type", + _1: /* End_of_format */0 }, - _1: "Unbound row variable in #%a" - }), longident, param$1._0); - case /* Type_mismatch */6 : - return report_unification_error(param, empty, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This type", - _1: /* End_of_format */0 - }, - _1: "This type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "should be an instance of type", - _1: /* End_of_format */0 - }, - _1: "should be an instance of type" - }); - })); - case /* Alias_type_mismatch */7 : - return report_unification_error(param, empty, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This alias is bound to type", - _1: /* End_of_format */0 - }, - _1: "This alias is bound to type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is used as an instance of type", - _1: /* End_of_format */0 - }, - _1: "but is used as an instance of type" - }); - })); - case /* Present_has_conjunction */8 : - return Curry._1(Stdlib__Format.fprintf(param)({ + _1: "should be an instance of type" + }); + })); + case /* Alias_type_mismatch */7 : + return report_unification_error(param, empty, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "The present constructor ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " has a conjunctive type", - _1: /* End_of_format */0 - } - } + _0: "This alias is bound to type", + _1: /* End_of_format */0 }, - _1: "The present constructor %s has a conjunctive type" - }), param$1._0); - case /* Present_has_no_type */9 : - return Curry._1(Stdlib__Format.fprintf(param)({ + _1: "This alias is bound to type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "The present constructor ", + _0: "but is used as an instance of type", + _1: /* End_of_format */0 + }, + _1: "but is used as an instance of type" + }); + })); + case /* Present_has_conjunction */8 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The present constructor ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " has no type", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " has a conjunctive type", + _1: /* End_of_format */0 } - }, - _1: "The present constructor %s has no type" - }), param$1._0); - case /* Constructor_mismatch */10 : - const ty$p = param$1._1; - const ty = param$1._0; - return wrap_printing_env(env, (function (param$2) { - reset_and_mark_loops_list({ - hd: ty, - tl: { - hd: ty$p, - tl: /* [] */0 - } - }); - Curry._6(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "The present constructor %s has a conjunctive type" + }), param$1._0); + case /* Present_has_no_type */9 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The present constructor ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " has no type", + _1: /* End_of_format */0 + } + } + }, + _1: "The present constructor %s has no type" + }), param$1._0); + case /* Constructor_mismatch */10 : + const ty$p = param$1._1; + const ty = param$1._0; + return wrap_printing_env(env, (function (param$2) { + reset_and_mark_loops_list({ + hd: ty, + tl: { + hd: ty$p, + tl: /* [] */0 + } + }); + Curry._6(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Format */0, + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "" - } - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -62165,130 +62176,118 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } - }, - _1: "@[%s %a@ %s@ %a@]" - }), "This variant type contains a constructor", type_expr$1, ty, "which should be", type_expr$1, ty$p); - })); - case /* Not_a_variant */11 : - const ty$1 = param$1._0; - reset(undefined); - mark_loops(ty$1); - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[%s %a@ %s@ %a@]" + }), "This variant type contains a constructor", type_expr$1, ty, "which should be", type_expr$1, ty$p); + })); + case /* Not_a_variant */11 : + const ty$1 = param$1._0; + reset(undefined); + mark_loops(ty$1); + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type ", _1: { - TAG: /* String_literal */11, - _0: "The type ", - _1: { - TAG: /* Alpha */15, + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "is not a polymorphic variant type", _1: { - TAG: /* String_literal */11, - _0: "is not a polymorphic variant type", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } - }, - _1: "@[The type %a@ is not a polymorphic variant type@]" - }), type_expr$1, ty$1); - case /* Variant_tags */12 : - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "@[The type %a@ is not a polymorphic variant type@]" + }), type_expr$1, ty$1); + case /* Variant_tags */12 : + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Variant tags `", _1: { - TAG: /* String_literal */11, - _0: "Variant tags `", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "and `", _1: { - TAG: /* String_literal */11, - _0: "and `", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: " have the same hash value.", _1: { - TAG: /* String_literal */11, - _0: " have the same hash value.", + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -62297,130 +62296,69 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[Variant tags `%s@ and `%s have the same hash value.@ %s@]" - }), param$1._0, param$1._1, "Change one of them."); - case /* Invalid_variable_name */13 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The type variable name ", + } + }, + _1: "@[Variant tags `%s@ and `%s have the same hash value.@ %s@]" + }), param$1._0, param$1._1, "Change one of them."); + case /* Invalid_variable_name */13 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The type variable name ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is not allowed in programs", - _1: /* End_of_format */0 - } + TAG: /* String_literal */11, + _0: " is not allowed in programs", + _1: /* End_of_format */0 } - }, - _1: "The type variable name %s is not allowed in programs" - }), param$1._0); - case /* Cannot_quantify */14 : - const v = param$1._1; - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "The type variable name %s is not allowed in programs" + }), param$1._0); + case /* Cannot_quantify */14 : + const v = param$1._1; + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, + TAG: /* Format */0, _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The universal type variable '", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " cannot be generalized:", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" } }, - _1: "@[The universal type variable '%s cannot be generalized:@ %s.@]" - }), param$1._0, is_Tvar(v) ? "it escapes its scope" : ( - is_Tunivar(v) ? "it is already bound to another variable" : "it is not a variable" - )); - case /* Multiple_constraints_on_type */15 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _1: { TAG: /* String_literal */11, - _0: "Multiple constraints for type ", + _0: "The universal type variable '", _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Multiple constraints for type %a" - }), longident, param$1._0); - case /* Repeated_method_label */16 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "This is the second method `", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: " cannot be generalized:", _1: { - TAG: /* String_literal */11, - _0: "' of this object type.", + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Char_literal */12, + _0: /* '.' */46, _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, @@ -62431,151 +62369,213 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[This is the second method `%s' of this object type.@ %s@]" - }), param$1._0, "Multiple occurences are not allowed."); - case /* Unbound_value */17 : - const lid$1 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound value ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound value %a" - }), longident, lid$1); - return spellcheck$1(param, fold_values)(env, lid$1); - case /* Unbound_constructor */18 : - const lid$2 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound constructor ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound constructor %a" - }), longident, lid$2); - return spellcheck_simple(param, fold_constructors, (function (d) { - return d.cstr_name; - }))(env, lid$2); - case /* Unbound_label */19 : - const lid$3 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound record field ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound record field %a" - }), longident, lid$3); - return spellcheck_simple(param, fold_labels, (function (d) { - return d.lbl_name; - }))(env, lid$3); - case /* Unbound_module */20 : - const lid$4 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound module ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound module %a" - }), longident, lid$4); - return spellcheck$1(param, fold_modules)(env, lid$4); - case /* Unbound_class */21 : - const lid$5 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound class ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound class %a" - }), longident, lid$5); - return spellcheck$1(param, fold_classs)(env, lid$5); - case /* Unbound_modtype */22 : - const lid$6 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound module type ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound module type %a" - }), longident, lid$6); - return spellcheck$1(param, fold_modtypes)(env, lid$6); - case /* Unbound_cltype */23 : - const lid$7 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound class type ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Unbound class type %a" - }), longident, lid$7); - return spellcheck$1(param, fold_cltypes)(env, lid$7); - case /* Ill_typed_functor_application */24 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "@[The universal type variable '%s cannot be generalized:@ %s.@]" + }), param$1._0, is_Tvar(v) ? "it escapes its scope" : ( + is_Tunivar(v) ? "it is already bound to another variable" : "it is not a variable" + )); + case /* Multiple_constraints_on_type */15 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Multiple constraints for type ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Multiple constraints for type %a" + }), longident, param$1._0); + case /* Repeated_method_label */16 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* String_literal */11, - _0: "Ill-typed functor application ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" } }, - _1: "Ill-typed functor application %a" - }), longident, param$1._0); - case /* Access_functor_as_structure */25 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _1: { TAG: /* String_literal */11, - _0: "The module ", + _0: "This is the second method `", _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: " is a functor, not a structure", - _1: /* End_of_format */0 + _0: "' of this object type.", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } } } - }, - _1: "The module %a is a functor, not a structure" - }), longident, param$1._0); - - } - }), err._3); + } + }, + _1: "@[This is the second method `%s' of this object type.@ %s@]" + }), param$1._0, "Multiple occurences are not allowed."); + case /* Unbound_value */17 : + const lid$1 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound value ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound value %a" + }), longident, lid$1); + return spellcheck$1(param, fold_values)(env, lid$1); + case /* Unbound_constructor */18 : + const lid$2 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound constructor ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound constructor %a" + }), longident, lid$2); + return spellcheck_simple(param, fold_constructors, (function (d) { + return d.cstr_name; + }))(env, lid$2); + case /* Unbound_label */19 : + const lid$3 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound record field ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound record field %a" + }), longident, lid$3); + return spellcheck_simple(param, fold_labels, (function (d) { + return d.lbl_name; + }))(env, lid$3); + case /* Unbound_module */20 : + const lid$4 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound module ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound module %a" + }), longident, lid$4); + return spellcheck$1(param, fold_modules)(env, lid$4); + case /* Unbound_class */21 : + const lid$5 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound class ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound class %a" + }), longident, lid$5); + return spellcheck$1(param, fold_classs)(env, lid$5); + case /* Unbound_modtype */22 : + const lid$6 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound module type ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound module type %a" + }), longident, lid$6); + return spellcheck$1(param, fold_modtypes)(env, lid$6); + case /* Unbound_cltype */23 : + const lid$7 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound class type ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Unbound class type %a" + }), longident, lid$7); + return spellcheck$1(param, fold_cltypes)(env, lid$7); + case /* Ill_typed_functor_application */24 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Ill-typed functor application ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Ill-typed functor application %a" + }), longident, param$1._0); + case /* Access_functor_as_structure */25 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The module ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* String_literal */11, + _0: " is a functor, not a structure", + _1: /* End_of_format */0 + } + } + }, + _1: "The module %a is a functor, not a structure" + }), longident, param$1._0); + + } + }), err._3); }); const $$Error$7 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typecore.Error"); @@ -62584,54 +62584,54 @@ const Error_forward$1 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_t const type_module = { contents: (function (env, md) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 42440, - 22 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 42440, + 22 + ] + }); + }) }; const type_open = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 42446, - 16 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 42446, + 16 + ] + }); + }) }; const type_package = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 42451, - 16 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 42451, + 16 + ] + }); + }) }; const type_object = { contents: (function (env, s) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 42455, - 20 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 42455, + 20 + ] + }); + }) }; function re(node) { @@ -62681,8 +62681,8 @@ function iter_expression(f, e) { case /* Pexp_apply */5 : expr(pel._0); return Stdlib__List.iter((function (param) { - expr(param[1]); - }), pel._1); + expr(param[1]); + }), pel._1); case /* Pexp_match */6 : case /* Pexp_try */7 : break; @@ -62692,8 +62692,8 @@ function iter_expression(f, e) { case /* Pexp_record */11 : may(expr, pel._1); return Stdlib__List.iter((function (param) { - expr(param[1]); - }), pel._0); + expr(param[1]); + }), pel._0); case /* Pexp_setfield */13 : expr(pel._0); _e = pel._2; @@ -62717,8 +62717,8 @@ function iter_expression(f, e) { continue; case /* Pexp_override */24 : return Stdlib__List.iter((function (param) { - expr(param[1]); - }), pel._0); + expr(param[1]); + }), pel._0); case /* Pexp_letmodule */25 : expr(pel._2); return module_expr(pel._1); @@ -62790,12 +62790,12 @@ function iter_expression(f, e) { return module_expr(l._0.pmb_expr); case /* Pstr_recmodule */7 : return Stdlib__List.iter((function (x) { - module_expr(x.pmb_expr); - }), l._0); + module_expr(x.pmb_expr); + }), l._0); case /* Pstr_class */10 : return Stdlib__List.iter((function (c) { - class_expr(c.pci_expr); - }), l._0); + class_expr(c.pci_expr); + }), l._0); case /* Pstr_include */12 : return module_expr(l._0.pincl_mod); default: @@ -62816,8 +62816,8 @@ function iter_expression(f, e) { case /* Pcl_apply */3 : class_expr(match._0); return Stdlib__List.iter((function (param) { - expr(param[1]); - }), match._1); + expr(param[1]); + }), match._1); case /* Pcl_let */4 : Stdlib__List.iter(binding, match._1); _ce = match._2; @@ -62881,17 +62881,17 @@ function all_idents_cases(el) { } }; Stdlib__List.iter((function (cp) { - may((function (param) { - return iter_expression(f, param); - }), cp.pc_guard); - iter_expression(f, cp.pc_rhs); - }), el); + may((function (param) { + return iter_expression(f, param); + }), cp.pc_guard); + iter_expression(f, cp.pc_rhs); + }), el); return Stdlib__Hashtbl.fold((function (x, param, rest) { - return { - hd: x, - tl: rest - }; - }), idents, /* [] */0); + return { + hd: x, + tl: rest + }; + }), idents, /* [] */0); } function type_constant(param) { @@ -63050,8 +63050,8 @@ function extract_label_names(sexp, env, ty) { try { const match = extract_concrete_record(env, ty); return Stdlib__List.map((function (l) { - return l.ld_id; - }), match[2]); + return l.ld_id; + }), match[2]); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -63071,14 +63071,14 @@ function extract_label_names(sexp, env, ty) { function explicit_arity(param) { return Stdlib__List.exists((function (param) { - switch (param[0].txt) { - case "explicit_arity" : - case "ocaml.explicit_arity" : - return true; - default: - return false; - } - }), param); + switch (param[0].txt) { + case "explicit_arity" : + case "ocaml.explicit_arity" : + return true; + default: + return false; + } + }), param); } function unify_pat_types(loc, env, ty, ty$p) { @@ -63186,8 +63186,8 @@ function unify_pat_types_gadt(loc, env, ty, ty$p) { univar_pairs.contents = /* [] */0; newtype_level.contents = newtype_level$2; set_mode_pattern(true, true, (function (param) { - unify$1(env, ty, ty$p); - })); + unify$1(env, ty, ty$p); + })); newtype_level.contents = undefined; return Curry._1(TypePairs.clear, unify_eq_set); } @@ -63311,8 +63311,8 @@ function finalize_variant(pat) { if (opat !== undefined) { const partial_arg = opat.pat_env; return Stdlib__List.iter((function (param) { - return unify_pat(partial_arg, opat, param); - }), { + return unify_pat(partial_arg, opat, param); + }), { hd: ty, tl: match$3.tl }); @@ -63345,24 +63345,24 @@ function finalize_variant(pat) { function iter_pattern(f, p) { Curry._1(f, p); iter_pattern_desc((function (param) { - return iter_pattern(f, param); - }), p.pat_desc); + return iter_pattern(f, param); + }), p.pat_desc); } function has_variants(p) { try { iter_pattern((function (param) { - let tmp = param.pat_desc; - if (/* tag */typeof tmp === "number" || typeof tmp === "string") { - return; - } - if (tmp.TAG !== /* Tpat_variant */5) { - return; - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - }), p); + let tmp = param.pat_desc; + if (/* tag */typeof tmp === "number" || typeof tmp === "string") { + return; + } + if (tmp.TAG !== /* Tpat_variant */5) { + return; + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + }), p); return false; } catch (raw_exn){ @@ -63406,8 +63406,8 @@ function enter_variable(is_moduleOpt, is_as_variableOpt, loc, name, ty) { const is_module = is_moduleOpt !== undefined ? is_moduleOpt : false; const 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)) { + return param[0].name === name.txt; + }), pattern_variables.contents)) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: loc, @@ -63447,21 +63447,21 @@ function enter_variable(is_moduleOpt, is_as_variableOpt, loc, name, ty) { }; } else { may((function (s) { - record$2({ - TAG: /* An_ident */5, - _0: name.loc, - _1: name.txt, - _2: s - }); - }), pattern_scope.contents); + record$2({ + TAG: /* An_ident */5, + _0: name.loc, + _1: name.txt, + _2: s + }); + }), pattern_scope.contents); } return id; } function sort_pattern_variables(vs) { return Stdlib__List.sort((function (param, param$1) { - return Caml.caml_string_compare(param[0].name, param$1[0].name); - }), vs); + return Caml.caml_string_compare(param[0].name, param$1[0].name); + }), vs); } function enter_orpat_variables(loc, env, p1_vs, p2_vs) { @@ -63563,8 +63563,8 @@ function build_as_type(env, _p) { continue; case /* Tpat_tuple */3 : const tyl = Stdlib__List.map((function (param) { - return build_as_type(env, param); - }), pl._0); + return build_as_type(env, param); + }), pl._0); return newty2(current_level.contents, { TAG: /* Ttuple */2, _0: tyl @@ -63577,28 +63577,28 @@ function build_as_type(env, _p) { return p.pat_type; } const tyl$1 = Stdlib__List.map((function (param) { - return build_as_type(env, param); - }), pl$1); + return build_as_type(env, param); + }), pl$1); const match = instance_constructor(undefined, cstr); Stdlib__List.iter2((function (param) { - const p = param[0]; - const partial_arg = { - pat_desc: p.pat_desc, - pat_loc: p.pat_loc, - pat_extra: p.pat_extra, - pat_type: param[1], - pat_env: p.pat_env, - pat_attributes: p.pat_attributes - }; - return function (param) { - return unify_pat(env, partial_arg, param); - }; - }), Stdlib__List.combine(pl$1, tyl$1), match[0]); + const p = param[0]; + const partial_arg = { + pat_desc: p.pat_desc, + pat_loc: p.pat_loc, + pat_extra: p.pat_extra, + pat_type: param[1], + pat_env: p.pat_env, + pat_attributes: p.pat_attributes + }; + return function (param) { + return unify_pat(env, partial_arg, param); + }; + }), Stdlib__List.combine(pl$1, tyl$1), match[0]); return match[1]; case /* Tpat_variant */5 : const ty = may_map((function (param) { - return build_as_type(env, param); - }), pl._1); + return build_as_type(env, param); + }), pl._1); const desc = { TAG: /* Tvariant */8, _0: { @@ -63628,11 +63628,11 @@ function build_as_type(env, _p) { } const ty$1 = newvar(undefined, undefined); const ppl = Stdlib__List.map((function (param) { - return [ - param[1].lbl_pos, - param[2] - ]; - }), lpl); + return [ + param[1].lbl_pos, + param[2] + ]; + }), lpl); const do_label = function (lbl) { const match = instance_label(false, lbl); const ty_arg = match[1]; @@ -63711,8 +63711,8 @@ function build_or_pat(env, loc, lid) { const match = find_type(env, loc, lid); const path = match[0]; const tyl = Stdlib__List.map((function (param) { - return newvar(undefined, undefined); - }), match[1].type_params); + return newvar(undefined, undefined); + }), match[1].type_params); const ty = expand_head(env, newty2(current_level.contents, { TAG: /* Tconstr */3, _0: path, @@ -63746,85 +63746,85 @@ function build_or_pat(env, loc, lid) { }); } const match$1 = Stdlib__List.fold_left((function (param, param$1) { - const l = param$1[0]; - const fields = param[1]; - const pats = param[0]; - const match = row_field_repr_aux(/* [] */0, param$1[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return [ - pats, - fields - ]; - } - if (match.TAG !== /* Rpresent */0) { - return [ - pats, - fields - ]; - } - const ty = match._0; - if (ty !== undefined) { - return [ - { - hd: [ - l, - { - pat_desc: /* Tpat_any */0, - pat_loc: none, - pat_extra: /* [] */0, - pat_type: ty, - pat_env: env, - pat_attributes: /* [] */0 - } - ], - tl: pats - }, - { - hd: [ - l, - { - TAG: /* Reither */1, - _0: false, - _1: { - hd: ty, - tl: /* [] */0 - }, - _2: true, - _3: { - contents: undefined - } + const l = param$1[0]; + const fields = param[1]; + const pats = param[0]; + const match = row_field_repr_aux(/* [] */0, param$1[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return [ + pats, + fields + ]; + } + if (match.TAG !== /* Rpresent */0) { + return [ + pats, + fields + ]; + } + const ty = match._0; + if (ty !== undefined) { + return [ + { + hd: [ + l, + { + pat_desc: /* Tpat_any */0, + pat_loc: none, + pat_extra: /* [] */0, + pat_type: ty, + pat_env: env, + pat_attributes: /* [] */0 + } + ], + tl: pats + }, + { + hd: [ + l, + { + TAG: /* Reither */1, + _0: false, + _1: { + hd: ty, + tl: /* [] */0 + }, + _2: true, + _3: { + contents: undefined } - ], - tl: fields - } - ]; - } else { - return [ - { - hd: [ - l, - undefined - ], - tl: pats - }, - { - hd: [ - l, - { - TAG: /* Reither */1, - _0: true, - _1: /* [] */0, - _2: true, - _3: { - contents: undefined - } + } + ], + tl: fields + } + ]; + } else { + return [ + { + hd: [ + l, + undefined + ], + tl: pats + }, + { + hd: [ + l, + { + TAG: /* Reither */1, + _0: true, + _1: /* [] */0, + _2: true, + _3: { + contents: undefined } - ], - tl: fields - } - ]; - } - }), [ + } + ], + tl: fields + } + ]; + } + }), [ /* [] */0, /* [] */0 ], row_repr_aux(/* [] */0, row0).row_fields); @@ -63864,12 +63864,28 @@ function build_or_pat(env, loc, lid) { } }; const pats = Stdlib__List.map((function (param) { + return { + pat_desc: { + TAG: /* Tpat_variant */5, + _0: param[0], + _1: param[1], + _2: row$p + }, + pat_loc: gloc, + pat_extra: /* [] */0, + pat_type: ty$1, + pat_env: env, + pat_attributes: /* [] */0 + }; + }), match$1[0]); + if (pats) { + const r = Stdlib__List.fold_left((function (pat, pat0) { return { pat_desc: { - TAG: /* Tpat_variant */5, - _0: param[0], - _1: param[1], - _2: row$p + TAG: /* Tpat_or */8, + _0: pat0, + _1: pat, + _2: row0 }, pat_loc: gloc, pat_extra: /* [] */0, @@ -63877,23 +63893,7 @@ function build_or_pat(env, loc, lid) { pat_env: env, pat_attributes: /* [] */0 }; - }), match$1[0]); - if (pats) { - const r = Stdlib__List.fold_left((function (pat, pat0) { - return { - pat_desc: { - TAG: /* Tpat_or */8, - _0: pat0, - _1: pat, - _2: row0 - }, - pat_loc: gloc, - pat_extra: /* [] */0, - pat_type: ty$1, - pat_env: env, - pat_attributes: /* [] */0 - }; - }), pats.hd, pats.tl); + }), pats.hd, pats.tl); return [ path, rp({ @@ -64031,8 +64031,8 @@ function lookup_from_type(env, tpath, lid) { const s$1 = s._0; try { return Stdlib__List.find((function (nd) { - return nd.lbl_name === s$1; - }), descrs); + return nd.lbl_name === s$1; + }), descrs); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -64087,11 +64087,11 @@ function unique(eq, _acc, _param) { function ambiguous_types(env, lbl, others) { const tpath = get_type_path$1(env, lbl); const others$1 = Stdlib__List.map((function (param) { - return get_type_path$1(env, param[0]); - }), others); + return get_type_path$1(env, param[0]); + }), others); const tpaths = unique((function (param, param$1) { - return compare_type_path(env, param, param$1); - }), { + return compare_type_path(env, param, param$1); + }), { hd: tpath, tl: /* [] */0 }, others$1); @@ -64113,8 +64113,8 @@ function disambiguate_by_type(env, tpath, lbls) { function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { const warn = warnOpt !== undefined ? warnOpt : prerr_warning; const check_lk = check_lkOpt !== undefined ? check_lkOpt : (function (param, param$1) { - - }); + + }); const scope$1 = scope !== undefined ? scope : lbls; let lbl; if (opath !== undefined) { @@ -64191,13 +64191,13 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { tp_1 ]; const tpl = Stdlib__List.map((function (param) { - const tp0 = get_type_path$1(env, param[0]); - const tp = expand_path(env, tp0); - return [ - tp0, - tp - ]; - }), lbls); + const tp0 = get_type_path$1(env, param[0]); + const tp = expand_path(env, tp0); + return [ + tp0, + tp + ]; + }), lbls); throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: lid.loc, @@ -64254,11 +64254,11 @@ function disambiguate_label_by_ids(keep, env, closed, ids, labels) { const check_ids = function (param) { const lbls = Stdlib__Hashtbl.create(undefined, 8); Stdlib__Array.iter((function (lbl) { - Stdlib__Hashtbl.add(lbls, lbl.lbl_name, undefined); - }), param[0].lbl_all); + Stdlib__Hashtbl.add(lbls, lbl.lbl_name, undefined); + }), param[0].lbl_all); return Stdlib__List.for_all((function (param) { - return Stdlib__Hashtbl.mem(lbls, param); - }), ids); + return Stdlib__Hashtbl.mem(lbls, param); + }), ids); }; const check_closed = function (param) { if (closed) { @@ -64290,8 +64290,8 @@ function disambiguate_label_by_ids(keep, env, closed, ids, labels) { function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { const ids = Stdlib__List.map((function (param) { - return last$1(param[0].txt); - }), lid_a_list); + return last$1(param[0].txt); + }), lid_a_list); const w_pr = { contents: false }; @@ -64368,13 +64368,13 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { } }; const lbl_a_list = Stdlib__List.map((function (param) { - const lid = param[0]; - return [ - lid, - process_label(lid), - param[1] - ]; - }), lid_a_list); + const lid = param[0]; + return [ + lid, + process_label(lid), + param[1] + ]; + }), lid_a_list); if (w_pr.contents) { prerr_warning(loc, { TAG: /* Not_principal */8, @@ -64384,32 +64384,32 @@ function disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list) { const amb = Stdlib__List.rev(w_amb.contents); if (amb) { const paths = Stdlib__List.map((function (param) { - return get_type_path$1(env, param[1]); - }), lbl_a_list); + return get_type_path$1(env, param[1]); + }), lbl_a_list); const path = Stdlib__List.hd(paths); if (Stdlib__List.for_all((function (param) { - return compare_type_path(env, path, param); - }), Stdlib__List.tl(paths))) { + return compare_type_path(env, path, param); + }), Stdlib__List.tl(paths))) { prerr_warning(loc, { TAG: /* Ambiguous_name */24, _0: Stdlib__List.map((function (prim) { - return prim[0]; - }), amb), + return prim[0]; + }), amb), _1: amb.hd[1], _2: true }); } else { Stdlib__List.iter((function (param) { - prerr_warning(loc, { - TAG: /* Ambiguous_name */24, - _0: { - hd: param[0], - tl: /* [] */0 - }, - _1: param[1], - _2: false - }); - }), amb); + prerr_warning(loc, { + TAG: /* Ambiguous_name */24, + _0: { + hd: param[0], + tl: /* [] */0 + }, + _1: param[1], + _2: false + }); + }), amb); } } @@ -64455,28 +64455,28 @@ function type_label_a_list(labels, loc, closed, env, type_lbl_a, opath, lid_a_li const labels$1 = Caml_option.valFromOption(labels); if (Stdlib__Hashtbl.mem(labels$1, s._0)) { lbl_a_list = Stdlib__List.map((function (param) { - const lid = param[0]; - const s = lid.txt; - switch (s.TAG) { - case /* Lident */0 : - return [ - lid, - Stdlib__Hashtbl.find(labels$1, s._0), - param[1] - ]; - case /* Ldot */1 : - case /* Lapply */2 : - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 43182, - 17 - ] - }); - - } - }), lid_a_list); + const lid = param[0]; + const s = lid.txt; + switch (s.TAG) { + case /* Lident */0 : + return [ + lid, + Stdlib__Hashtbl.find(labels$1, s._0), + param[1] + ]; + case /* Ldot */1 : + case /* Lapply */2 : + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 43182, + 17 + ] + }); + + } + }), lid_a_list); } else { exit = 1; } @@ -64496,32 +64496,32 @@ function type_label_a_list(labels, loc, closed, env, type_lbl_a, opath, lid_a_li if (exit === 1) { const modname = find_record_qual(lid_a_list); const lid_a_list$1 = modname !== undefined ? Stdlib__List.map((function (lid_a) { - const lid = lid_a[0]; - const s = lid.txt; - switch (s.TAG) { - case /* Lident */0 : - return [ - { - txt: { - TAG: /* Ldot */1, - _0: modname, - _1: s._0 - }, - loc: lid.loc + const lid = lid_a[0]; + const s = lid.txt; + switch (s.TAG) { + case /* Lident */0 : + return [ + { + txt: { + TAG: /* Ldot */1, + _0: modname, + _1: s._0 }, - lid_a[1] - ]; - case /* Ldot */1 : - case /* Lapply */2 : - return lid_a; - - } - }), lid_a_list) : lid_a_list; + loc: lid.loc + }, + lid_a[1] + ]; + case /* Ldot */1 : + case /* Lapply */2 : + return lid_a; + + } + }), lid_a_list) : lid_a_list; lbl_a_list = disambiguate_lid_a_list(loc, closed, env, opath, lid_a_list$1); } const 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 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); } @@ -64548,9 +64548,9 @@ function check_recordpat_labels(loc, lbl_pat_list, closed) { }; Stdlib__List.iter(check_defined, lbl_pat_list); if (!(closed === /* Closed */0 && is_active({ - TAG: /* Non_closed_record_pattern */4, - _0: "" - }))) { + TAG: /* Non_closed_record_pattern */4, + _0: "" + }))) { return; } let $$undefined = /* [] */0; @@ -64609,8 +64609,8 @@ function lookup_from_type$1(env, tpath, lid) { const s$1 = s._0; try { return Stdlib__List.find((function (nd) { - return nd.cstr_name === s$1; - }), descrs); + return nd.cstr_name === s$1; + }), descrs); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -64665,11 +64665,11 @@ function unique$1(eq, _acc, _param) { function ambiguous_types$1(env, lbl, others) { const tpath = get_type_path$2(env, lbl); const others$1 = Stdlib__List.map((function (param) { - return get_type_path$2(env, param[0]); - }), others); + return get_type_path$2(env, param[0]); + }), others); const tpaths = unique$1((function (param, param$1) { - return compare_type_path(env, param, param$1); - }), { + return compare_type_path(env, param, param$1); + }), { hd: tpath, tl: /* [] */0 }, others$1); @@ -64691,8 +64691,8 @@ function disambiguate_by_type$1(env, tpath, lbls) { function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { const warn = warnOpt !== undefined ? warnOpt : prerr_warning; const check_lk = check_lkOpt !== undefined ? check_lkOpt : (function (param, param$1) { - - }); + + }); const scope$1 = scope !== undefined ? scope : lbls; let lbl; if (opath !== undefined) { @@ -64769,13 +64769,13 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { tp_1 ]; const tpl = Stdlib__List.map((function (param) { - const tp0 = get_type_path$2(env, param[0]); - const tp = expand_path(env, tp0); - return [ - tp0, - tp - ]; - }), lbls); + const tp0 = get_type_path$2(env, param[0]); + const tp = expand_path(env, tp0); + return [ + tp0, + tp + ]; + }), lbls); throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: lid.loc, @@ -64847,8 +64847,8 @@ function unify_head_only(loc, env, ty, constr) { TAG: /* Tconstr */3, _0: match$1._0, _1: Stdlib__List.map((function (param) { - return newvar(undefined, undefined); - }), match$1._1), + return newvar(undefined, undefined); + }), match$1._1), _2: match$1._2 }; enforce_constraints(env, ty_res); @@ -64993,22 +64993,22 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) ill_formed_ast(loc, "Tuples must have at least 2 components."); } const spl_ann = Stdlib__List.map((function (p) { - return [ - p, - newvar(undefined, undefined) - ]; - }), spl); + return [ + p, + newvar(undefined, undefined) + ]; + }), spl); const desc = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (prim) { - return prim[1]; - }), spl_ann) + return prim[1]; + }), spl_ann) }; const ty = newty2(current_level.contents, desc); unify_pat_types(loc, env.contents, ty, expected_ty); const pl = Stdlib__List.map((function (param) { - return type_pat$1(undefined, undefined)(param[0], param[1]); - }), spl_ann); + return type_pat$1(undefined, undefined)(param[0], param[1]); + }), spl_ann); return rp({ pat_desc: { TAG: /* Tpat_tuple */3, @@ -65053,8 +65053,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) hd: [ Stdlib__Hashtbl.find(constrs$2, s), (function (param) { - - }) + + }) ], tl: /* [] */0 }; @@ -65092,8 +65092,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) const partial_arg = env.contents; const partial_arg$1 = check_lk; const 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); + 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); check_deprecated(loc, constr.cstr_attributes, constr.cstr_name); if (no_existentials && Caml_obj.caml_notequal(constr.cstr_existentials, /* [] */0)) { @@ -65155,8 +65155,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) unify_pat_types(loc, env.contents, ty_res, expected_ty); } const args = Stdlib__List.map2((function (p, t) { - return type_pat$1(undefined, undefined)(p, t); - }), sargs, match$2[0]); + return type_pat$1(undefined, undefined)(p, t); + }), sargs, match$2[0]); return rp({ pat_desc: { TAG: /* Tpat_construct */4, @@ -65324,8 +65324,8 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) }; const partial_arg$2 = env.contents; const 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); + 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); unify_pat_types(loc, env.contents, record_ty, expected_ty); return rp({ @@ -65344,14 +65344,14 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) const ty_elt = newvar(undefined, undefined); unify_pat_types(loc, env.contents, instance_def(type_array(ty_elt)), expected_ty); const spl_ann$1 = Stdlib__List.map((function (p) { - return [ - p, - newvar(undefined, undefined) - ]; - }), name._0); + return [ + p, + newvar(undefined, undefined) + ]; + }), name._0); const pl$1 = Stdlib__List.map((function (param) { - return type_pat$1(undefined, undefined)(param[0], ty_elt); - }), spl_ann$1); + return type_pat$1(undefined, undefined)(param[0], ty_elt); + }), spl_ann$1); return rp({ pat_desc: { TAG: /* Tpat_array */7, @@ -65617,8 +65617,8 @@ function type_pat$1(allow_existentialsOpt, constrs, labels, levOpt, env, sp, exp try { const r = type_pat(constrs, labels, !allow_existentials, /* Normal */0, env, sp, expected_ty); iter_pattern((function (p) { - p.pat_env = env.contents; - }), r); + p.pat_env = env.contents; + }), r); newtype_level$1.contents = undefined; return r; } @@ -65655,8 +65655,8 @@ function check_partial$1(levOpt, env, expected_ty) { return /* Partial */0; } else { return check_partial_param((function (param, param$1, param$2) { - return do_check_partial(pred, exhaust_gadt$1, param, param$1, param$2); - }), do_check_fragile_gadt, param, param$1); + return do_check_partial(pred, exhaust_gadt$1, param, param$1, param$2); + }), do_check_fragile_gadt, param, param$1); } }; } @@ -65665,14 +65665,14 @@ function add_pattern_variables(check, check_as, env) { const pv = get_ref(pattern_variables); return [ Stdlib__List.fold_right((function (param, env) { - const check$1 = param[4] ? check_as : check; - return add_value(check$1, param[0], { - val_type: param[1], - val_kind: /* Val_reg */0, - val_loc: param[3], - val_attributes: /* [] */0 - }, env); - }), pv, env), + const check$1 = param[4] ? check_as : check; + return add_value(check$1, param[0], { + val_type: param[1], + val_kind: /* Val_reg */0, + val_loc: param[3], + val_attributes: /* [] */0 + }, env); + }), pv, env), get_ref(module_variables) ]; } @@ -65684,16 +65684,16 @@ function type_pattern(lev, env, spat, scope, expected_ty) { }; const pat = type_pat$1(true, undefined, undefined, lev, new_env, spat, expected_ty); const match = add_pattern_variables((function (s) { - return { - TAG: /* Unused_var_strict */13, - _0: s - }; - }), (function (s) { - return { - TAG: /* Unused_var */12, - _0: s - }; - }), new_env.contents); + return { + TAG: /* Unused_var_strict */13, + _0: s + }; + }), (function (s) { + return { + TAG: /* Unused_var */12, + _0: s + }; + }), new_env.contents); return [ pat, match[0], @@ -65708,8 +65708,8 @@ function type_pattern_list(env, spatl, scope, expected_tys, allow) { contents: env }; const patl = Stdlib__List.map2((function (param, param$1) { - return type_pat$1(undefined, undefined, undefined, undefined, new_env, param, param$1); - }), spatl, expected_tys); + return type_pat$1(undefined, undefined, undefined, undefined, new_env, param, param$1); + }), spatl, expected_tys); const match = add_pattern_variables(undefined, undefined, new_env.contents); return [ patl, @@ -65733,51 +65733,51 @@ function type_class_arg_pattern(cl_num, val_env, met_env, l, spat) { iter_pattern(finalize_variant, pat); } Stdlib__List.iter((function (f) { - Curry._1(f, undefined); - }), get_ref(pattern_force)); + Curry._1(f, undefined); + }), get_ref(pattern_force)); if (is_optional(l)) { unify_pat(val_env, pat, type_option$1(newvar(undefined, undefined))); } const match = Stdlib__List.fold_right((function (param, param$1) { - const as_var = param[4]; - const ty = param[1]; - const id = param[0]; - const check = function (s) { - if (as_var) { - return { - TAG: /* Unused_var */12, - _0: s - }; - } else { - return { - TAG: /* Unused_var_strict */13, - _0: s - }; - } - }; - const id$p = create(id.name); - return [ - { - hd: [ - id$p, - param[2], - id, - ty - ], - tl: param$1[0] - }, - add_value(check, id$p, { - val_type: ty, - val_kind: { - TAG: /* Val_ivar */1, - _0: /* Immutable */0, - _1: cl_num - }, - val_loc: param[3], - val_attributes: /* [] */0 - }, param$1[1]) - ]; - }), pattern_variables.contents, [ + const as_var = param[4]; + const ty = param[1]; + const id = param[0]; + const check = function (s) { + if (as_var) { + return { + TAG: /* Unused_var */12, + _0: s + }; + } else { + return { + TAG: /* Unused_var_strict */13, + _0: s + }; + } + }; + const id$p = create(id.name); + return [ + { + hd: [ + id$p, + param[2], + id, + ty + ], + tl: param$1[0] + }, + add_value(check, id$p, { + val_type: ty, + val_kind: { + TAG: /* Val_ivar */1, + _0: /* Immutable */0, + _1: cl_num + }, + val_loc: param[3], + val_attributes: /* [] */0 + }, param$1[1]) + ]; + }), pattern_variables.contents, [ /* [] */0, met_env ]); @@ -65812,8 +65812,8 @@ function type_self_pattern(cl_num, privty, val_env, met_env, par_env, spat) { contents: val_env }, spat$1, nv); Stdlib__List.iter((function (f) { - Curry._1(f, undefined); - }), get_ref(pattern_force)); + Curry._1(f, undefined); + }), get_ref(pattern_force)); const meths = { contents: /* Empty */0 }; @@ -65823,49 +65823,49 @@ function type_self_pattern(cl_num, privty, val_env, met_env, par_env, spat) { const pv = pattern_variables.contents; pattern_variables.contents = /* [] */0; const match = Stdlib__List.fold_right((function (param, param$1) { - const as_var = param[4]; - const loc = param[3]; - const ty = param[1]; - const id = param[0]; - return [ - add_value(undefined, id, { - val_type: ty, - val_kind: /* Val_unbound */1, - val_loc: loc, - val_attributes: /* [] */0 - }, param$1[0]), - add_value((function (s) { - if (as_var) { - return { - TAG: /* Unused_var */12, - _0: s - }; - } else { - return { - TAG: /* Unused_var_strict */13, - _0: s - }; - } - }), id, { - val_type: ty, - val_kind: { - TAG: /* Val_self */2, - _0: meths, - _1: vars, - _2: cl_num, - _3: privty - }, - val_loc: loc, - val_attributes: /* [] */0 - }, param$1[1]), - add_value(undefined, id, { - val_type: ty, - val_kind: /* Val_unbound */1, - val_loc: loc, - val_attributes: /* [] */0 - }, param$1[2]) - ]; - }), pv, [ + const as_var = param[4]; + const loc = param[3]; + const ty = param[1]; + const id = param[0]; + return [ + add_value(undefined, id, { + val_type: ty, + val_kind: /* Val_unbound */1, + val_loc: loc, + val_attributes: /* [] */0 + }, param$1[0]), + add_value((function (s) { + if (as_var) { + return { + TAG: /* Unused_var */12, + _0: s + }; + } else { + return { + TAG: /* Unused_var_strict */13, + _0: s + }; + } + }), id, { + val_type: ty, + val_kind: { + TAG: /* Val_self */2, + _0: meths, + _1: vars, + _2: cl_num, + _3: privty + }, + val_loc: loc, + val_attributes: /* [] */0 + }, param$1[1]), + add_value(undefined, id, { + val_type: ty, + val_kind: /* Val_unbound */1, + val_loc: loc, + val_attributes: /* [] */0 + }, param$1[2]) + ]; + }), pv, [ val_env, met_env, par_env @@ -65898,9 +65898,9 @@ function force_delayed_checks(param) { const snap = snapshot(undefined); const w_old = current.contents; Stdlib__List.iter((function (param) { - current.contents = param[1]; - Curry._1(param[0], undefined); - }), Stdlib__List.rev(delayed_checks.contents)); + current.contents = param[1]; + Curry._1(param[0], undefined); + }), Stdlib__List.rev(delayed_checks.contents)); current.contents = w_old; delayed_checks.contents = /* [] */0; backtrack(snap); @@ -65941,8 +65941,8 @@ function is_nonexpansive(_exp) { switch (el.TAG) { case /* Texp_let */2 : if (!Stdlib__List.for_all((function (vb) { - return is_nonexpansive(vb.vb_expr); - }), el._1)) { + return is_nonexpansive(vb.vb_expr); + }), el._1)) { return false; } _exp = el._2; @@ -65963,12 +65963,12 @@ function is_nonexpansive(_exp) { return false; } else { return Stdlib__List.for_all((function (param) { - if (is_nonexpansive_opt(param.c_guard)) { - return is_nonexpansive(param.c_rhs); - } else { - return false; - } - }), el._1); + if (is_nonexpansive_opt(param.c_guard)) { + return is_nonexpansive(param.c_rhs); + } else { + return false; + } + }), el._1); } case /* Texp_tuple */7 : return Stdlib__List.for_all(is_nonexpansive, el._0); @@ -65978,8 +65978,8 @@ function is_nonexpansive(_exp) { return is_nonexpansive_opt(el._1); case /* Texp_record */10 : if (Stdlib__List.for_all((function (param) { - return param[1].lbl_mut === /* Immutable */0 ? is_nonexpansive(param[2]) : false; - }), el._0)) { + return param[1].lbl_mut === /* Immutable */0 ? is_nonexpansive(param[2]) : false; + }), el._0)) { return is_nonexpansive_opt(el._1); } else { return false; @@ -66017,27 +66017,27 @@ function is_nonexpansive(_exp) { contents: 0 }; if (Stdlib__List.for_all((function (field) { - const e = field.cf_desc; - switch (e.TAG) { - case /* Tcf_inherit */0 : - return false; - case /* Tcf_val */1 : - const match = e._3; - if (match.TAG === /* Tcfk_virtual */0) { - count.contents = count.contents + 1 | 0; - return true; - } + const e = field.cf_desc; + switch (e.TAG) { + case /* Tcf_inherit */0 : + return false; + case /* Tcf_val */1 : + const match = e._3; + if (match.TAG === /* Tcfk_virtual */0) { count.contents = count.contents + 1 | 0; - return is_nonexpansive(match._1); - case /* Tcf_initializer */4 : - return is_nonexpansive(e._0); - default: - return true; - } - }), match$1.cstr_fields) && Curry._3(Meths.fold, (function (param, param$1, b) { - count.contents = count.contents - 1 | 0; - return b ? param$1[0] === /* Immutable */0 : false; - }), match$1.cstr_type.csig_vars, true)) { + return true; + } + count.contents = count.contents + 1 | 0; + return is_nonexpansive(match._1); + case /* Tcf_initializer */4 : + return is_nonexpansive(e._0); + default: + return true; + } + }), match$1.cstr_fields) && Curry._3(Meths.fold, (function (param, param$1, b) { + count.contents = count.contents - 1 | 0; + return b ? param$1[0] === /* Immutable */0 : false; + }), match$1.cstr_type.csig_vars, true)) { return count.contents === 0; } else { return false; @@ -66057,42 +66057,42 @@ function is_nonexpansive_mod(_mexp) { switch (str.TAG) { case /* Tmod_structure */1 : return Stdlib__List.for_all((function (item) { - const id_mod_list = item.str_desc; - switch (id_mod_list.TAG) { - case /* Tstr_value */1 : - return Stdlib__List.for_all((function (vb) { - return is_nonexpansive(vb.vb_expr); - }), id_mod_list._1); - case /* Tstr_typext */4 : - return Stdlib__List.for_all((function (param) { - if (param.ext_kind.TAG === /* Text_decl */0) { - return false; - } else { - return true; - } - }), id_mod_list._0.tyext_constructors); - case /* Tstr_exception */5 : - if (id_mod_list._0.ext_kind.TAG === /* Text_decl */0) { - return false; - } else { - return true; - } - case /* Tstr_module */6 : - return is_nonexpansive_mod(id_mod_list._0.mb_expr); - case /* Tstr_recmodule */7 : - return Stdlib__List.for_all((function (param) { - return is_nonexpansive_mod(param.mb_expr); - }), id_mod_list._0); - case /* Tstr_class */10 : + const id_mod_list = item.str_desc; + switch (id_mod_list.TAG) { + case /* Tstr_value */1 : + return Stdlib__List.for_all((function (vb) { + return is_nonexpansive(vb.vb_expr); + }), id_mod_list._1); + case /* Tstr_typext */4 : + return Stdlib__List.for_all((function (param) { + if (param.ext_kind.TAG === /* Text_decl */0) { + return false; + } else { + return true; + } + }), id_mod_list._0.tyext_constructors); + case /* Tstr_exception */5 : + if (id_mod_list._0.ext_kind.TAG === /* Text_decl */0) { return false; - case /* Tstr_include */12 : - return is_nonexpansive_mod(id_mod_list._0.incl_mod); - case /* Tstr_attribute */13 : + } else { return true; - default: + } + case /* Tstr_module */6 : + return is_nonexpansive_mod(id_mod_list._0.mb_expr); + case /* Tstr_recmodule */7 : + return Stdlib__List.for_all((function (param) { + return is_nonexpansive_mod(param.mb_expr); + }), id_mod_list._0); + case /* Tstr_class */10 : + return false; + case /* Tstr_include */12 : + return is_nonexpansive_mod(id_mod_list._0.incl_mod); + case /* Tstr_attribute */13 : return true; - } - }), str._0.str_items); + default: + return true; + } + }), str._0.str_items); case /* Tmod_ident */0 : case /* Tmod_functor */2 : return true; @@ -66140,8 +66140,8 @@ function approx_type(env, _sty) { const desc$1 = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (param) { - return approx_type(env, param); - }), args._0) + return approx_type(env, param); + }), args._0) }; return newty2(current_level.contents, desc$1); case /* Ptyp_constr */3 : @@ -66154,8 +66154,8 @@ function approx_type(env, _sty) { }); } const tyl = Stdlib__List.map((function (param) { - return approx_type(env, param); - }), ctl); + return approx_type(env, param); + }), ctl); return newconstr(match[0], tyl); } catch (raw_exn){ @@ -66235,8 +66235,8 @@ function type_approx(env, _sexp) { const desc$3 = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (param) { - return type_approx(env, param); - }), l._0) + return type_approx(env, param); + }), l._0) }; return newty2(current_level.contents, desc$3); case /* Pexp_ifthenelse */15 : @@ -66303,45 +66303,45 @@ function type_approx(env, _sexp) { function list_labels(env, ty) { return wrap_trace_gadt_instances(env, (function (param) { - let _visited = /* [] */0; - let _ls = /* [] */0; - let _ty_fun = param; - while(true) { - const ty_fun = _ty_fun; - const ls = _ls; - const visited = _visited; - const ty = expand_head(env, ty_fun); - if (Stdlib__List.memq(ty, visited)) { - return [ - Stdlib__List.rev(ls), - false - ]; - } - const match = ty.desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - return [ - Stdlib__List.rev(ls), - is_Tvar(ty) - ]; - } - if (match.TAG !== /* Tarrow */1) { - return [ - Stdlib__List.rev(ls), - is_Tvar(ty) - ]; - } - _ty_fun = match._2; - _ls = { - hd: match._0, - tl: ls - }; - _visited = { - hd: ty, - tl: visited - }; - continue; + let _visited = /* [] */0; + let _ls = /* [] */0; + let _ty_fun = param; + while(true) { + const ty_fun = _ty_fun; + const ls = _ls; + const visited = _visited; + const ty = expand_head(env, ty_fun); + if (Stdlib__List.memq(ty, visited)) { + return [ + Stdlib__List.rev(ls), + false + ]; + } + const match = ty.desc; + if (/* tag */typeof match === "number" || typeof match === "string") { + return [ + Stdlib__List.rev(ls), + is_Tvar(ty) + ]; + } + if (match.TAG !== /* Tarrow */1) { + return [ + Stdlib__List.rev(ls), + is_Tvar(ty) + ]; + } + _ty_fun = match._2; + _ls = { + hd: match._0, + tl: ls }; - }), ty); + _visited = { + hd: ty, + tl: visited + }; + continue; + }; + }), ty); } function check_univars(env, expans, kind, exp, ty_expected, vars) { @@ -66349,28 +66349,28 @@ function check_univars(env, expans, kind, exp, ty_expected, vars) { generalize_expansive$1(env, exp.exp_type); } const vars$1 = Stdlib__List.map((function (param) { - return expand_head(env, param); - }), vars); + return expand_head(env, param); + }), vars); const vars$2 = Stdlib__List.map((function (param) { - return expand_head(env, param); - }), vars$1); + return expand_head(env, param); + }), vars$1); const vars$p = Stdlib__List.filter((function (t) { - const t$1 = repr(t); - iter_generalize$1({ - contents: /* [] */0 - }, t$1); - const name = t$1.desc; - if (/* tag */typeof name === "number" || typeof name === "string" || !(name.TAG === /* Tvar */0 && t$1.level === 100000000)) { - return false; - } else { - log_type(t$1); - t$1.desc = { - TAG: /* Tunivar */9, - _0: name._0 - }; - return true; - } - }), vars$2); + const t$1 = repr(t); + iter_generalize$1({ + contents: /* [] */0 + }, t$1); + const name = t$1.desc; + if (/* tag */typeof name === "number" || typeof name === "string" || !(name.TAG === /* Tvar */0 && t$1.level === 100000000)) { + return false; + } else { + log_type(t$1); + t$1.desc = { + TAG: /* Tunivar */9, + _0: name._0 + }; + return true; + } + }), vars$2); if (Stdlib__List.length(vars$2) === Stdlib__List.length(vars$p)) { return; } @@ -66463,15 +66463,15 @@ const self_coercion = { function wrap_unpacks(sexp, unpacks) { return Stdlib__List.fold_left((function (sexp, param) { - const 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, - _0: name.txt - }, - loc: name.loc - })), sexp); - }), sexp, unpacks); + const 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, + _0: name.txt + }, + loc: name.loc + })), sexp); + }), sexp, unpacks); } function contains_variant_either(ty) { @@ -66491,17 +66491,17 @@ function contains_variant_either(ty) { const row$1 = row_repr_aux(/* [] */0, row._0); if (!row$1.row_fixed) { Stdlib__List.iter((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG === /* Rpresent */0) { - return; - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - }), row$1.row_fields); + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG === /* Rpresent */0) { + return; + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + }), row$1.row_fields); } iter_row(loop, row$1); }; @@ -66531,8 +66531,8 @@ function iter_ppat(f, p) { return may(f, pats._1); case /* Ppat_record */7 : return Stdlib__List.iter((function (param) { - Curry._1(f, param[1]); - }), pats._0); + Curry._1(f, param[1]); + }), pats._0); case /* Ppat_tuple */4 : case /* Ppat_array */8 : return Stdlib__List.iter(f, pats._0); @@ -66590,13 +66590,13 @@ function contains_gadt(env, p) { try { const cstrs = lookup_all_constructors$1(match._0.txt, env); Stdlib__List.iter((function (param) { - if (!param[0].cstr_generalized) { - return; - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - }), cstrs); + if (!param[0].cstr_generalized) { + return; + } + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + }), cstrs); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -66623,108 +66623,108 @@ function contains_gadt(env, p) { function check_absent_variant(env) { return function (param) { return iter_pattern((function (pat) { - const match = pat.pat_desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG !== /* Tpat_variant */5) { - return; - } - const arg = match._1; - const s = match._0; - const 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); - } else { - return false; - } - }), row.row_fields) || !row.row_fixed && !static_row(row)) { - return; - } - const ty_arg = arg !== undefined ? ({ - hd: type_expr(identity, arg.pat_type), - tl: /* [] */0 - }) : /* [] */0; - const row$p_row_fields = { - hd: [ - s, - { - TAG: /* Reither */1, - _0: arg === undefined, - _1: ty_arg, - _2: true, - _3: { - contents: undefined + const match = pat.pat_desc; + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG !== /* Tpat_variant */5) { + return; + } + const arg = match._1; + const s = match._0; + const 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); + } else { + return false; } - } - ], + }), row.row_fields) || !row.row_fixed && !static_row(row)) { + return; + } + const ty_arg = arg !== undefined ? ({ + hd: type_expr(identity, arg.pat_type), tl: /* [] */0 - }; - const row$p_row_more = newvar(undefined, undefined); - const row$p = { - row_fields: row$p_row_fields, - row_more: row$p_row_more, - row_bound: undefined, - row_closed: false, - row_fixed: false, - row_name: undefined - }; - unify_pat(env, { - pat_desc: pat.pat_desc, - pat_loc: pat.pat_loc, - pat_extra: pat.pat_extra, - pat_type: newty2(current_level.contents, { - TAG: /* Tvariant */8, - _0: row$p - }), - pat_env: pat.pat_env, - pat_attributes: pat.pat_attributes - }, type_expr(identity, pat.pat_type)); - }), param); + }) : /* [] */0; + const row$p_row_fields = { + hd: [ + s, + { + TAG: /* Reither */1, + _0: arg === undefined, + _1: ty_arg, + _2: true, + _3: { + contents: undefined + } + } + ], + tl: /* [] */0 + }; + const row$p_row_more = newvar(undefined, undefined); + const row$p = { + row_fields: row$p_row_fields, + row_more: row$p_row_more, + row_bound: undefined, + row_closed: false, + row_fixed: false, + row_name: undefined + }; + unify_pat(env, { + pat_desc: pat.pat_desc, + pat_loc: pat.pat_loc, + pat_extra: pat.pat_extra, + pat_type: newty2(current_level.contents, { + TAG: /* Tvariant */8, + _0: row$p + }), + pat_env: pat.pat_env, + pat_attributes: pat.pat_attributes + }, type_expr(identity, pat.pat_type)); + }), param); }; } function duplicate_ident_types(loc, caselist, env) { const caselist$1 = Stdlib__List.filter((function (param) { - return contains_gadt(env, param.pc_lhs); - }), caselist); + return contains_gadt(env, param.pc_lhs); + }), caselist); const idents = all_idents_cases(caselist$1); return Stdlib__List.fold_left((function (env, s) { - try { - const match = lookup_value$1({ - TAG: /* Lident */0, - _0: s - }, env); - const desc = match[1]; - const path = match[0]; - switch (path.TAG) { - case /* Pident */0 : - const desc_val_type = type_expr(identity, desc.val_type); - const desc_val_kind = desc.val_kind; - const desc_val_loc = desc.val_loc; - const desc_val_attributes = desc.val_attributes; - const desc$1 = { - val_type: desc_val_type, - val_kind: desc_val_kind, - val_loc: desc_val_loc, - val_attributes: desc_val_attributes - }; - return add_value(undefined, path._0, desc$1, env); - case /* Pdot */1 : - case /* Papply */2 : - return env; - - } + try { + const match = lookup_value$1({ + TAG: /* Lident */0, + _0: s + }, env); + const desc = match[1]; + const path = match[0]; + switch (path.TAG) { + case /* Pident */0 : + const desc_val_type = type_expr(identity, desc.val_type); + const desc_val_kind = desc.val_kind; + const desc_val_loc = desc.val_loc; + const desc_val_attributes = desc.val_attributes; + const desc$1 = { + val_type: desc_val_type, + val_kind: desc_val_kind, + val_loc: desc_val_loc, + val_attributes: desc_val_attributes + }; + return add_value(undefined, path._0, desc$1, env); + case /* Pdot */1 : + case /* Papply */2 : + return env; + } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return env; - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return env; } - }), env, idents); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), env, idents); } function unify_exp(env, exp, expected_ty) { @@ -67106,47 +67106,47 @@ function type_expect_(in_function, env, sexp, ty_expected) { const ty = instance(undefined, env, funct.exp_type); end_def(undefined); wrap_trace_gadt_instances(env, (function (param) { - let _seen = /* [] */0; - let _ty_fun = param; - while(true) { - const ty_fun = _ty_fun; - const seen = _seen; - const ty = expand_head(env, ty_fun); - if (Stdlib__List.memq(ty, seen)) { - return; - } - const match = ty.desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG !== /* Tarrow */1) { - return; - } - try { - unify_var(env, newvar(undefined, undefined), match._1); - } - catch (raw_exn){ - const 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", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 44266, - 65 - ] - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + let _seen = /* [] */0; + let _ty_fun = param; + while(true) { + const ty_fun = _ty_fun; + const seen = _seen; + const ty = expand_head(env, ty_fun); + if (Stdlib__List.memq(ty, seen)) { + return; + } + const match = ty.desc; + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG !== /* Tarrow */1) { + return; + } + try { + unify_var(env, newvar(undefined, undefined), match._1); + } + catch (raw_exn){ + const 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", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 44266, + 65 + ] + }); } - _ty_fun = match._2; - _seen = { - hd: ty, - tl: seen - }; - continue; + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + _ty_fun = match._2; + _seen = { + hd: ty, + tl: seen }; - }), ty); + continue; + }; + }), ty); begin_def(undefined); const match$9 = type_application(env, funct, sargs); end_def(undefined); @@ -67255,24 +67255,24 @@ function type_expect_(in_function, env, sexp, ty_expected) { ill_formed_ast(loc, "Tuples must have at least 2 components."); } const subtypes = Stdlib__List.map((function (param) { - return newty2(100000000, { - TAG: /* Tvar */0, - _0: undefined - }); - }), sexpl); + return newty2(100000000, { + TAG: /* Tvar */0, + _0: undefined + }); + }), sexpl); const to_unify = newty2(100000000, { TAG: /* Ttuple */2, _0: subtypes }); unify_exp_types(loc, env, to_unify, ty_expected); const expl = Stdlib__List.map2((function (body, ty) { - return type_expect(undefined, env, body, ty); - }), sexpl, subtypes); + return type_expect(undefined, env, body, ty); + }), sexpl, subtypes); const desc$1 = { TAG: /* Ttuple */2, _0: Stdlib__List.map((function (e) { - return e.exp_type; - }), expl) + return e.exp_type; + }), expl) }; return re({ exp_desc: { @@ -67308,8 +67308,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { } const constrs = find_all_constructors(env, lid$2.loc, lid$2.txt); const 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); + 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); let sargs$1; @@ -67409,8 +67409,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { unify_exp(env, texp$1, instance(undefined, env, ty_expected)); } const 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])); + 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) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, @@ -67527,11 +67527,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { const arg$2 = may_map((function (param) { - return type_exp(env, param); - }), sarg$1); + return type_exp(env, param); + }), sarg$1); const arg_type = may_map((function (arg) { - return arg.exp_type; - }), arg$2); + return arg.exp_type; + }), arg$2); const desc$2 = { TAG: /* Tvariant */8, _0: { @@ -67640,10 +67640,10 @@ function type_expect_(in_function, env, sexp, ty_expected) { const ty_record = match$22[0]; const closed = opt_sexp === undefined; const 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); + 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)); const check_duplicates = function (_param) { while(true) { @@ -67679,8 +67679,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { const ty_exp$1 = instance(undefined, env, opt_exp.exp_type); const unify_kept = function (lbl) { if (!Stdlib__List.for_all((function (param) { - return param[1].lbl_pos !== lbl.lbl_pos; - }), lbl_exp_list)) { + return param[1].lbl_pos !== lbl.lbl_pos; + }), lbl_exp_list)) { return; } const match = instance_label(false, lbl); @@ -67726,8 +67726,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { } if (opt_sexp === undefined && Stdlib__List.length(lid_sexp_list) !== num_fields) { const present_indices = Stdlib__List.map((function (param) { - return param[1].lbl_pos; - }), lbl_exp_list); + return param[1].lbl_pos; + }), lbl_exp_list); const label_names = extract_label_names(sexp, env, ty_expected); const missing_labels = function (_n, _param) { while(true) { @@ -67839,8 +67839,8 @@ function type_expect_(in_function, env, sexp, ty_expected) { const to_unify$1 = type_array(ty$3); unify_exp_types(loc, env, to_unify$1, ty_expected); const argl = Stdlib__List.map((function (sarg) { - return type_expect(undefined, env, sarg, ty$3); - }), lid._0); + return type_expect(undefined, env, sarg, ty$3); + }), lid._0); return re({ exp_desc: { TAG: /* Texp_array */13, @@ -67931,11 +67931,11 @@ function type_expect_(in_function, env, sexp, ty_expected) { ]; } else if (match$27.TAG === /* Ppat_var */0) { match$28 = enter_value((function (s) { - return { - TAG: /* Unused_for_index */19, - _0: s - }; - }))(match$27._0.txt, { + return { + TAG: /* Unused_for_index */19, + _0: s + }; + }))(match$27._0.txt, { val_type: instance_def(type_int), val_kind: /* Val_reg */0, val_loc: loc, @@ -68545,25 +68545,25 @@ function type_expect_(in_function, env, sexp, ty_expected) { case /* Pexp_override */24 : const lst = lid._0; Stdlib__List.fold_right((function (param, l) { - const lab = param[0]; - if (Stdlib__List.exists((function (l) { - return l.txt === lab.txt; - }), l)) { - throw new Caml_js_exceptions.MelangeError($$Error$7, { - MEL_EXN_ID: $$Error$7, - _1: loc, - _2: env, - _3: { - TAG: /* Value_multiply_overridden */24, - _0: lab.txt - } - }); - } - return { - hd: lab, - tl: l - }; - }), lst, /* [] */0); + const lab = param[0]; + if (Stdlib__List.exists((function (l) { + return l.txt === lab.txt; + }), l)) { + throw new Caml_js_exceptions.MelangeError($$Error$7, { + MEL_EXN_ID: $$Error$7, + _1: loc, + _2: env, + _3: { + TAG: /* Value_multiply_overridden */24, + _0: lab.txt + } + }); + } + return { + hd: lab, + tl: l + }; + }), lst, /* [] */0); let match$53; try { match$53 = [ @@ -69204,8 +69204,8 @@ function type_label_access(env, loc, srecord, lid) { } const labels = find_all_labels(env, lid.loc, lid.txt); const label = wrap_disambiguate("This expression has", ty_exp, (function (param) { - return disambiguate(undefined, undefined, undefined, lid, env, opath, param); - }), labels); + return disambiguate(undefined, undefined, undefined, lid, env, opath, param); + }), labels); return [ record, label, @@ -69349,8 +69349,8 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { return false; } else { return Stdlib__List.for_all((function (param) { - return "" === param; - }), match[0]); + return "" === param; + }), match[0]); } }; const is_inferred = function (_sexp) { @@ -69578,8 +69578,8 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { prerr_warning(texp_exp_loc, { TAG: /* Eliminated_optional_arguments */31, _0: Stdlib__List.map((function (param) { - return param[0]; - }), args) + return param[0]; + }), args) }); if (warn) { prerr_warning(texp_exp_loc, { @@ -69626,14 +69626,14 @@ function type_argument(env, sarg, ty_expected$p, ty_expected) { function type_application(env, funct, sargs) { const result_type = function (omitted, ty_fun) { return Stdlib__List.fold_left((function (ty_fun, param) { - return newty2(param[2], { - TAG: /* Tarrow */1, - _0: param[0], - _1: param[1], - _2: ty_fun, - _3: /* Cok */0 - }); - }), ty_fun, omitted); + return newty2(param[2], { + TAG: /* Tarrow */1, + _0: param[0], + _1: param[1], + _2: ty_fun, + _3: /* Cok */0 + }); + }), ty_fun, omitted); }; const has_label = function (l, ty_fun) { const match = list_labels(env, ty_fun); @@ -69652,13 +69652,13 @@ function type_application(env, funct, sargs) { let tmp = false; if (!match[1]) { const labels = Stdlib__List.filter((function (l) { - return !is_optional(l); - }), match[0]); + return !is_optional(l); + }), match[0]); tmp = 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(funct.exp_loc, /* Labels_omitted */3), true); + return param[0] === ""; + }), sargs) && Stdlib__List.exists((function (l) { + return l !== ""; + }), labels) && (prerr_warning(funct.exp_loc, /* Labels_omitted */3), true); } ignore_labels = tmp; } @@ -69735,8 +69735,8 @@ function type_application(env, funct, sargs) { /* [] */0, more_sargs.tl, (function (param) { - return type_argument(env, sarg0, ty, ty0); - }) + return type_argument(env, sarg0, ty, ty0); + }) ]; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -69802,13 +69802,13 @@ function type_application(env, funct, sargs) { match$7[2], match$7[3], optional === /* Required */0 || is_optional(l$p$1) ? (function (param) { - return type_argument(env, sarg0$3, ty, ty0); - }) : (may_warn(sarg0$3.pexp_loc, { - TAG: /* Not_principal */8, - _0: "using an optional argument here" - }), (function (param) { - return option_some(type_argument(env, sarg0$3, extract_option_type(env, ty), extract_option_type(env, ty0))); - })) + return type_argument(env, sarg0$3, ty, ty0); + }) : (may_warn(sarg0$3.pexp_loc, { + TAG: /* Not_principal */8, + _0: "using an optional argument here" + }), (function (param) { + return option_some(type_argument(env, sarg0$3, extract_option_type(env, ty), extract_option_type(env, ty0))); + })) ]; } catch (raw_exn$1){ @@ -69818,21 +69818,21 @@ function type_application(env, funct, sargs) { sargs, more_sargs, optional === /* Optional */1 && (Stdlib__List.mem_assoc("", sargs) || Stdlib__List.mem_assoc("", more_sargs)) ? (may_warn(funct.exp_loc, { - TAG: /* Without_principality */9, - _0: "eliminated optional argument" - }), ignored.contents = { - hd: [ - l, - ty, - lv - ], - tl: ignored.contents - }, (function (param) { - return option_none(instance(undefined, env, ty), none); - })) : (may_warn(funct.exp_loc, { - TAG: /* Without_principality */9, - _0: "commuted an argument" - }), undefined) + TAG: /* Without_principality */9, + _0: "eliminated optional argument" + }), ignored.contents = { + hd: [ + l, + ty, + lv + ], + tl: ignored.contents + }, (function (param) { + return option_none(instance(undefined, env, ty), none); + })) : (may_warn(funct.exp_loc, { + TAG: /* Without_principality */9, + _0: "commuted an argument" + }), undefined) ]; } else { throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); @@ -69900,22 +69900,22 @@ function type_application(env, funct, sargs) { if (!param) { return [ Stdlib__List.map((function (param) { - const f = param[1]; - const l = param[0]; - if (f !== undefined) { - return [ - l, - Curry._1(f, undefined), - param[2] - ]; - } else { - return [ - l, - undefined, - param[2] - ]; - } - }), Stdlib__List.rev(args$1)), + const f = param[1]; + const l = param[0]; + if (f !== undefined) { + return [ + l, + Curry._1(f, undefined), + param[2] + ]; + } else { + return [ + l, + undefined, + param[2] + ]; + } + }), Stdlib__List.rev(args$1)), instance(undefined, env, result_type(omitted, ty_fun$2)) ]; } @@ -70143,12 +70143,12 @@ function type_statement(env, sexp) { function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselist) { const patterns = Stdlib__List.map((function (param) { - return param.pc_lhs; - }), caselist); + return param.pc_lhs; + }), caselist); const erase_either = Stdlib__List.exists(contains_polymorphic_variant, patterns) && contains_variant_either(ty_arg); const has_gadts = Stdlib__List.exists((function (param) { - return contains_gadt(env, param); - }), patterns); + return contains_gadt(env, param); + }), patterns); const ty_arg$1 = (has_gadts || erase_either) && !principal.contents ? type_expr(identity, ty_arg) : ty_arg; const match = has_gadts && !principal.contents ? [ type_expr(identity, ty_res), @@ -70183,123 +70183,123 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis contents: /* [] */0 }; const pat_env_list = Stdlib__List.map((function (param) { - const pc_rhs = param.pc_rhs; - const pc_guard = param.pc_guard; - let loc; - if (pc_guard !== undefined) { - const init = pc_rhs.pexp_loc; - loc = { - loc_start: pc_guard.pexp_loc.loc_start, - loc_end: init.loc_end, - loc_ghost: init.loc_ghost - }; - } else { - loc = pc_rhs.pexp_loc; - } - if (principal.contents) { - begin_def(undefined); - } - const scope = { - TAG: /* Idef */1, - _0: loc + const pc_rhs = param.pc_rhs; + const pc_guard = param.pc_guard; + let loc; + if (pc_guard !== undefined) { + const init = pc_rhs.pexp_loc; + loc = { + loc_start: pc_guard.pexp_loc.loc_start, + loc_end: init.loc_end, + loc_ghost: init.loc_ghost }; - const partial = principal.contents || erase_either ? false : undefined; - const ty_arg$2 = instance(partial, env$2, ty_arg$1); - const match = type_pattern(lev$1, env$2, param.pc_lhs, scope, ty_arg$2); - const pat = match[0]; - pattern_force.contents = Stdlib.$at(match[2], pattern_force.contents); - const 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, - pat_loc: pat.pat_loc, - pat_extra: pat.pat_extra, - pat_type: instance(undefined, env$2, pat.pat_type), - pat_env: pat.pat_env, - pat_attributes: pat.pat_attributes - }) : pat; - return [ - pat$1, - [ - match[1], - match[3] - ] - ]; - }), caselist); + } else { + loc = pc_rhs.pexp_loc; + } + if (principal.contents) { + begin_def(undefined); + } + const scope = { + TAG: /* Idef */1, + _0: loc + }; + const partial = principal.contents || erase_either ? false : undefined; + const ty_arg$2 = instance(partial, env$2, ty_arg$1); + const match = type_pattern(lev$1, env$2, param.pc_lhs, scope, ty_arg$2); + const pat = match[0]; + pattern_force.contents = Stdlib.$at(match[2], pattern_force.contents); + const 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, + pat_loc: pat.pat_loc, + pat_extra: pat.pat_extra, + pat_type: instance(undefined, env$2, pat.pat_type), + pat_env: pat.pat_env, + pat_attributes: pat.pat_attributes + }) : pat; + return [ + pat$1, + [ + match[1], + match[3] + ] + ]; + }), caselist); const patl = Stdlib__List.map((function (prim) { - return prim[0]; - }), pat_env_list); + return prim[0]; + }), pat_env_list); Stdlib__List.iter((function (pat) { - unify_pat(env$2, pat, ty_arg$p); - }), patl); + unify_pat(env$2, pat, ty_arg$p); + }), patl); if (Stdlib__List.exists(has_variants, patl)) { pressure_variants$1(env$2, patl); Stdlib__List.iter((function (param) { - return iter_pattern(finalize_variant, param); - }), patl); + return iter_pattern(finalize_variant, param); + }), patl); } Stdlib__List.iter((function (f) { - Curry._1(f, undefined); - }), pattern_force.contents); + Curry._1(f, undefined); + }), pattern_force.contents); Stdlib__List.iter((function (param) { - return iter_pattern((function (param) { - unify_var(env$2, param.pat_type, newvar(undefined, undefined)); - }), param); - }), patl); + return iter_pattern((function (param) { + unify_var(env$2, param.pat_type, newvar(undefined, undefined)); + }), param); + }), patl); Stdlib__List.iter((function (pat) { - unify_pat(env$2, pat, instance(undefined, env$2, ty_arg$1)); - }), patl); + unify_pat(env$2, pat, instance(undefined, env$2, ty_arg$1)); + }), patl); end_def(undefined); Stdlib__List.iter((function (param) { - return iter_pattern((function (param) { - iter_generalize$1({ - contents: /* [] */0 - }, param.pat_type); - }), param); - }), patl); + return iter_pattern((function (param) { + iter_generalize$1({ + contents: /* [] */0 + }, param.pat_type); + }), param); + }), patl); const in_function$1 = Stdlib__List.length(caselist) === 1 ? in_function : undefined; const cases = Stdlib__List.map2((function (param, param$1) { - const pc_guard = param$1.pc_guard; - const match = param[1]; - const unpacks = match[1]; - const ext_env = match[0]; - const sexp = wrap_unpacks(param$1.pc_rhs, unpacks); - let ty_res$p; - if (principal.contents) { - begin_def(undefined); - const 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; + const pc_guard = param$1.pc_guard; + const match = param[1]; + const unpacks = match[1]; + const ext_env = match[0]; + const sexp = wrap_unpacks(param$1.pc_rhs, unpacks); + let ty_res$p; + if (principal.contents) { + begin_def(undefined); + const 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; + } + const guard = pc_guard !== undefined ? type_expect(undefined, ext_env, wrap_unpacks(pc_guard, unpacks), type_bool) : undefined; + const exp = type_expect(in_function$1, ext_env, sexp, ty_res$p); + return { + c_lhs: param[0], + c_guard: guard, + c_rhs: { + exp_desc: exp.exp_desc, + exp_loc: exp.exp_loc, + exp_extra: exp.exp_extra, + exp_type: instance(undefined, env$2, ty_res$p), + exp_env: exp.exp_env, + exp_attributes: exp.exp_attributes } - const guard = pc_guard !== undefined ? type_expect(undefined, ext_env, wrap_unpacks(pc_guard, unpacks), type_bool) : undefined; - const exp = type_expect(in_function$1, ext_env, sexp, ty_res$p); - return { - c_lhs: param[0], - c_guard: guard, - c_rhs: { - exp_desc: exp.exp_desc, - exp_loc: exp.exp_loc, - exp_extra: exp.exp_extra, - exp_type: instance(undefined, env$2, ty_res$p), - exp_env: exp.exp_env, - exp_attributes: exp.exp_attributes - } - }; - }), pat_env_list, caselist); + }; + }), pat_env_list, caselist); if (principal.contents || has_gadts) { const 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); + unify_exp(env$2, c.c_rhs, ty_res$p); + }), cases); } const 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]); - }), pat_env_list); + check_absent_variant(param[1][0])(param[0]); + }), pat_env_list); if (!is_active(/* Unused_match */5)) { return; } @@ -70320,8 +70320,8 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis }; try { const pss = get_mins(le_pats, Stdlib__List.filter((function (param) { - return compats(qs, param); - }), pref)); + return compats(qs, param); + }), pref)); const r = every_satisfiables(Stdlib__List.map(make_row, pss), { no_ors: /* [] */0, ors: /* [] */0, @@ -70334,8 +70334,8 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis } else { Stdlib__List.iter((function (p) { - prerr_warning(p.pat_loc, /* Unused_pat */6); - }), r._0); + prerr_warning(p.pat_loc, /* Unused_pat */6); + }), r._0); } } catch (raw_exn){ @@ -70385,17 +70385,17 @@ 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) { const check = checkOpt !== undefined ? checkOpt : (function (s) { - return { - TAG: /* Unused_var */12, - _0: s - }; - }); + return { + TAG: /* Unused_var */12, + _0: s + }; + }); const check_strict = check_strictOpt !== undefined ? check_strictOpt : (function (s) { - return { - TAG: /* Unused_var_strict */13, - _0: s - }; - }); + return { + TAG: /* Unused_var_strict */13, + _0: s + }; + }); begin_def(undefined); if (principal.contents) { begin_def(undefined); @@ -70428,39 +70428,39 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop } const check$1 = is_fake_let ? check_strict : check; const spatl = Stdlib__List.map((function (param) { - const spat = param.pvb_pat; - const match = spat.ppat_desc; - const match$1 = param.pvb_expr.pexp_desc; - let sty; - if (/* tag */typeof match === "number" || typeof match === "string") { - return spat; - } - if (match.TAG === /* Ppat_constraint */10) { - return spat; - } - switch (match$1.TAG) { - case /* Pexp_constraint */19 : - sty = match$1._1; - break; - case /* Pexp_coerce */20 : - sty = match$1._2; - break; - default: - return spat; - } - if (!principal.contents) { + const spat = param.pvb_pat; + const match = spat.ppat_desc; + const match$1 = param.pvb_expr.pexp_desc; + let sty; + if (/* tag */typeof match === "number" || typeof match === "string") { + return spat; + } + if (match.TAG === /* Ppat_constraint */10) { + return spat; + } + switch (match$1.TAG) { + case /* Pexp_constraint */19 : + sty = match$1._1; + break; + case /* Pexp_coerce */20 : + sty = match$1._2; + break; + default: return spat; - } - const 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); + } + if (!principal.contents) { + return spat; + } + const 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); const nvs = Stdlib__List.map((function (param) { - return newvar(undefined, undefined); - }), spatl); + return newvar(undefined, undefined); + }), spatl); const match$3 = type_pattern_list(env, spatl, scope, nvs, allow); const unpacks = match$3[3]; const new_env = match$3[1]; @@ -70468,45 +70468,45 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop const is_recursive = rec_flag === /* Recursive */1; if (is_recursive) { Stdlib__List.iter2((function (pat, binding) { - const match = pat.pat_type.desc; - let pat$1; - pat$1 = /* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Tpoly */10 ? pat : ({ - pat_desc: pat.pat_desc, - pat_loc: pat.pat_loc, - pat_extra: pat.pat_extra, - pat_type: instance_poly(true, false, match._1, match._0)[1], - pat_env: pat.pat_env, - pat_attributes: pat.pat_attributes - }); - unify_pat(env, pat$1, type_approx(env, binding.pvb_expr)); - }), pat_list, spat_sexp_list); + const match = pat.pat_type.desc; + let pat$1; + pat$1 = /* tag */typeof match === "number" || typeof match === "string" || match.TAG !== /* Tpoly */10 ? pat : ({ + pat_desc: pat.pat_desc, + pat_loc: pat.pat_loc, + pat_extra: pat.pat_extra, + pat_type: instance_poly(true, false, match._1, match._0)[1], + pat_env: pat.pat_env, + pat_attributes: pat.pat_attributes + }); + unify_pat(env, pat$1, type_approx(env, binding.pvb_expr)); + }), pat_list, spat_sexp_list); } Stdlib__List.iter((function (pat) { - if (has_variants(pat)) { - pressure_variants$1(env, { - hd: pat, - tl: /* [] */0 - }); - return iter_pattern(finalize_variant, pat); - } - - }), pat_list); + if (has_variants(pat)) { + pressure_variants$1(env, { + hd: pat, + tl: /* [] */0 + }); + return iter_pattern(finalize_variant, pat); + } + + }), pat_list); const 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); - return { - pat_desc: pat.pat_desc, - pat_loc: pat.pat_loc, - pat_extra: pat.pat_extra, - pat_type: instance(undefined, env, pat.pat_type), - pat_env: pat.pat_env, - pat_attributes: pat.pat_attributes - }; - }), pat_list)) : pat_list; + iter_pattern((function (pat) { + generalize_structure$1(current_level.contents, pat.pat_type); + }), pat); + return { + pat_desc: pat.pat_desc, + pat_loc: pat.pat_loc, + pat_extra: pat.pat_extra, + pat_type: instance(undefined, env, pat.pat_type), + pat_env: pat.pat_env, + pat_attributes: pat.pat_attributes + }; + }), pat_list)) : pat_list; Stdlib__List.iter((function (f) { - Curry._1(f, undefined); - }), match$3[2]); + Curry._1(f, undefined); + }), match$3[2]); const exp_env = is_recursive ? new_env : env; const current_slot = { contents: undefined @@ -70516,155 +70516,155 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop }; const warn_unused = is_active(Curry._1(check$1, "")) || is_active(Curry._1(check_strict, "")) || is_recursive && is_active(/* Unused_rec_flag */15); const pat_slot_list = Stdlib__List.map((function (pat) { - if (!warn_unused) { - return [ - pat, - undefined - ]; - } - const some_used = { - contents: false - }; - const slot = { - contents: /* [] */0 - }; - Stdlib__List.iter((function (param) { - const id = param[0]; - const vd = find_value({ - TAG: /* Pident */0, - _0: id - }, new_env); - const name = id.name; - const used = { - contents: false - }; - if (!(name === "" || Caml_string.get(name, 0) === /* '_' */95 || Caml_string.get(name, 0) === /* '#' */35)) { - add_delayed_check(function (param) { - if (!used.contents) { - return prerr_warning(vd.val_loc, Curry._1(some_used.contents ? check_strict : check$1, name)); - } - - }); - } - const callback = function (param) { - const slot$1 = current_slot.contents; - if (slot$1 !== undefined) { - slot$1.contents = { - hd: [ - name, - vd - ], - tl: slot$1.contents - }; - rec_needed.contents = true; - } else { - Stdlib__List.iter((function (param) { - mark_value_used(env, param[0], param[1]); - }), get_ref(slot)); - used.contents = true; - some_used.contents = true; - } - }; - const key_1 = vd.val_loc; - const key = [ - name, - key_1 - ]; - try { - const 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){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return Stdlib__Hashtbl.add(value_declarations, key, callback); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }), pat_bound_idents(pat)); + if (!warn_unused) { return [ pat, - slot + undefined ]; - }), pat_list$1); + } + const some_used = { + contents: false + }; + const slot = { + contents: /* [] */0 + }; + Stdlib__List.iter((function (param) { + const id = param[0]; + const vd = find_value({ + TAG: /* Pident */0, + _0: id + }, new_env); + const name = id.name; + const used = { + contents: false + }; + if (!(name === "" || Caml_string.get(name, 0) === /* '_' */95 || Caml_string.get(name, 0) === /* '#' */35)) { + add_delayed_check(function (param) { + if (!used.contents) { + return prerr_warning(vd.val_loc, Curry._1(some_used.contents ? check_strict : check$1, name)); + } + + }); + } + const callback = function (param) { + const slot$1 = current_slot.contents; + if (slot$1 !== undefined) { + slot$1.contents = { + hd: [ + name, + vd + ], + tl: slot$1.contents + }; + rec_needed.contents = true; + } else { + Stdlib__List.iter((function (param) { + mark_value_used(env, param[0], param[1]); + }), get_ref(slot)); + used.contents = true; + some_used.contents = true; + } + }; + const key_1 = vd.val_loc; + const key = [ + name, + key_1 + ]; + try { + const 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){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return Stdlib__Hashtbl.add(value_declarations, key, callback); + } + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), pat_bound_idents(pat)); + return [ + pat, + slot + ]; + }), pat_list$1); const exp_list = Stdlib__List.map2((function (param, param$1) { - const pat = param$1[0]; - const sexp = param.pvb_expr; - const sexp$1 = rec_flag === /* Recursive */1 ? wrap_unpacks(sexp, unpacks) : sexp; - if (is_recursive) { - current_slot.contents = param$1[1]; - } - const match = pat.pat_type.desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - return type_expect(undefined, exp_env, sexp$1, pat.pat_type); - } - if (match.TAG !== /* Tpoly */10) { - return type_expect(undefined, exp_env, sexp$1, pat.pat_type); - } + const pat = param$1[0]; + const sexp = param.pvb_expr; + const sexp$1 = rec_flag === /* Recursive */1 ? wrap_unpacks(sexp, unpacks) : sexp; + if (is_recursive) { + current_slot.contents = param$1[1]; + } + const match = pat.pat_type.desc; + if (/* tag */typeof match === "number" || typeof match === "string") { + return type_expect(undefined, exp_env, sexp$1, pat.pat_type); + } + if (match.TAG !== /* Tpoly */10) { + return type_expect(undefined, exp_env, sexp$1, pat.pat_type); + } + begin_def(undefined); + if (principal.contents) { begin_def(undefined); - if (principal.contents) { - begin_def(undefined); - } - const match$1 = instance_poly(true, true, match._1, match._0); - const ty$p = match$1[1]; - if (principal.contents) { - end_def(undefined); - generalize_structure$1(current_level.contents, ty$p); - } - const exp = type_expect(undefined, exp_env, sexp$1, ty$p); + } + const match$1 = instance_poly(true, true, match._1, match._0); + const ty$p = match$1[1]; + if (principal.contents) { end_def(undefined); - check_univars(env, true, "definition", exp, pat.pat_type, match$1[0]); - return { - exp_desc: exp.exp_desc, - exp_loc: exp.exp_loc, - exp_extra: exp.exp_extra, - exp_type: instance(undefined, env, exp.exp_type), - exp_env: exp.exp_env, - exp_attributes: exp.exp_attributes - }; - }), spat_sexp_list, pat_slot_list); + generalize_structure$1(current_level.contents, ty$p); + } + const 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 { + exp_desc: exp.exp_desc, + exp_loc: exp.exp_loc, + exp_extra: exp.exp_extra, + exp_type: instance(undefined, env, exp.exp_type), + exp_env: exp.exp_env, + exp_attributes: exp.exp_attributes + }; + }), spat_sexp_list, pat_slot_list); current_slot.contents = undefined; if (is_recursive && !rec_needed.contents && is_active(/* Unused_rec_flag */15)) { prerr_warning(Stdlib__List.hd(spat_sexp_list).pvb_pat.ppat_loc, /* Unused_rec_flag */15); } Stdlib__List.iter2((function (pat, exp) { - check_partial$1(undefined, env, pat.pat_type)(pat.pat_loc, { - hd: { - c_lhs: pat, - c_guard: undefined, - c_rhs: exp - }, - tl: /* [] */0 - }); - }), pat_list$1, exp_list); + check_partial$1(undefined, env, pat.pat_type)(pat.pat_loc, { + hd: { + c_lhs: pat, + c_guard: undefined, + c_rhs: exp + }, + tl: /* [] */0 + }); + }), pat_list$1, exp_list); end_def(undefined); Stdlib__List.iter2((function (pat, exp) { - if (!is_nonexpansive(exp)) { - return iter_pattern((function (pat) { - generalize_expansive$1(env, pat.pat_type); - }), pat); - } - - }), pat_list$1, exp_list); + if (!is_nonexpansive(exp)) { + return iter_pattern((function (pat) { + generalize_expansive$1(env, pat.pat_type); + }), pat); + } + + }), pat_list$1, exp_list); Stdlib__List.iter((function (pat) { - iter_pattern((function (pat) { - iter_generalize$1({ - contents: /* [] */0 - }, pat.pat_type); - }), pat); - }), pat_list$1); + iter_pattern((function (pat) { + iter_generalize$1({ + contents: /* [] */0 + }, pat.pat_type); + }), pat); + }), pat_list$1); const l = Stdlib__List.combine(pat_list$1, exp_list); const l$1 = Stdlib__List.map2((function (param, pvb) { - return { - vb_pat: param[0], - vb_expr: param[1], - vb_attributes: pvb.pvb_attributes, - vb_loc: pvb.pvb_loc - }; - }), l, spat_sexp_list); + return { + vb_pat: param[0], + vb_expr: param[1], + vb_attributes: pvb.pvb_attributes, + vb_loc: pvb.pvb_loc + }; + }), l, spat_sexp_list); return [ l$1, new_env, @@ -70675,16 +70675,16 @@ 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); const match = type_let((function (s) { - return { - TAG: /* Unused_value_declaration */16, - _0: s - }; - }), (function (s) { - return { - TAG: /* Unused_value_declaration */16, - _0: s - }; - }), env, rec_flag, spat_sexp_list, scope, false); + return { + TAG: /* Unused_value_declaration */16, + _0: s + }; + }), (function (s) { + return { + TAG: /* Unused_value_declaration */16, + _0: s + }; + }), env, rec_flag, spat_sexp_list, scope, false); return [ match[0], match[1] @@ -70736,122 +70736,186 @@ register_error_of_exn(function (err) { } const env = err._2; return error_of_printer(err._1, (function (param, param$1) { - return wrap_printing_env(env, (function (param$2) { - if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { - switch (param$1) { - case /* Outside_class */0 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This object duplication occurs outside a method definition", - _1: /* End_of_format */0 - }, - _1: "This object duplication occurs outside a method definition" - }); - case /* Incoherent_label_order */1 : - Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This function is applied to arguments", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } - }, - _1: "This function is applied to arguments@ " - }); - Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + return wrap_printing_env(env, (function (param$2) { + if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { + switch (param$1) { + case /* Outside_class */0 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This object duplication occurs outside a method definition", + _1: /* End_of_format */0 + }, + _1: "This object duplication occurs outside a method definition" + }); + case /* Incoherent_label_order */1 : + Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This function is applied to arguments", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: "in an order different from other calls.", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "in an order different from other calls.@ " - }); - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + _1: /* End_of_format */0 + } + }, + _1: "This function is applied to arguments@ " + }); + Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "in an order different from other calls.", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: "This is only allowed when the real type is known.", - _1: /* End_of_format */0 + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "This is only allowed when the real type is known." - }); - case /* Modules_not_allowed */2 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + _1: /* End_of_format */0 + } + }, + _1: "in an order different from other calls.@ " + }); + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This is only allowed when the real type is known.", + _1: /* End_of_format */0 + }, + _1: "This is only allowed when the real type is known." + }); + case /* Modules_not_allowed */2 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Modules are not allowed in this pattern.", + _1: /* End_of_format */0 + }, + _1: "Modules are not allowed in this pattern." + }); + case /* Cannot_infer_signature */3 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The signature for this packaged module couldn't be inferred.", + _1: /* End_of_format */0 + }, + _1: "The signature for this packaged module couldn't be inferred." + }); + case /* Unexpected_existential */4 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unexpected existential", + _1: /* End_of_format */0 + }, + _1: "Unexpected existential" + }); + case /* Invalid_interval */5 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "Modules are not allowed in this pattern.", + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Only character intervals are supported in patterns.", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: /* End_of_format */0 - }, - _1: "Modules are not allowed in this pattern." - }); - case /* Cannot_infer_signature */3 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[Only character intervals are supported in patterns.@]" + }); + case /* Invalid_for_loop_index */6 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "The signature for this packaged module couldn't be inferred.", + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Invalid for-loop index: only variables and _ are allowed.", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: /* End_of_format */0 - }, - _1: "The signature for this packaged module couldn't be inferred." - }); - case /* Unexpected_existential */4 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[Invalid for-loop index: only variables and _ are allowed.@]" + }); + case /* No_value_clauses */7 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "None of the patterns in this 'match' expression match values.", + _1: /* End_of_format */0 + }, + _1: "None of the patterns in this 'match' expression match values." + }); + case /* Exception_pattern_below_toplevel */8 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "Unexpected existential", + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Exception patterns must be at the top level of a match case.", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: /* End_of_format */0 - }, - _1: "Unexpected existential" - }); - case /* Invalid_interval */5 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "Only character intervals are supported in patterns.", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - }, - _1: "@[Only character intervals are supported in patterns.@]" - }); - case /* Invalid_for_loop_index */6 : - return Stdlib__Format.fprintf(param)({ + } + } + }, + _1: "@[Exception patterns must be at the top level of a match case.@]" + }); + + } + } else { + switch (param$1.TAG) { + case /* Polymorphic_label */0 : + return Curry._3(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* Formatting_gen */18, @@ -70865,28 +70929,38 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "Invalid for-loop index: only variables and _ are allowed.", + _0: "The record field ", _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 + TAG: /* Alpha */15, + _0: { + TAG: /* String_literal */11, + _0: " is polymorphic.", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } + } } } }, - _1: "@[Invalid for-loop index: only variables and _ are allowed.@]" - }); - case /* No_value_clauses */7 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "None of the patterns in this 'match' expression match values.", - _1: /* End_of_format */0 - }, - _1: "None of the patterns in this 'match' expression match values." - }); - case /* Exception_pattern_below_toplevel */8 : - return Stdlib__Format.fprintf(param)({ + _1: "@[The record field %a is polymorphic.@ %s@]" + }), longident, param$1._0, "You cannot instantiate it in a pattern."); + case /* Constructor_arity_mismatch */1 : + return Curry._4(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* Formatting_gen */18, @@ -70900,81 +70974,73 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "Exception patterns must be at the top level of a match case.", + _0: "The constructor ", _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - }, - _1: "@[Exception patterns must be at the top level of a match case.@]" - }); - - } - } else { - switch (param$1.TAG) { - case /* Polymorphic_label */0 : - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, + TAG: /* Alpha */15, _0: { - TAG: /* Open_box */1, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The record field ", + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* String_literal */11, - _0: " is polymorphic.", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "expects ", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: " argument(s),", _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 + TAG: /* String_literal */11, + _0: "but is applied here to ", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* String_literal */11, + _0: " argument(s)", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } } } } } } } - }, - _1: "@[The record field %a is polymorphic.@ %s@]" - }), longident, param$1._0, "You cannot instantiate it in a pattern."); - case /* Constructor_arity_mismatch */1 : - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, + } + } + }, + _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 : + const lid = param$1._0; + return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { + Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { TAG: /* String_literal */11, - _0: "The constructor ", + _0: "The record field ", _1: { TAG: /* Alpha */15, _0: { @@ -70987,420 +71053,159 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "expects ", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " argument(s),", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "but is applied here to ", - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " argument(s)", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } - } - } - } - } - } - }, - _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 : - const lid = param$1._0; - return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The record field ", - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "belongs to the type", - _1: /* End_of_format */0 - } - } - } - }, - _1: "The record field %a@ belongs to the type" - }), longident, lid); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is mixed here with fields of type", - _1: /* End_of_format */0 - }, - _1: "but is mixed here with fields of type" - }); - })); - case /* Pattern_type_clash */3 : - return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This pattern matches values of type", - _1: /* End_of_format */0 - }, - _1: "This pattern matches values of type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but a pattern was expected which matches values of type", - _1: /* End_of_format */0 - }, - _1: "but a pattern was expected which matches values of type" - }); - })); - case /* Or_pattern_type_clash */4 : - const id = param$1._0; - return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " on the left-hand side of this or-pattern has type", - _1: /* End_of_format */0 - } - } - }, - _1: "The variable %s on the left-hand side of this or-pattern has type" - }), id.name); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but on the right-hand side it has type", - _1: /* End_of_format */0 - }, - _1: "but on the right-hand side it has type" - }); - })); - case /* Multiply_bound_variable */5 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is bound several times in this matching", - _1: /* End_of_format */0 - } - } - }, - _1: "Variable %s is bound several times in this matching" - }), param$1._0); - case /* Orpat_vars */6 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " must occur on both sides of this | pattern", - _1: /* End_of_format */0 - } - } - }, - _1: "Variable %s must occur on both sides of this | pattern" - }), param$1._0.name); - case /* Expr_type_clash */7 : - return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This expression has type", - _1: /* End_of_format */0 - }, - _1: "This expression has type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but an expression was expected of type", - _1: /* End_of_format */0 - }, - _1: "but an expression was expected of type" - }); - })); - case /* Apply_non_function */8 : - const typ = param$1._0; - reset(undefined); - mark_loops(typ); - const match = repr(typ).desc; - if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tarrow */1) { - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", + _0: "belongs to the type", _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<2>", - _1: /* End_of_format */0 - }, - _1: "<2>" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "This function has type", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } } } } }, - _1: "@[@[<2>This function has type@ %a@]" - }), type_expr$1, typ); - return Curry._1(Stdlib__Format.fprintf(param)({ + _1: "The record field %a@ belongs to the type" + }), longident, lid); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is mixed here with fields of type", + _1: /* End_of_format */0 + }, + _1: "but is mixed here with fields of type" + }); + })); + case /* Pattern_type_clash */3 : + return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This pattern matches values of type", + _1: /* End_of_format */0 + }, + _1: "This pattern matches values of type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but a pattern was expected which matches values of type", + _1: /* End_of_format */0 + }, + _1: "but a pattern was expected which matches values of type" + }); + })); + case /* Or_pattern_type_clash */4 : + const id = param$1._0; + return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { + Curry._1(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "The variable ", _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "It is applied to too many arguments;", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } - }, - _1: "@ @[It is applied to too many arguments;@ %s@]@]" - }), "maybe you forgot a `;'."); - } - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", + _0: " on the left-hand side of this or-pattern has type", _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<2>", - _1: /* End_of_format */0 - }, - _1: "<2>" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "This expression has type", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } } } - } - }, - _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 : - const ty = param$1._1; - const print_label = function (ppf, l) { - if (l === "") { - return Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { + }, + _1: "The variable %s on the left-hand side of this or-pattern has type" + }), id.name); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but on the right-hand side it has type", + _1: /* End_of_format */0 + }, + _1: "but on the right-hand side it has type" + }); + })); + case /* Multiply_bound_variable */5 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Variable ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "without label", + _0: " is bound several times in this matching", _1: /* End_of_format */0 - }, - _1: "without label" - }); - } else { - return Curry._1(Stdlib__Format.fprintf(ppf)({ + } + } + }, + _1: "Variable %s is bound several times in this matching" + }), param$1._0); + case /* Orpat_vars */6 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Variable ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " must occur on both sides of this | pattern", + _1: /* End_of_format */0 + } + } + }, + _1: "Variable %s must occur on both sides of this | pattern" + }), param$1._0.name); + case /* Expr_type_clash */7 : + return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This expression has type", + _1: /* End_of_format */0 + }, + _1: "This expression has type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but an expression was expected of type", + _1: /* End_of_format */0 + }, + _1: "but an expression was expected of type" + }); + })); + case /* Apply_non_function */8 : + const typ = param$1._0; + reset(undefined); + mark_loops(typ); + const match = repr(typ).desc; + if (!/* tag */(typeof match === "number" || typeof match === "string") && match.TAG === /* Tarrow */1) { + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "with label ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } + _0: "", + _1: /* End_of_format */0 }, - _1: "with label %s" - }), prefixed_label_name(l)); - } - }; - reset(undefined); - mark_loops(ty); - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _1: "" + } + }, + _1: { TAG: /* Formatting_gen */18, _0: { TAG: /* Open_box */1, @@ -71408,196 +71213,134 @@ register_error_of_exn(function (err) { TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "", + _0: "<2>", _1: /* End_of_format */0 }, - _1: "" + _1: "<2>" } }, _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<2>", - _1: /* End_of_format */0 - }, - _1: "<2>" - } - }, + TAG: /* String_literal */11, + _0: "This function has type", _1: { - TAG: /* String_literal */11, - _0: "The function applied to this argument has type", + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, - _1: { - TAG: /* String_literal */11, - _0: "This argument cannot be applied ", - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } - }, - _1: "@[@[<2>The function applied to this argument has type@ %a@]@.This argument cannot be applied %a@]" - }), type_expr$1, ty, print_label, param$1._0); - case /* Label_multiply_defined */10 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "@[@[<2>This function has type@ %a@]" + }), type_expr$1, typ); + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: "The record field label ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is defined several times", - _1: /* End_of_format */0 - } - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "The record field label %s is defined several times" - }), param$1._0); - case /* Label_missing */11 : - const print_labels = function (ppf) { - return function (param) { - return Stdlib__List.iter((function (lbl) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "@ %s" - }), lbl.name); - }), param); - }; - }; - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _1: { TAG: /* Formatting_gen */18, _0: { TAG: /* Open_box */1, _0: { TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" + _0: /* End_of_format */0, + _1: "" } }, _1: { TAG: /* String_literal */11, - _0: "Some record fields are undefined:", + _0: "It is applied to too many arguments;", _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } } } } - }, - _1: "@[Some record fields are undefined:%a@]" - }), print_labels, param$1._0); - case /* Label_not_mutable */12 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "@ @[It is applied to too many arguments;@ %s@]@]" + }), "maybe you forgot a `;'."); + } + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "The record field ", - _1: { - TAG: /* Alpha */15, + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: " is not mutable", + _0: "<2>", _1: /* End_of_format */0 - } + }, + _1: "<2>" } }, - _1: "The record field %a is not mutable" - }), longident, param$1._0); - case /* Wrong_name */13 : - const lid$1 = param$1._4; - const p = param$1._3; - const kind = param$1._2; - const ty$1 = param$1._1; - reset(undefined); - mark_loops(ty$1); - Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + _1: { + TAG: /* String_literal */11, + _0: "This expression has type", _1: { - TAG: /* Formatting_gen */18, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<2>", - _1: /* End_of_format */0 - }, - _1: "<2>" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " type", + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: { TAG: /* Formatting_lit */17, _0: { @@ -71607,141 +71350,268 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } + _1: /* End_of_format */0 } } } } } } - }, - _1: "@[@[<2>%s type@ %a@]@ " - }), param$1._0, type_expr$1, ty$1); - Curry._5(Stdlib__Format.fprintf(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 : + const ty = param$1._1; + const print_label = function (ppf, l) { + if (l === "") { + return Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "without label", + _1: /* End_of_format */0 + }, + _1: "without label" + }); + } else { + return Curry._1(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "The ", + _0: "with label ", _1: { TAG: /* String */2, _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* String_literal */11, - _0: " does not belong to type ", - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } + _1: /* End_of_format */0 } }, - _1: "The %s %a does not belong to type %a@]" - }), kind === "record" ? "field" : "constructor", longident, lid$1, path, p); - if (kind === "record") { - return spellcheck_simple(param, fold_labels, (function (d) { - if (compare_type_path(env, p, get_type_path$1(env, d))) { - return d.lbl_name; - } else { - return ""; - } - }))(env, lid$1); - } else { - return spellcheck_simple(param, fold_constructors, (function (d) { - if (compare_type_path(env, p, get_type_path$2(env, d))) { - return d.cstr_name; - } else { - return ""; - } - }))(env, lid$1); - } - case /* Name_type_mismatch */14 : - const lid$2 = param$1._1; - const kind$1 = param$1._0; - const name = kind$1 === "record" ? "field" : "constructor"; - let param$3 = param$1._2; - let tpl = param$1._3; - const txt1 = function (ppf) { - Curry._4(Stdlib__Format.fprintf(ppf)({ + _1: "with label %s" + }), prefixed_label_name(l)); + } + }; + reset(undefined); + mark_loops(ty); + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "The ", + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "<2>", + _1: /* End_of_format */0 + }, + _1: "<2>" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The function applied to this argument has type", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Formatting_lit */17, + _0: /* Flush_newline */4, + _1: { + TAG: /* String_literal */11, + _0: "This argument cannot be applied ", _1: { - TAG: /* String_literal */11, - _0: "belongs to the ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " type", - _1: /* End_of_format */0 - } + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } + } + } + } + }, + _1: "@[@[<2>The function applied to this argument has type@ %a@]@.This argument cannot be applied %a@]" + }), type_expr$1, ty, print_label, param$1._0); + case /* Label_multiply_defined */10 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The record field label ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " is defined several times", + _1: /* End_of_format */0 + } + } + }, + _1: "The record field label %s is defined several times" + }), param$1._0); + case /* Label_missing */11 : + const print_labels = function (ppf) { + return function (param) { + return Stdlib__List.iter((function (lbl) { + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "@ %s" + }), lbl.name); + }), param); + }; + }; + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 }, - _1: "The %s %a@ belongs to the %s type" - }), name, longident, lid$2, kind$1); - }; - const txt2 = function (ppf) { - Curry._4(Stdlib__Format.fprintf(ppf)({ + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Some record fields are undefined:", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } + }, + _1: "@[Some record fields are undefined:%a@]" + }), print_labels, param$1._0); + case /* Label_not_mutable */12 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The record field ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* String_literal */11, + _0: " is not mutable", + _1: /* End_of_format */0 + } + } + }, + _1: "The record field %a is not mutable" + }), longident, param$1._0); + case /* Wrong_name */13 : + const lid$1 = param$1._4; + const p = param$1._3; + const kind = param$1._2; + const ty$1 = param$1._1; + reset(undefined); + mark_loops(ty$1); + Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "<2>", + _1: /* End_of_format */0 + }, + _1: "<2>" + } + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* String_literal */11, - _0: "The ", + _0: " type", _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -71749,172 +71619,236 @@ register_error_of_exn(function (err) { _1: 1, _2: 0 }, + _1: /* End_of_format */0 + } + } + } + } + } + } + } + }, + _1: "@[@[<2>%s type@ %a@]@ " + }), param$1._0, type_expr$1, ty$1); + Curry._5(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* String_literal */11, + _0: " does not belong to type ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } + } + } + } + }, + _1: "The %s %a does not belong to type %a@]" + }), kind === "record" ? "field" : "constructor", longident, lid$1, path, p); + if (kind === "record") { + return spellcheck_simple(param, fold_labels, (function (d) { + if (compare_type_path(env, p, get_type_path$1(env, d))) { + return d.lbl_name; + } else { + return ""; + } + }))(env, lid$1); + } else { + return spellcheck_simple(param, fold_constructors, (function (d) { + if (compare_type_path(env, p, get_type_path$2(env, d))) { + return d.cstr_name; + } else { + return ""; + } + }))(env, lid$1); + } + case /* Name_type_mismatch */14 : + const lid$2 = param$1._1; + const kind$1 = param$1._0; + const name = kind$1 === "record" ? "field" : "constructor"; + let param$3 = param$1._2; + let tpl = param$1._3; + const txt1 = function (ppf) { + Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "belongs to the ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "belongs to one of the following ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " types:", - _1: /* End_of_format */0 - } - } + _0: " type", + _1: /* End_of_format */0 } } } } } - }, - _1: "The %s %a@ belongs to one of the following %s types:" - }), name, longident, lid$2, kind$1); - }; - const txt3 = function (ppf) { - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but a ", + } + } + }, + _1: "The %s %a@ belongs to the %s type" + }), name, longident, lid$2, kind$1); + }; + const txt2 = function (ppf) { + Curry._4(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " was expected belonging to the ", + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: "belongs to one of the following ", _1: { - TAG: /* String_literal */11, - _0: " type", - _1: /* End_of_format */0 + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " types:", + _1: /* End_of_format */0 + } } } } } - }, - _1: "but a %s was expected belonging to the %s type" - }), name, kind$1); - }; - const tp0$p = param$3[1]; - const tp0 = param$3[0]; - return wrap_printing_env(env, (function (param$4) { - reset(undefined); - Stdlib__List.iter((function (param) { - path_same_name(tp0, param[0]); - path_same_name(tp0$p, param[1]); - }), tpl); - if (tpl) { - if (tpl.tl) { - return Curry._6(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* Theta */16, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Theta */16, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } - } - } - } - } - }, - _1: "@[%t@;<1 2>@[%a@]@ %t@;<1 2>%a@]" - }), txt2, type_path_list, tpl, txt3, (function (param, param$1) { - return type_path_expansion(tp0, param, param$1); - }), tp0$p); + } + } + }, + _1: "The %s %a@ belongs to one of the following %s types:" + }), name, longident, lid$2, kind$1); + }; + const txt3 = function (ppf) { + Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but a ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " was expected belonging to the ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " type", + _1: /* End_of_format */0 + } + } + } } - const match = tpl.hd; - const tp = match[0]; - return Curry._6(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + }, + _1: "but a %s was expected belonging to the %s type" + }), name, kind$1); + }; + const tp0$p = param$3[1]; + const tp0 = param$3[0]; + return wrap_printing_env(env, (function (param$4) { + reset(undefined); + Stdlib__List.iter((function (param) { + path_same_name(tp0, param[0]); + path_same_name(tp0$p, param[1]); + }), tpl); + if (tpl) { + if (tpl.tl) { + return Curry._6(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* Theta */16, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 }, _1: { - TAG: /* Theta */16, + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Open_box */1, _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, + TAG: /* Format */0, _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -71946,97 +71880,65 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[%t@;<1 2>%a@ %t@;<1 2>%a@]" - }), txt1, (function (param, param$1) { - return type_path_expansion(tp, param, param$1); - }), match[1], txt3, (function (param, param$1) { - return type_path_expansion(tp0, param, param$1); - }), tp0$p); - } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 37069, - 12 - ] - }); - })); - case /* Invalid_format */15 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - }, - _1: "%s" - }), param$1._0); - case /* Undefined_method */16 : - const ty$2 = param$1._0; - reset(undefined); - mark_loops(ty$2); - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 + } + } }, - _1: "" - } - }, - _1: { - TAG: /* Formatting_gen */18, + _1: "@[%t@;<1 2>@[%a@]@ %t@;<1 2>%a@]" + }), txt2, type_path_list, tpl, txt3, (function (param, param$1) { + return type_path_expansion(tp0, param, param$1); + }), tp0$p); + } + const match = tpl.hd; + const tp = match[0]; + return Curry._6(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, + TAG: /* Formatting_gen */18, _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "This expression has type", + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Theta */16, _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, + _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, - _0: "@,", - _1: 0, + _0: "@ ", + _1: 1, _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "It has no method ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Theta */16, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } } } } @@ -72044,303 +71946,90 @@ register_error_of_exn(function (err) { } } } - } - } - }, - _1: "@[@[This expression has type@;<1 2>%a@]@,It has no method %s@]" - }), type_expr$1, ty$2, param$1._1); - case /* Undefined_inherited_method */17 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + }, + _1: "@[%t@;<1 2>%a@ %t@;<1 2>%a@]" + }), txt1, (function (param, param$1) { + return type_path_expansion(tp, param, param$1); + }), match[1], txt3, (function (param, param$1) { + return type_path_expansion(tp0, param, param$1); + }), tp0$p); + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 37069, + 12 + ] + }); + })); + case /* Invalid_format */15 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + }, + _1: "%s" + }), param$1._0); + case /* Undefined_method */16 : + const ty$2 = param$1._0; + reset(undefined); + mark_loops(ty$2); + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "This expression has no method ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", _1: /* End_of_format */0 - } - }, - _1: "This expression has no method %s" - }), param$1._0); - case /* Virtual_class */18 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Cannot instantiate the virtual class ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "Cannot instantiate the virtual class %a" - }), longident, param$1._0); - case /* Private_type */19 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* String_literal */11, - _0: "Cannot create values of the private type ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" } }, - _1: "Cannot create values of the private type %a" - }), type_expr$1, param$1._0); - case /* Private_label */20 : - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _1: { TAG: /* String_literal */11, - _0: "Cannot assign field ", + _0: "This expression has type", _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: " of the private type ", - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } - } - }, - _1: "Cannot assign field %a of the private type %a" - }), longident, param$1._0, type_expr$1, param$1._1); - case /* Unbound_instance_variable */21 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound instance variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "Unbound instance variable %s" - }), param$1._0); - case /* Instance_variable_not_mutable */22 : - const v = param$1._1; - if (param$1._0) { - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The instance variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is not mutable", - _1: /* End_of_format */0 - } - } - }, - _1: "The instance variable %s is not mutable" - }), v); - } else { - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The value ", + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is not an instance variable", - _1: /* End_of_format */0 - } - } - }, - _1: "The value %s is not an instance variable" - }), v); - } - case /* Not_subtype */23 : - 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); - const tr1$1 = Stdlib__List.map(prepare_expansion, tr1); - const tr2$1 = Stdlib__List.map(prepare_expansion, tr2); - const partial_arg = Caml_obj.caml_equal(tr2$1, /* [] */0); - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - }, - _1: "@[%a" - }), (function (param, param$1) { - return trace$1(true, partial_arg, txt1$1, param, param$1); - }), tr1$1); - if (Caml_obj.caml_equal(tr2$1, /* [] */0)) { - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + TAG: /* Alpha */15, _0: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, - _1: /* End_of_format */0 - }, - _1: "@]" - }); - } - const mis = mismatch(true, tr2$1); - const partial_arg$1 = mis === undefined; - Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Alpha */15, - _0: { - TAG: /* Theta */16, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - }, - _1: "%a%t@]" - }), (function (param, param$1) { - return trace$1(false, partial_arg$1, "is not compatible with type", param, param$1); - }), tr2$1, (function (param) { - return explanation(true, mis, param); - })); - })); - case /* Value_multiply_overridden */24 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The instance variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " is overridden several times", - _1: /* End_of_format */0 - } - } - }, - _1: "The instance variable %s is overridden several times" - }), param$1._0); - case /* Coercion_failure */25 : - const ty$p = param$1._1; - const ty$3 = param$1._0; - report_unification_error(param, env, undefined, param$1._2, (function (ppf) { - const match = prepare_expansion([ - ty$3, - ty$p - ]); - const ty$4 = match[0]; - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This expression cannot be coerced to type", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "it has type", - _1: /* End_of_format */0 - } - } - } - } - } - }, - _1: "This expression cannot be coerced to type@;<1 2>%a;@ it has type" - }), (function (param, param$1) { - return type_expansion(ty$4, param, param$1); - }), match[1]); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is here used with type", - _1: /* End_of_format */0 - }, - _1: "but is here used with type" - }); - })); - if (param$1._3) { - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, - _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "It has no method ", _1: { TAG: /* String */2, _0: /* No_padding */0, @@ -72354,136 +72043,279 @@ register_error_of_exn(function (err) { } } } - }, - _1: ".@.@[%s@ %s@]" - }), "This simple coercion was not fully general.", "Consider using a double coercion."); - } else { - return; - } - case /* Too_many_arguments */26 : - const ty$4 = param$1._1; - reset(undefined); - mark_loops(ty$4); - if (param$1._0) { - Stdlib__Format.fprintf(param)({ + } + } + } + }, + _1: "@[@[This expression has type@;<1 2>%a@]@,It has no method %s@]" + }), type_expr$1, ty$2, param$1._1); + case /* Undefined_inherited_method */17 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This expression has no method ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "This expression has no method %s" + }), param$1._0); + case /* Virtual_class */18 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Cannot instantiate the virtual class ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Cannot instantiate the virtual class %a" + }), longident, param$1._0); + case /* Private_type */19 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Cannot create values of the private type ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + }, + _1: "Cannot create values of the private type %a" + }), type_expr$1, param$1._0); + case /* Private_label */20 : + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Cannot assign field ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* String_literal */11, + _0: " of the private type ", + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + } + }, + _1: "Cannot assign field %a of the private type %a" + }), longident, param$1._0, type_expr$1, param$1._1); + case /* Unbound_instance_variable */21 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound instance variable ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "Unbound instance variable %s" + }), param$1._0); + case /* Instance_variable_not_mutable */22 : + const v = param$1._1; + if (param$1._0) { + return Curry._1(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "This function expects too many arguments,", + _0: "The instance variable ", _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " is not mutable", + _1: /* End_of_format */0 + } } }, - _1: "This function expects too many arguments,@ " - }); - return Curry._2(Stdlib__Format.fprintf(param)({ + _1: "The instance variable %s is not mutable" + }), v); + } else { + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The value ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " is not an instance variable", + _1: /* End_of_format */0 + } + } + }, + _1: "The value %s is not an instance variable" + }), v); + } + case /* Not_subtype */23 : + 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); + const tr1$1 = Stdlib__List.map(prepare_expansion, tr1); + const tr2$1 = Stdlib__List.map(prepare_expansion, tr2); + const partial_arg = Caml_obj.caml_equal(tr2$1, /* [] */0); + Curry._2(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { - TAG: /* String_literal */11, - _0: "it should have type", - _1: { - TAG: /* Formatting_lit */17, + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" } + }, + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 } }, - _1: "it should have type@ %a" - }), type_expr$1, ty$4); - } else { - Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This expression should not be a function,", - _1: { + _1: "@[%a" + }), (function (param, param$1) { + return trace$1(true, partial_arg, txt1$1, param, param$1); + }), tr1$1); + if (Caml_obj.caml_equal(tr2$1, /* [] */0)) { + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + }, + _1: "@]" + }); + } + const mis = mismatch(true, tr2$1); + const partial_arg$1 = mis === undefined; + Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 + TAG: /* Alpha */15, + _0: { + TAG: /* Theta */16, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } }, + _1: "%a%t@]" + }), (function (param, param$1) { + return trace$1(false, partial_arg$1, "is not compatible with type", param, param$1); + }), tr2$1, (function (param) { + return explanation(true, mis, param); + })); + })); + case /* Value_multiply_overridden */24 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The instance variable ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " is overridden several times", _1: /* End_of_format */0 } - }, - _1: "This expression should not be a function,@ " - }); - return Curry._2(Stdlib__Format.fprintf(param)({ + } + }, + _1: "The instance variable %s is overridden several times" + }), param$1._0); + case /* Coercion_failure */25 : + const ty$p = param$1._1; + const ty$3 = param$1._0; + report_unification_error(param, env, undefined, param$1._2, (function (ppf) { + const match = prepare_expansion([ + ty$3, + ty$p + ]); + const ty$4 = match[0]; + Curry._2(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "the expected type is", + _0: "This expression cannot be coerced to type", _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, - _0: "@ ", + _0: "@;<1 2>", _1: 1, - _2: 0 + _2: 2 }, _1: { TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } - }, - _1: "the expected type is@ %a" - }), type_expr$1, ty$4); - } - case /* Abstract_wrong_label */27 : - const ty$5 = param$1._1; - const label_mark = function (l) { - if (l === "") { - return "but its first argument is not labelled"; - } else { - return Curry._1(Stdlib__Format.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but its first argument is labelled ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 + _0: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "it has type", + _1: /* End_of_format */0 + } + } + } } - }, - _1: "but its first argument is labelled %s" - }), prefixed_label_name(l)); - } - }; - reset(undefined); - mark_loops(ty$5); - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" } }, + _1: "This expression cannot be coerced to type@;<1 2>%a;@ it has type" + }), (function (param, param$1) { + return type_expansion(ty$4, param, param$1); + }), match[1]); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is here used with type", + _1: /* End_of_format */0 + }, + _1: "but is here used with type" + }); + })); + if (param$1._3) { + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* '.' */46, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Flush_newline */4, _1: { TAG: /* Formatting_gen */18, _0: { @@ -72492,15 +72324,15 @@ register_error_of_exn(function (err) { TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "<2>", + _0: "", _1: /* End_of_format */0 }, - _1: "<2>" + _1: "" } }, _1: { - TAG: /* String_literal */11, - _0: "This function should have type", + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* Formatting_lit */17, _0: { @@ -72510,177 +72342,224 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } + _1: /* End_of_format */0 } } } } } - }, - _1: "@[@[<2>This function should have type@ %a@]@,%s@]" - }), type_expr$1, ty$5, label_mark(param$1._0)); - case /* Scoping_let_module */28 : - const ty$6 = param$1._1; - reset(undefined); - mark_loops(ty$6); - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This `let module' expression has type", + } + }, + _1: ".@.@[%s@ %s@]" + }), "This simple coercion was not fully general.", "Consider using a double coercion."); + } else { + return; + } + case /* Too_many_arguments */26 : + const ty$4 = param$1._1; + reset(undefined); + mark_loops(ty$4); + if (param$1._0) { + Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This function expects too many arguments,", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: /* End_of_format */0 + } + }, + _1: "This function expects too many arguments,@ " + }); + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "it should have type", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 - } - } + TAG: /* Alpha */15, + _0: /* End_of_format */0 } - }, - _1: "This `let module' expression has type@ %a@ " - }), type_expr$1, ty$6); - return Curry._1(Stdlib__Format.fprintf(param)({ + } + }, + _1: "it should have type@ %a" + }), type_expr$1, ty$4); + } else { + Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This expression should not be a function,", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: /* End_of_format */0 + } + }, + _1: "This expression should not be a function,@ " + }); + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "the expected type is", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + }, + _1: "the expected type is@ %a" + }), type_expr$1, ty$4); + } + case /* Abstract_wrong_label */27 : + const ty$5 = param$1._1; + const label_mark = function (l) { + if (l === "") { + return "but its first argument is not labelled"; + } else { + return Curry._1(Stdlib__Format.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "In this type, the locally bound module name ", + _0: "but its first argument is labelled ", _1: { TAG: /* String */2, _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " escapes its scope", - _1: /* End_of_format */0 - } + _1: /* End_of_format */0 } }, - _1: "In this type, the locally bound module name %s escapes its scope" - }), param$1._0); - case /* Masked_instance_variable */29 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + _1: "but its first argument is labelled %s" + }), prefixed_label_name(l)); + } + }; + reset(undefined); + mark_loops(ty$5); + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "The instance variable ", - _1: { - TAG: /* Alpha */15, + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "cannot be accessed from the definition of another instance variable", - _1: /* End_of_format */0 - } - } + TAG: /* String_literal */11, + _0: "<2>", + _1: /* End_of_format */0 + }, + _1: "<2>" } }, - _1: "The instance variable %a@ cannot be accessed from the definition of another instance variable" - }), longident, param$1._0); - case /* Not_a_variant_type */30 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { + _1: { TAG: /* String_literal */11, - _0: "The type ", + _0: "This function should have type", _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "is not a variant type", - _1: /* End_of_format */0 - } - } - } - }, - _1: "The type %a@ is not a variant type" - }), longident, param$1._0); - case /* Less_general */31 : - const kind$2 = param$1._0; - return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This ", + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: " has type", + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: /* End_of_format */0 } } - }, - _1: "This %s has type" - }), kind$2); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "which is less general than", - _1: /* End_of_format */0 - }, - _1: "which is less general than" - }); - })); - case /* Not_a_packed_module */32 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + } + } + } + } + }, + _1: "@[@[<2>This function should have type@ %a@]@,%s@]" + }), type_expr$1, ty$5, label_mark(param$1._0)); + case /* Scoping_let_module */28 : + const ty$6 = param$1._1; + reset(undefined); + mark_loops(ty$6); + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This `let module' expression has type", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* String_literal */11, - _0: "This expression is packed module, but the expected type is", - _1: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -72688,94 +72567,215 @@ register_error_of_exn(function (err) { _1: 1, _2: 0 }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } + _1: /* End_of_format */0 } - }, - _1: "This expression is packed module, but the expected type is@ %a" - }), type_expr$1, param$1._0); - case /* Recursive_local_constraint */33 : - return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Recursive local constraint when unifying", - _1: /* End_of_format */0 - }, - _1: "Recursive local constraint when unifying" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "with", - _1: /* End_of_format */0 - }, - _1: "with" - }); - })); - case /* Unqualified_gadt_pattern */34 : - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "This `let module' expression has type@ %a@ " + }), type_expr$1, ty$6); + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "In this type, the locally bound module name ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " escapes its scope", + _1: /* End_of_format */0 + } + } + }, + _1: "In this type, the locally bound module name %s escapes its scope" + }), param$1._0); + case /* Masked_instance_variable */29 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The instance variable ", + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "cannot be accessed from the definition of another instance variable", + _1: /* End_of_format */0 + } + } + } + }, + _1: "The instance variable %a@ cannot be accessed from the definition of another instance variable" + }), longident, param$1._0); + case /* Not_a_variant_type */30 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The type ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { TAG: /* String_literal */11, - _0: "The GADT constructor ", + _0: "is not a variant type", + _1: /* End_of_format */0 + } + } + } + }, + _1: "The type %a@ is not a variant type" + }), longident, param$1._0); + case /* Less_general */31 : + const kind$2 = param$1._0; + return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This ", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: " of type ", + _0: " has type", + _1: /* End_of_format */0 + } + } + }, + _1: "This %s has type" + }), kind$2); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "which is less general than", + _1: /* End_of_format */0 + }, + _1: "which is less general than" + }); + })); + case /* Not_a_packed_module */32 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This expression is packed module, but the expected type is", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + }, + _1: "This expression is packed module, but the expected type is@ %a" + }), type_expr$1, param$1._0); + case /* Recursive_local_constraint */33 : + return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Recursive local constraint when unifying", + _1: /* End_of_format */0 + }, + _1: "Recursive local constraint when unifying" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "with", + _1: /* End_of_format */0 + }, + _1: "with" + }); + })); + case /* Unqualified_gadt_pattern */34 : + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The GADT constructor ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: " of type ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* '.' */46, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } - }, - _1: "@[The GADT constructor %s of type %a@ %s.@]" - }), param$1._1, path, param$1._0, "must be qualified in this pattern"); - - } - } - })); - }), err._3); + } + } + }, + _1: "@[The GADT constructor %s of type %a@ %s.@]" + }), param$1._1, path, param$1._0, "must be qualified in this pattern"); + + } + } + })); + }), err._3); }); add_delayed_check_forward.contents = add_delayed_check; @@ -72785,17 +72785,17 @@ const $$Error$8 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Ty function enter_type$1(env, sdecl, id) { const match = sdecl.ptype_manifest; const decl_type_params = Stdlib__List.map((function (param) { - return newty2(100000000, { - TAG: /* Tvar */0, - _0: undefined - }); - }), sdecl.ptype_params); + return newty2(100000000, { + TAG: /* Tvar */0, + _0: undefined + }); + }), sdecl.ptype_params); const decl_type_arity = Stdlib__List.length(sdecl.ptype_params); const decl_type_private = sdecl.ptype_private; const decl_type_manifest = match !== undefined ? newvar(undefined, undefined) : undefined; const decl_type_variance = Stdlib__List.map((function (param) { - return Types_Variance.full; - }), sdecl.ptype_params); + return Types_Variance.full; + }), sdecl.ptype_params); const decl_type_loc = sdecl.ptype_loc; const decl_type_attributes = sdecl.ptype_attributes; const decl = { @@ -73086,11 +73086,11 @@ function make_constructor(env, type_path, type_params, sargs, sret_type) { const z = narrow(undefined); reset_type_variables(undefined); const targs = Stdlib__List.map((function (param) { - return transl_simple_type(env, false, param); - }), sargs); + return transl_simple_type(env, false, param); + }), sargs); const args = Stdlib__List.map((function (cty) { - return cty.ctyp_type; - }), targs); + return cty.ctyp_type; + }), targs); const tret_type = transl_simple_type(env, false, sret_type); const ret_type = tret_type.ctyp_type; const match = repr(ret_type).desc; @@ -73118,11 +73118,11 @@ function make_constructor(env, type_path, type_params, sargs, sret_type) { ]; } const targs$1 = Stdlib__List.map((function (param) { - return transl_simple_type(env, true, param); - }), sargs); + return transl_simple_type(env, true, param); + }), sargs); const args$1 = Stdlib__List.map((function (cty) { - return cty.ctyp_type; - }), targs$1); + return cty.ctyp_type; + }), targs$1); return [ targs$1, undefined, @@ -73138,15 +73138,15 @@ function generalize_decl(decl) { v === /* Type_abstract */0; } else if (v.TAG === /* Type_record */0) { Stdlib__List.iter((function (l) { - iter_generalize$1({ - contents: /* [] */0 - }, l.ld_type); - }), v._0); + iter_generalize$1({ + contents: /* [] */0 + }, l.ld_type); + }), v._0); } else { Stdlib__List.iter((function (c) { - Stdlib__List.iter(generalize, c.cd_args); - may(generalize, c.cd_res); - }), v._0); + Stdlib__List.iter(generalize, c.cd_args); + may(generalize, c.cd_res); + }), v._0); } const ty = decl.type_manifest; if (ty !== undefined) { @@ -73168,16 +73168,16 @@ function check_constraints_rec(env, loc, visited, _ty) { const match = ty$1.desc; if (/* tag */typeof match === "number" || typeof match === "string") { return iter_type_expr((function (param) { - return check_constraints_rec(env, loc, visited, param); - }), ty$1); + return check_constraints_rec(env, loc, visited, param); + }), ty$1); } switch (match.TAG) { case /* Tconstr */3 : const args = match._1; const path = match._0; const args$p = Stdlib__List.map((function (param) { - return newvar(undefined, undefined); - }), args); + return newvar(undefined, undefined); + }), args); const ty$p = newconstr(path, args$p); try { enforce_constraints(env, ty$p); @@ -73218,16 +73218,16 @@ function check_constraints_rec(env, loc, visited, _ty) { }); } return Stdlib__List.iter((function (param) { - return check_constraints_rec(env, loc, visited, param); - }), args); + return check_constraints_rec(env, loc, visited, param); + }), args); case /* Tpoly */10 : const match$1 = instance_poly(undefined, false, match._1, match._0); _ty = match$1[1]; continue; default: return iter_type_expr((function (param) { - return check_constraints_rec(env, loc, visited, param); - }), ty$1); + return check_constraints_rec(env, loc, visited, param); + }), ty$1); } }; } @@ -73556,8 +73556,8 @@ function check_well_founded(env, loc, path, to_check, ty) { } const nodes = tmp$1 ? /* Empty */0 : exp_nodes$1; return iter_type_expr((function (param) { - return check(ty0, nodes, param); - }), ty$1); + return check(ty0, nodes, param); + }), ty$1); } if (exn$1.MEL_EXN_ID === Unify) { return backtrack(snap); @@ -73566,8 +73566,8 @@ function check_well_founded(env, loc, path, to_check, ty) { } }; wrap_trace_gadt_instances(env, (function (param) { - return check(ty, /* Empty */0, param); - }), ty); + return check(ty, /* Empty */0, param); + }), ty); } function check_well_founded_decl(env, loc, path, decl, to_check) { @@ -73617,8 +73617,8 @@ function check_recursion(env, loc, path, decl, to_check) { const match = ty$1.desc; if (/* tag */typeof match === "number" || typeof match === "string") { return iter_type_expr((function (param) { - return check_regular(cpath, args, prev_exp, param); - }), ty$1); + return check_regular(cpath, args, prev_exp, param); + }), ty$1); } switch (match.TAG) { case /* Tconstr */3 : @@ -73645,8 +73645,8 @@ function check_recursion(env, loc, path, decl, to_check) { const 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); + return unify$2(env, param, param$1); + }), match$2[0], args$p); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -73677,23 +73677,23 @@ function check_recursion(env, loc, path, decl, to_check) { } } return Stdlib__List.iter((function (param) { - return check_regular(cpath, args, prev_exp, param); - }), args$p); + return check_regular(cpath, args, prev_exp, param); + }), args$p); case /* Tpoly */10 : const match$3 = instance_poly(true, false, match._1, match._0); _ty = match$3[1]; continue; default: return iter_type_expr((function (param) { - return check_regular(cpath, args, prev_exp, param); - }), ty$1); + return check_regular(cpath, args, prev_exp, param); + }), ty$1); } }; }; may((function (body) { - const match = instance_parameterized_type(true, decl.type_params, body); - check_regular(path, match[0], /* [] */0, match[1]); - }), decl.type_manifest); + const match = instance_parameterized_type(true, decl.type_params, body); + check_regular(path, match[0], /* [] */0, match[1]); + }), decl.type_manifest); } function get_variance(ty, visited) { @@ -73746,24 +73746,24 @@ function compute_variance(env, visited, vari, ty) { try { const decl = find_type_full(tl._0, env)[0]; return Stdlib__List.iter2((function (ty, v) { - const 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); - } - const p1 = Curry._2(Types_Variance.inter, v, vari$1); - const n1 = Curry._2(Types_Variance.inter, v, Curry._1(Types_Variance.conjugate, vari$1)); - const 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)))); - const 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); - const v2 = Curry._3(Types_Variance.set, /* May_weak */2, weak, v1); - compute_variance_rec(v2, ty); - }), tl$1, decl.type_variance); + const 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); + } + const p1 = Curry._2(Types_Variance.inter, v, vari$1); + const n1 = Curry._2(Types_Variance.inter, v, Curry._1(Types_Variance.conjugate, vari$1)); + const 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)))); + const 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); + const v2 = Curry._3(Types_Variance.set, /* May_weak */2, weak, v1); + compute_variance_rec(v2, ty); + }), tl$1, decl.type_variance); } catch (raw_exn){ const 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); - }), tl$1); + return compute_variance_rec(Types_Variance.may_inv, param); + }), tl$1); } throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } @@ -73775,35 +73775,35 @@ function compute_variance(env, visited, vari, ty) { case /* Tvariant */8 : const row = row_repr_aux(/* [] */0, tl._0); Stdlib__List.iter((function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG === /* Rpresent */0) { + const ty = match._0; + if (ty !== undefined) { + return compute_variance_rec(vari$1, ty); + } else { return; } - if (match.TAG === /* Rpresent */0) { - const ty = match._0; - if (ty !== undefined) { - return compute_variance_rec(vari$1, ty); - } else { - return; - } - } - const upper = Stdlib__List.fold_left((function (s, f) { - return Curry._3(Types_Variance.set, f, true, s); - }), Types_Variance.$$null, { - hd: /* May_pos */0, + } + const upper = Stdlib__List.fold_left((function (s, f) { + return Curry._3(Types_Variance.set, f, true, s); + }), Types_Variance.$$null, { + hd: /* May_pos */0, + tl: { + hd: /* May_neg */1, tl: { - hd: /* May_neg */1, - tl: { - hd: /* May_weak */2, - tl: /* [] */0 - } + hd: /* May_weak */2, + tl: /* [] */0 } - }); - const v = Curry._2(Types_Variance.inter, vari$1, upper); - Stdlib__List.iter((function (param) { - return compute_variance_rec(v, param); - }), match._1); - }), row.row_fields); + } + }); + const v = Curry._2(Types_Variance.inter, vari$1, upper); + Stdlib__List.iter((function (param) { + return compute_variance_rec(v, param); + }), match._1); + }), row.row_fields); _ty = row.row_more; _vari = vari$1; continue; @@ -73816,8 +73816,8 @@ function compute_variance(env, visited, vari, ty) { case /* Tpackage */11 : const 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 (param) { - return compute_variance_rec(v$1, param); - }), tl._2); + return compute_variance_rec(v$1, param); + }), tl._2); default: return; } @@ -73833,87 +73833,87 @@ function make(p, n, i) { function compute_variance_type(env, check, param, decl, tyl) { const loc = param[1]; const required = Stdlib__List.map((function (param) { - const i = param[2]; - const n = param[1]; - const c = param[0]; - if (c || n) { - return [ - c, - n, - i - ]; - } else { - return [ - true, - true, - i - ]; - } - }), param[0]); + const i = param[2]; + const n = param[1]; + const c = param[0]; + if (c || n) { + return [ + c, + n, + i + ]; + } else { + return [ + true, + true, + i + ]; + } + }), param[0]); const params = Stdlib__List.map(repr, decl.type_params); const tvl = { contents: /* Empty */0 }; Stdlib__List.iter((function (param) { - compute_variance(env, tvl, param[0] ? Types_Variance.full : Types_Variance.covariant, param[1]); - }), tyl); + compute_variance(env, tvl, param[0] ? Types_Variance.full : Types_Variance.covariant, param[1]); + }), tyl); if (check) { const pos = { contents: 0 }; Stdlib__List.iter2((function (ty, param) { - const i = param[2]; - const n = param[1]; - const c = param[0]; - pos.contents = pos.contents + 1 | 0; - const $$var = get_variance(ty, tvl); - const match = Curry._1(Types_Variance.get_upper, $$var); - const cn = match[1]; - const co = match[0]; - const ij = Curry._2(Types_Variance.mem, /* Inj */3, $$var); - if (!(is_Tvar(ty) && (co && !c || cn && !n || !ij && i))) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$8, { - MEL_EXN_ID: $$Error$8, - _1: loc, - _2: { - TAG: /* Bad_variance */16, - _0: pos.contents, - _1: [ - co, - cn, - ij - ], - _2: [ - c, - n, - i - ] - } - }); - }), params, required); + const i = param[2]; + const n = param[1]; + const c = param[0]; + pos.contents = pos.contents + 1 | 0; + const $$var = get_variance(ty, tvl); + const match = Curry._1(Types_Variance.get_upper, $$var); + const cn = match[1]; + const co = match[0]; + const ij = Curry._2(Types_Variance.mem, /* Inj */3, $$var); + if (!(is_Tvar(ty) && (co && !c || cn && !n || !ij && i))) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$8, { + MEL_EXN_ID: $$Error$8, + _1: loc, + _2: { + TAG: /* Bad_variance */16, + _0: pos.contents, + _1: [ + co, + cn, + ij + ], + _2: [ + c, + n, + i + ] + } + }); + }), params, required); const args = newty2(100000000, { TAG: /* Ttuple */2, _0: params }); const fvl = free_variables$1(undefined, args); const fvl$1 = Stdlib__List.filter((function (v) { - return !Stdlib__List.memq(v, params); - }), fvl); + return !Stdlib__List.memq(v, params); + }), fvl); if (!Caml_obj.caml_equal(fvl$1, /* [] */0)) { const tvl2 = { contents: /* Empty */0 }; Stdlib__List.iter2((function (ty, param) { - if (is_Tvar(ty)) { - return; - } - const 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); + if (is_Tvar(ty)) { + return; + } + const 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); const visited = { contents: /* Empty */0 }; @@ -73927,18 +73927,18 @@ function compute_variance_type(env, check, param, decl, tyl) { const v1 = get_variance(ty$1, tvl); const snap = snapshot(undefined); const v2 = Curry._3(fold$3, (function (t, vt, v) { - if (equal$5(env, false, { - hd: ty$1, - tl: /* [] */0 - }, { - hd: t, - tl: /* [] */0 - })) { - return Curry._2(Types_Variance.union, vt, v); - } else { - return v; - } - }), tvl2.contents, Types_Variance.$$null); + if (equal$5(env, false, { + hd: ty$1, + tl: /* [] */0 + }, { + hd: t, + tl: /* [] */0 + })) { + return Curry._2(Types_Variance.union, vt, v); + } else { + return v; + } + }), tvl2.contents, Types_Variance.$$null); backtrack(snap); const match = Curry._1(Types_Variance.get_upper, v1); const n1 = match[1]; @@ -73975,48 +73975,48 @@ function compute_variance_type(env, check, param, decl, tyl) { }); }; Stdlib__List.iter((function (param) { - check$1(param[1]); - }), tyl); + check$1(param[1]); + }), tyl); } } return Stdlib__List.map2((function (ty, param) { - const v = get_variance(ty, tvl); - const tr = decl.type_private; - const concr = Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0); - const match = tr === /* Private */0 || !is_Tvar(ty) ? [ - param[0], - param[1] - ] : [ - false, - false - ]; - const n = match[1]; - const p = match[0]; - const i = concr || param[2] && tr === /* Private */0; - const v$1 = Curry._2(Types_Variance.union, v, make(p, n, i)); - const 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 - ) : Curry._1(Types_Variance.conjugate, Types_Variance.covariant)) - ) - ) : v$1; - if (Caml_obj.caml_equal(decl.type_kind, /* Type_abstract */0) && tr === /* Public */1) { - return v$2; - } else { - return Curry._3(Types_Variance.set, /* May_weak */2, Curry._2(Types_Variance.mem, /* May_neg */1, v$2), v$2); - } - }), params, required); + const v = get_variance(ty, tvl); + const tr = decl.type_private; + const concr = Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0); + const match = tr === /* Private */0 || !is_Tvar(ty) ? [ + param[0], + param[1] + ] : [ + false, + false + ]; + const n = match[1]; + const p = match[0]; + const i = concr || param[2] && tr === /* Private */0; + const v$1 = Curry._2(Types_Variance.union, v, make(p, n, i)); + const 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 + ) : Curry._1(Types_Variance.conjugate, Types_Variance.covariant)) + ) + ) : v$1; + if (Caml_obj.caml_equal(decl.type_kind, /* Type_abstract */0) && tr === /* Public */1) { + return v$2; + } else { + return Curry._3(Types_Variance.set, /* May_weak */2, Curry._2(Types_Variance.mem, /* May_neg */1, v$2), v$2); + } + }), params, required); } function add_false(param) { return Stdlib__List.map((function (ty) { - return [ - false, - ty - ]; - }), param); + return [ + false, + ty + ]; + }), param); } function constrained(env, vars, ty) { @@ -74025,8 +74025,8 @@ function constrained(env, vars, ty) { return true; } else { return Stdlib__List.exists((function (tl) { - return Stdlib__List.memq(ty, tl); - }), vars); + return Stdlib__List.memq(ty, tl); + }), vars); } } @@ -74062,37 +74062,37 @@ function compute_variance_gadt(env, check, rloc, decl, param) { if (match$1.TAG === /* Tconstr */3) { const tyl = Stdlib__List.map(repr, match$1._1); const fvl = Stdlib__List.map((function (param) { - return free_variables$1(undefined, param); - }), tyl); + return free_variables$1(undefined, param); + }), tyl); Stdlib__List.fold_left2((function (param, ty, param$1) { - const fv2 = param[1]; - if (fv2) { - const fv2$1 = fv2.tl; - const 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, - _1: loc, - _2: /* Varying_anonymous */4 - }); - } - return [ - { - hd: fv2.hd, - tl: fv1 - }, - fv2$1 - ]; + const fv2 = param[1]; + if (fv2) { + const fv2$1 = fv2.tl; + const 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, + _1: loc, + _2: /* Varying_anonymous */4 + }); } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 47012, - 37 - ] - }); - }), [ + return [ + { + hd: fv2.hd, + tl: fv1 + }, + fv2$1 + ]; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 47012, + 37 + ] + }); + }), [ /* [] */0, fvl ], tyl, rloc[0]); @@ -74138,8 +74138,8 @@ function compute_variance_extension(env, check, decl, ext, rloc) { function compute_variance_decl(env, check, decl, rloc) { if ((Caml_obj.caml_equal(decl.type_kind, /* Type_abstract */0) || Caml_obj.caml_equal(decl.type_kind, /* Type_open */1)) && decl.type_manifest === undefined) { return Stdlib__List.map((function (param) { - return make(!param[1], !param[0], Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0) || param[2]); - }), rloc[0]); + return make(!param[1], !param[0], Caml_obj.caml_notequal(decl.type_kind, /* Type_abstract */0) || param[2]); + }), rloc[0]); } const ty = decl.type_manifest; const mn = ty !== undefined ? ({ @@ -74155,49 +74155,49 @@ function compute_variance_decl(env, check, decl, rloc) { } if (tll.TAG === /* Type_record */0) { return compute_variance_type(env, check, rloc, decl, Stdlib.$at(mn, Stdlib__List.map((function (param) { - return [ - param.ld_mutable === /* Mutable */1, - param.ld_type - ]; - }), tll._0))); + return [ + param.ld_mutable === /* Mutable */1, + param.ld_type + ]; + }), tll._0))); } const tll$1 = tll._0; if (Stdlib__List.for_all((function (c) { - return c.cd_res === undefined; - }), tll$1)) { + return c.cd_res === undefined; + }), tll$1)) { return compute_variance_type(env, check, rloc, decl, Stdlib.$at(mn, add_false(Stdlib__List.flatten(Stdlib__List.map((function (c) { - return c.cd_args; - }), tll$1))))); + return c.cd_args; + }), tll$1))))); } const mn$1 = Stdlib__List.map((function (param) { - return [ - { - hd: param[1], - tl: /* [] */0 - }, - undefined - ]; - }), mn); + return [ + { + hd: param[1], + tl: /* [] */0 + }, + undefined + ]; + }), mn); const tll$2 = Stdlib.$at(mn$1, Stdlib__List.map((function (c) { - return [ - c.cd_args, - c.cd_res - ]; - }), tll$1)); + return [ + c.cd_args, + c.cd_res + ]; + }), tll$1)); const match = Stdlib__List.map((function (param) { - return compute_variance_gadt(env, check, rloc, decl, param); - }), tll$2); + return compute_variance_gadt(env, check, rloc, decl, param); + }), tll$2); if (match) { const 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.map2(Types_Variance.union, param, param$1); + }), match.hd, match.tl); return Stdlib__List.map((function (v) { - if (Curry._2(Types_Variance.mem, /* Pos */4, v) && Curry._2(Types_Variance.mem, /* Neg */5, v)) { - return Types_Variance.full; - } else { - return v; - } - }), varl); + if (Curry._2(Types_Variance.mem, /* Pos */4, v) && Curry._2(Types_Variance.mem, /* Neg */5, v)) { + return Types_Variance.full; + } else { + return v; + } + }), varl); } throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -74222,45 +74222,45 @@ function compute_variance_fixpoint(env, decls, required, _variances) { while(true) { const variances = _variances; const new_decls = Stdlib__List.map2((function (param, variance) { - const decl = param[1]; - return [ - param[0], - { - type_params: decl.type_params, - type_arity: decl.type_arity, - type_kind: decl.type_kind, - type_private: decl.type_private, - type_manifest: decl.type_manifest, - type_variance: variance, - type_newtype_level: decl.type_newtype_level, - type_loc: decl.type_loc, - type_attributes: decl.type_attributes - } - ]; - }), decls, variances); + const decl = param[1]; + return [ + param[0], + { + type_params: decl.type_params, + type_arity: decl.type_arity, + type_kind: decl.type_kind, + type_private: decl.type_private, + type_manifest: decl.type_manifest, + type_variance: variance, + type_newtype_level: decl.type_newtype_level, + type_loc: decl.type_loc, + type_attributes: decl.type_attributes + } + ]; + }), decls, variances); const new_env = Stdlib__List.fold_right((function (param, env) { - return add_type$1(true, param[0], param[1], env); - }), new_decls, env); + return add_type$1(true, param[0], param[1], env); + }), new_decls, env); const new_variances = Stdlib__List.map2((function (param) { - const decl = param[1]; - return function (param) { - return compute_variance_decl(new_env, false, decl, param); - }; - }), new_decls, required); + const decl = param[1]; + return function (param) { + return compute_variance_decl(new_env, false, decl, param); + }; + }), new_decls, required); const new_variances$1 = Stdlib__List.map2((function (param, param$1) { - return Stdlib__List.map2(Types_Variance.union, param, param$1); - }), new_variances, variances); + return Stdlib__List.map2(Types_Variance.union, param, param$1); + }), new_variances, variances); if (Caml_obj.caml_notequal(new_variances$1, variances)) { _variances = new_variances$1; continue; } Stdlib__List.iter2((function (param, req) { - if (!is_sharp(param[0])) { - compute_variance_decl(new_env, true, param[1], req); - return; - } - - }), new_decls, required); + if (!is_sharp(param[0])) { + compute_variance_decl(new_env, true, param[1], req); + return; + } + + }), new_decls, required); return [ new_decls, new_env @@ -74270,59 +74270,59 @@ function compute_variance_fixpoint(env, decls, required, _variances) { function init_variance(param) { return Stdlib__List.map((function (param) { - return Types_Variance.$$null; - }), param[1].type_params); + return Types_Variance.$$null; + }), param[1].type_params); } function add_injectivity(param) { return Stdlib__List.map((function (param) { - switch (param) { - case /* Covariant */0 : - return [ - true, - false, - false - ]; - case /* Contravariant */1 : - return [ - false, - true, - false - ]; - case /* Invariant */2 : - return [ - false, - false, - false - ]; - - } - }), param); + switch (param) { + case /* Covariant */0 : + return [ + true, + false, + false + ]; + case /* Contravariant */1 : + return [ + false, + true, + false + ]; + case /* Invariant */2 : + return [ + false, + false, + false + ]; + + } + }), param); } function compute_variance_decls(env, cldecls) { const match = Stdlib__List.fold_right((function (param, param$1) { - const ci = param[5]; - const variance = Stdlib__List.map((function (prim) { - return prim[1]; - }), ci.ci_params); - return [ - { - hd: [ - param[0], - param[1] - ], - tl: param$1[0] - }, - { - hd: [ - add_injectivity(variance), - ci.ci_loc - ], - tl: param$1[1] - } - ]; - }), cldecls, [ + const ci = param[5]; + const variance = Stdlib__List.map((function (prim) { + return prim[1]; + }), ci.ci_params); + return [ + { + hd: [ + param[0], + param[1] + ], + tl: param$1[0] + }, + { + hd: [ + add_injectivity(variance), + ci.ci_loc + ], + tl: param$1[1] + } + ]; + }), cldecls, [ /* [] */0, /* [] */0 ]); @@ -74330,95 +74330,95 @@ function compute_variance_decls(env, cldecls) { const variances = Stdlib__List.map(init_variance, decls); const match$1 = compute_variance_fixpoint(env, decls, match[1], variances); return Stdlib__List.map2((function (param, param$1) { - const cltydef = param$1[4]; - const clty = param$1[3]; - const cl_abbr = param$1[2]; - const decl = param[1]; - const variance = decl.type_variance; - return [ - decl, - { - type_params: cl_abbr.type_params, - type_arity: cl_abbr.type_arity, - type_kind: cl_abbr.type_kind, - type_private: cl_abbr.type_private, - type_manifest: cl_abbr.type_manifest, - type_variance: variance, - type_newtype_level: cl_abbr.type_newtype_level, - type_loc: cl_abbr.type_loc, - type_attributes: cl_abbr.type_attributes - }, - { - cty_params: clty.cty_params, - cty_type: clty.cty_type, - cty_path: clty.cty_path, - cty_new: clty.cty_new, - cty_variance: variance, - cty_loc: clty.cty_loc, - cty_attributes: clty.cty_attributes - }, - { - clty_params: cltydef.clty_params, - clty_type: cltydef.clty_type, - clty_path: cltydef.clty_path, - clty_variance: variance, - clty_loc: cltydef.clty_loc, - clty_attributes: cltydef.clty_attributes - } - ]; - }), match$1[0], cldecls); + const cltydef = param$1[4]; + const clty = param$1[3]; + const cl_abbr = param$1[2]; + const decl = param[1]; + const variance = decl.type_variance; + return [ + decl, + { + type_params: cl_abbr.type_params, + type_arity: cl_abbr.type_arity, + type_kind: cl_abbr.type_kind, + type_private: cl_abbr.type_private, + type_manifest: cl_abbr.type_manifest, + type_variance: variance, + type_newtype_level: cl_abbr.type_newtype_level, + type_loc: cl_abbr.type_loc, + type_attributes: cl_abbr.type_attributes + }, + { + cty_params: clty.cty_params, + cty_type: clty.cty_type, + cty_path: clty.cty_path, + cty_new: clty.cty_new, + cty_variance: variance, + cty_loc: clty.cty_loc, + cty_attributes: clty.cty_attributes + }, + { + clty_params: cltydef.clty_params, + clty_type: cltydef.clty_type, + clty_path: cltydef.clty_path, + clty_variance: variance, + clty_loc: cltydef.clty_loc, + clty_attributes: cltydef.clty_attributes + } + ]; + }), match$1[0], cldecls); } function check_duplicates(sdecl_list) { const labels = Stdlib__Hashtbl.create(undefined, 7); const constrs = Stdlib__Hashtbl.create(undefined, 7); Stdlib__List.iter((function (sdecl) { - const cl = sdecl.ptype_kind; - if (/* tag */typeof cl === "number" || typeof cl === "string") { - return; - } else if (cl.TAG === /* Ptype_variant */0) { - return Stdlib__List.iter((function (pcd) { - try { - const name$p = Stdlib__Hashtbl.find(constrs, pcd.pcd_name.txt); - return prerr_warning(pcd.pcd_loc, { - TAG: /* Duplicate_definitions */14, - _0: "constructor", - _1: pcd.pcd_name.txt, - _2: name$p, - _3: sdecl.ptype_name.txt - }); - } - catch (raw_exn){ - const 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); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }), cl._0); - } else { - return Stdlib__List.iter((function (param) { - const cname = param.pld_name; - try { - const name$p = Stdlib__Hashtbl.find(labels, cname.txt); - return prerr_warning(param.pld_loc, { - TAG: /* Duplicate_definitions */14, - _0: "label", - _1: cname.txt, - _2: name$p, - _3: sdecl.ptype_name.txt - }); - } - catch (raw_exn){ - const 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); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }), cl._0); - } - }), sdecl_list); + const cl = sdecl.ptype_kind; + if (/* tag */typeof cl === "number" || typeof cl === "string") { + return; + } else if (cl.TAG === /* Ptype_variant */0) { + return Stdlib__List.iter((function (pcd) { + try { + const name$p = Stdlib__Hashtbl.find(constrs, pcd.pcd_name.txt); + return prerr_warning(pcd.pcd_loc, { + TAG: /* Duplicate_definitions */14, + _0: "constructor", + _1: pcd.pcd_name.txt, + _2: name$p, + _3: sdecl.ptype_name.txt + }); + } + catch (raw_exn){ + const 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); + } + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), cl._0); + } else { + return Stdlib__List.iter((function (param) { + const cname = param.pld_name; + try { + const name$p = Stdlib__Hashtbl.find(labels, cname.txt); + return prerr_warning(param.pld_loc, { + TAG: /* Duplicate_definitions */14, + _0: "label", + _1: cname.txt, + _2: name$p, + _3: sdecl.ptype_name.txt + }); + } + catch (raw_exn){ + const 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); + } + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), cl._0); + } + }), sdecl_list); } function name_recursion(sdecl, id, decl) { @@ -74475,26 +74475,26 @@ function name_recursion(sdecl, id, decl) { function transl_type_decl(env, rec_flag, sdecl_list) { const fixed_types = Stdlib__List.filter(is_fixed_type, sdecl_list); const sdecl_list$1 = Stdlib.$at(Stdlib__List.map((function (sdecl) { - const ptype_name_txt = sdecl.ptype_name.txt + "#row"; - const ptype_name_loc = sdecl.ptype_name.loc; - const ptype_name = { - txt: ptype_name_txt, - loc: ptype_name_loc - }; - return { - ptype_name: ptype_name, - ptype_params: sdecl.ptype_params, - ptype_cstrs: sdecl.ptype_cstrs, - ptype_kind: /* Ptype_abstract */0, - ptype_private: sdecl.ptype_private, - ptype_manifest: undefined, - ptype_attributes: sdecl.ptype_attributes, - ptype_loc: sdecl.ptype_loc - }; - }), fixed_types), sdecl_list); + const ptype_name_txt = sdecl.ptype_name.txt + "#row"; + const ptype_name_loc = sdecl.ptype_name.loc; + const ptype_name = { + txt: ptype_name_txt, + loc: ptype_name_loc + }; + return { + ptype_name: ptype_name, + ptype_params: sdecl.ptype_params, + ptype_cstrs: sdecl.ptype_cstrs, + ptype_kind: /* Ptype_abstract */0, + ptype_private: sdecl.ptype_private, + ptype_manifest: undefined, + ptype_attributes: sdecl.ptype_attributes, + ptype_loc: sdecl.ptype_loc + }; + }), fixed_types), sdecl_list); const id_list = Stdlib__List.map((function (sdecl) { - return create(sdecl.ptype_name.txt); - }), sdecl_list$1); + return create(sdecl.ptype_name.txt); + }), sdecl_list$1); init_def(currentstamp.contents); begin_def(undefined); let temp_env; @@ -74528,23 +74528,23 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }, temp_env)[0]; const name = id.name; set_type_used_callback(name, td, (function (old_callback) { - const slot$1 = current_slot.contents; - if (slot$1 !== undefined) { - slot$1.contents = { - hd: [ - name, - td - ], - tl: slot$1.contents - }; - return; - } else { - Stdlib__List.iter((function (param) { - mark_type_used(env, param[0], param[1]); - }), get_ref(slot)); - return Curry._1(old_callback, undefined); - } - })); + const slot$1 = current_slot.contents; + if (slot$1 !== undefined) { + slot$1.contents = { + hd: [ + name, + td + ], + tl: slot$1.contents + }; + return; + } else { + Stdlib__List.iter((function (param) { + mark_type_used(env, param[0], param[1]); + }), get_ref(slot)); + return Curry._1(old_callback, undefined); + } + })); return [ id, slot @@ -74557,15 +74557,15 @@ function transl_type_decl(env, rec_flag, sdecl_list) { begin_def(undefined); const tparams = make_params(temp_env, name_sdecl.ptype_params); const params = Stdlib__List.map((function (param) { - return param[0].ctyp_type; - }), tparams); + return param[0].ctyp_type; + }), tparams); const 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); + return [ + transl_simple_type(temp_env, false, param[0]), + transl_simple_type(temp_env, false, param[1]), + param[2] + ]; + }), name_sdecl.ptype_cstrs); const scstrs = name_sdecl.ptype_kind; let match; if (/* tag */typeof scstrs === "number" || typeof scstrs === "string") { @@ -74585,22 +74585,22 @@ function transl_type_decl(env, rec_flag, sdecl_list) { contents: /* Empty */0 }; Stdlib__List.iter((function (param) { - const 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, - _1: name_sdecl.ptype_loc, - _2: { - TAG: /* Duplicate_constructor */0, - _0: name - } - }); - } - all_constrs.contents = Curry._2(add$12, name, all_constrs.contents); - }), scstrs$1); + const 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, + _1: name_sdecl.ptype_loc, + _2: { + TAG: /* Duplicate_constructor */0, + _0: name + } + }); + } + all_constrs.contents = Curry._2(add$12, name, all_constrs.contents); + }), scstrs$1); if (Stdlib__List.length(Stdlib__List.filter((function (cd) { - return Caml_obj.caml_notequal(cd.pcd_args, /* [] */0); - }), scstrs$1)) > 246) { + return Caml_obj.caml_notequal(cd.pcd_args, /* [] */0); + }), scstrs$1)) > 246) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, _1: name_sdecl.ptype_loc, @@ -74662,55 +74662,55 @@ function transl_type_decl(env, rec_flag, sdecl_list) { contents: /* Empty */0 }; Stdlib__List.iter((function (param) { - const 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, - _1: name_sdecl.ptype_loc, - _2: { - TAG: /* Duplicate_label */1, - _0: name - } - }); - } - all_labels.contents = Curry._2(add$12, name, all_labels.contents); - }), lbls); + const 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, + _1: name_sdecl.ptype_loc, + _2: { + TAG: /* Duplicate_label */1, + _0: name + } + }); + } + all_labels.contents = Curry._2(add$12, name, all_labels.contents); + }), lbls); const lbls$1 = Stdlib__List.map((function (param) { - const name = param.pld_name; - const arg = force_poly(param.pld_type); - const cty = transl_simple_type(temp_env, true, arg); - return { - ld_id: create(name.txt), - ld_name: name, - ld_mutable: param.pld_mutable, - ld_type: cty, - ld_loc: param.pld_loc, - ld_attributes: param.pld_attributes - }; - }), lbls); + const name = param.pld_name; + const arg = force_poly(param.pld_type); + const cty = transl_simple_type(temp_env, true, arg); + return { + ld_id: create(name.txt), + ld_name: name, + ld_mutable: param.pld_mutable, + ld_type: cty, + ld_loc: param.pld_loc, + ld_attributes: param.pld_attributes + }; + }), lbls); const lbls$p = Stdlib__List.map((function (ld) { - const ty = ld.ld_type.ctyp_type; - const match = ty.desc; - let ty$1; - ty$1 = /* tag */typeof match === "number" || typeof match === "string" || !(match.TAG === /* Tpoly */10 && !match._1) ? ty : match._0; - return { - ld_id: ld.ld_id, - ld_mutable: ld.ld_mutable, - ld_type: ty$1, - ld_loc: ld.ld_loc, - ld_attributes: ld.ld_attributes - }; - }), lbls$1); + const ty = ld.ld_type.ctyp_type; + const match = ty.desc; + let ty$1; + ty$1 = /* tag */typeof match === "number" || typeof match === "string" || !(match.TAG === /* Tpoly */10 && !match._1) ? ty : match._0; + return { + ld_id: ld.ld_id, + ld_mutable: ld.ld_mutable, + ld_type: ty$1, + ld_loc: ld.ld_loc, + ld_attributes: ld.ld_attributes + }; + }), lbls$1); const rep = Stdlib__List.for_all((function (l) { - let ty = l.ld_type; - const match = repr(expand_head_opt(temp_env, ty)); - const match$1 = match.desc; - if (/* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Tconstr */3) { - return false; - } else { - return same(match$1._0, path_float); - } - }), lbls$p) ? /* Record_float */1 : /* Record_regular */0; + let ty = l.ld_type; + const match = repr(expand_head_opt(temp_env, ty)); + const match$1 = match.desc; + if (/* tag */typeof match$1 === "number" || typeof match$1 === "string" || match$1.TAG !== /* Tconstr */3) { + return false; + } else { + return same(match$1._0, path_float); + } + }), lbls$p) ? /* Record_float */1 : /* Record_regular */0; match = [ { TAG: /* Ttype_record */1, @@ -74743,8 +74743,8 @@ function transl_type_decl(env, rec_flag, sdecl_list) { const decl_type_kind = match[1]; const decl_type_private = name_sdecl.ptype_private; const decl_type_variance = Stdlib__List.map((function (param) { - return Types_Variance.full; - }), params); + return Types_Variance.full; + }), params); const decl_type_loc = name_sdecl.ptype_loc; const decl_type_attributes = name_sdecl.ptype_attributes; const decl = { @@ -74759,27 +74759,27 @@ function transl_type_decl(env, rec_flag, sdecl_list) { type_attributes: decl_type_attributes }; Stdlib__List.iter((function (param) { - const ty = param[0].ctyp_type; - const ty$p = param[1].ctyp_type; - try { - return unify$2(temp_env, ty, ty$p); - } - catch (raw_tr){ - const tr = Caml_js_exceptions.internalToOCamlException(raw_tr); - if (tr.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$8, { - MEL_EXN_ID: $$Error$8, - _1: param[2], - _2: { - TAG: /* Inconsistent_constraint */6, - _0: temp_env, - _1: tr._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(tr.MEL_EXN_ID, tr); + const ty = param[0].ctyp_type; + const ty$p = param[1].ctyp_type; + try { + return unify$2(temp_env, ty, ty$p); + } + catch (raw_tr){ + const tr = Caml_js_exceptions.internalToOCamlException(raw_tr); + if (tr.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$8, { + MEL_EXN_ID: $$Error$8, + _1: param[2], + _2: { + TAG: /* Inconsistent_constraint */6, + _0: temp_env, + _1: tr._1 + } + }); } - }), cstrs); + throw new Caml_js_exceptions.MelangeError(tr.MEL_EXN_ID, tr); + } + }), cstrs); end_def(undefined); if (is_fixed_type(name_sdecl)) { let match$3; @@ -74830,79 +74830,79 @@ function transl_type_decl(env, rec_flag, sdecl_list) { }; const tdecls = Stdlib__List.map2(transl_declaration, sdecl_list$1, Stdlib__List.map(id_slots, id_list)); const decls = Stdlib__List.map((function (tdecl) { - return [ - tdecl.typ_id, - tdecl.typ_type - ]; - }), tdecls); + return [ + tdecl.typ_id, + tdecl.typ_type + ]; + }), tdecls); current_slot.contents = undefined; check_duplicates(sdecl_list$1); const newenv = Stdlib__List.fold_right((function (param, env) { - return add_type$1(true, param[0], param[1], env); - }), decls, env); + return add_type$1(true, param[0], param[1], env); + }), decls, env); if (rec_flag !== /* Nonrecursive */0) { Stdlib__List.iter2((function (id, sdecl) { - let loc = sdecl.ptype_loc; - const path = { - TAG: /* Pident */0, - _0: id - }; - const decl = find_type_full(path, temp_env)[0]; - const ty = decl.type_manifest; - if (ty === undefined) { - return; - } - const params = Stdlib__List.map((function (param) { - return newvar(undefined, undefined); - }), decl.type_params); - try { - return unify$2(newenv, newconstr(path, params), ty); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$8, { - MEL_EXN_ID: $$Error$8, - _1: loc, - _2: { - TAG: /* Type_clash */7, - _0: newenv, - _1: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + let loc = sdecl.ptype_loc; + const path = { + TAG: /* Pident */0, + _0: id + }; + const decl = find_type_full(path, temp_env)[0]; + const ty = decl.type_manifest; + if (ty === undefined) { + return; + } + const params = Stdlib__List.map((function (param) { + return newvar(undefined, undefined); + }), decl.type_params); + try { + return unify$2(newenv, newconstr(path, params), ty); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$8, { + MEL_EXN_ID: $$Error$8, + _1: loc, + _2: { + TAG: /* Type_clash */7, + _0: newenv, + _1: trace._1 + } + }); } - }), id_list, sdecl_list$1); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), id_list, sdecl_list$1); } end_def(undefined); Stdlib__List.iter((function (param) { - generalize_decl(param[1]); - }), decls); + generalize_decl(param[1]); + }), decls); const id_loc_list = Stdlib__List.map2((function (id, sdecl) { - return [ - id, - sdecl.ptype_loc - ]; - }), id_list, sdecl_list$1); + return [ + id, + sdecl.ptype_loc + ]; + }), id_list, sdecl_list$1); Stdlib__List.iter((function (param) { - const id = param[0]; - let loc = Stdlib__List.assoc(id, id_loc_list); - let path = { - TAG: /* Pident */0, - _0: id - }; - let decl = param[1]; - if (decl.type_manifest === undefined) { - return; - } - const 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); + const id = param[0]; + let loc = Stdlib__List.assoc(id, id_loc_list); + let path = { + TAG: /* Pident */0, + _0: id + }; + let decl = param[1]; + if (decl.type_manifest === undefined) { + return; + } + const 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); const to_check = function (id) { switch (id.TAG) { case /* Pident */0 : @@ -74914,59 +74914,47 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } }; Stdlib__List.iter((function (param) { - const 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); + const 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) { - const decl = param.typ_type; - const id = param.typ_id; - return check_recursion(newenv, Stdlib__List.assoc(id, id_loc_list), { - TAG: /* Pident */0, - _0: id - }, decl, to_check); - }), tdecls); + const decl = param.typ_type; + const 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) { - const decl = tdecl.typ_type; - const ty = closed_type_decl(decl); - if (ty === undefined) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$8, { - MEL_EXN_ID: $$Error$8, - _1: sdecl.ptype_loc, - _2: { - TAG: /* Unbound_type_var */9, - _0: ty, - _1: decl - } - }); - }), sdecl_list$1, tdecls); - Stdlib__List.iter2((function (param, param$1) { - const decl = param$1[1]; - const visited = { - contents: /* Empty */0 - }; - const l = decl.type_kind; - if (/* tag */typeof l === "number" || typeof l === "string") { - l === /* Type_abstract */0; - } else if (l.TAG === /* Type_record */0) { - const find_pl = function (pl) { - if (/* tag */typeof pl === "number" || typeof pl === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 46623, - 59 - ] - }); - } - if (pl.TAG === /* Ptype_record */1) { - return pl._0; + const decl = tdecl.typ_type; + const ty = closed_type_decl(decl); + if (ty === undefined) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$8, { + MEL_EXN_ID: $$Error$8, + _1: sdecl.ptype_loc, + _2: { + TAG: /* Unbound_type_var */9, + _0: ty, + _1: decl } + }); + }), sdecl_list$1, tdecls); + Stdlib__List.iter2((function (param, param$1) { + const decl = param$1[1]; + const visited = { + contents: /* Empty */0 + }; + const l = decl.type_kind; + if (/* tag */typeof l === "number" || typeof l === "string") { + l === /* Type_abstract */0; + } else if (l.TAG === /* Type_record */0) { + const find_pl = function (pl) { + if (/* tag */typeof pl === "number" || typeof pl === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -74975,47 +74963,47 @@ function transl_type_decl(env, rec_flag, sdecl_list) { 59 ] }); - }; - const pl = find_pl(param.ptype_kind); - const get_loc = function (name, _param) { - while(true) { - const param = _param; - if (param) { - const pld = param.hd; - if (name === pld.pld_name.txt) { - return pld.pld_type.ptyp_loc; - } - _param = param.tl; - continue; + } + if (pl.TAG === /* Ptype_record */1) { + return pl._0; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 46623, + 59 + ] + }); + }; + const pl = find_pl(param.ptype_kind); + const get_loc = function (name, _param) { + while(true) { + const param = _param; + if (param) { + const pld = param.hd; + if (name === pld.pld_name.txt) { + return pld.pld_type.ptyp_loc; } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 46627, - 16 - ] - }); - }; - }; - Stdlib__List.iter((function (param) { - check_constraints_rec(newenv, get_loc(param.ld_id.name, pl), visited, param.ld_type); - }), l._0); - } else { - const find_pl$1 = function (pl) { - if (/* tag */typeof pl === "number" || typeof pl === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 46596, - 58 - ] - }); - } - if (pl.TAG === /* Ptype_variant */0) { - return pl._0; + _param = param.tl; + continue; } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 46627, + 16 + ] + }); + }; + }; + Stdlib__List.iter((function (param) { + check_constraints_rec(newenv, get_loc(param.ld_id.name, pl), visited, param.ld_type); + }), l._0); + } else { + const find_pl$1 = function (pl) { + if (/* tag */typeof pl === "number" || typeof pl === "string") { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -75024,97 +75012,109 @@ function transl_type_decl(env, rec_flag, sdecl_list) { 58 ] }); - }; - const pl$1 = find_pl$1(param.ptype_kind); - const foldf = function (acc, x) { - return Curry._3(add$13, x.pcd_name.txt, x, acc); - }; - const pl_index = Stdlib__List.fold_left(foldf, /* Empty */0, pl$1); - Stdlib__List.iter((function (param) { - const ret_type = param.cd_res; - let match; - try { - match = Curry._2(find$6, param.cd_id.name, pl_index); - } - catch (raw_exn){ - const 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", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 46609, - 30 - ] - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - const 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); - if (sret_type !== undefined && ret_type !== undefined) { - return check_constraints_rec(newenv, sret_type.ptyp_loc, visited, ret_type); - } - - }), l._0); - } - const ty = decl.type_manifest; - if (ty === undefined) { - return; - } - const sty = param.ptype_manifest; - let sty$1; - if (sty !== undefined) { - sty$1 = sty; - } else { + } + if (pl.TAG === /* Ptype_variant */0) { + return pl._0; + } throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ "jscomp/test/ocaml_typedtree_test.ml", - 46642, - 63 + 46596, + 58 ] }); - } - return check_constraints_rec(newenv, sty$1.ptyp_loc, visited, ty); - }), sdecl_list$1, decls); + }; + const pl$1 = find_pl$1(param.ptype_kind); + const foldf = function (acc, x) { + return Curry._3(add$13, x.pcd_name.txt, x, acc); + }; + const pl_index = Stdlib__List.fold_left(foldf, /* Empty */0, pl$1); + Stdlib__List.iter((function (param) { + const ret_type = param.cd_res; + let match; + try { + match = Curry._2(find$6, param.cd_id.name, pl_index); + } + catch (raw_exn){ + const 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", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 46609, + 30 + ] + }); + } + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + const 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); + if (sret_type !== undefined && ret_type !== undefined) { + return check_constraints_rec(newenv, sret_type.ptyp_loc, visited, ret_type); + } + + }), l._0); + } + const ty = decl.type_manifest; + if (ty === undefined) { + return; + } + const sty = param.ptype_manifest; + let sty$1; + if (sty !== undefined) { + sty$1 = sty; + } else { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 46642, + 63 + ] + }); + } + return check_constraints_rec(newenv, sty$1.ptyp_loc, visited, ty); + }), sdecl_list$1, decls); const decls$1 = Stdlib__List.map2((function (sdecl, param) { - const id = param[0]; - return [ - id, - name_recursion(sdecl, id, param[1]) - ]; - }), sdecl_list$1, decls); + const id = param[0]; + return [ + id, + name_recursion(sdecl, id, param[1]) + ]; + }), sdecl_list$1, decls); const required = Stdlib__List.map((function (sdecl) { - return [ - add_injectivity(Stdlib__List.map((function (prim) { - return prim[1]; - }), sdecl.ptype_params)), - sdecl.ptype_loc - ]; - }), sdecl_list$1); + return [ + add_injectivity(Stdlib__List.map((function (prim) { + return prim[1]; + }), sdecl.ptype_params)), + sdecl.ptype_loc + ]; + }), sdecl_list$1); const match = compute_variance_fixpoint(env, decls$1, required, Stdlib__List.map(init_variance, decls$1)); const final_env = match[1]; const 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); + return check_coherence(final_env, param.ptype_loc, param$1[0], param$1[1]); + }), sdecl_list$1, final_decls); const final_decls$1 = Stdlib__List.map2((function (tdecl, param) { - return { - typ_id: tdecl.typ_id, - typ_name: tdecl.typ_name, - typ_params: tdecl.typ_params, - typ_type: param[1], - typ_cstrs: tdecl.typ_cstrs, - typ_kind: tdecl.typ_kind, - typ_private: tdecl.typ_private, - typ_manifest: tdecl.typ_manifest, - typ_loc: tdecl.typ_loc, - typ_attributes: tdecl.typ_attributes - }; - }), tdecls, final_decls); + return { + typ_id: tdecl.typ_id, + typ_name: tdecl.typ_name, + typ_params: tdecl.typ_params, + typ_type: param[1], + typ_cstrs: tdecl.typ_cstrs, + typ_kind: tdecl.typ_kind, + typ_private: tdecl.typ_private, + typ_manifest: tdecl.typ_manifest, + typ_loc: tdecl.typ_loc, + typ_attributes: tdecl.typ_attributes + }; + }), tdecls, final_decls); return [ final_decls$1, final_env @@ -75183,23 +75183,23 @@ function transl_extension_constructor(env, check_open, type_path, type_params, t _0: args })); Stdlib__List.iter((function (ty) { - const match = ty.desc; - if (/* tag */typeof match === "number" || typeof match === "string") { - return; - } - if (match.TAG !== /* Tvar */0) { - return; - } - const match$1 = match._0; - if (match$1 !== undefined && match$1 === "_" && Stdlib__List.memq(ty, vars)) { - ty.desc = { - TAG: /* Tvar */0, - _0: undefined - }; - return; - } - - }), typext_params); + const match = ty.desc; + if (/* tag */typeof match === "number" || typeof match === "string") { + return; + } + if (match.TAG !== /* Tvar */0) { + return; + } + const match$1 = match._0; + if (match$1 !== undefined && match$1 === "_" && Stdlib__List.memq(ty, vars)) { + ty.desc = { + TAG: /* Tvar */0, + _0: undefined + }; + return; + } + + }), typext_params); } const match$4 = cdescr.cstr_res.desc; let match$5; @@ -75341,12 +75341,12 @@ function transl_type_extension(check_open, env, loc, styext) { if (match$1 === /* Type_abstract */0 && check_open) { try { const match$2 = Stdlib__List.find((function (param) { - if (param.pext_kind.TAG === /* Pext_decl */0) { - return true; - } else { - return false; - } - }), styext.ptyext_constructors); + if (param.pext_kind.TAG === /* Pext_decl */0) { + return true; + } else { + return false; + } + }), styext.ptyext_constructors); throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, _1: match$2.pext_loc, @@ -75386,30 +75386,30 @@ function transl_type_extension(check_open, env, loc, styext) { }); } const type_variance = Stdlib__List.map((function (v) { - const match = Curry._1(Types_Variance.get_upper, v); - return [ - !match[1], - !match[0], - false - ]; - }), type_decl.type_variance); + const match = Curry._1(Types_Variance.get_upper, v); + return [ + !match[1], + !match[0], + false + ]; + }), type_decl.type_variance); const err = type_decl.type_arity !== Stdlib__List.length(styext.ptyext_params) ? ({ hd: /* Arity */0, tl: /* [] */0 }) : ( Stdlib__List.for_all2((function (param, param$1) { - if (!param$1[0] || param[0]) { - if (param$1[1]) { - return param[1]; - } else { - return true; - } + if (!param$1[0] || param[0]) { + if (param$1[1]) { + return param[1]; } else { - return false; + return true; } - }), type_variance, add_injectivity(Stdlib__List.map((function (prim) { - return prim[1]; - }), styext.ptyext_params))) ? /* [] */0 : ({ + } else { + return false; + } + }), type_variance, add_injectivity(Stdlib__List.map((function (prim) { + return prim[1]; + }), styext.ptyext_params))) ? /* [] */0 : ({ hd: /* Variance */5, tl: /* [] */0 }) @@ -75427,46 +75427,46 @@ function transl_type_extension(check_open, env, loc, styext) { } const ttype_params = make_params(env, styext.ptyext_params); const type_params = Stdlib__List.map((function (param) { - return param[0].ctyp_type; - }), ttype_params); + 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); + return unify_var(env, param, param$1); + }), instance_list(env, type_decl.type_params), type_params); const partial_arg = styext.ptyext_private; const partial_arg$1 = type_decl.type_params; const 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); + return transl_extension_constructor(env, check_open, type_path, partial_arg$1, type_params, partial_arg, param); + }), styext.ptyext_constructors); end_def(undefined); Stdlib__List.iter(generalize, type_params); Stdlib__List.iter((function (ext) { - Stdlib__List.iter(generalize, ext.ext_type.ext_args); - may(generalize, ext.ext_type.ext_ret_type); - }), constructors); + Stdlib__List.iter(generalize, ext.ext_type.ext_args); + may(generalize, ext.ext_type.ext_ret_type); + }), constructors); Stdlib__List.iter((function (ext) { - const ty = closed_extension_constructor(ext.ext_type); - if (ty === undefined) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$8, { - MEL_EXN_ID: $$Error$8, - _1: ext.ext_loc, - _2: { - TAG: /* Unbound_type_var_ext */19, - _0: ty, - _1: ext.ext_type - } - }); - }), constructors); + const ty = closed_extension_constructor(ext.ext_type); + if (ty === undefined) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$8, { + MEL_EXN_ID: $$Error$8, + _1: ext.ext_loc, + _2: { + TAG: /* Unbound_type_var_ext */19, + _0: ty, + _1: ext.ext_type + } + }); + }), constructors); Stdlib__List.iter((function (ext) { - compute_variance_extension(env, true, type_decl, ext.ext_type, [ - type_variance, - loc - ]); - }), constructors); + compute_variance_extension(env, true, type_decl, ext.ext_type, [ + type_variance, + loc + ]); + }), constructors); const newenv = Stdlib__List.fold_left((function (env, ext) { - return add_extension(true, ext.ext_id, ext.ext_type, env); - }), env, constructors); + return add_extension(true, ext.ext_id, ext.ext_type, env); + }), env, constructors); const tyext_tyext_txt = styext.ptyext_path; const tyext_tyext_private = styext.ptyext_private; const tyext_tyext_attributes = styext.ptyext_attributes; @@ -75515,44 +75515,44 @@ function customize_arity(arity, pval_attributes) { contents: arity }; Stdlib__List.iter((function (x) { - if (x[0].txt !== "internal.arity") { - return; - } - const match = x[1]; - switch (match.TAG) { - case /* PStr */0 : - const match$1 = match._0; - if (!match$1) { - return; - } - const match$2 = match$1.hd.pstr_desc; - if (match$2.TAG !== /* Pstr_eval */0) { - return; - } - const match$3 = match$2._0.pexp_desc; - if (match$3.TAG !== /* Pexp_constant */1) { - return; - } - const i = match$3._0; - if (i.TAG !== /* Const_int */0) { - return; - } - if (match$1.tl) { - return; - } - const i$1 = i._0; - if (i$1 < cur_arity.contents) { - cur_arity.contents = i$1; - return; - } else { - return; - } - case /* PTyp */1 : - case /* PPat */2 : + if (x[0].txt !== "internal.arity") { + return; + } + const match = x[1]; + switch (match.TAG) { + case /* PStr */0 : + const match$1 = match._0; + if (!match$1) { return; - - } - }), pval_attributes); + } + const match$2 = match$1.hd.pstr_desc; + if (match$2.TAG !== /* Pstr_eval */0) { + return; + } + const match$3 = match$2._0.pexp_desc; + if (match$3.TAG !== /* Pexp_constant */1) { + return; + } + const i = match$3._0; + if (i.TAG !== /* Const_int */0) { + return; + } + if (match$1.tl) { + return; + } + const i$1 = i._0; + if (i$1 < cur_arity.contents) { + cur_arity.contents = i$1; + return; + } else { + return; + } + case /* PTyp */1 : + case /* PPat */2 : + return; + + } + }), pval_attributes); return cur_arity.contents; } @@ -75597,11 +75597,11 @@ function transl_value_decl(env, loc, valdecl) { }; } const match = enter_value((function (s) { - return { - TAG: /* Unused_value_declaration */16, - _0: s - }; - }))(valdecl.pval_name.txt, v, env); + return { + TAG: /* Unused_value_declaration */16, + _0: s + }; + }))(valdecl.pval_name.txt, v, env); const desc_val_id = match[0]; const desc_val_name = valdecl.pval_name; const desc_val_prim = valdecl.pval_prim; @@ -75628,45 +75628,45 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { begin_def(undefined); const tparams = make_params(env, sdecl.ptype_params); const params = Stdlib__List.map((function (param) { - return param[0].ctyp_type; - }), tparams); + return param[0].ctyp_type; + }), tparams); const orig_decl$1 = instance_declaration(orig_decl); const 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); + return unify_var(env, param, param$1); + }), params, orig_decl$1.type_params); } const constraints = Stdlib__List.map((function (param) { - const loc = param[2]; - try { - const cty = transl_simple_type(env, false, param[0]); - const cty$p = transl_simple_type(env, false, param[1]); - const ty = cty.ctyp_type; - const ty$p = cty$p.ctyp_type; - unify$2(env, ty, ty$p); - return [ - cty, - cty$p, - loc - ]; - } - catch (raw_tr){ - const tr = Caml_js_exceptions.internalToOCamlException(raw_tr); - if (tr.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$8, { - MEL_EXN_ID: $$Error$8, - _1: loc, - _2: { - TAG: /* Inconsistent_constraint */6, - _0: env, - _1: tr._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(tr.MEL_EXN_ID, tr); + const loc = param[2]; + try { + const cty = transl_simple_type(env, false, param[0]); + const cty$p = transl_simple_type(env, false, param[1]); + const ty = cty.ctyp_type; + const ty$p = cty$p.ctyp_type; + unify$2(env, ty, ty$p); + return [ + cty, + cty$p, + loc + ]; + } + catch (raw_tr){ + const tr = Caml_js_exceptions.internalToOCamlException(raw_tr); + if (tr.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$8, { + MEL_EXN_ID: $$Error$8, + _1: loc, + _2: { + TAG: /* Inconsistent_constraint */6, + _0: env, + _1: tr._1 + } + }); } - }), sdecl.ptype_cstrs); + throw new Caml_js_exceptions.MelangeError(tr.MEL_EXN_ID, tr); + } + }), sdecl.ptype_cstrs); const no_row = !is_fixed_type(sdecl); const sty = sdecl.ptype_manifest; let match; @@ -75730,8 +75730,8 @@ function transl_with_constraint(env, id, row_path, orig_decl, sdecl) { const decl_type_manifest = decl$1.type_manifest; const decl_type_variance = compute_variance_decl(env, false, decl$1, [ add_injectivity(Stdlib__List.map((function (prim) { - return prim[1]; - }), sdecl.ptype_params)), + return prim[1]; + }), sdecl.ptype_params)), sdecl.ptype_loc ]); const decl_type_newtype_level = decl$1.type_newtype_level; @@ -75796,18 +75796,18 @@ function abstract_type_decl(arity) { function approx_type_decl(env, sdecl_list) { return Stdlib__List.map((function (sdecl) { - return [ - create(sdecl.ptype_name.txt), - abstract_type_decl(Stdlib__List.length(sdecl.ptype_params)) - ]; - }), sdecl_list); + return [ + create(sdecl.ptype_name.txt), + abstract_type_decl(Stdlib__List.length(sdecl.ptype_params)) + ]; + }), sdecl_list); } function explain_unbound(ppf, tv, tl, typ, kwd, lab) { try { const ti = Stdlib__List.find((function (ti) { - return deep_occur(tv, Curry._1(typ, ti)); - }), tl); + return deep_occur(tv, Curry._1(typ, ti)); + }), tl); const ty0 = newty2(100000000, { TAG: /* Tobject */4, _0: tv, @@ -76257,8 +76257,8 @@ function report_error$5(ppf, s) { }, _1: "@[@[%s@ %s@;<1 2>%a@]%a@]" }), "This variant or record definition", "does not match that of type", type_expr$1, ty$1, (function (param) { - return report_type_mismatch("the original", "this", "definition", param); - }), s._1); + return report_type_mismatch("the original", "this", "definition", param); + }), s._1); case /* Constraint_failed */5 : const ty$p = s._1; const ty$2 = s._0; @@ -76373,48 +76373,48 @@ function report_error$5(ppf, s) { _1: "The type constraints are not consistent.@." }); return report_unification_error(ppf, s._0, undefined, s._1, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Type", - _1: /* End_of_format */0 - }, - _1: "Type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "is not compatible with type", - _1: /* End_of_format */0 - }, - _1: "is not compatible with type" - }); - })); + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Type", + _1: /* End_of_format */0 + }, + _1: "Type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "is not compatible with type", + _1: /* End_of_format */0 + }, + _1: "is not compatible with type" + }); + })); case /* Type_clash */7 : return report_unification_error(ppf, s._0, undefined, s._1, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This type constructor expands to type", - _1: /* End_of_format */0 - }, - _1: "This type constructor expands to type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is used here with type", - _1: /* End_of_format */0 - }, - _1: "but is used here with type" - }); - })); + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This type constructor expands to type", + _1: /* End_of_format */0 + }, + _1: "This type constructor expands to type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is used here with type", + _1: /* End_of_format */0 + }, + _1: "but is used here with type" + }); + })); case /* Parameters_differ */8 : const ty$p$1 = s._2; const ty$3 = s._1; @@ -76515,10 +76515,10 @@ function report_error$5(ppf, s) { hd: ty$5, tl: /* [] */0 }, (function (t) { - return t; - }), "type", (function (param) { - return ""; - })); + return t; + }), "type", (function (param) { + return ""; + })); }; const row = repr(match$1).desc; if (/* tag */typeof row === "number" || typeof row === "string") { @@ -76531,10 +76531,10 @@ function report_error$5(ppf, s) { return trivial(match$1); } else { return explain_unbound(ppf, ty$4, match$2[0], (function (param) { - return param[2]; - }), "method", (function (param) { - return param[0] + ": "; - })); + return param[2]; + }), "method", (function (param) { + return param[0] + ": "; + })); } case /* Tvariant */8 : const row$1 = row_repr_aux(/* [] */0, row._0); @@ -76542,36 +76542,36 @@ function report_error$5(ppf, s) { return trivial(match$1); } else { return explain_unbound(ppf, ty$4, row$1.row_fields, (function (param) { - const match = row_field_repr_aux(/* [] */0, param[1]); - if (/* tag */typeof match === "number" || typeof match === "string") { - return newty2(100000000, { - TAG: /* Ttuple */2, - _0: /* [] */0 - }); - } - if (match.TAG === /* Rpresent */0) { - const t = match._0; - if (t !== undefined) { - return t; - } else { - return newty2(100000000, { - TAG: /* Ttuple */2, - _0: /* [] */0 - }); - } - } - const match$1 = match._1; - if (match$1 && !match$1.tl) { - return match$1.hd; + const match = row_field_repr_aux(/* [] */0, param[1]); + if (/* tag */typeof match === "number" || typeof match === "string") { + return newty2(100000000, { + TAG: /* Ttuple */2, + _0: /* [] */0 + }); + } + if (match.TAG === /* Rpresent */0) { + const t = match._0; + if (t !== undefined) { + return t; } else { return newty2(100000000, { TAG: /* Ttuple */2, - _0: match._1 + _0: /* [] */0 }); } - }), "case", (function (param) { - return "`" + (param[0] + " of "); - })); + } + const match$1 = match._1; + if (match$1 && !match$1.tl) { + return match$1.hd; + } else { + return newty2(100000000, { + TAG: /* Ttuple */2, + _0: match._1 + }); + } + }), "case", (function (param) { + return "`" + (param[0] + " of "); + })); } default: return trivial(match$1); @@ -76581,19 +76581,19 @@ function report_error$5(ppf, s) { } } else if (match.TAG === /* Type_record */0) { return explain_unbound(ppf, ty$4, match._0, (function (l) { - return l.ld_type; - }), "field", (function (l) { - return l.ld_id.name + ": "; - })); + return l.ld_type; + }), "field", (function (l) { + return l.ld_id.name + ": "; + })); } else { return explain_unbound(ppf, ty$4, match._0, (function (c) { - return newty2(100000000, { - TAG: /* Ttuple */2, - _0: c.cd_args - }); - }), "case", (function (c) { - return c.cd_id.name + " of "; - })); + return newty2(100000000, { + TAG: /* Ttuple */2, + _0: c.cd_args + }); + }), "case", (function (c) { + return c.cd_id.name + " of "; + })); } case /* Not_open_type */10 : return Curry._3(Stdlib__Format.fprintf(ppf)({ @@ -76759,47 +76759,47 @@ function report_error$5(ppf, s) { }, _1: "@[@[%s@ %s@;<1 2>%s@]%a@]" }), "This extension", "does not match the definition of type", name(undefined, s._0), (function (param) { - return report_type_mismatch("the type", "this extension", "definition", param); - }), s._1); + return report_type_mismatch("the type", "this extension", "definition", param); + }), s._1); case /* Rebind_wrong_type */13 : const lid = s._0; return report_unification_error(ppf, s._1, undefined, s._2, (function (ppf) { - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The constructor ", - _1: { - TAG: /* Alpha */15, + Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The constructor ", + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "has type", - _1: /* End_of_format */0 - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "has type", + _1: /* End_of_format */0 } } - }, - _1: "The constructor %a@ has type" - }), longident, lid); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but was expected to be of type", - _1: /* End_of_format */0 - }, - _1: "but was expected to be of type" - }); - })); + } + }, + _1: "The constructor %a@ has type" + }), longident, lid); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but was expected to be of type", + _1: /* End_of_format */0 + }, + _1: "but was expected to be of type" + }); + })); case /* Rebind_mismatch */14 : return Curry._8(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, @@ -77288,10 +77288,10 @@ function report_error$5(ppf, s) { _1: "A type variable is unbound in this extension constructor" }); return explain_unbound(ppf, s._0, s._1.ext_args, (function (c) { - return c; - }), "type", (function (param) { - return ""; - })); + return c; + }), "type", (function (param) { + return ""; + })); } } @@ -77350,11 +77350,11 @@ function generalize_class_type(gen, _param) { const match = param._0; Curry._1(gen, match.csig_self); Curry._2(Meths.iter, (function (param, param$1) { - Curry._1(gen, param$1[2]); - }), match.csig_vars); + Curry._1(gen, param$1[2]); + }), match.csig_vars); return Stdlib__List.iter((function (param) { - Stdlib__List.iter(gen, param[1]); - }), match.csig_inher); + Stdlib__List.iter(gen, param[1]); + }), match.csig_inher); case /* Cty_arrow */2 : Curry._1(gen, param._1); _param = param._2; @@ -77367,16 +77367,16 @@ function generalize_class_type(gen, _param) { function virtual_methods(sign) { const match = flatten_fields(object_fields(sign.csig_self)); return Stdlib__List.fold_left((function (virt, param) { - const lab = param[0]; - if (lab === dummy_method || Curry._2(mem$2, lab, sign.csig_concr)) { - return virt; - } else { - return { - hd: lab, - tl: virt - }; - } - }), /* [] */0, match[0]); + const lab = param[0]; + if (lab === dummy_method || Curry._2(mem$2, lab, sign.csig_concr)) { + return virt; + } else { + return { + hd: lab, + tl: virt + }; + } + }), /* [] */0, match[0]); } function constructor_type(constr, _cty) { @@ -77425,22 +77425,22 @@ function extract_constraints(cty) { const match = flatten_fields(object_fields(sign.csig_self)); return [ Curry._3(Meths.fold, (function (lab, param, vars) { + return { + hd: lab, + tl: vars + }; + }), sign.csig_vars, /* [] */0), + Stdlib__List.fold_left((function (meths, param) { + const lab = param[0]; + if (lab === dummy_method) { + return meths; + } else { return { hd: lab, - tl: vars + tl: meths }; - }), sign.csig_vars, /* [] */0), - Stdlib__List.fold_left((function (meths, param) { - const lab = param[0]; - if (lab === dummy_method) { - return meths; - } else { - return { - hd: lab, - tl: meths - }; - } - }), /* [] */0, match[0]), + } + }), /* [] */0, match[0]), sign.csig_concr ]; } @@ -77478,12 +77478,12 @@ function closed_class$1(cty) { const sign$1 = sign._0; if (closed_schema(sign$1.csig_self)) { return Curry._3(Meths.fold, (function (param, param$1, cc) { - if (closed_schema(param$1[2])) { - return cc; - } else { - return false; - } - }), sign$1.csig_vars, true); + if (closed_schema(param$1[2])) { + return cc; + } else { + return false; + } + }), sign$1.csig_vars, true); } else { return false; } @@ -77507,21 +77507,21 @@ function limited_generalize$1(rv, _sign) { switch (sign.TAG) { case /* Cty_constr */0 : Stdlib__List.iter((function (param) { - return limited_generalize(rv, param); - }), sign._1); + return limited_generalize(rv, param); + }), sign._1); _sign = sign._2; continue; case /* Cty_signature */1 : const sign$1 = sign._0; limited_generalize(rv, sign$1.csig_self); Curry._2(Meths.iter, (function (param, param$1) { - limited_generalize(rv, param$1[2]); - }), sign$1.csig_vars); + limited_generalize(rv, param$1[2]); + }), sign$1.csig_vars); return Stdlib__List.iter((function (param) { - Stdlib__List.iter((function (param) { - return limited_generalize(rv, param); - }), param[1]); - }), sign$1.csig_inher); + Stdlib__List.iter((function (param) { + return limited_generalize(rv, param); + }), param[1]); + }), sign$1.csig_inher); case /* Cty_arrow */2 : limited_generalize(rv, sign._1); _sign = sign._2; @@ -77638,12 +77638,12 @@ function enter_val(cl_num, vars, inh, lab, mut, virt, ty, val_env, met_env, par_ function concr_vals(vars) { return Curry._3(Meths.fold, (function (id, param, s) { - if (param[1] === /* Virtual */0) { - return s; - } else { - return Curry._2(add$2, id, s); - } - }), vars, /* Empty */0); + if (param[1] === /* Virtual */0) { + return s; + } else { + return Curry._2(add$2, id, s); + } + }), vars, /* Empty */0); } function inheritance(self_type, env, ovf, concr_meths, warn_vals, loc, parent) { @@ -77852,16 +77852,16 @@ function declare_method(val_env, meths, self_type, lab, priv, sty, loc) { hd: { LAZY_DONE: false, VAL: (function () { - const cty = transl_simple_type_univars(val_env, sty$p); - const ty = cty.ctyp_type; - unif(ty); - returned_cty.ctyp_desc = { - TAG: /* Ttyp_poly */8, - _0: /* [] */0, - _1: cty - }; - returned_cty.ctyp_type = ty; - }) + const cty = transl_simple_type_univars(val_env, sty$p); + const ty = cty.ctyp_type; + unif(ty); + returned_cty.ctyp_desc = { + TAG: /* Ttyp_poly */8, + _0: /* [] */0, + _1: cty + }; + returned_cty.ctyp_type = ty; + }) }, tl: delayed_meth_specs.contents }; @@ -77976,155 +77976,155 @@ function class_signature$1(env, param) { } warning_enter_scope(undefined); const match = Stdlib__List.fold_left((function (param, param$1) { - const inher = param[3]; - const concr_meths = param[2]; - const val_sig = param[1]; - const fields = param[0]; - const loc = param$1.pctf_loc; - const mkctf = function (desc) { - return { - ctf_desc: desc, - ctf_loc: loc, - ctf_attributes: param$1.pctf_attributes - }; + const inher = param[3]; + const concr_meths = param[2]; + const val_sig = param[1]; + const fields = param[0]; + const loc = param$1.pctf_loc; + const mkctf = function (desc) { + return { + ctf_desc: desc, + ctf_loc: loc, + ctf_attributes: param$1.pctf_attributes }; - const sparent = param$1.pctf_desc; - switch (sparent.TAG) { - case /* Pctf_inherit */0 : - const sparent$1 = sparent._0; - const parent = class_type$3(env, sparent$1); - const match = parent.cltyp_type; - let inher$1; - switch (match.TAG) { - case /* Cty_constr */0 : - inher$1 = { - hd: [ - match._0, - match._1 - ], - tl: inher - }; - break; - case /* Cty_signature */1 : - case /* Cty_arrow */2 : - inher$1 = inher; - break; - - } - const match$1 = inheritance(self_type, env, undefined, concr_meths, /* Empty */0, sparent$1.pcty_loc, parent.cltyp_type); - const partial_arg = sparent$1.pcty_loc; - const 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 [ - { - hd: mkctf({ - TAG: /* Tctf_inherit */0, - _0: parent - }), - tl: fields - }, - val_sig$1, - match$1[1], - inher$1 - ]; - case /* Pctf_val */1 : - const match$2 = sparent._0; - const virt = match$2[2]; - const mut = match$2[1]; - const lab = match$2[0]; - const cty = transl_simple_type(env, false, match$2[3]); - const ty = cty.ctyp_type; - return [ - { - hd: mkctf({ - TAG: /* Tctf_val */1, - _0: [ - lab, - mut, - virt, - cty - ] - }), - tl: fields - }, - add_val(env, param$1.pctf_loc, lab, [ - mut, - virt, - ty - ], val_sig), - concr_meths, - inher - ]; - case /* Pctf_method */2 : - const match$3 = sparent._0; - const virt$1 = match$3[2]; - const priv = match$3[1]; - const lab$1 = match$3[0]; - const cty$1 = declare_method(env, meths, self_type, lab$1, priv, match$3[3], param$1.pctf_loc); - let concr_meths$1; - concr_meths$1 = virt$1 === /* Virtual */0 ? concr_meths : Curry._2(add$2, lab$1, concr_meths); - return [ - { - hd: mkctf({ - TAG: /* Tctf_method */2, - _0: [ - lab$1, - priv, - virt$1, - cty$1 - ] - }), - tl: fields - }, - val_sig, - concr_meths$1, - inher - ]; - case /* Pctf_constraint */3 : - const match$4 = sparent._0; - const match$5 = type_constraint(env, match$4[0], match$4[1], param$1.pctf_loc); - return [ - { - hd: mkctf({ - TAG: /* Tctf_constraint */3, - _0: [ - match$5[0], - match$5[1] - ] - }), - tl: fields - }, - val_sig, - concr_meths, - inher - ]; - case /* Pctf_attribute */4 : - const x = sparent._0; - warning_attribute({ - hd: x, - tl: /* [] */0 - }); - return [ - { - hd: mkctf({ - TAG: /* Tctf_attribute */4, - _0: x - }), - tl: fields - }, - val_sig, - concr_meths, - inher - ]; - case /* Pctf_extension */5 : - throw new Caml_js_exceptions.MelangeError(Error_forward$2, { - MEL_EXN_ID: Error_forward$2, - _1: error_of_extension(sparent._0) - }); - - } - }), [ + }; + const sparent = param$1.pctf_desc; + switch (sparent.TAG) { + case /* Pctf_inherit */0 : + const sparent$1 = sparent._0; + const parent = class_type$3(env, sparent$1); + const match = parent.cltyp_type; + let inher$1; + switch (match.TAG) { + case /* Cty_constr */0 : + inher$1 = { + hd: [ + match._0, + match._1 + ], + tl: inher + }; + break; + case /* Cty_signature */1 : + case /* Cty_arrow */2 : + inher$1 = inher; + break; + + } + const match$1 = inheritance(self_type, env, undefined, concr_meths, /* Empty */0, sparent$1.pcty_loc, parent.cltyp_type); + const partial_arg = sparent$1.pcty_loc; + const 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 [ + { + hd: mkctf({ + TAG: /* Tctf_inherit */0, + _0: parent + }), + tl: fields + }, + val_sig$1, + match$1[1], + inher$1 + ]; + case /* Pctf_val */1 : + const match$2 = sparent._0; + const virt = match$2[2]; + const mut = match$2[1]; + const lab = match$2[0]; + const cty = transl_simple_type(env, false, match$2[3]); + const ty = cty.ctyp_type; + return [ + { + hd: mkctf({ + TAG: /* Tctf_val */1, + _0: [ + lab, + mut, + virt, + cty + ] + }), + tl: fields + }, + add_val(env, param$1.pctf_loc, lab, [ + mut, + virt, + ty + ], val_sig), + concr_meths, + inher + ]; + case /* Pctf_method */2 : + const match$3 = sparent._0; + const virt$1 = match$3[2]; + const priv = match$3[1]; + const lab$1 = match$3[0]; + const cty$1 = declare_method(env, meths, self_type, lab$1, priv, match$3[3], param$1.pctf_loc); + let concr_meths$1; + concr_meths$1 = virt$1 === /* Virtual */0 ? concr_meths : Curry._2(add$2, lab$1, concr_meths); + return [ + { + hd: mkctf({ + TAG: /* Tctf_method */2, + _0: [ + lab$1, + priv, + virt$1, + cty$1 + ] + }), + tl: fields + }, + val_sig, + concr_meths$1, + inher + ]; + case /* Pctf_constraint */3 : + const match$4 = sparent._0; + const match$5 = type_constraint(env, match$4[0], match$4[1], param$1.pctf_loc); + return [ + { + hd: mkctf({ + TAG: /* Tctf_constraint */3, + _0: [ + match$5[0], + match$5[1] + ] + }), + tl: fields + }, + val_sig, + concr_meths, + inher + ]; + case /* Pctf_attribute */4 : + const x = sparent._0; + warning_attribute({ + hd: x, + tl: /* [] */0 + }); + return [ + { + hd: mkctf({ + TAG: /* Tctf_attribute */4, + _0: x + }), + tl: fields + }, + val_sig, + concr_meths, + inher + ]; + case /* Pctf_extension */5 : + throw new Caml_js_exceptions.MelangeError(Error_forward$2, { + MEL_EXN_ID: Error_forward$2, + _1: error_of_extension(sparent._0) + }); + + } + }), [ /* [] */0, Meths.empty, /* Empty */0, @@ -78192,28 +78192,28 @@ function class_type$3(env, scty) { }); } const ctys = Stdlib__List.map2((function (sty, ty) { - const cty$p = transl_simple_type(env, false, sty); - const ty$p = cty$p.ctyp_type; - try { - unify$2(env, ty$p, ty); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: sty.ptyp_loc, - _2: env, - _3: { - TAG: /* Parameter_mismatch */12, - _0: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + const cty$p = transl_simple_type(env, false, sty); + const ty$p = cty$p.ctyp_type; + try { + unify$2(env, ty$p, ty); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: sty.ptyp_loc, + _2: env, + _3: { + TAG: /* Parameter_mismatch */12, + _0: trace._1 + } + }); } - return cty$p; - }), styl, params); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + return cty$p; + }), styl, params); const typ_2 = match$1[1]; const typ = { TAG: /* Cty_constr */0, @@ -78332,500 +78332,308 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { }; if ($$final) { Stdlib__List.iter((function (param) { - const 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)); - } - catch (exn){ - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 48779, - 18 - ] - }); - } - }), get_methods(public_self)); + const 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)); + } + catch (exn){ + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 48779, + 18 + ] + }); + } + }), get_methods(public_self)); } warning_enter_scope(undefined); const match$1 = Stdlib__List.fold_left((function (param, param$1) { - const local_vals = param[8]; - const local_meths = param[7]; - const inher = param[6]; - const warn_vals = param[5]; - const concr_meths = param[4]; - const fields = param[3]; - const par_env = param[2]; - const met_env = param[1]; - const val_env = param[0]; - const loc = param$1.pcf_loc; - const mkcf = function (desc) { - return { - cf_desc: desc, - cf_loc: loc, - cf_attributes: param$1.pcf_attributes - }; + const local_vals = param[8]; + const local_meths = param[7]; + const inher = param[6]; + const warn_vals = param[5]; + const concr_meths = param[4]; + const fields = param[3]; + const par_env = param[2]; + const met_env = param[1]; + const val_env = param[0]; + const loc = param$1.pcf_loc; + const mkcf = function (desc) { + return { + cf_desc: desc, + cf_loc: loc, + cf_attributes: param$1.pcf_attributes }; - const expr = param$1.pcf_desc; - switch (expr.TAG) { - case /* Pcf_inherit */0 : - const $$super = expr._2; - const sparent = expr._1; - const ovf = expr._0; - const parent = class_expr(cl_num, val_env, par_env, sparent); - const match = parent.cl_type; - let inher$1; - switch (match.TAG) { - case /* Cty_constr */0 : - inher$1 = { + }; + const expr = param$1.pcf_desc; + switch (expr.TAG) { + case /* Pcf_inherit */0 : + const $$super = expr._2; + const sparent = expr._1; + const ovf = expr._0; + const parent = class_expr(cl_num, val_env, par_env, sparent); + const match = parent.cl_type; + let inher$1; + switch (match.TAG) { + case /* Cty_constr */0 : + inher$1 = { + hd: [ + match._0, + match._1 + ], + tl: inher + }; + break; + case /* Cty_signature */1 : + case /* Cty_arrow */2 : + inher$1 = inher; + break; + + } + const match$1 = inheritance(self_type, val_env, ovf, concr_meths, warn_vals, sparent.pcl_loc, parent.cl_type); + const cl_sig = match$1[0]; + const match$2 = Curry._3(Meths.fold, (function (lab, info, param) { + const 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], + match[3], + { hd: [ - match._0, - match._1 + lab, + match[0] ], - tl: inher + tl: param[3] + } + ]; + }), cl_sig.csig_vars, [ + val_env, + met_env, + par_env, + /* [] */0 + ]); + const inh_vars = match$2[3]; + const par_env$1 = match$2[2]; + const met_env$1 = match$2[1]; + const val_env$1 = match$2[0]; + const inh_meths = Curry._3(fold$1, (function (lab, rem) { + return { + hd: [ + lab, + create(lab) + ], + tl: rem + }; + }), cl_sig.csig_concr, /* [] */0); + let match$3; + if ($$super !== undefined) { + const match$4 = enter_met_env((function (s) { + return { + TAG: /* Unused_ancestor */20, + _0: s }; - break; - case /* Cty_signature */1 : - case /* Cty_arrow */2 : - inher$1 = inher; - break; - - } - const match$1 = inheritance(self_type, val_env, ovf, concr_meths, warn_vals, sparent.pcl_loc, parent.cl_type); - const cl_sig = match$1[0]; - const match$2 = Curry._3(Meths.fold, (function (lab, info, param) { - const 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], - match[3], - { - hd: [ - lab, - match[0] - ], - tl: param[3] - } - ]; - }), cl_sig.csig_vars, [ - val_env, - met_env, - par_env, - /* [] */0 - ]); - const inh_vars = match$2[3]; - const par_env$1 = match$2[2]; - const met_env$1 = match$2[1]; - const val_env$1 = match$2[0]; - const inh_meths = Curry._3(fold$1, (function (lab, rem) { - return { - hd: [ - lab, - create(lab) - ], - tl: rem - }; - }), cl_sig.csig_concr, /* [] */0); - let match$3; - if ($$super !== undefined) { - const match$4 = enter_met_env((function (s) { - return { - TAG: /* Unused_ancestor */20, - _0: s - }; - }), sparent.pcl_loc, $$super, { - TAG: /* Val_anc */3, - _0: inh_meths, - _1: cl_num - }, self_type, val_env$1, met_env$1, par_env$1); - match$3 = [ - match$4[1], - match$4[2], - match$4[3] - ]; - } else { - match$3 = [ - val_env$1, - met_env$1, - par_env$1 - ]; - } - return [ - match$3[0], - match$3[1], - match$3[2], - { - hd: { - LAZY_DONE: false, - VAL: (function () { - return mkcf({ - TAG: /* Tcf_inherit */0, - _0: ovf, - _1: parent, - _2: $$super, - _3: inh_vars, - _4: inh_meths - }); - }) - }, - tl: fields - }, - match$1[1], - match$1[2], - inher$1, - local_meths, - local_vals + }), sparent.pcl_loc, $$super, { + TAG: /* Val_anc */3, + _0: inh_meths, + _1: cl_num + }, self_type, val_env$1, met_env$1, par_env$1); + match$3 = [ + match$4[1], + match$4[2], + match$4[3] ]; - case /* Pcf_val */1 : - const match$5 = expr._0; - const styp = match$5[2]; - const mut = match$5[1]; - const lab = match$5[0]; - if (styp.TAG === /* Cfk_virtual */0) { - if (principal.contents) { - begin_def(undefined); - } - const cty = transl_simple_type(val_env, false, styp._0); - const ty = cty.ctyp_type; - if (principal.contents) { - end_def(undefined); - generalize_structure$1(current_level.contents, ty); - } - const match$6 = enter_val(cl_num, vars, false, lab.txt, mut, /* Virtual */0, ty, val_env, met_env, par_env, loc); - const met_env$p = match$6[2]; - const id = match$6[0]; - return [ - match$6[1], - met_env$p, - match$6[3], - { - hd: { - LAZY_DONE: false, - VAL: (function () { - return mkcf({ - TAG: /* Tcf_val */1, - _0: lab, - _1: mut, - _2: id, - _3: { - TAG: /* Tcfk_virtual */0, - _0: cty - }, - _4: met_env === met_env$p - }); - }) - }, - tl: fields - }, - concr_meths, - warn_vals, - inher, - local_meths, - local_vals - ]; - } - const 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, - _1: loc, - _2: val_env, - _3: { - TAG: /* Duplicate */24, - _0: "instance variable", - _1: lab.txt - } - }); - } - if (Curry._2(mem$2, lab.txt, warn_vals)) { - if (ovf$1 === /* Fresh */1) { - prerr_warning(lab.loc, { - TAG: /* Instance_variable_override */5, - _0: { - hd: lab.txt, - tl: /* [] */0 - } - }); - } - - } else if (ovf$1 === /* Override */0) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: loc, - _2: val_env, - _3: { - TAG: /* No_overriding */23, - _0: "instance variable", - _1: lab.txt - } - }); - } + } else { + match$3 = [ + val_env$1, + met_env$1, + par_env$1 + ]; + } + return [ + match$3[0], + match$3[1], + match$3[2], + { + hd: { + LAZY_DONE: false, + VAL: (function () { + return mkcf({ + TAG: /* Tcf_inherit */0, + _0: ovf, + _1: parent, + _2: $$super, + _3: inh_vars, + _4: inh_meths + }); + }) + }, + tl: fields + }, + match$1[1], + match$1[2], + inher$1, + local_meths, + local_vals + ]; + case /* Pcf_val */1 : + const match$5 = expr._0; + const styp = match$5[2]; + const mut = match$5[1]; + const lab = match$5[0]; + if (styp.TAG === /* Cfk_virtual */0) { if (principal.contents) { begin_def(undefined); } - let exp; - try { - exp = type_exp(val_env, styp._1); - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Unify) { - const match$7 = exn._1; - if (match$7) { - if (match$7.tl) { - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: loc, - _2: val_env, - _3: { - TAG: /* Make_nongen_seltype */17, - _0: match$7.hd[0] - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } + const cty = transl_simple_type(val_env, false, styp._0); + const ty = cty.ctyp_type; if (principal.contents) { end_def(undefined); - generalize_structure$1(current_level.contents, exp.exp_type); + generalize_structure$1(current_level.contents, ty); } - const match$8 = enter_val(cl_num, vars, false, lab.txt, mut, /* Concrete */1, exp.exp_type, val_env, met_env, par_env, loc); - const met_env$p$1 = match$8[2]; - const id$1 = match$8[0]; + const match$6 = enter_val(cl_num, vars, false, lab.txt, mut, /* Virtual */0, ty, val_env, met_env, par_env, loc); + const met_env$p = match$6[2]; + const id = match$6[0]; return [ - match$8[1], - met_env$p$1, - match$8[3], + match$6[1], + met_env$p, + match$6[3], { hd: { LAZY_DONE: false, VAL: (function () { - return mkcf({ - TAG: /* Tcf_val */1, - _0: lab, - _1: mut, - _2: id$1, - _3: { - TAG: /* Tcfk_concrete */1, - _0: ovf$1, - _1: exp - }, - _4: met_env === met_env$p$1 - }); - }) + return mkcf({ + TAG: /* Tcf_val */1, + _0: lab, + _1: mut, + _2: id, + _3: { + TAG: /* Tcfk_virtual */0, + _0: cty + }, + _4: met_env === met_env$p + }); + }) }, tl: fields }, concr_meths, - Curry._2(add$2, lab.txt, warn_vals), + warn_vals, inher, local_meths, - Curry._2(add$2, lab.txt, local_vals) + local_vals ]; - case /* Pcf_method */2 : - const match$9 = expr._0; - const sty = match$9[2]; - const priv = match$9[1]; - const lab$1 = match$9[0]; - if (sty.TAG === /* Cfk_virtual */0) { - const cty$1 = virtual_method(val_env, meths, self_type, lab$1.txt, priv, sty._0, loc); - return [ - val_env, - met_env, - par_env, - { - hd: { - LAZY_DONE: false, - VAL: (function () { - return mkcf({ - TAG: /* Tcf_method */2, - _0: lab$1, - _1: priv, - _2: { - TAG: /* Tcfk_virtual */0, - _0: cty$1 - } - }); - }) - }, - tl: fields - }, - concr_meths, - warn_vals, - inher, - local_meths, - local_vals - ]; - } - const expr$1 = sty._1; - const ovf$2 = sty._0; - const 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, { - MEL_EXN_ID: $$Error$9, - _1: loc, - _2: val_env, - _3: { - TAG: /* Duplicate */24, - _0: "method", - _1: lab$1.txt - } - }); - } - if (Curry._2(mem$2, lab$1.txt, concr_meths)) { - if (ovf$2 === /* Fresh */1) { - prerr_warning(loc, { - TAG: /* Method_override */2, - _0: { - hd: lab$1.txt, - tl: /* [] */0 - } - }); - } - - } else if (ovf$2 === /* Override */0) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: loc, - _2: val_env, - _3: { - TAG: /* No_overriding */23, - _0: "method", - _1: lab$1.txt + } + const 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, + _1: loc, + _2: val_env, + _3: { + TAG: /* Duplicate */24, + _0: "instance variable", + _1: lab.txt + } + }); + } + if (Curry._2(mem$2, lab.txt, warn_vals)) { + if (ovf$1 === /* Fresh */1) { + prerr_warning(lab.loc, { + TAG: /* Instance_variable_override */5, + _0: { + hd: lab.txt, + tl: /* [] */0 } }); } - const match$11 = filter_self_method(val_env, lab$1.txt, priv, meths, self_type); - const ty$1 = match$11[1]; - try { - const match$12 = expr$2.pexp_desc; - if (match$12.TAG === /* Pexp_poly */28) { - const sty$1 = match$12._1; - const sbody = match$12._0; - if (sty$1 !== undefined) { - const sty$2 = force_poly(sty$1); - const cty$p = transl_simple_type(val_env, false, sty$2); - const ty$p = cty$p.ctyp_type; - unify$2(val_env, ty$p, ty$1); - } - const match$13 = repr(ty$1).desc; - if (/* tag */typeof match$13 === "number" || typeof match$13 === "string") { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 48681, - 17 - ] - }); - } - switch (match$13.TAG) { - case /* Tvar */0 : - const ty$p$1 = newvar(undefined, undefined); - unify$2(val_env, newty2(current_level.contents, { - TAG: /* Tpoly */10, - _0: ty$p$1, - _1: /* [] */0 - }), ty$1); - unify$2(val_env, type_approx(val_env, sbody), ty$p$1); - break; - case /* Tpoly */10 : - const match$14 = instance_poly(undefined, false, match$13._1, match$13._0); - const ty2 = type_approx(val_env, sbody); - unify$2(val_env, ty2, match$14[1]); - break; - default: - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 48681, - 17 - ] - }); + + } else if (ovf$1 === /* Override */0) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: loc, + _2: val_env, + _3: { + TAG: /* No_overriding */23, + _0: "instance variable", + _1: lab.txt + } + }); + } + if (principal.contents) { + begin_def(undefined); + } + let exp; + try { + exp = type_exp(val_env, styp._1); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Unify) { + const match$7 = exn._1; + if (match$7) { + if (match$7.tl) { + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - } else { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 48683, - 13 - ] - }); - } - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, _1: loc, _2: val_env, _3: { - TAG: /* Field_type_mismatch */1, - _0: "method", - _1: lab$1.txt, - _2: trace._1 + TAG: /* Make_nongen_seltype */17, + _0: match$7.hd[0] } }); } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - const meth_expr = make_method(self_loc, cl_num, expr$2); - const vars_local = vars.contents; - const field = { - LAZY_DONE: false, - VAL: (function () { - const meth_type = newty2(100000000, { - TAG: /* Tarrow */1, - _0: "", - _1: self_type, - _2: ty$1, - _3: /* Cok */0 - }); - raise_nongen_level(undefined); - vars.contents = vars_local; - const texp = type_expect(undefined, met_env, meth_expr, meth_type); - end_def(undefined); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + if (principal.contents) { + end_def(undefined); + generalize_structure$1(current_level.contents, exp.exp_type); + } + const match$8 = enter_val(cl_num, vars, false, lab.txt, mut, /* Concrete */1, exp.exp_type, val_env, met_env, par_env, loc); + const met_env$p$1 = match$8[2]; + const id$1 = match$8[0]; + return [ + match$8[1], + met_env$p$1, + match$8[3], + { + hd: { + LAZY_DONE: false, + VAL: (function () { return mkcf({ - TAG: /* Tcf_method */2, - _0: lab$1, - _1: priv, - _2: { + TAG: /* Tcf_val */1, + _0: lab, + _1: mut, + _2: id$1, + _3: { TAG: /* Tcfk_concrete */1, - _0: ovf$2, - _1: texp - } + _0: ovf$1, + _1: exp + }, + _4: met_env === met_env$p$1 }); }) - }; - return [ - val_env, - met_env, - par_env, - { - hd: field, - tl: fields }, - Curry._2(add$2, lab$1.txt, concr_meths), - warn_vals, - inher, - Curry._2(add$2, lab$1.txt, local_meths), - local_vals - ]; - case /* Pcf_constraint */3 : - const match$15 = expr._0; - const match$16 = type_constraint(val_env, match$15[0], match$15[1], loc); - const cty$p$1 = match$16[1]; - const cty$2 = match$16[0]; + tl: fields + }, + concr_meths, + Curry._2(add$2, lab.txt, warn_vals), + inher, + local_meths, + Curry._2(add$2, lab.txt, local_vals) + ]; + case /* Pcf_method */2 : + const match$9 = expr._0; + const sty = match$9[2]; + const priv = match$9[1]; + const lab$1 = match$9[0]; + if (sty.TAG === /* Cfk_virtual */0) { + const cty$1 = virtual_method(val_env, meths, self_type, lab$1.txt, priv, sty._0, loc); return [ val_env, met_env, @@ -78834,12 +78642,16 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { hd: { LAZY_DONE: false, VAL: (function () { - return mkcf({ - TAG: /* Tcf_constraint */3, - _0: cty$2, - _1: cty$p$1 - }); - }) + return mkcf({ + TAG: /* Tcf_method */2, + _0: lab$1, + _1: priv, + _2: { + TAG: /* Tcfk_virtual */0, + _0: cty$1 + } + }); + }) }, tl: fields }, @@ -78849,81 +78661,269 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { local_meths, local_vals ]; - case /* Pcf_initializer */4 : - const expr$3 = make_method(self_loc, cl_num, expr._0); - const vars_local$1 = vars.contents; - const field$1 = { - LAZY_DONE: false, - VAL: (function () { - raise_nongen_level(undefined); - const desc_2 = instance_def(type_unit); - const desc = { + } + const expr$1 = sty._1; + const ovf$2 = sty._0; + const 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, { + MEL_EXN_ID: $$Error$9, + _1: loc, + _2: val_env, + _3: { + TAG: /* Duplicate */24, + _0: "method", + _1: lab$1.txt + } + }); + } + if (Curry._2(mem$2, lab$1.txt, concr_meths)) { + if (ovf$2 === /* Fresh */1) { + prerr_warning(loc, { + TAG: /* Method_override */2, + _0: { + hd: lab$1.txt, + tl: /* [] */0 + } + }); + } + + } else if (ovf$2 === /* Override */0) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: loc, + _2: val_env, + _3: { + TAG: /* No_overriding */23, + _0: "method", + _1: lab$1.txt + } + }); + } + const match$11 = filter_self_method(val_env, lab$1.txt, priv, meths, self_type); + const ty$1 = match$11[1]; + try { + const match$12 = expr$2.pexp_desc; + if (match$12.TAG === /* Pexp_poly */28) { + const sty$1 = match$12._1; + const sbody = match$12._0; + if (sty$1 !== undefined) { + const sty$2 = force_poly(sty$1); + const cty$p = transl_simple_type(val_env, false, sty$2); + const ty$p = cty$p.ctyp_type; + unify$2(val_env, ty$p, ty$1); + } + const match$13 = repr(ty$1).desc; + if (/* tag */typeof match$13 === "number" || typeof match$13 === "string") { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 48681, + 17 + ] + }); + } + switch (match$13.TAG) { + case /* Tvar */0 : + const ty$p$1 = newvar(undefined, undefined); + unify$2(val_env, newty2(current_level.contents, { + TAG: /* Tpoly */10, + _0: ty$p$1, + _1: /* [] */0 + }), ty$1); + unify$2(val_env, type_approx(val_env, sbody), ty$p$1); + break; + case /* Tpoly */10 : + const match$14 = instance_poly(undefined, false, match$13._1, match$13._0); + const ty2 = type_approx(val_env, sbody); + unify$2(val_env, ty2, match$14[1]); + break; + default: + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 48681, + 17 + ] + }); + } + } else { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 48683, + 13 + ] + }); + } + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: loc, + _2: val_env, + _3: { + TAG: /* Field_type_mismatch */1, + _0: "method", + _1: lab$1.txt, + _2: trace._1 + } + }); + } + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + const meth_expr = make_method(self_loc, cl_num, expr$2); + const vars_local = vars.contents; + const field = { + LAZY_DONE: false, + VAL: (function () { + const meth_type = newty2(100000000, { TAG: /* Tarrow */1, _0: "", _1: self_type, - _2: desc_2, + _2: ty$1, _3: /* Cok */0 - }; - const meth_type = newty2(current_level.contents, desc); - vars.contents = vars_local$1; - const texp = type_expect(undefined, met_env, expr$3, meth_type); - end_def(undefined); + }); + raise_nongen_level(undefined); + vars.contents = vars_local; + const texp = type_expect(undefined, met_env, meth_expr, meth_type); + end_def(undefined); + return mkcf({ + TAG: /* Tcf_method */2, + _0: lab$1, + _1: priv, + _2: { + TAG: /* Tcfk_concrete */1, + _0: ovf$2, + _1: texp + } + }); + }) + }; + return [ + val_env, + met_env, + par_env, + { + hd: field, + tl: fields + }, + Curry._2(add$2, lab$1.txt, concr_meths), + warn_vals, + inher, + Curry._2(add$2, lab$1.txt, local_meths), + local_vals + ]; + case /* Pcf_constraint */3 : + const match$15 = expr._0; + const match$16 = type_constraint(val_env, match$15[0], match$15[1], loc); + const cty$p$1 = match$16[1]; + const cty$2 = match$16[0]; + return [ + val_env, + met_env, + par_env, + { + hd: { + LAZY_DONE: false, + VAL: (function () { return mkcf({ - TAG: /* Tcf_initializer */4, - _0: texp + TAG: /* Tcf_constraint */3, + _0: cty$2, + _1: cty$p$1 }); }) - }; - return [ - val_env, - met_env, - par_env, - { - hd: field$1, - tl: fields }, - concr_meths, - warn_vals, - inher, - local_meths, - local_vals - ]; - case /* Pcf_attribute */5 : - const x = expr._0; - warning_attribute({ - hd: x, - tl: /* [] */0 - }); - return [ - val_env, - met_env, - par_env, - { - hd: { - LAZY_DONE: false, - VAL: (function () { - return mkcf({ - TAG: /* Tcf_attribute */5, - _0: x - }); - }) - }, - tl: fields + tl: fields + }, + concr_meths, + warn_vals, + inher, + local_meths, + local_vals + ]; + case /* Pcf_initializer */4 : + const expr$3 = make_method(self_loc, cl_num, expr._0); + const vars_local$1 = vars.contents; + const field$1 = { + LAZY_DONE: false, + VAL: (function () { + raise_nongen_level(undefined); + const desc_2 = instance_def(type_unit); + const desc = { + TAG: /* Tarrow */1, + _0: "", + _1: self_type, + _2: desc_2, + _3: /* Cok */0 + }; + const meth_type = newty2(current_level.contents, desc); + vars.contents = vars_local$1; + const texp = type_expect(undefined, met_env, expr$3, meth_type); + end_def(undefined); + return mkcf({ + TAG: /* Tcf_initializer */4, + _0: texp + }); + }) + }; + return [ + val_env, + met_env, + par_env, + { + hd: field$1, + tl: fields + }, + concr_meths, + warn_vals, + inher, + local_meths, + local_vals + ]; + case /* Pcf_attribute */5 : + const x = expr._0; + warning_attribute({ + hd: x, + tl: /* [] */0 + }); + return [ + val_env, + met_env, + par_env, + { + hd: { + LAZY_DONE: false, + VAL: (function () { + return mkcf({ + TAG: /* Tcf_attribute */5, + _0: x + }); + }) }, - concr_meths, - warn_vals, - inher, - local_meths, - local_vals - ]; - case /* Pcf_extension */6 : - throw new Caml_js_exceptions.MelangeError(Error_forward$2, { - MEL_EXN_ID: Error_forward$2, - _1: error_of_extension(expr._0) - }); - - } - }), [ + tl: fields + }, + concr_meths, + warn_vals, + inher, + local_meths, + local_vals + ]; + case /* Pcf_extension */6 : + throw new Caml_js_exceptions.MelangeError(Error_forward$2, { + MEL_EXN_ID: Error_forward$2, + _1: error_of_extension(expr._0) + }); + + } + }), [ val_env$1, match[4], match[5], @@ -78939,12 +78939,12 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { warning_leave_scope(undefined); unify$2(val_env$1, self_type, newvar(undefined, undefined)); const sign_csig_vars = Curry._2(Meths.map, (function (param) { - return [ - param[1], - param[2], - param[3] - ]; - }), vars.contents); + return [ + param[1], + param[2], + param[3] + ]; + }), vars.contents); const sign = { csig_self: public_self, csig_vars: sign_csig_vars, @@ -78953,8 +78953,8 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { }; const methods = get_methods(self_type); const priv_meths = Stdlib__List.filter((function (param) { - return Caml_obj.caml_notequal(field_kind_repr(param[1]), /* Fpresent */0); - }), methods); + return Caml_obj.caml_notequal(field_kind_repr(param[1]), /* Fpresent */0); + }), methods); if ($$final) { close_object(self_type); const mets = virtual_methods({ @@ -78964,15 +78964,15 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { csig_inher: inher }); const vals = Curry._3(Meths.fold, (function (name, param, l) { - if (param[1] === /* Virtual */0) { - return { - hd: name, - tl: l - }; - } else { - return l; - } - }), sign_csig_vars, /* [] */0); + if (param[1] === /* Virtual */0) { + return { + hd: name, + tl: l + }; + } else { + return l; + } + }), sign_csig_vars, /* [] */0); if (Caml_obj.caml_notequal(mets, /* [] */0) || Caml_obj.caml_notequal(vals, /* [] */0)) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, @@ -78988,27 +78988,27 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { }); } const self_methods = Stdlib__List.fold_right((function (param, rem) { - const kind = param[1]; - const lab = param[0]; - if (lab === dummy_method) { - const r = field_kind_repr(kind); - if (/* tag */typeof r === "number" || typeof r === "string") { - return rem; - } - set_kind(r._0, /* Fabsent */1); + const kind = param[1]; + const lab = param[0]; + if (lab === dummy_method) { + const r = field_kind_repr(kind); + if (/* tag */typeof r === "number" || typeof r === "string") { return rem; } - const desc_1 = copy_kind(kind); - const desc_2 = param[2]; - const desc = { - TAG: /* Tfield */5, - _0: lab, - _1: desc_1, - _2: desc_2, - _3: rem - }; - return newty2(current_level.contents, desc); - }), methods, newty2(current_level.contents, /* Tnil */0)); + set_kind(r._0, /* Fabsent */1); + return rem; + } + const desc_1 = copy_kind(kind); + const desc_2 = param[2]; + const desc = { + TAG: /* Tfield */5, + _0: lab, + _1: desc_1, + _2: desc_2, + _3: rem + }; + return newty2(current_level.contents, desc); + }), methods, newty2(current_level.contents, /* Tnil */0)); try { unify$2(val_env$1, private_self, newty2(current_level.contents, { TAG: /* Tobject */4, @@ -79037,31 +79037,31 @@ function class_structure(cl_num, $$final, val_env, met_env, loc, param) { } if (principal.contents) { Stdlib__List.iter((function (param) { - generalize_spine(param[2]); - }), methods); + generalize_spine(param[2]); + }), methods); } const 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); + unify$2(val_env$1, param[2], newvar(undefined, undefined)); + }), methods); } const meths$1 = Curry._2(map, (function (param) { - return param[0]; - }), meths.contents); + return param[0]; + }), meths.contents); const pub_meths$p = Stdlib__List.filter((function (param) { - return Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0); - }), get_methods(public_self)); + return Caml_obj.caml_equal(field_kind_repr(param[1]), /* Fpresent */0); + }), get_methods(public_self)); const names = function (param) { return Stdlib__List.map((function (param) { - return param[0]; - }), param); + return param[0]; + }), param); }; const l1 = names(priv_meths); const l2 = names(pub_meths$p); const added = Stdlib__List.filter((function (x) { - return Stdlib__List.mem(x, l1); - }), l2); + return Stdlib__List.mem(x, l1); + }), l2); if (Caml_obj.caml_notequal(added, /* [] */0)) { prerr_warning(loc, { TAG: /* Implicit_public_methods */6, @@ -79107,8 +79107,8 @@ function class_expr(cl_num, val_env, met_env, _scl) { }); } const tyl = Stdlib__List.map((function (sty) { - return transl_simple_type(val_env, false, sty); - }), cl_str._1); + return transl_simple_type(val_env, false, sty); + }), cl_str._1); const match$1 = instance_class(decl.cty_params, decl.cty_type); const clty = match$1[1]; const params = match$1[0]; @@ -79127,26 +79127,26 @@ function class_expr(cl_num, val_env, met_env, _scl) { }); } Stdlib__List.iter2((function (cty$p, ty) { - const ty$p = cty$p.ctyp_type; - try { - return unify$2(val_env, ty$p, ty); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: cty$p.ctyp_loc, - _2: val_env, - _3: { - TAG: /* Parameter_mismatch */12, - _0: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + const ty$p = cty$p.ctyp_type; + try { + return unify$2(val_env, ty$p, ty); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: cty$p.ctyp_loc, + _2: val_env, + _3: { + TAG: /* Parameter_mismatch */12, + _0: trace._1 + } + }); } - }), tyl, params); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + }), tyl, params); const cl = rc({ cl_desc: { TAG: /* Tcl_ident */0, @@ -79258,40 +79258,40 @@ function class_expr(cl_num, val_env, met_env, _scl) { if (principal.contents) { end_def(undefined); iter_pattern((function (param) { - generalize_structure$1(current_level.contents, param.pat_type); - }), pat); + generalize_structure$1(current_level.contents, param.pat_type); + }), pat); } const pv = Stdlib__List.map((function (param) { - const id = param[0]; - const path = { - TAG: /* Pident */0, - _0: param[2] - }; - const vd = find_value(path, val_env$p); - return [ - id, - param[1], - { - exp_desc: { - TAG: /* Texp_ident */0, - _0: path, - _1: { - txt: { - TAG: /* Lident */0, - _0: id.name - }, - loc: none + const id = param[0]; + const path = { + TAG: /* Pident */0, + _0: param[2] + }; + const vd = find_value(path, val_env$p); + return [ + id, + param[1], + { + exp_desc: { + TAG: /* Texp_ident */0, + _0: path, + _1: { + txt: { + TAG: /* Lident */0, + _0: id.name }, - _2: vd + loc: none }, - exp_loc: none, - exp_extra: /* [] */0, - exp_type: instance(undefined, val_env$p, vd.val_type), - exp_env: val_env$p, - exp_attributes: /* [] */0 - } - ]; - }), match$4[1]); + _2: vd + }, + exp_loc: none, + exp_extra: /* [] */0, + exp_type: instance(undefined, val_env$p, vd.val_type), + exp_env: val_env$p, + exp_attributes: /* [] */0 + } + ]; + }), match$4[1]); const not_function = function (param) { switch (param.TAG) { case /* Cty_constr */0 : @@ -79390,10 +79390,10 @@ function class_expr(cl_num, val_env, met_env, _scl) { if (!classic.contents) { const 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); + return param[0] === ""; + }), sargs) && Stdlib__List.exists((function (l) { + return l !== ""; + }), labels) && (prerr_warning(cl$2.cl_loc, /* Labels_omitted */3), true); } const type_args = function (_args, _omitted, _ty_fun, _ty_fun0, _sargs, _more_sargs) { while(true) { @@ -79559,13 +79559,13 @@ function class_expr(cl_num, val_env, met_env, _scl) { return [ Stdlib__List.rev(args), Stdlib__List.fold_left((function (ty_fun, param) { - return { - TAG: /* Cty_arrow */2, - _0: param[0], - _1: param[1], - _2: ty_fun - }; - }), ty_fun0, omitted) + return { + TAG: /* Cty_arrow */2, + _0: param[0], + _1: param[1], + _2: ty_fun + }; + }), ty_fun0, omitted) ]; } if (Caml_obj.caml_notequal(omitted, /* [] */0)) { @@ -79636,64 +79636,64 @@ function class_expr(cl_num, val_env, met_env, _scl) { const val_env$1 = match$7[1]; const defs = match$7[0]; const match$9 = Stdlib__List.fold_right((function (param, param$1) { - const id = param[0]; - const path = { - TAG: /* Pident */0, - _0: id - }; - const vd = find_value(path, val_env$1); - begin_def(undefined); - const expr_exp_desc = { - TAG: /* Texp_ident */0, - _0: path, - _1: { - txt: { - TAG: /* Lident */0, - _0: id.name - }, - loc: none - }, - _2: vd - }; - const expr_exp_type = instance(undefined, val_env$1, vd.val_type); - const expr = { - exp_desc: expr_exp_desc, - exp_loc: none, - exp_extra: /* [] */0, - exp_type: expr_exp_type, - exp_env: val_env$1, - exp_attributes: /* [] */0 - }; - end_def(undefined); - iter_generalize$1({ - contents: /* [] */0 - }, expr_exp_type); - const desc_val_type = expr_exp_type; - const desc_val_kind = { - TAG: /* Val_ivar */1, - _0: /* Immutable */0, - _1: cl_num - }; - const desc_val_loc = vd.val_loc; - const desc = { - val_type: desc_val_type, - val_kind: desc_val_kind, - val_loc: desc_val_loc, - val_attributes: /* [] */0 - }; - const id$p = create(id.name); - return [ - { - hd: [ - id$p, - param[1], - expr - ], - tl: param$1[0] + const id = param[0]; + const path = { + TAG: /* Pident */0, + _0: id + }; + const vd = find_value(path, val_env$1); + begin_def(undefined); + const expr_exp_desc = { + TAG: /* Texp_ident */0, + _0: path, + _1: { + txt: { + TAG: /* Lident */0, + _0: id.name }, - add_value(undefined, id$p, desc, param$1[1]) - ]; - }), Stdlib__List.rev(rev_let_bound_idents_with_loc(defs)), [ + loc: none + }, + _2: vd + }; + const expr_exp_type = instance(undefined, val_env$1, vd.val_type); + const expr = { + exp_desc: expr_exp_desc, + exp_loc: none, + exp_extra: /* [] */0, + exp_type: expr_exp_type, + exp_env: val_env$1, + exp_attributes: /* [] */0 + }; + end_def(undefined); + iter_generalize$1({ + contents: /* [] */0 + }, expr_exp_type); + const desc_val_type = expr_exp_type; + const desc_val_kind = { + TAG: /* Val_ivar */1, + _0: /* Immutable */0, + _1: cl_num + }; + const desc_val_loc = vd.val_loc; + const desc = { + val_type: desc_val_type, + val_kind: desc_val_kind, + val_loc: desc_val_loc, + val_attributes: /* [] */0 + }; + const id$p = create(id.name); + return [ + { + hd: [ + id$p, + param[1], + expr + ], + tl: param$1[0] + }, + add_value(undefined, id$p, desc, param$1[1]) + ]; + }), Stdlib__List.rev(rev_let_bound_idents_with_loc(defs)), [ /* [] */0, met_env ]); @@ -79873,595 +79873,585 @@ function merge_type_decls(param, param$1) { function type_classes(define_class, approx, kind, env, cls) { const cls$1 = Stdlib__List.map((function (cl) { - return [ - cl, - create(cl.pci_name.txt), - create(cl.pci_name.txt), - create(cl.pci_name.txt), - create("#" + cl.pci_name.txt) - ]; - }), cls); + return [ + cl, + create(cl.pci_name.txt), + create(cl.pci_name.txt), + create(cl.pci_name.txt), + create("#" + cl.pci_name.txt) + ]; + }), cls); init_def(currentstamp.contents); begin_class_def(undefined); const match = Stdlib__List.fold_left((function (param, param$1) { - const cl_id = param$1[4]; - const obj_id = param$1[3]; - const ty_id = param$1[2]; - const id = param$1[1]; - const cl = param$1[0]; - const arity = Stdlib__List.length(cl.pci_params); - const match = temp_abbrev(cl.pci_loc, param[1], obj_id, arity); - const match$1 = temp_abbrev(cl.pci_loc, match[2], cl_id, arity); - const env = match$1[2]; - const constr_type = Curry._1(approx, cl.pci_expr); - if (principal.contents) { - generalize_spine(constr_type); + const cl_id = param$1[4]; + const obj_id = param$1[3]; + const ty_id = param$1[2]; + const id = param$1[1]; + const cl = param$1[0]; + const arity = Stdlib__List.length(cl.pci_params); + const match = temp_abbrev(cl.pci_loc, param[1], obj_id, arity); + const match$1 = temp_abbrev(cl.pci_loc, match[2], cl_id, arity); + const env = match$1[2]; + const constr_type = Curry._1(approx, cl.pci_expr); + if (principal.contents) { + generalize_spine(constr_type); + } + const dummy_cty = { + TAG: /* Cty_signature */1, + _0: { + csig_self: newvar(undefined, undefined), + csig_vars: Meths.empty, + csig_concr: /* Empty */0, + csig_inher: /* [] */0 } - const dummy_cty = { - TAG: /* Cty_signature */1, - _0: { - csig_self: newvar(undefined, undefined), - csig_vars: Meths.empty, - csig_concr: /* Empty */0, - csig_inher: /* [] */0 - } - }; - const match$2 = cl.pci_virt; - let tmp; - tmp = match$2 === /* Virtual */0 ? undefined : constr_type; - const dummy_class = { - cty_params: /* [] */0, - cty_type: dummy_cty, - cty_path: unbound_class, - cty_new: tmp, - cty_variance: /* [] */0, - cty_loc: none, - cty_attributes: /* [] */0 - }; - const env$1 = add_cltype(ty_id, { - clty_params: /* [] */0, - clty_type: dummy_cty, - clty_path: unbound_class, - clty_variance: /* [] */0, - clty_loc: none, - clty_attributes: /* [] */0 - }, define_class ? add_class(id, dummy_class, env) : env); - return [ - { - hd: [ - cl, - id, - ty_id, - obj_id, - match[0], - match[1], - cl_id, - match$1[0], - match$1[1], - constr_type, - dummy_class - ], - tl: param[0] - }, - env$1 - ]; - }), [ + }; + const match$2 = cl.pci_virt; + let tmp; + tmp = match$2 === /* Virtual */0 ? undefined : constr_type; + const dummy_class = { + cty_params: /* [] */0, + cty_type: dummy_cty, + cty_path: unbound_class, + cty_new: tmp, + cty_variance: /* [] */0, + cty_loc: none, + cty_attributes: /* [] */0 + }; + const env$1 = add_cltype(ty_id, { + clty_params: /* [] */0, + clty_type: dummy_cty, + clty_path: unbound_class, + clty_variance: /* [] */0, + clty_loc: none, + clty_attributes: /* [] */0 + }, define_class ? add_class(id, dummy_class, env) : env); + return [ + { + hd: [ + cl, + id, + ty_id, + obj_id, + match[0], + match[1], + cl_id, + match$1[0], + match$1[1], + constr_type, + dummy_class + ], + tl: param[0] + }, + env$1 + ]; + }), [ /* [] */0, env ], cls$1); const match$1 = Stdlib__List.fold_right((function (param, param$1) { - const env = param$1[1]; - const constr_type = param[9]; - const cl_ty = param[8]; - const cl_params = param[7]; - const cl_id = param[6]; - const obj_ty = param[5]; - const obj_params = param[4]; - const obj_id = param[3]; - const ty_id = param[2]; - const id = param[1]; - const cl = param[0]; - reset_type_variables(undefined); - begin_class_def(undefined); - const make_param = function (param) { - const sty = param[0]; - try { - return [ - transl_type_param(env, sty), - param[1] - ]; - } - catch (raw_exn){ - const 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, - _1: sty.ptyp_loc, - _2: env, - _3: /* Repeated_parameter */0 - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - }; - const ci_params = Stdlib__List.map(make_param, cl.pci_params); - const params = Stdlib__List.map((function (param) { - return param[0].ctyp_type; - }), ci_params); - const coercion_locs = { - contents: /* [] */0 - }; - let match; - try { - self_coercion.contents = { - hd: [ - { - TAG: /* Pident */0, - _0: obj_id - }, - coercion_locs - ], - tl: self_coercion.contents - }; - const res = Curry._2(kind, env, cl.pci_expr); - self_coercion.contents = Stdlib__List.tl(self_coercion.contents); - match = res; - } - catch (exn){ - self_coercion.contents = /* [] */0; - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - const typ = match[1]; - end_def(undefined); - const sty = repr(signature_of_class_type(typ).csig_self); - const match$1 = flatten_fields(object_fields(sty)); - Stdlib__List.iter((function (param) { - if (param[0] === dummy_method) { - return iter_generalize$1({ - contents: /* [] */0 - }, param[2]); - } - - }), match$1[0]); - const rv = row_variable(sty); - Stdlib__List.iter((function (param) { - return limited_generalize(rv, param); - }), params); - limited_generalize$1(rv, typ); - const match$2 = instance_class(params, typ); - const obj_type = match$2[1]; - const obj_params$p = match$2[0]; - const constr = newconstr({ - TAG: /* Pident */0, - _0: obj_id - }, obj_params); - const ty = repr(signature_of_class_type(obj_type).csig_self); - hide_private_methods(ty); - close_object(ty); + const env = param$1[1]; + const constr_type = param[9]; + const cl_ty = param[8]; + const cl_params = param[7]; + const cl_id = param[6]; + const obj_ty = param[5]; + const obj_params = param[4]; + const obj_id = param[3]; + const ty_id = param[2]; + const id = param[1]; + const cl = param[0]; + reset_type_variables(undefined); + begin_class_def(undefined); + const make_param = function (param) { + const sty = param[0]; try { - Stdlib__List.iter2((function (param, param$1) { - return unify$2(env, param, param$1); - }), obj_params, obj_params$p); + return [ + transl_type_param(env, sty), + param[1] + ]; } catch (raw_exn){ - const 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, - _1: cl.pci_loc, - _2: env, - _3: { - TAG: /* Bad_parameters */13, - _0: obj_id, - _1: constr, - _2: newconstr({ - TAG: /* Pident */0, - _0: obj_id - }, obj_params$p) - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); - } - try { - unify$2(env, ty, constr); - } - catch (raw_exn$1){ - const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$2.MEL_EXN_ID === Unify) { + const 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, - _1: cl.pci_loc, + _1: sty.ptyp_loc, _2: env, - _3: { - TAG: /* Abbrev_type_clash */8, - _0: constr, - _1: ty, - _2: expand_head(env, constr) - } + _3: /* Repeated_parameter */0 }); } - throw new Caml_js_exceptions.MelangeError(exn$2.MEL_EXN_ID, exn$2); - } - const match$3 = instance_class(params, typ); - const cl_params$p = match$3[0]; - const 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 { - Stdlib__List.iter2((function (param, param$1) { - return unify$2(env, param, param$1); - }), cl_params, cl_params$p); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - catch (raw_exn$2){ - const 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, - _1: cl.pci_loc, - _2: env, - _3: { - TAG: /* Bad_parameters */13, - _0: cl_id, - _1: newconstr({ - TAG: /* Pident */0, - _0: cl_id - }, cl_params), - _2: newconstr({ - TAG: /* Pident */0, - _0: cl_id - }, cl_params$p) - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn$3.MEL_EXN_ID, exn$3); + }; + const ci_params = Stdlib__List.map(make_param, cl.pci_params); + const params = Stdlib__List.map((function (param) { + return param[0].ctyp_type; + }), ci_params); + const coercion_locs = { + contents: /* [] */0 + }; + let match; + try { + self_coercion.contents = { + hd: [ + { + TAG: /* Pident */0, + _0: obj_id + }, + coercion_locs + ], + tl: self_coercion.contents + }; + const res = Curry._2(kind, env, cl.pci_expr); + self_coercion.contents = Stdlib__List.tl(self_coercion.contents); + match = res; + } + catch (exn){ + self_coercion.contents = /* [] */0; + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + const typ = match[1]; + end_def(undefined); + const sty = repr(signature_of_class_type(typ).csig_self); + const match$1 = flatten_fields(object_fields(sty)); + Stdlib__List.iter((function (param) { + if (param[0] === dummy_method) { + return iter_generalize$1({ + contents: /* [] */0 + }, param[2]); + } + + }), match$1[0]); + const rv = row_variable(sty); + Stdlib__List.iter((function (param) { + return limited_generalize(rv, param); + }), params); + limited_generalize$1(rv, typ); + const match$2 = instance_class(params, typ); + const obj_type = match$2[1]; + const obj_params$p = match$2[0]; + const constr = newconstr({ + TAG: /* Pident */0, + _0: obj_id + }, obj_params); + const ty = repr(signature_of_class_type(obj_type).csig_self); + hide_private_methods(ty); + close_object(ty); + try { + Stdlib__List.iter2((function (param, param$1) { + return unify$2(env, param, param$1); + }), obj_params, obj_params$p); + } + catch (raw_exn){ + const 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, + _1: cl.pci_loc, + _2: env, + _3: { + TAG: /* Bad_parameters */13, + _0: obj_id, + _1: constr, + _2: newconstr({ + TAG: /* Pident */0, + _0: obj_id + }, obj_params$p) + } + }); } - try { - unify$2(env, ty$1, cl_ty); + throw new Caml_js_exceptions.MelangeError(exn$1.MEL_EXN_ID, exn$1); + } + try { + unify$2(env, ty, constr); + } + catch (raw_exn$1){ + const 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, + _1: cl.pci_loc, + _2: env, + _3: { + TAG: /* Abbrev_type_clash */8, + _0: constr, + _1: ty, + _2: expand_head(env, constr) + } + }); } - catch (raw_exn$3){ - const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$4.MEL_EXN_ID === Unify) { - const constr$1 = newconstr({ - TAG: /* Pident */0, - _0: cl_id - }, params); - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: cl.pci_loc, - _2: env, - _3: { - TAG: /* Abbrev_type_clash */8, - _0: constr$1, - _1: ty$1, - _2: cl_ty - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn$4.MEL_EXN_ID, exn$4); + throw new Caml_js_exceptions.MelangeError(exn$2.MEL_EXN_ID, exn$2); + } + const match$3 = instance_class(params, typ); + const cl_params$p = match$3[0]; + const 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 { + Stdlib__List.iter2((function (param, param$1) { + return unify$2(env, param, param$1); + }), cl_params, cl_params$p); + } + catch (raw_exn$2){ + const 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, + _1: cl.pci_loc, + _2: env, + _3: { + TAG: /* Bad_parameters */13, + _0: cl_id, + _1: newconstr({ + TAG: /* Pident */0, + _0: cl_id + }, cl_params), + _2: newconstr({ + TAG: /* Pident */0, + _0: cl_id + }, cl_params$p) + } + }); } - try { - unify$2(env, constructor_type(constr, obj_type), instance(undefined, env, constr_type)); + throw new Caml_js_exceptions.MelangeError(exn$3.MEL_EXN_ID, exn$3); + } + try { + unify$2(env, ty$1, cl_ty); + } + catch (raw_exn$3){ + const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); + if (exn$4.MEL_EXN_ID === Unify) { + const constr$1 = newconstr({ + TAG: /* Pident */0, + _0: cl_id + }, params); + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: cl.pci_loc, + _2: env, + _3: { + TAG: /* Abbrev_type_clash */8, + _0: constr$1, + _1: ty$1, + _2: cl_ty + } + }); } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: cl.pci_loc, - _2: env, - _3: { - TAG: /* Constructor_type_mismatch */9, - _0: cl.pci_name.txt, - _1: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + throw new Caml_js_exceptions.MelangeError(exn$4.MEL_EXN_ID, exn$4); + } + try { + unify$2(env, constructor_type(constr, obj_type), instance(undefined, env, constr_type)); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: cl.pci_loc, + _2: env, + _3: { + TAG: /* Constructor_type_mismatch */9, + _0: cl.pci_name.txt, + _1: trace._1 + } + }); } - const cty_variance = Stdlib__List.map((function (param) { - return Types_Variance.full; - }), params); - const cltydef_clty_type = class_body(typ); - const cltydef_clty_path = { + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + const cty_variance = Stdlib__List.map((function (param) { + return Types_Variance.full; + }), params); + const cltydef_clty_type = class_body(typ); + const cltydef_clty_path = { + TAG: /* Pident */0, + _0: obj_id + }; + const cltydef_clty_loc = cl.pci_loc; + const cltydef_clty_attributes = cl.pci_attributes; + const cltydef = { + clty_params: params, + clty_type: cltydef_clty_type, + clty_path: cltydef_clty_path, + clty_variance: cty_variance, + clty_loc: cltydef_clty_loc, + clty_attributes: cltydef_clty_attributes + }; + const match$4 = cl.pci_virt; + let tmp; + tmp = match$4 === /* Virtual */0 ? undefined : constr_type; + const clty = { + cty_params: params, + cty_type: typ, + cty_path: { TAG: /* Pident */0, _0: obj_id - }; - const cltydef_clty_loc = cl.pci_loc; - const cltydef_clty_attributes = cl.pci_attributes; - const cltydef = { - clty_params: params, - clty_type: cltydef_clty_type, - clty_path: cltydef_clty_path, - clty_variance: cty_variance, - clty_loc: cltydef_clty_loc, - clty_attributes: cltydef_clty_attributes - }; - const match$4 = cl.pci_virt; - let tmp; - tmp = match$4 === /* Virtual */0 ? undefined : constr_type; - const clty = { - cty_params: params, - cty_type: typ, - cty_path: { - TAG: /* Pident */0, - _0: obj_id - }, - cty_new: tmp, - cty_variance: cty_variance, - cty_loc: cl.pci_loc, - cty_attributes: cl.pci_attributes - }; - param[10].cty_type = typ; - const env$1 = add_cltype(ty_id, cltydef, define_class ? add_class(id, clty, env) : env); - if (cl.pci_virt === /* Concrete */1) { - const sign = signature_of_class_type(typ); - const mets = virtual_methods(sign); - const vals = Curry._3(Meths.fold, (function (name, param, l) { - if (param[1] === /* Virtual */0) { - return { - hd: name, - tl: l - }; - } else { - return l; - } - }), sign.csig_vars, /* [] */0); - if (Caml_obj.caml_notequal(mets, /* [] */0) || Caml_obj.caml_notequal(vals, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: cl.pci_loc, - _2: env$1, - _3: { - TAG: /* Virtual_class */10, - _0: define_class, - _1: false, - _2: mets, - _3: vals - } - }); - } - + }, + cty_new: tmp, + cty_variance: cty_variance, + cty_loc: cl.pci_loc, + cty_attributes: cl.pci_attributes + }; + param[10].cty_type = typ; + const env$1 = add_cltype(ty_id, cltydef, define_class ? add_class(id, clty, env) : env); + if (cl.pci_virt === /* Concrete */1) { + const sign = signature_of_class_type(typ); + const mets = virtual_methods(sign); + const vals = Curry._3(Meths.fold, (function (name, param, l) { + if (param[1] === /* Virtual */0) { + return { + hd: name, + tl: l + }; + } else { + return l; + } + }), sign.csig_vars, /* [] */0); + if (Caml_obj.caml_notequal(mets, /* [] */0) || Caml_obj.caml_notequal(vals, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: cl.pci_loc, + _2: env$1, + _3: { + TAG: /* Virtual_class */10, + _0: define_class, + _1: false, + _2: mets, + _3: vals + } + }); } - const arity = class_type_arity(typ); - const match$5 = flatten_fields(object_fields(expand_head(env$1, obj_ty))); - const pub_meths = Stdlib__List.map((function (param) { - return param[0]; - }), match$5[0]); - const match$6 = instance_class(params, typ); - const typ$p = match$6[1]; - const params$p = match$6[0]; - const cltydef_clty_type$1 = class_body(typ$p); - const cltydef_clty_path$1 = { + + } + const arity = class_type_arity(typ); + const match$5 = flatten_fields(object_fields(expand_head(env$1, obj_ty))); + const pub_meths = Stdlib__List.map((function (param) { + return param[0]; + }), match$5[0]); + const match$6 = instance_class(params, typ); + const typ$p = match$6[1]; + const params$p = match$6[0]; + const cltydef_clty_type$1 = class_body(typ$p); + const cltydef_clty_path$1 = { + TAG: /* Pident */0, + _0: obj_id + }; + const cltydef_clty_loc$1 = cl.pci_loc; + const cltydef_clty_attributes$1 = cl.pci_attributes; + const cltydef$1 = { + clty_params: params$p, + clty_type: cltydef_clty_type$1, + clty_path: cltydef_clty_path$1, + clty_variance: cty_variance, + clty_loc: cltydef_clty_loc$1, + clty_attributes: cltydef_clty_attributes$1 + }; + const match$7 = cl.pci_virt; + let tmp$1; + tmp$1 = match$7 === /* Virtual */0 ? undefined : instance(undefined, env$1, constr_type); + const clty$1 = { + cty_params: params$p, + cty_type: typ$p, + cty_path: { TAG: /* Pident */0, _0: obj_id - }; - const cltydef_clty_loc$1 = cl.pci_loc; - const cltydef_clty_attributes$1 = cl.pci_attributes; - const cltydef$1 = { - clty_params: params$p, - clty_type: cltydef_clty_type$1, - clty_path: cltydef_clty_path$1, - clty_variance: cty_variance, - clty_loc: cltydef_clty_loc$1, - clty_attributes: cltydef_clty_attributes$1 - }; - const match$7 = cl.pci_virt; - let tmp$1; - tmp$1 = match$7 === /* Virtual */0 ? undefined : instance(undefined, env$1, constr_type); - const clty$1 = { - cty_params: params$p, - cty_type: typ$p, - cty_path: { - TAG: /* Pident */0, - _0: obj_id - }, - cty_new: tmp$1, - cty_variance: cty_variance, - cty_loc: cl.pci_loc, - cty_attributes: cl.pci_attributes - }; - const obj_abbr_type_arity = Stdlib__List.length(obj_params); - const obj_abbr_type_manifest = obj_ty; - const obj_abbr_type_variance = Stdlib__List.map((function (param) { - return Types_Variance.full; - }), obj_params); - const obj_abbr_type_loc = cl.pci_loc; - const obj_abbr = { - type_params: obj_params, - type_arity: obj_abbr_type_arity, - type_kind: /* Type_abstract */0, - type_private: /* Public */1, - type_manifest: obj_abbr_type_manifest, - type_variance: obj_abbr_type_variance, - type_newtype_level: undefined, - type_loc: obj_abbr_type_loc, - type_attributes: /* [] */0 - }; - const match$8 = instance_parameterized_type(undefined, params, repr(signature_of_class_type(typ).csig_self)); - const cl_ty$1 = match$8[1]; - const 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); - const cl_abbr_type_arity = Stdlib__List.length(cl_params$1); - const cl_abbr_type_manifest = cl_ty$1; - const cl_abbr_type_variance = Stdlib__List.map((function (param) { - return Types_Variance.full; - }), cl_params$1); - const cl_abbr_type_loc = cl.pci_loc; - const cl_abbr = { - type_params: cl_params$1, - type_arity: cl_abbr_type_arity, - type_kind: /* Type_abstract */0, - type_private: /* Public */1, - type_manifest: cl_abbr_type_manifest, - type_variance: cl_abbr_type_variance, - type_newtype_level: undefined, - type_loc: cl_abbr_type_loc, - type_attributes: /* [] */0 - }; - return [ - { - hd: [ - cl, - id, - clty$1, - ty_id, - cltydef$1, - obj_id, - obj_abbr, - cl_id, - cl_abbr, - ci_params, - arity, - pub_meths, - Stdlib__List.rev(coercion_locs.contents), - match[0] - ], - tl: param$1[0] - }, - env$1 - ]; - }), match[0], [ + }, + cty_new: tmp$1, + cty_variance: cty_variance, + cty_loc: cl.pci_loc, + cty_attributes: cl.pci_attributes + }; + const obj_abbr_type_arity = Stdlib__List.length(obj_params); + const obj_abbr_type_manifest = obj_ty; + const obj_abbr_type_variance = Stdlib__List.map((function (param) { + return Types_Variance.full; + }), obj_params); + const obj_abbr_type_loc = cl.pci_loc; + const obj_abbr = { + type_params: obj_params, + type_arity: obj_abbr_type_arity, + type_kind: /* Type_abstract */0, + type_private: /* Public */1, + type_manifest: obj_abbr_type_manifest, + type_variance: obj_abbr_type_variance, + type_newtype_level: undefined, + type_loc: obj_abbr_type_loc, + type_attributes: /* [] */0 + }; + const match$8 = instance_parameterized_type(undefined, params, repr(signature_of_class_type(typ).csig_self)); + const cl_ty$1 = match$8[1]; + const 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); + const cl_abbr_type_arity = Stdlib__List.length(cl_params$1); + const cl_abbr_type_manifest = cl_ty$1; + const cl_abbr_type_variance = Stdlib__List.map((function (param) { + return Types_Variance.full; + }), cl_params$1); + const cl_abbr_type_loc = cl.pci_loc; + const cl_abbr = { + type_params: cl_params$1, + type_arity: cl_abbr_type_arity, + type_kind: /* Type_abstract */0, + type_private: /* Public */1, + type_manifest: cl_abbr_type_manifest, + type_variance: cl_abbr_type_variance, + type_newtype_level: undefined, + type_loc: cl_abbr_type_loc, + type_attributes: /* [] */0 + }; + return [ + { + hd: [ + cl, + id, + clty$1, + ty_id, + cltydef$1, + obj_id, + obj_abbr, + cl_id, + cl_abbr, + ci_params, + arity, + pub_meths, + Stdlib__List.rev(coercion_locs.contents), + match[0] + ], + tl: param$1[0] + }, + env$1 + ]; + }), match[0], [ /* [] */0, match[1] ]); const env$1 = match$1[1]; end_def(undefined); const res = Stdlib__List.rev_map((function (param) { - const expr = param[13]; - const cl_abbr = param[8]; - const cl_id = param[7]; - const obj_abbr = param[6]; - const obj_id = param[5]; - const cltydef = param[4]; - const ty_id = param[3]; - const clty = param[2]; - const id = param[1]; - const cl = param[0]; - try { - collapse_conj_params(env$1, clty.cty_params); - } - catch (raw_trace){ - const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); - if (trace.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: cl.pci_loc, - _2: env$1, - _3: { - TAG: /* Non_collapsable_conjunction */20, - _0: id, - _1: clty, - _2: trace._1 - } - }); - } - throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); - } - Stdlib__List.iter(generalize, clty.cty_params); - generalize_class_type(generalize, clty.cty_type); - may(generalize, clty.cty_new); - Stdlib__List.iter(generalize, obj_abbr.type_params); - may(generalize, obj_abbr.type_manifest); - Stdlib__List.iter(generalize, cl_abbr.type_params); - may(generalize, cl_abbr.type_manifest); - if (!closed_class$1(clty)) { + const expr = param[13]; + const cl_abbr = param[8]; + const cl_id = param[7]; + const obj_abbr = param[6]; + const obj_id = param[5]; + const cltydef = param[4]; + const ty_id = param[3]; + const clty = param[2]; + const id = param[1]; + const cl = param[0]; + try { + collapse_conj_params(env$1, clty.cty_params); + } + catch (raw_trace){ + const trace = Caml_js_exceptions.internalToOCamlException(raw_trace); + if (trace.MEL_EXN_ID === Unify) { throw new Caml_js_exceptions.MelangeError($$Error$9, { MEL_EXN_ID: $$Error$9, _1: cl.pci_loc, _2: env$1, _3: { - TAG: /* Non_generalizable_class */18, + TAG: /* Non_collapsable_conjunction */20, _0: id, - _1: clty + _1: clty, + _2: trace._1 } }); } - const reason = closed_class(clty.cty_params, signature_of_class_type(clty.cty_type)); - if (reason !== undefined) { - const printer = define_class ? (function (ppf) { - class_declaration$1(id, ppf, clty); - }) : (function (ppf) { - cltype_declaration$1(id, ppf, cltydef); - }); - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, - _1: cl.pci_loc, - _2: env$1, - _3: { - TAG: /* Unbound_type_var */16, - _0: printer, - _1: reason - } - }); + throw new Caml_js_exceptions.MelangeError(trace.MEL_EXN_ID, trace); + } + Stdlib__List.iter(generalize, clty.cty_params); + generalize_class_type(generalize, clty.cty_type); + may(generalize, clty.cty_new); + Stdlib__List.iter(generalize, obj_abbr.type_params); + may(generalize, obj_abbr.type_manifest); + Stdlib__List.iter(generalize, cl_abbr.type_params); + may(generalize, cl_abbr.type_manifest); + if (!closed_class$1(clty)) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: cl.pci_loc, + _2: env$1, + _3: { + TAG: /* Non_generalizable_class */18, + _0: id, + _1: clty + } + }); + } + const reason = closed_class(clty.cty_params, signature_of_class_type(clty.cty_type)); + if (reason !== undefined) { + const printer = define_class ? (function (ppf) { + class_declaration$1(id, ppf, clty); + }) : (function (ppf) { + cltype_declaration$1(id, ppf, cltydef); + }); + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: cl.pci_loc, + _2: env$1, + _3: { + TAG: /* Unbound_type_var */16, + _0: printer, + _1: reason + } + }); + } + return [ + id, + cl.pci_name, + clty, + ty_id, + cltydef, + obj_id, + obj_abbr, + cl_id, + cl_abbr, + param[10], + param[11], + param[12], + expr, + { + ci_virt: cl.pci_virt, + ci_params: param[9], + ci_id_name: cl.pci_name, + ci_id_class: id, + ci_id_class_type: ty_id, + ci_id_object: obj_id, + ci_id_typesharp: cl_id, + ci_expr: expr, + ci_decl: clty, + ci_type_decl: cltydef, + ci_loc: cl.pci_loc, + ci_attributes: cl.pci_attributes } - return [ - id, - cl.pci_name, - clty, - ty_id, - cltydef, - obj_id, - obj_abbr, - cl_id, - cl_abbr, - param[10], - param[11], - param[12], - expr, - { - ci_virt: cl.pci_virt, - ci_params: param[9], - ci_id_name: cl.pci_name, - ci_id_class: id, - ci_id_class_type: ty_id, - ci_id_object: obj_id, - ci_id_typesharp: cl_id, - ci_expr: expr, - ci_decl: clty, - ci_type_decl: cltydef, - ci_loc: cl.pci_loc, - ci_attributes: cl.pci_attributes - } - ]; - }), match$1[0]); + ]; + }), match$1[0]); const decls = Stdlib__List.fold_right(extract_type_decls, res, /* [] */0); const decls$1 = compute_variance_decls(env$1, decls); const res$1 = Stdlib__List.map2(merge_type_decls, res, decls$1); const 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); + 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); const res$2 = Stdlib__List.map((function (param) { - const coercion_locs = param[11]; - const cl_abbr = param[8]; - const obj_abbr = param[6]; - if (coercion_locs) { - const loc = coercion_locs.hd; - const match = cl_abbr.type_manifest; - const match$1 = obj_abbr.type_manifest; - let match$2; - if (match !== undefined) { - if (match$1 !== undefined) { - const match$3 = instance_parameterized_type(undefined, cl_abbr.type_params, match); - const 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]); - match$2 = [ - match$3[1], - match$4[1] - ]; - } else { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 49581, - 15 - ] - }); - } + const coercion_locs = param[11]; + const cl_abbr = param[8]; + const obj_abbr = param[6]; + if (coercion_locs) { + const loc = coercion_locs.hd; + const match = cl_abbr.type_manifest; + const match$1 = obj_abbr.type_manifest; + let match$2; + if (match !== undefined) { + if (match$1 !== undefined) { + const match$3 = instance_parameterized_type(undefined, cl_abbr.type_params, match); + const 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]); + match$2 = [ + match$3[1], + match$4[1] + ]; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -80472,55 +80462,65 @@ function type_classes(define_class, approx, kind, env, cls) { ] }); } - const obj_ty = match$2[1]; - const cl_ty = match$2[0]; - try { - subtype(env$2, cl_ty, obj_ty)(undefined); - } - catch (raw_exn){ - const 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, - _1: loc, - _2: env$2, - _3: { - TAG: /* Not_subtype */23, - _0: exn._1, - _1: exn._2 - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } - if (!opened_object(cl_ty)) { - throw new Caml_js_exceptions.MelangeError($$Error$9, { - MEL_EXN_ID: $$Error$9, + } else { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 49581, + 15 + ] + }); + } + const obj_ty = match$2[1]; + const cl_ty = match$2[0]; + try { + subtype(env$2, cl_ty, obj_ty)(undefined); + } + catch (raw_exn){ + const 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, _1: loc, _2: env$2, _3: { - TAG: /* Cannot_coerce_self */19, - _0: obj_ty + TAG: /* Not_subtype */23, + _0: exn._1, + _1: exn._2 } }); } - + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - return [ - param[0], - param[1], - param[2], - param[3], - param[4], - param[5], - obj_abbr, - param[7], - cl_abbr, - param[9], - param[10], - param[13] - ]; - }), res$1); + if (!opened_object(cl_ty)) { + throw new Caml_js_exceptions.MelangeError($$Error$9, { + MEL_EXN_ID: $$Error$9, + _1: loc, + _2: env$2, + _3: { + TAG: /* Cannot_coerce_self */19, + _0: obj_ty + } + }); + } + + } + return [ + param[0], + param[1], + param[2], + param[3], + param[4], + param[5], + obj_abbr, + param[7], + cl_abbr, + param[9], + param[10], + param[13] + ]; + }), res$1); return [ res$2, env$2 @@ -80560,66 +80560,66 @@ function class_type_declarations$2(env, cls) { const match = type_classes(false, approx_description, class_description, env, cls); return [ Stdlib__List.map((function (param) { - return [ - param[3], - param[1], - param[4], - param[5], - param[6], - param[7], - param[8], - param[11] - ]; - }), match[0]), + return [ + param[3], + param[1], + param[4], + param[5], + param[6], + param[7], + param[8], + param[11] + ]; + }), match[0]), match[1] ]; } function unify_parents_struct(env, ty, st) { Stdlib__List.iter((function (param) { - const match = param.cf_desc; - if (match.TAG === /* Tcf_inherit */0) { - let _cl = match._1; - while(true) { - const cl = _cl; - const st = cl.cl_desc; - switch (st.TAG) { - case /* Tcl_ident */0 : - try { - const decl = find_class(st._0, env); - const match$1 = find_cltype_for_path(env, decl.cty_path); - return unify$2(env, ty, instance(undefined, env, match$1[1])); - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - return; - } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 49658, - 15 - ] - }); + const match = param.cf_desc; + if (match.TAG === /* Tcf_inherit */0) { + let _cl = match._1; + while(true) { + const cl = _cl; + const st = cl.cl_desc; + switch (st.TAG) { + case /* Tcl_ident */0 : + try { + const decl = find_class(st._0, env); + const match$1 = find_cltype_for_path(env, decl.cty_path); + return unify$2(env, ty, instance(undefined, env, match$1[1])); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + return; } - case /* Tcl_structure */1 : - return unify_parents_struct(env, ty, st._0); - case /* Tcl_fun */2 : - case /* Tcl_let */4 : - _cl = st._3; - continue; - case /* Tcl_apply */3 : - case /* Tcl_constraint */5 : - _cl = st._0; - continue; - - } - }; - } - - }), st.cstr_fields); + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 49658, + 15 + ] + }); + } + case /* Tcl_structure */1 : + return unify_parents_struct(env, ty, st._0); + case /* Tcl_fun */2 : + case /* Tcl_let */4 : + _cl = st._3; + continue; + case /* Tcl_apply */3 : + case /* Tcl_constraint */5 : + _cl = st._0; + continue; + + } + }; + } + + }), st.cstr_fields); } function type_object$1(env, loc, s) { @@ -80631,8 +80631,8 @@ function type_object$1(env, loc, s) { hide_private_methods(sty); const match$1 = flatten_fields(object_fields(sty)); const meths = Stdlib__List.map((function (param) { - return param[0]; - }), match$1[0]); + return param[0]; + }), match$1[0]); unify_parents_struct(env, sign.csig_self, desc); return [ desc, @@ -80673,240 +80673,250 @@ register_error_of_exn(function (err) { } const env = err._2; return error_of_printer(err._1, (function (param, param$1) { - return wrap_printing_env(env, (function (param$2) { - if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { - return Stdlib__Format.fprintf(param)({ + return wrap_printing_env(env, (function (param$2) { + if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "A type parameter occurs several times", + _1: /* End_of_format */0 + }, + _1: "A type parameter occurs several times" + }); + } + switch (param$1.TAG) { + case /* Unconsistent_constraint */0 : + Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "A type parameter occurs several times", - _1: /* End_of_format */0 + _0: "The class constraints are not consistent.", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Flush_newline */4, + _1: /* End_of_format */0 + } }, - _1: "A type parameter occurs several times" + _1: "The class constraints are not consistent.@." }); - } - switch (param$1.TAG) { - case /* Unconsistent_constraint */0 : - Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The class constraints are not consistent.", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, + return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Type", _1: /* End_of_format */0 - } - }, - _1: "The class constraints are not consistent.@." - }); - return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Type", - _1: /* End_of_format */0 - }, - _1: "Type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "is not compatible with type", - _1: /* End_of_format */0 - }, - _1: "is not compatible with type" - }); - })); - case /* Field_type_mismatch */1 : - const m = param$1._1; - const k = param$1._0; - return report_unification_error(param, env, undefined, param$1._2, (function (ppf) { - Curry._2(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The ", + }, + _1: "Type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "is not compatible with type", + _1: /* End_of_format */0 + }, + _1: "is not compatible with type" + }); + })); + case /* Field_type_mismatch */1 : + const m = param$1._1; + const k = param$1._0; + return report_unification_error(param, env, undefined, param$1._2, (function (ppf) { + Curry._2(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "has type", - _1: /* End_of_format */0 - } - } - } + TAG: /* String_literal */11, + _0: "has type", + _1: /* End_of_format */0 } } - }, - _1: "The %s %s@ has type" - }), k, m); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is expected to have type", - _1: /* End_of_format */0 - }, - _1: "but is expected to have type" - }); - })); - case /* Structure_expected */2 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + } + }, + _1: "The %s %s@ has type" + }), k, m); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is expected to have type", + _1: /* End_of_format */0 + }, + _1: "but is expected to have type" + }); + })); + case /* Structure_expected */2 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "This class expression is not a class structure; it has type", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "This class expression is not a class structure; it has type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } - }, - _1: "@[This class expression is not a class structure; it has type@ %a@]" - }), class_type$2, param$1._0); - case /* Cannot_apply */3 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This class expression is not a class function, it cannot be applied", - _1: /* End_of_format */0 + } + } }, - _1: "This class expression is not a class function, it cannot be applied" - }); - case /* Apply_wrong_label */4 : - const mark_label = function (l) { - if (l === "") { - return "out label"; - } else { - return Curry._1(Stdlib__Format.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: " label ~", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: " label ~%s" - }), l); - } - }; - return Curry._1(Stdlib__Format.fprintf(param)({ + _1: "@[This class expression is not a class structure; it has type@ %a@]" + }), class_type$2, param$1._0); + case /* Cannot_apply */3 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This class expression is not a class function, it cannot be applied", + _1: /* End_of_format */0 + }, + _1: "This class expression is not a class function, it cannot be applied" + }); + case /* Apply_wrong_label */4 : + const mark_label = function (l) { + if (l === "") { + return "out label"; + } else { + return Curry._1(Stdlib__Format.sprintf({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "This argument cannot be applied with", + _0: " label ~", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: /* End_of_format */0 } }, - _1: "This argument cannot be applied with%s" - }), mark_label(param$1._0)); - case /* Pattern_type_clash */5 : - const ty = param$1._0; - reset(undefined); - mark_loops(ty); - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + _1: " label ~%s" + }), l); + } + }; + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This argument cannot be applied with", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "This argument cannot be applied with%s" + }), mark_label(param$1._0)); + case /* Pattern_type_clash */5 : + const ty = param$1._0; + reset(undefined); + mark_loops(ty); + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } - }, - _1: "@[%s@ %a@]" - }), "This pattern cannot match self: it only matches values of type", type_expr$1, ty); - case /* Unbound_class_2 */6 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[%s@ %a@]" + }), "This pattern cannot match self: it only matches values of type", type_expr$1, ty); + case /* Unbound_class_2 */6 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The class", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "The class", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -80915,48 +80925,48 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "is not yet completely defined", + _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "is not yet completely defined", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } - }, - _1: "@[The class@ %a@ is not yet completely defined@]" - }), longident, param$1._0); - case /* Unbound_class_type_2 */7 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The class@ %a@ is not yet completely defined@]" + }), longident, param$1._0); + case /* Unbound_class_type_2 */7 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The class type", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "The class type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -80965,61 +80975,61 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "is not yet completely defined", + _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "is not yet completely defined", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } - }, - _1: "@[The class type@ %a@ is not yet completely defined@]" - }), longident, param$1._0); - case /* Abbrev_type_clash */8 : - const expected = param$1._2; - const actual = param$1._1; - const abbrev = param$1._0; - reset_and_mark_loops_list({ - hd: abbrev, - tl: { - hd: actual, - tl: { - hd: expected, - tl: /* [] */0 + } } - } - }); - return Curry._6(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + }, + _1: "@[The class type@ %a@ is not yet completely defined@]" + }), longident, param$1._0); + case /* Abbrev_type_clash */8 : + const expected = param$1._2; + const actual = param$1._1; + const abbrev = param$1._0; + reset_and_mark_loops_list({ + hd: abbrev, + tl: { + hd: actual, + tl: { + hd: expected, + tl: /* [] */0 + } + } + }); + return Curry._6(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The abbreviation", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "The abbreviation", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81028,8 +81038,9 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "expands to type", + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81038,9 +81049,8 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "expands to type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81049,8 +81059,9 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "but is used with type", + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81059,24 +81070,11 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "but is used with type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -81087,166 +81085,166 @@ register_error_of_exn(function (err) { } } } - }, - _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 : - const c = param$1._0; - return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The expression \"new ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: "\" has type", - _1: /* End_of_format */0 - } - } - }, - _1: "The expression \"new %s\" has type" - }), c); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but is used with type", - _1: /* End_of_format */0 - }, - _1: "but is used with type" - }); - })); - case /* Virtual_class */10 : - const vals = param$1._3; - const mets = param$1._2; - const imm = param$1._1; - const cl = param$1._0; - const print_mets = function (ppf, mets) { - Stdlib__List.iter((function (met) { - Curry._1(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "@ %s" - }), met); - }), mets); - }; - const missings = mets ? ( - vals ? "methods and variables" : "methods" - ) : "variables"; - const print_msg = function (ppf) { - if (imm) { - return Curry._1(Stdlib__Format.fprintf(ppf)({ + } + } + }, + _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 : + const c = param$1._0; + return report_unification_error(param, env, undefined, param$1._1, (function (ppf) { + Curry._1(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The expression \"new ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* String_literal */11, + _0: "\" has type", + _1: /* End_of_format */0 + } + } + }, + _1: "The expression \"new %s\" has type" + }), c); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but is used with type", + _1: /* End_of_format */0 + }, + _1: "but is used with type" + }); + })); + case /* Virtual_class */10 : + const vals = param$1._3; + const mets = param$1._2; + const imm = param$1._1; + const cl = param$1._0; + const print_mets = function (ppf, mets) { + Stdlib__List.iter((function (met) { + Curry._1(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { - TAG: /* String_literal */11, - _0: "This object has virtual ", + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: /* End_of_format */0 } }, - _1: "This object has virtual %s" - }), missings); - } else if (cl) { - return Stdlib__Format.fprintf(ppf)({ + _1: "@ %s" + }), met); + }), mets); + }; + const missings = mets ? ( + vals ? "methods and variables" : "methods" + ) : "variables"; + const print_msg = function (ppf) { + if (imm) { + return Curry._1(Stdlib__Format.fprintf(ppf)({ TAG: /* Format */0, _0: { TAG: /* String_literal */11, - _0: "This class should be virtual", - _1: /* End_of_format */0 + _0: "This object has virtual ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } }, - _1: "This class should be virtual" - }); - } else { - return Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, + _1: "This object has virtual %s" + }), missings); + } else if (cl) { + return Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This class should be virtual", + _1: /* End_of_format */0 + }, + _1: "This class should be virtual" + }); + } else { + return Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This class type should be virtual", + _1: /* End_of_format */0 + }, + _1: "This class type should be virtual" + }); + } + }; + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "This class type should be virtual", - _1: /* End_of_format */0 - }, - _1: "This class type should be virtual" - }); - } - }; - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* Theta */16, _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Char_literal */12, + _0: /* '.' */46, _1: { - TAG: /* Theta */16, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: { - TAG: /* Formatting_lit */17, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "<2>", - _1: /* End_of_format */0 - }, - _1: "<2>" - } + TAG: /* String_literal */11, + _0: "<2>", + _1: /* End_of_format */0 }, + _1: "<2>" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The following ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "The following ", + _0: " are undefined :", _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " are undefined :", + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -81255,71 +81253,71 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[%t.@ @[<2>The following %s are undefined :%a@]@]" - }), print_msg, missings, print_mets, Stdlib.$at(mets, vals)); - case /* Parameter_arity_mismatch */11 : - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[%t.@ @[<2>The following %s are undefined :%a@]@]" + }), print_msg, missings, print_mets, Stdlib.$at(mets, vals)); + case /* Parameter_arity_mismatch */11 : + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The class constructor ", + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Open_box */1, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The class constructor ", + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { + TAG: /* String_literal */11, + _0: "expects ", + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* String_literal */11, - _0: "expects ", + _0: " type argument(s),", _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { TAG: /* String_literal */11, - _0: " type argument(s),", + _0: "but is here applied to ", _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* String_literal */11, - _0: "but is here applied to ", + _0: " type argument(s)", _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* String_literal */11, - _0: " type argument(s)", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -81329,59 +81327,72 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[The class constructor %a@ expects %i type argument(s),@ but is here applied to %i type argument(s)@]" - }), longident, param$1._0, param$1._1, param$1._2); - case /* Parameter_mismatch */12 : - return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The type parameter", - _1: /* End_of_format */0 - }, - _1: "The type parameter" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "does not meet its constraint: it should be", - _1: /* End_of_format */0 - }, - _1: "does not meet its constraint: it should be" - }); - })); - case /* Bad_parameters */13 : - const cstrs = param$1._2; - const params = param$1._1; - reset_and_mark_loops_list({ - hd: params, - tl: { - hd: cstrs, - tl: /* [] */0 - } - }); - return Curry._6(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The class constructor %a@ expects %i type argument(s),@ but is here applied to %i type argument(s)@]" + }), longident, param$1._0, param$1._1, param$1._2); + case /* Parameter_mismatch */12 : + return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The type parameter", + _1: /* End_of_format */0 + }, + _1: "The type parameter" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "does not meet its constraint: it should be", + _1: /* End_of_format */0 + }, + _1: "does not meet its constraint: it should be" + }); + })); + case /* Bad_parameters */13 : + const cstrs = param$1._2; + const params = param$1._1; + reset_and_mark_loops_list({ + hd: params, + tl: { + hd: cstrs, + tl: /* [] */0 + } + }); + return Curry._6(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The abbreviation ", + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Open_box */1, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The abbreviation ", + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "is used with parameters", + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81390,9 +81401,8 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "is used with parameters", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81401,8 +81411,9 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "wich are incompatible with constraints", + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81411,24 +81422,11 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "wich are incompatible with constraints", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -81438,71 +81436,84 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[The abbreviation %a@ is used with parameters@ %a@ wich are incompatible with constraints@ %a@]" - }), ident$3, param$1._0, type_expr$1, params, type_expr$1, cstrs); - case /* Class_match_failure */14 : - return report_error$3(param, param$1._0); - case /* Unbound_val */15 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Unbound instance variable ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: /* End_of_format */0 - } - }, - _1: "Unbound instance variable %s" - }), param$1._0); - case /* Unbound_type_var */16 : - const print_common = function (ppf, kind, ty0, real, lab, ty) { - const ty1 = real ? ty0 : newty2(100000000, { - TAG: /* Tobject */4, - _0: ty0, - _1: { - contents: undefined } - }); - mark_loops(ty1); - Curry._6(Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The ", + } + }, + _1: "@[The abbreviation %a@ is used with parameters@ %a@ wich are incompatible with constraints@ %a@]" + }), ident$3, param$1._0, type_expr$1, params, type_expr$1, cstrs); + case /* Class_match_failure */14 : + return report_error$3(param, param$1._0); + case /* Unbound_val */15 : + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Unbound instance variable ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: /* End_of_format */0 + } + }, + _1: "Unbound instance variable %s" + }), param$1._0); + case /* Unbound_type_var */16 : + const print_common = function (ppf, kind, ty0, real, lab, ty) { + const ty1 = real ? ty0 : newty2(100000000, { + TAG: /* Tobject */4, + _0: ty0, + _1: { + contents: undefined + } + }); + mark_loops(ty1); + Curry._6(Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* String_literal */11, + _0: "has type", _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, - _0: "@ ", + _0: "@;<1 2>", _1: 1, - _2: 0 + _2: 2 }, _1: { - TAG: /* String_literal */11, - _0: "has type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, - _0: "@;<1 2>", + _0: "@ ", _1: 1, - _2: 2 + _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "where", + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81511,9 +81522,8 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "where", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -81522,21 +81532,9 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "is unbound", - _1: /* End_of_format */0 - } - } + TAG: /* String_literal */11, + _0: "is unbound", + _1: /* End_of_format */0 } } } @@ -81548,89 +81546,89 @@ register_error_of_exn(function (err) { } } } - }, - _1: "The %s %s@ has type@;<1 2>%a@ where@ %a@ is unbound" - }), kind, lab, type_expr$1, ty, type_expr$1, ty0); - }; - const 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 { - return print_common(ppf, "instance variable", param._0, param._1, param._2, param._3); - } - }; - reset(undefined); - return Curry._3(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "The %s %s@ has type@;<1 2>%a@ where@ %a@ is unbound" + }), kind, lab, type_expr$1, ty, type_expr$1, ty0); + }; + const 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 { + return print_common(ppf, "instance variable", param._0, param._1, param._2, param._3); + } + }; + reset(undefined); + return Curry._3(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Some type variables are unbound in this type:", _1: { - TAG: /* Formatting_gen */18, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 }, _1: { - TAG: /* String_literal */11, - _0: "Some type variables are unbound in this type:", - _1: { + TAG: /* Theta */16, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@;<1 2>", - _1: 1, - _2: 2 - }, + _0: /* Close_box */0, _1: { - TAG: /* Theta */16, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } @@ -81639,95 +81637,164 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[@[Some type variables are unbound in this type:@;<1 2>%t@]@ @[%a@]@]" - }), param$1._0, print_reason, param$1._1); - case /* Make_nongen_seltype */17 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[@[Some type variables are unbound in this type:@;<1 2>%t@]@ @[%a@]@]" + }), param$1._0, print_reason, param$1._1); + case /* Make_nongen_seltype */17 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Self type should not occur in the non-generic type", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Format */0, + TAG: /* Break */0, + _0: "@;<1 2>", + _1: 1, + _2: 2 + }, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@,", + _1: 0, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "It would escape the scope of its class", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } + } } + } + } + } + }, + _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 : + const id = param$1._0; + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type of this class,", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* Formatting_gen */18, + TAG: /* Alpha */15, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "Self type should not occur in the non-generic type", + TAG: /* Char_literal */12, + _0: /* ',' */44, _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, - _0: "@;<1 2>", + _0: "@ ", _1: 1, - _2: 2 + _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String_literal */11, + _0: "contains type variables that cannot be generalized", + _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@,", - _1: 0, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "It would escape the scope of its class", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } + _1: /* End_of_format */0 } } } } } - }, - _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 : - const id = param$1._0; - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The type of this class,@ %a,@ contains type variables that cannot be generalized@]" + }), (function (param, param$1) { + return class_declaration$1(id, param, param$1); + }), param$1._1); + case /* Cannot_coerce_self */19 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type of self cannot be coerced to", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { TAG: /* String_literal */11, - _0: "The type of this class,", + _0: "the type of the current class:", _1: { TAG: /* Formatting_lit */17, _0: { @@ -81740,18 +81807,13 @@ register_error_of_exn(function (err) { TAG: /* Alpha */15, _0: { TAG: /* Char_literal */12, - _0: /* ',' */44, + _0: /* '.' */46, _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + _0: /* Flush_newline */4, _1: { TAG: /* String_literal */11, - _0: "contains type variables that cannot be generalized", + _0: "Some occurrences are contravariant", _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, @@ -81763,27 +81825,140 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[The type of this class,@ %a,@ contains type variables that cannot be generalized@]" - }), (function (param, param$1) { - return class_declaration$1(id, param, param$1); - }), param$1._1); - case /* Cannot_coerce_self */19 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _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 : + const id$1 = param$1._0; + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type of this class,", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "contains non-collapsible conjunctive types in constraints", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } } - }, + } + } + } + }, + _1: "@[The type of this class,@ %a,@ contains non-collapsible conjunctive types in constraints@]" + }), (function (param, param$1) { + return class_declaration$1(id$1, param, param$1); + }), param$1._1); + return report_unification_error(param, env, undefined, param$1._2, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Type", + _1: /* End_of_format */0 + }, + _1: "Type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "is not compatible with type", + _1: /* End_of_format */0 + }, + _1: "is not compatible with type" + }); + })); + case /* Final_self_clash */21 : + return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This object is expected to have type", + _1: /* End_of_format */0 + }, + _1: "This object is expected to have type" + }); + }), (function (ppf) { + Stdlib__Format.fprintf(ppf)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "but actually has type", + _1: /* End_of_format */0 + }, + _1: "but actually has type" + }); + })); + case /* Mutability_mismatch */22 : + const match = param$1._1 === /* Immutable */0 ? [ + "mutable", + "immutable" + ] : [ + "immutable", + "mutable" + ]; + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The instance variable is ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String_literal */11, - _0: "The type of self cannot be coerced to", + TAG: /* Char_literal */12, + _0: /* ';' */59, _1: { TAG: /* Formatting_lit */17, _0: { @@ -81794,72 +81969,91 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "the type of the current class:", + _0: "it cannot be redefined as ", _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, - _1: { - TAG: /* String_literal */11, - _0: "Some occurrences are contravariant", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } - }, - _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 : - const id$1 = param$1._0; - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The instance variable is %s;@ it cannot be redefined as %s@]" + }), match[0], match[1]); + case /* No_overriding */23 : + if (param$1._1 === "") { + return Curry._1(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "This inheritance does not override any method", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } } - }, + } + } + }, + _1: "@[This inheritance does not override any method@ %s@]" + }), "instance variable"); + } else { + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The ", _1: { - TAG: /* String_literal */11, - _0: "The type of this class,", + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: " `", _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { TAG: /* Char_literal */12, - _0: /* ',' */44, + _0: /* '\'' */39, _1: { TAG: /* Formatting_lit */17, _0: { @@ -81870,7 +82064,7 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "contains non-collapsible conjunctive types in constraints", + _0: "has no previous definition", _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, @@ -81882,83 +82076,39 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[The type of this class,@ %a,@ contains non-collapsible conjunctive types in constraints@]" - }), (function (param, param$1) { - return class_declaration$1(id$1, param, param$1); - }), param$1._1); - return report_unification_error(param, env, undefined, param$1._2, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Type", - _1: /* End_of_format */0 - }, - _1: "Type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "is not compatible with type", - _1: /* End_of_format */0 - }, - _1: "is not compatible with type" - }); - })); - case /* Final_self_clash */21 : - return report_unification_error(param, env, undefined, param$1._0, (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This object is expected to have type", - _1: /* End_of_format */0 - }, - _1: "This object is expected to have type" - }); - }), (function (ppf) { - Stdlib__Format.fprintf(ppf)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "but actually has type", - _1: /* End_of_format */0 - }, - _1: "but actually has type" - }); - })); - case /* Mutability_mismatch */22 : - const match = param$1._1 === /* Immutable */0 ? [ - "mutable", - "immutable" - ] : [ - "immutable", - "mutable" - ]; - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + }, + _1: "@[The %s `%s'@ has no previous definition@]" + }), param$1._0, param$1._1); + } + case /* Duplicate */24 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "The instance variable is ", + _0: " `", _1: { TAG: /* String */2, _0: /* No_padding */0, _1: { TAG: /* Char_literal */12, - _0: /* ';' */59, + _0: /* '\'' */39, _1: { TAG: /* Formatting_lit */17, _0: { @@ -81969,176 +82119,26 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "it cannot be redefined as ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } - } - }, - _1: "@[The instance variable is %s;@ it cannot be redefined as %s@]" - }), match[0], match[1]); - case /* No_overriding */23 : - if (param$1._1 === "") { - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "This inheritance does not override any method", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "@[This inheritance does not override any method@ %s@]" - }), "instance variable"); - } else { - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " `", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '\'' */39, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "has no previous definition", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } - } - } - }, - _1: "@[The %s `%s'@ has no previous definition@]" - }), param$1._0, param$1._1); - } - case /* Duplicate */24 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " `", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '\'' */39, + _0: "has multiple definitions in this object", _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "has multiple definitions in this object", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } - }, - _1: "@[The %s `%s'@ has multiple definitions in this object@]" - }), param$1._0, param$1._1); - - } - })); - }), err._3); + } + } + }, + _1: "@[The %s `%s'@ has multiple definitions in this object@]" + }), param$1._0, param$1._1); + + } + })); + }), err._3); }); const $$Error$10 = /* @__PURE__ */Caml_exceptions.create("Ocaml_typedtree_test.Typemod.Error"); @@ -82243,15 +82243,15 @@ function type_open$1(toplevel, env, sod) { const type_module_type_of_fwd = { contents: (function (env, m) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/ocaml_typedtree_test.ml", - 50061, - 22 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/ocaml_typedtree_test.ml", + 50061, + 22 + ] + }); + }) }; function add_rec_types(_env, _param) { @@ -82394,40 +82394,40 @@ function merge_constraint(initial_env, loc, sg, constr) { if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && tmp === /* Ptype_abstract */0) { if (id.name === s && is_fixed_type(sdecl)) { const decl_row_type_params = Stdlib__List.map((function (param) { - return newty2(100000000, { - TAG: /* Tvar */0, - _0: undefined - }); - }), sdecl.ptype_params); + return newty2(100000000, { + TAG: /* Tvar */0, + _0: undefined + }); + }), sdecl.ptype_params); const decl_row_type_arity = Stdlib__List.length(sdecl.ptype_params); const decl_row_type_variance = Stdlib__List.map((function (param) { - let match; - switch (param[1]) { - case /* Covariant */0 : - match = [ - true, - false - ]; - break; - case /* Contravariant */1 : - match = [ - false, - true - ]; - break; - case /* Invariant */2 : - match = [ - false, - false - ]; - break; - - } - 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); + let match; + switch (param[1]) { + case /* Covariant */0 : + match = [ + true, + false + ]; + break; + case /* Contravariant */1 : + match = [ + false, + true + ]; + break; + case /* Invariant */2 : + match = [ + false, + false + ]; + break; + + } + 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); const decl_row_type_loc = sdecl.ptype_loc; const decl_row = { type_params: decl_row_type_params, @@ -82754,36 +82754,36 @@ function merge_constraint(initial_env, loc, sg, constr) { const stl = match$2._1; if (Stdlib__List.length(stl) === Stdlib__List.length(sdecl.ptype_params)) { Stdlib__List.iter2((function (x, param) { - const sx = x.ptyp_desc; - if (/* tag */typeof sx === "number" || typeof sx === "string") { + const sx = x.ptyp_desc; + if (/* tag */typeof sx === "number" || typeof sx === "string") { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + if (sx.TAG === /* Ptyp_var */0) { + const sy = param[0].ptyp_desc; + if (/* tag */typeof sy === "number" || typeof sy === "string") { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); } - if (sx.TAG === /* Ptyp_var */0) { - const sy = param[0].ptyp_desc; - if (/* tag */typeof sy === "number" || typeof sy === "string") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); - } - if (sy.TAG === /* Ptyp_var */0) { - if (sx._0 === sy._0) { - return; - } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); + if (sy.TAG === /* Ptyp_var */0) { + if (sx._0 === sy._0) { + return; } throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { MEL_EXN_ID: Stdlib.Exit }); - } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit - }); } - }), stl, sdecl.ptype_params); + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } else { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { + MEL_EXN_ID: Stdlib.Exit + }); + } + }), stl, sdecl.ptype_params); lid$1 = match$2._0; } else { throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { @@ -82921,10 +82921,10 @@ function map_rec_type_with_row_types(rec_flag, fn, decls, rem) { function rec_flag_of_ptype_declarations(tds) { const is_nonrec = Stdlib__List.exists((function (td) { - return Stdlib__List.exists((function (param) { - return param[0].txt === "nonrec"; - }), td.ptype_attributes); - }), tds); + return Stdlib__List.exists((function (param) { + return param[0].txt === "nonrec"; + }), td.ptype_attributes); + }), tds); if (is_nonrec) { return /* Nonrecursive */0; } else { @@ -82961,8 +82961,8 @@ function approx_modtype(env, _smty) { }; case /* Pmty_functor */2 : const arg = may_map((function (param) { - return approx_modtype(env, param); - }), lid._1); + return approx_modtype(env, param); + }), lid._1); const match$1 = enter_module(true, lid._0.txt, arg !== undefined ? arg : ({ TAG: /* Mty_signature */1, _0: /* [] */0 @@ -83019,13 +83019,13 @@ function approx_sig(_env, _ssg) { const decls = approx_type_decl(env, sdecls$1); const rem = approx_sig(env, srem); return map_rec_type(rec_flag, (function (rs, param) { - return { - TAG: /* Sig_type */1, - _0: param[0], - _1: param[1], - _2: rs - }; - }), decls, rem); + return { + TAG: /* Sig_type */1, + _0: param[0], + _1: param[1], + _2: rs + }; + }), decls, rem); case /* Psig_module */4 : const pmd = sdecls._0; const md = approx_module_declaration(env, pmd); @@ -83041,22 +83041,22 @@ function approx_sig(_env, _ssg) { }; case /* Psig_recmodule */5 : const decls$1 = Stdlib__List.map((function (pmd) { - return [ - create(pmd.pmd_name.txt), - approx_module_declaration(env, pmd) - ]; - }), sdecls._0); + return [ + create(pmd.pmd_name.txt), + approx_module_declaration(env, pmd) + ]; + }), sdecls._0); const newenv = Stdlib__List.fold_left((function (env, param) { - return add_module_declaration(undefined, param[0], param[1], env); - }), env, decls$1); + return add_module_declaration(undefined, param[0], param[1], env); + }), env, decls$1); return map_rec((function (rs, param) { - return { - TAG: /* Sig_module */3, - _0: param[0], - _1: param[1], - _2: rs - }; - }), decls$1, approx_sig(newenv, srem)); + return { + TAG: /* Sig_module */3, + _0: param[0], + _1: param[1], + _2: rs + }; + }), decls$1, approx_sig(newenv, srem)); case /* Psig_modtype */6 : const d = sdecls._0; const info = approx_modtype_info(env, d); @@ -83090,32 +83090,32 @@ function approx_sig(_env, _ssg) { const decls$2 = approx_class_declarations(env, sdecls._0); const rem$1 = approx_sig(env, srem); return Stdlib__List.flatten(map_rec((function (rs, param) { - return { + return { + hd: { + TAG: /* Sig_class_type */6, + _0: param[0], + _1: param[2], + _2: rs + }, + tl: { hd: { - TAG: /* Sig_class_type */6, - _0: param[0], - _1: param[2], + TAG: /* Sig_type */1, + _0: param[3], + _1: param[4], _2: rs }, tl: { hd: { TAG: /* Sig_type */1, - _0: param[3], - _1: param[4], + _0: param[5], + _1: param[6], _2: rs }, - tl: { - hd: { - TAG: /* Sig_type */1, - _0: param[5], - _1: param[6], - _2: rs - }, - tl: /* [] */0 - } + tl: /* [] */0 } - }; - }), decls$2, { + } + }; + }), decls$2, { hd: rem$1, tl: /* [] */0 })); @@ -83125,8 +83125,8 @@ function approx_sig(_env, _ssg) { function approx_modtype_info(env, sinfo) { return { mtd_type: may_map((function (param) { - return approx_modtype(env, param); - }), sinfo.pmtd_type), + return approx_modtype(env, param); + }), sinfo.pmtd_type), mtd_attributes: sinfo.pmtd_attributes, mtd_loc: sinfo.pmtd_loc }; @@ -83135,22 +83135,22 @@ function approx_modtype_info(env, sinfo) { function check_recmod_typedecls(env, sdecls, decls) { const recmod_ids = Stdlib__List.map(fst3, decls); Stdlib__List.iter2((function (pmd, param) { - const mty = param[2].mty_type; - Stdlib__List.iter((function (path) { - let loc = pmd.pmd_type.pmty_loc; - let decl = find_type_full(path, env)[0]; - const to_check = function (path) { - return Stdlib__List.exists((function (id) { - return isfree(id, path); - }), recmod_ids); - }; - check_well_founded_decl(env, loc, path, decl, to_check); - check_recursion(env, loc, path, decl, to_check); - }), type_paths(env, { - TAG: /* Pident */0, - _0: param[0] - }, mty)); - }), sdecls, decls); + const mty = param[2].mty_type; + Stdlib__List.iter((function (path) { + let loc = pmd.pmd_type.pmty_loc; + let decl = find_type_full(path, env)[0]; + const to_check = function (path) { + return Stdlib__List.exists((function (id) { + return isfree(id, path); + }), recmod_ids); + }; + check_well_founded_decl(env, loc, path, decl, to_check); + check_recursion(env, loc, path, decl, to_check); + }), type_paths(env, { + TAG: /* Pident */0, + _0: param[0] + }, mty)); + }), sdecls, decls); } const compare$8 = Caml.caml_string_compare; @@ -83329,8 +83329,8 @@ function remove_duplicates(val_ids, ext_ids, _param) { case /* Sig_value */0 : const id = f._0; if (Stdlib__List.exists((function (param) { - return equal(id, param); - }), val_ids)) { + return equal(id, param); + }), val_ids)) { _param = param.tl; continue; } @@ -83347,8 +83347,8 @@ function remove_duplicates(val_ids, ext_ids, _param) { switch (match$1._2) { case /* Text_next */1 : if (Stdlib__List.exists((function (param) { - return equal(id$1, param); - }), ext_ids)) { + return equal(id$1, param); + }), ext_ids)) { _param = { hd: { TAG: /* Sig_typext */2, @@ -83382,8 +83382,8 @@ function remove_duplicates(val_ids, ext_ids, _param) { } if (exit === 2 && Stdlib__List.exists((function (param) { - return equal(id$1, param); - }), ext_ids)) { + return equal(id$1, param); + }), ext_ids)) { _param = param.tl; continue; } @@ -83497,11 +83497,11 @@ function transl_modtype$1(env, smty) { case /* Pmty_functor */2 : const param = lid._0; const arg = may_map((function (param) { - return transl_modtype$1(env, param); - }), lid._1); + return transl_modtype$1(env, param); + }), lid._1); const ty_arg = may_map((function (m) { - return m.mty_type; - }), arg); + return m.mty_type; + }), arg); const match = enter_module(true, param.txt, ty_arg !== undefined ? ty_arg : ({ TAG: /* Mty_signature */1, _0: /* [] */0 @@ -83526,15 +83526,15 @@ function transl_modtype$1(env, smty) { const body = transl_modtype$1(env, sbody); const init_sg = extract_sig(env, sbody.pmty_loc, body.mty_type); const match$1 = Stdlib__List.fold_left((function (param, sdecl) { - const match = merge_constraint(env, smty.pmty_loc, param[1], sdecl); - return [ - { - hd: match[0], - tl: param[0] - }, - match[1] - ]; - }), [ + const match = merge_constraint(env, smty.pmty_loc, param[1], sdecl); + return [ + { + hd: match[0], + tl: param[0] + }, + match[1] + ]; + }), [ /* [] */0, init_sg ], lid._1); @@ -83611,8 +83611,8 @@ function transl_signature(env, sg) { tl: match$1[0] }, Stdlib__List.exists((function (param) { - return equal(partial_arg, param); - }), get_values(rem)) ? rem : ({ + return equal(partial_arg, param); + }), get_values(rem)) ? rem : ({ hd: { TAG: /* Sig_value */0, _0: tdesc.val_id, @@ -83626,8 +83626,8 @@ function transl_signature(env, sg) { const sdecls = sdesc._0; const rec_flag = rec_flag_of_ptype_declarations(sdecls); Stdlib__List.iter((function (decl) { - check_name("type", type_names, decl.ptype_name); - }), sdecls); + check_name("type", type_names, decl.ptype_name); + }), sdecls); const match$2 = transl_type_decl(env, rec_flag, sdecls); const decls = match$2[0]; const match$3 = transl_sig(match$2[1], srem); @@ -83640,13 +83640,13 @@ function transl_signature(env, sg) { tl: match$3[0] }, map_rec_type_with_row_types(rec_flag, (function (rs, td) { - return { - TAG: /* Sig_type */1, - _0: td.typ_id, - _1: td.typ_type, - _2: rs - }; - }), decls, match$3[1]), + return { + TAG: /* Sig_type */1, + _0: td.typ_id, + _1: td.typ_type, + _2: rs + }; + }), decls, match$3[1]), match$3[2] ]; case /* Psig_typext */2 : @@ -83655,11 +83655,11 @@ function transl_signature(env, sg) { const match$5 = transl_sig(match$4[1], srem); const rem$1 = match$5[1]; const constructors = Stdlib__List.filter((function (ext) { - const partial_arg = ext.ext_id; - return !Stdlib__List.exists((function (param) { - return equal(partial_arg, param); - }), get_extension_constructors(rem$1)); - }), tyext.tyext_constructors); + const partial_arg = ext.ext_id; + return !Stdlib__List.exists((function (param) { + return equal(partial_arg, param); + }), get_extension_constructors(rem$1)); + }), tyext.tyext_constructors); return [ { hd: mksig$1({ @@ -83669,13 +83669,13 @@ function transl_signature(env, sg) { tl: match$5[0] }, map_ext((function (es, ext) { - return { - TAG: /* Sig_typext */2, - _0: ext.ext_id, - _1: ext.ext_type, - _2: es - }; - }), constructors, rem$1), + return { + TAG: /* Sig_typext */2, + _0: ext.ext_id, + _1: ext.ext_type, + _2: es + }; + }), constructors, rem$1), match$5[2] ]; case /* Psig_exception */3 : @@ -83685,8 +83685,8 @@ function transl_signature(env, sg) { const rem$2 = match$7[1]; const partial_arg$1 = ext.ext_id; const shadowed = Stdlib__List.exists((function (param) { - return equal(partial_arg$1, param); - }), get_extension_constructors(rem$2)); + return equal(partial_arg$1, param); + }), get_extension_constructors(rem$2)); return [ { hd: mksig$1({ @@ -83749,8 +83749,8 @@ function transl_signature(env, sg) { case /* Psig_recmodule */5 : const sdecls$1 = sdesc._0; Stdlib__List.iter((function (pmd) { - check_name("module", module_names, pmd.pmd_name); - }), sdecls$1); + check_name("module", module_names, pmd.pmd_name); + }), sdecls$1); const match$10 = transl_recmodule_modtypes(item.psig_loc, env, sdecls$1); const decls$1 = match$10[0]; const match$11 = transl_sig(match$10[1], srem); @@ -83763,21 +83763,21 @@ function transl_signature(env, sg) { tl: match$11[0] }, map_rec((function (rs, md) { - const d_md_type = md.md_type.mty_type; - const d_md_attributes = md.md_attributes; - const d_md_loc = md.md_loc; - const d = { - md_type: d_md_type, - md_attributes: d_md_attributes, - md_loc: d_md_loc - }; - return { - TAG: /* Sig_module */3, - _0: md.md_id, - _1: d, - _2: rs - }; - }), decls$1, match$11[1]), + const d_md_type = md.md_type.mty_type; + const d_md_attributes = md.md_attributes; + const d_md_loc = md.md_loc; + const d = { + md_type: d_md_type, + md_attributes: d_md_attributes, + md_loc: d_md_loc + }; + return { + TAG: /* Sig_module */3, + _0: md.md_id, + _1: d, + _2: rs + }; + }), decls$1, match$11[1]), match$11[2] ]; case /* Psig_modtype */6 : @@ -83819,8 +83819,8 @@ function transl_signature(env, sg) { const sg$1 = signature$2(identity, extract_sig(env, smty.pmty_loc, mty)); const 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); + return check_sig_item(type_names, module_names, modtype_names, partial_arg$2, param); + }), sg$1); const newenv = add_signature(sg$1, env); const incl_incl_loc = sincl.pincl_loc; const incl_incl_attributes = sincl.pincl_attributes; @@ -83846,8 +83846,8 @@ function transl_signature(env, sg) { case /* Psig_class */9 : const cl = sdesc._0; Stdlib__List.iter((function (param) { - check_name("type", type_names, param.pci_name); - }), cl); + check_name("type", type_names, param.pci_name); + }), cl); const match$17 = class_descriptions(env, cl); const classes = match$17[0]; const match$18 = transl_sig(match$17[1], srem); @@ -83856,46 +83856,46 @@ function transl_signature(env, sg) { hd: mksig$1({ TAG: /* Tsig_class */9, _0: Stdlib__List.map2((function (pcl, tcl) { - return tcl[11]; - }), cl, classes) + return tcl[11]; + }), cl, classes) }, env, loc), tl: match$18[0] }, Stdlib__List.flatten(map_rec((function (rs, param) { - return { + return { + hd: { + TAG: /* Sig_class */5, + _0: param[0], + _1: param[2], + _2: rs + }, + tl: { hd: { - TAG: /* Sig_class */5, - _0: param[0], - _1: param[2], + TAG: /* Sig_class_type */6, + _0: param[3], + _1: param[4], _2: rs }, tl: { hd: { - TAG: /* Sig_class_type */6, - _0: param[3], - _1: param[4], + TAG: /* Sig_type */1, + _0: param[5], + _1: param[6], _2: rs }, tl: { hd: { TAG: /* Sig_type */1, - _0: param[5], - _1: param[6], + _0: param[7], + _1: param[8], _2: rs }, - tl: { - hd: { - TAG: /* Sig_type */1, - _0: param[7], - _1: param[8], - _2: rs - }, - tl: /* [] */0 - } + tl: /* [] */0 } } - }; - }), classes, { + } + }; + }), classes, { hd: match$18[1], tl: /* [] */0 })), @@ -83904,8 +83904,8 @@ function transl_signature(env, sg) { case /* Psig_class_type */10 : const cl$1 = sdesc._0; Stdlib__List.iter((function (param) { - check_name("type", type_names, param.pci_name); - }), cl$1); + check_name("type", type_names, param.pci_name); + }), cl$1); const match$19 = class_type_declarations$2(env, cl$1); const classes$1 = match$19[0]; const match$20 = transl_sig(match$19[1], srem); @@ -83914,38 +83914,38 @@ function transl_signature(env, sg) { hd: mksig$1({ TAG: /* Tsig_class_type */10, _0: Stdlib__List.map2((function (pcl, tcl) { - return tcl[7]; - }), cl$1, classes$1) + return tcl[7]; + }), cl$1, classes$1) }, env, loc), tl: match$20[0] }, Stdlib__List.flatten(map_rec((function (rs, param) { - return { + return { + hd: { + TAG: /* Sig_class_type */6, + _0: param[0], + _1: param[2], + _2: rs + }, + tl: { hd: { - TAG: /* Sig_class_type */6, - _0: param[0], - _1: param[2], + TAG: /* Sig_type */1, + _0: param[3], + _1: param[4], _2: rs }, tl: { hd: { TAG: /* Sig_type */1, - _0: param[3], - _1: param[4], + _0: param[5], + _1: param[6], _2: rs }, - tl: { - hd: { - TAG: /* Sig_type */1, - _0: param[5], - _1: param[6], - _2: rs - }, - tl: /* [] */0 - } + tl: /* [] */0 } - }; - }), classes$1, { + } + }; + }), classes$1, { hd: match$20[1], tl: /* [] */0 })), @@ -84005,11 +84005,11 @@ function transl_modtype_decl(modtype_names, env, loc, param) { const pmtd_name = param.pmtd_name; check_name("module type", modtype_names, pmtd_name); const tmty = may_map((function (param) { - return transl_modtype$1(env, param); - }), param.pmtd_type); + return transl_modtype$1(env, param); + }), param.pmtd_type); const decl_mtd_type = may_map((function (t) { - return t.mty_type; - }), tmty); + return t.mty_type; + }), tmty); const decl = { mtd_type: decl_mtd_type, mtd_attributes: pmtd_attributes, @@ -84038,43 +84038,43 @@ function transl_modtype_decl(modtype_names, env, loc, param) { function transl_recmodule_modtypes(loc, env, sdecls) { const make_env = function (curr) { return Stdlib__List.fold_left((function (env, param) { - return add_module$1(true, param[0], param[2], env); - }), env, curr); + return add_module$1(true, param[0], param[2], env); + }), env, curr); }; const 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); + return add_module$1(true, param[0], param[2].mty_type, env); + }), env, curr); }; const transition = function (env_c, curr) { return Stdlib__List.map2((function (pmd, param) { - return [ - param[0], - param[1], - transl_modtype$1(env_c, pmd.pmd_type) - ]; - }), sdecls, curr); + return [ + param[0], + param[1], + transl_modtype$1(env_c, pmd.pmd_type) + ]; + }), sdecls, curr); }; const ids = Stdlib__List.map((function (x) { - return create(x.pmd_name.txt); - }), sdecls); + return create(x.pmd_name.txt); + }), sdecls); const approx_env = Stdlib__List.fold_left((function (env, id) { - const dummy = { - TAG: /* Mty_ident */0, - _0: { - TAG: /* Pident */0, - _0: create("#recmod#") - } - }; - return add_module$1(true, id, dummy, env); - }), env, ids); + const dummy = { + TAG: /* Mty_ident */0, + _0: { + TAG: /* Pident */0, + _0: create("#recmod#") + } + }; + return add_module$1(true, id, dummy, env); + }), env, ids); const init = Stdlib__List.map2((function (id, pmd) { - return [ - id, - pmd.pmd_name, - approx_modtype(approx_env, pmd.pmd_type) - ]; - }), ids, sdecls); + return [ + id, + pmd.pmd_name, + approx_modtype(approx_env, pmd.pmd_type) + ]; + }), ids, sdecls); const env0 = make_env(init); const dcl1 = transition(env0, init); const env1 = make_env2(dcl1); @@ -84083,14 +84083,14 @@ function transl_recmodule_modtypes(loc, env, sdecls) { const env2 = make_env2(dcl2); check_recmod_typedecls(env2, sdecls, dcl2); const dcl2$1 = Stdlib__List.map2((function (pmd, param) { - return { - md_id: param[0], - md_name: param[1], - md_type: param[2], - md_attributes: pmd.pmd_attributes, - md_loc: pmd.pmd_loc - }; - }), sdecls, dcl2); + return { + md_id: param[0], + md_name: param[1], + md_type: param[2], + md_attributes: pmd.pmd_attributes, + md_loc: pmd.pmd_loc + }; + }), sdecls, dcl2); return [ dcl2$1, env2 @@ -84276,15 +84276,15 @@ function anchor_submodule(name, anchor) { function enrich_type_decls(anchor, decls, oldenv, newenv) { if (anchor !== undefined) { return Stdlib__List.fold_left((function (e, info) { - const id = info.typ_id; - const info$p = enrich_typedecl(oldenv, { - TAG: /* Pdot */1, - _0: anchor, - _1: id.name, - _2: -1 - }, info.typ_type); - return add_type$1(true, id, info$p, e); - }), oldenv, decls); + const id = info.typ_id; + const info$p = enrich_typedecl(oldenv, { + TAG: /* Pdot */1, + _0: anchor, + _1: id.name, + _2: -1 + }, info.typ_type); + return add_type$1(true, id, info$p, e); + }), oldenv, decls); } else { return newenv; } @@ -84321,24 +84321,24 @@ function check_recmodule_inclusion(env, bindings) { const first_time = _first_time; if (n > 0) { const bindings1 = Stdlib__List.map((function (param) { - const id = param[0]; - return [ - id, - rename(id), - param[4] - ]; - }), bindings); + const id = param[0]; + return [ + id, + rename(id), + param[4] + ]; + }), bindings); const env$p = Stdlib__List.fold_left((function (env, param) { - const mty_actual = param[2]; - const 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); - }), env$1, bindings1); + const mty_actual = param[2]; + const 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); + }), env$1, bindings1); const s$p = Stdlib__List.fold_left((function (s, param) { - return add_module(param[0], { - TAG: /* Pident */0, - _0: param[1] - }, s); - }), identity, bindings1); + return add_module(param[0], { + TAG: /* Pident */0, + _0: param[1] + }, s); + }), identity, bindings1); _s = s$p; _env = env$p; _n = n - 1 | 0; @@ -84407,90 +84407,90 @@ function package_constraints(env, loc, mty, constrs) { } const sg = extract_sig(env, loc, mty); const sg$p = Stdlib__List.map((function (item) { - switch (item.TAG) { - case /* Sig_type */1 : - const td = item._1; - if (td.type_params) { - return item; - } - const id = item._0; - if (!Stdlib__List.mem_assoc({ - hd: id.name, - tl: /* [] */0 - }, constrs)) { - return item; - } - const ty = Stdlib__List.assoc({ + switch (item.TAG) { + case /* Sig_type */1 : + const td = item._1; + if (td.type_params) { + return item; + } + const id = item._0; + if (!Stdlib__List.mem_assoc({ hd: id.name, tl: /* [] */0 - }, constrs); - return { - TAG: /* Sig_type */1, - _0: id, - _1: { - type_params: td.type_params, - type_arity: td.type_arity, - type_kind: td.type_kind, - type_private: td.type_private, - type_manifest: ty, - type_variance: td.type_variance, - type_newtype_level: td.type_newtype_level, - type_loc: td.type_loc, - type_attributes: td.type_attributes - }, - _2: item._2 - }; - case /* Sig_module */3 : - const md = item._1; - const id$1 = item._0; - const aux = function (_param) { - while(true) { - const param = _param; - if (!param) { - return /* [] */0; - } - const match = param.hd; - const match$1 = match[0]; - if (match$1) { - const l = match$1.tl; - if (l) { - if (match$1.hd === id$1.name) { - return { - hd: [ - l, - match[1] - ], - tl: aux(param.tl) - }; - } - _param = param.tl; - continue; + }, constrs)) { + return item; + } + const ty = Stdlib__List.assoc({ + hd: id.name, + tl: /* [] */0 + }, constrs); + return { + TAG: /* Sig_type */1, + _0: id, + _1: { + type_params: td.type_params, + type_arity: td.type_arity, + type_kind: td.type_kind, + type_private: td.type_private, + type_manifest: ty, + type_variance: td.type_variance, + type_newtype_level: td.type_newtype_level, + type_loc: td.type_loc, + type_attributes: td.type_attributes + }, + _2: item._2 + }; + case /* Sig_module */3 : + const md = item._1; + const id$1 = item._0; + const aux = function (_param) { + while(true) { + const param = _param; + if (!param) { + return /* [] */0; + } + const match = param.hd; + const match$1 = match[0]; + if (match$1) { + const l = match$1.tl; + if (l) { + if (match$1.hd === id$1.name) { + return { + hd: [ + l, + match[1] + ], + tl: aux(param.tl) + }; } _param = param.tl; continue; } _param = param.tl; continue; - }; - }; - const md_md_type = package_constraints(env, loc, md.md_type, aux(constrs)); - const md_md_attributes = md.md_attributes; - const md_md_loc = md.md_loc; - const md$1 = { - md_type: md_md_type, - md_attributes: md_md_attributes, - md_loc: md_md_loc - }; - return { - TAG: /* Sig_module */3, - _0: id$1, - _1: md$1, - _2: item._2 + } + _param = param.tl; + continue; }; - default: - return item; - } - }), sg); + }; + const md_md_type = package_constraints(env, loc, md.md_type, aux(constrs)); + const md_md_attributes = md.md_attributes; + const md_md_loc = md.md_loc; + const md$1 = { + md_type: md_md_type, + md_attributes: md_md_attributes, + md_loc: md_md_loc + }; + return { + TAG: /* Sig_module */3, + _0: id$1, + _1: md$1, + _2: item._2 + }; + default: + return item; + } + }), sg); return { TAG: /* Mty_signature */1, _0: sg$p @@ -84546,8 +84546,8 @@ function modtype_of_package(env, loc, p, nl, tl) { function package_subtype$1(env, p1, nl1, tl1, p2, nl2, tl2) { const mkmty = function (p, nl, tl) { const ntl = Stdlib__List.filter((function (param) { - return Caml_obj.caml_equal(free_variables$1(undefined, param[1]), /* [] */0); - }), Stdlib__List.combine(nl, tl)); + return Caml_obj.caml_equal(free_variables$1(undefined, param[1]), /* [] */0); + }), Stdlib__List.combine(nl, tl)); const match = Stdlib__List.split(ntl); return modtype_of_package(env, none, p, match[0], match[1]); }; @@ -84710,11 +84710,11 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { case /* Pmod_functor */2 : const name = lid._0; const mty$2 = may_map((function (param) { - return transl_modtype$1(env, param); - }), lid._1); + return transl_modtype$1(env, param); + }), lid._1); const ty_arg = may_map((function (m) { - return m.mty_type; - }), mty$2); + return m.mty_type; + }), mty$2); const match$1 = ty_arg !== undefined ? [ enter_module(true, name.txt, ty_arg, env), true @@ -84918,8 +84918,8 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { case /* Tpackage */11 : const tl = match$4._2; if (Stdlib__List.exists((function (t) { - return Caml_obj.caml_notequal(free_variables$1(undefined, t), /* [] */0); - }), tl)) { + return Caml_obj.caml_notequal(free_variables$1(undefined, t), /* [] */0); + }), tl)) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, _1: smod.pmod_loc, @@ -85048,15 +85048,15 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { _1: defs }, Stdlib__List.map((function (id) { - return { - TAG: /* Sig_value */0, - _0: id, - _1: find_value({ - TAG: /* Pident */0, - _0: id - }, newenv) - }; - }), let_bound_idents(defs)), + return { + TAG: /* Sig_value */0, + _0: id, + _1: find_value({ + TAG: /* Pident */0, + _0: id + }, newenv) + }; + }), let_bound_idents(defs)), newenv ]; case /* Pstr_primitive */2 : @@ -85081,8 +85081,8 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { const sdecls = desc._0; const rec_flag$1 = rec_flag_of_ptype_declarations(sdecls); Stdlib__List.iter((function (decl) { - check_name("type", type_names, decl.ptype_name); - }), sdecls); + check_name("type", type_names, decl.ptype_name); + }), sdecls); const match$2 = transl_type_decl(env, rec_flag$1, sdecls); const decls = match$2[0]; return [ @@ -85091,13 +85091,13 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { _0: decls }, map_rec_type_with_row_types(rec_flag$1, (function (rs, info) { - return { - TAG: /* Sig_type */1, - _0: info.typ_id, - _1: info.typ_type, - _2: rs - }; - }), decls, /* [] */0), + return { + TAG: /* Sig_type */1, + _0: info.typ_id, + _1: info.typ_type, + _2: rs + }; + }), decls, /* [] */0), enrich_type_decls(anchor, decls, env, match$2[1]) ]; case /* Pstr_typext */4 : @@ -85109,13 +85109,13 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { _0: tyext }, map_ext((function (es, ext) { - return { - TAG: /* Sig_typext */2, - _0: ext.ext_id, - _1: ext.ext_type, - _2: es - }; - }), tyext.tyext_constructors, /* [] */0), + return { + TAG: /* Sig_typext */2, + _0: ext.ext_id, + _1: ext.ext_type, + _2: es + }; + }), tyext.tyext_constructors, /* [] */0), match$3[1] ]; case /* Pstr_exception */5 : @@ -85180,64 +85180,64 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { ]; case /* Pstr_recmodule */7 : const sbind = Stdlib__List.map((function (mb) { - const match = mb.pmb_expr.pmod_desc; - if (match.TAG === /* Pmod_constraint */4) { - return [ - mb.pmb_name, - match._1, - match._0, - mb.pmb_attributes, - mb.pmb_loc - ]; - } - throw new Caml_js_exceptions.MelangeError($$Error$10, { - MEL_EXN_ID: $$Error$10, - _1: mb.pmb_expr.pmod_loc, - _2: env, - _3: /* Recursive_module_require_explicit_type */3 - }); - }), desc._0); + const match = mb.pmb_expr.pmod_desc; + if (match.TAG === /* Pmod_constraint */4) { + return [ + mb.pmb_name, + match._1, + match._0, + mb.pmb_attributes, + mb.pmb_loc + ]; + } + throw new Caml_js_exceptions.MelangeError($$Error$10, { + MEL_EXN_ID: $$Error$10, + _1: mb.pmb_expr.pmod_loc, + _2: env, + _3: /* Recursive_module_require_explicit_type */3 + }); + }), desc._0); Stdlib__List.iter((function (param) { - check_name("module", module_names, param[0]); - }), sbind); + check_name("module", module_names, param[0]); + }), sbind); const match$7 = transl_recmodule_modtypes(loc, env, Stdlib__List.map((function (param) { - return { - pmd_name: param[0], - pmd_type: param[1], - pmd_attributes: param[3], - pmd_loc: param[4] - }; - }), sbind)); + return { + pmd_name: param[0], + pmd_type: param[1], + pmd_attributes: param[3], + pmd_loc: param[4] + }; + }), sbind)); const newenv$1 = match$7[1]; const decls$1 = match$7[0]; const bindings1 = Stdlib__List.map2((function (param, param$1) { - const id = param.md_id; - const modl = type_module$1(undefined, true, funct_body, { - TAG: /* Pident */0, - _0: id - }, newenv$1, param$1[2]); - const mty$p = enrich_module_type(anchor, id.name, modl.mod_type, newenv$1); - return [ - id, - param$1[0], - param.md_type, - modl, - mty$p, - param$1[3], - param$1[4] - ]; - }), decls$1, sbind); + const id = param.md_id; + const modl = type_module$1(undefined, true, funct_body, { + TAG: /* Pident */0, + _0: id + }, newenv$1, param$1[2]); + const mty$p = enrich_module_type(anchor, id.name, modl.mod_type, newenv$1); + return [ + id, + param$1[0], + param.md_type, + modl, + mty$p, + param$1[3], + param$1[4] + ]; + }), decls$1, sbind); const newenv$2 = Stdlib__List.fold_left((function (env, md) { - const mdecl_md_type = md.md_type.mty_type; - const mdecl_md_attributes = md.md_attributes; - const mdecl_md_loc = md.md_loc; - const 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); + const mdecl_md_type = md.md_type.mty_type; + const mdecl_md_attributes = md.md_attributes; + const mdecl_md_loc = md.md_loc; + const 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); const bindings2 = check_recmodule_inclusion(newenv$2, bindings1); return [ { @@ -85245,17 +85245,17 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { _0: bindings2 }, map_rec((function (rs, mb) { - return { - TAG: /* Sig_module */3, - _0: mb.mb_id, - _1: { - md_type: mb.mb_expr.mod_type, - md_attributes: mb.mb_attributes, - md_loc: mb.mb_loc - }, - _2: rs - }; - }), bindings2, /* [] */0), + return { + TAG: /* Sig_module */3, + _0: mb.mb_id, + _1: { + md_type: mb.mb_expr.mod_type, + md_attributes: mb.mb_attributes, + md_loc: mb.mb_loc + }, + _2: rs + }; + }), bindings2, /* [] */0), newenv$2 ]; case /* Pstr_modtype */8 : @@ -85284,104 +85284,104 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { case /* Pstr_class */10 : const cl = desc._0; Stdlib__List.iter((function (param) { - check_name("type", type_names, param.pci_name); - }), cl); + check_name("type", type_names, param.pci_name); + }), cl); const match$10 = class_declarations$2(env, cl); const classes = match$10[0]; return [ { TAG: /* Tstr_class */10, _0: Stdlib__List.map((function (param) { - const vf = param[2].cty_new === undefined ? /* Virtual */0 : /* Concrete */1; - return [ - param[11], - param[10], - vf - ]; - }), classes) + const vf = param[2].cty_new === undefined ? /* Virtual */0 : /* Concrete */1; + return [ + param[11], + param[10], + vf + ]; + }), classes) }, Stdlib__List.flatten(map_rec((function (rs, param) { - return { + return { + hd: { + TAG: /* Sig_class */5, + _0: param[0], + _1: param[2], + _2: rs + }, + tl: { hd: { - TAG: /* Sig_class */5, - _0: param[0], - _1: param[2], + TAG: /* Sig_class_type */6, + _0: param[3], + _1: param[4], _2: rs }, tl: { hd: { - TAG: /* Sig_class_type */6, - _0: param[3], - _1: param[4], + TAG: /* Sig_type */1, + _0: param[5], + _1: param[6], _2: rs }, tl: { hd: { TAG: /* Sig_type */1, - _0: param[5], - _1: param[6], + _0: param[7], + _1: param[8], _2: rs }, - tl: { - hd: { - TAG: /* Sig_type */1, - _0: param[7], - _1: param[8], - _2: rs - }, - tl: /* [] */0 - } + tl: /* [] */0 } } - }; - }), classes, /* [] */0)), + } + }; + }), classes, /* [] */0)), match$10[1] ]; case /* Pstr_class_type */11 : const cl$1 = desc._0; Stdlib__List.iter((function (param) { - check_name("type", type_names, param.pci_name); - }), cl$1); + check_name("type", type_names, param.pci_name); + }), cl$1); const match$11 = class_type_declarations$2(env, cl$1); const classes$1 = match$11[0]; return [ { TAG: /* Tstr_class_type */11, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - param[7] - ]; - }), classes$1) + return [ + param[0], + param[1], + param[7] + ]; + }), classes$1) }, Stdlib__List.flatten(map_rec((function (rs, param) { - return { + return { + hd: { + TAG: /* Sig_class_type */6, + _0: param[0], + _1: param[2], + _2: rs + }, + tl: { hd: { - TAG: /* Sig_class_type */6, - _0: param[0], - _1: param[2], + TAG: /* Sig_type */1, + _0: param[3], + _1: param[4], _2: rs }, tl: { hd: { TAG: /* Sig_type */1, - _0: param[3], - _1: param[4], + _0: param[5], + _1: param[6], _2: rs }, - tl: { - hd: { - TAG: /* Sig_type */1, - _0: param[5], - _1: param[6], - _2: rs - }, - tl: /* [] */0 - } + tl: /* [] */0 } - }; - }), classes$1, /* [] */0)), + } + }; + }), classes$1, /* [] */0)), match$11[1] ]; case /* Pstr_include */12 : @@ -85401,55 +85401,55 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { contents: 0 }; sg$1 = Stdlib__List.map((function (it) { - switch (it.TAG) { - case /* Sig_value */0 : - let tmp = it._1.val_kind; - if (!/* tag */(typeof tmp === "number" || typeof tmp === "string")) { - return it; - } - if (tmp !== /* Val_reg */0) { - return it; - } - pos.contents = pos.contents + 1 | 0; + switch (it.TAG) { + case /* Sig_value */0 : + let tmp = it._1.val_kind; + if (!/* tag */(typeof tmp === "number" || typeof tmp === "string")) { return it; - case /* Sig_module */3 : - const md = it._1; - const id = it._0; - const n = pos.contents; - pos.contents = pos.contents + 1 | 0; - return { - TAG: /* Sig_module */3, - _0: id, - _1: { - md_type: { - TAG: /* Mty_alias */3, - _0: { - TAG: /* Pdot */1, - _0: p, - _1: id.name, - _2: n - } - }, - md_attributes: md.md_attributes, - md_loc: md.md_loc - }, - _2: it._2 - }; - case /* Sig_typext */2 : - case /* Sig_class */5 : - pos.contents = pos.contents + 1 | 0; + } + if (tmp !== /* Val_reg */0) { return it; - default: + } + pos.contents = pos.contents + 1 | 0; return it; - } - }), sg); + case /* Sig_module */3 : + const md = it._1; + const id = it._0; + const n = pos.contents; + pos.contents = pos.contents + 1 | 0; + return { + TAG: /* Sig_module */3, + _0: id, + _1: { + md_type: { + TAG: /* Mty_alias */3, + _0: { + TAG: /* Pdot */1, + _0: p, + _1: id.name, + _2: n + } + }, + md_attributes: md.md_attributes, + md_loc: md.md_loc + }, + _2: it._2 + }; + case /* Sig_typext */2 : + case /* Sig_class */5 : + pos.contents = pos.contents + 1 | 0; + return it; + default: + return it; + } + }), sg); } } else { sg$1 = sg; } Stdlib__List.iter((function (param) { - return check_sig_item(type_names, module_names, modtype_names, loc, param); - }), sg$1); + return check_sig_item(type_names, module_names, modtype_names, loc, param); + }), sg$1); const new_env = add_signature(sg$1, env); const incl_incl_loc = sincl.pincl_loc; const incl_incl_attributes = sincl.pincl_attributes; @@ -85528,16 +85528,16 @@ function type_structure(toplevelOpt, funct_body, anchor, env, sstr, scope) { }; if (annotations.contents) { Stdlib__List.iter((function (param) { - let loc = param.pstr_loc; - if (annotations.contents) { - phrases.contents = { - hd: loc, - tl: phrases.contents - }; - return; - } - - }), sstr); + let loc = param.pstr_loc; + if (annotations.contents) { + phrases.contents = { + hd: loc, + tl: phrases.contents + }; + return; + } + + }), sstr); } const previous_saved_types = saved_types.contents; warning_enter_scope(undefined); @@ -85576,29 +85576,29 @@ function type_structure$1(param, param$1, param$2) { function normalize_signature(env) { return function (param) { return Stdlib__List.iter((function (param) { - switch (param.TAG) { - case /* Sig_value */0 : - return normalize_type(env, param._1.val_type); - case /* Sig_module */3 : - let _p = param._1.md_type; - while(true) { - const p = _p; - switch (p.TAG) { - case /* Mty_signature */1 : - return normalize_signature(env)(p._0); - case /* Mty_functor */2 : - _p = p._2; - continue; - case /* Mty_ident */0 : - case /* Mty_alias */3 : - return; - - } - }; - default: - return; - } - }), param); + switch (param.TAG) { + case /* Sig_value */0 : + return normalize_type(env, param._1.val_type); + case /* Sig_module */3 : + let _p = param._1.md_type; + while(true) { + const p = _p; + switch (p.TAG) { + case /* Mty_signature */1 : + return normalize_signature(env)(p._0); + case /* Mty_functor */2 : + _p = p._2; + continue; + case /* Mty_ident */0 : + case /* Mty_alias */3 : + return; + + } + }; + default: + return; + } + }), param); }; } @@ -85706,15 +85706,15 @@ function type_package$1(env, m, p, nl, tl) { } }; const tl$p = Stdlib__List.map((function (name) { - return newty2(100000000, { - TAG: /* Tconstr */3, - _0: mkpath(mp, name), - _1: /* [] */0, - _2: { - contents: /* Mnil */0 - } - }); - }), nl); + return newty2(100000000, { + TAG: /* Tconstr */3, + _0: mkpath(mp, name), + _1: /* [] */0, + _2: { + contents: /* Mnil */0 + } + }); + }), nl); end_def(undefined); if (Caml_obj.caml_equal(nl, /* [] */0)) { return [ @@ -85727,26 +85727,26 @@ function type_package$1(env, m, p, nl, tl) { } const 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){ - const 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, - _1: m.pmod_loc, - _2: env$1, - _3: { - TAG: /* Scoping_pack */14, - _0: n, - _1: ty - } - }); - } - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + try { + return unify$2(env$1, ty, newvar(undefined, undefined)); + } + catch (raw_exn){ + const 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, + _1: m.pmod_loc, + _2: env$1, + _3: { + TAG: /* Scoping_pack */14, + _0: n, + _1: ty + } + }); } - }), nl, tl$p); + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); + } + }), nl, tl$p); return [ wrap_constraint(env$1, modl, mty, /* Tmodtype_implicit */0), tl$p @@ -85760,8 +85760,8 @@ transl_modtype_longident.contents = transl_modtype_longident$1; transl_modtype.contents = transl_modtype$1; type_open.contents = (function (param, param$1, param$2, param$3) { - return type_open_(undefined, param, param$1, param$2, param$3); - }); + return type_open_(undefined, param, param$1, param$2, param$3); +}); type_package.contents = type_package$1; @@ -85780,19 +85780,19 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ const 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)({ - TAG: /* Format */0, + Curry._2(Stdlib__Format.fprintf(Stdlib__Format.std_formatter)({ + TAG: /* Format */0, + _0: { + TAG: /* Alpha */15, _0: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, - _1: /* End_of_format */0 - } - }, - _1: "%a@." - }), signature$3, simple_sg); - })); + TAG: /* Formatting_lit */17, + _0: /* Flush_newline */4, + _1: /* End_of_format */0 + } + }, + _1: "%a@." + }), signature$3, simple_sg); + })); return [ str, /* Tcoerce_none */0, @@ -85837,42 +85837,42 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ ]; } Stdlib__List.iter((function (param) { - const match = param.str_desc; - switch (match.TAG) { - case /* Tstr_value */1 : - return Stdlib__List.iter((function (param) { - const exp = param.vb_expr; - if (closed_schema(exp.exp_type)) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$10, { - MEL_EXN_ID: $$Error$10, - _1: exp.exp_loc, - _2: finalenv, - _3: { - TAG: /* Non_generalizable */7, - _0: exp.exp_type - } - }); - }), match._1); - case /* Tstr_module */6 : - const md = match._0.mb_expr; - if (closed_modtype(md.mod_type)) { - return; - } - throw new Caml_js_exceptions.MelangeError($$Error$10, { - MEL_EXN_ID: $$Error$10, - _1: md.mod_loc, - _2: finalenv, - _3: { - TAG: /* Non_generalizable_module */9, - _0: md.mod_type - } - }); - default: - return; - } - }), str.str_items); + const match = param.str_desc; + switch (match.TAG) { + case /* Tstr_value */1 : + return Stdlib__List.iter((function (param) { + const exp = param.vb_expr; + if (closed_schema(exp.exp_type)) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$10, { + MEL_EXN_ID: $$Error$10, + _1: exp.exp_loc, + _2: finalenv, + _3: { + TAG: /* Non_generalizable */7, + _0: exp.exp_type + } + }); + }), match._1); + case /* Tstr_module */6 : + const md = match._0.mb_expr; + if (closed_modtype(md.mod_type)) { + return; + } + throw new Caml_js_exceptions.MelangeError($$Error$10, { + MEL_EXN_ID: $$Error$10, + _1: md.mod_loc, + _2: finalenv, + _3: { + TAG: /* Non_generalizable_module */9, + _0: md.mod_type + } + }); + default: + return; + } + }), str.str_items); normalize_signature(finalenv)(simple_sg); const coercion$1 = compunit(initial_env, sourcefile, sg, "(inferred signature)", simple_sg); force_delayed_checks(undefined); @@ -85917,249 +85917,196 @@ register_error_of_exn(function (err) { } const env = err._2; return error_of_printer(err._1, (function (param, param$1) { - return wrap_printing_env(env, (function (param$2) { - if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { - switch (param$1) { - case /* Signature_expected */0 : - return Stdlib__Format.fprintf(param)({ + return wrap_printing_env(env, (function (param$2) { + if (/* tag */typeof param$1 === "number" || typeof param$1 === "string") { + switch (param$1) { + case /* Signature_expected */0 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This module type is not a signature", + _1: /* End_of_format */0 + }, + _1: "This module type is not a signature" + }); + case /* Not_allowed_in_functor_body */1 : + return Curry._1(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { - TAG: /* String_literal */11, - _0: "This module type is not a signature", - _1: /* End_of_format */0 - }, - _1: "This module type is not a signature" - }); - case /* Not_allowed_in_functor_body */1 : - return Curry._1(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "This expression creates fresh types.", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "This expression creates fresh types.", + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } - }, - _1: "@[This expression creates fresh types.@ %s@]" - }), "It is not allowed inside applicative functors."); - case /* With_need_typeconstr */2 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Only type constructors with identical parameters can be substituted.", - _1: /* End_of_format */0 - }, - _1: "Only type constructors with identical parameters can be substituted." - }); - case /* Recursive_module_require_explicit_type */3 : - return Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "Recursive modules require an explicit module type.", - _1: /* End_of_format */0 + } + } }, - _1: "Recursive modules require an explicit module type." - }); - case /* Apply_generative */4 : - return Stdlib__Format.fprintf(param)({ + _1: "@[This expression creates fresh types.@ %s@]" + }), "It is not allowed inside applicative functors."); + case /* With_need_typeconstr */2 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Only type constructors with identical parameters can be substituted.", + _1: /* End_of_format */0 + }, + _1: "Only type constructors with identical parameters can be substituted." + }); + case /* Recursive_module_require_explicit_type */3 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Recursive modules require an explicit module type.", + _1: /* End_of_format */0 + }, + _1: "Recursive modules require an explicit module type." + }); + case /* Apply_generative */4 : + return Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This is a generative functor. It can only be applied to ()", + _1: /* End_of_format */0 + }, + _1: "This is a generative functor. It can only be applied to ()" + }); + + } + } else { + switch (param$1.TAG) { + case /* Cannot_apply */0 : + return Curry._2(Stdlib__Format.fprintf(param)({ TAG: /* Format */0, _0: { - TAG: /* String_literal */11, - _0: "This is a generative functor. It can only be applied to ()", - _1: /* End_of_format */0 - }, - _1: "This is a generative functor. It can only be applied to ()" - }); - - } - } else { - switch (param$1.TAG) { - case /* Cannot_apply */0 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "This module is not a functor; it has type", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "This module is not a functor; it has type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } - }, - _1: "@[This module is not a functor; it has type@ %a@]" - }), modtype$1, param$1._0); - case /* Not_included */1 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[This module is not a functor; it has type@ %a@]" + }), modtype$1, param$1._0); + case /* Not_included */1 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { TAG: /* String_literal */11, - _0: "Signature mismatch:", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - }, - _1: "@[Signature mismatch:@ %a@]" - }), report_error$4, param$1._0); - case /* Cannot_eliminate_dependency */2 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, + _0: "", + _1: /* End_of_format */0 + }, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Signature mismatch:", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "This functor has type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "The parameter cannot be eliminated in the result type.", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: " Please bind the argument to a module identifier.", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } - }, - _1: "@[This functor has type@ %a@ The parameter cannot be eliminated in the result type.@ Please bind the argument to a module identifier.@]" - }), modtype$1, param$1._0); - case /* Structure_expected */3 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[Signature mismatch:@ %a@]" + }), report_error$4, param$1._0); + case /* Cannot_eliminate_dependency */2 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "This functor has type", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "This module is not a structure; it has type", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -86168,75 +86115,9 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } - } - }, - _1: "@[This module is not a structure; it has type@ %a" - }), modtype$1, param$1._0); - case /* With_no_component */4 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "The signature constrained by `with' has no component named ", - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - }, - _1: "@[The signature constrained by `with' has no component named %a@]" - }), longident, param$1._0); - case /* With_mismatch */5 : - return Curry._4(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: { TAG: /* String_literal */11, - _0: "", - _1: /* End_of_format */0 - }, - _1: "" - } - }, - _1: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, - _1: { - TAG: /* String_literal */11, - _0: "In this `with' constraint, the new definition of ", - _1: { - TAG: /* Alpha */15, - _0: { + _0: "The parameter cannot be eliminated in the result type.", + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -86246,120 +86127,116 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "does not match its original definition", + _0: " Please bind the argument to a module identifier.", _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "in the constrained signature:", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } - }, - _1: "@[@[In this `with' constraint, the new definition of %a@ does not match its original definition@ in the constrained signature:@]@ %a@]" - }), longident, param$1._0, report_error$4, param$1._1); - case /* Repeated_name */6 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[This functor has type@ %a@ The parameter cannot be eliminated in the result type.@ Please bind the argument to a module identifier.@]" + }), modtype$1, param$1._0); + case /* Structure_expected */3 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "This module is not a structure; it has type", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "Multiple definition of the ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* String_literal */11, - _0: " name ", - _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '.' */46, - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "Names must be unique in a given structure or signature.", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } - } - } - } - } - } + TAG: /* Alpha */15, + _0: /* End_of_format */0 } - }, - _1: "@[Multiple definition of the %s name %s.@ Names must be unique in a given structure or signature.@]" - }), param$1._0, param$1._1); - case /* Non_generalizable */7 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[This module is not a structure; it has type@ %a" + }), modtype$1, param$1._0); + case /* With_no_component */4 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The signature constrained by `with' has no component named ", + _1: { + TAG: /* Alpha */15, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } + }, + _1: "@[The signature constrained by `with' has no component named %a@]" + }), longident, param$1._0); + case /* With_mismatch */5 : + return Curry._4(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "", + _1: /* End_of_format */0 }, + _1: "" + } + }, + _1: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "In this `with' constraint, the new definition of ", _1: { - TAG: /* String_literal */11, - _0: "The type of this expression,", - _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -86368,25 +86245,38 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, + TAG: /* String_literal */11, + _0: "does not match its original definition", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "in the constrained signature:", _1: { - TAG: /* String_literal */11, - _0: "contains type variables that cannot be generalized", + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: { TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } } } } @@ -86394,139 +86284,150 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[The type of this expression,@ %a,@ contains type variables that cannot be generalized@]" - }), type_scheme, param$1._0); - case /* Non_generalizable_class */8 : - const id = param$1._0; - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[@[In this `with' constraint, the new definition of %a@ does not match its original definition@ in the constrained signature:@]@ %a@]" + }), longident, param$1._0, report_error$4, param$1._1); + case /* Repeated_name */6 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, - _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Multiple definition of the ", + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { TAG: /* String_literal */11, - _0: "The type of this class,", + _0: " name ", _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* Alpha */15, - _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, + TAG: /* Char_literal */12, + _0: /* '.' */46, + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* String_literal */11, + _0: "Names must be unique in a given structure or signature.", _1: { - TAG: /* String_literal */11, - _0: "contains type variables that cannot be generalized", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } } - }, - _1: "@[The type of this class,@ %a,@ contains type variables that cannot be generalized@]" - }), (function (param, param$1) { - return class_declaration$1(id, param, param$1); - }), param$1._1); - case /* Non_generalizable_module */9 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[Multiple definition of the %s name %s.@ Names must be unique in a given structure or signature.@]" + }), param$1._0, param$1._1); + case /* Non_generalizable */7 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type of this expression,", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "The type of this module,", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Alpha */15, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* ',' */44, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "contains type variables that cannot be generalized", _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "contains type variables that cannot be generalized", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } - }, - _1: "@[The type of this module,@ %a,@ contains type variables that cannot be generalized@]" - }), modtype$1, param$1._0); - case /* Implementation_is_required */10 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The type of this expression,@ %a,@ contains type variables that cannot be generalized@]" + }), type_scheme, param$1._0); + case /* Non_generalizable_class */8 : + const id = param$1._0; + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type of this class,", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "The interface ", - _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* Alpha */15, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, + _1: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -86536,61 +86437,63 @@ register_error_of_exn(function (err) { }, _1: { TAG: /* String_literal */11, - _0: "declares values, not just types.", + _0: "contains type variables that cannot be generalized", _1: { TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* String_literal */11, - _0: "An implementation must be provided.", - _1: { - TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: /* End_of_format */0 - } - } + _0: /* Close_box */0, + _1: /* End_of_format */0 } } } } } - }, - _1: "@[The interface %a@ declares values, not just types.@ An implementation must be provided.@]" - }), print_filename, param$1._0); - case /* Interface_not_compiled */11 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The type of this class,@ %a,@ contains type variables that cannot be generalized@]" + }), (function (param, param$1) { + return class_declaration$1(id, param, param$1); + }), param$1._1); + case /* Non_generalizable_module */9 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The type of this module,", + _1: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, _1: { - TAG: /* String_literal */11, - _0: "Could not find the .cmi file for interface", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, + TAG: /* Alpha */15, + _0: { + TAG: /* Char_literal */12, + _0: /* ',' */44, _1: { - TAG: /* Alpha */15, + TAG: /* Formatting_lit */17, _0: { - TAG: /* Char_literal */12, - _0: /* '.' */46, + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* String_literal */11, + _0: "contains type variables that cannot be generalized", _1: { TAG: /* Formatting_lit */17, _0: /* Close_box */0, @@ -86600,38 +86503,30 @@ register_error_of_exn(function (err) { } } } - }, - _1: "@[Could not find the .cmi file for interface@ %a.@]" - }), print_filename, param$1._0); - case /* Not_a_packed_module */12 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "This expression is not a packed module. It has type", - _1: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } - }, - _1: "This expression is not a packed module. It has type@ %a" - }), type_expr$1, param$1._0); - case /* Incomplete_packed_module */13 : - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + } + } + }, + _1: "@[The type of this module,@ %a,@ contains type variables that cannot be generalized@]" + }), modtype$1, param$1._0); + case /* Implementation_is_required */10 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, _0: { - TAG: /* String_literal */11, - _0: "The type of this packed module contains variables:", - _1: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "The interface ", + _1: { + TAG: /* Alpha */15, + _0: { TAG: /* Formatting_lit */17, _0: { TAG: /* Break */0, @@ -86640,24 +86535,8 @@ register_error_of_exn(function (err) { _2: 0 }, _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } - } - }, - _1: "The type of this packed module contains variables:@ %a" - }), type_expr$1, param$1._0); - case /* Scoping_pack */14 : - Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "The type ", - _1: { - TAG: /* Alpha */15, - _0: { TAG: /* String_literal */11, - _0: " in this module cannot be exported.", + _0: "declares values, not just types.", _1: { TAG: /* Formatting_lit */17, _0: { @@ -86666,18 +86545,119 @@ register_error_of_exn(function (err) { _1: 1, _2: 0 }, + _1: { + TAG: /* String_literal */11, + _0: "An implementation must be provided.", + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: /* End_of_format */0 + } + } + } + } + } + } + } + }, + _1: "@[The interface %a@ declares values, not just types.@ An implementation must be provided.@]" + }), print_filename, param$1._0); + case /* Interface_not_compiled */11 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, + _0: { + TAG: /* Open_box */1, + _0: { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String_literal */11, + _0: "Could not find the .cmi file for interface", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, + _0: { + TAG: /* Char_literal */12, + _0: /* '.' */46, + _1: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, _1: /* End_of_format */0 } } } + } + } + }, + _1: "@[Could not find the .cmi file for interface@ %a.@]" + }), print_filename, param$1._0); + case /* Not_a_packed_module */12 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "This expression is not a packed module. It has type", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "The type %a in this module cannot be exported.@ " - }), longident, param$1._0); - return Curry._2(Stdlib__Format.fprintf(param)({ - TAG: /* Format */0, + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + }, + _1: "This expression is not a packed module. It has type@ %a" + }), type_expr$1, param$1._0); + case /* Incomplete_packed_module */13 : + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The type of this packed module contains variables:", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + }, + _1: "The type of this packed module contains variables:@ %a" + }), type_expr$1, param$1._0); + case /* Scoping_pack */14 : + Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "The type ", + _1: { + TAG: /* Alpha */15, _0: { TAG: /* String_literal */11, - _0: "Its type contains local dependencies:", + _0: " in this module cannot be exported.", _1: { TAG: /* Formatting_lit */17, _0: { @@ -86686,19 +86666,39 @@ register_error_of_exn(function (err) { _1: 1, _2: 0 }, - _1: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - } + _1: /* End_of_format */0 } + } + } + }, + _1: "The type %a in this module cannot be exported.@ " + }), longident, param$1._0); + return Curry._2(Stdlib__Format.fprintf(param)({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "Its type contains local dependencies:", + _1: { + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "Its type contains local dependencies:@ %a" - }), type_expr$1, param$1._1); - - } - } - })); - }), err._3); + _1: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + } + } + }, + _1: "Its type contains local dependencies:@ %a" + }), type_expr$1, param$1._1); + + } + } + })); + }), err._3); }); const suites = { @@ -86715,12 +86715,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/of_string_test.js b/jscomp/test/dist/jscomp/test/of_string_test.js index 09ccfd912..7ec38cd7e 100644 --- a/jscomp/test/dist/jscomp/test/of_string_test.js +++ b/jscomp/test/dist/jscomp/test/of_string_test.js @@ -7,35 +7,35 @@ const Stdlib = require("melange/stdlib.js"); const suites_0 = [ "string_of_float_1", (function (param) { - return { - TAG: /* Eq */0, - _0: "10.", - _1: Stdlib.string_of_float(10) - }; - }) + return { + TAG: /* Eq */0, + _0: "10.", + _1: Stdlib.string_of_float(10) + }; + }) ]; const suites_1 = { hd: [ "string_of_int", (function (param) { - return { - TAG: /* Eq */0, - _0: "10", - _1: String(10) - }; - }) + return { + TAG: /* Eq */0, + _0: "10", + _1: String(10) + }; + }) ], tl: { hd: [ "valid_float_lexem", (function (param) { - return { - TAG: /* Eq */0, - _0: "10.", - _1: Stdlib.valid_float_lexem("10") - }; - }) + return { + TAG: /* Eq */0, + _0: "10.", + _1: Stdlib.valid_float_lexem("10") + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/offset.js b/jscomp/test/dist/jscomp/test/offset.js index a620c8ab7..0644050dc 100644 --- a/jscomp/test/dist/jscomp/test/offset.js +++ b/jscomp/test/dist/jscomp/test/offset.js @@ -399,8 +399,8 @@ function split_bis(x, param) { TAG: /* NotFound */0, _0: /* Empty */0, _1: (function (param) { - return /* Empty */0; - }) + return /* Empty */0; + }) }; } const r = param.r; @@ -420,8 +420,8 @@ function split_bis(x, param) { TAG: /* NotFound */0, _0: match._0, _1: (function (param) { - return join(Curry._1(rl, undefined), v, r); - }) + return join(Curry._1(rl, undefined), v, r); + }) }; } const match$1 = split_bis(x, r); @@ -1067,8 +1067,8 @@ function of_list(l) { function add_seq(i, m) { return Stdlib__Seq.fold_left((function (s, x) { - return add(x, s); - }), m, i); + return add(x, s); + }), m, i); } function of_seq(i) { @@ -1084,8 +1084,8 @@ function seq_of_enum_(c, param) { TAG: /* Cons */0, _0: c._0, _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1123,8 +1123,8 @@ function rev_seq_of_enum_(c, param) { TAG: /* Cons */0, _0: c._0, _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } 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 bebda81a9..ec295698f 100644 --- a/jscomp/test/dist/jscomp/test/oo_js_test_date.js +++ b/jscomp/test/dist/jscomp/test/oo_js_test_date.js @@ -17,32 +17,32 @@ const d3 = d2(2016)(1, undefined); const suites_0 = [ "getMonth", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: d.getMonth() - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: d.getMonth() + }; + }) ]; const suites_1 = { hd: [ "getYear", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 2016, - 2, - 1 - ], - _1: [ - d3.getFullYear(), - d3.getMonth(), - d3.getDate() - ] - }; - }) + return { + TAG: /* Eq */0, + _0: [ + 2016, + 2, + 1 + ], + _1: [ + d3.getFullYear(), + d3.getMonth(), + d3.getDate() + ] + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/opr_3576_test.js b/jscomp/test/dist/jscomp/test/opr_3576_test.js index 7b3c6380d..cf0bf45d6 100644 --- a/jscomp/test/dist/jscomp/test/opr_3576_test.js +++ b/jscomp/test/dist/jscomp/test/opr_3576_test.js @@ -47,44 +47,44 @@ function a_init($$class) { CamlinternalOO.set_methods($$class, [ m1, (function (self$1) { - if (!object_tables$1.key) { - const $$class = CamlinternalOO.create_table(["m3"]); - const m3 = CamlinternalOO.get_method_label($$class, "m3"); - CamlinternalOO.set_method($$class, m3, (function (self$2) { - return 3; - })); - const env_init = function (env) { - return CamlinternalOO.create_object_opt(undefined, $$class); - }; - CamlinternalOO.init_class($$class); - object_tables$1.key = env_init; - } - return Curry._1(object_tables$1.key, undefined); - }), + if (!object_tables$1.key) { + const $$class = CamlinternalOO.create_table(["m3"]); + const m3 = CamlinternalOO.get_method_label($$class, "m3"); + CamlinternalOO.set_method($$class, m3, (function (self$2) { + return 3; + })); + const env_init = function (env) { + return CamlinternalOO.create_object_opt(undefined, $$class); + }; + CamlinternalOO.init_class($$class); + object_tables$1.key = env_init; + } + return Curry._1(object_tables$1.key, undefined); + }), m2, (function (self$1) { - if (!object_tables.key) { - const $$class = CamlinternalOO.create_table(["m4"]); - const env = CamlinternalOO.new_variable($$class, ""); - const m4 = CamlinternalOO.get_method_label($$class, "m4"); - CamlinternalOO.set_method($$class, m4, (function (self$3) { - const env$1 = self$3[env]; - const tmp = env$1[1]; - return Curry._1(tmp[0][env$1[0]], tmp); - })); - const env_init = function (env$1) { - const self = CamlinternalOO.create_object_opt(undefined, $$class); - self[env] = env$1; - return self; - }; - CamlinternalOO.init_class($$class); - object_tables.key = env_init; - } - return Curry._1(object_tables.key, [ - m1, - self$1 - ]); - }) + if (!object_tables.key) { + const $$class = CamlinternalOO.create_table(["m4"]); + const env = CamlinternalOO.new_variable($$class, ""); + const m4 = CamlinternalOO.get_method_label($$class, "m4"); + CamlinternalOO.set_method($$class, m4, (function (self$3) { + const env$1 = self$3[env]; + const tmp = env$1[1]; + return Curry._1(tmp[0][env$1[0]], tmp); + })); + const env_init = function (env$1) { + const self = CamlinternalOO.create_object_opt(undefined, $$class); + self[env] = env$1; + return self; + }; + CamlinternalOO.init_class($$class); + object_tables.key = env_init; + } + return Curry._1(object_tables.key, [ + m1, + self$1 + ]); + }) ]); return function (env, self) { return CamlinternalOO.create_object_opt(self, $$class); @@ -103,8 +103,8 @@ function b_init($$class) { const inh = CamlinternalOO.inherits($$class, 0, 0, shared, a, true); const obj_init = inh[0]; CamlinternalOO.set_method($$class, a_text, (function (self$4, param) { - - })); + + })); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._1(obj_init, self$1); diff --git a/jscomp/test/dist/jscomp/test/opr_4560_test.js b/jscomp/test/dist/jscomp/test/opr_4560_test.js index 6e050b457..da9f10cfa 100644 --- a/jscomp/test/dist/jscomp/test/opr_4560_test.js +++ b/jscomp/test/dist/jscomp/test/opr_4560_test.js @@ -37,62 +37,62 @@ const object_tables$1 = { function c1_init($$class) { const b = CamlinternalOO.get_method_label($$class, "b"); CamlinternalOO.set_method($$class, b, (function (self$1) { - if (!object_tables.key) { - const $$class = CamlinternalOO.create_table([ - "c", - "h" - ]); - const env = CamlinternalOO.new_variable($$class, ""); - const ids = CamlinternalOO.get_method_labels($$class, [ - "h", - "c" - ]); - const h = ids[0]; - const c = ids[1]; - CamlinternalOO.set_methods($$class, [ - c, - (function (self$2) { - const env$1 = self$2[env]; - if (!object_tables$1.key) { - const $$class = CamlinternalOO.create_table(["d"]); - const env$2 = CamlinternalOO.new_variable($$class, ""); - const d = CamlinternalOO.get_method_label($$class, "d"); - CamlinternalOO.set_method($$class, d, (function (self$3) { - const env$3 = self$3[env$2]; - const tmp = env$3[1]; - return Curry._1(tmp[0][env$3[0]], tmp); - })); - const env_init = function (env$3) { - const self = CamlinternalOO.create_object_opt(undefined, $$class); - self[env$2] = env$3; - return self; - }; - CamlinternalOO.init_class($$class); - object_tables$1.key = env_init; - } - return Curry._1(object_tables$1.key, [ - env$1[0], - env$1[1] - ]); - }), - h, - (function (self$2) { - return 33; - }) - ]); - const env_init = function (env$1) { - const self = CamlinternalOO.create_object_opt(undefined, $$class); - self[env] = env$1; - return self; - }; - CamlinternalOO.init_class($$class); - object_tables.key = env_init; - } - return Curry._1(object_tables.key, [ - b, - self$1 + if (!object_tables.key) { + const $$class = CamlinternalOO.create_table([ + "c", + "h" ]); - })); + const env = CamlinternalOO.new_variable($$class, ""); + const ids = CamlinternalOO.get_method_labels($$class, [ + "h", + "c" + ]); + const h = ids[0]; + const c = ids[1]; + CamlinternalOO.set_methods($$class, [ + c, + (function (self$2) { + const env$1 = self$2[env]; + if (!object_tables$1.key) { + const $$class = CamlinternalOO.create_table(["d"]); + const env$2 = CamlinternalOO.new_variable($$class, ""); + const d = CamlinternalOO.get_method_label($$class, "d"); + CamlinternalOO.set_method($$class, d, (function (self$3) { + const env$3 = self$3[env$2]; + const tmp = env$3[1]; + return Curry._1(tmp[0][env$3[0]], tmp); + })); + const env_init = function (env$3) { + const self = CamlinternalOO.create_object_opt(undefined, $$class); + self[env$2] = env$3; + return self; + }; + CamlinternalOO.init_class($$class); + object_tables$1.key = env_init; + } + return Curry._1(object_tables$1.key, [ + env$1[0], + env$1[1] + ]); + }), + h, + (function (self$2) { + return 33; + }) + ]); + const env_init = function (env$1) { + const self = CamlinternalOO.create_object_opt(undefined, $$class); + self[env] = env$1; + return self; + }; + CamlinternalOO.init_class($$class); + object_tables.key = env_init; + } + return Curry._1(object_tables.key, [ + b, + self$1 + ]); + })); return function (env, self) { return CamlinternalOO.create_object_opt(self, $$class); }; @@ -109,8 +109,8 @@ function c2_init($$class) { const inh = CamlinternalOO.inherits($$class, 0, 0, shared, c1, true); const obj_init = inh[0]; CamlinternalOO.set_method($$class, a, (function (self$4) { - - })); + + })); return function (env, self) { const self$1 = CamlinternalOO.create_object_opt(self, $$class); Curry._1(obj_init, self$1); diff --git a/jscomp/test/dist/jscomp/test/option_repr_test.js b/jscomp/test/dist/jscomp/test/option_repr_test.js index 170d1dd84..de4cc40c6 100644 --- a/jscomp/test/dist/jscomp/test/option_repr_test.js +++ b/jscomp/test/dist/jscomp/test/option_repr_test.js @@ -105,12 +105,12 @@ function f12(x) { } const length_8_id = Belt__Belt_List.makeBy(8, (function (x) { - return x; - })); + return x; + })); const length_10_id = Belt__Belt_List.makeBy(10, (function (x) { - return x; - })); + return x; + })); function f13$1(param) { return Caml_obj.caml_equal(Belt__Belt_List.take(length_10_id, 8), { @@ -171,8 +171,8 @@ function neqx(a, b) { function all_true(xs) { return Belt__Belt_List.every(xs, (function (x) { - return x; - })); + return x; + })); } const xs_0 = gtx(Caml_option.some(null), Caml_option.some(undefined)); @@ -183,8 +183,8 @@ const xs = { }; b("File \"jscomp/test/option_repr_test.ml\", line 121, characters 5-12", Belt__Belt_List.every(xs, (function (x) { - return x; - }))); + return x; + }))); const xs_0$1 = ltx(Caml_option.some(undefined), 3); @@ -206,8 +206,8 @@ const xs_1 = { hd: ltx(undefined, null), tl: { hd: ltx(undefined, (function (x) { - return x; - })), + return x; + })), tl: { hd: ltx(null, 3), tl: /* [] */0 @@ -228,8 +228,8 @@ const xs$1 = { }; b("File \"jscomp/test/option_repr_test.ml\", line 127, characters 5-12", Belt__Belt_List.every(xs$1, (function (x) { - return x; - }))); + return x; + }))); const xs_0$2 = eqx(undefined, undefined); @@ -253,8 +253,8 @@ const xs$2 = { }; b("File \"jscomp/test/option_repr_test.ml\", line 143, characters 5-12", Belt__Belt_List.every(xs$2, (function (x) { - return x; - }))); + return x; + }))); function v(x) { return x; diff --git a/jscomp/test/dist/jscomp/test/optional_ffi_test.js b/jscomp/test/dist/jscomp/test/optional_ffi_test.js index a1b415d40..a0a20f571 100644 --- a/jscomp/test/dist/jscomp/test/optional_ffi_test.js +++ b/jscomp/test/dist/jscomp/test/optional_ffi_test.js @@ -20,12 +20,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/parser_api.js b/jscomp/test/dist/jscomp/test/parser_api.js index 757d17db9..c6d0f37cd 100644 --- a/jscomp/test/dist/jscomp/test/parser_api.js +++ b/jscomp/test/dist/jscomp/test/parser_api.js @@ -1041,8 +1041,8 @@ function expand_directory(alt, s) { function create_hashtable(size, init) { const tbl = Stdlib__Hashtbl.create(undefined, size); Stdlib__List.iter((function (param) { - Stdlib__Hashtbl.add(tbl, param[0], param[1]); - }), init); + Stdlib__Hashtbl.add(tbl, param[0], param[1]); + }), init); return tbl; } @@ -1346,8 +1346,8 @@ function unsafe_blit_to_bytes(src, srcoff, dst, dstoff, len) { function input_bytes(ic, len) { const tbl = create(len); Stdlib__Array.iter((function (str) { - Stdlib.really_input(ic, str, 0, str.length); - }), tbl); + Stdlib.really_input(ic, str, 0, str.length); + }), tbl); return tbl; } @@ -2718,34 +2718,34 @@ function check_fatal(param) { function help_warnings(param) { Stdlib__List.iter((function (param) { - Curry._2(Stdlib__Printf.printf({ - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, + Curry._2(Stdlib__Printf.printf({ + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: { + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 3 + }, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 3 - }, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Char_literal */12, - _0: /* '\n' */10, - _1: /* End_of_format */0 - } + TAG: /* Char_literal */12, + _0: /* '\n' */10, + _1: /* End_of_format */0 } } - }, - _1: "%3i %s\n" - }), param[0], param[1]); - }), { + } + }, + _1: "%3i %s\n" + }), param[0], param[1]); + }), { hd: [ 1, "Suspicious-looking start-of-comment mark." @@ -3082,8 +3082,8 @@ function help_warnings(param) { }, _1: " %c warnings %s.\n" }), Stdlib__Char.uppercase_ascii(c), Stdlib__String.concat(", ", Stdlib__List.map((function (prim) { - return String(prim); - }), l))); + return String(prim); + }), l))); } else { Curry._2(Stdlib__Printf.printf({ TAG: /* Format */0, @@ -3276,13 +3276,13 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { bol = false; } if (Stdlib__List.exists((function (loc) { - return pos === loc.loc_start.pos_cnum; - }), locs)) { + return pos === loc.loc_start.pos_cnum; + }), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(true); } if (Stdlib__List.exists((function (loc) { - return pos === loc.loc_end.pos_cnum; - }), locs)) { + return pos === loc.loc_end.pos_cnum; + }), locs)) { Caml_external_polyfill.resolve("caml_terminfo_standout")(false); } const c = Caml_bytes.get(lb.lex_buffer, pos + pos0 | 0); @@ -3834,9 +3834,9 @@ function pp_ksprintf(before, k, fmt) { Curry._1(before, ppf); } return Stdlib__Format.kfprintf((function (param) { - Stdlib__Format.pp_print_flush(ppf, undefined); - return Curry._1(k, Stdlib__Buffer.contents(buf)); - }), ppf, fmt); + Stdlib__Format.pp_print_flush(ppf, undefined); + return Curry._1(k, Stdlib__Buffer.contents(buf)); + }), ppf, fmt); } function print_phanton_error_prefix(ppf) { @@ -3848,13 +3848,13 @@ function errorf(locOpt, subOpt, if_highlightOpt, fmt) { const sub = subOpt !== undefined ? subOpt : /* [] */0; const if_highlight = if_highlightOpt !== undefined ? if_highlightOpt : ""; return pp_ksprintf(print_phanton_error_prefix, (function (msg) { - return { - loc: loc, - msg: msg, - sub: sub, - if_highlight: if_highlight - }; - }), fmt); + return { + loc: loc, + msg: msg, + sub: sub, + if_highlight: if_highlight + }; + }), fmt); } function error(locOpt, subOpt, if_highlightOpt, msg) { @@ -4101,16 +4101,16 @@ function raise_errorf(locOpt, subOpt, if_highlightOpt) { const partial_arg = print_phanton_error_prefix; return function (param) { return pp_ksprintf(partial_arg, (function (msg) { - throw new Caml_js_exceptions.MelangeError($$Error, { - MEL_EXN_ID: $$Error, - _1: { - loc: loc, - msg: msg, - sub: sub, - if_highlight: if_highlight - } - }); - }), param); + throw new Caml_js_exceptions.MelangeError($$Error, { + MEL_EXN_ID: $$Error, + _1: { + loc: loc, + msg: msg, + sub: sub, + if_highlight: if_highlight + } + }); + }), param); }; } @@ -4223,12 +4223,12 @@ function parse(s) { const match = split_at_dots(s, 0); if (match) { return Stdlib__List.fold_left((function (p, s) { - return { - TAG: /* Ldot */1, - _0: p, - _1: s - }; - }), { + return { + TAG: /* Ldot */1, + _0: p, + _1: s + }; + }), { TAG: /* Lident */0, _0: match.hd }, match.tl); @@ -4258,31 +4258,31 @@ function warn_bad_docstrings(param) { _0: true })) { return Stdlib__List.iter((function (ds) { - const match = ds.ds_attached; - switch (match) { - case /* Unattached */0 : - return prerr_warning(ds.ds_loc, { - TAG: /* Bad_docstring */33, - _0: true - }); - case /* Info */1 : - return; - case /* Docs */2 : - const match$1 = ds.ds_associated; - switch (match$1) { - case /* Zero */0 : - case /* One */1 : - return; - case /* Many */2 : - return prerr_warning(ds.ds_loc, { - TAG: /* Bad_docstring */33, - _0: false - }); - - } - - } - }), Stdlib__List.rev(docstrings.contents)); + const match = ds.ds_attached; + switch (match) { + case /* Unattached */0 : + return prerr_warning(ds.ds_loc, { + TAG: /* Bad_docstring */33, + _0: true + }); + case /* Info */1 : + return; + case /* Docs */2 : + const match$1 = ds.ds_associated; + switch (match$1) { + case /* Zero */0 : + case /* One */1 : + return; + case /* Many */2 : + return prerr_warning(ds.ds_loc, { + TAG: /* Bad_docstring */33, + _0: false + }); + + } + + } + }), Stdlib__List.rev(docstrings.contents)); } } @@ -4485,18 +4485,18 @@ function get_docstrings(dsl) { function associate_docstrings(dsl) { Stdlib__List.iter((function (ds) { - const match = ds.ds_associated; - switch (match) { - case /* Zero */0 : - ds.ds_associated = /* One */1; - return; - case /* One */1 : - case /* Many */2 : - ds.ds_associated = /* Many */2; - return; - - } - }), dsl); + const match = ds.ds_associated; + switch (match) { + case /* Zero */0 : + ds.ds_associated = /* One */1; + return; + case /* One */1 : + case /* Many */2 : + ds.ds_associated = /* Many */2; + return; + + } + }), dsl); } const pre_table = Stdlib__Hashtbl.create(undefined, 50); @@ -4666,11 +4666,11 @@ function symbol_docs_lazy(param) { return { LAZY_DONE: false, VAL: (function () { - return { - docs_pre: get_pre_docs(p1), - docs_post: get_post_docs(p2) - }; - }) + return { + docs_pre: get_pre_docs(p1), + docs_post: get_post_docs(p2) + }; + }) }; } @@ -4687,11 +4687,11 @@ function rhs_docs_lazy(pos1, pos2) { return { LAZY_DONE: false, VAL: (function () { - return { - docs_pre: get_pre_docs(p1), - docs_post: get_post_docs(p2) - }; - }) + return { + docs_pre: get_pre_docs(p1), + docs_post: get_post_docs(p2) + }; + }) }; } @@ -4722,8 +4722,8 @@ function symbol_text_lazy(param) { return { LAZY_DONE: false, VAL: (function () { - return get_text(pos); - }) + return get_text(pos); + }) }; } @@ -4736,8 +4736,8 @@ function rhs_text_lazy(pos) { return { LAZY_DONE: false, VAL: (function () { - return get_text(pos$1); - }) + return get_text(pos$1); + }) }; } @@ -5702,13 +5702,13 @@ function attribute(loc, a) { function text(txt) { return Stdlib__List.map((function (ds) { - const a = text_attr(ds); - const loc = ds.ds_loc; - return mk$5(loc, { - TAG: /* Psig_attribute */11, - _0: a - }); - }), txt); + const a = text_attr(ds); + const loc = ds.ds_loc; + return mk$5(loc, { + TAG: /* Psig_attribute */11, + _0: a + }); + }), txt); } const Sig = { @@ -5849,13 +5849,13 @@ function attribute$1(loc, a) { function text$1(txt) { return Stdlib__List.map((function (ds) { - const a = text_attr(ds); - const loc = ds.ds_loc; - return mk$6(loc, { - TAG: /* Pstr_attribute */13, - _0: a - }); - }), txt); + const a = text_attr(ds); + const loc = ds.ds_loc; + return mk$6(loc, { + TAG: /* Pstr_attribute */13, + _0: a + }); + }), txt); } const Str = { @@ -6097,8 +6097,8 @@ function attribute$2(loc, a) { function text$2(txt) { return Stdlib__List.map((function (ds) { - return attribute$2(ds.ds_loc, text_attr(ds)); - }), txt); + return attribute$2(ds.ds_loc, text_attr(ds)); + }), txt); } function attr$7(d, a) { @@ -6187,8 +6187,8 @@ function attribute$3(loc, a) { function text$3(txt) { return Stdlib__List.map((function (ds) { - return attribute$3(ds.ds_loc, text_attr(ds)); - }), txt); + return attribute$3(ds.ds_loc, text_attr(ds)); + }), txt); } function virtual_(ct) { @@ -7313,12 +7313,12 @@ function varify_constructors(var_names, t) { desc = { TAG: /* Ptyp_object */4, _0: Stdlib__List.map((function (param) { - return [ - param[0], - param[1], - loop(param[2]) - ]; - }), x._0), + return [ + param[0], + param[1], + loop(param[2]) + ]; + }), x._0), _1: x._1 }; break; @@ -7350,8 +7350,8 @@ function varify_constructors(var_names, t) { const string_lst = x._0; const partial_arg = t.ptyp_loc; Stdlib__List.iter((function (param) { - return check_variable(var_names, partial_arg, param); - }), string_lst); + return check_variable(var_names, partial_arg, param); + }), string_lst); desc = { TAG: /* Ptyp_poly */8, _0: string_lst, @@ -7365,11 +7365,11 @@ function varify_constructors(var_names, t) { _0: [ match[0], Stdlib__List.map((function (param) { - return [ - param[0], - loop(param[1]) - ]; - }), match[1]) + return [ + param[0], + loop(param[1]) + ]; + }), match[1]) ] }; break; @@ -7418,12 +7418,12 @@ function wrap_type_annotation(newtypes, core_type, body) { _1: core_type }); const exp$1 = Stdlib__List.fold_right((function (newtype, exp) { - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: newtype, - _1: exp - }); - }), newtypes, exp); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: newtype, + _1: exp + }); + }), newtypes, exp); return [ exp$1, ghtyp({ @@ -7650,6073 +7650,6073 @@ const yytransl_block = [ const yyact = [ (function (param) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "parser" - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return extra_text(text$1, 1, _1); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return extra_text(text, 1, _1); - }), + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "parser" + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_def */0, - _0: extra_text(text$1, 1, _1) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return extra_text(text$1, 1, _1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return extra_text(text, 1, _1); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_def */0, + _0: extra_text(text$1, 1, _1) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { + MEL_EXN_ID: Stdlib.End_of_file + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let pos = 1; - return extra_text((function (txt) { - return { - hd: { - TAG: /* Ptop_def */0, - _0: text$1(txt) - }, - tl: /* [] */0 - }; - }), pos, _1); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text_def(1), { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let pos = 1; + return extra_text((function (txt) { + return { hd: { TAG: /* Ptop_def */0, - _0: { - hd: mkstrexp(_1, _2), - tl: /* [] */0 - } + _0: text$1(txt) }, - tl: _3 - }); - }), + tl: /* [] */0 + }; + }), pos, _1); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib.$at(text_def(1), { + hd: { + TAG: /* Ptop_def */0, + _0: { + hd: mkstrexp(_1, _2), + tl: /* [] */0 + } + }, + tl: _3 + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), - (function (__caml_parser_env) { - return text_def(1); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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: { - TAG: /* Ptop_def */0, - _0: { - hd: mkstrexp(_2, _3), - tl: /* [] */0 - } - }, - tl: _4 - })); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, - _0: { - hd: _2, - tl: /* [] */0 - } - }, - tl: _3 - })); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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, - tl: _3 - })); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text_def(1), { - hd: { - TAG: /* Ptop_def */0, - _0: { - hd: _1, - tl: /* [] */0 - } - }, - tl: _2 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_rhs_docs(1, 1); - return Stdlib.$at(text_def(1), { - hd: _1, - tl: _2 - }); - }), + return text_def(1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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: { + TAG: /* Ptop_def */0, + _0: { + hd: mkstrexp(_2, _3), + tl: /* [] */0 + } + }, + tl: _4 + })); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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, + _0: { + hd: _2, + tl: /* [] */0 + } + }, + tl: _3 + })); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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, + tl: _3 + })); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib.$at(text_def(1), { + hd: { + TAG: /* Ptop_def */0, + _0: { + hd: _1, + tl: /* [] */0 + } + }, + tl: _2 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_rhs_docs(1, 1); + return Stdlib.$at(text_def(1), { + hd: _1, + tl: _2 + }); + }), (function (__caml_parser_env) { - return [ - { - txt: "*", - loc: rhs_loc(2) - }, - undefined - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - txt: _2, - loc: rhs_loc(2) - }, - _4 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return "_"; - }), + return [ + { + txt: "*", + loc: rhs_loc(2) + }, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + txt: _2, + loc: rhs_loc(2) + }, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + return "_"; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_structure */1, - _0: extra_text(text$1, 2, _2) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("struct", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib__List.fold_left((function (acc, param) { - return mkmod({ - TAG: /* Pmod_functor */2, - _0: param[0], - _1: param[1], - _2: acc - }); - }), _4, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_apply */3, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return mkmod({ - TAG: /* Pmod_apply */3, - _0: _1, - _1: mkmod({ - TAG: /* Pmod_structure */1, - _0: /* [] */0 - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 2, ")", 4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_constraint */4, - _0: _2, - _1: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_structure */1, + _0: extra_text(text$1, 2, _2) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("struct", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib__List.fold_left((function (acc, param) { + return mkmod({ + TAG: /* Pmod_functor */2, + _0: param[0], + _1: param[1], + _2: acc + }); + }), _4, _2); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_apply */3, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return mkmod({ + TAG: /* Pmod_apply */3, + _0: _1, + _1: mkmod({ + TAG: /* Pmod_structure */1, + _0: /* [] */0 + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 2, ")", 4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_constraint */4, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: _3 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_constraint */19, - _0: _3, - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }) - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_coerce */20, - _0: _3, - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }), - _2: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _7 - }) - }) - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmod({ - TAG: /* Pmod_unpack */5, - _0: ghexp({ - TAG: /* Pexp_coerce */20, - _0: _3, - _1: undefined, - _2: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }) - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 4); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: _3 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_constraint */19, + _0: _3, + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }) + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_coerce */20, + _0: _3, + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }), + _2: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _7 + }) + }) + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmod({ + TAG: /* Pmod_unpack */5, + _0: ghexp({ + TAG: /* Pexp_coerce */20, + _0: _3, + _1: undefined, + _2: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$4(_1, _2); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_extension */6, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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), - tl: _3 - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 4); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$4(_1, _2); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text$1(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_extension */6, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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), + tl: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const bindings = lbs.lbs_bindings; - let str; - let exit = 0; - if (bindings) { - const lb = bindings.hd; - let tmp = lb.lb_pattern.ppat_desc; - if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && !bindings.tl) { - const exp = wrap_exp_attrs(lb.lb_expression, [ - undefined, - lbs.lbs_attributes - ]); - str = mkstr({ - TAG: /* Pstr_eval */0, - _0: exp, - _1: lb.lb_attributes - }); - } else { - exit = 1; - } - } else { - exit = 1; - } - if (exit === 1) { - if (Caml_obj.caml_notequal(lbs.lbs_attributes, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Not_expecting */2, - _0: lbs.lbs_loc, - _1: "attributes" - } - }); - } - const 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); + return /* [] */0; + }), + (function (__caml_parser_env) { + const _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) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + let lbs = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const bindings = lbs.lbs_bindings; + let str; + let exit = 0; + if (bindings) { + const lb = bindings.hd; + let tmp = lb.lb_pattern.ppat_desc; + if (/* tag */(typeof tmp === "number" || typeof tmp === "string") && !bindings.tl) { + const exp = wrap_exp_attrs(lb.lb_expression, [ + undefined, + lbs.lbs_attributes + ]); str = mkstr({ - TAG: /* Pstr_value */1, - _0: lbs.lbs_rec, - _1: Stdlib__List.rev(bindings$1) + TAG: /* Pstr_eval */0, + _0: exp, + _1: lb.lb_attributes }); + } else { + exit = 1; } - const id = lbs.lbs_extension; - if (id !== undefined) { - let d = { - TAG: /* Pstr_extension */14, - _0: [ - id, - { - TAG: /* PStr */0, - _0: { - hd: str, - tl: /* [] */0 + } else { + exit = 1; + } + if (exit === 1) { + if (Caml_obj.caml_notequal(lbs.lbs_attributes, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Not_expecting */2, + _0: lbs.lbs_loc, + _1: "attributes" } - } - ], - _1: /* [] */0 - }; - return mk$6(symbol_gloc(undefined), d); - } else { - return str; + }); } - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_primitive */2, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_type */3, - _0: Stdlib__List.rev(_1) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_typext */4, - _0: _1 + const 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({ + TAG: /* Pstr_value */1, + _0: lbs.lbs_rec, + _1: Stdlib__List.rev(bindings$1) }); - }), + } + const id = lbs.lbs_extension; + if (id !== undefined) { + let d = { + TAG: /* Pstr_extension */14, + _0: [ + id, + { + TAG: /* PStr */0, + _0: { + hd: str, + tl: /* [] */0 + } + } + ], + _1: /* [] */0 + }; + return mk$6(symbol_gloc(undefined), d); + } else { + return str; + } + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_exception */5, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_primitive */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_module */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_type */3, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_recmodule */7, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_typext */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_modtype */8, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_exception */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_open */9, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_module */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_class */10, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_recmodule */7, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_class_type */11, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_modtype */8, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_include */12, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_open */9, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkstr({ - TAG: /* Pstr_extension */14, - _0: _1, - _1: add_docs_attrs(symbol_docs(undefined), _2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_class */10, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkstr({ - TAG: /* Pstr_attribute */13, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_constraint */4, - _0: _4, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmod({ - TAG: /* Pmod_functor */2, - _0: _1[0], - _1: _1[1], - _2: _2 - }); - }), + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_include */12, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkstr({ + TAG: /* Pstr_extension */14, + _0: _1, + _1: add_docs_attrs(symbol_docs(undefined), _2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkstr({ + TAG: /* Pstr_attribute */13, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_constraint */4, + _0: _4, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmod({ + TAG: /* Pmod_functor */2, + _0: _1[0], + _1: _1[1], + _2: _2 + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkmty({ - TAG: /* Pmty_signature */1, - _0: extra_text(text, 2, _2) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("sig", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib__List.fold_left((function (acc, param) { - return mkmty({ - TAG: /* Pmty_functor */2, - _0: param[0], - _1: param[1], - _2: acc - }); - }), _4, _2); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_with */3, - _0: _1, - _1: Stdlib__List.rev(_3) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_typeof */4, - _0: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkmty({ + TAG: /* Pmty_signature */1, + _0: extra_text(text, 2, _2) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("sig", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Stdlib__List.fold_left((function (acc, param) { + return mkmty({ + TAG: /* Pmty_functor */2, + _0: param[0], + _1: param[1], + _2: acc + }); + }), _4, _2); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_with */3, + _0: _1, + _1: Stdlib__List.rev(_3) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_extension */5, - _0: _1 - }); - }), + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_typeof */4, + _0: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$3(_1, _2); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Stdlib.$at(text(get_text(Stdlib__Parsing.rhs_start_pos(1))), _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_extension */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$3(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_value */0, - _0: _1 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_value */0, - _0: _1 - }); - }), + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_type */1, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_typext */2, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_value */0, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_exception */3, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_value */0, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_module */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_type */1, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_module */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_typext */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_recmodule */5, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_exception */3, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_modtype */6, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_module */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_open */7, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_module */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_include */8, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_recmodule */5, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_class */9, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_modtype */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_class_type */10, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_open */7, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mksig({ - TAG: /* Psig_extension */12, - _0: _1, - _1: add_docs_attrs(symbol_docs(undefined), _2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_include */8, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mksig({ - TAG: /* Psig_attribute */11, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_class */9, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mksig({ + TAG: /* Psig_extension */12, + _0: _1, + _1: add_docs_attrs(symbol_docs(undefined), _2) + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mksig({ + TAG: /* Psig_attribute */11, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_functor */2, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: _4, - _2: _6 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkmty({ - TAG: /* Pmty_functor */2, - _0: { - txt: "*", - loc: rhs_loc(1) - }, - _1: undefined, - _2: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mk$16(symbol_rloc(undefined), _3, symbol_docs(undefined), _2); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mk$12(symbol_rloc(undefined), _5, symbol_docs(undefined), undefined, { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_functor */2, + _0: { txt: _2, loc: rhs_loc(2) - }, alias$2(rhs_loc(4), undefined, { - txt: _4, - loc: rhs_loc(4) - })); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + }, + _1: _4, + _2: _6 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkmty({ + TAG: /* Pmty_functor */2, + _0: { + txt: "*", + loc: rhs_loc(1) + }, + _1: undefined, + _2: _3 + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, _4); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, alias$2(rhs_loc(4), undefined, { + txt: _4, + loc: rhs_loc(4) + })); + }), (function (__caml_parser_env) { - - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, _4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, _5); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constraint */5, - _0: _4, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), + + }), (function (__caml_parser_env) { - return /* [] */0; - }), - (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_fun */2, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_apply */3, - _0: _1, - _1: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const 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, - _1: { - TAG: /* Not_expecting */2, - _0: lb.lb_loc, - _1: "item attribute" - } - }); - } - return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); - }), _1.lbs_bindings); - if (_1.lbs_extension !== undefined) { - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Not_expecting */2, - _0: _1.lbs_loc, - _1: "extension" - } - }); - } - if (Caml_obj.caml_notequal(_1.lbs_attributes, /* [] */0)) { - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Not_expecting */2, - _0: _1.lbs_loc, - _1: "attributes" - } - }); - } - return mkclass({ - TAG: /* Pcl_let */4, - _0: _1.lbs_rec, - _1: Stdlib__List.rev(bindings), - _2: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$5(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, _5); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constraint */5, + _0: _4, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_extension */6, - _0: _1 - }); - }), + return /* [] */0; + }), + (function (__caml_parser_env) { + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _3 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_fun */2, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constr */0, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkclass({ - TAG: /* Pcl_constr */0, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkclass({ - TAG: /* Pcl_structure */1, - _0: _2 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_apply */3, + _0: _1, + _1: Stdlib__List.rev(_2) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const 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, + _1: { + TAG: /* Not_expecting */2, + _0: lb.lb_loc, + _1: "item attribute" + } + }); + } + return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); + }), _1.lbs_bindings); + if (_1.lbs_extension !== undefined) { + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Not_expecting */2, + _0: _1.lbs_loc, + _1: "extension" + } }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkclass({ - TAG: /* Pcl_constraint */5, - _0: _2, - _1: _4 + } + if (Caml_obj.caml_notequal(_1.lbs_attributes, /* [] */0)) { + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Not_expecting */2, + _0: _1.lbs_loc, + _1: "attributes" + } }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + } + return mkclass({ + TAG: /* Pcl_let */4, + _0: _1.lbs_rec, + _1: Stdlib__List.rev(bindings), + _2: _3 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$5(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - pcstr_self: _1, - pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_extension */6, + _0: _1 + }); + }), (function (__caml_parser_env) { - return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constr */0, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _2, - _1: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkclass({ + TAG: /* Pcl_constr */0, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - return ghpat(/* Ppat_any */0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkclass({ + TAG: /* Pcl_structure */1, + _0: _2 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkclass({ + TAG: /* Pcl_constraint */5, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - return /* [] */0; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_5, symbol_docs(undefined), { - TAG: /* Pcf_inherit */0, - _0: _2, - _1: _3, - _2: _4 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_val */1, - _0: _2 - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_method */2, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + pcstr_self: _1, + pcstr_fields: extra_cstr(2, Stdlib__List.rev(_2)) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_constraint */3, - _0: _2 - }); - }), + return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_3, symbol_docs(undefined), { - TAG: /* Pcf_initializer */4, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcf(_2, symbol_docs(undefined), { - TAG: /* Pcf_extension */6, - _0: _1 - }); - }), + return ghpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkcf(undefined, undefined, { - TAG: /* Pcf_attribute */5, - _0: _1 - }); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcf(_5, symbol_docs(undefined), { + TAG: /* Pcf_inherit */0, + _0: _2, + _1: _3, + _2: _4 + }); + }), (function (__caml_parser_env) { - - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); - } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - /* Mutable */1, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_virtual */0, - _0: _5 - } - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: _5 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const e = mkexp_constraint(_6, _4); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: e - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); - } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - /* Private */0, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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 - }); - } - return [ - { - txt: _4, - loc: rhs_loc(4) - }, - _3, - { - TAG: /* Cfk_virtual */0, - _0: _6 - } - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: _4, - _1: undefined - }) - } - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: _7, - _1: _5 - }) - } - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = wrap_type_annotation(_6, _8, _10); - return [ - { - txt: _3, - loc: rhs_loc(3) - }, - _2, - { - TAG: /* Cfk_concrete */1, - _0: _1, - _1: ghexp({ - TAG: /* Pexp_poly */28, - _0: match[0], - _1: match[1] - }) - } - ]; - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "?" + _2, - _1: mkoption(_4), - _2: _6 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "?" + _1, - _1: mkoption(_2), - _2: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: _1, - _1: _3, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_arrow */2, - _0: "", - _1: _1, - _2: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkcf(undefined, undefined, { + TAG: /* Pcf_attribute */5, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_constr */0, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_constr */0, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkcty({ - TAG: /* Pcty_signature */1, - _0: _2 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + /* Mutable */1, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 3); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_virtual */0, + _0: _5 + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$6(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: _5 + } + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const e = mkexp_constraint(_6, _4); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: e + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkcty({ - TAG: /* Pcty_extension */3, - _0: _1 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - pcsig_self: _1, - pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) - }; - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), - (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), - (function (__caml_parser_env) { - return /* [] */0; - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + /* Private */0, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_3, symbol_docs(undefined), { - TAG: /* Pctf_inherit */0, - _0: _2 + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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 }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_6, symbol_docs(undefined), { - TAG: /* Pctf_method */2, - _0: [ - _3, - _2[0], - _2[1], - _5 - ] - }); - }), + } + return [ + { + txt: _4, + loc: rhs_loc(4) + }, + _3, + { + TAG: /* Cfk_virtual */0, + _0: _6 + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_3, symbol_docs(undefined), { - TAG: /* Pctf_constraint */3, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: _4, + _1: undefined + }) + } + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkctf(_2, symbol_docs(undefined), { - TAG: /* Pctf_extension */5, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: _7, + _1: _5 + }) + } + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 9); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _10 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = wrap_type_annotation(_6, _8, _10); + return [ + { + txt: _3, + loc: rhs_loc(3) + }, + _2, + { + TAG: /* Cfk_concrete */1, + _0: _1, + _1: ghexp({ + TAG: /* Pexp_poly */28, + _0: match[0], + _1: match[1] + }) + } + ]; + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "?" + _2, + _1: mkoption(_4), + _2: _6 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "?" + _1, + _1: mkoption(_2), + _2: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - mark_symbol_docs(undefined); - return mkctf(undefined, undefined, { - TAG: /* Pctf_attribute */4, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: _1, + _1: _3, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_arrow */2, + _0: "", + _1: _1, + _2: _3 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _3, - _2, - /* Virtual */0, - _5 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_constr */0, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _3, - /* Mutable */1, - _2, - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_constr */0, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - /* Immutable */0, - /* Concrete */1, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkcty({ + TAG: /* Pcty_signature */1, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3, - symbol_rloc(undefined) - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$6(_1, _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkcty({ + TAG: /* Pcty_extension */3, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + pcsig_self: _1, + pcsig_fields: extra_csig(2, Stdlib__List.rev(_2)) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_sequence */16, - _0: _1, - _1: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkctf(_6, symbol_docs(undefined), { + TAG: /* Pctf_method */2, + _0: [ + _3, + _2[0], + _2[1], + _5 + ] + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - "?" + _3[0], - _4, - _3[1] - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _2[0], - undefined, - _2[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - "?" + _1, - _4, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + mark_symbol_docs(undefined); + return mkctf(undefined, undefined, { + TAG: /* Pctf_attribute */4, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _1, - undefined, - _2 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _3, + _2, + /* Virtual */0, + _5 + ]; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _3[0], - undefined, - _3[1] - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _3, + /* Mutable */1, + _2, + _5 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2[0], - undefined, - _2[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + /* Immutable */0, + /* Concrete */1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - undefined, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3, + symbol_rloc(undefined) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "", - undefined, - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return mkpat(/* Ppat_any */0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1[0], - mkpat({ - TAG: /* Ppat_constraint */10, - _0: _1[1], - _1: _3 - }) - ]; - }), + return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_sequence */16, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + "?" + _3[0], + _4, + _3[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _1, - _1: _3 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _2[0], + undefined, + _2[1] + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + "?" + _1, + _4, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: _1, - _1: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const 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, - _1: { - TAG: /* Not_expecting */2, - _0: lb.lb_loc, - _1: "item attribute" - } - }); - } - return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); - }), _1.lbs_bindings); - const d_0 = _1.lbs_rec; - const d_1 = Stdlib__List.rev(bindings); - const d = { - TAG: /* Pexp_let */2, - _0: d_0, - _1: d_1, - _2: _3 - }; - return wrap_exp_attrs(mkexp(d), [ - _1.lbs_extension, - _1.lbs_attributes - ]); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_0 = { - txt: _4, - loc: rhs_loc(4) - }; - const d = { - TAG: /* Pexp_letmodule */25, - _0: d_0, - _1: _5, - _2: _7 - }; - return wrap_exp_attrs(mkexp(d), _3); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = { - txt: _5, - loc: rhs_loc(5) - }; - const d = { - TAG: /* Pexp_open */32, - _0: _3, - _1: d_1, - _2: _7 - }; - return wrap_exp_attrs(mkexp(d), _4); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _1, + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d = { - TAG: /* Pexp_function */3, - _0: Stdlib__List.rev(_4) - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_fun */4, - _0: _3[0], - _1: _3[1], - _2: _3[2], - _3: _4 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_newtype */30, - _0: _5, - _1: _7 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = Stdlib__List.rev(_6); - const d = { - TAG: /* Pexp_match */6, - _0: _3, - _1: d_1 - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d_1 = Stdlib__List.rev(_6); - const d = { - TAG: /* Pexp_try */7, - _0: _3, - _1: d_1 - }; - return wrap_exp_attrs(mkexp(d), _2); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _3[0], + undefined, + _3[1] + ]; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2[0], + undefined, + _2[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_tuple */8, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + undefined, + _2 + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "", + undefined, + _1 + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_var */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_construct */9, + return mkpat(/* Ppat_any */0); + }), + (function (__caml_parser_env) { + + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1[0], + mkpat({ + TAG: /* Ppat_constraint */10, + _0: _1[1], + _1: _3 + }) + ]; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + mkpat({ + TAG: /* Ppat_var */0, _0: { txt: _1, loc: rhs_loc(1) - }, - _1: _2 - }); - }), + } + }) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_variant */10, - _0: _1, - _1: _2 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_ifthenelse */15, - _0: _3, - _1: _5, - _2: _7 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_ifthenelse */15, - _0: _3, - _1: _5, - _2: undefined - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_while */17, - _0: _3, - _1: _5 - }), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_for */18, - _0: _3, - _1: _5, - _2: _7, - _3: _6, - _4: _9 - }), _2); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp_cons(rhs_loc(2), ghexp({ - TAG: /* Pexp_tuple */8, - _0: { - hd: _1, - tl: { - hd: _3, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp_cons(rhs_loc(2), ghexp({ - TAG: /* Pexp_tuple */8, - _0: { - hd: _5, - tl: { - hd: _7, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+.", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "+=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "-", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "-.", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "*", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "%", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "<", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, ">", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "or", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "||", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "&", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, "&&", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, ":=", _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = _2.pexp_desc; - let exit = 0; - switch (_1) { - case "-" : - if (match.TAG === /* Pexp_constant */1) { - const n = match._0; - switch (n.TAG) { - case /* Const_int */0 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int */0, - _0: -n._0 | 0 - } - }); - case /* Const_int32 */4 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int32 */4, - _0: -n._0 | 0 - } - }); - case /* Const_int64 */5 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_int64 */5, - _0: Caml_int64.neg(n._0) - } - }); - case /* Const_nativeint */6 : - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_nativeint */6, - _0: Caml_external_polyfill.resolve("nativeint_neg")(n._0) - } - }); - default: - exit = 2; - } - } else { - exit = 2; - } - break; - case "-." : - exit = 2; - break; - default: - - } - if (exit === 2 && match.TAG === /* Pexp_constant */1) { - const f = match._0; - if (f.TAG === /* Const_float */3) { - return mkexp({ - TAG: /* Pexp_constant */1, - _0: { - TAG: /* Const_float */3, - _0: neg_float_string(f._0) - } - }); - } - - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("~" + _1, 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const desc = _2.pexp_desc; - let exit = 0; - switch (_1) { - case "+" : - if (desc.TAG === /* Pexp_constant */1) { - switch (desc._0.TAG) { - case /* Const_char */1 : - case /* Const_string */2 : - case /* Const_float */3 : - exit = 2; - break; - default: - return mkexp(desc); - } - } else { - exit = 2; - } - break; - case "+." : - exit = 2; - break; - default: - - } - if (exit === 2 && desc.TAG === /* Pexp_constant */1 && desc._0.TAG === /* Const_float */3) { - return mkexp(desc); - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("~" + _1, 1), - _1: { - hd: [ - "", - _2 - ], - tl: /* [] */0 - } - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_setfield */13, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - }, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("Array", "set") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - _4 - ], + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: _1, + _1: Stdlib__List.rev(_2) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const 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, + _1: { + TAG: /* Not_expecting */2, + _0: lb.lb_loc, + _1: "item attribute" + } + }); + } + return mk$17(lb.lb_loc, undefined, undefined, undefined, lb.lb_pattern, lb.lb_expression); + }), _1.lbs_bindings); + const d_0 = _1.lbs_rec; + const d_1 = Stdlib__List.rev(bindings); + const d = { + TAG: /* Pexp_let */2, + _0: d_0, + _1: d_1, + _2: _3 + }; + return wrap_exp_attrs(mkexp(d), [ + _1.lbs_extension, + _1.lbs_attributes + ]); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_0 = { + txt: _4, + loc: rhs_loc(4) + }; + const d = { + TAG: /* Pexp_letmodule */25, + _0: d_0, + _1: _5, + _2: _7 + }; + return wrap_exp_attrs(mkexp(d), _3); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = { + txt: _5, + loc: rhs_loc(5) + }; + const d = { + TAG: /* Pexp_open */32, + _0: _3, + _1: d_1, + _2: _7 + }; + return wrap_exp_attrs(mkexp(d), _4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d = { + TAG: /* Pexp_function */3, + _0: Stdlib__List.rev(_4) + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_fun */4, + _0: _3[0], + _1: _3[1], + _2: _3[2], + _3: _4 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_newtype */30, + _0: _5, + _1: _7 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = Stdlib__List.rev(_6); + const d = { + TAG: /* Pexp_match */6, + _0: _3, + _1: d_1 + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d_1 = Stdlib__List.rev(_6); + const d = { + TAG: /* Pexp_try */7, + _0: _3, + _1: d_1 + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_tuple */8, + _0: Stdlib__List.rev(_1) + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_construct */9, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_variant */10, + _0: _1, + _1: _2 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_ifthenelse */15, + _0: _3, + _1: _5, + _2: _7 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_ifthenelse */15, + _0: _3, + _1: _5, + _2: undefined + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_while */17, + _0: _3, + _1: _5 + }), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 8); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _9 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_for */18, + _0: _3, + _1: _5, + _2: _7, + _3: _6, + _4: _9 + }), _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp_cons(rhs_loc(2), ghexp({ + TAG: /* Pexp_tuple */8, + _0: { + hd: _1, tl: { - hd: [ - "", - _7 - ], + hd: _3, tl: /* [] */0 } } - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("String", "set") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - _4 - ], + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp_cons(rhs_loc(2), ghexp({ + TAG: /* Pexp_tuple */8, + _0: { + hd: _5, tl: { - hd: [ - "", - _7 - ], + hd: _7, tl: /* [] */0 } } - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const set = fast.contents ? "unsafe_set" : "set"; - const coords = bigarray_untuplify(_4); - if (coords) { - const match = coords.tl; - const c1 = coords.hd; - if (!match) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array1", set) - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - c1 - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } - } - } - }); - } - const match$1 = match.tl; - const c2 = match.hd; - if (!match$1) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array2", set) - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - c1 - ], - tl: { - hd: [ - "", - c2 - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } - } - } - } - }); - } - if (!match$1.tl) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array3", set) - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - c1 - ], - tl: { - hd: [ - "", - c2 - ], - tl: { - hd: [ - "", - match$1.hd - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+.", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "+=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "-", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "-.", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "*", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "%", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "<", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, ">", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "or", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "||", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "&", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, "&&", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, ":=", _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = _2.pexp_desc; + let exit = 0; + switch (_1) { + case "-" : + if (match.TAG === /* Pexp_constant */1) { + const n = match._0; + switch (n.TAG) { + case /* Const_int */0 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int */0, + _0: -n._0 | 0 } - } - } - } - } - }); - } + }); + case /* Const_int32 */4 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int32 */4, + _0: -n._0 | 0 + } + }); + case /* Const_int64 */5 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_int64 */5, + _0: Caml_int64.neg(n._0) + } + }); + case /* Const_nativeint */6 : + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_nativeint */6, + _0: Caml_external_polyfill.resolve("nativeint_neg")(n._0) + } + }); + default: + exit = 2; + } + } else { + exit = 2; + } + break; + case "-." : + exit = 2; + break; + default: - } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Genarray", "set") - }), - _1: { - hd: [ - "", - _1 - ], - tl: { - hd: [ - "", - ghexp({ - TAG: /* Pexp_array */14, - _0: coords - }) - ], - tl: { - hd: [ - "", - _7 - ], - tl: /* [] */0 - } + } + if (exit === 2 && match.TAG === /* Pexp_constant */1) { + const f = match._0; + if (f.TAG === /* Const_float */3) { + return mkexp({ + TAG: /* Pexp_constant */1, + _0: { + TAG: /* Const_float */3, + _0: neg_float_string(f._0) } - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_setinstvar */23, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _3 - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(mkexp({ - TAG: /* Pexp_object */29, - _0: _3 - }), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("object", 1, "end", 4); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._2(Ast_helper_Exp.attr, _1, _2); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_ident */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_constant */1, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_construct */9, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: undefined - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_variant */10, - _0: _1, - _1: undefined - }); - }), - (function (__caml_parser_env) { - return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return wrap_exp_attrs(reloc_exp(_3), _2); - }), + }); + } + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("~" + _1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const d_0 = { - txt: { - TAG: /* Lident */0, - _0: "()" - }, - loc: symbol_rloc(undefined) - }; - const d = { - TAG: /* Pexp_construct */9, - _0: d_0, - _1: undefined - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("begin", 1, "end", 3); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp_constraint(_2, _3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_field */12, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const desc = _2.pexp_desc; + let exit = 0; + switch (_1) { + case "+" : + if (desc.TAG === /* Pexp_constant */1) { + switch (desc._0.TAG) { + case /* Const_char */1 : + case /* Const_string */2 : + case /* Const_float */3 : + exit = 2; + break; + default: + return mkexp(desc); } - }); - }), + } else { + exit = 2; + } + break; + case "+." : + exit = 2; + break; + default: + + } + if (exit === 2 && desc.TAG === /* Pexp_constant */1 && desc._0.TAG === /* Const_float */3) { + return mkexp(desc); + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("~" + _1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: _4 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 3, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("Array", "get") - }), - _1: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_setfield */13, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + }, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("Array", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], tl: { hd: [ "", - _4 + _7 ], tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 3, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: array_function("String", "get") - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("String", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + _4 ], tl: { hd: [ "", - _4 + _7 ], tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 3, "]", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const get = fast.contents ? "unsafe_get" : "get"; - const coords = bigarray_untuplify(_4); - if (coords) { - const match = coords.tl; - const c1 = coords.hd; - if (!match) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array1", get) - }), - _1: { + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const set = fast.contents ? "unsafe_set" : "set"; + const coords = bigarray_untuplify(_4); + if (coords) { + const match = coords.tl; + const c1 = coords.hd; + if (!match) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array1", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + _7 ], tl: /* [] */0 } } - }); - } - const match$1 = match.tl; - const c2 = match.hd; - if (!match$1) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array2", get) - }), - _1: { + } + }); + } + const match$1 = match.tl; + const c2 = match.hd; + if (!match$1) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array2", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + _7 ], tl: /* [] */0 } } } - }); - } - if (!match$1.tl) { - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Array3", get) - }), - _1: { + } + }); + } + if (!match$1.tl) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array3", set) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + c1 ], tl: { hd: [ "", - c1 + c2 ], tl: { hd: [ "", - c2 + match$1.hd ], tl: { hd: [ "", - match$1.hd + _7 ], tl: /* [] */0 } } } } - }); - } - + } + }); } - return mkexp({ - TAG: /* Pexp_apply */5, - _0: ghexp({ - TAG: /* Pexp_ident */0, - _0: bigarray_function("Genarray", "get") - }), - _1: { + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Genarray", "set") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _1 + ghexp({ + TAG: /* Pexp_array */14, + _0: coords + }) ], tl: { hd: [ "", - ghexp({ - TAG: /* Pexp_array */14, - _0: coords - }) + _7 ], tl: /* [] */0 } } - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 3, "}", 5); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_record */11, - _0: _2[1], - _1: _2[0] - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 1, "}", 3); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const rec_exp = mkexp({ - TAG: /* Pexp_record */11, - _0: _4[1], - _1: _4[0] - }); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: rec_exp - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 3, "}", 5); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_array */14, - _0: Stdlib__List.rev(_2) - }); - }), + } + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 1, "|]", 4); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_setinstvar */23, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _3 + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(mkexp({ + TAG: /* Pexp_object */29, + _0: _3 + }), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("object", 1, "end", 4); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._2(Ast_helper_Exp.attr, _1, _2); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_ident */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - return mkexp({ - TAG: /* Pexp_array */14, - _0: /* [] */0 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_array */14, - _0: Stdlib__List.rev(_4) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 3, "|]", 6); - }), - (function (__caml_parser_env) { - const _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))); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 1, "]", 4); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: list_exp - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 3, "]", 6); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator(_1, 1), - _1: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_constant */1, + _0: _1 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_construct */9, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: undefined + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_variant */10, + _0: _1, + _1: undefined + }); + }), + (function (__caml_parser_env) { + return reloc_exp(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return wrap_exp_attrs(reloc_exp(_3), _2); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const d_0 = { + txt: { + TAG: /* Lident */0, + _0: "()" + }, + loc: symbol_rloc(undefined) + }; + const d = { + TAG: /* Pexp_construct */9, + _0: d_0, + _1: undefined + }; + return wrap_exp_attrs(mkexp(d), _2); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("begin", 1, "end", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp_constraint(_2, _3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_field */12, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: _4 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 3, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("Array", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _2 + _4 ], tl: /* [] */0 } - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_apply */5, - _0: mkoperator("!", 1), - _1: { + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 3, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: array_function("String", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { hd: [ "", - _2 + _4 ], tl: /* [] */0 } - }); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const d = { - TAG: /* Pexp_new */22, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }; - return wrap_exp_attrs(mkexp(d), _2); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_override */24, - _0: Stdlib__List.rev(_2) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{<", 1, ">}", 4); - }), - (function (__caml_parser_env) { - return mkexp({ - TAG: /* Pexp_override */24, - _0: /* [] */0 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_override */24, - _0: Stdlib__List.rev(_4) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 5); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{<", 3, ">}", 6); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_send */21, - _0: _1, - _1: _3 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkinfix(_1, _2, _3); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_pack */31, - _0: _3 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_constraint */19, - _0: ghexp({ - TAG: /* Pexp_pack */31, - _0: _3 - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 1, ")", 5); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkexp({ - TAG: /* Pexp_open */32, - _0: /* Fresh */1, - _1: { - txt: _1, - loc: rhs_loc(1) - }, - _2: mkexp({ - TAG: /* Pexp_constraint */19, - _0: ghexp({ - TAG: /* Pexp_pack */31, - _0: _5 - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _7 - }) - }) - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 6); - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return unclosed("(", 3, ")", 7); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_extension */33, - _0: _1 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 3, "]", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const get = fast.contents ? "unsafe_get" : "get"; + const coords = bigarray_untuplify(_4); + if (coords) { + const match = coords.tl; + const c1 = coords.hd; + if (!match) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array1", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + c1 + ], + tl: /* [] */0 + } + } + }); + } + const match$1 = match.tl; + const c2 = match.hd; + if (!match$1) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array2", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + c1 + ], + tl: { + hd: [ + "", + c2 + ], + tl: /* [] */0 + } + } + } + }); + } + if (!match$1.tl) { + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Array3", get) + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + c1 + ], + tl: { + hd: [ + "", + c2 + ], + tl: { + hd: [ + "", + match$1.hd + ], + tl: /* [] */0 + } + } + } + } + }); + } + + } + return mkexp({ + TAG: /* Pexp_apply */5, + _0: ghexp({ + TAG: /* Pexp_ident */0, + _0: bigarray_function("Genarray", "get") + }), + _1: { + hd: [ + "", + _1 + ], + tl: { + hd: [ + "", + ghexp({ + TAG: /* Pexp_array */14, + _0: coords + }) + ], + tl: /* [] */0 + } + } + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 3, "}", 5); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_record */11, + _0: _2[1], + _1: _2[0] + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 1, "}", 3); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const rec_exp = mkexp({ + TAG: /* Pexp_record */11, + _0: _4[1], + _1: _4[0] + }); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: rec_exp + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 3, "}", 5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "", - _1 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_array */14, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 1, "|]", 4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _2 - ]; - }), + return mkexp({ + TAG: /* Pexp_array */14, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_array */14, + _0: Stdlib__List.rev(_4) + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 3, "|]", 6); + }), + (function (__caml_parser_env) { + const _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))); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 1, "]", 4); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const list_exp = reloc_exp(mktailexp(rhs_loc(6), Stdlib__List.rev(_4))); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: list_exp + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 3, "]", 6); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator(_1, 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_apply */5, + _0: mkoperator("!", 1), + _1: { + hd: [ + "", + _2 + ], + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _2[0], - _2[1] - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const d = { + TAG: /* Pexp_new */22, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }; + return wrap_exp_attrs(mkexp(d), _2); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - "?" + _1, - _2 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_override */24, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - mkexp({ - TAG: /* Pexp_ident */0, - _0: { - txt: { - TAG: /* Lident */0, - _0: _1 - }, - loc: rhs_loc(1) - } - }) - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{<", 1, ">}", 4); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return mkexp({ + TAG: /* Pexp_override */24, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_override */24, + _0: Stdlib__List.rev(_4) + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 5); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{<", 3, ">}", 6); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_send */21, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkinfix(_1, _2, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - mkpatvar(_1, 1), - _2 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_pack */31, + _0: _3 + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_constraint */19, + _0: ghexp({ + TAG: /* Pexp_pack */31, + _0: _3 + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 1, ")", 5); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkexp({ + TAG: /* Pexp_open */32, + _0: /* Fresh */1, + _1: { + txt: _1, + loc: rhs_loc(1) + }, + _2: mkexp({ + TAG: /* Pexp_constraint */19, + _0: ghexp({ + TAG: /* Pexp_pack */31, + _0: _5 + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _7 + }) + }) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: mkpatvar(_1, 1), - _1: ghtyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_3), - _1: _5 - }) - }), - _7 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 6); + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return unclosed("(", 3, ")", 7); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const match = wrap_type_annotation(_4, _6, _8); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: mkpatvar(_1, 1), - _1: match[1] - }), - match[0] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_extension */33, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - ghpat({ - TAG: /* Ppat_constraint */10, - _0: _1, - _1: _3 - }), - _5 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "", + _1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - lbs_bindings: { - hd: _2, - tl: _1.lbs_bindings - }, - lbs_rec: _1.lbs_rec, - lbs_extension: _1.lbs_extension, - lbs_attributes: _1.lbs_attributes, - lbs_loc: _1.lbs_loc - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - let lb = mklb(_4, _5); - return { - lbs_bindings: { - hd: lb, - tl: /* [] */0 - }, - lbs_rec: _3, - lbs_extension: _2[0], - lbs_attributes: _2[1], - lbs_loc: symbol_rloc(undefined) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _2 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mklb(_2, _3); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _2[0], + _2[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp_constraint(_3, _1); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + "?" + _1, + _2 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + mkexp({ + TAG: /* Pexp_ident */0, + _0: { + txt: { + TAG: /* Lident */0, + _0: _1 + }, + loc: rhs_loc(1) + } + }) + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return ghexp({ - TAG: /* Pexp_fun */4, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: _3, - _1: _5 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + mkpatvar(_1, 1), + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: mkpatvar(_1, 1), + _1: ghtyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_3), + _1: _5 + }) + }), + _7 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 7); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const match = wrap_type_annotation(_4, _6, _8); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: mkpatvar(_1, 1), + _1: match[1] + }), + match[0] + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return ghexp({ - TAG: /* Pexp_fun */4, - _0: _1[0], - _1: _1[1], - _2: _1[2], - _3: _2 - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkexp({ - TAG: /* Pexp_newtype */30, - _0: _3, - _1: _5 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + ghpat({ + TAG: /* Ppat_constraint */10, + _0: _1, + _1: _3 + }), + _5 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: { - hd: _1, - tl: /* [] */0 - } - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + lbs_bindings: { + hd: _2, + tl: _1.lbs_bindings + }, + lbs_rec: _1.lbs_rec, + lbs_extension: _1.lbs_extension, + lbs_attributes: _1.lbs_attributes, + lbs_loc: _1.lbs_loc + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + let lb = mklb(_4, _5); + return { + lbs_bindings: { + hd: lb, + tl: /* [] */0 + }, + lbs_rec: _3, + lbs_extension: _2[0], + lbs_attributes: _2[1], + lbs_loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - _1 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mklb(_2, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp_constraint(_3, _1); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return ghexp({ + TAG: /* Pexp_fun */4, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - exp_of_label(_1, 1) - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: _3, + _1: _5 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ], - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: [ - { - txt: _3, - loc: rhs_loc(3) - }, - _5 - ], - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._3(Ast_helper_Exp.$$case, _1, undefined, _3); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return Curry._3(Ast_helper_Exp.$$case, _1, _3, _5); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - undefined - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _4 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return ghexp({ + TAG: /* Pexp_fun */4, + _0: _1[0], + _1: _1[1], + _2: _1[2], + _3: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - _2 - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkexp({ + TAG: /* Pexp_newtype */30, + _0: _3, + _1: _5 + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Escape_error, { - MEL_EXN_ID: Escape_error - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: { + hd: _1, + tl: /* [] */0 + } + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_alias */1, - _0: _1, - _1: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + _1 + ]; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "identifier"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_tuple */4, - _0: Stdlib__List.rev(_1) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_construct */5, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_variant */6, - _0: _1, - _1: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat_cons(rhs_loc(2), ghpat({ - TAG: /* Ppat_tuple */4, - _0: { - hd: _1, - tl: { - hd: _3, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + exp_of_label(_1, 1) + ]; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ], + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat_cons(rhs_loc(2), ghpat({ - TAG: /* Ppat_tuple */4, - _0: { - hd: _5, - tl: { - hd: _7, - tl: /* [] */0 - } - } - }), symbol_rloc(undefined)); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 4, ")", 8); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_or */9, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: [ + { + txt: _3, + loc: rhs_loc(3) + }, + _5 + ], + tl: _1 + }; + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_lazy */12, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_exception */14, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr$1(_1, _2); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_var */0, - _0: { - txt: _1, - loc: rhs_loc(1) - } - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + _2 + ]; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - return mkpat(/* Ppat_any */0); - }), + throw new Caml_js_exceptions.MelangeError(Escape_error, { + MEL_EXN_ID: Escape_error + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_constant */2, - _0: _1 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_interval */3, - _0: _1, - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_alias */1, + _0: _1, + _1: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_construct */5, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: undefined - }); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "identifier"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_variant */6, - _0: _1, - _1: undefined - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_tuple */4, + _0: Stdlib__List.rev(_1) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_type */11, - _0: { - txt: _2, - loc: rhs_loc(2) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_construct */5, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: _2 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_record */7, - _0: _2[0], - _1: _2[1] - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("{", 1, "}", 3); - }), - (function (__caml_parser_env) { - const _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))); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[", 1, "]", 4); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_array */8, - _0: Stdlib__List.rev(_2) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_variant */6, + _0: _1, + _1: _2 + }); + }), (function (__caml_parser_env) { - return mkpat({ - TAG: /* Ppat_array */8, - _0: /* [] */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat_cons(rhs_loc(2), ghpat({ + TAG: /* Ppat_tuple */4, + _0: { + hd: _1, + tl: { + hd: _3, + tl: /* [] */0 + } + } + }), symbol_rloc(undefined)); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("[|", 1, "|]", 4); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat_cons(rhs_loc(2), ghpat({ + TAG: /* Ppat_tuple */4, + _0: { + hd: _5, + tl: { + hd: _7, + tl: /* [] */0 + } + } + }), symbol_rloc(undefined)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 4, ")", 8); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_or */9, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: _2, - _1: _4 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_lazy */12, + _0: _2 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 5); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_exception */14, + _0: _2 + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(4, "type"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return attr$1(_1, _2); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_unpack */13, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_var */0, + _0: { + txt: _1, + loc: rhs_loc(1) + } + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mkpat({ - TAG: /* Ppat_constraint */10, - _0: mkpat({ - TAG: /* Ppat_unpack */13, - _0: { - txt: _3, - loc: rhs_loc(3) - } - }), - _1: ghtyp({ - TAG: /* Ptyp_package */9, - _0: _5 - }) - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 6); - }), + return mkpat(/* Ppat_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mkpat({ - TAG: /* Ppat_extension */15, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_constant */2, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_interval */3, + _0: _1, + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: { - hd: _1, - tl: /* [] */0 - } - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_construct */5, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: undefined + }); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return expecting(3, "pattern"); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_variant */6, + _0: _1, + _1: undefined + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_type */11, + _0: { + txt: _2, + loc: rhs_loc(2) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_record */7, + _0: _2[0], + _1: _2[1] + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("{", 1, "}", 3); + }), + (function (__caml_parser_env) { + const _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))); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[", 1, "]", 4); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_array */8, + _0: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + return mkpat({ + TAG: /* Ppat_array */8, + _0: /* [] */0 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("[|", 1, "|]", 4); + }), + (function (__caml_parser_env) { + return reloc_pat(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: _2, + _1: _4 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 5); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Open */1 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(4, "type"); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: _3[0] - }, - _3[1] - ]; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_unpack */13, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mkpat({ + TAG: /* Ppat_constraint */10, + _0: mkpat({ + TAG: /* Ppat_unpack */13, + _0: { + txt: _3, + loc: rhs_loc(3) + } + }), + _1: ghtyp({ + TAG: /* Ptyp_package */9, + _0: _5 + }) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 6); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - pat_of_label(_1, 1) - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mkpat({ + TAG: /* Ppat_extension */15, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1[0], + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: { + hd: _1, tl: /* [] */0 - }; - }), + } + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1[0], - tl: _2 - }; - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return expecting(3, "pattern"); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { hd: _1, tl: /* [] */0 - }; - }), + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + hd: _1, + tl: /* [] */0 + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: /* [] */0 + }, + /* Open */1 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + hd: _1, + tl: _3[0] + }, + _3[1] + ]; + }), (function (__caml_parser_env) { - return [ - /* Ptype_abstract */0, - /* Public */1, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* Ptype_abstract */0, - /* Public */1, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + pat_of_label(_1, 1) + ]; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* Ptype_abstract */0, - /* Private */0, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_2) - }, - /* Public */1, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1[0], + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_3) - }, - /* Private */0, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1[0], + tl: _2 + }; + }), (function (__caml_parser_env) { - return [ - /* Ptype_open */1, - /* Public */1, - undefined - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - TAG: /* Ptype_record */1, - _0: _4 - }, - _2, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - TAG: /* Ptype_variant */0, - _0: Stdlib__List.rev(_5) - }, - _4, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - return [ - /* Ptype_open */1, - /* Public */1, - _2 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - { - TAG: /* Ptype_record */1, - _0: _6 - }, - _4, - _2 - ]; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return [ + /* Ptype_abstract */0, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* Ptype_abstract */0, + /* Public */1, + _2 + ]; + }), (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* Ptype_abstract */0, + /* Private */0, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _1 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_2) + }, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_3) + }, + /* Private */0, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return [ + /* Ptype_open */1, + /* Public */1, + undefined + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + TAG: /* Ptype_record */1, + _0: _4 + }, + _2, + undefined + ]; + }), (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + TAG: /* Ptype_variant */0, + _0: Stdlib__List.rev(_5) + }, + _4, + _2 + ]; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + return [ + /* Ptype_open */1, + /* Public */1, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + { + TAG: /* Ptype_record */1, + _0: _6 + }, + _4, + _2 + ]; + }), (function (__caml_parser_env) { - return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return /* Invariant */2; - }), + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - return /* Covariant */0; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _1 + ]; + }), (function (__caml_parser_env) { - return /* Contravariant */1; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + return Stdlib__List.rev(Stdlib__Parsing.peek_val(__caml_parser_env, 1)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _1 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + return /* Invariant */2; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* Covariant */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _4, - loc: rhs_loc(4) - }); - }), + return /* Contravariant */1; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return [ - /* [] */0, - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - Stdlib__List.rev(_2), - undefined - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - Stdlib__List.rev(_2), - _4 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - /* [] */0, - _2 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, { + txt: _4, + loc: rhs_loc(4) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + return [ + /* [] */0, + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); - const 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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - if (_2 !== /* Recursive */1) { - not_expecting(2, "nonrec flag"); - } - return mk$20(_8, symbol_docs(undefined), _3, _6, { - txt: _4, - loc: rhs_loc(4) - }, Stdlib__List.rev(_7)); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - if (_2 !== /* Recursive */1) { - not_expecting(2, "nonrec flag"); - } - return mk$20(_8, symbol_docs(undefined), _3, _6, { - txt: _4, - loc: rhs_loc(4) - }, Stdlib__List.rev(_7)); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + Stdlib__List.rev(_2), + undefined + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + Stdlib__List.rev(_2), + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + /* [] */0, + _2 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const info_before_semi = get_info(Stdlib__Parsing.rhs_end_pos(5)); + const 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) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + if (_2 !== /* Recursive */1) { + not_expecting(2, "nonrec flag"); + } + return mk$20(_8, symbol_docs(undefined), _3, _6, { + txt: _4, + loc: rhs_loc(4) + }, Stdlib__List.rev(_7)); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 6); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 5); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _7 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _8 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + if (_2 !== /* Recursive */1) { + not_expecting(2, "nonrec flag"); + } + return mk$20(_8, symbol_docs(undefined), _3, _6, { + txt: _4, + loc: rhs_loc(4) + }, Stdlib__List.rev(_7)); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _3, - loc: rhs_loc(3) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _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) - }, { - txt: _4, - loc: rhs_loc(4) - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - const rhs = last(_3); - return { - TAG: /* Pwith_type */0, - _0: { - txt: _3, - loc: rhs_loc(3) - }, - _1: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, Stdlib__List.rev(_6), undefined, _4, _5, { - txt: rhs, - loc: rhs_loc(3) - }) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _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, { - txt: _3, - loc: rhs_loc(3) - }) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Pwith_module */1, - _0: { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) - }, - _1: { - txt: _4, - loc: rhs_loc(4) - } - }; - }), + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Pwith_modsubst */3, - _0: { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) + }, { + txt: _3, + loc: rhs_loc(3) + }); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) - }, - _1: { + }, { txt: _4, loc: rhs_loc(4) - } - }; - }), + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - return /* Public */1; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const rhs = last(_3); + return { + TAG: /* Pwith_type */0, + _0: { + txt: _3, + loc: rhs_loc(3) + }, + _1: mk$19(symbol_rloc(undefined), undefined, undefined, undefined, _2, Stdlib__List.rev(_6), undefined, _4, _5, { + txt: rhs, + loc: rhs_loc(3) + }) + }; + }), (function (__caml_parser_env) { - return /* Private */0; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _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, { + txt: _3, + loc: rhs_loc(3) + }) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: /* [] */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Pwith_module */1, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + txt: _4, + loc: rhs_loc(4) + } + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Pwith_modsubst */3, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + txt: _4, + loc: rhs_loc(4) + } + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* Public */1; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_1), - _1: _3 - }); - }), + return /* Private */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_poly */8, - _0: Stdlib__List.rev(_1), - _1: _3 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return attr(_1, _2); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_1), + _1: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_alias */6, - _0: _1, - _1: _4 - }); - }), - (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), - (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "?" + _2, - _1: mkoption(_4), - _2: _6 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "?" + _1, - _1: mkoption(_2), - _2: _4 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_poly */8, + _0: Stdlib__List.rev(_1), + _1: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: _1, - _1: _3, - _2: _5 - }); - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_arrow */1, - _0: "", - _1: _1, - _2: _3 - }); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _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) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_alias */6, + _0: _1, + _1: _4 + }); + }), + (function (__caml_parser_env) { + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), + (function (__caml_parser_env) { + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _6 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "?" + _2, + _1: mkoption(_4), + _2: _6 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "?" + _1, + _1: mkoption(_2), + _2: _4 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: _1, + _1: _3, + _2: _5 + }); + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_arrow */1, + _0: "", + _1: _1, + _2: _3 + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (_2) { - if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - } - return _2.hd; + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (_2) { + if (_2.tl) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - }), + return _2.hd; + } + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (_2) { - if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - } - return _2.hd; + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (_2) { + if (_2.tl) { + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error - }); - }), + return _2.hd; + } + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_var */0, - _0: _2 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_var */0, + _0: _2 + }); + }), (function (__caml_parser_env) { - return mktyp(/* Ptyp_any */0); - }), + return mktyp(/* Ptyp_any */0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _1, - loc: rhs_loc(1) - }, - _1: /* [] */0 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _1, + loc: rhs_loc(1) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: { - hd: _1, - tl: /* [] */0 - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: { + hd: _1, + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_constr */3, - _0: { - txt: _4, - loc: rhs_loc(4) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_constr */3, + _0: { + txt: _4, + loc: rhs_loc(4) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_object */4, - _0: _2[0], - _1: _2[1] - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_object */4, + _0: _2[0], + _1: _2[1] + }); + }), (function (__caml_parser_env) { - return mktyp({ - TAG: /* Ptyp_object */4, - _0: /* [] */0, - _1: /* Closed */0 - }); - }), + return mktyp({ + TAG: /* Ptyp_object */4, + _0: /* [] */0, + _1: /* Closed */0 + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _2, - loc: rhs_loc(2) - }, - _1: /* [] */0 - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _2, + loc: rhs_loc(2) + }, + _1: /* [] */0 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _3, - loc: rhs_loc(3) - }, - _1: { - hd: _1, - tl: /* [] */0 - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _3, + loc: rhs_loc(3) + }, + _1: { + hd: _1, + tl: /* [] */0 + } + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_class */5, - _0: { - txt: _5, - loc: rhs_loc(5) - }, - _1: Stdlib__List.rev(_2) - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_class */5, + _0: { + txt: _5, + loc: rhs_loc(5) + }, + _1: Stdlib__List.rev(_2) + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: { - hd: _2, - tl: /* [] */0 - }, - _1: /* Closed */0, - _2: undefined - }); - }), - (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: undefined - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: { + hd: _2, + tl: /* [] */0 + }, + _1: /* Closed */0, + _2: undefined + }); + }), + (function (__caml_parser_env) { + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: undefined + }); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: { - hd: _2, - tl: Stdlib__List.rev(_4) - }, - _1: /* Closed */0, - _2: undefined - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Open */1, - _2: undefined - }); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: { + hd: _2, + tl: Stdlib__List.rev(_4) + }, + _1: /* Closed */0, + _2: undefined + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Open */1, + _2: undefined + }); + }), (function (__caml_parser_env) { - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: /* [] */0, - _1: /* Open */1, - _2: undefined - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: /* [] */0 - }); - }), - (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_variant */7, - _0: Stdlib__List.rev(_3), - _1: /* Closed */0, - _2: Stdlib__List.rev(_5) - }); - }), + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: /* [] */0, + _1: /* Open */1, + _2: undefined + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: /* [] */0 + }); + }), + (function (__caml_parser_env) { + Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_variant */7, + _0: Stdlib__List.rev(_3), + _1: /* Closed */0, + _2: Stdlib__List.rev(_5) + }); + }), (function (__caml_parser_env) { - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return mktyp({ - TAG: /* Ptyp_package */9, - _0: _3 - }); - }), + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return mktyp({ + TAG: /* Ptyp_package */9, + _0: _3 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_extension */10, - _0: _1 - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_extension */10, + _0: _1 + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - /* [] */0 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + /* [] */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _1, - loc: rhs_loc(1) - }, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _1, + loc: rhs_loc(1) + }, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - txt: _2, - loc: rhs_loc(2) - }, - _4 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { + txt: _2, + loc: rhs_loc(2) + }, + _4 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rinherit */1, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rinherit */1, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rtag */0, - _0: _1, - _1: _5, - _2: _3, - _3: Stdlib__List.rev(_4) - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 4); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _5 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rtag */0, + _0: _1, + _1: _5, + _2: _3, + _3: Stdlib__List.rev(_4) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Rtag */0, - _0: _1, - _1: _2, - _2: true, - _3: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Rtag */0, + _0: _1, + _1: _2, + _2: true, + _3: /* [] */0 + }; + }), (function (__caml_parser_env) { - return true; - }), + return true; + }), (function (__caml_parser_env) { - return false; - }), + return false; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _2, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _2, + tl: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_tuple */2, - _0: { - hd: _1, - tl: Stdlib__List.rev(_3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_tuple */2, + _0: { + hd: _1, + tl: Stdlib__List.rev(_3) + } + }); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return mktyp({ - TAG: /* Ptyp_tuple */2, - _0: { - hd: _1, - tl: Stdlib__List.rev(_3) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return mktyp({ + TAG: /* Ptyp_tuple */2, + _0: { + hd: _1, + tl: Stdlib__List.rev(_3) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: /* [] */0 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), + (function (__caml_parser_env) { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: /* [] */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _3, + tl: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { hd: _1, - tl: /* [] */0 - }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + tl: _3[0] + }, + _3[1] + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + { hd: _1, tl: /* [] */0 - }; - }), + }, + /* Closed */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _3, - tl: _1 - }; - }), + return [ + /* [] */0, + /* Open */1 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: _3[0] - }, - _3[1] - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _1, + _4, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - { - hd: _1, - tl: /* [] */0 - }, - /* Closed */0 - ]; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return [ - /* [] */0, - /* Open */1 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _1, - _4, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_char */1, + _0: _1 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_string */2, + _0: _1[0], + _1: _1[1] + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_char */1, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_string */2, - _0: _1[0], - _1: _1[1] - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_nativeint */6, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: _1 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: -_2 | 0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: "-" + _2 + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: -_2 | 0 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: -_2 | 0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: Caml_int64.neg(_2) + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: "-" + _2 - }; - }), + const _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) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: -_2 | 0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int */0, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: Caml_int64.neg(_2) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_float */3, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: Caml_external_polyfill.resolve("nativeint_neg")(_2) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int32 */4, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int */0, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_int64 */5, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_float */3, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Const_nativeint */6, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int32 */4, - _0: _2 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_int64 */5, - _0: _2 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Const_nativeint */6, - _0: _2 - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 1); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return unclosed("(", 1, ")", 3); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return expecting(2, "operator"); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 1); - }), + return expecting(3, "module-expr"); + }), (function (__caml_parser_env) { - Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return unclosed("(", 1, ")", 3); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return expecting(2, "operator"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return expecting(3, "module-expr"); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "!"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "+"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "+."; + }), (function (__caml_parser_env) { - return "!"; - }), + return "-"; + }), (function (__caml_parser_env) { - return "+"; - }), + return "-."; + }), (function (__caml_parser_env) { - return "+."; - }), + return "*"; + }), (function (__caml_parser_env) { - return "-"; - }), + return "="; + }), (function (__caml_parser_env) { - return "-."; - }), + return "<"; + }), (function (__caml_parser_env) { - return "*"; - }), + return ">"; + }), (function (__caml_parser_env) { - return "="; - }), + return "or"; + }), (function (__caml_parser_env) { - return "<"; - }), + return "||"; + }), (function (__caml_parser_env) { - return ">"; - }), + return "&"; + }), (function (__caml_parser_env) { - return "or"; - }), + return "&&"; + }), (function (__caml_parser_env) { - return "||"; - }), + return ":="; + }), (function (__caml_parser_env) { - return "&"; - }), + return "+="; + }), (function (__caml_parser_env) { - return "&&"; - }), + return "%"; + }), (function (__caml_parser_env) { - return ":="; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "+="; - }), + return "()"; + }), (function (__caml_parser_env) { - return "%"; - }), + return "::"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "false"; + }), (function (__caml_parser_env) { - return "()"; - }), + return "true"; + }), (function (__caml_parser_env) { - return "::"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - return "false"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - return "true"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + return { + TAG: /* Lident */0, + _0: "[]" + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + return { + TAG: /* Lident */0, + _0: "()" + }; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return { + TAG: /* Lident */0, + _0: "false" + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "[]" - }; - }), + return { + TAG: /* Lident */0, + _0: "true" + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "()" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "false" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - return { - TAG: /* Lident */0, - _0: "true" - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + if (applicative_functors.contents) { return { - TAG: /* Ldot */1, + TAG: /* Lapply */2, _0: _1, _1: _3 }; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + } + throw new Caml_js_exceptions.MelangeError($$Error$1, { + MEL_EXN_ID: $$Error$1, + _1: { + TAG: /* Applicative_path */3, + _0: symbol_rloc(undefined) + } + }); + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 3); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - if (applicative_functors.contents) { - return { - TAG: /* Lapply */2, - _0: _1, - _1: _3 - }; - } - throw new Caml_js_exceptions.MelangeError($$Error$1, { - MEL_EXN_ID: $$Error$1, - _1: { - TAG: /* Applicative_path */3, - _0: symbol_rloc(undefined) - } - }); - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Lident */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ldot */1, + _0: _1, + _1: _3 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Lident */0, - _0: _1 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: /* Pdir_none */0 + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ldot */1, - _0: _1, - _1: _3 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_string */0, + _0: _3[0] + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: /* Pdir_none */0 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_int */1, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_string */0, - _0: _3[0] - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_ident */2, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_int */1, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_ident */2, + _0: _3 + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_ident */2, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_bool */3, + _0: false + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_ident */2, - _0: _3 - } - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return { + TAG: /* Ptop_dir */1, + _0: _2, + _1: { + TAG: /* Pdir_bool */3, + _0: true + } + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_bool */3, - _0: false - } - }; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return { - TAG: /* Ptop_dir */1, - _0: _2, - _1: { - TAG: /* Pdir_bool */3, - _0: true - } - }; - }), + return /* Nonrecursive */0; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return /* Recursive */1; + }), (function (__caml_parser_env) { - return /* Nonrecursive */0; - }), + return /* Recursive */1; + }), (function (__caml_parser_env) { - return /* Recursive */1; - }), + return /* Nonrecursive */0; + }), (function (__caml_parser_env) { - return /* Recursive */1; - }), + return /* Upto */0; + }), (function (__caml_parser_env) { - return /* Nonrecursive */0; - }), + return /* Downto */1; + }), (function (__caml_parser_env) { - return /* Upto */0; - }), + return /* Public */1; + }), (function (__caml_parser_env) { - return /* Downto */1; - }), + return /* Private */0; + }), (function (__caml_parser_env) { - return /* Public */1; - }), + return /* Immutable */0; + }), (function (__caml_parser_env) { - return /* Private */0; - }), + return /* Mutable */1; + }), (function (__caml_parser_env) { - return /* Immutable */0; - }), + return /* Concrete */1; + }), (function (__caml_parser_env) { - return /* Mutable */1; - }), + return /* Virtual */0; + }), (function (__caml_parser_env) { - return /* Concrete */1; - }), + return [ + /* Public */1, + /* Concrete */1 + ]; + }), (function (__caml_parser_env) { - return /* Virtual */0; - }), + return [ + /* Private */0, + /* Concrete */1 + ]; + }), (function (__caml_parser_env) { - return [ - /* Public */1, - /* Concrete */1 - ]; - }), + return [ + /* Public */1, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Concrete */1 - ]; - }), + return [ + /* Private */0, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return [ - /* Public */1, - /* Virtual */0 - ]; - }), + return [ + /* Private */0, + /* Virtual */0 + ]; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Virtual */0 - ]; - }), + return /* Fresh */1; + }), (function (__caml_parser_env) { - return [ - /* Private */0, - /* Virtual */0 - ]; - }), + return /* Override */0; + }), (function (__caml_parser_env) { - return /* Fresh */1; - }), + + }), (function (__caml_parser_env) { - return /* Override */0; - }), + + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - - }), + + }), (function (__caml_parser_env) { - - }), + return "-"; + }), (function (__caml_parser_env) { - - }), + return "-."; + }), (function (__caml_parser_env) { - return "-"; - }), + return "+"; + }), (function (__caml_parser_env) { - return "-."; - }), + return "+."; + }), (function (__caml_parser_env) { - return "+"; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return "+."; - }), + return Stdlib__Parsing.peek_val(__caml_parser_env, 0); + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "and"; + }), (function (__caml_parser_env) { - return Stdlib__Parsing.peek_val(__caml_parser_env, 0); - }), + return "as"; + }), (function (__caml_parser_env) { - return "and"; - }), + return "assert"; + }), (function (__caml_parser_env) { - return "as"; - }), + return "begin"; + }), (function (__caml_parser_env) { - return "assert"; - }), + return "class"; + }), (function (__caml_parser_env) { - return "begin"; - }), + return "constraint"; + }), (function (__caml_parser_env) { - return "class"; - }), + return "do"; + }), (function (__caml_parser_env) { - return "constraint"; - }), + return "done"; + }), (function (__caml_parser_env) { - return "do"; - }), + return "downto"; + }), (function (__caml_parser_env) { - return "done"; - }), + return "else"; + }), (function (__caml_parser_env) { - return "downto"; - }), + return "end"; + }), (function (__caml_parser_env) { - return "else"; - }), + return "exception"; + }), (function (__caml_parser_env) { - return "end"; - }), + return "external"; + }), (function (__caml_parser_env) { - return "exception"; - }), + return "false"; + }), (function (__caml_parser_env) { - return "external"; - }), + return "for"; + }), (function (__caml_parser_env) { - return "false"; - }), + return "fun"; + }), (function (__caml_parser_env) { - return "for"; - }), + return "function"; + }), (function (__caml_parser_env) { - return "fun"; - }), + return "functor"; + }), (function (__caml_parser_env) { - return "function"; - }), + return "if"; + }), (function (__caml_parser_env) { - return "functor"; - }), + return "in"; + }), (function (__caml_parser_env) { - return "if"; - }), + return "include"; + }), (function (__caml_parser_env) { - return "in"; - }), + return "inherit"; + }), (function (__caml_parser_env) { - return "include"; - }), + return "initializer"; + }), (function (__caml_parser_env) { - return "inherit"; - }), + return "lazy"; + }), (function (__caml_parser_env) { - return "initializer"; - }), + return "let"; + }), (function (__caml_parser_env) { - return "lazy"; - }), + return "match"; + }), (function (__caml_parser_env) { - return "let"; - }), + return "method"; + }), (function (__caml_parser_env) { - return "match"; - }), + return "module"; + }), (function (__caml_parser_env) { - return "method"; - }), + return "mutable"; + }), (function (__caml_parser_env) { - return "module"; - }), + return "new"; + }), (function (__caml_parser_env) { - return "mutable"; - }), + return "object"; + }), (function (__caml_parser_env) { - return "new"; - }), + return "of"; + }), (function (__caml_parser_env) { - return "object"; - }), + return "open"; + }), (function (__caml_parser_env) { - return "of"; - }), + return "or"; + }), (function (__caml_parser_env) { - return "open"; - }), + return "private"; + }), (function (__caml_parser_env) { - return "or"; - }), + return "rec"; + }), (function (__caml_parser_env) { - return "private"; - }), + return "sig"; + }), (function (__caml_parser_env) { - return "rec"; - }), + return "struct"; + }), (function (__caml_parser_env) { - return "sig"; - }), + return "then"; + }), (function (__caml_parser_env) { - return "struct"; - }), + return "to"; + }), (function (__caml_parser_env) { - return "then"; - }), + return "true"; + }), (function (__caml_parser_env) { - return "to"; - }), + return "try"; + }), (function (__caml_parser_env) { - return "true"; - }), + return "type"; + }), (function (__caml_parser_env) { - return "try"; - }), + return "val"; + }), (function (__caml_parser_env) { - return "type"; - }), + return "virtual"; + }), (function (__caml_parser_env) { - return "val"; - }), + return "when"; + }), (function (__caml_parser_env) { - return "virtual"; - }), + return "while"; + }), (function (__caml_parser_env) { - return "when"; - }), + return "with"; + }), (function (__caml_parser_env) { - return "while"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + txt: _1, + loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - return "with"; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + txt: _1 + ("." + _3.txt), + loc: symbol_rloc(undefined) + }; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - txt: _1, - loc: symbol_rloc(undefined) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - txt: _1 + ("." + _3.txt), - loc: symbol_rloc(undefined) - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return /* [] */0; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - hd: _1, - tl: _2 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + hd: _1, + tl: _2 + }; + }), (function (__caml_parser_env) { - return /* [] */0; - }), + return [ + undefined, + /* [] */0 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + undefined, + { hd: _1, tl: _2 - }; - }), - (function (__caml_parser_env) { - return [ - undefined, - /* [] */0 - ]; - }), - (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - undefined, - { - hd: _1, - tl: _2 - } - ]; - }), + } + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); - return [ - _2, - _3 - ]; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _3 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); + return [ + _2, + _3 + ]; + }), (function (__caml_parser_env) { - const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PStr */0, - _0: _1 - }; - }), + const _1 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PStr */0, + _0: _1 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PTyp */1, - _0: _2 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PTyp */1, + _0: _2 + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PPat */2, - _0: _2, - _1: undefined - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PPat */2, + _0: _2, + _1: undefined + }; + }), (function (__caml_parser_env) { - const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); - const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); - return { - TAG: /* PPat */2, - _0: _2, - _1: _4 - }; - }), + const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 2); + const _4 = Stdlib__Parsing.peek_val(__caml_parser_env, 0); + return { + TAG: /* PPat */2, + _0: _2, + _1: _4 + }; + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }), + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, - _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) - }); - }) + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { + MEL_EXN_ID: Stdlib__Parsing.YYexit, + _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) + }); + }) ]; const yytables = { @@ -14090,47 +14090,47 @@ function pp_directive_value(fmt, x) { function list_variables(fmt) { Stdlib__Hashtbl.iter((function (s, dir_value) { - Curry._3(Stdlib__Format.fprintf(fmt)({ - TAG: /* Format */0, + Curry._3(Stdlib__Format.fprintf(fmt)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_gen */18, _0: { - TAG: /* Formatting_gen */18, + TAG: /* Open_box */1, _0: { - TAG: /* Open_box */1, - _0: { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - } - }, + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + } + }, + _1: { + TAG: /* String */2, + _0: /* No_padding */0, _1: { - TAG: /* String */2, - _0: /* No_padding */0, + TAG: /* Formatting_lit */17, + _0: { + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 + }, _1: { - TAG: /* Formatting_lit */17, + TAG: /* Alpha */15, _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: { - TAG: /* Alpha */15, - _0: { + TAG: /* Formatting_lit */17, + _0: /* Close_box */0, + _1: { TAG: /* Formatting_lit */17, - _0: /* Close_box */0, - _1: { - TAG: /* Formatting_lit */17, - _0: /* Flush_newline */4, - _1: /* End_of_format */0 - } + _0: /* Flush_newline */4, + _1: /* End_of_format */0 } } } } - }, - _1: "@[%s@ %a@]@." - }), s, pp_directive_value, dir_value); - }), directive_built_in_values); + } + }, + _1: "@[%s@ %a@]@." + }), s, pp_directive_value, dir_value); + }), directive_built_in_values); } function defined(str) { @@ -14522,25 +14522,25 @@ function directive_parse(token_with_comments, lexbuf) { switch (curr_token.TAG) { case /* FLOAT */1 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_float */1 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_float */1 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_float */1, _0: Caml_format.caml_float_of_string(curr_token._0) }); case /* INT */7 : const v$1 = curr_token._0; return token_op(calc, (function (e) { - push(e); - return v$1 !== 0; - }), { + push(e); + return v$1 !== 0; + }), { TAG: /* Dir_int */2, _0: v$1 }); @@ -14586,37 +14586,37 @@ function directive_parse(token_with_comments, lexbuf) { break; case /* STRING */16 : return token_op(calc, (function (e) { - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: /* Dir_type_string */3 - }, - _2: curr_loc - }); - }), { + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: /* Dir_type_string */3 + }, + _2: curr_loc + }); + }), { TAG: /* Dir_string */3, _0: curr_token._0[0] }); case /* UIDENT */17 : const value_v = query(curr_loc, curr_token._0); return token_op(calc, (function (e) { - push(e); - if (!/* tag */(typeof value_v === "number" || typeof value_v === "string") && value_v.TAG === /* Dir_bool */0) { - return value_v._0; - } - const ty = type_of_directive(value_v); - throw new Caml_js_exceptions.MelangeError($$Error$2, { - MEL_EXN_ID: $$Error$2, - _1: { - TAG: /* Conditional_expr_expected_type */7, - _0: /* Dir_type_bool */0, - _1: ty - }, - _2: curr_loc - }); - }), value_v); + push(e); + if (!/* tag */(typeof value_v === "number" || typeof value_v === "string") && value_v.TAG === /* Dir_bool */0) { + return value_v._0; + } + const ty = type_of_directive(value_v); + throw new Caml_js_exceptions.MelangeError($$Error$2, { + MEL_EXN_ID: $$Error$2, + _1: { + TAG: /* Conditional_expr_expected_type */7, + _0: /* Dir_type_bool */0, + _1: ty + }, + _2: curr_loc + }); + }), value_v); default: throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -15823,9 +15823,9 @@ function token(lexbuf) { case 29 : const stars = Stdlib__Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); const match$2 = with_comment_buffer((function (lexbuf) { - store_string("*" + stars); - return __ocaml_lex_comment_rec(lexbuf, 132); - }), lexbuf); + store_string("*" + stars); + return __ocaml_lex_comment_rec(lexbuf, 132); + }), lexbuf); return { TAG: /* COMMENT */18, _0: [ @@ -16574,11 +16574,11 @@ function token$1(lexbuf) { case /* SHARP */84 : if (at_bol(lexbuf)) { return interpret_directive(lexbuf, (function (lexbuf) { - return loop(lines, docs, lexbuf); - }), (function (token) { - sharp_look_ahead.contents = token; - return /* SHARP */84; - })); + return loop(lines, docs, lexbuf); + }), (function (token) { + sharp_look_ahead.contents = token; + return /* SHARP */84; + })); } break; case /* EOL */100 : @@ -16755,16 +16755,16 @@ function filter_directive(pos, acc, lexbuf) { if (at_bol(lexbuf)) { const start_pos = lexbuf.lex_start_p.pos_cnum; return interpret_directive(lexbuf, (function (lexbuf) { - return filter_directive(lexbuf.lex_curr_p.pos_cnum, { - hd: [ - pos, - start_pos - ], - tl: acc - }, lexbuf); - }), (function (_token) { - return filter_directive(pos, acc, lexbuf); - })); + return filter_directive(lexbuf.lex_curr_p.pos_cnum, { + hd: [ + pos, + start_pos + ], + tl: acc + }, lexbuf); + }), (function (_token) { + return filter_directive(pos, acc, lexbuf); + })); } continue; default: diff --git a/jscomp/test/dist/jscomp/test/pipe_send_readline.js b/jscomp/test/dist/jscomp/test/pipe_send_readline.js index 9c2590884..ca61ade40 100644 --- a/jscomp/test/dist/jscomp/test/pipe_send_readline.js +++ b/jscomp/test/dist/jscomp/test/pipe_send_readline.js @@ -4,10 +4,10 @@ function u(rl) { return rl.on("line", (function (x) { - console.log(x); - })).on("close", (function () { - console.log("finished"); - })); + console.log(x); + })).on("close", (function () { + console.log("finished"); + })); } function xx(h) { diff --git a/jscomp/test/dist/jscomp/test/pipe_syntax.js b/jscomp/test/dist/jscomp/test/pipe_syntax.js index 5658054b8..769a2c934 100644 --- a/jscomp/test/dist/jscomp/test/pipe_syntax.js +++ b/jscomp/test/dist/jscomp/test/pipe_syntax.js @@ -83,8 +83,8 @@ function f8(a) { function hi(x) { return Belt__Belt_Array.map(x, (function (x) { - return x + 1 | 0; - })); + return x + 1 | 0; + })); } const with_poly = { diff --git a/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js b/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js index d2e61da97..65b344be2 100644 --- a/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js +++ b/jscomp/test/dist/jscomp/test/polymorphic_raw_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/ppx_apply_test.js b/jscomp/test/dist/jscomp/test/ppx_apply_test.js index 2e638b856..fdbc5e2b9 100644 --- a/jscomp/test/dist/jscomp/test/ppx_apply_test.js +++ b/jscomp/test/dist/jscomp/test/ppx_apply_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; 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 880442bc2..b9e33b686 100644 --- a/jscomp/test/dist/jscomp/test/ppx_this_obj_field.js +++ b/jscomp/test/dist/jscomp/test/ppx_this_obj_field.js @@ -19,12 +19,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -34,60 +34,60 @@ const v5 = { x: 3, y: 3, setY: (function (v) { - let self = this; - self.y = 2; - return [ - self.y, - v - ]; - }), + let self = this; + self.y = 2; + return [ + self.y, + v + ]; + }), say: (function () { - let self = this; - return self.x + self.y | 0; - }), + let self = this; + return self.x + self.y | 0; + }), hihi: (function (u) { - let self = this; - return self.x + self.say() | 0; - }), + let self = this; + return self.x + self.say() | 0; + }), bark: (function () { - console.log("bark"); - }), + console.log("bark"); + }), xz: (function () { - return 3; - }) + return 3; + }) }; const v = { x: 3, y: 0, reset: (function () { - let self = this; - self.y = 0; - }), + let self = this; + self.y = 0; + }), incr: (function () { - let self = this; - self.y = self.y + 1 | 0; - }), + let self = this; + self.y = self.y + 1 | 0; + }), getY: (function () { - let self = this; - return self.y; - }), + let self = this; + return self.y; + }), say: (function () { - let self = this; - return self.x + self.y | 0; - }) + let self = this; + return self.x + self.y | 0; + }) }; const u = { incr: (function () { - console.log("hey"); - }), + console.log("hey"); + }), getY: (function () { - return 3; - }), + return 3; + }), say: (function () { - return 7; - }) + return 7; + }) }; const test_type_1 = { @@ -105,29 +105,29 @@ const z = { contents: 3 }, setX: (function (x) { - let self = this; - self.x.contents = x; - }), + let self = this; + self.x.contents = x; + }), getX: (function () { - let self = this; - return self.x.contents; - }) + let self = this; + return self.x.contents; + }) }; const eventObj = { events: [], empty: (function () { - let self = this; - self.events.splice(0); - }), + let self = this; + self.events.splice(0); + }), push: (function (a) { - let self = this; - self.events.push(a); - }), + let self = this; + self.events.push(a); + }), needRebuild: (function () { - let self = this; - return self.events.length !== 0; - }) + let self = this; + return self.events.length !== 0; + }) }; function test__(x) { @@ -137,13 +137,13 @@ function test__(x) { const zz = { x: 3, setX: (function (x) { - let self = this; - self.x = x; - }), + let self = this; + self.x = x; + }), getX: (function () { - let self = this; - return self.x; - }) + let self = this; + return self.x; + }) }; const test_type2_1 = { 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 af47f7549..599dc96fe 100644 --- a/jscomp/test/dist/jscomp/test/ppx_this_obj_test.js +++ b/jscomp/test/dist/jscomp/test/ppx_this_obj_test.js @@ -19,12 +19,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -32,59 +32,59 @@ function eq(loc, param) { const v = { x: (function () { - return 3; - }), + return 3; + }), say: (function (x) { - let self = this; - return x * self.x(); - }), + let self = this; + return x * self.x(); + }), hi: (function (x, y) { - let self = this; - return self.say(x) + y; - }) + let self = this; + return self.say(x) + y; + }) }; const v2 = { hi: (function (x, y) { - let self = this; - return self.say(x) + y; - }), + let self = this; + return self.say(x) + y; + }), say: (function (x) { - let self = this; - return x * self.x(); - }), + let self = this; + return x * self.x(); + }), x: (function () { - return 3; - }) + return 3; + }) }; const v3 = { hi: (function (x, y) { - let self = this; - const u = { - x: x - }; - return self.say(u.x) + y + x; - }), + let self = this; + const u = { + x: x + }; + return self.say(u.x) + y + x; + }), say: (function (x) { - let self = this; - return x * self.x(); - }), + let self = this; + return x * self.x(); + }), x: (function () { - return 3; - }) + return 3; + }) }; const v4 = { hi: (function (x, y) { - return x + y; - }), + return x + y; + }), say: (function (x) { - return x; - }), + return x; + }), x: (function () { - return 1; - }) + return 1; + }) }; const collection = [ diff --git a/jscomp/test/dist/jscomp/test/pr_regression_test.js b/jscomp/test/dist/jscomp/test/pr_regression_test.js index 0b4820461..ad14af557 100644 --- a/jscomp/test/dist/jscomp/test/pr_regression_test.js +++ b/jscomp/test/dist/jscomp/test/pr_regression_test.js @@ -79,12 +79,12 @@ function f$3(h, g) { } f$3((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), 3); + return prim0 + prim1 | 0; + }), 3); f$3((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), 3); + return prim0 + prim1 | 0; + }), 3); const d = v$3.contents; @@ -92,22 +92,22 @@ Mt.from_pair_suites("Pr_regression_test", { hd: [ "partial", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - 5, - 5, - 5, - 5 - ], - _1: [ - a, - b, - c, - d - ] - }; - }) + return { + TAG: /* Eq */0, + _0: [ + 5, + 5, + 5, + 5 + ], + _1: [ + a, + b, + c, + d + ] + }; + }) ], tl: /* [] */0 }); diff --git a/jscomp/test/dist/jscomp/test/prepend_data_ffi.js b/jscomp/test/dist/jscomp/test/prepend_data_ffi.js index 473b5fca6..8fb2e5b87 100644 --- a/jscomp/test/dist/jscomp/test/prepend_data_ffi.js +++ b/jscomp/test/dist/jscomp/test/prepend_data_ffi.js @@ -13,20 +13,20 @@ const v2 = { }; process.on("exit", (function (exit_code) { - return String(exit_code); - })); + return String(exit_code); + })); process.on(1, (function (param) { - - })); + + })); process.on((function (i) { - return String(i); - }), "exit"); + return String(i); + }), "exit"); process.on((function (i) { - return String(i); - }), 1); + return String(i); + }), 1); xx(3, 3, "xxx", "a", "b"); @@ -47,13 +47,13 @@ function f(x) { } process.on("exit", (function (exit_code) { - console.log("error code: " + String(exit_code)); - })); + console.log("error code: " + String(exit_code)); + })); function register(p) { p.on("exit", (function (i) { - console.log(i); - })); + console.log(i); + })); } const config = { diff --git a/jscomp/test/dist/jscomp/test/print_alpha_test.js b/jscomp/test/dist/jscomp/test/print_alpha_test.js index e27830c5c..9fb827534 100644 --- a/jscomp/test/dist/jscomp/test/print_alpha_test.js +++ b/jscomp/test/dist/jscomp/test/print_alpha_test.js @@ -13,14 +13,14 @@ Mt.from_pair_suites("Print_alpha_test", { hd: [ "File \"jscomp/test/print_alpha_test.ml\", line 15, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: f((function (prim0, prim1) { - return prim0 + prim1 | 0; - }), undefined)(1, 2), - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: f((function (prim0, prim1) { + return prim0 + prim1 | 0; + }), undefined)(1, 2), + _1: 3 + }; + }) ], tl: /* [] */0 }); diff --git a/jscomp/test/dist/jscomp/test/printf_test.js b/jscomp/test/dist/jscomp/test/printf_test.js index eeba549a2..d51d93ca4 100644 --- a/jscomp/test/dist/jscomp/test/printf_test.js +++ b/jscomp/test/dist/jscomp/test/printf_test.js @@ -41,67 +41,67 @@ function print_pair(fmt, param) { const suites_0 = [ "sprintf_simple", (function (param) { - return { - TAG: /* Eq */0, - _0: "3232", - _1: Curry._2(Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String */2, - _0: /* No_padding */0, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: "%s%d" - }), "32", 32) - }; - }) + return { + TAG: /* Eq */0, + _0: "3232", + _1: Curry._2(Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String */2, + _0: /* No_padding */0, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: "%s%d" + }), "32", 32) + }; + }) ]; const suites_1 = { hd: [ "print_asprintf", (function (param) { - return { - TAG: /* Eq */0, - _0: "xx", - _1: Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "xx", - _1: /* End_of_format */0 - }, - _1: "xx" - }) - }; - }) + return { + TAG: /* Eq */0, + _0: "xx", + _1: Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "xx", + _1: /* End_of_format */0 + }, + _1: "xx" + }) + }; + }) ], tl: { hd: [ "print_pair", (function (param) { - return { - TAG: /* Eq */0, - _0: "(1,2)", - _1: Curry._2(Stdlib__Format.asprintf({ - TAG: /* Format */0, - _0: { - TAG: /* Alpha */15, - _0: /* End_of_format */0 - }, - _1: "%a" - }), print_pair, [ - 1, - 2 - ]) - }; - }) + return { + TAG: /* Eq */0, + _0: "(1,2)", + _1: Curry._2(Stdlib__Format.asprintf({ + TAG: /* Format */0, + _0: { + TAG: /* Alpha */15, + _0: /* End_of_format */0 + }, + _1: "%a" + }), print_pair, [ + 1, + 2 + ]) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/promise_catch_test.js b/jscomp/test/dist/jscomp/test/promise_catch_test.js index f88628b2c..b6506f1ca 100644 --- a/jscomp/test/dist/jscomp/test/promise_catch_test.js +++ b/jscomp/test/dist/jscomp/test/promise_catch_test.js @@ -22,12 +22,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/qcc.js b/jscomp/test/dist/jscomp/test/qcc.js index 39fb7128c..66dedc546 100644 --- a/jscomp/test/dist/jscomp/test/qcc.js +++ b/jscomp/test/dist/jscomp/test/qcc.js @@ -32,27 +32,27 @@ function bufferize(f) { }; return [ (function (param) { - const x = buf.contents; - if (x !== undefined) { - buf.contents = undefined; - return Caml_option.valFromOption(x); - } else { - return Curry._1(f, undefined); - } - }), + const x = buf.contents; + if (x !== undefined) { + buf.contents = undefined; + return Caml_option.valFromOption(x); + } else { + return Curry._1(f, undefined); + } + }), (function (x) { - if (buf.contents !== undefined) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/qcc.ml", - 17, - 4 - ] - }); - } - buf.contents = Caml_option.some(x); - }) + if (buf.contents !== undefined) { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/qcc.ml", + 17, + 4 + ] + }); + } + buf.contents = Caml_option.some(x); + }) ]; } @@ -1788,8 +1788,8 @@ function elfgen(outf) { le(32, 0); const dyn = opos.contents; Stdlib__List.iter((function (param) { - return le(64, param); - }), { + return le(64, param); + }), { hd: 1, tl: { hd: 29, diff --git a/jscomp/test/dist/jscomp/test/queue_test.js b/jscomp/test/dist/jscomp/test/queue_test.js index 4be10db75..63361f98a 100644 --- a/jscomp/test/dist/jscomp/test/queue_test.js +++ b/jscomp/test/dist/jscomp/test/queue_test.js @@ -11,16 +11,16 @@ function Test(Queue) { const to_array = function (q) { const 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); + Caml_array.set(v, i, e); + return i + 1 | 0; + }), 0, q); return v; }; const queue_1 = function (x) { const q = Curry._1(Queue.create, undefined); Stdlib__Array.iter((function (x) { - Curry._2(Queue.add, x, q); - }), x); + Curry._2(Queue.add, x, q); + }), x); return to_array(q); }; return { @@ -32,9 +32,9 @@ function Test(Queue) { function to_array(q) { const v = Caml_array.make(q.length, 0); Stdlib__Queue.fold((function (i, e) { - Caml_array.set(v, i, e); - return i + 1 | 0; - }), 0, q); + Caml_array.set(v, i, e); + return i + 1 | 0; + }), 0, q); return v; } @@ -45,8 +45,8 @@ function queue_1(x) { last: /* Nil */0 }; Stdlib__Array.iter((function (x) { - Stdlib__Queue.add(x, q); - }), x); + Stdlib__Queue.add(x, q); + }), x); return to_array(q); } @@ -58,18 +58,18 @@ const T1 = { const suites_0 = [ "File \"jscomp/test/queue_test.ml\", line 25, characters 2-9", (function (param) { - const x = [ - 3, - 4, - 5, - 2 - ]; - return { - TAG: /* Eq */0, - _0: x, - _1: queue_1(x) - }; - }) + const x = [ + 3, + 4, + 5, + 2 + ]; + return { + TAG: /* Eq */0, + _0: x, + _1: queue_1(x) + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/raw_output_test.js b/jscomp/test/dist/jscomp/test/raw_output_test.js index 0600fbfd2..60c6d3616 100644 --- a/jscomp/test/dist/jscomp/test/raw_output_test.js +++ b/jscomp/test/dist/jscomp/test/raw_output_test.js @@ -11,8 +11,8 @@ function mk(fn) { )(undefined)); console.log((function () { - return 1; - })()); + return 1; + })()); exports.mk = mk; /* Not a pure module */ 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 ced06b875..c3393d9af 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 @@ -6,9 +6,9 @@ const CamlinternalLazy = require("melange/camlinternalLazy.js"); const lazy1 = { LAZY_DONE: false, VAL: (function () { - console.log("Hello, lazy"); - return 1; - }) + console.log("Hello, lazy"); + return 1; + }) }; const lazy2 = { 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 601ea9574..93b4035be 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reactTestUtils.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reactTestUtils.js @@ -53,15 +53,15 @@ function findByAllSelector(element, selector) { function findBySelectorAndTextContent(element, selector, content) { return Belt__Belt_Array.getBy(Array.from(element.querySelectorAll(selector)), (function (node) { - return node.textContent === content; - })); + return node.textContent === content; + })); } function findBySelectorAndPartialTextContent(element, selector, content) { return Belt__Belt_Array.getBy(Array.from(element.querySelectorAll(selector)), (function (node) { - const arg = node.textContent; - return arg.includes(content, undefined); - })); + const arg = node.textContent; + return arg.includes(content, undefined); + })); } const DOM = { @@ -74,15 +74,15 @@ const DOM = { function prepareContainer(container, param) { const containerElement = document.createElement("div"); Belt__Belt_Option.map(document.body, (function (body) { - return body.appendChild(containerElement); - })); + return body.appendChild(containerElement); + })); container.contents = Caml_option.some(containerElement); } function cleanupContainer(container, param) { Belt__Belt_Option.map(container.contents, (function (prim) { - prim.remove(); - })); + prim.remove(); + })); container.contents = undefined; } 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 821bb26f4..c9903e5a5 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reasonReact.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reasonReact.js @@ -62,249 +62,249 @@ function createClass(debugName) { displayName: debugName, subscriptions: null, self: (function (state, retainedProps) { - let $$this = this; - const _x = $$this.handleMethod; - return { - handle: _x, - state: state, - retainedProps: retainedProps, - send: $$this.sendMethod, - onUnmount: $$this.onUnmountMethod - }; - }), + let $$this = this; + const _x = $$this.handleMethod; + return { + handle: _x, + state: state, + retainedProps: retainedProps, + send: $$this.sendMethod, + onUnmount: $$this.onUnmountMethod + }; + }), getInitialState: (function () { - const thisJs = this; - const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - return { - reasonState: Curry._1(convertedReasonProps._0.initialState, undefined) - }; - }), + const thisJs = this; + const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + return { + reasonState: Curry._1(convertedReasonProps._0.initialState, undefined) + }; + }), componentDidMount: (function () { - let $$this = this; - const thisJs = this; - const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - const component = convertedReasonProps._0; - const curTotalState = thisJs.state; - const curReasonState = curTotalState.reasonState; - const self = $$this.self(curReasonState, component.retainedProps); - if (component.didMount !== anyToUnit) { - return Curry._1(component.didMount, self); - } - - }), + let $$this = this; + const thisJs = this; + const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + const component = convertedReasonProps._0; + const curTotalState = thisJs.state; + const curReasonState = curTotalState.reasonState; + const self = $$this.self(curReasonState, component.retainedProps); + if (component.didMount !== anyToUnit) { + return Curry._1(component.didMount, self); + } + + }), componentDidUpdate: (function (prevProps, prevState) { - let $$this = this; - const thisJs = this; - const curState = thisJs.state; - const curReasonState = curState.reasonState; - const newJsProps = thisJs.props; - const newConvertedReasonProps = convertPropsIfTheyreFromJs(newJsProps, thisJs.jsPropsToReason, debugName); - const newComponent = newConvertedReasonProps._0; - if (newComponent.didUpdate === anyToUnit) { - return; - } - const oldConvertedReasonProps = prevProps === newJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(prevProps, thisJs.jsPropsToReason, debugName); - const prevReasonState = prevState.reasonState; - const newSelf = $$this.self(curReasonState, newComponent.retainedProps); - const oldSelf_handle = newSelf.handle; - const oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; - const oldSelf_send = newSelf.send; - const oldSelf_onUnmount = newSelf.onUnmount; - const oldSelf = { - handle: oldSelf_handle, - state: prevReasonState, - retainedProps: oldSelf_retainedProps, - send: oldSelf_send, - onUnmount: oldSelf_onUnmount - }; - Curry._1(newComponent.didUpdate, { - oldSelf: oldSelf, - newSelf: newSelf - }); - }), + let $$this = this; + const thisJs = this; + const curState = thisJs.state; + const curReasonState = curState.reasonState; + const newJsProps = thisJs.props; + const newConvertedReasonProps = convertPropsIfTheyreFromJs(newJsProps, thisJs.jsPropsToReason, debugName); + const newComponent = newConvertedReasonProps._0; + if (newComponent.didUpdate === anyToUnit) { + return; + } + const oldConvertedReasonProps = prevProps === newJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(prevProps, thisJs.jsPropsToReason, debugName); + const prevReasonState = prevState.reasonState; + const newSelf = $$this.self(curReasonState, newComponent.retainedProps); + const oldSelf_handle = newSelf.handle; + const oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; + const oldSelf_send = newSelf.send; + const oldSelf_onUnmount = newSelf.onUnmount; + const oldSelf = { + handle: oldSelf_handle, + state: prevReasonState, + retainedProps: oldSelf_retainedProps, + send: oldSelf_send, + onUnmount: oldSelf_onUnmount + }; + Curry._1(newComponent.didUpdate, { + oldSelf: oldSelf, + newSelf: newSelf + }); + }), componentWillUnmount: (function () { - let $$this = this; - const thisJs = this; - const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - const component = convertedReasonProps._0; - const curState = thisJs.state; - const curReasonState = curState.reasonState; - if (component.willUnmount !== anyToUnit) { - Curry._1(component.willUnmount, $$this.self(curReasonState, component.retainedProps)); - } - const subs = $$this.subscriptions; - if (subs !== null) { - subs.forEach(function (unsubscribe) { - Curry._1(unsubscribe, undefined); - }); - return; - } - - }), - componentWillUpdate: (function (nextProps, nextState) { - let $$this = this; - const thisJs = this; - const newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); - const newComponent = newConvertedReasonProps._0; - if (newComponent.willUpdate === anyToUnit) { - return; - } - const oldJsProps = thisJs.props; - const oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); - const curState = thisJs.state; - const curReasonState = curState.reasonState; - const nextReasonState = nextState.reasonState; - const newSelf = $$this.self(nextReasonState, newComponent.retainedProps); - const oldSelf_handle = newSelf.handle; - const oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; - const oldSelf_send = newSelf.send; - const oldSelf_onUnmount = newSelf.onUnmount; - const oldSelf = { - handle: oldSelf_handle, - state: curReasonState, - retainedProps: oldSelf_retainedProps, - send: oldSelf_send, - onUnmount: oldSelf_onUnmount - }; - Curry._1(newComponent.willUpdate, { - oldSelf: oldSelf, - newSelf: newSelf + let $$this = this; + const thisJs = this; + const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + const component = convertedReasonProps._0; + const curState = thisJs.state; + const curReasonState = curState.reasonState; + if (component.willUnmount !== anyToUnit) { + Curry._1(component.willUnmount, $$this.self(curReasonState, component.retainedProps)); + } + const subs = $$this.subscriptions; + if (subs !== null) { + subs.forEach(function (unsubscribe) { + Curry._1(unsubscribe, undefined); }); - }), + return; + } + + }), + componentWillUpdate: (function (nextProps, nextState) { + let $$this = this; + const thisJs = this; + const newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); + const newComponent = newConvertedReasonProps._0; + if (newComponent.willUpdate === anyToUnit) { + return; + } + const oldJsProps = thisJs.props; + const oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); + const curState = thisJs.state; + const curReasonState = curState.reasonState; + const nextReasonState = nextState.reasonState; + const newSelf = $$this.self(nextReasonState, newComponent.retainedProps); + const oldSelf_handle = newSelf.handle; + const oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; + const oldSelf_send = newSelf.send; + const oldSelf_onUnmount = newSelf.onUnmount; + const oldSelf = { + handle: oldSelf_handle, + state: curReasonState, + retainedProps: oldSelf_retainedProps, + send: oldSelf_send, + onUnmount: oldSelf_onUnmount + }; + Curry._1(newComponent.willUpdate, { + oldSelf: oldSelf, + newSelf: newSelf + }); + }), componentWillReceiveProps: (function (nextProps) { - let $$this = this; - const thisJs = this; - const newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); - const newComponent = newConvertedReasonProps._0; - if (newComponent.willReceiveProps === willReceivePropsDefault) { - return; - } - const oldJsProps = thisJs.props; - const oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); - const oldComponent = oldConvertedReasonProps._0; - thisJs.setState((function (curTotalState, param) { - const curReasonState = curTotalState.reasonState; - const oldSelf = $$this.self(curReasonState, oldComponent.retainedProps); - const nextReasonState = Curry._1(newComponent.willReceiveProps, oldSelf); - if (nextReasonState !== curTotalState) { - return { - reasonState: nextReasonState - }; - } else { - return curTotalState; - } - }), null); - }), + let $$this = this; + const thisJs = this; + const newConvertedReasonProps = convertPropsIfTheyreFromJs(nextProps, thisJs.jsPropsToReason, debugName); + const newComponent = newConvertedReasonProps._0; + if (newComponent.willReceiveProps === willReceivePropsDefault) { + return; + } + const oldJsProps = thisJs.props; + const oldConvertedReasonProps = nextProps === oldJsProps ? newConvertedReasonProps : convertPropsIfTheyreFromJs(oldJsProps, thisJs.jsPropsToReason, debugName); + const oldComponent = oldConvertedReasonProps._0; + thisJs.setState((function (curTotalState, param) { + const curReasonState = curTotalState.reasonState; + const oldSelf = $$this.self(curReasonState, oldComponent.retainedProps); + const nextReasonState = Curry._1(newComponent.willReceiveProps, oldSelf); + if (nextReasonState !== curTotalState) { + return { + reasonState: nextReasonState + }; + } else { + return curTotalState; + } + }), null); + }), shouldComponentUpdate: (function (nextJsProps, nextState, param) { - let $$this = this; - const thisJs = this; - const curJsProps = thisJs.props; - const oldConvertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - const newConvertedReasonProps = nextJsProps === curJsProps ? oldConvertedReasonProps : convertPropsIfTheyreFromJs(nextJsProps, thisJs.jsPropsToReason, debugName); - const newComponent = newConvertedReasonProps._0; - const nextReasonState = nextState.reasonState; - const newSelf = $$this.self(nextReasonState, newComponent.retainedProps); - if (newComponent.shouldUpdate === anyToTrue) { - return true; - } - const curState = thisJs.state; - const curReasonState = curState.reasonState; - const oldSelf_handle = newSelf.handle; - const oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; - const oldSelf_send = newSelf.send; - const oldSelf_onUnmount = newSelf.onUnmount; - const oldSelf = { - handle: oldSelf_handle, - state: curReasonState, - retainedProps: oldSelf_retainedProps, - send: oldSelf_send, - onUnmount: oldSelf_onUnmount - }; - return Curry._1(newComponent.shouldUpdate, { - oldSelf: oldSelf, - newSelf: newSelf - }); - }), + let $$this = this; + const thisJs = this; + const curJsProps = thisJs.props; + const oldConvertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + const newConvertedReasonProps = nextJsProps === curJsProps ? oldConvertedReasonProps : convertPropsIfTheyreFromJs(nextJsProps, thisJs.jsPropsToReason, debugName); + const newComponent = newConvertedReasonProps._0; + const nextReasonState = nextState.reasonState; + const newSelf = $$this.self(nextReasonState, newComponent.retainedProps); + if (newComponent.shouldUpdate === anyToTrue) { + return true; + } + const curState = thisJs.state; + const curReasonState = curState.reasonState; + const oldSelf_handle = newSelf.handle; + const oldSelf_retainedProps = oldConvertedReasonProps._0.retainedProps; + const oldSelf_send = newSelf.send; + const oldSelf_onUnmount = newSelf.onUnmount; + const oldSelf = { + handle: oldSelf_handle, + state: curReasonState, + retainedProps: oldSelf_retainedProps, + send: oldSelf_send, + onUnmount: oldSelf_onUnmount + }; + return Curry._1(newComponent.shouldUpdate, { + oldSelf: oldSelf, + newSelf: newSelf + }); + }), onUnmountMethod: (function (subscription) { - let $$this = this; - const subs = $$this.subscriptions; - if (subs !== null) { - subs.push(subscription); - } else { - $$this.subscriptions = [subscription]; - } - }), + let $$this = this; + const subs = $$this.subscriptions; + if (subs !== null) { + subs.push(subscription); + } else { + $$this.subscriptions = [subscription]; + } + }), handleMethod: (function (callback) { - let $$this = this; - const thisJs = this; - return function (callbackPayload) { - const curState = thisJs.state; - const curReasonState = curState.reasonState; - const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - Curry._2(callback, callbackPayload, $$this.self(curReasonState, convertedReasonProps._0.retainedProps)); - }; - }), - sendMethod: (function (action) { - let $$this = this; - const thisJs = this; - const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - const component = convertedReasonProps._0; - if (component.reducer === reducerDefault) { - return; - } - const sideEffects = { - contents: (function (prim) { - - }) - }; - const partialStateApplication = Curry._1(component.reducer, action); - thisJs.setState((function (curTotalState, param) { - const curReasonState = curTotalState.reasonState; - const reasonStateUpdate = Curry._1(partialStateApplication, curReasonState); - if (reasonStateUpdate === /* NoUpdate */0) { - return null; - } - let nextTotalState; - if (/* tag */typeof reasonStateUpdate === "number" || typeof reasonStateUpdate === "string") { - nextTotalState = curTotalState; - } else { - switch (reasonStateUpdate.TAG) { - case /* Update */0 : - nextTotalState = { - reasonState: reasonStateUpdate._0 - }; - break; - case /* SideEffects */1 : - sideEffects.contents = reasonStateUpdate._0; - nextTotalState = curTotalState; - break; - case /* UpdateWithSideEffects */2 : - sideEffects.contents = reasonStateUpdate._1; - nextTotalState = { - reasonState: reasonStateUpdate._0 - }; - break; - - } - } - if (nextTotalState !== curTotalState) { - return nextTotalState; - } else { - return null; - } - }), $$this.handleMethod(function (param, self) { - Curry._1(sideEffects.contents, self); - })); - }), - render: (function () { - let $$this = this; - const thisJs = this; - const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); - const created = convertedReasonProps._0; + let $$this = this; + const thisJs = this; + return function (callbackPayload) { const curState = thisJs.state; const curReasonState = curState.reasonState; - return Curry._1(created.render, $$this.self(curReasonState, created.retainedProps)); - }) + const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + Curry._2(callback, callbackPayload, $$this.self(curReasonState, convertedReasonProps._0.retainedProps)); + }; + }), + sendMethod: (function (action) { + let $$this = this; + const thisJs = this; + const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + const component = convertedReasonProps._0; + if (component.reducer === reducerDefault) { + return; + } + const sideEffects = { + contents: (function (prim) { + + }) + }; + const partialStateApplication = Curry._1(component.reducer, action); + thisJs.setState((function (curTotalState, param) { + const curReasonState = curTotalState.reasonState; + const reasonStateUpdate = Curry._1(partialStateApplication, curReasonState); + if (reasonStateUpdate === /* NoUpdate */0) { + return null; + } + let nextTotalState; + if (/* tag */typeof reasonStateUpdate === "number" || typeof reasonStateUpdate === "string") { + nextTotalState = curTotalState; + } else { + switch (reasonStateUpdate.TAG) { + case /* Update */0 : + nextTotalState = { + reasonState: reasonStateUpdate._0 + }; + break; + case /* SideEffects */1 : + sideEffects.contents = reasonStateUpdate._0; + nextTotalState = curTotalState; + break; + case /* UpdateWithSideEffects */2 : + sideEffects.contents = reasonStateUpdate._1; + nextTotalState = { + reasonState: reasonStateUpdate._0 + }; + break; + + } + } + if (nextTotalState !== curTotalState) { + return nextTotalState; + } else { + return null; + } + }), $$this.handleMethod(function (param, self) { + Curry._1(sideEffects.contents, self); + })); + }), + render: (function () { + let $$this = this; + const thisJs = this; + const convertedReasonProps = convertPropsIfTheyreFromJs(thisJs.props, thisJs.jsPropsToReason, debugName); + const created = convertedReasonProps._0; + const curState = thisJs.state; + const curReasonState = curState.reasonState; + return Curry._1(created.render, $$this.self(curReasonState, created.retainedProps)); + }) }); } @@ -366,16 +366,16 @@ const dummyInteropComponent = basicComponent("interop"); function wrapJsForReason(reactClass, props, children) { const jsElementWrapped = (function (param, param$1) { - const props$1 = Object.assign(Object.assign({}, props), { - ref: param$1, - key: param - }); - const varargs = [ - reactClass, - props$1 - ].concat(children); - return React.createElement.apply(null, varargs); - }); + const props$1 = Object.assign(Object.assign({}, props), { + ref: param$1, + key: param + }); + const varargs = [ + reactClass, + props$1 + ].concat(children); + return React.createElement.apply(null, varargs); + }); return { debugName: dummyInteropComponent.debugName, reactClassInternal: dummyInteropComponent.reactClassInternal, 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 b0d1fad34..68c423941 100644 --- a/jscomp/test/dist/jscomp/test/re_or_res/reasonReactRouter.js +++ b/jscomp/test/dist/jscomp/test/re_or_res/reasonReactRouter.js @@ -169,21 +169,21 @@ function useUrl(serverUrl, param) { const setUrl = match[1]; const url$1 = match[0]; React.useEffect((function () { - const watcherId = watchUrl(function (url) { - Curry._1(setUrl, (function (param) { - return url; - })); - }); - const newUrl = url(undefined); - if (urlNotEqual(newUrl, url$1)) { - Curry._1(setUrl, (function (param) { - return newUrl; + const watcherId = watchUrl(function (url) { + Curry._1(setUrl, (function (param) { + return url; })); - } - return (function (param) { - unwatchUrl(watcherId); }); - }), []); + const newUrl = url(undefined); + if (urlNotEqual(newUrl, url$1)) { + Curry._1(setUrl, (function (param) { + return newUrl; + })); + } + return (function (param) { + unwatchUrl(watcherId); + }); + }), []); return url$1; } diff --git a/jscomp/test/dist/jscomp/test/rec_fun_test.js b/jscomp/test/dist/jscomp/test/rec_fun_test.js index 22af9c8ae..58f91f156 100644 --- a/jscomp/test/dist/jscomp/test/rec_fun_test.js +++ b/jscomp/test/dist/jscomp/test/rec_fun_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/rec_module_test.js b/jscomp/test/dist/jscomp/test/rec_module_test.js index 7de0da672..8f108b82a 100644 --- a/jscomp/test/dist/jscomp/test/rec_module_test.js +++ b/jscomp/test/dist/jscomp/test/rec_module_test.js @@ -484,8 +484,8 @@ function split_bis(x, param) { TAG: /* NotFound */0, _0: /* Empty */0, _1: (function (param) { - return /* Empty */0; - }) + return /* Empty */0; + }) }; } const r = param.r; @@ -505,8 +505,8 @@ function split_bis(x, param) { TAG: /* NotFound */0, _0: match._0, _1: (function (param) { - return join(Curry._1(rl, undefined), v, r); - }) + return join(Curry._1(rl, undefined), v, r); + }) }; } const match$1 = split_bis(x, r); @@ -1152,8 +1152,8 @@ function of_list(l) { function add_seq(i, m) { return Stdlib__Seq.fold_left((function (s, x) { - return add(x, s); - }), m, i); + return add(x, s); + }), m, i); } function of_seq(i) { @@ -1169,8 +1169,8 @@ function seq_of_enum_(c, param) { TAG: /* Cons */0, _0: c._0, _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1208,8 +1208,8 @@ function rev_seq_of_enum_(c, param) { TAG: /* Cons */0, _0: c._0, _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } @@ -1308,107 +1308,107 @@ const ASet = { const suites_0 = [ "test1", (function (param) { - return { - TAG: /* Eq */0, - _0: [ - true, - true, - false, - false - ], - _1: [ - Curry._1(A.even, 2), - Curry._1(even$1, 4), - Curry._1(B.odd, 2), - Curry._1(odd$1, 4) - ] - }; - }) + return { + TAG: /* Eq */0, + _0: [ + true, + true, + false, + false + ], + _1: [ + Curry._1(A.even, 2), + Curry._1(even$1, 4), + Curry._1(B.odd, 2), + Curry._1(odd$1, 4) + ] + }; + }) ]; const suites_1 = { hd: [ "test2", (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._1(y, undefined), - _1: 32 - }; - }) + return { + TAG: /* Eq */0, + _0: Curry._1(y, undefined), + _1: 32 + }; + }) ], tl: { hd: [ "test3", (function (param) { - return { - TAG: /* Eq */0, - _0: Curry._1(x, undefined), - _1: 35 - }; - }) + return { + TAG: /* Eq */0, + _0: Curry._1(x, undefined), + _1: 35 + }; + }) ], tl: { hd: [ "test4", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Curry._1(A.even, 2) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Curry._1(A.even, 2) + }; + }) ], tl: { hd: [ "test4", (function (param) { - return { - TAG: /* Eq */0, - _0: true, - _1: Curry._1(even$1, 4) - }; - }) + return { + TAG: /* Eq */0, + _0: true, + _1: Curry._1(even$1, 4) + }; + }) ], tl: { hd: [ "test5", (function (param) { - return { - TAG: /* Eq */0, - _0: false, - _1: Curry._1(B.odd, 2) - }; - }) + return { + TAG: /* Eq */0, + _0: false, + _1: Curry._1(B.odd, 2) + }; + }) ], tl: { hd: [ "test6", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Curry._1(cardinal, Curry._1(of_list, { + return { + TAG: /* Eq */0, + _0: 2, + _1: Curry._1(cardinal, Curry._1(of_list, { + hd: { + TAG: /* Leaf */0, + _0: "a" + }, + tl: { hd: { TAG: /* Leaf */0, - _0: "a" + _0: "b" }, tl: { hd: { TAG: /* Leaf */0, - _0: "b" + _0: "a" }, - tl: { - hd: { - TAG: /* Leaf */0, - _0: "a" - }, - tl: /* [] */0 - } + tl: /* [] */0 } - })) - }; - }) + } + })) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/rec_value_test.js b/jscomp/test/dist/jscomp/test/rec_value_test.js index cae7e1a3c..7d09900ad 100644 --- a/jscomp/test/dist/jscomp/test/rec_value_test.js +++ b/jscomp/test/dist/jscomp/test/rec_value_test.js @@ -81,15 +81,15 @@ const h = { const v = { contents: (function (param) { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/rec_value_test.ml", - 36, - 24 - ] - }); - }) + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/rec_value_test.ml", + 36, + 24 + ] + }); + }) }; function fib(n) { @@ -167,8 +167,8 @@ function even2(_n) { const lazy_v = { LAZY_DONE: true, VAL: (function (param) { - CamlinternalLazy.force(lazy_v); - }) + CamlinternalLazy.force(lazy_v); + }) }; function sum(_acc, _n) { @@ -310,55 +310,45 @@ function xtl(h) { const suites_0 = [ "File \"jscomp/test/rec_value_test.ml\", line 128, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: phd(ptl(ptl(x0))) - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: phd(ptl(ptl(x0))) + }; + }) ]; const suites_1 = { hd: [ "File \"jscomp/test/rec_value_test.ml\", line 130, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: 1 - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: 1 + }; + }) ], tl: { hd: [ "hd", (function (param) { - return { - TAG: /* Eq */0, - _0: 1, - _1: Stdlib__List.hd(Stdlib__List.tl(x)) - }; - }) + return { + TAG: /* Eq */0, + _0: 1, + _1: Stdlib__List.hd(Stdlib__List.tl(x)) + }; + }) ], tl: { hd: [ "mutual", (function (param) { - let tmp; - if (a) { - const match = a.tl; - if (match) { - tmp = match.hd; - } else { - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/rec_value_test.ml", - 142, - 2 - ] - }); - } + let tmp; + if (a) { + const match = a.tl; + if (match) { + tmp = match.hd; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -369,170 +359,180 @@ const suites_1 = { ] }); } - return { - TAG: /* Eq */0, - _0: 3, - _1: tmp - }; - }) + } else { + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/rec_value_test.ml", + 142, + 2 + ] + }); + } + return { + TAG: /* Eq */0, + _0: 3, + _1: tmp + }; + }) ], tl: { hd: [ "rec_sum", (function (param) { - return { - TAG: /* Eq */0, - _0: 55, - _1: sum(0, 10) - }; - }) + return { + TAG: /* Eq */0, + _0: 55, + _1: sum(0, 10) + }; + }) ], tl: { hd: [ "File \"jscomp/test/rec_value_test.ml\", line 145, characters 2-9", (function (param) { + return { + TAG: /* Eq */0, + _0: { + hd: 1, + tl: { + hd: 2, + tl: /* [] */0 + } + }, + _1: fake_v + }; + }) + ], + tl: { + hd: [ + "File \"jscomp/test/rec_value_test.ml\", line 148, characters 2-9", + (function (param) { return { TAG: /* Eq */0, _0: { - hd: 1, + hd: 2, tl: { - hd: 2, + hd: 3, tl: /* [] */0 } }, - _1: fake_v + _1: fake_y }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/rec_value_test.ml\", line 148, characters 2-9", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/rec_value_test.ml\", line 151, characters 2-9", + (function (param) { return { TAG: /* Eq */0, _0: { - hd: 2, + hd: 1, tl: { - hd: 3, - tl: /* [] */0 + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } } }, - _1: fake_y + _1: fake_z }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/rec_value_test.ml\", line 151, characters 2-9", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/rec_value_test.ml\", line 154, characters 2-9", + (function (param) { return { TAG: /* Eq */0, _0: { hd: 1, tl: { - hd: 2, + hd: 55, tl: { - hd: 3, - tl: /* [] */0 + hd: 2, + tl: { + hd: 3, + tl: /* [] */0 + } } } }, - _1: fake_z + _1: fake_z2 }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/rec_value_test.ml\", line 154, characters 2-9", - (function (param) { + ], + tl: { + hd: [ + "File \"jscomp/test/rec_value_test.ml\", line 157, characters 2-9", + (function (param) { return { TAG: /* Eq */0, _0: { - hd: 1, + hd: 2, tl: { - hd: 55, - tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - } + hd: 3, + tl: /* [] */0 } }, - _1: fake_z2 + _1: fake_y2 }; }) - ], - tl: { - hd: [ - "File \"jscomp/test/rec_value_test.ml\", line 157, characters 2-9", - (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } - }, - _1: fake_y2 - }; - }) ], tl: { hd: [ "File \"jscomp/test/rec_value_test.ml\", line 160, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: 3 - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: 3 + }; + }) ], tl: { hd: [ "File \"jscomp/test/rec_value_test.ml\", line 163, characters 2-9", (function (param) { - if (rec_variant_b.TAG === /* B */0) { + if (rec_variant_b.TAG === /* B */0) { + return { + TAG: /* Eq */0, + _0: Curry._1(rec_variant_b_1, undefined), + _1: rec_variant_a + }; + } + throw new Caml_js_exceptions.MelangeError("Assert_failure", { + MEL_EXN_ID: "Assert_failure", + _1: [ + "jscomp/test/rec_value_test.ml", + 166, + 11 + ] + }); + }) + ], + tl: { + hd: [ + "File \"jscomp/test/rec_value_test.ml\", line 168, characters 2-9", + (function (param) { + if (rec_variant_a.TAG !== /* B */0) { return { TAG: /* Eq */0, - _0: Curry._1(rec_variant_b_1, undefined), - _1: rec_variant_a + _0: Curry._1(rec_variant_a_1, undefined), + _1: rec_variant_b }; } throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ "jscomp/test/rec_value_test.ml", - 166, + 171, 11 ] }); }) - ], - tl: { - hd: [ - "File \"jscomp/test/rec_value_test.ml\", line 168, characters 2-9", - (function (param) { - if (rec_variant_a.TAG !== /* B */0) { - return { - TAG: /* Eq */0, - _0: Curry._1(rec_variant_a_1, undefined), - _1: rec_variant_b - }; - } - throw new Caml_js_exceptions.MelangeError("Assert_failure", { - MEL_EXN_ID: "Assert_failure", - _1: [ - "jscomp/test/rec_value_test.ml", - 171, - 11 - ] - }); - }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/record_with_test.js b/jscomp/test/dist/jscomp/test/record_with_test.js index b14f2603a..1bd6dfc36 100644 --- a/jscomp/test/dist/jscomp/test/record_with_test.js +++ b/jscomp/test/dist/jscomp/test/record_with_test.js @@ -40,12 +40,12 @@ function f(g, h) { const suites_0 = [ "eq_with", (function (param) { - return { - TAG: /* Eq */0, - _0: v, - _1: u_v - }; - }) + return { + TAG: /* Eq */0, + _0: v, + _1: u_v + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/recursive_module.js b/jscomp/test/dist/jscomp/test/recursive_module.js index 05d43e975..fee9d96fc 100644 --- a/jscomp/test/dist/jscomp/test/recursive_module.js +++ b/jscomp/test/dist/jscomp/test/recursive_module.js @@ -24,8 +24,8 @@ function eq(loc, x, y) { const Xx = { f: (function (prim0, prim1) { - return Caml_external_polyfill.resolve("caml_hfiehi")(prim0, prim1); - }) + return Caml_external_polyfill.resolve("caml_hfiehi")(prim0, prim1); + }) }; const Int3 = Caml_module.init_mod([ @@ -75,8 +75,8 @@ const Intb = Caml_module.init_mod([ const a = { LAZY_DONE: false, VAL: (function () { - return CamlinternalLazy.force(Intb.a); - }) + return CamlinternalLazy.force(Intb.a); + }) }; Caml_module.update_mod({ @@ -92,8 +92,8 @@ Caml_module.update_mod({ const a$1 = { LAZY_DONE: false, VAL: (function () { - return CamlinternalLazy.force(Inta.a) + 1 | 0; - }) + return CamlinternalLazy.force(Inta.a) + 1 | 0; + }) }; Caml_module.update_mod({ @@ -149,8 +149,8 @@ const Intb$1 = Caml_module.init_mod([ const a$2 = { LAZY_DONE: false, VAL: (function () { - return CamlinternalLazy.force(Intb$1.a) + 1 | 0; - }) + return CamlinternalLazy.force(Intb$1.a) + 1 | 0; + }) }; Caml_module.update_mod({ diff --git a/jscomp/test/dist/jscomp/test/recursive_module_test.js b/jscomp/test/dist/jscomp/test/recursive_module_test.js index 6ddf93c40..fffab4751 100644 --- a/jscomp/test/dist/jscomp/test/recursive_module_test.js +++ b/jscomp/test/dist/jscomp/test/recursive_module_test.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -81,13 +81,13 @@ eq("File \"jscomp/test/recursive_module_test.ml\", line 30, characters 5-12", 12 add([ "File \"jscomp/test/recursive_module_test.ml\", line 34, characters 7-14", (function (param) { - return { - TAG: /* ThrowAny */7, - _0: (function (param) { - Curry._1(Int3.u, 3); - }) - }; - }) + return { + TAG: /* ThrowAny */7, + _0: (function (param) { + Curry._1(Int3.u, 3); + }) + }; + }) ]); Mt.from_pair_suites("Recursive_module_test", suites.contents); diff --git a/jscomp/test/dist/jscomp/test/scanf_io.js b/jscomp/test/dist/jscomp/test/scanf_io.js index 0287972e6..4447aef18 100644 --- a/jscomp/test/dist/jscomp/test/scanf_io.js +++ b/jscomp/test/dist/jscomp/test/scanf_io.js @@ -92,14 +92,14 @@ function get_lines(fname) { }, _1: " %S -> %S; " }), (function (x, y) { - l.contents = { - hd: [ - x, - y - ], - tl: l.contents - }; - })); + l.contents = { + hd: [ + x, + y + ], + tl: l.contents + }; + })); }; return Stdlib__List.rev(l.contents); } 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 eaa75153c..fc60f4018 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 @@ -32,66 +32,66 @@ function scan_rest(ib, accu) { }, _1: "%[]]" }), (function (param) { - if (param === "]") { - return accu; - } else { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } + if (param === "]") { + return accu; + } else { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 } - }, - _1: " %i " - }), (function (i) { - let accu$1 = { - hd: i, - tl: accu - }; - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Scan_char_set */20, - _0: 1, - _1: "\0\0\0\0\0\0\0\b\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: /* End_of_format */0 - }, - _1: "%1[];]" - }), (function (param) { - switch (param) { - case ";" : - return scan_rest(ib, accu$1); - case "]" : - return accu$1; - default: - const s = Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "scan_int_list", - _1: /* End_of_format */0 - }, - _1: "scan_int_list" - }); - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: s - }); - } - })); - })); - } - })); + } + }, + _1: " %i " + }), (function (i) { + let accu$1 = { + hd: i, + tl: accu + }; + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Scan_char_set */20, + _0: 1, + _1: "\0\0\0\0\0\0\0\b\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: /* End_of_format */0 + }, + _1: "%1[];]" + }), (function (param) { + switch (param) { + case ";" : + return scan_rest(ib, accu$1); + case "]" : + return accu$1; + default: + const s = Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "scan_int_list", + _1: /* End_of_format */0 + }, + _1: "scan_int_list" + }); + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: s + }); + } + })); + })); + } + })); } function scan_int_list(ib) { diff --git a/jscomp/test/dist/jscomp/test/scanf_test.js b/jscomp/test/dist/jscomp/test/scanf_test.js index 68282169c..8ef85096b 100644 --- a/jscomp/test/dist/jscomp/test/scanf_test.js +++ b/jscomp/test/dist/jscomp/test/scanf_test.js @@ -40,8 +40,8 @@ eq("File \"jscomp/test/scanf_test.ml\", line 6, characters 5-12", [ }, _1: "%d %d" }), (function (x, y) { - return x + y | 0; - })), + return x + y | 0; + })), 63 ]); @@ -57,8 +57,8 @@ eq("File \"jscomp/test/scanf_test.ml\", line 7, characters 5-12", [ }, _1: "%Lu" }), (function (i) { - return i; - })), + return i; + })), [ -1429646511, 235324607 diff --git a/jscomp/test/dist/jscomp/test/sexp.js b/jscomp/test/dist/jscomp/test/sexp.js index 04de2fe47..15443e1b4 100644 --- a/jscomp/test/dist/jscomp/test/sexp.js +++ b/jscomp/test/dist/jscomp/test/sexp.js @@ -139,8 +139,8 @@ function of_record(l) { return { NAME: "List", VAL: Stdlib__List.map((function (param) { - return of_field(param[0], param[1]); - }), l) + return of_field(param[0], param[1]); + }), l) }; } @@ -257,8 +257,8 @@ function to_float(e) { function to_string(e) { return _try_atom(e, (function (x) { - return x; - })); + return x; + })); } function to_pair(e) { @@ -284,16 +284,16 @@ function to_pair(e) { function to_pair_with(f1, f2, e) { return $great$great$eq(to_pair(e), (function (param) { - const 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 [ - x, - y - ]; - })); - })); - })); + const 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 [ + x, + y + ]; + })); + })); + })); } function to_triple(e) { @@ -324,20 +324,20 @@ function to_triple(e) { function to_triple_with(f1, f2, f3, e) { return $great$great$eq(to_triple(e), (function (param) { - const z = param[2]; - const 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) { - return [ - x, - y, - z - ]; - })); + const z = param[2]; + const 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) { + return [ + x, + y, + z + ]; })); - })); - })); + })); + })); + })); } function to_list(e) { diff --git a/jscomp/test/dist/jscomp/test/sexpm.js b/jscomp/test/dist/jscomp/test/sexpm.js index 7cb285d2a..541a25c56 100644 --- a/jscomp/test/dist/jscomp/test/sexpm.js +++ b/jscomp/test/dist/jscomp/test/sexpm.js @@ -110,11 +110,11 @@ function to_buf(b, t) { if (l.tl) { Stdlib__Buffer.add_char(b, /* '(' */40); Stdlib__List.iteri((function (i, t$p) { - if (i > 0) { - Stdlib__Buffer.add_char(b, /* ' ' */32); - } - to_buf(b, t$p); - }), l); + if (i > 0) { + Stdlib__Buffer.add_char(b, /* ' ' */32); + } + to_buf(b, t$p); + }), l); return Stdlib__Buffer.add_char(b, /* ')' */41); } else { return Curry._2(Stdlib__Printf.bprintf(b, { @@ -198,24 +198,24 @@ function print(fmt, t) { _1: "@[(" }); Stdlib__List.iteri((function (i, t$p) { - if (i > 0) { - Stdlib__Format.fprintf(fmt)({ - TAG: /* Format */0, + if (i > 0) { + Stdlib__Format.fprintf(fmt)({ + TAG: /* Format */0, + _0: { + TAG: /* Formatting_lit */17, _0: { - TAG: /* Formatting_lit */17, - _0: { - TAG: /* Break */0, - _0: "@ ", - _1: 1, - _2: 0 - }, - _1: /* End_of_format */0 + TAG: /* Break */0, + _0: "@ ", + _1: 1, + _2: 0 }, - _1: "@ " - }); - } - print(fmt, t$p); - }), l); + _1: /* End_of_format */0 + }, + _1: "@ " + }); + } + print(fmt, t$p); + }), l); return Stdlib__Format.fprintf(fmt)({ TAG: /* Format */0, _0: { @@ -301,11 +301,11 @@ function print_noindent(fmt, t) { if (l.tl) { Stdlib__Format.pp_print_char(fmt, /* '(' */40); Stdlib__List.iteri((function (i, t$p) { - if (i > 0) { - Stdlib__Format.pp_print_char(fmt, /* ' ' */32); - } - print_noindent(fmt, t$p); - }), l); + if (i > 0) { + Stdlib__Format.pp_print_char(fmt, /* ' ' */32); + } + print_noindent(fmt, t$p); + }), l); return Stdlib__Format.pp_print_char(fmt, /* ')' */41); } else { return Curry._2(Stdlib__Format.fprintf(fmt)({ @@ -362,9 +362,9 @@ function to_chan(oc, t) { function to_file_seq(filename, seq) { const f = function (oc) { return Curry._1(seq, (function (t) { - to_chan(oc, t); - Caml_io.caml_ml_output_char(oc, /* '\n' */10); - })); + to_chan(oc, t); + Caml_io.caml_ml_output_char(oc, /* '\n' */10); + })); }; const oc = Stdlib.open_out(filename); try { @@ -382,8 +382,8 @@ function to_file_seq(filename, seq) { function to_file(filename, t) { to_file_seq(filename, (function (k) { - Curry._1(k, t); - })); + Curry._1(k, t); + })); } function $$return(x) { @@ -486,12 +486,12 @@ function _error(t, msg) { _1: "at %d, %d: " }), t.line, t.col); return Stdlib__Printf.kbprintf((function (b) { - const msg$p = Stdlib__Buffer.contents(b); - return { - NAME: "Error", - VAL: msg$p - }; - }), b, msg); + const msg$p = Stdlib__Buffer.contents(b); + return { + NAME: "Error", + VAL: msg$p + }; + }), b, msg); } function _error_eof(t) { @@ -510,8 +510,8 @@ function expr(k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return expr(k, param); - }), _error_eof); + return expr(k, param); + }), _error_eof); } const c = _get(t); if (c >= 11) { @@ -531,8 +531,8 @@ function expr_starting_with(c, k, t) { if (c >= 42) { if (c === 59) { return skip_comment((function (param, param$1) { - return expr(k, t); - }), t); + return expr(k, t); + }), t); } if (c === 92) { return _error(t, { @@ -601,8 +601,8 @@ function expr_list(acc, k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return expr_list(acc, k, param); - }), _error_eof); + return expr_list(acc, k, param); + }), _error_eof); } const c = _get(t); if (c > 32 || c < 9) { @@ -617,37 +617,37 @@ function expr_list(acc, k, t) { continue; } return expr_starting_with(c, (function (last, e) { - if (last !== undefined) { - if (last !== 40) { - if (last !== 41) { - return expr_list({ - hd: e, - tl: acc - }, k, t); - } else { - return Curry._2(k, undefined, { - NAME: "List", - VAL: Stdlib__List.rev({ - hd: e, - tl: acc - }) - }); - } + if (last !== undefined) { + if (last !== 40) { + if (last !== 41) { + return expr_list({ + hd: e, + tl: acc + }, k, t); } else { - return expr_list(/* [] */0, (function (param, l) { - return expr_list({ - hd: l, - tl: acc - }, k, t); - }), t); + return Curry._2(k, undefined, { + NAME: "List", + VAL: Stdlib__List.rev({ + hd: e, + tl: acc + }) + }); } } else { - return expr_list({ - hd: e, - tl: acc - }, k, t); + return expr_list(/* [] */0, (function (param, l) { + return expr_list({ + hd: l, + tl: acc + }, k, t); + }), t); } - }), t); + } else { + return expr_list({ + hd: e, + tl: acc + }, k, t); + } + }), t); }; } @@ -664,10 +664,10 @@ function atom(k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return atom(k, param); - }), (function (param) { - return _return_atom(undefined, k, param); - })); + return atom(k, param); + }), (function (param) { + return _return_atom(undefined, k, param); + })); } const c = _get(t); let exit = 0; @@ -730,8 +730,8 @@ function quoted(k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return quoted(k, param); - }), _error_eof); + return quoted(k, param); + }), _error_eof); } const c = _get(t); if (c === 34) { @@ -739,9 +739,9 @@ function quoted(k, t) { } if (c === 92) { return escaped((function (c) { - Stdlib__Buffer.add_char(t.atom, c); - return quoted(k, t); - }), t); + Stdlib__Buffer.add_char(t.atom, c); + return quoted(k, t); + }), t); } Stdlib__Buffer.add_char(t.atom, c); continue; @@ -751,8 +751,8 @@ function quoted(k, t) { function escaped(k, t) { if (t.i === t.len) { return _refill(t, (function (param) { - return escaped(k, param); - }), _error_eof); + return escaped(k, param); + }), _error_eof); } const c = _get(t); if (c >= 92) { @@ -798,8 +798,8 @@ function escaped(k, t) { } if (_is_digit(c)) { return read2int(c - /* '0' */48 | 0, (function (n) { - return Curry._1(k, Stdlib__Char.chr(n)); - }), t); + return Curry._1(k, Stdlib__Char.chr(n)); + }), t); } else { return Curry._1(_error(t, { TAG: /* Format */0, @@ -823,8 +823,8 @@ function escaped(k, t) { function read2int(i, k, t) { if (t.i === t.len) { return _refill(t, (function (param) { - return read2int(i, k, param); - }), _error_eof); + return read2int(i, k, param); + }), _error_eof); } const c = _get(t); if (_is_digit(c)) { @@ -852,8 +852,8 @@ function read2int(i, k, t) { function read1int(i, k, t) { if (t.i === t.len) { return _refill(t, (function (param) { - return read1int(i, k, param); - }), _error_eof); + return read1int(i, k, param); + }), _error_eof); } const c = _get(t); if (_is_digit(c)) { @@ -882,8 +882,8 @@ function skip_comment(k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return skip_comment(k, param); - }), _error_eof); + return skip_comment(k, param); + }), _error_eof); } const match = _get(t); if (match === 10) { @@ -897,10 +897,10 @@ function expr_or_end(k, t) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return expr_or_end(k, param); - }), (function (param) { - return "End"; - })); + return expr_or_end(k, param); + }), (function (param) { + return "End"; + })); } const c = _get(t); if (c >= 11) { @@ -918,11 +918,11 @@ function expr_or_end(k, t) { function next(t) { return expr_or_end((function (param, x) { - return { - NAME: "Ok", - VAL: x - }; - }), t); + return { + NAME: "Ok", + VAL: x + }; + }), t); } function parse_string(s) { @@ -953,8 +953,8 @@ function parse_string(s) { function parse_chan(bufsize, ic) { const d = make(bufsize, (function (param, param$1, param$2) { - return Stdlib.input(ic, param, param$1, param$2); - })); + return Stdlib.input(ic, param, param$1, param$2); + })); const res = next(d); if (typeof res === "string") { return { @@ -968,8 +968,8 @@ function parse_chan(bufsize, ic) { function parse_chan_gen(bufsize, ic) { const d = make(bufsize, (function (param, param$1, param$2) { - return Stdlib.input(ic, param, param$1, param$2); - })); + return Stdlib.input(ic, param, param$1, param$2); + })); return function (param) { const e = next(d); if (typeof e === "string") { @@ -982,8 +982,8 @@ function parse_chan_gen(bufsize, ic) { function parse_chan_list(bufsize, ic) { const d = make(bufsize, (function (param, param$1, param$2) { - return Stdlib.input(ic, param, param$1, param$2); - })); + return Stdlib.input(ic, param, param$1, param$2); + })); let _acc = /* [] */0; while(true) { const acc = _acc; @@ -1007,14 +1007,14 @@ function parse_chan_list(bufsize, ic) { function parse_file(filename) { return _with_in(filename, (function (ic) { - return parse_chan(undefined, ic); - })); + return parse_chan(undefined, ic); + })); } function parse_file_list(filename) { return _with_in(filename, (function (ic) { - return parse_chan_list(undefined, ic); - })); + return parse_chan_list(undefined, ic); + })); } function MakeDecode(funarg) { @@ -1041,14 +1041,14 @@ function MakeDecode(funarg) { }; const _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; - if (n === 0) { - return Curry._1(k_fail, t); - } else { - return Curry._1(k_succ, t); - } - })); + t.i = 0; + t.len = n; + if (n === 0) { + return Curry._1(k_fail, t); + } else { + return Curry._1(k_succ, t); + } + })); }; const _get = function (t) { if (t.i >= t.len) { @@ -1103,12 +1103,12 @@ function MakeDecode(funarg) { _1: "at %d, %d: " }), t.line, t.col); return Stdlib__Printf.kbprintf((function (b) { - const msg$p = Stdlib__Buffer.contents(b); - return Curry._1(funarg.$$return, { - NAME: "Error", - VAL: msg$p - }); - }), b, msg); + const msg$p = Stdlib__Buffer.contents(b); + return Curry._1(funarg.$$return, { + NAME: "Error", + VAL: msg$p + }); + }), b, msg); }; const _error_eof = function (t) { return _error(t, { @@ -1125,8 +1125,8 @@ function MakeDecode(funarg) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return expr(k, param); - }), _error_eof); + return expr(k, param); + }), _error_eof); } const c = _get(t); if (c >= 11) { @@ -1145,8 +1145,8 @@ function MakeDecode(funarg) { if (c >= 42) { if (c === 59) { return skip_comment((function (param, param$1) { - return expr(k, t); - }), t); + return expr(k, t); + }), t); } if (c === 92) { return _error(t, { @@ -1214,8 +1214,8 @@ function MakeDecode(funarg) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return expr_list(acc, k, param); - }), _error_eof); + return expr_list(acc, k, param); + }), _error_eof); } const c = _get(t); if (c > 32 || c < 9) { @@ -1230,37 +1230,37 @@ function MakeDecode(funarg) { continue; } return expr_starting_with(c, (function (last, e) { - if (last !== undefined) { - if (last !== 40) { - if (last !== 41) { - return expr_list({ - hd: e, - tl: acc - }, k, t); - } else { - return Curry._2(k, undefined, { - NAME: "List", - VAL: Stdlib__List.rev({ - hd: e, - tl: acc - }) - }); - } + if (last !== undefined) { + if (last !== 40) { + if (last !== 41) { + return expr_list({ + hd: e, + tl: acc + }, k, t); } else { - return expr_list(/* [] */0, (function (param, l) { - return expr_list({ - hd: l, - tl: acc - }, k, t); - }), t); + return Curry._2(k, undefined, { + NAME: "List", + VAL: Stdlib__List.rev({ + hd: e, + tl: acc + }) + }); } } else { - return expr_list({ - hd: e, - tl: acc - }, k, t); + return expr_list(/* [] */0, (function (param, l) { + return expr_list({ + hd: l, + tl: acc + }, k, t); + }), t); } - }), t); + } else { + return expr_list({ + hd: e, + tl: acc + }, k, t); + } + }), t); }; }; const _return_atom = function (last, k, t) { @@ -1275,10 +1275,10 @@ function MakeDecode(funarg) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return atom(k, param); - }), (function (param) { - return _return_atom(undefined, k, param); - })); + return atom(k, param); + }), (function (param) { + return _return_atom(undefined, k, param); + })); } const c = _get(t); let exit = 0; @@ -1340,8 +1340,8 @@ function MakeDecode(funarg) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return quoted(k, param); - }), _error_eof); + return quoted(k, param); + }), _error_eof); } const c = _get(t); if (c === 34) { @@ -1349,9 +1349,9 @@ function MakeDecode(funarg) { } if (c === 92) { return escaped((function (c) { - Stdlib__Buffer.add_char(t.atom, c); - return quoted(k, t); - }), t); + Stdlib__Buffer.add_char(t.atom, c); + return quoted(k, t); + }), t); } Stdlib__Buffer.add_char(t.atom, c); continue; @@ -1360,8 +1360,8 @@ function MakeDecode(funarg) { const escaped = function (k, t) { if (t.i === t.len) { return _refill(t, (function (param) { - return escaped(k, param); - }), _error_eof); + return escaped(k, param); + }), _error_eof); } const c = _get(t); if (c >= 92) { @@ -1407,8 +1407,8 @@ function MakeDecode(funarg) { } if (_is_digit(c)) { return read2int(c - /* '0' */48 | 0, (function (n) { - return Curry._1(k, Stdlib__Char.chr(n)); - }), t); + return Curry._1(k, Stdlib__Char.chr(n)); + }), t); } else { return Curry._1(_error(t, { TAG: /* Format */0, @@ -1431,8 +1431,8 @@ function MakeDecode(funarg) { const read2int = function (i, k, t) { if (t.i === t.len) { return _refill(t, (function (param) { - return read2int(i, k, param); - }), _error_eof); + return read2int(i, k, param); + }), _error_eof); } const c = _get(t); if (_is_digit(c)) { @@ -1459,8 +1459,8 @@ function MakeDecode(funarg) { const read1int = function (i, k, t) { if (t.i === t.len) { return _refill(t, (function (param) { - return read1int(i, k, param); - }), _error_eof); + return read1int(i, k, param); + }), _error_eof); } const c = _get(t); if (_is_digit(c)) { @@ -1488,8 +1488,8 @@ function MakeDecode(funarg) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return skip_comment(k, param); - }), _error_eof); + return skip_comment(k, param); + }), _error_eof); } const match = _get(t); if (match === 10) { @@ -1502,10 +1502,10 @@ function MakeDecode(funarg) { while(true) { if (t.i === t.len) { return _refill(t, (function (param) { - return expr_or_end(k, param); - }), (function (param) { - return Curry._1(funarg.$$return, "End"); - })); + return expr_or_end(k, param); + }), (function (param) { + return Curry._1(funarg.$$return, "End"); + })); } const c = _get(t); if (c >= 11) { @@ -1522,11 +1522,11 @@ function MakeDecode(funarg) { }; const next = function (t) { return expr_or_end((function (param, x) { - return Curry._1(funarg.$$return, { - NAME: "Ok", - VAL: x - }); - }), t); + return Curry._1(funarg.$$return, { + NAME: "Ok", + VAL: x + }); + }), t); }; return { make: make, diff --git a/jscomp/test/dist/jscomp/test/sexpm_test.js b/jscomp/test/dist/jscomp/test/sexpm_test.js index 307e167e8..3b03f6ca5 100644 --- a/jscomp/test/dist/jscomp/test/sexpm_test.js +++ b/jscomp/test/dist/jscomp/test/sexpm_test.js @@ -22,12 +22,12 @@ function eq(loc, param) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/simple_lexer_test.js b/jscomp/test/dist/jscomp/test/simple_lexer_test.js index 5a27a48ca..9213afa24 100644 --- a/jscomp/test/dist/jscomp/test/simple_lexer_test.js +++ b/jscomp/test/dist/jscomp/test/simple_lexer_test.js @@ -48,12 +48,12 @@ function translate(lexbuf) { const suites_0 = [ "translate", (function (param) { - return { - TAG: /* Eq */0, - _0: __ocaml_lex_translate_rec(Stdlib__Lexing.from_string(undefined, "-- current_directory --"), 0), - _1: "-- . --" - }; - }) + return { + TAG: /* Eq */0, + _0: __ocaml_lex_translate_rec(Stdlib__Lexing.from_string(undefined, "-- current_directory --"), 0), + _1: "-- . --" + }; + }) ]; const suites = { diff --git a/jscomp/test/dist/jscomp/test/stack_comp_test.js b/jscomp/test/dist/jscomp/test/stack_comp_test.js index dd167e28c..59a8c4f72 100644 --- a/jscomp/test/dist/jscomp/test/stack_comp_test.js +++ b/jscomp/test/dist/jscomp/test/stack_comp_test.js @@ -33,11 +33,11 @@ function to_list(s) { contents: /* [] */0 }; Stdlib__List.iter((function (x) { - l.contents = { - hd: x, - tl: l.contents - }; - }), s.c); + l.contents = { + hd: x, + tl: l.contents + }; + }), s.c); return l.contents; } @@ -365,9 +365,9 @@ const i$7 = { }; Stdlib__List.iter((function (j) { - assert_("File \"jscomp/test/stack_comp_test.ml\", line 112, characters 27-34", i$7.contents === j); - i$7.contents = i$7.contents + 1 | 0; - }), s$5.c); + assert_("File \"jscomp/test/stack_comp_test.ml\", line 112, characters 27-34", i$7.contents === j); + i$7.contents = i$7.contents + 1 | 0; + }), s$5.c); const s1$1 = { c: /* [] */0, diff --git a/jscomp/test/dist/jscomp/test/stack_test.js b/jscomp/test/dist/jscomp/test/stack_test.js index c3d8453ac..84293b976 100644 --- a/jscomp/test/dist/jscomp/test/stack_test.js +++ b/jscomp/test/dist/jscomp/test/stack_test.js @@ -31,21 +31,21 @@ function v(param) { const suites_0 = [ "push_test", (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: 1, + return { + TAG: /* Eq */0, + _0: { + hd: 1, + tl: { + hd: 4, tl: { - hd: 4, - tl: { - hd: 3, - tl: /* [] */0 - } + hd: 3, + tl: /* [] */0 } - }, - _1: v(undefined) - }; - }) + } + }, + _1: v(undefined) + }; + }) ]; const suites = { 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 be1c17202..259fcfc47 100644 --- a/jscomp/test/dist/jscomp/test/string_get_set_test.js +++ b/jscomp/test/dist/jscomp/test/string_get_set_test.js @@ -7,12 +7,12 @@ Mt.from_pair_suites("jscomp/test/string_get_set_test.ml", { hd: [ "File \"jscomp/test/string_get_set_test.ml\", line 6, characters 4-11", (function (param) { - return { - TAG: /* Eq */0, - _0: /* 'h' */104, - _1: /* 'h' */104 - }; - }) + return { + TAG: /* Eq */0, + _0: /* 'h' */104, + _1: /* 'h' */104 + }; + }) ], tl: /* [] */0 }); 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 16a29d76a..494b94381 100644 --- a/jscomp/test/dist/jscomp/test/string_literal_print_test.js +++ b/jscomp/test/dist/jscomp/test/string_literal_print_test.js @@ -11,12 +11,12 @@ Mt.from_pair_suites("String_literal_print_test", { hd: [ "test_string_print", (function (param) { - return { - TAG: /* Eq */0, - _0: js_zero_to_255, - _1: zero_to_255 - }; - }) + return { + TAG: /* Eq */0, + _0: js_zero_to_255, + _1: zero_to_255 + }; + }) ], tl: /* [] */0 }); diff --git a/jscomp/test/dist/jscomp/test/string_runtime_test.js b/jscomp/test/dist/jscomp/test/string_runtime_test.js index 00def8090..66761efb3 100644 --- a/jscomp/test/dist/jscomp/test/string_runtime_test.js +++ b/jscomp/test/dist/jscomp/test/string_runtime_test.js @@ -10,55 +10,55 @@ const Test_char = require("./test_char.js"); const suites_0 = [ "caml_is_printable", (function (param) { - return { - TAG: /* Eq */0, - _0: Test_char.caml_is_printable(/* 'a' */97), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Test_char.caml_is_printable(/* 'a' */97), + _1: true + }; + }) ]; const suites_1 = { hd: [ "caml_string_of_bytes", (function (param) { - const match = Stdlib__List.split(Stdlib__List.map((function (x) { - const b = Caml_bytes.caml_create_bytes(x); - Stdlib__Bytes.fill(b, 0, x, /* 'c' */99); - return [ - Stdlib__Bytes.to_string(b), - Caml_bytes.bytes_to_string(Stdlib__Bytes.init(x, (function (param) { - return /* 'c' */99; - }))) - ]; - }), { - hd: 1000, + const match = Stdlib__List.split(Stdlib__List.map((function (x) { + const b = Caml_bytes.caml_create_bytes(x); + Stdlib__Bytes.fill(b, 0, x, /* 'c' */99); + return [ + Stdlib__Bytes.to_string(b), + Caml_bytes.bytes_to_string(Stdlib__Bytes.init(x, (function (param) { + return /* 'c' */99; + }))) + ]; + }), { + hd: 1000, + tl: { + hd: 1024, tl: { - hd: 1024, + hd: 1025, tl: { - hd: 1025, + hd: 4095, tl: { - hd: 4095, + hd: 4096, tl: { - hd: 4096, + hd: 5000, tl: { - hd: 5000, - tl: { - hd: 10000, - tl: /* [] */0 - } + hd: 10000, + tl: /* [] */0 } } } } } - })); - return { - TAG: /* Eq */0, - _0: match[0], - _1: match[1] - }; - }) + } + })); + return { + TAG: /* Eq */0, + _0: match[0], + _1: match[1] + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/string_set.js b/jscomp/test/dist/jscomp/test/string_set.js index 62e373330..3f95e4441 100644 --- a/jscomp/test/dist/jscomp/test/string_set.js +++ b/jscomp/test/dist/jscomp/test/string_set.js @@ -273,8 +273,8 @@ function of_list(l) { function of_array(l) { return Stdlib__Array.fold_left((function (acc, x) { - return add(x, acc); - }), /* Empty */0, l); + return add(x, acc); + }), /* Empty */0, l); } function invariant(t) { diff --git a/jscomp/test/dist/jscomp/test/string_set_test.js b/jscomp/test/dist/jscomp/test/string_set_test.js index 18ad71e92..7d2daedc2 100644 --- a/jscomp/test/dist/jscomp/test/string_set_test.js +++ b/jscomp/test/dist/jscomp/test/string_set_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/string_test.js b/jscomp/test/dist/jscomp/test/string_test.js index 9d67f21f9..40de99c95 100644 --- a/jscomp/test/dist/jscomp/test/string_test.js +++ b/jscomp/test/dist/jscomp/test/string_test.js @@ -130,240 +130,240 @@ function xsplit(delim, s) { function string_of_chars(x) { return Stdlib__String.concat("", Stdlib__List.map((function (prim) { - return String.fromCharCode(prim); - }), x)); + return String.fromCharCode(prim); + }), x)); } Mt.from_pair_suites("String_test", { hd: [ "mutliple switch", (function (param) { - return { - TAG: /* Eq */0, - _0: 9, - _1: ff("4") - }; - }) + return { + TAG: /* Eq */0, + _0: 9, + _1: ff("4") + }; + }) ], tl: { hd: [ "int switch", (function (param) { - return { - TAG: /* Eq */0, - _0: 9, - _1: gg(4) - }; - }) + return { + TAG: /* Eq */0, + _0: 9, + _1: gg(4) + }; + }) ], tl: { hd: [ "escape_normal", (function (param) { - return { - TAG: /* Eq */0, - _0: "haha", - _1: Stdlib__String.escaped("haha") - }; - }) + return { + TAG: /* Eq */0, + _0: "haha", + _1: Stdlib__String.escaped("haha") + }; + }) ], tl: { hd: [ "escape_bytes", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib__Bytes.of_string("haha"), - _1: Stdlib__Bytes.escaped(Stdlib__Bytes.of_string("haha")) - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib__Bytes.of_string("haha"), + _1: Stdlib__Bytes.escaped(Stdlib__Bytes.of_string("haha")) + }; + }) ], tl: { hd: [ "escape_quote", (function (param) { - return { - TAG: /* Eq */0, - _0: "\\\"\\\"", - _1: Stdlib__String.escaped("\"\"") - }; - }) + return { + TAG: /* Eq */0, + _0: "\\\"\\\"", + _1: Stdlib__String.escaped("\"\"") + }; + }) ], tl: { hd: [ "rev_split_by_char", (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: "", + return { + TAG: /* Eq */0, + _0: { + hd: "", + tl: { + hd: "bbbb", tl: { hd: "bbbb", - tl: { - hd: "bbbb", - tl: /* [] */0 - } + tl: /* [] */0 } - }, - _1: rev_split_by_char(/* 'a' */97, "bbbbabbbba") - }; - }) + } + }, + _1: rev_split_by_char(/* 'a' */97, "bbbbabbbba") + }; + }) ], tl: { hd: [ "File \"jscomp/test/string_test.ml\", line 74, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: "aaaa", - tl: /* [] */0 - }, - _1: rev_split_by_char(/* ',' */44, "aaaa") - }; - }) + return { + TAG: /* Eq */0, + _0: { + hd: "aaaa", + tl: /* [] */0 + }, + _1: rev_split_by_char(/* ',' */44, "aaaa") + }; + }) ], tl: { hd: [ "xsplit", (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: "a", + return { + TAG: /* Eq */0, + _0: { + hd: "a", + tl: { + hd: "b", tl: { - hd: "b", - tl: { - hd: "c", - tl: /* [] */0 - } + hd: "c", + tl: /* [] */0 } - }, - _1: xsplit(/* '.' */46, "a.b.c") - }; - }) + } + }, + _1: xsplit(/* '.' */46, "a.b.c") + }; + }) ], tl: { hd: [ "split_empty", (function (param) { - return { - TAG: /* Eq */0, - _0: /* [] */0, - _1: Ext_string_test.split(undefined, "", /* '_' */95) - }; - }) + return { + TAG: /* Eq */0, + _0: /* [] */0, + _1: Ext_string_test.split(undefined, "", /* '_' */95) + }; + }) ], tl: { hd: [ "split_empty2", (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: "test_unsafe_obj_ffi_ppx.cmi", - tl: /* [] */0 - }, - _1: Ext_string_test.split(false, " test_unsafe_obj_ffi_ppx.cmi", /* ' ' */32) - }; - }) + return { + TAG: /* Eq */0, + _0: { + hd: "test_unsafe_obj_ffi_ppx.cmi", + tl: /* [] */0 + }, + _1: Ext_string_test.split(false, " test_unsafe_obj_ffi_ppx.cmi", /* ' ' */32) + }; + }) ], tl: { hd: [ "rfind", (function (param) { - return { - TAG: /* Eq */0, - _0: 7, - _1: Ext_string_test.rfind("__", "__index__js") - }; - }) + return { + TAG: /* Eq */0, + _0: 7, + _1: Ext_string_test.rfind("__", "__index__js") + }; + }) ], tl: { hd: [ "rfind_2", (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: Ext_string_test.rfind("__", "__index_js") - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: Ext_string_test.rfind("__", "__index_js") + }; + }) ], tl: { hd: [ "rfind_3", (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: Ext_string_test.rfind("__", "_index_js") - }; - }) + return { + TAG: /* Eq */0, + _0: -1, + _1: Ext_string_test.rfind("__", "_index_js") + }; + }) ], tl: { hd: [ "find", (function (param) { - return { - TAG: /* Eq */0, - _0: 0, - _1: Ext_string_test.find(undefined, "__", "__index__js") - }; - }) + return { + TAG: /* Eq */0, + _0: 0, + _1: Ext_string_test.find(undefined, "__", "__index__js") + }; + }) ], tl: { hd: [ "find_2", (function (param) { - return { - TAG: /* Eq */0, - _0: 6, - _1: Ext_string_test.find(undefined, "__", "_index__js") - }; - }) + return { + TAG: /* Eq */0, + _0: 6, + _1: Ext_string_test.find(undefined, "__", "_index__js") + }; + }) ], tl: { hd: [ "find_3", (function (param) { - return { - TAG: /* Eq */0, - _0: -1, - _1: Ext_string_test.find(undefined, "__", "_index_js") - }; - }) + return { + TAG: /* Eq */0, + _0: -1, + _1: Ext_string_test.find(undefined, "__", "_index_js") + }; + }) ], tl: { hd: [ "of_char", (function (param) { - return { - TAG: /* Eq */0, - _0: String.fromCharCode(/* '0' */48), - _1: Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, /* '0' */48)) - }; - }) + return { + TAG: /* Eq */0, + _0: String.fromCharCode(/* '0' */48), + _1: Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, /* '0' */48)) + }; + }) ], tl: { hd: [ "of_chars", (function (param) { - return { - TAG: /* Eq */0, - _0: string_of_chars({ - hd: /* '0' */48, + return { + TAG: /* Eq */0, + _0: string_of_chars({ + hd: /* '0' */48, + tl: { + hd: /* '1' */49, tl: { - hd: /* '1' */49, - tl: { - hd: /* '2' */50, - tl: /* [] */0 - } + hd: /* '2' */50, + tl: /* [] */0 } - }), - _1: "012" - }; - }) + } + }), + _1: "012" + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/switch_case_test.js b/jscomp/test/dist/jscomp/test/switch_case_test.js index 5956c5350..0a296b5cf 100644 --- a/jscomp/test/dist/jscomp/test/switch_case_test.js +++ b/jscomp/test/dist/jscomp/test/switch_case_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/tailcall_inline_test.js b/jscomp/test/dist/jscomp/test/tailcall_inline_test.js index 2a3dcc245..8d0e5e559 100644 --- a/jscomp/test/dist/jscomp/test/tailcall_inline_test.js +++ b/jscomp/test/dist/jscomp/test/tailcall_inline_test.js @@ -28,48 +28,48 @@ function f(param) { const suites_0 = [ "acc", (function (param) { - return { - TAG: /* Eq */0, - _0: f(undefined), - _1: [ - 0, - 1, - 3, - 6, - 10, - 15, - 21, - 28, - 36, - 45 - ] - }; - }) + return { + TAG: /* Eq */0, + _0: f(undefined), + _1: [ + 0, + 1, + 3, + 6, + 10, + 15, + 21, + 28, + 36, + 45 + ] + }; + }) ]; const suites_1 = { hd: [ "array_to_list", (function (param) { - return { - TAG: /* Eq */0, - _0: { - hd: 1, + return { + TAG: /* Eq */0, + _0: { + hd: 1, + tl: { + hd: 2, tl: { - hd: 2, - tl: { - hd: 3, - tl: /* [] */0 - } + hd: 3, + tl: /* [] */0 } - }, - _1: Stdlib__Array.to_list([ - 1, - 2, - 3 - ]) - }; - }) + } + }, + _1: Stdlib__Array.to_list([ + 1, + 2, + 3 + ]) + }; + }) ], tl: /* [] */0 }; diff --git a/jscomp/test/dist/jscomp/test/test_bs_this.js b/jscomp/test/dist/jscomp/test/test_bs_this.js index ac1c33143..82cc00180 100644 --- a/jscomp/test/dist/jscomp/test/test_bs_this.js +++ b/jscomp/test/dist/jscomp/test/test_bs_this.js @@ -28,21 +28,21 @@ function bark(param) { const js_obj = { bark: (function (x, y) { - let o = this; - console.log(o); - return x + y | 0; - }) + let o = this; + console.log(o); + return x + y | 0; + }) }; function f(x) { x.onload = (function () { - let o = this; - console.log(o); - }); + let o = this; + console.log(o); + }); x.addEventListener("onload", (function () { - let o = this; - console.log(o.response); - })); + let o = this; + console.log(o.response); + })); } function u(x) { diff --git a/jscomp/test/dist/jscomp/test/test_closure.js b/jscomp/test/dist/jscomp/test/test_closure.js index 93f308c9d..a72936b59 100644 --- a/jscomp/test/dist/jscomp/test/test_closure.js +++ b/jscomp/test/dist/jscomp/test/test_closure.js @@ -12,12 +12,12 @@ const v = { function f(param) { const arr = Caml_array.make(10, (function (param) { - - })); + + })); for (let i = 0; i <= 9; ++i) { Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + i | 0; - })); + v.contents = v.contents + i | 0; + })); } return arr; } @@ -25,8 +25,8 @@ function f(param) { const u = f(undefined); Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), u); + Curry._1(x, undefined); + }), u); if (v.contents !== 45) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { diff --git a/jscomp/test/dist/jscomp/test/test_cps.js b/jscomp/test/dist/jscomp/test/test_cps.js index 23561f36d..b42d64bd3 100644 --- a/jscomp/test/dist/jscomp/test/test_cps.js +++ b/jscomp/test/dist/jscomp/test/test_cps.js @@ -12,9 +12,9 @@ function f(_n, _acc) { return Curry._1(acc, undefined); } _acc = (function (param) { - console.log(String(n)); - return Curry._1(acc, undefined); - }); + console.log(String(n)); + return Curry._1(acc, undefined); + }); _n = n - 1 | 0; continue; }; @@ -22,19 +22,19 @@ function f(_n, _acc) { function test_closure(param) { const arr = Caml_array.make(6, (function (x) { - return x; - })); + return x; + })); for (let i = 0; i <= 6; ++i) { Caml_array.set(arr, i, (function (param) { - return i; - })); + return i; + })); } return arr; } f(10, (function (param) { - - })); + + })); exports.f = f; exports.test_closure = test_closure; diff --git a/jscomp/test/dist/jscomp/test/test_for_loop.js b/jscomp/test/dist/jscomp/test/test_for_loop.js index 1677df701..34cd4c7e8 100644 --- a/jscomp/test/dist/jscomp/test/test_for_loop.js +++ b/jscomp/test/dist/jscomp/test/test_for_loop.js @@ -22,19 +22,19 @@ function for_3(x) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); for (let i = 0 ,i_finish = x.length; i <= i_finish; ++i) { const j = (i << 1); Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + j | 0; - })); + v.contents = v.contents + j | 0; + })); } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } @@ -43,20 +43,20 @@ function for_4(x) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); for (let i = 0 ,i_finish = x.length; i <= i_finish; ++i) { const j = (i << 1); const k = (j << 1); Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + k | 0; - })); + v.contents = v.contents + k | 0; + })); } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } @@ -65,19 +65,19 @@ function for_5(x, u) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); for (let i = 0 ,i_finish = x.length; i <= i_finish; ++i) { const k = Math.imul((u << 1), u); Caml_array.set(arr, i, (function (param) { - v.contents = v.contents + k | 0; - })); + v.contents = v.contents + k | 0; + })); } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } @@ -86,10 +86,10 @@ function for_6(x, u) { contents: 0 }; const arr = Stdlib__Array.map((function (param) { - return function (param) { - - }; - }), x); + return function (param) { + + }; + }), x); const v4 = { contents: 0 }; @@ -107,13 +107,13 @@ function for_6(x, u) { const h = (v5.contents << 1); v2.contents = v2.contents + 1 | 0; Caml_array.set(arr, i, (function (param) { - v.contents = (((((v.contents + k | 0) + v2.contents | 0) + u | 0) + v4.contents | 0) + v5.contents | 0) + h | 0; - })); + v.contents = (((((v.contents + k | 0) + v2.contents | 0) + u | 0) + v4.contents | 0) + v5.contents | 0) + h | 0; + })); } } Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); return v.contents; } diff --git a/jscomp/test/dist/jscomp/test/test_for_map.js b/jscomp/test/dist/jscomp/test/test_for_map.js index 86d6905cc..fbecb3c6a 100644 --- a/jscomp/test/dist/jscomp/test/test_for_map.js +++ b/jscomp/test/dist/jscomp/test/test_for_map.js @@ -984,14 +984,14 @@ function bindings(s) { function of_list(bs) { return Stdlib__List.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), /* Empty */0, bs); + return add(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), m, i); + return add(param[0], param[1], m); + }), m, i); } function of_seq(i) { @@ -1010,8 +1010,8 @@ function seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1053,8 +1053,8 @@ function rev_seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } diff --git a/jscomp/test/dist/jscomp/test/test_google_closure.js b/jscomp/test/dist/jscomp/test/test_google_closure.js index 4092e9dfa..82c7cedc3 100644 --- a/jscomp/test/dist/jscomp/test/test_google_closure.js +++ b/jscomp/test/dist/jscomp/test/test_google_closure.js @@ -19,8 +19,8 @@ const a = String(3); const b = 101; const arr = Stdlib__Array.init(2, (function (param) { - return 0; - })); + return 0; + })); for (let i = 0; i <= 1; ++i) { Caml_array.set(arr, i, i + 1 | 0); diff --git a/jscomp/test/dist/jscomp/test/test_http_server.js b/jscomp/test/dist/jscomp/test/test_http_server.js index 718131ab3..014a4eb1a 100644 --- a/jscomp/test/dist/jscomp/test/test_http_server.js +++ b/jscomp/test/dist/jscomp/test/test_http_server.js @@ -12,8 +12,8 @@ function create_server(http) { return resp.end("Hello world\n"); }); return server.listen(3000, hostname, (function () { - console.log("Server running at http://" + (hostname + (":" + (String(3000) + "/")))); - })); + console.log("Server running at http://" + (hostname + (":" + (String(3000) + "/")))); + })); } create_server(Http); 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 7af2c1733..32f13c273 100644 --- a/jscomp/test/dist/jscomp/test/test_int_map_find.js +++ b/jscomp/test/dist/jscomp/test/test_int_map_find.js @@ -139,8 +139,8 @@ function add(x, data, m) { } Stdlib__List.fold_left((function (acc, param) { - return Curry._3(add, param[0], param[1], acc); - }), /* Empty */0, { + return Curry._3(add, param[0], param[1], acc); + }), /* Empty */0, { hd: [ 10, /* 'a' */97 diff --git a/jscomp/test/dist/jscomp/test/test_internalOO.js b/jscomp/test/dist/jscomp/test/test_internalOO.js index 3e58bffc8..981b992d8 100644 --- a/jscomp/test/dist/jscomp/test/test_internalOO.js +++ b/jscomp/test/dist/jscomp/test/test_internalOO.js @@ -1018,14 +1018,14 @@ function bindings(s) { function of_list(bs) { return Stdlib__List.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), /* Empty */0, bs); + return add(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), m, i); + return add(param[0], param[1], m); + }), m, i); } function of_seq(i) { @@ -1044,8 +1044,8 @@ function seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1087,8 +1087,8 @@ function rev_seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } @@ -2162,14 +2162,14 @@ function bindings$1(s) { function of_list$1(bs) { return Stdlib__List.fold_left((function (m, param) { - return add$1(param[0], param[1], m); - }), /* Empty */0, bs); + return add$1(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq$1(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add$1(param[0], param[1], m); - }), m, i); + return add$1(param[0], param[1], m); + }), m, i); } function of_seq$1(i) { @@ -2188,8 +2188,8 @@ function seq_of_enum_$1(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_$1(partial_arg, param); - }) + return seq_of_enum_$1(partial_arg, param); + }) }; } @@ -2231,8 +2231,8 @@ function rev_seq_of_enum_$1(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_$1(partial_arg, param); - }) + return rev_seq_of_enum_$1(partial_arg, param); + }) }; } @@ -3306,14 +3306,14 @@ function bindings$2(s) { function of_list$2(bs) { return Stdlib__List.fold_left((function (m, param) { - return add$2(param[0], param[1], m); - }), /* Empty */0, bs); + return add$2(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq$2(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add$2(param[0], param[1], m); - }), m, i); + return add$2(param[0], param[1], m); + }), m, i); } function of_seq$2(i) { @@ -3332,8 +3332,8 @@ function seq_of_enum_$2(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_$2(partial_arg, param); - }) + return seq_of_enum_$2(partial_arg, param); + }) }; } @@ -3375,8 +3375,8 @@ function rev_seq_of_enum_$2(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_$2(partial_arg, param); - }) + return rev_seq_of_enum_$2(partial_arg, param); + }) }; } @@ -3566,8 +3566,8 @@ function get_method_label(table, name) { function get_method_labels(table, names) { return Stdlib__Array.map((function (param) { - return get_method_label(table, param); - }), names); + return get_method_label(table, param); + }), names); } function set_method(table, label, element) { @@ -3612,11 +3612,11 @@ function narrow(table, vars, virt_meths, concr_meths) { const virt_meths$1 = to_list(virt_meths); const concr_meths$1 = to_list(concr_meths); const virt_meth_labs = Stdlib__List.map((function (param) { - return get_method_label(table, param); - }), virt_meths$1); + return get_method_label(table, param); + }), virt_meths$1); const concr_meth_labs = Stdlib__List.map((function (param) { - return get_method_label(table, param); - }), concr_meths$1); + return get_method_label(table, param); + }), concr_meths$1); table.previous_states = { hd: [ table.methods_by_name, @@ -3629,12 +3629,12 @@ function narrow(table, vars, virt_meths, concr_meths) { tl: table.previous_states }; table.vars = Curry._3(fold, (function (lab, info, tvars) { - if (Stdlib__List.mem(lab, vars$1)) { - return Curry._3(add, lab, info, tvars); - } else { - return tvars; - } - }), table.vars, /* Empty */0); + if (Stdlib__List.mem(lab, vars$1)) { + return Curry._3(add, lab, info, tvars); + } else { + return tvars; + } + }), table.vars, /* Empty */0); const by_name = { contents: /* Empty */0 }; @@ -3642,37 +3642,37 @@ function narrow(table, vars, virt_meths, concr_meths) { contents: /* Empty */0 }; Stdlib__List.iter2((function (met, label) { - by_name.contents = Curry._3(add$1, met, label, by_name.contents); - let tmp; - try { - tmp = Curry._2(find$2, label, table.methods_by_label); - } - catch (raw_exn){ - const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - tmp = true; - } else { - throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); - } + by_name.contents = Curry._3(add$1, met, label, by_name.contents); + let tmp; + try { + tmp = Curry._2(find$2, label, table.methods_by_label); + } + catch (raw_exn){ + const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); + if (exn.MEL_EXN_ID === Stdlib.Not_found) { + tmp = true; + } else { + throw new Caml_js_exceptions.MelangeError(exn.MEL_EXN_ID, exn); } - by_label.contents = Curry._3(add$2, label, tmp, by_label.contents); - }), concr_meths$1, concr_meth_labs); + } + by_label.contents = Curry._3(add$2, label, tmp, by_label.contents); + }), concr_meths$1, concr_meth_labs); Stdlib__List.iter2((function (met, label) { - by_name.contents = Curry._3(add$1, met, label, by_name.contents); - by_label.contents = Curry._3(add$2, label, false, by_label.contents); - }), virt_meths$1, virt_meth_labs); + by_name.contents = Curry._3(add$1, met, label, by_name.contents); + by_label.contents = Curry._3(add$2, label, false, by_label.contents); + }), virt_meths$1, virt_meth_labs); table.methods_by_name = by_name.contents; table.methods_by_label = by_label.contents; table.hidden_meths = Stdlib__List.fold_right((function (met, hm) { - if (Stdlib__List.mem(met[0], virt_meth_labs)) { - return hm; - } else { - return { - hd: met, - tl: hm - }; - } - }), table.hidden_meths, /* [] */0); + if (Stdlib__List.mem(met[0], virt_meth_labs)) { + return hm; + } else { + return { + hd: met, + tl: hm + }; + } + }), table.hidden_meths, /* [] */0); } function widen(table) { @@ -3680,20 +3680,20 @@ function widen(table) { const 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); - }), match[3], match[5]); + return Curry._3(add, v, Curry._2(find, v, table.vars), s); + }), match[3], match[5]); table.methods_by_name = match[0]; table.methods_by_label = match[1]; table.hidden_meths = Stdlib__List.fold_right((function (met, hm) { - if (Stdlib__List.mem(met[0], virt_meths)) { - return hm; - } else { - return { - hd: met, - tl: hm - }; - } - }), table.hidden_meths, match[2]); + if (Stdlib__List.mem(met[0], virt_meths)) { + return hm; + } else { + return { + hd: met, + tl: hm + }; + } + }), table.hidden_meths, match[2]); } function new_slot(table) { @@ -3763,8 +3763,8 @@ function get_variable(table, name) { function get_variables(table, names) { return Stdlib__Array.map((function (param) { - return get_variable(table, param); - }), names); + return get_variable(table, param); + }), names); } function add_initializer(table, f) { @@ -3781,10 +3781,10 @@ function create_table(public_methods) { const tags = Stdlib__Array.map(public_method_label, public_methods); const table = new_table(tags); Stdlib__Array.iteri((function (i, met) { - const 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); + const 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); return table; } @@ -3803,12 +3803,12 @@ function inherits(cla, vals, virt_meths, concr_meths, param, top) { hd: [init], tl: { hd: Stdlib__Array.map((function (param) { - return get_variable(cla, param); - }), to_array(vals)), + return get_variable(cla, param); + }), to_array(vals)), tl: { hd: Stdlib__Array.map((function (nm) { - return get_method(cla, get_method_label(cla, nm)); - }), to_array(concr_meths)), + return get_method(cla, get_method_label(cla, nm)); + }), to_array(concr_meths)), tl: /* [] */0 } } diff --git a/jscomp/test/dist/jscomp/test/test_per.js b/jscomp/test/dist/jscomp/test/test_per.js index b0b61fa30..c298ceab0 100644 --- a/jscomp/test/dist/jscomp/test/test_per.js +++ b/jscomp/test/dist/jscomp/test/test_per.js @@ -515,9 +515,9 @@ const exit_function = { function at_exit(f) { const g = exit_function.contents; exit_function.contents = (function (param) { - Curry._1(f, undefined); - Curry._1(g, undefined); - }); + Curry._1(f, undefined); + Curry._1(g, undefined); + }); } function do_at_exit(param) { diff --git a/jscomp/test/dist/jscomp/test/test_react.js b/jscomp/test/dist/jscomp/test/test_react.js index 812208ccb..7efba964d 100644 --- a/jscomp/test/dist/jscomp/test/test_react.js +++ b/jscomp/test/dist/jscomp/test/test_react.js @@ -16,10 +16,10 @@ console.log(32); ReactDom.render(React.createClass({ render: (function (param) { - return React.DOM.div({ - alt: "pic" - }, React.DOM.h1(undefined, "hello react"), React.DOM.h2(undefined, "type safe!"), React.DOM.h3(undefined, "type safe!")); - }) + return React.DOM.div({ + alt: "pic" + }, React.DOM.h1(undefined, "hello react"), React.DOM.h2(undefined, "type safe!"), React.DOM.h3(undefined, "type safe!")); + }) }), document.getElementById("hi")); function f(param) { diff --git a/jscomp/test/dist/jscomp/test/test_simple_obj.js b/jscomp/test/dist/jscomp/test/test_simple_obj.js index d44651328..b6a2bd582 100644 --- a/jscomp/test/dist/jscomp/test/test_simple_obj.js +++ b/jscomp/test/dist/jscomp/test/test_simple_obj.js @@ -32,20 +32,20 @@ const hello = ids[3]; CamlinternalOO.set_methods($$class, [ hi, (function (self$1, v, z) { - return v + z | 0; - }), + return v + z | 0; + }), id1, (function (self$1) { - return 3; - }), + return 3; + }), id2, (function (self$1) { - return 4; - }), + return 4; + }), hello, (function (self$1, v) { - return v; - }) + return v; + }) ]); CamlinternalOO.init_class($$class); @@ -57,8 +57,8 @@ const $$class$1 = CamlinternalOO.create_table(["id"]); const id = CamlinternalOO.get_method_label($$class$1, "id"); CamlinternalOO.set_method($$class$1, id, (function (self$2) { - return "uu"; - })); + return "uu"; + })); CamlinternalOO.init_class($$class$1); @@ -69,8 +69,8 @@ const $$class$2 = CamlinternalOO.create_table(shared); const add = CamlinternalOO.get_method_label($$class$2, "add"); CamlinternalOO.set_method($$class$2, add, (function (self$3, x, y) { - return x + y | 0; - })); + return x + y | 0; + })); CamlinternalOO.init_class($$class$2); @@ -81,8 +81,8 @@ const $$class$3 = CamlinternalOO.create_table(shared); const 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; - })); + return x + y | 0; + })); CamlinternalOO.init_class($$class$3); diff --git a/jscomp/test/dist/jscomp/test/test_string_map.js b/jscomp/test/dist/jscomp/test/test_string_map.js index a39bbee19..ee4befccc 100644 --- a/jscomp/test/dist/jscomp/test/test_string_map.js +++ b/jscomp/test/dist/jscomp/test/test_string_map.js @@ -166,15 +166,15 @@ function assertion_test(param) { contents: /* Empty */0 }; timing("building", (function (param) { - for (let i = 0; i <= 1000000; ++i) { - m.contents = Curry._3(add, String(i), String(i), m.contents); - } - })); + for (let i = 0; i <= 1000000; ++i) { + m.contents = Curry._3(add, String(i), String(i), m.contents); + } + })); timing("querying", (function (param) { - for (let i = 0; i <= 1000000; ++i) { - Curry._2(find, String(i), m.contents); - } - })); + for (let i = 0; i <= 1000000; ++i) { + Curry._2(find, String(i), m.contents); + } + })); } exports.assertion_test = assertion_test; diff --git a/jscomp/test/dist/jscomp/test/test_while_closure.js b/jscomp/test/dist/jscomp/test/test_while_closure.js index 65c4d6932..e05c16258 100644 --- a/jscomp/test/dist/jscomp/test/test_while_closure.js +++ b/jscomp/test/dist/jscomp/test/test_while_closure.js @@ -11,16 +11,16 @@ const v = { }; const arr = Caml_array.make(10, (function (param) { - - })); + + })); function f(param) { let n = 0; while(n < 10) { const j = n; Caml_array.set(arr, j, (function (param) { - v.contents = v.contents + j | 0; - })); + v.contents = v.contents + j | 0; + })); n = n + 1 | 0; }; } @@ -28,8 +28,8 @@ function f(param) { f(undefined); Stdlib__Array.iter((function (x) { - Curry._1(x, undefined); - }), arr); + Curry._1(x, undefined); + }), arr); console.log(String(v.contents)); 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 a6f651b30..d261ab7a1 100644 --- a/jscomp/test/dist/jscomp/test/test_while_side_effect.js +++ b/jscomp/test/dist/jscomp/test/test_while_side_effect.js @@ -23,12 +23,12 @@ const x = { }; while((function () { - let y = 3; - console.log(String(x.contents)); - y = y + 1 | 0; - x.contents = x.contents + 1 | 0; - return (fib(x.contents) + fib(x.contents) | 0) < 20; - })()) { + let y = 3; + console.log(String(x.contents)); + y = y + 1 | 0; + x.contents = x.contents + 1 | 0; + return (fib(x.contents) + fib(x.contents) | 0) < 20; + })()) { console.log(String(3)); }; diff --git a/jscomp/test/dist/jscomp/test/test_zero_nullable.js b/jscomp/test/dist/jscomp/test/test_zero_nullable.js index 737bc50ef..7cc94074c 100644 --- a/jscomp/test/dist/jscomp/test/test_zero_nullable.js +++ b/jscomp/test/dist/jscomp/test/test_zero_nullable.js @@ -19,12 +19,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/testing.js b/jscomp/test/dist/jscomp/test/testing.js index 78d6e499a..a40f5a777 100644 --- a/jscomp/test/dist/jscomp/test/testing.js +++ b/jscomp/test/dist/jscomp/test/testing.js @@ -130,32 +130,32 @@ function test_raises_exc_p(pred, f, x) { function test_raises_some_exc(f) { return function (param) { return test_raises_exc_p((function (param) { - return true; - }), f, param); + return true; + }), f, param); }; } function test_raises_this_exc(exc) { return function (param, param$1) { return test_raises_exc_p((function (x) { - return Caml_obj.caml_equal(x, exc); - }), param, param$1); + return Caml_obj.caml_equal(x, exc); + }), param, param$1); }; } function failure_test(f, x, s) { return test_raises_exc_p((function (x) { - return Caml_obj.caml_equal(x, { - MEL_EXN_ID: Stdlib.Failure, - _1: s - }); - }), f, x); + return Caml_obj.caml_equal(x, { + MEL_EXN_ID: Stdlib.Failure, + _1: s + }); + }), f, x); } function scan_failure_test(f, x) { return test_raises_exc_p((function (param) { - return param.MEL_EXN_ID === Stdlib__Scanf.Scan_failure; - }), f, x); + return param.MEL_EXN_ID === Stdlib__Scanf.Scan_failure; + }), f, x); } exports.test = test; diff --git a/jscomp/test/dist/jscomp/test/tfloat_record_test.js b/jscomp/test/dist/jscomp/test/tfloat_record_test.js index 777421f76..9689d0124 100644 --- a/jscomp/test/dist/jscomp/test/tfloat_record_test.js +++ b/jscomp/test/dist/jscomp/test/tfloat_record_test.js @@ -52,9 +52,9 @@ const c = Float_array.longer_float_array(34); function print_array(a) { Stdlib__Array.iter((function (f) { - print_float(f); - print_newline(undefined); - }), a); + print_float(f); + print_newline(undefined); + }), a); print_newline(undefined); } diff --git a/jscomp/test/dist/jscomp/test/ticker.js b/jscomp/test/dist/jscomp/test/ticker.js index 854d338ce..df4359fef 100644 --- a/jscomp/test/dist/jscomp/test/ticker.js +++ b/jscomp/test/dist/jscomp/test/ticker.js @@ -101,18 +101,18 @@ function string_of_rank(i) { function find_ticker_by_name(all_tickers, ticker) { return Stdlib__List.find((function (param) { - return param.ticker_name === ticker; - }), all_tickers); + return param.ticker_name === ticker; + }), all_tickers); } function print_all_composite(all_tickers) { Stdlib__List.iter((function (param) { - let tmp = param.type_; - if (/* tag */typeof tmp === "number" || typeof tmp === "string") { - return; - } - console.log(param.ticker_name); - }), all_tickers); + let tmp = param.type_; + if (/* tag */typeof tmp === "number" || typeof tmp === "string") { + return; + } + console.log(param.ticker_name); + }), all_tickers); } const compare = Caml_obj.caml_compare; @@ -1090,14 +1090,14 @@ function bindings(s) { function of_list(bs) { return Stdlib__List.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), /* Empty */0, bs); + return add(param[0], param[1], m); + }), /* Empty */0, bs); } function add_seq(i, m) { return Stdlib__Seq.fold_left((function (m, param) { - return add(param[0], param[1], m); - }), m, i); + return add(param[0], param[1], m); + }), m, i); } function of_seq(i) { @@ -1116,8 +1116,8 @@ function seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1159,8 +1159,8 @@ function rev_seq_of_enum_(c, param) { c._1 ], _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } @@ -1261,128 +1261,128 @@ const Ticker_map = { function compute_update_sequences(all_tickers) { Stdlib__List.fold_left((function (counter, ticker) { - const loop = function (counter, ticker) { - const rank = ticker.rank; - if (!/* tag */(typeof rank === "number" || typeof rank === "string")) { - return counter; - } - if (rank !== /* Uninitialized */0) { - return counter; - } - ticker.rank = /* Visited */1; - const match = ticker.type_; - if (/* tag */typeof match === "number" || typeof match === "string") { - const counter$1 = counter + 1 | 0; - ticker.rank = { - TAG: /* Ranked */0, - _0: counter$1 - }; - return counter$1; - } - const match$1 = match._0; - const counter$2 = loop(counter, match$1.lhs); - const counter$3 = loop(counter$2, match$1.rhs); - const counter$4 = counter$3 + 1 | 0; + const loop = function (counter, ticker) { + const rank = ticker.rank; + if (!/* tag */(typeof rank === "number" || typeof rank === "string")) { + return counter; + } + if (rank !== /* Uninitialized */0) { + return counter; + } + ticker.rank = /* Visited */1; + const match = ticker.type_; + if (/* tag */typeof match === "number" || typeof match === "string") { + const counter$1 = counter + 1 | 0; ticker.rank = { TAG: /* Ranked */0, - _0: counter$4 + _0: counter$1 }; - return counter$4; + return counter$1; + } + const match$1 = match._0; + const counter$2 = loop(counter, match$1.lhs); + const counter$3 = loop(counter$2, match$1.rhs); + const counter$4 = counter$3 + 1 | 0; + ticker.rank = { + TAG: /* Ranked */0, + _0: counter$4 }; - return loop(counter, ticker); - }), 0, all_tickers); + return counter$4; + }; + return loop(counter, ticker); + }), 0, all_tickers); const map = Stdlib__List.fold_left((function (map, ticker) { - let tmp = ticker.type_; - if (/* tag */typeof tmp === "number" || typeof tmp === "string") { - return Curry._3(add, ticker.ticker_name, { - hd: ticker, - tl: /* [] */0 - }, map); - } - const loop = function (_up, _map, _ticker) { - while(true) { - const ticker = _ticker; - const map = _map; - const up = _up; - const type_ = ticker.type_; - const ticker_name = ticker.ticker_name; - if (/* tag */typeof type_ === "number" || typeof type_ === "string") { - const l = Curry._2(find, ticker_name, map); - return Curry._3(add, ticker_name, Stdlib.$at(up, l), map); - } - const match = type_._0; - const map$1 = loop({ - hd: ticker, - tl: up - }, map, match.lhs); - _ticker = match.rhs; - _map = map$1; - _up = { + let tmp = ticker.type_; + if (/* tag */typeof tmp === "number" || typeof tmp === "string") { + return Curry._3(add, ticker.ticker_name, { hd: ticker, - tl: up - }; - continue; + tl: /* [] */0 + }, map); + } + const loop = function (_up, _map, _ticker) { + while(true) { + const ticker = _ticker; + const map = _map; + const up = _up; + const type_ = ticker.type_; + const ticker_name = ticker.ticker_name; + if (/* tag */typeof type_ === "number" || typeof type_ === "string") { + const l = Curry._2(find, ticker_name, map); + return Curry._3(add, ticker_name, Stdlib.$at(up, l), map); + } + const match = type_._0; + const map$1 = loop({ + hd: ticker, + tl: up + }, map, match.lhs); + _ticker = match.rhs; + _map = map$1; + _up = { + hd: ticker, + tl: up }; + continue; }; - return loop(/* [] */0, map, ticker); - }), /* Empty */0, Stdlib__List.rev(all_tickers)); + }; + return loop(/* [] */0, map, ticker); + }), /* Empty */0, Stdlib__List.rev(all_tickers)); return Curry._3(fold, (function (k, l, map) { - const l$1 = Stdlib__List.sort_uniq((function (lhs, rhs) { - const x = lhs.rank; - if (/* tag */typeof x === "number" || typeof x === "string") { - if (x === /* Uninitialized */0) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "All nodes should be ranked" - }); - } - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "All nodes should be ranked" - }); - } else { - const y = rhs.rank; - if (!/* tag */(typeof y === "number" || typeof y === "string")) { - return Caml.caml_int_compare(x._0, y._0); - } - if (y === /* Uninitialized */0) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "All nodes should be ranked" - }); - } - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "All nodes should be ranked" - }); - } - }), l); - return Curry._3(add, k, l$1, map); - }), map, map); + const l$1 = Stdlib__List.sort_uniq((function (lhs, rhs) { + const x = lhs.rank; + if (/* tag */typeof x === "number" || typeof x === "string") { + if (x === /* Uninitialized */0) { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "All nodes should be ranked" + }); + } + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "All nodes should be ranked" + }); + } else { + const y = rhs.rank; + if (!/* tag */(typeof y === "number" || typeof y === "string")) { + return Caml.caml_int_compare(x._0, y._0); + } + if (y === /* Uninitialized */0) { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "All nodes should be ranked" + }); + } + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "All nodes should be ranked" + }); + } + }), l); + return Curry._3(add, k, l$1, map); + }), map, map); } function process_quote(ticker_map, new_ticker, new_value) { const update_sequence = Curry._2(find, new_ticker, ticker_map); Stdlib__List.iter((function (ticker) { - const match = ticker.type_; - if (/* tag */typeof match === "number" || typeof match === "string") { - if (ticker.ticker_name === new_ticker) { - ticker.value = new_value; - return; - } - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "Only single Market ticker should be udpated upon a new quote" - }); + const match = ticker.type_; + if (/* tag */typeof match === "number" || typeof match === "string") { + if (ticker.ticker_name === new_ticker) { + ticker.value = new_value; + return; } - const match$1 = match._0; - const match$2 = match$1.lhs.value; - const match$3 = match$1.rhs.value; - const value = match$2 !== undefined && match$3 !== undefined ? ( - match$1.op === /* PLUS */0 ? match$2 + match$3 : match$2 - match$3 - ) : undefined; - ticker.value = value; - }), update_sequence); + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "Only single Market ticker should be udpated upon a new quote" + }); + } + const match$1 = match._0; + const match$2 = match$1.lhs.value; + const match$3 = match$1.rhs.value; + const value = match$2 !== undefined && match$3 !== undefined ? ( + match$1.op === /* PLUS */0 ? match$2 + match$3 : match$2 - match$3 + ) : undefined; + ticker.value = value; + }), update_sequence); } function process_input_line(ticker_map, all_tickers, line) { diff --git a/jscomp/test/dist/jscomp/test/to_string_test.js b/jscomp/test/dist/jscomp/test/to_string_test.js index 279474aad..675948809 100644 --- a/jscomp/test/dist/jscomp/test/to_string_test.js +++ b/jscomp/test/dist/jscomp/test/to_string_test.js @@ -14,23 +14,23 @@ Mt.from_pair_suites("To_string_test", { hd: [ "File \"jscomp/test/to_string_test.ml\", line 7, characters 2-9", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib.string_of_float(Stdlib.infinity), - _1: "inf" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib.string_of_float(Stdlib.infinity), + _1: "inf" + }; + }) ], tl: { hd: [ "File \"jscomp/test/to_string_test.ml\", line 8, characters 1-8", (function (param) { - return { - TAG: /* Eq */0, - _0: Stdlib.string_of_float(Stdlib.neg_infinity), - _1: "-inf" - }; - }) + return { + TAG: /* Eq */0, + _0: Stdlib.string_of_float(Stdlib.neg_infinity), + _1: "-inf" + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/topsort_test.js b/jscomp/test/dist/jscomp/test/topsort_test.js index 51ec95972..167e9798b 100644 --- a/jscomp/test/dist/jscomp/test/topsort_test.js +++ b/jscomp/test/dist/jscomp/test/topsort_test.js @@ -63,15 +63,15 @@ const graph = { function nexts(x, g) { return Stdlib__List.fold_left((function (acc, param) { - if (param[0] === x) { - return { - hd: param[1], - tl: acc - }; - } else { - return acc; - } - }), /* [] */0, g); + if (param[0] === x) { + return { + hd: param[1], + tl: acc + }; + } else { + return acc; + } + }), /* [] */0, g); } function dfs1(_nodes, graph, _visited) { @@ -275,14 +275,14 @@ function dfs3(nodes, graph) { tl: visited.contents }; return Stdlib__List.iter((function (x) { - aux(x, graph); - }), nexts(node, graph)); + aux(x, graph); + }), nexts(node, graph)); } }; Stdlib__List.iter((function (node) { - aux(node, graph); - }), nodes); + aux(node, graph); + }), nodes); return Stdlib__List.rev(visited.contents); } @@ -410,8 +410,8 @@ function unsafe_topsort(graph) { }; }; Stdlib__List.iter((function (param) { - sort_node(param[0]); - }), graph); + sort_node(param[0]); + }), graph); return visited.contents; } @@ -833,8 +833,8 @@ function split_bis(x, param) { TAG: /* NotFound */0, _0: /* Empty */0, _1: (function (param) { - return /* Empty */0; - }) + return /* Empty */0; + }) }; } const r = param.r; @@ -854,8 +854,8 @@ function split_bis(x, param) { TAG: /* NotFound */0, _0: match._0, _1: (function (param) { - return join(Curry._1(rl, undefined), v, r); - }) + return join(Curry._1(rl, undefined), v, r); + }) }; } const match$1 = split_bis(x, r); @@ -1501,8 +1501,8 @@ function of_list(l) { function add_seq(i, m) { return Stdlib__Seq.fold_left((function (s, x) { - return add(x, s); - }), m, i); + return add(x, s); + }), m, i); } function of_seq(i) { @@ -1518,8 +1518,8 @@ function seq_of_enum_(c, param) { TAG: /* Cons */0, _0: c._0, _1: (function (param) { - return seq_of_enum_(partial_arg, param); - }) + return seq_of_enum_(partial_arg, param); + }) }; } @@ -1557,8 +1557,8 @@ function rev_seq_of_enum_(c, param) { TAG: /* Cons */0, _0: c._0, _1: (function (param) { - return rev_seq_of_enum_(partial_arg, param); - }) + return rev_seq_of_enum_(partial_arg, param); + }) }; } @@ -1687,8 +1687,8 @@ function pathsort(graph) { }; const sort_nodes = function (path, nodes) { Stdlib__List.iter((function (node) { - sort_node(path, node); - }), nodes); + sort_node(path, node); + }), nodes); }; const sort_node = function (path, node) { if (!Stdlib__List.mem(node, visited.contents)) { @@ -1702,8 +1702,8 @@ function pathsort(graph) { }; Stdlib__List.iter((function (param) { - sort_node(empty_path, param[0]); - }), graph); + sort_node(empty_path, param[0]); + }), graph); return visited.contents; } diff --git a/jscomp/test/dist/jscomp/test/tramp_fib.js b/jscomp/test/dist/jscomp/test/tramp_fib.js index 925c7739d..fa93c1d4f 100644 --- a/jscomp/test/dist/jscomp/test/tramp_fib.js +++ b/jscomp/test/dist/jscomp/test/tramp_fib.js @@ -22,22 +22,22 @@ function fib(n, k) { return { TAG: /* Suspend */1, _0: (function () { - return fib(n - 1 | 0, (function (v0) { - return fib(n - 2 | 0, (function (v1) { - return k(v0 + v1 | 0); - })); - })); - }) + return fib(n - 1 | 0, (function (v0) { + return fib(n - 2 | 0, (function (v1) { + return k(v0 + v1 | 0); + })); + })); + }) }; } } const u = fib(10, (function (x) { - return { - TAG: /* Continue */0, - _0: x - }; - })); + return { + TAG: /* Continue */0, + _0: x + }; + })); function iter(_bounce) { while(true) { @@ -56,8 +56,8 @@ function isEven(n) { return { TAG: /* Suspend */1, _0: (function () { - return isOdd(n - 1 | 0); - }) + return isOdd(n - 1 | 0); + }) }; } else { return { diff --git a/jscomp/test/dist/jscomp/test/tscanf_test.js b/jscomp/test/dist/jscomp/test/tscanf_test.js index 3a9be5375..12c0b874a 100644 --- a/jscomp/test/dist/jscomp/test/tscanf_test.js +++ b/jscomp/test/dist/jscomp/test/tscanf_test.js @@ -46,42 +46,42 @@ function id(x) { function test0(param) { return ((((Curry._2(Stdlib__Scanf.sscanf("", { - TAG: /* Format */0, - _0: /* End_of_format */0, - _1: "" - }), id, 1) + Curry._2(Stdlib__Scanf.sscanf("", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - }, - _1: " " - }), id, 2) | 0) + Curry._2(Stdlib__Scanf.sscanf(" ", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - }, - _1: " " - }), id, 3) | 0) + Curry._2(Stdlib__Scanf.sscanf("\t", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - }, - _1: " " - }), id, 4) | 0) + Curry._2(Stdlib__Scanf.sscanf("\n", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - }, - _1: " " - }), id, 5) | 0) + Curry._1(Stdlib__Scanf.sscanf("\n\t 6", { + TAG: /* Format */0, + _0: /* End_of_format */0, + _1: "" + }), id, 1) + Curry._2(Stdlib__Scanf.sscanf("", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + }, + _1: " " + }), id, 2) | 0) + Curry._2(Stdlib__Scanf.sscanf(" ", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + }, + _1: " " + }), id, 3) | 0) + Curry._2(Stdlib__Scanf.sscanf("\t", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + }, + _1: " " + }), id, 4) | 0) + Curry._2(Stdlib__Scanf.sscanf("\n", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + }, + _1: " " + }), id, 5) | 0) + Curry._1(Stdlib__Scanf.sscanf("\n\t 6", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -102,58 +102,58 @@ test("File \"jscomp/test/tscanf_test.ml\", line 42, characters 5-12", test0(unde function test1(param) { return (((Curry._1(Stdlib__Scanf.sscanf("1", { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%d" - }), id) + Curry._1(Stdlib__Scanf.sscanf(" 2", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: " %d" - }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" -2", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: " %d" - }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" +2", { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } - }, - _1: " %d" - }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" 2a ", { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%d" + }), id) + Curry._1(Stdlib__Scanf.sscanf(" 2", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: " %d" + }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" -2", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: " %d" + }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" +2", { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: " %d" + }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" 2a ", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -178,30 +178,30 @@ test("File \"jscomp/test/tscanf_test.ml\", line 54, characters 5-12", test1(unde function test2(param) { return (Curry._1(Stdlib__Scanf.sscanf("123", { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 2 - }, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%2i" - }), id) + Curry._1(Stdlib__Scanf.sscanf("245", { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: { + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 2 }, - _1: "%d" - }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" 2a ", { + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%2i" + }), id) + Curry._1(Stdlib__Scanf.sscanf("245", { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%d" + }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" 2a ", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -230,48 +230,48 @@ test("File \"jscomp/test/tscanf_test.ml\", line 63, characters 5-12", test2(unde function test3(param) { return ((Curry._1(Stdlib__Scanf.sscanf("0xff", { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 3 - }, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%3i" - }), id) + Curry._1(Stdlib__Scanf.sscanf("0XEF", { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: { - TAG: /* Lit_padding */0, - _0: /* Right */1, - _1: 3 - }, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%3i" - }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf("x=-245", { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: " x = ", - _1: { - TAG: /* Int */4, - _0: /* Int_d */0, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - } + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: { + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 3 + }, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%3i" + }), id) + Curry._1(Stdlib__Scanf.sscanf("0XEF", { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: { + TAG: /* Lit_padding */0, + _0: /* Right */1, + _1: 3 }, - _1: " x = %d" - }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" 2a ", { + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%3i" + }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf("x=-245", { + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: " x = ", + _1: { + TAG: /* Int */4, + _0: /* Int_d */0, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + } + }, + _1: " x = %d" + }), id) | 0) + Curry._1(Stdlib__Scanf.sscanf(" 2a ", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -313,8 +313,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === 1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-1"), { + return b0 === 1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -328,8 +328,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === -1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+1"), { + return b0 === -1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -343,8 +343,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === 1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1."), { + return b0 === 1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1."), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -358,8 +358,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === 1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string(".1"), { + return b0 === 1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string(".1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -373,8 +373,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === 0.1; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-.1"), { + return b0 === 0.1; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-.1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -388,8 +388,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === -0.1; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+.1"), { + return b0 === -0.1; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+.1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -403,8 +403,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === 0.1; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+1."), { + return b0 === 0.1; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+1."), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -418,8 +418,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === 1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-1."), { + return b0 === 1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-1."), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -433,8 +433,8 @@ function test4(param) { }, _1: "%f" }), (function (b0) { - return b0 === -1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("0 1. 1.3"), { + return b0 === -1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("0 1. 1.3"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -474,8 +474,8 @@ function test4(param) { }, _1: "%f %f %f" }), (function (b0, b1, b2) { - return b0 === 0.0 && b1 === 1.0 ? b2 === 1.3 : false; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("0.113"), { + return b0 === 0.0 && b1 === 1.0 ? b2 === 1.3 : false; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("0.113"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -493,8 +493,8 @@ function test4(param) { }, _1: "%4f" }), (function (b0) { - return b0 === 0.11; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("0.113"), { + return b0 === 0.11; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("0.113"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -512,8 +512,8 @@ function test4(param) { }, _1: "%5f" }), (function (b0) { - return b0 === 0.113; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("000.113"), { + return b0 === 0.113; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("000.113"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -531,8 +531,8 @@ function test4(param) { }, _1: "%15f" }), (function (b0) { - return b0 === 0.113; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+000.113"), { + return b0 === 0.113; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("+000.113"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -550,8 +550,8 @@ function test4(param) { }, _1: "%15f" }), (function (b0) { - return b0 === 0.113; - }))) { + return b0 === 0.113; + }))) { return Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("-000.113"), { TAG: /* Format */0, _0: { @@ -570,8 +570,8 @@ function test4(param) { }, _1: "%15f" }), (function (b0) { - return b0 === -0.113; - })); + return b0 === -0.113; + })); } else { return false; } @@ -594,8 +594,8 @@ function test5(param) { }, _1: "%e" }), (function (b) { - return b === 10.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1e+1"), { + return b === 10.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1e+1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -609,8 +609,8 @@ function test5(param) { }, _1: "%e" }), (function (b) { - return b === 10.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("10e-1"), { + return b === 10.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("10e-1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -624,8 +624,8 @@ function test5(param) { }, _1: "%e" }), (function (b) { - return b === 1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("10.e-1"), { + return b === 1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("10.e-1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -639,8 +639,8 @@ function test5(param) { }, _1: "%e" }), (function (b) { - return b === 1.0; - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1e1 1.e+1 1.3e-1"), { + return b === 1.0; + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1e1 1.e+1 1.3e-1"), { TAG: /* Format */0, _0: { TAG: /* Float */8, @@ -680,8 +680,8 @@ function test5(param) { }, _1: "%e %e %e" }), (function (b1, b2, b3) { - return b1 === 10.0 && b2 === b1 ? b3 === 0.13 : false; - }))) { + return b1 === 10.0 && b2 === b1 ? b3 === 0.13 : false; + }))) { return Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("1 1.1 0e+1 1.3e-1"), { TAG: /* Format */0, _0: { @@ -735,12 +735,12 @@ function test5(param) { }, _1: "%g %g %g %g" }), (function (b1, b2, b3, b4) { - if (b1 === 1.0 && b2 === 1.1 && b3 === 0.0) { - return b4 === 0.13; - } else { - return false; - } - })); + if (b1 === 1.0 && b2 === 1.1 && b3 === 0.0) { + return b4 === 0.13; + } else { + return false; + } + })); } else { return false; } @@ -762,14 +762,14 @@ function test6(param) { }, _1: "%B%B" }), (function (b1, b2) { - return Caml_obj.caml_equal([ - b1, - b2 - ], [ - true, - true - ]); - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("truefalse"), { + return Caml_obj.caml_equal([ + b1, + b2 + ], [ + true, + true + ]); + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("truefalse"), { TAG: /* Format */0, _0: { TAG: /* Bool */9, @@ -782,14 +782,14 @@ function test6(param) { }, _1: "%B%B" }), (function (b1, b2) { - return Caml_obj.caml_equal([ - b1, - b2 - ], [ - true, - false - ]); - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("falsetrue"), { + return Caml_obj.caml_equal([ + b1, + b2 + ], [ + true, + false + ]); + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("falsetrue"), { TAG: /* Format */0, _0: { TAG: /* Bool */9, @@ -802,14 +802,14 @@ function test6(param) { }, _1: "%B%B" }), (function (b1, b2) { - return Caml_obj.caml_equal([ - b1, - b2 - ], [ - false, - true - ]); - })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("falsefalse"), { + return Caml_obj.caml_equal([ + b1, + b2 + ], [ + false, + true + ]); + })) && Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("falsefalse"), { TAG: /* Format */0, _0: { TAG: /* Bool */9, @@ -822,14 +822,14 @@ function test6(param) { }, _1: "%B%B" }), (function (b1, b2) { - return Caml_obj.caml_equal([ - b1, - b2 - ], [ - false, - false - ]); - }))) { + return Caml_obj.caml_equal([ + b1, + b2 + ], [ + false, + false + ]); + }))) { return Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("true false"), { TAG: /* Format */0, _0: { @@ -847,14 +847,14 @@ function test6(param) { }, _1: "%B %B" }), (function (b1, b2) { - return Caml_obj.caml_equal([ - b1, - b2 - ], [ - true, - false - ]); - })); + return Caml_obj.caml_equal([ + b1, + b2 + ], [ + true, + false + ]); + })); } else { return false; } @@ -899,8 +899,8 @@ function test7(param) { }, _1: "%C %C %C %C %C" }), (function (c1, c2, c3, c4, c5) { - return c1 === /* 'a' */97 && c2 === /* '\n' */10 && c3 === /* '\t' */9 && c4 === /* '\000' */0 ? c5 === /* ' ' */32 : false; - }))) { + return c1 === /* 'a' */97 && c2 === /* '\n' */10 && c3 === /* '\t' */9 && c4 === /* '\000' */0 ? c5 === /* ' ' */32 : false; + }))) { return Curry._1(Stdlib__Scanf.bscanf(Stdlib__Scanf.Scanning.from_string("a \n \t \0 b"), { TAG: /* Format */0, _0: { @@ -927,12 +927,12 @@ function test7(param) { }, _1: "%c %c %c " }), (function (c1, c2, c3) { - if (c1 === /* 'a' */97 && c2 === /* '\000' */0) { - return c3 === /* 'b' */98; - } else { - return false; - } - })); + if (c1 === /* 'a' */97 && c2 === /* '\000' */0) { + return c3 === /* 'b' */98; + } else { + return false; + } + })); } else { return false; } @@ -1025,8 +1025,8 @@ function test9(param) { }, _1: "%S" }), (function (s) { - return s; - })) === "\xef" && Curry._1(Stdlib__Scanf.sscanf("\"\\xef\\xbb\\xbf\"", { + return s; + })) === "\xef" && Curry._1(Stdlib__Scanf.sscanf("\"\\xef\\xbb\\xbf\"", { TAG: /* Format */0, _0: { TAG: /* Caml_string */3, @@ -1035,8 +1035,8 @@ function test9(param) { }, _1: "%S" }), (function (s) { - return s; - })) === test9_string && Curry._1(Stdlib__Scanf.sscanf("\"\\xef\\xbb\\xbf\"", { + return s; + })) === test9_string && Curry._1(Stdlib__Scanf.sscanf("\"\\xef\\xbb\\xbf\"", { TAG: /* Format */0, _0: { TAG: /* Caml_string */3, @@ -1045,8 +1045,8 @@ function test9(param) { }, _1: "%S" }), (function (s) { - return s; - })) === "\xef\xbb\xbf" && Curry._1(Stdlib__Scanf.sscanf("\"\xef\xbb\xbf\"", { + return s; + })) === "\xef\xbb\xbf" && Curry._1(Stdlib__Scanf.sscanf("\"\xef\xbb\xbf\"", { TAG: /* Format */0, _0: { TAG: /* Caml_string */3, @@ -1055,8 +1055,8 @@ function test9(param) { }, _1: "%S" }), (function (s) { - return s; - })) === test9_string && Curry._1(Stdlib__Scanf.sscanf("\"\\\\xef\\\\xbb\\\\xbf\"", { + return s; + })) === test9_string && Curry._1(Stdlib__Scanf.sscanf("\"\\\\xef\\\\xbb\\\\xbf\"", { TAG: /* Format */0, _0: { TAG: /* Caml_string */3, @@ -1065,8 +1065,8 @@ function test9(param) { }, _1: "%S" }), (function (s) { - return s; - })) === "\\xef\\xbb\\xbf") { + return s; + })) === "\\xef\\xbb\\xbf") { return Curry._1(Stdlib__Scanf.sscanf("\" \"", { TAG: /* Format */0, _0: { @@ -1076,8 +1076,8 @@ function test9(param) { }, _1: "%S" }), (function (s) { - return s; - })) === " "; + return s; + })) === " "; } else { return false; } @@ -1147,8 +1147,8 @@ function test10(param) { }, _1: "%s %s %S %s %S %s" }), (function (s1, s2, s3, s4, s5, s6) { - return s1 + (s2 + (s3 + (s4 + (s5 + s6)))); - })); + return s1 + (s2 + (s3 + (s4 + (s5 + s6)))); + })); if (res === "Unechaine:celle-cietcelle-la!" && unit("\"a\\\n b\"") === "ab" && unit("\"\\\n ab\"") === "ab" && unit("\"\n\\\n ab\"") === "\nab" && unit("\"\n\\\n a\nb\"") === "\na\nb" && unit("\"\n\\\n \\\n a\nb\"") === "\na\nb" && unit("\"\n\\\n a\n\\\nb\\\n\"") === "\na\nb") { return unit("\"a\\\n \"") === "a"; } else { @@ -1184,8 +1184,8 @@ function test11(param) { }, _1: "%s %s %s" }), (function (prenom, nom, poids) { - return prenom === "Pierre" && nom === "Weis" ? Caml_format.caml_int_of_string(poids) === 70 : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Jean-Luc\tde Leage\t68", { + return prenom === "Pierre" && nom === "Weis" ? Caml_format.caml_int_of_string(poids) === 70 : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Jean-Luc\tde Leage\t68", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -1214,8 +1214,8 @@ function test11(param) { }, _1: "%[^\t] %[^\t] %d" }), (function (prenom, nom, poids) { - return prenom === "Jean-Luc" && nom === "de Leage" ? poids === 68 : false; - }))) { + return prenom === "Jean-Luc" && nom === "de Leage" ? poids === 68 : false; + }))) { return Curry._1(Stdlib__Scanf.sscanf("Daniel\tde Rauglaudre\t66", { TAG: /* Format */0, _0: { @@ -1257,12 +1257,12 @@ function test11(param) { }, _1: "%s@\t %s@\t %d" }), (function (prenom, nom, poids) { - if (prenom === "Daniel" && nom === "de Rauglaudre") { - return poids === 66; - } else { - return false; - } - })); + if (prenom === "Daniel" && nom === "de Rauglaudre") { + return poids === 66; + } else { + return false; + } + })); } else { return false; } @@ -1278,8 +1278,8 @@ function test110(param) { }, _1: " " }), (function (x) { - return x; - }), "") === "" && Curry._1(Stdlib__Scanf.sscanf("", { + return x; + }), "") === "" && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -1288,8 +1288,8 @@ function test110(param) { }, _1: "%s" }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf("", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -1302,8 +1302,8 @@ function test110(param) { }, _1: "%s%s" }), (function (x, y) { - return x === "" ? y === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("", { + return x === "" ? y === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -1316,8 +1316,8 @@ function test110(param) { }, _1: "%s " }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf("", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -1330,8 +1330,8 @@ function test110(param) { }, _1: " %s" }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf("", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -1348,8 +1348,8 @@ function test110(param) { }, _1: " %s " }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf("", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -1359,8 +1359,8 @@ function test110(param) { }, _1: "%[^\n]" }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf("", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf("", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -1374,8 +1374,8 @@ function test110(param) { }, _1: "%[^\n] " }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf(" ", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf(" ", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -1384,8 +1384,8 @@ function test110(param) { }, _1: "%s" }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf(" ", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf(" ", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -1398,8 +1398,8 @@ function test110(param) { }, _1: "%s%s" }), (function (x, y) { - return x === "" ? y === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf(" ", { + return x === "" ? y === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf(" ", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -1416,8 +1416,8 @@ function test110(param) { }, _1: " %s " }), (function (x) { - return x === ""; - })) && Curry._1(Stdlib__Scanf.sscanf(" ", { + return x === ""; + })) && Curry._1(Stdlib__Scanf.sscanf(" ", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -1438,8 +1438,8 @@ function test110(param) { }, _1: " %s %s" }), (function (x, y) { - return x === "" ? x === y : false; - })) && Curry._1(Stdlib__Scanf.sscanf(" ", { + return x === "" ? x === y : false; + })) && Curry._1(Stdlib__Scanf.sscanf(" ", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -1465,8 +1465,8 @@ function test110(param) { }, _1: " %s@ %s" }), (function (x, y) { - return x === "" ? x === y : false; - })) && Curry._1(Stdlib__Scanf.sscanf(" poi !", { + return x === "" ? x === y : false; + })) && Curry._1(Stdlib__Scanf.sscanf(" poi !", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -1496,8 +1496,8 @@ function test110(param) { }, _1: " %s@ %s@." }), (function (x, y) { - return x === "poi" ? y === "!" : false; - }))) { + return x === "poi" ? y === "!" : false; + }))) { return Curry._1(Stdlib__Scanf.sscanf(" poi !", { TAG: /* Format */0, _0: { @@ -1524,12 +1524,12 @@ function test110(param) { }, _1: "%s@ %s@." }), (function (x, y) { - if (x === "") { - return y === "poi !"; - } else { - return false; - } - })); + if (x === "") { + return y === "poi !"; + } else { + return false; + } + })); } else { return false; } @@ -1550,8 +1550,8 @@ function test111(param) { }, _1: "%[^\n]@\n" }), (function (x) { - return x === ""; - })); + return x === ""; + })); } test("File \"jscomp/test/tscanf_test.ml\", line 293, characters 5-12", test11(undefined) && test110(undefined) && test111(undefined)); @@ -1589,89 +1589,89 @@ function f(ib) { }, _1: " %i;" }), (function (i) { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 } - }, - _1: " %i;" - }), (function (j) { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { + } + }, + _1: " %i;" + }), (function (j) { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 + _0: /* ';' */59, + _1: /* End_of_format */0 + } + } + }, + _1: " %i;" + }), (function (k) { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ';' */59, + _1: /* End_of_format */0 + } } - } - }, - _1: " %i;" - }), (function (k) { - return Curry._1(Stdlib__Scanf.bscanf(ib, { + }, + _1: " %i;" + }), (function (l) { + Curry._1(Stdlib__Scanf.bscanf(ib, { TAG: /* Format */0, _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ';' */59, - _1: /* End_of_format */0 - } - } + TAG: /* String_literal */11, + _0: " ]", + _1: /* End_of_format */0 }, - _1: " %i;" - }), (function (l) { - Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: " ]", - _1: /* End_of_format */0 - }, - _1: " ]" - }), undefined); - return { - hd: i, - tl: { - hd: j, - tl: { - hd: k, - tl: { - hd: l, - tl: /* [] */0 - } - } - } - }; - })); + _1: " ]" + }), undefined); + return { + hd: i, + tl: { + hd: j, + tl: { + hd: k, + tl: { + hd: l, + tl: /* [] */0 + } + } + } + }; })); - })); - })); + })); + })); + })); } function test12(param) { @@ -1713,11 +1713,11 @@ function scan_elems(ib, accu) { }, _1: " %i;" }), (function (i) { - return scan_elems(ib, { - hd: i, - tl: accu - }); - })); + return scan_elems(ib, { + hd: i, + tl: accu + }); + })); } catch (exn){ return accu; @@ -1819,23 +1819,23 @@ function scan_elems$1(ib, accu) { }, _1: " %i %c" }), (function (i, c) { - if (c === 59) { - return scan_elems$1(ib, { - hd: i, - tl: accu - }); - } - if (c !== 93) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "scan_elems" - }); - } - return Stdlib__List.rev({ + if (c === 59) { + return scan_elems$1(ib, { hd: i, tl: accu }); - })); + } + if (c !== 93) { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "scan_elems" + }); + } + return Stdlib__List.rev({ + hd: i, + tl: accu + }); + })); } function scan_int_list$1(ib) { @@ -1889,40 +1889,40 @@ function scan_elems$2(ib, accu) { }, _1: "%c %i" }), (function (c, i) { - if (c >= 91) { - if (c < 94) { - switch (c) { - case 91 : - if (Caml_obj.caml_equal(accu, /* [] */0)) { - return scan_elems$2(ib, { - hd: i, - tl: accu - }); - } - break; - case 92 : - break; - case 93 : - return Stdlib__List.rev({ + if (c >= 91) { + if (c < 94) { + switch (c) { + case 91 : + if (Caml_obj.caml_equal(accu, /* [] */0)) { + return scan_elems$2(ib, { hd: i, tl: accu }); - - } + } + break; + case 92 : + break; + case 93 : + return Stdlib__List.rev({ + hd: i, + tl: accu + }); + } - - } else if (c === 59) { - return scan_elems$2(ib, { - hd: i, - tl: accu - }); } - console.log(Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, c))); - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "scan_elems" + + } else if (c === 59) { + return scan_elems$2(ib, { + hd: i, + tl: accu }); - })); + } + console.log(Caml_bytes.bytes_to_string(Stdlib__Bytes.make(1, c))); + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "scan_elems" + }); + })); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -2012,24 +2012,24 @@ function scan_elems$3(ib, accu) { }, _1: " %i%[]; \t\n\r]" }), (function (i, s) { - switch (s) { - case ";" : - return scan_elems$3(ib, { - hd: i, - tl: accu - }); - case "]" : - return Stdlib__List.rev({ - hd: i, - tl: accu - }); - default: + switch (s) { + case ";" : + return scan_elems$3(ib, { + hd: i, + tl: accu + }); + case "]" : return Stdlib__List.rev({ hd: i, tl: accu }); - } - })); + default: + return Stdlib__List.rev({ + hd: i, + tl: accu + }); + } + })); } function scan_int_list$2(ib) { @@ -2108,55 +2108,55 @@ function scan_rest(ib, accu) { }, _1: " %c " }), (function (c) { - if (c === 59) { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Scan_char_set */20, - _0: undefined, - _1: "\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: /* End_of_format */0 - }, - _1: "%[]]" - }), (function (param) { - if (param === "]") { - return accu; - } else { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { + if (c === 59) { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Scan_char_set */20, + _0: undefined, + _1: "\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: /* End_of_format */0 + }, + _1: "%[]]" + }), (function (param) { + if (param === "]") { + return accu; + } else { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { TAG: /* Char_literal */12, _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } - } - }, - _1: " %i " - }), (function (i) { - return scan_rest(ib, { - hd: i, - tl: accu - }); - })); - } - })); - } - if (c !== 93) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "scan_rest" - }); - } - return accu; - })); + _1: /* End_of_format */0 + } + } + }, + _1: " %i " + }), (function (i) { + return scan_rest(ib, { + hd: i, + tl: accu + }); + })); + } + })); + } + if (c !== 93) { + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "scan_rest" + }); + } + return accu; + })); } function scan_elems$4(ib, accu) { @@ -2176,58 +2176,58 @@ function scan_elems$4(ib, accu) { }, _1: " %c " }), (function (c) { - if (c !== 91) { - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: "scan_elems" - }); - } - if (Caml_obj.caml_equal(accu, /* [] */0)) { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Scan_char_set */20, - _0: undefined, - _1: "\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: /* End_of_format */0 - }, - _1: "%[]]" - }), (function (param) { - if (param === "]") { - return accu; - } else { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } - } - }, - _1: " %i " - }), (function (i) { - return scan_rest(ib, { - hd: i, - tl: accu - }); - })); - } - })); - } + if (c !== 91) { throw new Caml_js_exceptions.MelangeError("Failure", { MEL_EXN_ID: "Failure", _1: "scan_elems" }); - })); + } + if (Caml_obj.caml_equal(accu, /* [] */0)) { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Scan_char_set */20, + _0: undefined, + _1: "\0\0\0\0\0\0\0\0\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: /* End_of_format */0 + }, + _1: "%[]]" + }), (function (param) { + if (param === "]") { + return accu; + } else { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 + } + } + }, + _1: " %i " + }), (function (i) { + return scan_rest(ib, { + hd: i, + tl: accu + }); + })); + } + })); + } + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: "scan_elems" + }); + })); } function scan_int_list$3(ib) { @@ -2306,66 +2306,66 @@ function scan_rest$1(ib, accu) { }, _1: "%[]]" }), (function (param) { - if (param === "]") { - return accu; - } else { - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } + if (param === "]") { + return accu; + } else { + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 } - }, - _1: " %i " - }), (function (i) { - let accu$1 = { - hd: i, - tl: accu - }; - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Scan_char_set */20, - _0: 1, - _1: "\0\0\0\0\0\0\0\b\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: /* End_of_format */0 - }, - _1: "%1[];]" - }), (function (param) { - switch (param) { - case ";" : - return scan_rest$1(ib, accu$1); - case "]" : - return accu$1; - default: - const s = Stdlib__Printf.sprintf({ - TAG: /* Format */0, - _0: { - TAG: /* String_literal */11, - _0: "scan_int_list", - _1: /* End_of_format */0 - }, - _1: "scan_int_list" - }); - throw new Caml_js_exceptions.MelangeError("Failure", { - MEL_EXN_ID: "Failure", - _1: s - }); - } - })); - })); - } - })); + } + }, + _1: " %i " + }), (function (i) { + let accu$1 = { + hd: i, + tl: accu + }; + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Scan_char_set */20, + _0: 1, + _1: "\0\0\0\0\0\0\0\b\0\0\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: /* End_of_format */0 + }, + _1: "%1[];]" + }), (function (param) { + switch (param) { + case ";" : + return scan_rest$1(ib, accu$1); + case "]" : + return accu$1; + default: + const s = Stdlib__Printf.sprintf({ + TAG: /* Format */0, + _0: { + TAG: /* String_literal */11, + _0: "scan_int_list", + _1: /* End_of_format */0 + }, + _1: "scan_int_list" + }); + throw new Caml_js_exceptions.MelangeError("Failure", { + MEL_EXN_ID: "Failure", + _1: s + }); + } + })); + })); + } + })); } function scan_int_list$4(ib) { @@ -2421,16 +2421,16 @@ 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) { - const accu$1 = { - hd: i, - tl: accu - }; - if (s === "") { - return accu$1; - } else { - return scan_elems$5(ib, scan_elem, accu$1); - } - })); + const accu$1 = { + hd: i, + tl: accu + }; + if (s === "") { + return accu$1; + } else { + return scan_elems$5(ib, scan_elem, accu$1); + } + })); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); @@ -2677,18 +2677,18 @@ 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) { - const accu$1 = { - hd: i, - tl: accu - }; - if (s === "") { - return accu$1; - } else { - return scan_elems$6(ib, scan_elem, accu$1); - } - }), (function (ib, exc) { - return accu; - })); + const accu$1 = { + hd: i, + tl: accu + }; + if (s === "") { + return accu$1; + } else { + return scan_elems$6(ib, scan_elem, accu$1); + } + }), (function (ib, exc) { + return accu; + })); } function scan_list$1(scan_elem, ib) { @@ -2846,35 +2846,35 @@ function scan_elem(fmt, ib, f, ek) { function scan_elems$7(ib, scan_elem, accu) { return Curry._3(scan_elem, ib, (function (i) { - const accu$1 = { - hd: i, - tl: accu - }; - return Curry._1(Stdlib__Scanf.kscanf(ib, (function (ib, exc) { - return accu$1; - }), { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Scan_char_set */20, - _0: 1, - _1: "\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: /* End_of_format */0 - } - }, - _1: " %1[;]" - }), (function (s) { - if (s === "") { - return accu$1; - } else { - return scan_elems$7(ib, scan_elem, accu$1); - } - })); - }), (function (ib, exc) { - return accu; - })); + const accu$1 = { + hd: i, + tl: accu + }; + return Curry._1(Stdlib__Scanf.kscanf(ib, (function (ib, exc) { + return accu$1; + }), { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Scan_char_set */20, + _0: 1, + _1: "\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: /* End_of_format */0 + } + }, + _1: " %1[;]" + }), (function (s) { + if (s === "") { + return accu$1; + } else { + return scan_elems$7(ib, scan_elem, accu$1); + } + })); + }), (function (ib, exc) { + return accu; + })); } function scan_list$2(scan_elem, ib) { @@ -3011,48 +3011,48 @@ function test32(param) { tl: /* [] */0 } } - } - }); - } else { - return false; - } -} - -test("File \"jscomp/test/tscanf_test.ml\", line 728, characters 5-12", test32(undefined)); - -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) { - const accu$1 = { - hd: i, - tl: accu - }; - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: { - TAG: /* Scan_char_set */20, - _0: 1, - _1: "\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } + } + }); + } else { + return false; + } +} + +test("File \"jscomp/test/tscanf_test.ml\", line 728, characters 5-12", test32(undefined)); + +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) { + const accu$1 = { + hd: i, + tl: accu + }; + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Scan_char_set */20, + _0: 1, + _1: "\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: /* End_of_format */0 } - }, - _1: " %1[;] " - }), (function (param) { - if (param === "") { - return accu$1; - } else { - return scan_elems$8(ib, scan_elem_fmt, accu$1); - } - })); - })); + } + }, + _1: " %1[;] " + }), (function (param) { + if (param === "") { + return accu$1; + } else { + return scan_elems$8(ib, scan_elem_fmt, accu$1); + } + })); + })); } function scan_list$3(scan_elem_fmt, ib) { @@ -3184,8 +3184,8 @@ test("File \"jscomp/test/tscanf_test.ml\", line 787, characters 5-12", test34(un function scan_elems$9(scan_elem, accu, ib) { return Curry._2(Stdlib__Scanf.kscanf(ib, (function (ib, exc) { - return accu; - }), { + return accu; + }), { TAG: /* Format */0, _0: { TAG: /* Reader */19, @@ -3193,39 +3193,39 @@ function scan_elems$9(scan_elem, accu, ib) { }, _1: "%r" }), (function (ib) { - return Curry._2(scan_elem, ib, (function (elem) { - const accu$1 = { - hd: elem, - tl: accu - }; - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { + return Curry._2(scan_elem, ib, (function (elem) { + const accu$1 = { + hd: elem, + tl: accu + }; + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Char_literal */12, + _0: /* ' ' */32, + _1: { + TAG: /* Scan_char_set */20, + _0: 1, + _1: "\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", + _2: { TAG: /* Char_literal */12, _0: /* ' ' */32, - _1: { - TAG: /* Scan_char_set */20, - _0: 1, - _1: "\0\0\0\0\0\0\0\b\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", - _2: { - TAG: /* Char_literal */12, - _0: /* ' ' */32, - _1: /* End_of_format */0 - } - } - }, - _1: " %1[;] " - }), (function (param) { - if (param === "") { - return accu$1; - } else { - return scan_elems$9(scan_elem, accu$1, ib); + _1: /* End_of_format */0 + } } - })); - })); - }), (function (l) { - return l; - })); + }, + _1: " %1[;] " + }), (function (param) { + if (param === "") { + return accu$1; + } else { + return scan_elems$9(scan_elem, accu$1, ib); + } + })); + })); + }), (function (l) { + return l; + })); } function scan_list$4(scan_elem, ib) { @@ -3270,65 +3270,65 @@ function scan_float(ib) { function scan_int_list$8(param) { return scan_list$4((function (ib) { - return Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%i" - }); - }), param); + return Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%i" + }); + }), param); } function scan_string_list$2(param) { return scan_list$4((function (ib) { - return Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Caml_string */3, - _0: /* No_padding */0, - _1: /* End_of_format */0 - }, - _1: "%S" - }); - }), param); + return Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Caml_string */3, + _0: /* No_padding */0, + _1: /* End_of_format */0 + }, + _1: "%S" + }); + }), param); } function scan_bool_list(param) { return scan_list$4((function (ib) { - return Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Bool */9, - _0: /* No_padding */0, - _1: /* End_of_format */0 - }, - _1: "%B" - }); - }), param); + return Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Bool */9, + _0: /* No_padding */0, + _1: /* End_of_format */0 + }, + _1: "%B" + }); + }), param); } function scan_char_list(param) { return scan_list$4((function (ib) { - return Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Caml_char */1, - _0: /* End_of_format */0 - }, - _1: "%C" - }); - }), param); + return Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Caml_char */1, + _0: /* End_of_format */0 + }, + _1: "%C" + }); + }), param); } function scan_float_list_list(param) { return scan_list$4((function (ib, k) { - return Curry._1(k, scan_list$4(scan_float, ib)); - }), param); + return Curry._1(k, scan_list$4(scan_float, ib)); + }), param); } function test340(param) { @@ -3361,14 +3361,14 @@ function test340(param) { function scan_list_list(scan_elems, ib) { return scan_list$4((function (ib, k) { - return Curry._1(k, Curry._1(scan_elems, ib)); - }), ib); + return Curry._1(k, Curry._1(scan_elems, ib)); + }), ib); } function scan_float_item(ib, k) { return Curry._1(k, Curry._1(scan_float(ib), (function (x) { - return x; - }))); + return x; + }))); } function scan_float_list(ib, k) { @@ -3389,8 +3389,8 @@ function test35(param) { }, _1: "%N" }), (function (x) { - return x; - })) === 0 && Curry._1(Stdlib__Scanf.sscanf("456", { + return x; + })) === 0 && Curry._1(Stdlib__Scanf.sscanf("456", { TAG: /* Format */0, _0: { TAG: /* Scan_get_counter */21, @@ -3399,8 +3399,8 @@ function test35(param) { }, _1: "%N" }), (function (x) { - return x; - })) === 0 && Caml_obj.caml_equal(Curry._1(Stdlib__Scanf.sscanf("456", { + return x; + })) === 0 && Caml_obj.caml_equal(Curry._1(Stdlib__Scanf.sscanf("456", { TAG: /* Format */0, _0: { TAG: /* Int */4, @@ -3415,11 +3415,11 @@ function test35(param) { }, _1: "%d%N" }), (function (x, y) { - return [ - x, - y - ]; - })), [ + return [ + x, + y + ]; + })), [ 456, 1 ])) { @@ -3440,12 +3440,12 @@ function test35(param) { }, _1: "%N%s%N" }), (function (x, s, y) { - return [ - x, - s, - y - ]; - })), [ + return [ + x, + s, + y + ]; + })), [ 0, "", 1 @@ -3459,8 +3459,8 @@ test("File \"jscomp/test/tscanf_test.ml\", line 940, characters 5-12", test340(u function read_elems(read_elem, accu, ib) { return Curry._2(Stdlib__Scanf.kscanf(ib, (function (ib, exc) { - return accu; - }), { + return accu; + }), { TAG: /* Format */0, _0: { TAG: /* Reader */19, @@ -3481,17 +3481,17 @@ function read_elems(read_elem, accu, ib) { }, _1: "%r %1[;] " }), Curry._1(read_elem, (function (elem) { - return { - hd: elem, - tl: accu - }; - })), (function (accu, s) { - if (s === "") { - return accu; - } else { - return read_elems(read_elem, accu, ib); - } - })); + return { + hd: elem, + tl: accu + }; + })), (function (accu, s) { + if (s === "") { + return accu; + } else { + return read_elems(read_elem, accu, ib); + } + })); } function read_list(read_elem, ib) { @@ -3511,8 +3511,8 @@ function read_list(read_elem, ib) { }, _1: "[ %r ]" }), (function (param) { - return read_elems(read_elem, /* [] */0, param); - }), Stdlib__List.rev); + return read_elems(read_elem, /* [] */0, param); + }), Stdlib__List.rev); } function make_read_elem(fmt, f, ib) { @@ -3522,8 +3522,8 @@ function make_read_elem(fmt, f, ib) { function scan_List(fmt) { return function (param) { return read_list((function (param, param$1) { - return Curry._1(Stdlib__Scanf.bscanf(param$1, fmt), param); - }), param); + return Curry._1(Stdlib__Scanf.bscanf(param$1, fmt), param); + }), param); }; } @@ -3537,8 +3537,8 @@ function test36(param) { }, _1: "%n" }), (function (x) { - return x; - })) === 0 && Curry._1(Stdlib__Scanf.sscanf("456", { + return x; + })) === 0 && Curry._1(Stdlib__Scanf.sscanf("456", { TAG: /* Format */0, _0: { TAG: /* Scan_get_counter */21, @@ -3547,8 +3547,8 @@ function test36(param) { }, _1: "%n" }), (function (x) { - return x; - })) === 0 && Caml_obj.caml_equal(Curry._1(Stdlib__Scanf.sscanf("456", { + return x; + })) === 0 && Caml_obj.caml_equal(Curry._1(Stdlib__Scanf.sscanf("456", { TAG: /* Format */0, _0: { TAG: /* Int */4, @@ -3563,11 +3563,11 @@ function test36(param) { }, _1: "%d%n" }), (function (x, y) { - return [ - x, - y - ]; - })), [ + return [ + x, + y + ]; + })), [ 456, 3 ])) { @@ -3588,12 +3588,12 @@ function test36(param) { }, _1: "%n%s%n" }), (function (x, s, y) { - return [ - x, - s, - y - ]; - })), [ + return [ + x, + s, + y + ]; + })), [ 0, "", 0 @@ -3615,15 +3615,15 @@ function test37(param) { _0: /* End_of_format */0, _1: "" }), (function (x) { - return x; - }), 1) === 1) { + return x; + }), 1) === 1) { return Curry._2(Stdlib__Scanf.sscanf("123", { TAG: /* Format */0, _0: /* End_of_format */0, _1: "" }), (function (x) { - return x; - }), 1) === 1; + return x; + }), 1) === 1; } else { return false; } @@ -3768,12 +3768,12 @@ function test40(param) { }, _1: "%[^ab]%s%!" }), (function (s1, s2) { - if (s1 === "c") { - return s2 === "ba"; - } else { - return false; - } - })); + if (s1 === "c") { + return s2 === "ba"; + } else { + return false; + } + })); } test("File \"jscomp/test/tscanf_test.ml\", line 1046, characters 5-12", test40(undefined)); @@ -3798,12 +3798,12 @@ function test41(param) { }, _1: "%[^abc]%[cba]%!" }), (function (s1, s2) { - if (s1 === "") { - return s2 === "cba"; - } else { - return false; - } - })); + if (s1 === "") { + return s2 === "cba"; + } else { + return false; + } + })); } test("File \"jscomp/test/tscanf_test.ml\", line 1055, characters 5-12", test41(undefined)); @@ -3833,12 +3833,12 @@ function test42(param) { }, _1: "%[^abc]%[abc]%s%!" }), (function (s1, s2, s3) { - if (s1 === "def" && s2 === "cbaa") { - return s3 === "ghi"; - } else { - return false; - } - }))) { + if (s1 === "def" && s2 === "cbaa") { + return s3 === "ghi"; + } else { + return false; + } + }))) { return false; } const ib$1 = Stdlib__Scanf.Scanning.from_string(s); @@ -3858,8 +3858,8 @@ function test42(param) { }, _1: "%s@\t" }), (function (s) { - return s === "defcbaaghi"; - })); + return s === "defcbaaghi"; + })); } test("File \"jscomp/test/tscanf_test.ml\", line 1067, characters 5-12", test42(undefined)); @@ -3881,8 +3881,8 @@ function test43(param) { }, _1: "%i%!" }), (function (i) { - return i; - })); + return i; + })); } function test44(param) { @@ -3900,8 +3900,8 @@ function test44(param) { }, _1: "%!%i" }), (function (i) { - return i; - })); + return i; + })); } Testing.test_raises_this_exc({ @@ -3938,12 +3938,12 @@ function test45(param) { }, _1: "%[0-9].%[0-9]%s%!" }), (function (s1, s2, s3) { - if (s1 === "12" && s2 === "2") { - return s3 === ""; - } else { - return false; - } - })); + if (s1 === "12" && s2 === "2") { + return s3 === ""; + } else { + return false; + } + })); } test("File \"jscomp/test/tscanf_test.ml\", line 1090, characters 5-12", test45(undefined)); @@ -4119,22 +4119,22 @@ function test48(param) { }, _1: "%i %{%d%}%s %!" }), (function (i, f, s) { - if (i === 12 && Caml_obj.caml_equal(f, { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%i" - })) { - return s === "89"; - } else { - return false; - } - }))) { + if (i === 12 && Caml_obj.caml_equal(f, { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%i" + })) { + return s === "89"; + } else { + return false; + } + }))) { return false; } const k = function (s) { @@ -4151,8 +4151,8 @@ function test48(param) { }, _1: "%(%f%)" }), (function (_fmt, i) { - return i; - })); + return i; + })); }; if (k("\" : %1f\": 987654321") !== 9.0) { return false; @@ -4184,8 +4184,8 @@ function test48(param) { }, _1: "Read integers with %(%i%)" }), (function (_fmt, i) { - return i; - })); + return i; + })); }; if (h("Read integers with \"%1d\"987654321") !== 9) { return false; @@ -4220,11 +4220,11 @@ function test48(param) { }, _1: "with %(%i %s%)" }), (function (_fmt, amount, currency) { - return [ - amount, - currency - ]; - })); + return [ + amount, + currency + ]; + })); }; if (!Caml_obj.caml_equal(i("with \" : %d %s\" : 21 euros"), [ 21, @@ -4271,11 +4271,11 @@ function test48(param) { }, _1: "with %(%i %_s %s%)" }), (function (_fmt, amount, currency) { - return [ - amount, - currency - ]; - })); + return [ + amount, + currency + ]; + })); }; if (Caml_obj.caml_equal(j("with \" : %1d %_s %s\" : 987654321 euros"), [ 9, @@ -4309,8 +4309,8 @@ function test49(param) { }, _1: "%[\\]" }), (function (s) { - return s === ""; - })) && Curry._1(Stdlib__Scanf.sscanf("as", { + return s === ""; + })) && Curry._1(Stdlib__Scanf.sscanf("as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4324,8 +4324,8 @@ function test49(param) { }, _1: "%[\\]%s" }), (function (s, t) { - return s === "" ? t === "as" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("as", { + return s === "" ? t === "as" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4342,8 +4342,8 @@ function test49(param) { }, _1: "%[\\]%s%!" }), (function (s, t) { - return s === "" ? t === "as" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("as", { + return s === "" ? t === "as" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4353,8 +4353,8 @@ function test49(param) { }, _1: "%[a..z]" }), (function (s) { - return s === "a"; - })) && Curry._1(Stdlib__Scanf.sscanf("as", { + return s === "a"; + })) && Curry._1(Stdlib__Scanf.sscanf("as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4364,8 +4364,8 @@ function test49(param) { }, _1: "%[a-z]" }), (function (s) { - return s === "as"; - })) && Curry._1(Stdlib__Scanf.sscanf("as", { + return s === "as"; + })) && Curry._1(Stdlib__Scanf.sscanf("as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4379,8 +4379,8 @@ function test49(param) { }, _1: "%[a..z]%s" }), (function (s, t) { - return s === "a" ? t === "s" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("as", { + return s === "a" ? t === "s" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4394,8 +4394,8 @@ function test49(param) { }, _1: "%[a-z]%s" }), (function (s, t) { - return s === "as" ? t === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("-as", { + return s === "as" ? t === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("-as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4405,8 +4405,8 @@ function test49(param) { }, _1: "%[-a-z]" }), (function (s) { - return s === "-as"; - })) && Curry._1(Stdlib__Scanf.sscanf("-as", { + return s === "-as"; + })) && Curry._1(Stdlib__Scanf.sscanf("-as", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -4423,8 +4423,8 @@ function test49(param) { }, _1: "%[-a-z]@s" }), (function (s) { - return s === "-a"; - })) && Curry._1(Stdlib__Scanf.sscanf("-as", { + return s === "-a"; + })) && Curry._1(Stdlib__Scanf.sscanf("-as", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -4445,8 +4445,8 @@ function test49(param) { }, _1: "-%[a]@s" }), (function (s) { - return s === "a"; - })) && Curry._1(Stdlib__Scanf.sscanf("-asb", { + return s === "a"; + })) && Curry._1(Stdlib__Scanf.sscanf("-asb", { TAG: /* Format */0, _0: { TAG: /* Char_literal */12, @@ -4474,8 +4474,8 @@ function test49(param) { }, _1: "-%[a]@sb%!" }), (function (s) { - return s === "a"; - }))) { + return s === "a"; + }))) { return Curry._1(Stdlib__Scanf.sscanf("-asb", { TAG: /* Format */0, _0: { @@ -4501,12 +4501,12 @@ function test49(param) { }, _1: "-%[a]@s%s" }), (function (s, t) { - if (s === "a") { - return t === "b"; - } else { - return false; - } - })); + if (s === "a") { + return t === "b"; + } else { + return false; + } + })); } else { return false; } @@ -4551,30 +4551,30 @@ function writer(ib, ob) { }, _1: "%s\n" }), (function (s) { - switch (s) { - case "start" : - send_string(ob, "Hello World!"); - return reader(ib, ob); - case "stop" : - return Curry._1(Stdlib__Scanf.bscanf(ib, { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%i" - }), (function (i) { - return i; - })); - default: - const i = Caml_format.caml_int_of_string(s); - send_string(ob, String(i)); + switch (s) { + case "start" : + send_string(ob, "Hello World!"); return reader(ib, ob); - } - })); + case "stop" : + return Curry._1(Stdlib__Scanf.bscanf(ib, { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%i" + }), (function (i) { + return i; + })); + default: + const i = Caml_format.caml_int_of_string(s); + send_string(ob, String(i)); + return reader(ib, ob); + } + })); } const count = { @@ -4601,20 +4601,20 @@ function reader(ib, ob) { }, _1: "%[^\n]\n" }), (function (s) { - if (s === "stop") { - send_string(ob, "stop"); - return writer(ib, ob); - } - const l = s.length; - count.contents = l + count.contents | 0; - if (count.contents >= 100) { - send_string(ob, "stop"); - send_string(ob, String(count.contents)); - } else { - send_string(ob, String(l)); - } + if (s === "stop") { + send_string(ob, "stop"); return writer(ib, ob); - })); + } + const l = s.length; + count.contents = l + count.contents | 0; + if (count.contents >= 100) { + send_string(ob, "stop"); + send_string(ob, String(count.contents)); + } else { + send_string(ob, String(l)); + } + return writer(ib, ob); + })); } } @@ -4670,8 +4670,8 @@ function test51(param) { }, _1: "%s%s\n" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld", { + return s1 === "Hello" ? s2 === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4691,8 +4691,8 @@ function test51(param) { }, _1: "%s\n%s%!" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { + return s1 === "Hello" ? s2 === "World" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4709,8 +4709,8 @@ function test51(param) { }, _1: "%s\n%s" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World!" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\n", { + return s1 === "Hello" ? s2 === "World!" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\n", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4727,8 +4727,8 @@ function test51(param) { }, _1: "%s@\n%s" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "" : false; - }))) { + return s1 === "Hello" ? s2 === "" : false; + }))) { return Curry._1(Stdlib__Scanf.sscanf("Hello \n", { TAG: /* Format */0, _0: { @@ -4746,12 +4746,12 @@ function test51(param) { }, _1: "%s@\n%s" }), (function (s1, s2) { - if (s1 === "Hello ") { - return s2 === ""; - } else { - return false; - } - })); + if (s1 === "Hello ") { + return s2 === ""; + } else { + return false; + } + })); } else { return false; } @@ -4801,8 +4801,8 @@ function test52(param) { }, _1: "%s%s@\n" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld", { + return s1 === "Hello" ? s2 === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4822,8 +4822,8 @@ function test52(param) { }, _1: "%s@\n%s%!" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { + return s1 === "Hello" ? s2 === "World" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4844,8 +4844,8 @@ function test52(param) { }, _1: "%s@\n%s@\n" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World!" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\n", { + return s1 === "Hello" ? s2 === "World!" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\n", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4862,8 +4862,8 @@ function test52(param) { }, _1: "%s@\n%s" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello \n", { + return s1 === "Hello" ? s2 === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello \n", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4880,8 +4880,8 @@ function test52(param) { }, _1: "%s%s@\n" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === " " : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello \n", { + return s1 === "Hello" ? s2 === " " : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello \n", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4906,8 +4906,8 @@ function test52(param) { }, _1: "%s%s%_1[ ]\n" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello \n", { + return s1 === "Hello" ? s2 === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello \n", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4932,8 +4932,8 @@ function test52(param) { }, _1: "%s%_1[ ]%s\n" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld", { + return s1 === "Hello" ? s2 === "" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4953,8 +4953,8 @@ function test52(param) { }, _1: "%s\n%s%!" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { + return s1 === "Hello" ? s2 === "World" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -4974,8 +4974,8 @@ function test52(param) { }, _1: "%s\n%s%!" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World!" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { + return s1 === "Hello" ? s2 === "World!" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello\nWorld!", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -5002,8 +5002,8 @@ function test52(param) { }, _1: "%s\n%s@!%!" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "World" : false; - })) && Curry._1(Stdlib__Scanf.sscanf("Hello{foo}", { + return s1 === "Hello" ? s2 === "World" : false; + })) && Curry._1(Stdlib__Scanf.sscanf("Hello{foo}", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -5027,8 +5027,8 @@ function test52(param) { }, _1: "%s@{%s" }), (function (s1, s2) { - return s1 === "Hello" ? s2 === "foo}" : false; - }))) { + return s1 === "Hello" ? s2 === "foo}" : false; + }))) { return Curry._1(Stdlib__Scanf.sscanf("Hello[foo]", { TAG: /* Format */0, _0: { @@ -5053,12 +5053,12 @@ function test52(param) { }, _1: "%s@[%s" }), (function (s1, s2) { - if (s1 === "Hello") { - return s2 === "foo]"; - } else { - return false; - } - })); + if (s1 === "Hello") { + return s2 === "foo]"; + } else { + return false; + } + })); } else { return false; } @@ -5088,8 +5088,8 @@ function test53(param) { }, _1: "%d" }), (function (i) { - return (i - 1 | 0) === 123; - })) && Curry._1(Stdlib__Scanf.sscanf("123", { + return (i - 1 | 0) === 123; + })) && Curry._1(Stdlib__Scanf.sscanf("123", { TAG: /* Format */0, _0: { TAG: /* Int32 */5, @@ -5110,8 +5110,8 @@ function test53(param) { }, _1: "%ld" }), (function (i) { - return (i + 1 | 0) === 125; - })) && Caml.i64_eq(Curry._1(Stdlib__Scanf.sscanf("123", { + return (i + 1 | 0) === 125; + })) && Caml.i64_eq(Curry._1(Stdlib__Scanf.sscanf("123", { TAG: /* Format */0, _0: { TAG: /* Int64 */7, @@ -5136,11 +5136,11 @@ function test53(param) { }, _1: "%Ld" }), (function (i) { - return Caml.i64_eq(Caml_int64.sub(i, Caml_int64.one), [ - 0, - 123 - ]); - })); + return Caml.i64_eq(Caml_int64.sub(i, Caml_int64.one), [ + 0, + 123 + ]); + })); } else { return false; } @@ -5165,11 +5165,11 @@ function test56(param) { }, _1: "%d%n" }), (function (i, n) { - return [ - i, - n - ]; - })); + return [ + i, + n + ]; + })); }; if (Caml_obj.caml_equal(g("99"), [ 99, @@ -5432,22 +5432,22 @@ function test57(param) { }, _1: "%i %{%d%}%s %!" }), (function (i, f, s) { - if (i === 12 && Caml_obj.caml_equal(f, { - TAG: /* Format */0, - _0: { - TAG: /* Int */4, - _0: /* Int_i */3, - _1: /* No_padding */0, - _2: /* No_precision */0, - _3: /* End_of_format */0 - }, - _1: "%i" - })) { - return s === "89"; - } else { - return false; - } - })); + if (i === 12 && Caml_obj.caml_equal(f, { + TAG: /* Format */0, + _0: { + TAG: /* Int */4, + _0: /* Int_i */3, + _1: /* No_padding */0, + _2: /* No_precision */0, + _3: /* End_of_format */0 + }, + _1: "%i" + })) { + return s === "89"; + } else { + return false; + } + })); } else { return false; } @@ -5489,8 +5489,8 @@ function test58(param) { }, _1: "%s@%%%s" }), (function (prim0, prim1) { - return prim0 + prim1; - })) === "string1string2" && Curry._1(Stdlib__Scanf.sscanf("string1@string2", { + return prim0 + prim1; + })) === "string1string2" && Curry._1(Stdlib__Scanf.sscanf("string1@string2", { TAG: /* Format */0, _0: { TAG: /* Scan_char_set */20, @@ -5508,8 +5508,8 @@ function test58(param) { }, _1: "%[a-z0-9]@%s" }), (function (prim0, prim1) { - return prim0 + prim1; - })) === "string1string2") { + return prim0 + prim1; + })) === "string1string2") { return Curry._1(Stdlib__Scanf.sscanf("string1@%string2", { TAG: /* Format */0, _0: { @@ -5532,8 +5532,8 @@ function test58(param) { }, _1: "%[a-z0-9]%@%%%s" }), (function (prim0, prim1) { - return prim0 + prim1; - })) === "string1string2"; + return prim0 + prim1; + })) === "string1string2"; } else { return false; } @@ -5562,8 +5562,8 @@ function test60(param) { }, _1: "%0c%0c%c%n" }), (function (c1, c2, c3, n) { - return c1 === /* 'a' */97 && c2 === /* 'a' */97 && c3 === /* 'a' */97 ? n === 1 : false; - })) && Curry._1(Stdlib__Scanf.sscanf("abc", { + return c1 === /* 'a' */97 && c2 === /* 'a' */97 && c3 === /* 'a' */97 ? n === 1 : false; + })) && Curry._1(Stdlib__Scanf.sscanf("abc", { TAG: /* Format */0, _0: { TAG: /* String */2, @@ -5580,8 +5580,8 @@ function test60(param) { }, _1: "%0s%s" }), (function (s1, s2) { - return s1 === "" ? s2 === "abc" : false; - }))) { + return s1 === "" ? s2 === "abc" : false; + }))) { return Curry._1(Stdlib__Scanf.sscanf("abc", { TAG: /* Format */0, _0: { @@ -5599,12 +5599,12 @@ function test60(param) { }, _1: "%1s%s" }), (function (s1, s2) { - if (s1 === "a") { - return s2 === "bc"; - } else { - return false; - } - })); + if (s1 === "a") { + return s2 === "bc"; + } else { + return false; + } + })); } else { return false; } diff --git a/jscomp/test/dist/jscomp/test/tuple_alloc.js b/jscomp/test/dist/jscomp/test/tuple_alloc.js index 407a0e3b4..ed85c554b 100644 --- a/jscomp/test/dist/jscomp/test/tuple_alloc.js +++ b/jscomp/test/dist/jscomp/test/tuple_alloc.js @@ -41,8 +41,8 @@ function kf(cb, v) { function ikf(v) { return kf((function (prim) { - - }), v); + + }), v); } exports.v = v; diff --git a/jscomp/test/dist/jscomp/test/typeof_test.js b/jscomp/test/dist/jscomp/test/typeof_test.js index dfcba2846..d01df409a 100644 --- a/jscomp/test/dist/jscomp/test/typeof_test.js +++ b/jscomp/test/dist/jscomp/test/typeof_test.js @@ -34,140 +34,140 @@ function string_or_number(x) { const suites_0 = [ "int_type", (function (param) { - return { - TAG: /* Eq */0, - _0: "number", - _1: "number" - }; - }) + return { + TAG: /* Eq */0, + _0: "number", + _1: "number" + }; + }) ]; const suites_1 = { hd: [ "string_type", (function (param) { - return { - TAG: /* Eq */0, - _0: "string", - _1: "string" - }; - }) + return { + TAG: /* Eq */0, + _0: "string", + _1: "string" + }; + }) ], tl: { hd: [ "number_gadt_test", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test(3, /* Number */3), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test(3, /* Number */3), + _1: true + }; + }) ], tl: { hd: [ "boolean_gadt_test", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test(true, /* Boolean */2), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test(true, /* Boolean */2), + _1: true + }; + }) ], tl: { hd: [ "undefined_gadt_test", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test(undefined, /* Undefined */0), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test(undefined, /* Undefined */0), + _1: true + }; + }) ], tl: { hd: [ "string_on_number1", (function (param) { - return { - TAG: /* Eq */0, - _0: string_or_number("xx"), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: string_or_number("xx"), + _1: true + }; + }) ], tl: { hd: [ "string_on_number2", (function (param) { - return { - TAG: /* Eq */0, - _0: string_or_number(3.02), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: string_or_number(3.02), + _1: true + }; + }) ], tl: { hd: [ "string_on_number3", (function (param) { - return { - TAG: /* Eq */0, - _0: string_or_number(function (x) { - return x; - }), - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: string_or_number(function (x) { + return x; + }), + _1: false + }; + }) ], tl: { hd: [ "string_gadt_test", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test("3", /* String */4), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test("3", /* String */4), + _1: true + }; + }) ], tl: { hd: [ "string_gadt_test_neg", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test(3, /* String */4), - _1: false - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test(3, /* String */4), + _1: false + }; + }) ], tl: { hd: [ "function_gadt_test", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test((function (x) { - return x; - }), /* Function */5), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test((function (x) { + return x; + }), /* Function */5), + _1: true + }; + }) ], tl: { hd: [ "object_gadt_test", (function (param) { - return { - TAG: /* Eq */0, - _0: Js__Js_types.test({ - x: 3 - }, /* Object */6), - _1: true - }; - }) + return { + TAG: /* Eq */0, + _0: Js__Js_types.test({ + x: 3 + }, /* Object */6), + _1: true + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/uncurry_external_test.js b/jscomp/test/dist/jscomp/test/uncurry_external_test.js index 568d6a1af..73734c779 100644 --- a/jscomp/test/dist/jscomp/test/uncurry_external_test.js +++ b/jscomp/test/dist/jscomp/test/uncurry_external_test.js @@ -17,12 +17,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/uncurry_method.js b/jscomp/test/dist/jscomp/test/uncurry_method.js index 15a6ab7d3..5e57fb96e 100644 --- a/jscomp/test/dist/jscomp/test/uncurry_method.js +++ b/jscomp/test/dist/jscomp/test/uncurry_method.js @@ -4,14 +4,14 @@ const obj = { hi: (function (a, b) { - return a + b | 0; - }), + return a + b | 0; + }), say: (function (a, b) { - return a - b | 0; - }), + return a - b | 0; + }), xx: (function (a, b) { - return a - b | 0; - }) + return a - b | 0; + }) }; function f(x, a, b) { @@ -32,25 +32,25 @@ function f1(u) { const obj3 = { hi: (function (name, age) { - console.log(name); - }), + console.log(name); + }), hh: (function () { - let self = this; - self.hi("x", 20); - }) + let self = this; + self.hi("x", 20); + }) }; const obj2 = { hi: (function (a, b) { - return a + b | 0; - }), + return a + b | 0; + }), say: (function (a, b) { - let self = this; - return self.hi(a, b) - 1 | 0; - }), + let self = this; + return self.hi(a, b) - 1 | 0; + }), xx: (function (a, b) { - return a - b | 0; - }) + return a - b | 0; + }) }; exports.obj = obj; diff --git a/jscomp/test/dist/jscomp/test/undef_regression2_test.js b/jscomp/test/dist/jscomp/test/undef_regression2_test.js index c6dd32e05..92bd59fa1 100644 --- a/jscomp/test/dist/jscomp/test/undef_regression2_test.js +++ b/jscomp/test/dist/jscomp/test/undef_regression2_test.js @@ -18,12 +18,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; @@ -35,11 +35,11 @@ function ok(loc, x) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Ok */4, - _0: x - }; - }) + return { + TAG: /* Ok */4, + _0: x + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/unsafe_obj_external.js b/jscomp/test/dist/jscomp/test/unsafe_obj_external.js index 0e02c2e7c..3a281c5c2 100644 --- a/jscomp/test/dist/jscomp/test/unsafe_obj_external.js +++ b/jscomp/test/dist/jscomp/test/unsafe_obj_external.js @@ -4,12 +4,12 @@ const v = { x: (function () { - return 3; - }), + return 3; + }), say: (function (x) { - let self = this; - return self.x() + x | 0; - }) + let self = this; + return self.x() + x | 0; + }) }; const u = v.x() + v.say(3) | 0; diff --git a/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js b/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js index 102da47e0..9a38b6123 100644 --- a/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js +++ b/jscomp/test/dist/jscomp/test/unsafe_ppx_test.js @@ -29,8 +29,8 @@ function g(a) { Curry._2(regression2, 3, 2); regression3(3, 2); regression4(3, (function (x) { - return x; - })); + return x; + })); } const max2 = Math.max; @@ -57,45 +57,45 @@ Mt.from_pair_suites("Unsafe_ppx_test", { hd: [ "unsafe_max", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: max(1, 2) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: max(1, 2) + }; + }) ], tl: { hd: [ "unsafe_test", (function (param) { - return { - TAG: /* Eq */0, - _0: 3, - _1: v - }; - }) + return { + TAG: /* Eq */0, + _0: 3, + _1: v + }; + }) ], tl: { hd: [ "unsafe_max2", (function (param) { - return { - TAG: /* Eq */0, - _0: 2, - _1: Math.max(1, 2) - }; - }) + return { + TAG: /* Eq */0, + _0: 2, + _1: Math.max(1, 2) + }; + }) ], tl: { hd: [ "ffi_keys", (function (param) { - return { - TAG: /* Eq */0, - _0: ["a"], - _1: Ffi_js_test.keys({a : 3}) - }; - }) + return { + TAG: /* Eq */0, + _0: ["a"], + _1: Ffi_js_test.keys({a : 3}) + }; + }) ], tl: /* [] */0 } diff --git a/jscomp/test/dist/jscomp/test/unsafe_this.js b/jscomp/test/dist/jscomp/test/unsafe_this.js index e93f1b257..5234e1e4b 100644 --- a/jscomp/test/dist/jscomp/test/unsafe_this.js +++ b/jscomp/test/dist/jscomp/test/unsafe_this.js @@ -6,12 +6,12 @@ const u = { x: 3, y: 32, bark: (function ($$this, x, y) { - console.log([ - $$this.length, - $$this.x, - $$this.y - ]); - }), + console.log([ + $$this.length, + $$this.x, + $$this.y + ]); + }), length: 32 }; @@ -26,16 +26,16 @@ const js_obj = { x: 3, y: 32, bark: (function (x, y) { - let o = this; - console.log([ - o.length, - o.x, - o.y, - x, - y - ]); - return x + y | 0; - }), + let o = this; + console.log([ + o.length, + o.x, + o.y, + x, + y + ]); + return x + y | 0; + }), length: 32 }; diff --git a/jscomp/test/dist/jscomp/test/update_record_test.js b/jscomp/test/dist/jscomp/test/update_record_test.js index 9ae02b2a2..4a93a9010 100644 --- a/jscomp/test/dist/jscomp/test/update_record_test.js +++ b/jscomp/test/dist/jscomp/test/update_record_test.js @@ -22,12 +22,12 @@ function eq(loc, x, y) { hd: [ loc + (" id " + String(test_id.contents)), (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) + return { + TAG: /* Eq */0, + _0: x, + _1: y + }; + }) ], tl: suites.contents }; diff --git a/jscomp/test/dist/jscomp/test/watch_test.js b/jscomp/test/dist/jscomp/test/watch_test.js index 6c0c93765..b5e848e07 100644 --- a/jscomp/test/dist/jscomp/test/watch_test.js +++ b/jscomp/test/dist/jscomp/test/watch_test.js @@ -7,11 +7,11 @@ function test(path) { Fs.watch(path, { recursive: true }).on("change", (function ($$event, string_buffer) { - console.log([ - $$event, - string_buffer - ]); - })).close(); + console.log([ + $$event, + string_buffer + ]); + })).close(); } exports.test = test; diff --git a/jscomp/test/dist/jscomp/test/webpack_config.js b/jscomp/test/dist/jscomp/test/webpack_config.js index 68b243c64..f4019092d 100644 --- a/jscomp/test/dist/jscomp/test/webpack_config.js +++ b/jscomp/test/dist/jscomp/test/webpack_config.js @@ -40,17 +40,17 @@ const B = {}; function f(param) { return [ (function (prim) { - List$2.ff(); - }), + List$2.ff(); + }), (function (prim) { - List$2.ff2(); - }), + List$2.ff2(); + }), (function (prim) { - List$1.ff(); - }), + List$1.ff(); + }), (function (prim) { - List$1.ff2(); - }) + List$1.ff2(); + }) ]; } diff --git a/test/blackbox-tests/cross-module-optimizations.t b/test/blackbox-tests/cross-module-optimizations.t index 4d2e43ee2..4d8a774fd 100644 --- a/test/blackbox-tests/cross-module-optimizations.t +++ b/test/blackbox-tests/cross-module-optimizations.t @@ -57,10 +57,10 @@ Different modules function logPlusTwo(param) { return Melange__Util.compose((function (prim) { - console.log(prim); - }), (function (param) { - return 2 + param | 0; - }), param); + console.log(prim); + }), (function (param) { + return 2 + param | 0; + }), param); } exports.logPlusTwo = logPlusTwo; @@ -85,8 +85,8 @@ Different modules with cross-module-optimizations function logPlusTwo(param) { console.log(Curry._1((function (param) { - return 2 + param | 0; - }), param)); + return 2 + param | 0; + }), param)); } exports.logPlusTwo = logPlusTwo; @@ -121,10 +121,10 @@ Library dependency function logPlusTwo(param) { return Lib__Util.compose((function (prim) { - console.log(prim); - }), (function (param) { - return 2 + param | 0; - }), param); + console.log(prim); + }), (function (param) { + return 2 + param | 0; + }), param); } exports.logPlusTwo = logPlusTwo; @@ -160,10 +160,10 @@ Library dependency with cross-module optimizations function logPlusTwo(param) { return Lib__Util.compose((function (prim) { - console.log(prim); - }), (function (param) { - return 2 + param | 0; - }), param); + console.log(prim); + }), (function (param) { + return 2 + param | 0; + }), param); } exports.logPlusTwo = logPlusTwo; @@ -196,8 +196,8 @@ with `--mel-cross-module-opt` function logPlusTwo(param) { console.log(Curry._1((function (param) { - return 2 + param | 0; - }), param)); + return 2 + param | 0; + }), param)); } exports.logPlusTwo = logPlusTwo; diff --git a/test/blackbox-tests/node-modules.t b/test/blackbox-tests/node-modules.t index 8093387aa..125623b85 100644 --- a/test/blackbox-tests/node-modules.t +++ b/test/blackbox-tests/node-modules.t @@ -36,8 +36,8 @@ B depends on A, so it should import a.js in the right path const Stdlib__List = require("melange/list.js"); const t = Stdlib__List.map((function (greeting) { - return greeting; - }), { + return greeting; + }), { hd: "Hello", tl: /* [] */0 }); diff --git a/test/blackbox-tests/objects-close-over-variable.t b/test/blackbox-tests/objects-close-over-variable.t index 2664be27c..32569a13b 100644 --- a/test/blackbox-tests/objects-close-over-variable.t +++ b/test/blackbox-tests/objects-close-over-variable.t @@ -67,12 +67,12 @@ Test classes that close over an init variable from the outside scope CamlinternalOO.set_methods($$class, [ get_x, (function (self$1) { - return self$1[x]; - }), + return self$1[x]; + }), set_x, (function (self$1, y) { - self$1[x] = y; - }) + self$1[x] = y; + }) ]); const env_init = function (env) { const self = CamlinternalOO.create_object_opt(undefined, $$class); diff --git a/test/blackbox-tests/stdlib-array.t b/test/blackbox-tests/stdlib-array.t index 98a639ec6..9fb5e2dae 100644 --- a/test/blackbox-tests/stdlib-array.t +++ b/test/blackbox-tests/stdlib-array.t @@ -28,8 +28,8 @@ Test cases for stdlib Array const t = Caml_array.make_float(10); const t2 = Stdlib__Array.init(10, (function (prim) { - return prim; - })); + return prim; + })); const m = Stdlib__Array.make_matrix(2, 2, undefined); diff --git a/test/blackbox-tests/using-stdlib.t b/test/blackbox-tests/using-stdlib.t index cf9a3dfb9..4ac905fab 100644 --- a/test/blackbox-tests/using-stdlib.t +++ b/test/blackbox-tests/using-stdlib.t @@ -25,8 +25,8 @@ Check b.js output import * as Stdlib__List from "melange/list.js"; const t = Stdlib__List.map((function (greeting) { - return greeting; - }), { + return greeting; + }), { hd: "Hello", tl: /* [] */0 });