diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ffd4e972a..7fcdea36bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,8 @@ These are only breaking changes for unformatted code. - Exponentiation operator `**` is now right-associative. `2. ** 3. ** 2.` now compile to `Math.pow(2, Math.pow(3, 2))` and not anymore `Math.pow(Math.pow(2, 3), 2)`. Parentheses can be used to change precedence. - Remove unsafe ``` j`$(a)$(b)` ``` interpolation deprecated in compiler version 10 https://github.com/rescript-lang/rescript-compiler/pull/6068 - Remove deprecated module `Printexc` +- `@deriving(jsConverter)` not supported anymore for variant types https://github.com/rescript-lang/rescript-compiler/pull/6088 +- New representation for variants, where the tag is a string instead of a number. https://github.com/rescript-lang/rescript-compiler/pull/6088 #### :bug: Bug Fix diff --git a/jscomp/build_tests/white space/yy.ml b/jscomp/build_tests/white space/yy.ml index f857411027..4443aeccfd 100644 --- a/jscomp/build_tests/white space/yy.ml +++ b/jscomp/build_tests/white space/yy.ml @@ -1,6 +1,5 @@ type t = | Foo - [@@bs.deriving jsConverter] let u = Xx.sum 3 diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index 193787070f..c358a5910b 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -771,15 +771,8 @@ and expression_desc cxt ~(level : int) f x : cxt = | Undefined when is_optional f -> None | _ -> Some (f, x)) in - if p.num_nonconst = 1 then tails - else - ( Js_op.Lit L.tag, - if !Js_config.debug then tag else { tag with comment = Some p.name } - ) - :: tails + (Js_op.Lit L.tag, E.str p.name) :: tails in - if p.num_nonconst = 1 && not !Js_config.debug then - pp_comment_option f (Some p.name); expression_desc cxt ~level f (Object objs) | Caml_block (el, _, tag, Blk_constructor p) -> let not_is_cons = p.name <> Literals.cons in @@ -796,15 +789,13 @@ and expression_desc cxt ~(level : int) f x : cxt = [ (name_symbol, E.str p.name) ] else []) in - if p.num_nonconst = 1 then tails + if not_is_cons = false && p.num_nonconst = 1 then tails else ( Js_op.Lit L.tag, - if !Js_config.debug then tag else { tag with comment = Some p.name } + E.str p.name ) :: tails in - if p.num_nonconst = 1 && (not !Js_config.debug) && not_is_cons then - pp_comment_option f (Some p.name); expression_desc cxt ~level f (Object objs) | Caml_block ( _, diff --git a/jscomp/core/js_exp_make.ml b/jscomp/core/js_exp_make.ml index 974a23e883..89fb160063 100644 --- a/jscomp/core/js_exp_make.ml +++ b/jscomp/core/js_exp_make.ml @@ -763,7 +763,7 @@ let is_type_number ?comment (e : t) : t = string_equal ?comment (typeof e) (str "number") let is_tag (e : t) : t = - string_equal ~comment:"tag" (typeof e) (str "number") + { expression_desc = Bin (NotEqEq, typeof e, str "object"); comment=None } let is_type_string ?comment (e : t) : t = string_equal ?comment (typeof e) (str "string") @@ -776,12 +776,7 @@ let is_type_object (e : t) : t = string_equal (typeof e) (str "object") *) let tag ?comment e : t = - { - expression_desc = - Bin - (Bor, { expression_desc = Caml_block_tag e; comment }, zero_int_literal); - comment = None; - } + { expression_desc = Caml_block_tag e; comment } (* according to the compiler, [Btype.hash_variant], it's reduced to 31 bits for hash diff --git a/jscomp/core/js_of_lam_block.ml b/jscomp/core/js_of_lam_block.ml index b98e2acd46..b665462d80 100644 --- a/jscomp/core/js_of_lam_block.ml +++ b/jscomp/core/js_of_lam_block.ml @@ -30,15 +30,6 @@ module E = Js_exp_make let make_block mutable_flag (tag_info : Lam_tag_info.t) tag args = match tag_info with _ -> E.make_block tag tag_info args mutable_flag -(* | _, ( Tuple | Variant _ ) -> (\** TODO: check with inline record *\) *) -(* E.arr Immutable *) -(* (E.small_int ?comment:(Lam_compile_util.comment_of_tag_info tag_info) tag *) -(* :: args) *) -(* | _, _ -> *) -(* E.arr mutable_flag *) -(* (E.int ?comment:(Lam_compile_util.comment_of_tag_info tag_info) tag *) -(* :: args) *) - let field (field_info : Lam_compat.field_dbg_info) e (i : int32) = match field_info with | Fld_tuple | Fld_array -> diff --git a/jscomp/core/lam_compile.ml b/jscomp/core/lam_compile.ml index a82dc4eb39..06c3055d0d 100644 --- a/jscomp/core/lam_compile.ml +++ b/jscomp/core/lam_compile.ml @@ -568,8 +568,17 @@ and compile_general_cases : [ switch ?default ?declaration switch_exp body ]) and compile_cases cxt (switch_exp : E.t) table default get_name = + let string_table = table |> List.filter_map (fun (i, lam) -> match get_name i + with None -> None + | Some n -> Some (n, lam)) in + if List.length string_table = List.length table + then + compile_string_cases cxt switch_exp string_table default + else compile_general_cases get_name - (fun i -> { (E.small_int i) with comment = get_name i }) + (fun i -> match get_name i with + | None -> E.small_int i + | Some name -> E.str name) E.int_equal cxt (fun ?default ?declaration e clauses -> S.int_switch ?default ?declaration e clauses) diff --git a/jscomp/core/lam_compile_const.ml b/jscomp/core/lam_compile_const.ml index 24ca617639..75aec054e0 100644 --- a/jscomp/core/lam_compile_const.ml +++ b/jscomp/core/lam_compile_const.ml @@ -47,6 +47,8 @@ and translate (x : Lam_constant.t) : J.expression = | Const_js_false -> E.bool false | Const_js_null -> E.nil | Const_js_undefined -> E.undefined + | Const_int { i; comment = Pt_constructor {name}} when name <> "[]" -> + E.str name | Const_int { i; comment } -> E.int i ?comment:(Lam_constant.string_of_pointer_info comment) | Const_char i -> Js_of_lam_string.const_char i diff --git a/jscomp/core/lam_compile_util.ml b/jscomp/core/lam_compile_util.ml index a5c3e8b123..e86e3f56f8 100644 --- a/jscomp/core/lam_compile_util.ml +++ b/jscomp/core/lam_compile_util.ml @@ -30,18 +30,3 @@ let jsop_of_comp (cmp : Lam_compat.comparison) : Js_op.binop = | Cgt -> Gt | Cle -> Le | Cge -> Ge - -let comment_of_tag_info (x : Lam_tag_info.t) = - match x with - | Blk_constructor { name = n } -> Some n - | Blk_tuple -> Some "tuple" - | Blk_poly_var _ -> None - | Blk_record _ -> None - | Blk_record_inlined { name = ctor } -> Some ctor - | Blk_record_ext _ -> None - | Blk_module_export _ | Blk_module _ -> - (* Turn it on next time to save some noise diff*) - None - | Blk_extension (* TODO: enhance it later *) -> None - | Blk_some | Blk_some_not_nested | Blk_lazy_general -> assert false -(* let module_alias = Some "alias" *) diff --git a/jscomp/core/lam_compile_util.mli b/jscomp/core/lam_compile_util.mli index f645e521f9..2d1f091d3d 100644 --- a/jscomp/core/lam_compile_util.mli +++ b/jscomp/core/lam_compile_util.mli @@ -25,5 +25,3 @@ (** Some utilities for lambda compilation*) val jsop_of_comp : Lam_compat.comparison -> Js_op.binop - -val comment_of_tag_info : Lam_tag_info.t -> string option diff --git a/jscomp/ext/warnings.ml b/jscomp/ext/warnings.ml index ba237696e7..35f8e42ee8 100644 --- a/jscomp/ext/warnings.ml +++ b/jscomp/ext/warnings.ml @@ -480,7 +480,7 @@ let message = function | Bs_polymorphic_comparison -> "Polymorphic comparison introduced (maybe unsafe)" | Bs_ffi_warning s -> "FFI warning: " ^ s - | Bs_derive_warning s -> "bs.deriving warning: " ^ s + | Bs_derive_warning s -> "@deriving warning: " ^ s | Bs_fragile_external s -> s ^ " : using an empty string as a shorthand to infer the external's name \ diff --git a/jscomp/frontend/ast_derive_js_mapper.ml b/jscomp/frontend/ast_derive_js_mapper.ml index c2aacd3457..04afd9df18 100644 --- a/jscomp/frontend/ast_derive_js_mapper.ml +++ b/jscomp/frontend/ast_derive_js_mapper.ml @@ -127,49 +127,17 @@ let app1 = Ast_compatible.app1 let app2 = Ast_compatible.app2 -let app3 = Ast_compatible.app3 - -let ( <=~ ) a b = app2 (Exp.ident { loc = noloc; txt = Lident "<=" }) a b - -let ( -~ ) a b = - app2 (Exp.ident { loc = noloc; txt = Ldot (Lident "Pervasives", "-") }) a b - -let ( +~ ) a b = - app2 (Exp.ident { loc = noloc; txt = Ldot (Lident "Pervasives", "+") }) a b - -let ( &&~ ) a b = - app2 (Exp.ident { loc = noloc; txt = Ldot (Lident "Pervasives", "&&") }) a b - let ( ->~ ) a b = Ast_compatible.arrow a b let jsMapperRt = Longident.Ldot (Lident "Js", "MapperRt") -let fromInt len array exp = - app3 - (Exp.ident { loc = noloc; txt = Longident.Ldot (jsMapperRt, "fromInt") }) - len array exp - -let fromIntAssert len array exp = - app3 - (Exp.ident - { loc = noloc; txt = Longident.Ldot (jsMapperRt, "fromIntAssert") }) - len array exp - let raiseWhenNotFound x = app1 (Exp.ident { loc = noloc; txt = Longident.Ldot (jsMapperRt, "raiseWhenNotFound") }) x - -let assertExp e = Exp.assert_ e - let derivingName = "jsConverter" -(* let notApplicable loc = - Location.prerr_warning - loc - (Warnings.Bs_derive_warning ( derivingName ^ " not applicable to this type")) *) - let init () = Ast_derive.register derivingName (fun (x : Parsetree.expression option) -> let createType = handle_config x in @@ -182,7 +150,6 @@ let init () = let name = tdcl.ptype_name.txt in let toJs = name ^ "ToJs" in let fromJs = name ^ "FromJs" in - let constantArray = "jsMapperConstantArray" in let loc = tdcl.ptype_loc in let patToJs = { Asttypes.loc; txt = toJs } in let patFromJs = { Asttypes.loc; txt = fromJs } in @@ -302,95 +269,9 @@ let init () = | None -> U.notApplicable tdcl.Parsetree.ptype_loc derivingName; []) - | Ptype_variant ctors -> - if Ast_polyvar.is_enum_constructors ctors then - let xs = - Ast_polyvar.map_constructor_declarations_into_ints ctors - in - match xs with - | `New xs -> - let constantArrayExp = - Exp.ident { loc; txt = Lident constantArray } - in - let exp_len = - Ast_compatible.const_exp_int (List.length ctors) - in - let v = - [ - unsafeIndexGet; - eraseTypeStr; - Ast_comb.single_non_rec_value - { loc; txt = constantArray } - (Ast_compatible.const_exp_int_list_as_array xs); - toJsBody - (app2 unsafeIndexGetExp constantArrayExp exp_param); - Ast_comb.single_non_rec_value patFromJs - (Ast_compatible.fun_ (Pat.var pat_param) - (if createType then - fromIntAssert exp_len constantArrayExp - (exp_param +: newType) - +> core_type - else - fromInt exp_len constantArrayExp exp_param - +> Ast_core_type.lift_option_type core_type)); - ] - in - if createType then newTypeStr :: v else v - | `Offset offset -> - let v = - [ - eraseTypeStr; - toJsBody - (coerceResultToNewType - (eraseType exp_param - +~ Ast_compatible.const_exp_int offset)); - (let len = List.length ctors in - let range_low = - Ast_compatible.const_exp_int (offset + 0) - in - let range_upper = - Ast_compatible.const_exp_int (offset + len - 1) - in - - Ast_comb.single_non_rec_value { loc; txt = fromJs } - (Ast_compatible.fun_ (Pat.var pat_param) - (if createType then - Exp.let_ Nonrecursive - [ - Vb.mk (Pat.var pat_param) - (exp_param +: newType); - ] - (Exp.sequence - (assertExp - (exp_param <=~ range_upper - &&~ (range_low <=~ exp_param))) - (exp_param - -~ Ast_compatible.const_exp_int offset)) - +> core_type - else - Exp.ifthenelse - (exp_param <=~ range_upper - &&~ (range_low <=~ exp_param)) - (Exp.construct - { loc; txt = Ast_literal.predef_some } - (Some - (exp_param - -~ Ast_compatible.const_exp_int - offset))) - (Some - (Exp.construct - { - loc; - txt = Ast_literal.predef_none; - } - None)) - +> Ast_core_type.lift_option_type core_type))); - ] - in - if createType then newTypeStr :: v else v - else ( - U.notApplicable tdcl.Parsetree.ptype_loc derivingName; - []) + | Ptype_variant _ -> + U.notApplicable tdcl.Parsetree.ptype_loc derivingName; + [] | Ptype_open -> U.notApplicable tdcl.Parsetree.ptype_loc derivingName; [] @@ -452,23 +333,9 @@ let init () = | None -> U.notApplicable tdcl.Parsetree.ptype_loc derivingName; []) - | Ptype_variant ctors -> - if Ast_polyvar.is_enum_constructors ctors then - let ty1 = - if createType then newType else Ast_literal.type_int () - in - let ty2 = - if createType then core_type - else Ast_core_type.lift_option_type core_type - in - newTypeStr - +? [ - toJsType ty1; - Ast_comb.single_non_rec_val patFromJs (ty1 ->~ ty2); - ] - else ( - U.notApplicable tdcl.Parsetree.ptype_loc derivingName; - []) + | Ptype_variant _ -> + U.notApplicable tdcl.Parsetree.ptype_loc derivingName; + [] | Ptype_open -> U.notApplicable tdcl.Parsetree.ptype_loc derivingName; [] diff --git a/jscomp/frontend/ast_derive_util.ml b/jscomp/frontend/ast_derive_util.ml index 50042b3e07..b14223ae59 100644 --- a/jscomp/frontend/ast_derive_util.ml +++ b/jscomp/frontend/ast_derive_util.ml @@ -43,28 +43,6 @@ let new_type_of_type_declaration (tdcl : Parsetree.type_declaration) newName = ptype_private = Public; ptype_manifest = None; } ) - -(* let mk_fun ~loc (typ : Parsetree.core_type) - (value : string) body - : Parsetree.expression = - Ast_compatible.fun_ - (Pat.constraint_ (Pat.var {txt = value ; loc}) typ) - body - - let destruct_label_declarations ~loc - (arg_name : string) - (labels : Parsetree.label_declaration list) : - (Parsetree.core_type * Parsetree.expression) list * string list - = - Ext_list.fold_right labels ([], []) - (fun {pld_name = {txt}; pld_type} - (core_type_exps, labels) -> - ((pld_type, - Exp.field (Exp.ident {txt = Lident arg_name ; loc}) - {txt = Lident txt ; loc}) :: core_type_exps), - txt :: labels - ) *) - let notApplicable loc derivingName = Location.prerr_warning loc (Warnings.Bs_derive_warning (derivingName ^ " not applicable to this type")) diff --git a/jscomp/frontend/ast_polyvar.ml b/jscomp/frontend/ast_polyvar.ml index dcba2af2d7..3879c63315 100644 --- a/jscomp/frontend/ast_polyvar.ml +++ b/jscomp/frontend/ast_polyvar.ml @@ -115,16 +115,3 @@ let is_enum_polyvar (ty : Parsetree.type_declaration) = when is_enum row_fields -> Some row_fields | _ -> None - -let is_enum_constructors (constructors : Parsetree.constructor_declaration list) - = - List.for_all - (fun (x : Parsetree.constructor_declaration) -> - match x with - | { - pcd_args = - Pcstr_tuple [] (* Note the enum is encoded using [Pcstr_tuple []]*); - } -> - true - | _ -> false) - constructors diff --git a/jscomp/frontend/ast_polyvar.mli b/jscomp/frontend/ast_polyvar.mli index 7fb20b8ae5..6cf6595cad 100644 --- a/jscomp/frontend/ast_polyvar.mli +++ b/jscomp/frontend/ast_polyvar.mli @@ -38,5 +38,3 @@ val map_row_fields_into_strings : val is_enum_polyvar : Parsetree.type_declaration -> Parsetree.row_field list option - -val is_enum_constructors : Parsetree.constructor_declaration list -> bool diff --git a/jscomp/ml/matching.ml b/jscomp/ml/matching.ml index 6b140691f4..558c64e335 100644 --- a/jscomp/ml/matching.ml +++ b/jscomp/ml/matching.ml @@ -2359,11 +2359,7 @@ let combine_constructor sw_names loc arg ex_pat cstr partial ctx def else arg in Lifthenelse(arg, act2, act1) - | (2,0, [(i1,act1); (_,act2)],[]) when - (match act1, act2 with - | Lconst (Const_pointer (_, Pt_constructor _ )), _ -> false - | _, Lconst (Const_pointer (_, Pt_constructor _ )) -> false - | _ -> true) -> + | (2,0, [(i1,act1); (_,act2)],[]) when cstr.cstr_name = "true" || cstr.cstr_name = "false" -> if i1 = 0 then Lifthenelse(arg, act2, act1) else Lifthenelse (arg, act1, act2) | (n,0,_,[]) when false (* relies on tag being an int *) -> (* The type defines constant constructors only *) diff --git a/jscomp/test/406_primitive_test.js b/jscomp/test/406_primitive_test.js index 702fcfd2a2..c8a35308c1 100644 --- a/jscomp/test/406_primitive_test.js +++ b/jscomp/test/406_primitive_test.js @@ -18,11 +18,13 @@ function eq(loc, x, y) { eq("File \"406_primitive_test.ml\", line 18, characters 6-13", 32, 32); -var backend_type = /* Other */{ +var backend_type = { + TAG: "Other", _0: "BS" }; -eq("File \"406_primitive_test.ml\", line 29, characters 6-13", backend_type, /* Other */{ +eq("File \"406_primitive_test.ml\", line 29, characters 6-13", backend_type, { + TAG: "Other", _0: "BS" }); diff --git a/jscomp/test/a_filename_test.js b/jscomp/test/a_filename_test.js index a0a4e783dc..235be4b619 100644 --- a/jscomp/test/a_filename_test.js +++ b/jscomp/test/a_filename_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/a_list_test.js b/jscomp/test/a_list_test.js index cd993a4566..cba41212e1 100644 --- a/jscomp/test/a_list_test.js +++ b/jscomp/test/a_list_test.js @@ -7,7 +7,7 @@ var suites_0 = [ "drop", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Ext_list_test.drop(3, { hd: 0, tl: { @@ -28,7 +28,7 @@ var suites_1 = { "drop1", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Ext_list_test.drop(2, { hd: 0, tl: { @@ -51,7 +51,7 @@ var suites_1 = { "flat_map", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { hd: 0, tl: { diff --git a/jscomp/test/a_recursive_type.js b/jscomp/test/a_recursive_type.js index 8fb2a06229..ef05725e66 100644 --- a/jscomp/test/a_recursive_type.js +++ b/jscomp/test/a_recursive_type.js @@ -6,11 +6,13 @@ function g(x) { return Curry._1(x._0, x); } -var loop = g(/* A */{ +var loop = g({ + TAG: "A", _0: g }); -var x = /* A */{ +var x = { + TAG: "A", _0: g }; diff --git a/jscomp/test/a_string_test.js b/jscomp/test/a_string_test.js index eec8de6a1f..762c3f39f9 100644 --- a/jscomp/test/a_string_test.js +++ b/jscomp/test/a_string_test.js @@ -8,7 +8,7 @@ var suites_0 = [ "split", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Ext_string_test.split(true, "hihi", /* 'i' */105), _1: { hd: "h", @@ -29,7 +29,7 @@ var suites_1 = { "split_non_empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Ext_string_test.split(undefined, "hihi", /* 'i' */105), _1: { hd: "h", @@ -46,7 +46,7 @@ var suites_1 = { "split_empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Ext_string_test.split(true, "", /* 'i' */105), _1: /* [] */0 }; @@ -57,7 +57,7 @@ var suites_1 = { "split_normal", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Ext_string_test.split(true, "h i i", /* ' ' */32), _1: { hd: "h", @@ -77,7 +77,7 @@ var suites_1 = { "split_by", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: List.filter(function (s) { return s !== ""; })(Ext_string_test.split_by(undefined, (function (x) { diff --git a/jscomp/test/adt_optimize_test.js b/jscomp/test/adt_optimize_test.js index 2ee94ba712..3e2ef4f589 100644 --- a/jscomp/test/adt_optimize_test.js +++ b/jscomp/test/adt_optimize_test.js @@ -3,11 +3,11 @@ function f(x) { switch (x) { - case /* A */0 : + case "A" : return 1; - case /* B */1 : + case "B" : return 2; - case /* C */2 : + case "C" : return 3; } @@ -15,11 +15,11 @@ function f(x) { function f_0(x) { switch (x) { - case /* A */0 : + case "A" : return -1; - case /* B */1 : + case "B" : return 0; - case /* C */2 : + case "C" : return 1; } @@ -27,31 +27,31 @@ function f_0(x) { function f2(param) { if (param >= 3) { - return /* T003 */3; + return "T003"; } switch (param) { case 0 : - return /* T000 */0; + return "T000"; case 1 : - return /* T001 */1; + return "T001"; case 2 : - return /* T002 */2; + return "T002"; } } function f3(param) { switch (param) { - case /* X0 */0 : - return /* Y0 */0; - case /* X1 */1 : - return /* Y1 */1; - case /* X2 */2 : - return /* Y2 */2; - case /* X3 */3 : - return /* Y3 */3; - case /* X4 */4 : - return /* Y4 */4; + case "X0" : + return "Y0"; + case "X1" : + return "Y1"; + case "X2" : + return "Y2"; + case "X3" : + return "Y3"; + case "X4" : + return "Y4"; } } @@ -61,22 +61,22 @@ function f4(param) { } function f5(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { switch (param) { - case /* A */0 : + case "A" : return 1; - case /* B */1 : + case "B" : return 3; - case /* F */2 : + case "F" : return 4; } } else { - switch (param.TAG | 0) { - case /* C */0 : - case /* D */1 : + switch (param.TAG) { + case "C" : + case "D" : return 1; - case /* E */2 : + case "E" : return 2; } @@ -84,37 +84,37 @@ function f5(param) { } function f6(param) { - if (/* tag */typeof param !== "number") { + if (typeof param === "object") { return 1; } switch (param) { - case /* A */0 : - case /* B */1 : + case "A" : + case "B" : return 0; - case /* F */2 : + case "F" : return 2; } } function f7(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { switch (param) { - case /* A */0 : + case "A" : return 1; - case /* B */1 : + case "B" : return 2; - case /* F */2 : + case "F" : return -1; } } else { - switch (param.TAG | 0) { - case /* C */0 : + switch (param.TAG) { + case "C" : return 3; - case /* D */1 : + case "D" : return 4; - case /* E */2 : + case "E" : return -1; } @@ -122,18 +122,18 @@ function f7(param) { } function f8(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { switch (param) { - case /* T60 */0 : - case /* T61 */1 : + case "T60" : + case "T61" : return 1; default: return 3; } } else { - switch (param.TAG | 0) { - case /* T64 */0 : - case /* T65 */1 : + switch (param.TAG) { + case "T64" : + case "T65" : return 2; default: return 3; @@ -142,44 +142,44 @@ function f8(param) { } function f9(param) { - if (/* tag */typeof param === "number") { - if (param === /* T63 */3) { + if (typeof param !== "object") { + if (param === "T63") { return 3; } else { return 1; } } - switch (param.TAG | 0) { - case /* T64 */0 : - case /* T65 */1 : + switch (param.TAG) { + case "T64" : + case "T65" : return 2; - case /* T66 */2 : - case /* T68 */3 : + case "T66" : + case "T68" : return 3; } } function f10(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { switch (param) { - case /* T60 */0 : + case "T60" : return 0; - case /* T61 */1 : + case "T61" : return 2; - case /* T62 */2 : + case "T62" : return 4; - case /* T63 */3 : + case "T63" : return 1; } } else { - switch (param.TAG | 0) { - case /* T64 */0 : - case /* T65 */1 : + switch (param.TAG) { + case "T64" : + case "T65" : return 2; - case /* T66 */2 : - case /* T68 */3 : + case "T66" : + case "T68" : return 3; } @@ -187,10 +187,10 @@ function f10(param) { } function f11(x) { - if (/* tag */typeof x === "number") { + if (typeof x !== "object") { return 2; } - if (x.TAG === /* D */0) { + if (x.TAG === "D") { return 1; } throw { diff --git a/jscomp/test/and_or_tailcall_test.js b/jscomp/test/and_or_tailcall_test.js index b30cb51747..b4574ae9c7 100644 --- a/jscomp/test/and_or_tailcall_test.js +++ b/jscomp/test/and_or_tailcall_test.js @@ -34,7 +34,7 @@ var suites_0 = [ "and_tail", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: f(true, 1, 0) }; @@ -46,7 +46,7 @@ var suites_1 = { "or_tail", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: or_f(false, 1, 0) }; diff --git a/jscomp/test/argv_test.js b/jscomp/test/argv_test.js index 773948cb84..6088837d6c 100644 --- a/jscomp/test/argv_test.js +++ b/jscomp/test/argv_test.js @@ -19,7 +19,7 @@ var test = { var arg_spec_0 = [ "-c", { - TAG: /* Set */2, + TAG: "Set", _0: compile }, " Compile" @@ -29,7 +29,7 @@ var arg_spec_1 = { hd: [ "-d", { - TAG: /* Clear */3, + TAG: "Clear", _0: test }, " Test" diff --git a/jscomp/test/ari_regress_test.js b/jscomp/test/ari_regress_test.js index 8452b9aa52..a0f1bc27e2 100644 --- a/jscomp/test/ari_regress_test.js +++ b/jscomp/test/ari_regress_test.js @@ -31,7 +31,7 @@ var suites_0 = [ "curry", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: g, _1: 7 }; @@ -43,7 +43,7 @@ var suites_1 = { "curry2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 14, _1: (Curry._1(v, 1), Curry._1(v, 1)) }; @@ -54,7 +54,7 @@ var suites_1 = { "curry3", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: 14 }; @@ -65,7 +65,7 @@ var suites_1 = { "File \"ari_regress_test.ml\", line 20, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: h.contents, _1: 1 }; diff --git a/jscomp/test/arith_lexer.js b/jscomp/test/arith_lexer.js index 02cfdb7f6c..764eaad451 100644 --- a/jscomp/test/arith_lexer.js +++ b/jscomp/test/arith_lexer.js @@ -29,28 +29,28 @@ function __ocaml_lex_lexeme_rec(lexbuf, ___ocaml_lex_state) { continue ; case 1 : return { - TAG: /* NUMERAL */0, + TAG: "NUMERAL", _0: Caml_format.int_of_string(Lexing.lexeme(lexbuf)) }; case 2 : return { - TAG: /* IDENT */1, + TAG: "IDENT", _0: Lexing.lexeme(lexbuf) }; case 3 : - return /* PLUS */0; + return "PLUS"; case 4 : - return /* MINUS */1; + return "MINUS"; case 5 : - return /* TIMES */2; + return "TIMES"; case 6 : - return /* DIVIDE */3; + return "DIVIDE"; case 7 : - return /* LPAREN */5; + return "LPAREN"; case 8 : - return /* RPAREN */6; + return "RPAREN"; case 9 : - return /* EOF */7; + return "EOF"; default: Curry._1(lexbuf.refill_buff, lexbuf); ___ocaml_lex_state = __ocaml_lex_state$1; @@ -64,20 +64,20 @@ function lexeme(lexbuf) { } function str(e) { - switch (e.TAG | 0) { - case /* Numeral */0 : + switch (e.TAG) { + case "Numeral" : return Pervasives.string_of_float(e._0); - case /* Plus */1 : + case "Plus" : return str(e._0) + ("+" + str(e._1)); - case /* Minus */2 : + case "Minus" : return str(e._0) + ("-" + str(e._1)); - case /* Times */3 : + case "Times" : return str(e._0) + ("*" + str(e._1)); - case /* Divide */4 : + case "Divide" : return str(e._0) + ("/" + str(e._1)); - case /* Negate */5 : + case "Negate" : return "-" + str(e._0); - case /* Variable */6 : + case "Variable" : return e._0; } diff --git a/jscomp/test/arith_parser.js b/jscomp/test/arith_parser.js index 5dff84f841..428c2f10ed 100644 --- a/jscomp/test/arith_parser.js +++ b/jscomp/test/arith_parser.js @@ -56,14 +56,14 @@ var yyact = [ (function (__caml_parser_env) { var _1 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Numeral */0, + TAG: "Numeral", _0: _1 }; }), (function (__caml_parser_env) { var _1 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Variable */6, + TAG: "Variable", _0: _1 }; }), @@ -71,7 +71,7 @@ var yyact = [ var _1 = Parsing.peek_val(__caml_parser_env, 2); var _3 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Plus */1, + TAG: "Plus", _0: _1, _1: _3 }; @@ -80,7 +80,7 @@ var yyact = [ var _1 = Parsing.peek_val(__caml_parser_env, 2); var _3 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Minus */2, + TAG: "Minus", _0: _1, _1: _3 }; @@ -89,7 +89,7 @@ var yyact = [ var _1 = Parsing.peek_val(__caml_parser_env, 2); var _3 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Times */3, + TAG: "Times", _0: _1, _1: _3 }; @@ -98,7 +98,7 @@ var yyact = [ var _1 = Parsing.peek_val(__caml_parser_env, 2); var _3 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Divide */4, + TAG: "Divide", _0: _1, _1: _3 }; @@ -106,7 +106,7 @@ var yyact = [ (function (__caml_parser_env) { var _2 = Parsing.peek_val(__caml_parser_env, 0); return { - TAG: /* Negate */5, + TAG: "Negate", _0: _2 }; }), diff --git a/jscomp/test/arith_syntax.js b/jscomp/test/arith_syntax.js index a8b2034966..c042f05fd1 100644 --- a/jscomp/test/arith_syntax.js +++ b/jscomp/test/arith_syntax.js @@ -3,20 +3,20 @@ var Pervasives = require("../../lib/js/pervasives.js"); function str(e) { - switch (e.TAG | 0) { - case /* Numeral */0 : + switch (e.TAG) { + case "Numeral" : return Pervasives.string_of_float(e._0); - case /* Plus */1 : + case "Plus" : return str(e._0) + ("+" + str(e._1)); - case /* Minus */2 : + case "Minus" : return str(e._0) + ("-" + str(e._1)); - case /* Times */3 : + case "Times" : return str(e._0) + ("*" + str(e._1)); - case /* Divide */4 : + case "Divide" : return str(e._0) + ("/" + str(e._1)); - case /* Negate */5 : + case "Negate" : return "-" + str(e._0); - case /* Variable */6 : + case "Variable" : return e._0; } diff --git a/jscomp/test/arity_deopt.js b/jscomp/test/arity_deopt.js index e8ab98f4ce..22fc52fbe2 100644 --- a/jscomp/test/arity_deopt.js +++ b/jscomp/test/arity_deopt.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/array_subtle_test.js b/jscomp/test/array_subtle_test.js index 20ed8760e8..56201126d5 100644 --- a/jscomp/test/array_subtle_test.js +++ b/jscomp/test/array_subtle_test.js @@ -20,7 +20,7 @@ function eq(loc, param) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/array_test.js b/jscomp/test/array_test.js index 22caab6802..79a6d17f0e 100644 --- a/jscomp/test/array_test.js +++ b/jscomp/test/array_test.js @@ -58,7 +58,7 @@ var array_suites_0 = [ "init", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.init(5, (function (x) { return x; })), @@ -96,7 +96,7 @@ var array_suites_1 = { tl: /* [] */0 })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: match[0], _1: match[1] }; @@ -107,7 +107,7 @@ var array_suites_1 = { "concat", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 1, @@ -144,7 +144,7 @@ var array_suites_1 = { "make", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ Caml_array.make(100, /* 'a' */97), Caml_array.make_float(100) @@ -165,7 +165,7 @@ var array_suites_1 = { "sub", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.sub([ 0, 1, @@ -194,7 +194,7 @@ var array_suites_1 = { })); $$Array.blit(v, 1, u, 1, 2); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ 0, @@ -223,7 +223,7 @@ var array_suites_1 = { })); $$Array.blit(a0, 10, a0, 5, 20); return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: starts_with(a0, [ 0, @@ -265,7 +265,7 @@ var array_suites_1 = { })); $$Array.blit(a0, 5, a0, 10, 20); return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: starts_with(a0, [ 0, @@ -305,7 +305,7 @@ var array_suites_1 = { "make", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_array.make(2, 1), _1: [ 1, @@ -325,7 +325,7 @@ var array_suites_1 = { ]; $$Array.sort(Caml.int_compare, u); return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal([ 0, 1, @@ -344,7 +344,7 @@ var array_suites_1 = { })); $$Array.sort(Caml.int_compare, v); return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: is_sorted(v) }; diff --git a/jscomp/test/ast_abstract_test.js b/jscomp/test/ast_abstract_test.js index d7a699020d..e3410cbc31 100644 --- a/jscomp/test/ast_abstract_test.js +++ b/jscomp/test/ast_abstract_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -76,144 +76,12 @@ idx("b"); idx("c"); -var jsMapperConstantArray = [ - 0, - 3, - 4 -]; - -function aToJs(param) { - return jsMapperConstantArray[param]; -} - -function aFromJs(param) { - return Js_mapperRt.fromIntAssert(3, jsMapperConstantArray, param); -} - -function id(x) { - eq("File \"ast_abstract_test.ml\", line 49, characters 8-15", aFromJs(aToJs(x)), x); -} - -var a0 = aToJs(/* A */0); - -var a1 = aToJs(/* B */1); - -id(/* A */0); - -id(/* B */1); - -id(/* C */2); - -function bToJs(param) { - return param + 0 | 0; -} - -function bFromJs(param) { - if (!(param <= 3 && 0 <= param)) { - throw { - RE_EXN_ID: "Assert_failure", - _1: [ - "_none_", - 1, - -1 - ], - Error: new Error() - }; - } - return param - 0 | 0; -} - -function idb(v) { - eq("File \"ast_abstract_test.ml\", line 71, characters 5-12", bFromJs(v + 0 | 0), v); -} - -idb(/* D0 */0); - -idb(/* D1 */1); - -idb(/* D2 */2); - -idb(/* D3 */3); - -function cToJs(param) { - return param + 3 | 0; -} - -function cFromJs(param) { - if (!(param <= 6 && 3 <= param)) { - throw { - RE_EXN_ID: "Assert_failure", - _1: [ - "_none_", - 1, - -1 - ], - Error: new Error() - }; - } - return param - 3 | 0; -} - -function idc(v) { - eq("File \"ast_abstract_test.ml\", line 83, characters 15-22", cFromJs(v + 3 | 0), v); -} - -idc(/* D0 */0); - -idc(/* D1 */1); - -idc(/* D2 */2); - -idc(/* D3 */3); - -function hToJs(param) { - return param + 0 | 0; -} - -function hFromJs(param) { - if (!(param <= 1 && 0 <= param)) { - throw { - RE_EXN_ID: "Assert_failure", - _1: [ - "_none_", - 1, - -1 - ], - Error: new Error() - }; - } - return param - 0 | 0; -} - -function zToJs(param) { - return param + 0 | 0; -} - -function zFromJs(param) { - if (param <= 2 && 0 <= param) { - return param - 0 | 0; - } - -} - Mt.from_pair_suites("Ast_abstract_test", suites.contents); var x0 = "a"; var x1 = "b"; -var b0 = 0; - -var b1 = 1; - -var c0 = 3; - -var jsMapperEraseType = /* JsMapperEraseType */0; - -var b = /* B */1; - -var zXx = /* ZXx */2; - exports.suites = suites; exports.test_id = test_id; exports.eq = eq; @@ -226,25 +94,4 @@ exports.xFromJs = xFromJs; exports.idx = idx; exports.x0 = x0; exports.x1 = x1; -exports.aToJs = aToJs; -exports.aFromJs = aFromJs; -exports.id = id; -exports.a0 = a0; -exports.a1 = a1; -exports.bToJs = bToJs; -exports.bFromJs = bFromJs; -exports.b0 = b0; -exports.b1 = b1; -exports.idb = idb; -exports.cToJs = cToJs; -exports.cFromJs = cFromJs; -exports.c0 = c0; -exports.idc = idc; -exports.jsMapperEraseType = jsMapperEraseType; -exports.b = b; -exports.hToJs = hToJs; -exports.hFromJs = hFromJs; -exports.zXx = zXx; -exports.zToJs = zToJs; -exports.zFromJs = zFromJs; /* Not a pure module */ diff --git a/jscomp/test/ast_abstract_test.ml b/jscomp/test/ast_abstract_test.ml index 38623f9d37..37ca432609 100644 --- a/jscomp/test/ast_abstract_test.ml +++ b/jscomp/test/ast_abstract_test.ml @@ -39,7 +39,7 @@ let () = idx `c -type a = +(* type a = | A | B [@as 3] | C @@ -48,15 +48,15 @@ type a = let id x = eq __LOC__ (aFromJs (aToJs x )) x let a0 = aToJs A -let a1 = aToJs B +let a1 = aToJs B *) -let () = +(* let () = id A ; id B ; - id C + id C *) -type b = +(* type b = | D0 | D1 | D2 @@ -70,8 +70,9 @@ let b1 = bToJs D1 let idb v = eq __LOC__ (bFromJs (bToJs v )) v -let () = idb D0; idb D1; idb D2 ; idb D3 -type c = +let () = idb D0; idb D1; idb D2 ; idb D3 *) + +(* type c = | D0 [@bs.as 3] | D1 | D2 @@ -82,12 +83,13 @@ let c0 = cToJs D0 let idc v = eq __LOC__ (cFromJs (cToJs v)) v -let () = idc D0; idc D1 ; idc D2; idc D3 -type h = - | JsMapperEraseType - | B [@@bs.deriving {accessors; jsConverter = newType} ] +let () = idc D0; idc D1 ; idc D2; idc D3 *) +(* type h = + | JsMapperEraseType + | B [@@bs.deriving {accessors; jsConverter = newType} ] *) +(* type z = | ZFromJs | ZToJs @@ -96,6 +98,6 @@ type z = accessors; jsConverter } -] +] *) ;; Mt.from_pair_suites __MODULE__ !suites \ No newline at end of file diff --git a/jscomp/test/ast_js_mapper_poly_test.js b/jscomp/test/ast_js_mapper_poly_test.js deleted file mode 100644 index 8c8c28774b..0000000000 --- a/jscomp/test/ast_js_mapper_poly_test.js +++ /dev/null @@ -1,272 +0,0 @@ -'use strict'; - -var Mt = require("./mt.js"); -var $$Array = require("../../lib/js/array.js"); -var Js_mapperRt = require("../../lib/js/js_mapperRt.js"); - -var suites = { - contents: /* [] */0 -}; - -var test_id = { - contents: 0 -}; - -function eq(loc, x, y) { - test_id.contents = test_id.contents + 1 | 0; - suites.contents = { - hd: [ - loc + (" id " + String(test_id.contents)), - (function (param) { - return { - TAG: /* Eq */0, - _0: x, - _1: y - }; - }) - ], - tl: suites.contents - }; -} - -var _map = {"D":"D","C":"C","f":"x"}; - -var _revMap = {"D":"D","C":"C","x":"f"}; - -function uToJs(param) { - return _map[param]; -} - -function uFromJs(param) { - return _revMap[param]; -} - -function eqU(x, y) { - return x === y; -} - -function eqUOpt(x, y) { - if (x !== undefined) { - if (y !== undefined) { - return x === y; - } else { - return false; - } - } else { - return y === undefined; - } -} - -eq("File \"ast_js_mapper_poly_test.ml\", line 25, characters 5-12", eqUOpt(uFromJs("x"), "f"), true); - -eq("File \"ast_js_mapper_poly_test.ml\", line 26, characters 5-12", eqUOpt(uFromJs("D"), "D"), true); - -eq("File \"ast_js_mapper_poly_test.ml\", line 27, characters 5-12", eqUOpt(uFromJs("C"), "C"), true); - -eq("File \"ast_js_mapper_poly_test.ml\", line 28, characters 5-12", eqUOpt(uFromJs("f"), undefined), true); - -eq("File \"ast_js_mapper_poly_test.ml\", line 29, characters 5-12", $$Array.map(uToJs, [ - "D", - "C", - "f" - ]), [ - "D", - "C", - "x" - ]); - -var jsMapperConstantArray = [ - 0, - 3, - 4, - 5 -]; - -function vToJs(param) { - return jsMapperConstantArray[param]; -} - -function vFromJs(param) { - return Js_mapperRt.fromInt(4, jsMapperConstantArray, param); -} - -function eqV(x, y) { - return x === y; -} - -function eqVOpt(x, y) { - if (x !== undefined) { - if (y !== undefined) { - return x === y; - } else { - return false; - } - } else { - return y === undefined; - } -} - -function s(param) { - switch (param) { - case /* A0 */0 : - return "A0"; - case /* A1 */1 : - return "A1"; - case /* A2 */2 : - return "A2"; - case /* A3 */3 : - return "A3"; - - } -} - -eq("File \"ast_js_mapper_poly_test.ml\", line 54, characters 5-12", $$Array.map(vToJs, [ - /* A0 */0, - /* A1 */1, - /* A2 */2, - /* A3 */3 - ]), [ - 0, - 3, - 4, - 5 - ]); - -eq("File \"ast_js_mapper_poly_test.ml\", line 55, characters 5-12", $$Array.map(vFromJs, [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ]), [ - /* A0 */0, - undefined, - undefined, - /* A1 */1, - /* A2 */2, - /* A3 */3, - undefined - ]); - -function v1ToJs(param) { - return param + 0 | 0; -} - -function v1FromJs(param) { - if (param <= 5 && 0 <= param) { - return param - 0 | 0; - } - -} - -eq("File \"ast_js_mapper_poly_test.ml\", line 68, characters 5-12", $$Array.map(v1ToJs, [ - /* B0 */0, - /* B1 */1, - /* B2 */2, - /* B3 */3, - /* B4 */4, - /* B5 */5 - ]), [ - 0, - 1, - 2, - 3, - 4, - 5 - ]); - -eq("File \"ast_js_mapper_poly_test.ml\", line 69, characters 5-12", $$Array.map(v1FromJs, [ - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ]), [ - undefined, - /* B0 */0, - /* B1 */1, - /* B2 */2, - /* B3 */3, - /* B4 */4, - /* B5 */5, - undefined - ]); - -function v2ToJs(param) { - return param + 2 | 0; -} - -function v2FromJs(param) { - if (param <= 7 && 2 <= param) { - return param - 2 | 0; - } - -} - -eq("File \"ast_js_mapper_poly_test.ml\", line 86, characters 5-12", $$Array.map(v2ToJs, [ - /* C0 */0, - /* C1 */1, - /* C2 */2, - /* C3 */3, - /* C4 */4, - /* C5 */5 - ]), [ - 2, - 3, - 4, - 5, - 6, - 7 - ]); - -eq("File \"ast_js_mapper_poly_test.ml\", line 89, characters 5-12", $$Array.map(v2FromJs, [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8 - ]), $$Array.append($$Array.append([ - undefined, - undefined - ], $$Array.map((function (x) { - return x; - }), [ - /* C0 */0, - /* C1 */1, - /* C2 */2, - /* C3 */3, - /* C4 */4, - /* C5 */5 - ])), [undefined])); - -Mt.from_pair_suites("Ast_js_mapper_poly_test", suites.contents); - -var $plus$great = $$Array.append; - -exports.suites = suites; -exports.test_id = test_id; -exports.eq = eq; -exports.uToJs = uToJs; -exports.uFromJs = uFromJs; -exports.eqU = eqU; -exports.eqUOpt = eqUOpt; -exports.vToJs = vToJs; -exports.vFromJs = vFromJs; -exports.eqV = eqV; -exports.eqVOpt = eqVOpt; -exports.s = s; -exports.v1ToJs = v1ToJs; -exports.v1FromJs = v1FromJs; -exports.v2ToJs = v2ToJs; -exports.v2FromJs = v2FromJs; -exports.$plus$great = $plus$great; -/* Not a pure module */ diff --git a/jscomp/test/ast_js_mapper_poly_test.ml b/jscomp/test/ast_js_mapper_poly_test.ml deleted file mode 100644 index f93fe2c444..0000000000 --- a/jscomp/test/ast_js_mapper_poly_test.ml +++ /dev/null @@ -1,97 +0,0 @@ - -let suites : Mt.pair_suites ref = ref [] -let test_id = ref 0 -let eq loc x y = - incr test_id ; - suites := - (loc ^" id " ^ (string_of_int !test_id), (fun _ -> Mt.Eq(x,y))) :: !suites - - -type u = - [ `D - | `C - | `f [@bs.as "x"] - ] -[@@bs.deriving jsConverter] - -let eqU (x : u) (y : u) = x = y -let eqUOpt (x : u option) y = - match x,y with - | Some x, Some y -> x = y - | None, None -> true - | _, _ -> false - -let () = - eq __LOC__ (eqUOpt (uFromJs "x") (Some `f )) true; - eq __LOC__ (eqUOpt (uFromJs "D") (Some `D )) true; - eq __LOC__ (eqUOpt (uFromJs "C") (Some `C )) true; - eq __LOC__ (eqUOpt (uFromJs "f") (None )) true; - eq __LOC__ (Array.map uToJs [|`D; `C ; `f|]) [|"D"; "C"; "x"|] - - - -type v = - | A0 - | A1 [@bs.as 3] - | A2 - | A3 -[@@bs.deriving jsConverter] - -let eqV (x : v) (y : v) = x = y -let eqVOpt (x : v option) y= - match x,y with - | Some x, Some y -> x = y - | None, None -> true - | _, _ -> false - -let s = function - | A0 -> "A0" - | A1 -> "A1" - | A2 -> "A2" - | A3 -> "A3" - -let () = - eq __LOC__ (Array.map vToJs [|A0;A1;A2;A3|]) [|0;3;4;5|]; - eq __LOC__ (Array.map vFromJs [|0;1;2;3;4;5;6|]) - [|Some A0; None; None; Some A1; Some A2; Some A3; None|] - - -type v1 = - | B0 - | B1 - | B2 - | B3 - | B4 - | B5 -[@@bs.deriving jsConverter] -let () = - eq __LOC__ (Array.map v1ToJs [|B0;B1;B2;B3;B4;B5|]) [|0;1;2;3;4;5|]; - eq __LOC__ (Array.map v1FromJs [|-1;0;1;2;3;4;5;6|]) - [|None;Some B0; Some B1; Some B2; Some B3; Some B4; Some B5; None|] - -(** TODO: add newType support *) -type v2 = - | C0 [@bs.as 2 ] - | C1 - | C2 - | C3 - | C4 - | C5 -[@@bs.deriving jsConverter ] - - -;; -let (+>) = Array.append -let () = - eq __LOC__ - (Array.map v2ToJs [|C0; C1; C2 ; C3 ; C4; C5 |]) - [|2;3;4;5;6;7|]; - eq __LOC__ - (Array.map v2FromJs [|0;1;2;3;4;5;6;7;8|]) - ( - [|None;None|]+> - (Array.map (fun x -> Some x) [|C0; C1; C2 ; C3 ; C4; C5 |]) +> - [|None|] - ) - -;; Mt.from_pair_suites __MODULE__ !suites \ No newline at end of file diff --git a/jscomp/test/ast_js_mapper_test.js b/jscomp/test/ast_js_mapper_test.js deleted file mode 100644 index 78cc0e7045..0000000000 --- a/jscomp/test/ast_js_mapper_test.js +++ /dev/null @@ -1,87 +0,0 @@ -'use strict'; - -var Js_mapperRt = require("../../lib/js/js_mapperRt.js"); - -function tToJs(param) { - return { - xx: param.xx, - yy: param.yy, - zz: param.zz - }; -} - -function tFromJs(param) { - return { - xx: param.xx, - yy: param.yy, - zz: param.zz - }; -} - -var u = tToJs({ - xx: 3, - yy: "x", - zz: [ - 1, - 2 - ] - }); - -tFromJs(u); - -tFromJs({ - xx: 3, - yy: "2", - zz: [ - 1, - 2 - ], - cc: 3 - }); - -function searchForSureExists(xs, k) { - var _i = 0; - while(true) { - var i = _i; - var match = xs[i]; - if (match[0] === k) { - return match[1]; - } - _i = i + 1 | 0; - continue ; - }; -} - -var jsMapperConstantArray = [ - 0, - 3, - 4, - 5 -]; - -function aToJs(param) { - return jsMapperConstantArray[param]; -} - -function aFromJs(param) { - return Js_mapperRt.fromIntAssert(4, jsMapperConstantArray, param); -} - -var _map = {"b0":"b0","b1":"b1","b2":"b2","b3":"b3"}; - -function bToJs(param) { - return param; -} - -function bFromJs(param) { - return Js_mapperRt.raiseWhenNotFound(_map[param]); -} - -exports.tToJs = tToJs; -exports.tFromJs = tFromJs; -exports.searchForSureExists = searchForSureExists; -exports.aToJs = aToJs; -exports.aFromJs = aFromJs; -exports.bToJs = bToJs; -exports.bFromJs = bFromJs; -/* u Not a pure module */ diff --git a/jscomp/test/ast_js_mapper_test.ml b/jscomp/test/ast_js_mapper_test.ml deleted file mode 100644 index 3fb7bc5f2e..0000000000 --- a/jscomp/test/ast_js_mapper_test.ml +++ /dev/null @@ -1,54 +0,0 @@ - - - -type 'a t = { - xx : int ; - yy : string ; - zz : 'a * int -} -[@@bs.deriving - - jsConverter - -] - -let a = {xx = 3; yy = "x"; zz = 1,2} -let u = tToJs a -let v = tFromJs u - -(** should also work*) -let vx = tFromJs [%obj{ xx = 3; yy = "2"; zz = 1,2; cc = 3}] - - - -(* type u = - [ `D - | `C - | `f [@bs.as "x"] - ] - [@@bs.deriving jsConverter] *) - -let rec searchAux i (xs : (int * _) array) (k : int) = - let (a,b) = Array.unsafe_get xs i in - if a = k then b - else searchAux (succ i) xs k - -let searchForSureExists xs k = - searchAux 0 xs k - - -type a = - | A0 - | A1 [@bs.as 3] - | A2 - | A3 -and b = - [ `b0 - | `b1 - | `b2 - | `b3 - ] -[@@bs.deriving {jsConverter = newType}] - -let v = bToJs `b0 - diff --git a/jscomp/test/ast_js_mapper_test.mli b/jscomp/test/ast_js_mapper_test.mli deleted file mode 100644 index c3876583b9..0000000000 --- a/jscomp/test/ast_js_mapper_test.mli +++ /dev/null @@ -1,23 +0,0 @@ - - -type 'a t = { - xx : int ; - yy : string ; - zz : 'a * int -} [@@bs.deriving {jsConverter }] - -val searchForSureExists : (int * 'a) array -> int -> 'a - - -type a = - | A0 - | A1 - | A2 - | A3 -and b = - [ `b0 - | `b1 - | `b2 - | `b3 - ] -[@@bs.deriving { jsConverter = newType }] diff --git a/jscomp/test/ast_mapper_defensive_test.js b/jscomp/test/ast_mapper_defensive_test.js deleted file mode 100644 index 27d7dabba9..0000000000 --- a/jscomp/test/ast_mapper_defensive_test.js +++ /dev/null @@ -1,96 +0,0 @@ -'use strict'; - -var Mt = require("./mt.js"); -var Js_mapperRt = require("../../lib/js/js_mapperRt.js"); - -var suites = { - contents: /* [] */0 -}; - -var test_id = { - contents: 0 -}; - -function $$throw(loc, x) { - test_id.contents = test_id.contents + 1 | 0; - suites.contents = { - hd: [ - loc + (" id " + String(test_id.contents)), - (function (param) { - return { - TAG: /* ThrowAny */7, - _0: x - }; - }) - ], - tl: suites.contents - }; -} - -function aToJs(param) { - return param + 0 | 0; -} - -function aFromJs(param) { - if (!(param <= 2 && 0 <= param)) { - throw { - RE_EXN_ID: "Assert_failure", - _1: [ - "_none_", - 1, - -1 - ], - Error: new Error() - }; - } - return param - 0 | 0; -} - -var jsMapperConstantArray = [ - 0, - 3, - 4 -]; - -function bToJs(param) { - return jsMapperConstantArray[param]; -} - -function bFromJs(param) { - return Js_mapperRt.fromIntAssert(3, jsMapperConstantArray, param); -} - -var _map = {"c0":"c0","c1":"c1","c2":"c2"}; - -function cToJs(param) { - return param; -} - -function cFromJs(param) { - return Js_mapperRt.raiseWhenNotFound(_map[param]); -} - -$$throw("File \"ast_mapper_defensive_test.ml\", line 28, characters 16-23", (function (param) { - aFromJs(3); - })); - -$$throw("File \"ast_mapper_defensive_test.ml\", line 29, characters 15-22", (function (param) { - bFromJs(2); - })); - -$$throw("File \"ast_mapper_defensive_test.ml\", line 30, characters 15-22", (function (param) { - cFromJs(33); - })); - -Mt.from_pair_suites("Ast_mapper_defensive_test", suites.contents); - -exports.suites = suites; -exports.test_id = test_id; -exports.$$throw = $$throw; -exports.aToJs = aToJs; -exports.aFromJs = aFromJs; -exports.bToJs = bToJs; -exports.bFromJs = bFromJs; -exports.cToJs = cToJs; -exports.cFromJs = cFromJs; -/* Not a pure module */ diff --git a/jscomp/test/ast_mapper_defensive_test.ml b/jscomp/test/ast_mapper_defensive_test.ml deleted file mode 100644 index 4a6cf250ed..0000000000 --- a/jscomp/test/ast_mapper_defensive_test.ml +++ /dev/null @@ -1,33 +0,0 @@ -let suites : Mt.pair_suites ref = ref [] -let test_id = ref 0 -let throw loc x = - incr test_id ; - suites := - (loc ^" id " ^ (string_of_int !test_id), - (fun _ -> Mt.ThrowAny(x))) :: !suites - - - -type a = - | A0 - | A1 - | A2 -and b = - | B0 - | B1 [@bs.as 3] - | B2 -and c = [ - | `c0 - | `c1 - | `c2 - ] -[@@bs.deriving { jsConverter = newType }] - - -(* ;; aFromJs (Obj.magic 3) *) -let () = throw __LOC__ (fun _ -> ignore @@ aFromJs (Obj.magic 3)) -let () = throw __LOC__ (fun _ -> ignore @@ bFromJs (Obj.magic 2)) -let () = throw __LOC__ (fun _ -> ignore @@ cFromJs (Obj.magic 33)) -(* ;; Js.log2 *) - -;; Mt.from_pair_suites __MODULE__ !suites \ No newline at end of file diff --git a/jscomp/test/bal_set_mini.js b/jscomp/test/bal_set_mini.js index b64f0025b7..c54c314a8f 100644 --- a/jscomp/test/bal_set_mini.js +++ b/jscomp/test/bal_set_mini.js @@ -2,7 +2,7 @@ function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param._3; @@ -12,7 +12,8 @@ function height(param) { function create(l, v, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: v, _2: r, @@ -24,38 +25,39 @@ function bal(l, v, r) { var hl = height(l); var hr = height(r); if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { - return /* Empty */0; + if (typeof l !== "object") { + return "Empty"; } var lr = l._2; var lv = l._1; var ll = l._0; if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); - } else if (/* tag */typeof lr === "number") { - return /* Empty */0; + } else if (typeof lr !== "object") { + return "Empty"; } else { return create(create(ll, lv, lr._0), lr._1, create(lr._2, v, r)); } } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: v, _2: r, _3: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { - return /* Empty */0; + if (typeof r !== "object") { + return "Empty"; } var rr = r._2; var rv = r._1; var rl = r._0; if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); - } else if (/* tag */typeof rl === "number") { - return /* Empty */0; + } else if (typeof rl !== "object") { + return "Empty"; } else { return create(create(l, v, rl._0), rl._1, create(rl._2, rv, rr)); } @@ -72,11 +74,12 @@ function compare_int(x, y) { } function add(x, t) { - if (/* tag */typeof t === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof t !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, - _2: /* Empty */0, + _2: "Empty", _3: 1 }; } @@ -97,11 +100,11 @@ function min_elt(_def, _param) { while(true) { var param = _param; var def = _def; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return def; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return param._1; } _param = l; @@ -111,7 +114,7 @@ function min_elt(_def, _param) { } function remove_min_elt(l, v, r) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return r; } else { return bal(remove_min_elt(l._0, l._1, l._2), v, r); @@ -119,10 +122,10 @@ function remove_min_elt(l, v, r) { } function internal_merge(l, r) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return r; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return l; } var rv = r._1; @@ -130,8 +133,8 @@ function internal_merge(l, r) { } function remove(x, tree) { - if (/* tag */typeof tree === "number") { - return /* Empty */0; + if (typeof tree !== "object") { + return "Empty"; } var r = tree._2; var v = tree._1; @@ -149,7 +152,7 @@ function remove(x, tree) { function mem(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = compare_int(x, param._1); @@ -161,7 +164,7 @@ function mem(x, _param) { }; } -var v = /* Empty */0; +var v = "Empty"; for(var i = 0; i <= 100000; ++i){ v = add(i, v); @@ -180,7 +183,7 @@ for(var i$2 = 0; i$2 <= 100000; ++i$2){ var match = v; -if (/* tag */typeof match !== "number") { +if (typeof match === "object") { console.log("impossible"); } diff --git a/jscomp/test/bdd.js b/jscomp/test/bdd.js index 3c5a714d60..c82e6baef6 100644 --- a/jscomp/test/bdd.js +++ b/jscomp/test/bdd.js @@ -5,8 +5,8 @@ var Caml_array = require("../../lib/js/caml_array.js"); function $$eval(_bdd, vars) { while(true) { var bdd = _bdd; - if (/* tag */typeof bdd === "number") { - if (bdd === /* One */0) { + if (typeof bdd !== "object") { + if (bdd === "One") { return true; } else { return false; @@ -22,8 +22,8 @@ function $$eval(_bdd, vars) { } function getId(bdd) { - if (/* tag */typeof bdd === "number") { - if (bdd === /* One */0) { + if (typeof bdd !== "object") { + if (bdd === "One") { return 1; } else { return 0; @@ -64,8 +64,8 @@ function resize(newSize) { return ; } var n = bucket.hd; - if (/* tag */typeof n === "number") { - if (n === /* One */0) { + if (typeof n !== "object") { + if (n === "One") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -140,8 +140,8 @@ function mkNode(low, v, high) { var b = _b; if (b) { var n = b.hd; - if (/* tag */typeof n === "number") { - if (n === /* One */0) { + if (typeof n !== "object") { + if (n === "One") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -170,7 +170,8 @@ function mkNode(low, v, high) { } } else { var n_2 = (nodeC.contents = nodeC.contents + 1 | 0, nodeC.contents); - var n$1 = /* Node */{ + var n$1 = { + TAG: "Node", _0: low, _1: v, _2: n_2, @@ -184,44 +185,44 @@ function mkNode(low, v, high) { function cmpVar(x, y) { if (x < y) { - return /* LESS */0; + return "LESS"; } else if (x > y) { - return /* GREATER */2; + return "GREATER"; } else { - return /* EQUAL */1; + return "EQUAL"; } } function mkVar(x) { - return mkNode(/* Zero */1, x, /* One */0); + return mkNode("Zero", x, "One"); } var andslot1 = Caml_array.make(1999, 0); var andslot2 = Caml_array.make(1999, 0); -var andslot3 = Caml_array.make(1999, /* Zero */1); +var andslot3 = Caml_array.make(1999, "Zero"); var xorslot1 = Caml_array.make(1999, 0); var xorslot2 = Caml_array.make(1999, 0); -var xorslot3 = Caml_array.make(1999, /* Zero */1); +var xorslot3 = Caml_array.make(1999, "Zero"); var notslot1 = Caml_array.make(1999, 0); -var notslot2 = Caml_array.make(1999, /* One */0); +var notslot2 = Caml_array.make(1999, "One"); function hash(x, y) { return ((x << 1) + y | 0) % 1999; } function not(n) { - if (/* tag */typeof n === "number") { - if (n === /* One */0) { - return /* Zero */1; + if (typeof n !== "object") { + if (n === "One") { + return "Zero"; } else { - return /* One */0; + return "One"; } } var id = n._2; @@ -236,22 +237,22 @@ function not(n) { } function and2(n1, n2) { - if (/* tag */typeof n1 === "number") { - if (n1 === /* One */0) { + if (typeof n1 !== "object") { + if (n1 === "One") { return n2; } else { - return /* Zero */1; + return "Zero"; } } var r1 = n1._3; var i1 = n1._2; var v1 = n1._1; var l1 = n1._0; - if (/* tag */typeof n2 === "number") { - if (n2 === /* One */0) { + if (typeof n2 !== "object") { + if (n2 === "One") { return n1; } else { - return /* Zero */1; + return "Zero"; } } var r2 = n2._3; @@ -265,13 +266,13 @@ function and2(n1, n2) { var match = cmpVar(v1, v2); var f; switch (match) { - case /* LESS */0 : + case "LESS" : f = mkNode(and2(l1, n2), v1, and2(r1, n2)); break; - case /* EQUAL */1 : + case "EQUAL" : f = mkNode(and2(l1, l2), v1, and2(r1, r2)); break; - case /* GREATER */2 : + case "GREATER" : f = mkNode(and2(n1, l2), v2, and2(n1, r2)); break; @@ -283,8 +284,8 @@ function and2(n1, n2) { } function xor(n1, n2) { - if (/* tag */typeof n1 === "number") { - if (n1 === /* One */0) { + if (typeof n1 !== "object") { + if (n1 === "One") { return not(n2); } else { return n2; @@ -294,8 +295,8 @@ function xor(n1, n2) { var i1 = n1._2; var v1 = n1._1; var l1 = n1._0; - if (/* tag */typeof n2 === "number") { - if (n2 === /* One */0) { + if (typeof n2 !== "object") { + if (n2 === "One") { return not(n1); } else { return n1; @@ -312,13 +313,13 @@ function xor(n1, n2) { var match = cmpVar(v1, v2); var f; switch (match) { - case /* LESS */0 : + case "LESS" : f = mkNode(xor(l1, n2), v1, xor(r1, n2)); break; - case /* EQUAL */1 : + case "EQUAL" : f = mkNode(xor(l1, l2), v1, xor(r1, r2)); break; - case /* GREATER */2 : + case "GREATER" : f = mkNode(xor(n1, l2), v2, xor(n1, r2)); break; @@ -332,16 +333,16 @@ function xor(n1, n2) { function hwb(n) { var h = function (i, j) { if (i === j) { - return mkNode(/* Zero */1, i, /* One */0); + return mkNode("Zero", i, "One"); } else { - return xor(and2(not(mkNode(/* Zero */1, j, /* One */0)), h(i, j - 1 | 0)), and2(mkNode(/* Zero */1, j, /* One */0), g(i, j - 1 | 0))); + return xor(and2(not(mkNode("Zero", j, "One")), h(i, j - 1 | 0)), and2(mkNode("Zero", j, "One"), g(i, j - 1 | 0))); } }; var g = function (i, j) { if (i === j) { - return mkNode(/* Zero */1, i, /* One */0); + return mkNode("Zero", i, "One"); } else { - return xor(and2(not(mkNode(/* Zero */1, i, /* One */0)), h(i + 1 | 0, j)), and2(mkNode(/* Zero */1, i, /* One */0), g(i + 1 | 0, j))); + return xor(and2(not(mkNode("Zero", i, "One")), h(i + 1 | 0, j)), and2(mkNode("Zero", i, "One"), g(i + 1 | 0, j))); } }; return h(0, n - 1 | 0); @@ -413,9 +414,9 @@ main(undefined); var initSize_1 = 8191; -var zero = /* Zero */1; +var zero = "Zero"; -var one = /* One */0; +var one = "One"; var cacheSize = 1999; diff --git a/jscomp/test/belt_result_alias_test.js b/jscomp/test/belt_result_alias_test.js index e9781f61bd..3d36f54299 100644 --- a/jscomp/test/belt_result_alias_test.js +++ b/jscomp/test/belt_result_alias_test.js @@ -3,14 +3,14 @@ var Belt_Result = require("../../lib/js/belt_Result.js"); Belt_Result.map({ - TAG: /* Ok */0, + TAG: "Ok", _0: "Test" }, (function (r) { return "Value: " + r; })); Belt_Result.getWithDefault(Belt_Result.map({ - TAG: /* Error */1, + TAG: "Error", _0: "error" }, (function (r) { return "Value: " + r; diff --git a/jscomp/test/big_enum.js b/jscomp/test/big_enum.js index 1022a33d21..f20a449658 100644 --- a/jscomp/test/big_enum.js +++ b/jscomp/test/big_enum.js @@ -3,605 +3,605 @@ function to_enum(param) { switch (param) { - case /* A0 */0 : + case "A0" : return 0; - case /* A1 */1 : + case "A1" : return 1; - case /* A2 */2 : + case "A2" : return 2; - case /* A3 */3 : + case "A3" : return 3; - case /* A4 */4 : + case "A4" : return 4; - case /* A5 */5 : + case "A5" : return 5; - case /* A6 */6 : + case "A6" : return 6; - case /* A7 */7 : + case "A7" : return 7; - case /* A8 */8 : + case "A8" : return 8; - case /* A9 */9 : + case "A9" : return 9; - case /* A10 */10 : + case "A10" : return 10; - case /* A11 */11 : + case "A11" : return 11; - case /* A12 */12 : + case "A12" : return 12; - case /* A13 */13 : + case "A13" : return 13; - case /* A14 */14 : + case "A14" : return 14; - case /* A15 */15 : + case "A15" : return 15; - case /* A16 */16 : + case "A16" : return 16; - case /* A17 */17 : + case "A17" : return 17; - case /* A18 */18 : + case "A18" : return 18; - case /* A19 */19 : + case "A19" : return 19; - case /* A20 */20 : + case "A20" : return 20; - case /* A21 */21 : + case "A21" : return 21; - case /* A22 */22 : + case "A22" : return 22; - case /* A23 */23 : + case "A23" : return 23; - case /* A24 */24 : + case "A24" : return 24; - case /* A25 */25 : + case "A25" : return 25; - case /* A26 */26 : + case "A26" : return 26; - case /* A27 */27 : + case "A27" : return 27; - case /* A28 */28 : + case "A28" : return 28; - case /* A29 */29 : + case "A29" : return 29; - case /* A30 */30 : + case "A30" : return 30; - case /* A31 */31 : + case "A31" : return 31; - case /* A32 */32 : + case "A32" : return 32; - case /* A33 */33 : + case "A33" : return 33; - case /* A34 */34 : + case "A34" : return 34; - case /* A35 */35 : + case "A35" : return 35; - case /* A36 */36 : + case "A36" : return 36; - case /* A37 */37 : + case "A37" : return 37; - case /* A38 */38 : + case "A38" : return 38; - case /* A39 */39 : + case "A39" : return 39; - case /* A40 */40 : + case "A40" : return 40; - case /* A41 */41 : + case "A41" : return 41; - case /* A42 */42 : + case "A42" : return 42; - case /* A43 */43 : + case "A43" : return 43; - case /* A44 */44 : + case "A44" : return 44; - case /* A45 */45 : + case "A45" : return 45; - case /* A46 */46 : + case "A46" : return 46; - case /* A47 */47 : + case "A47" : return 47; - case /* A48 */48 : + case "A48" : return 48; - case /* A49 */49 : + case "A49" : return 49; - case /* A50 */50 : + case "A50" : return 50; - case /* A51 */51 : + case "A51" : return 51; - case /* A52 */52 : + case "A52" : return 52; - case /* A53 */53 : + case "A53" : return 53; - case /* A54 */54 : + case "A54" : return 54; - case /* A55 */55 : + case "A55" : return 55; - case /* A56 */56 : + case "A56" : return 56; - case /* A57 */57 : + case "A57" : return 57; - case /* A58 */58 : + case "A58" : return 58; - case /* A59 */59 : + case "A59" : return 59; - case /* A60 */60 : + case "A60" : return 60; - case /* A61 */61 : + case "A61" : return 61; - case /* A62 */62 : + case "A62" : return 62; - case /* A63 */63 : + case "A63" : return 63; - case /* A64 */64 : + case "A64" : return 64; - case /* A65 */65 : + case "A65" : return 65; - case /* A66 */66 : + case "A66" : return 66; - case /* A67 */67 : + case "A67" : return 67; - case /* A68 */68 : + case "A68" : return 68; - case /* A69 */69 : + case "A69" : return 69; - case /* A70 */70 : + case "A70" : return 70; - case /* A71 */71 : + case "A71" : return 71; - case /* A72 */72 : + case "A72" : return 72; - case /* A73 */73 : + case "A73" : return 73; - case /* A74 */74 : + case "A74" : return 74; - case /* A75 */75 : + case "A75" : return 75; - case /* A76 */76 : + case "A76" : return 76; - case /* A77 */77 : + case "A77" : return 77; - case /* A78 */78 : + case "A78" : return 78; - case /* A79 */79 : + case "A79" : return 79; - case /* A80 */80 : + case "A80" : return 80; - case /* A81 */81 : + case "A81" : return 81; - case /* A82 */82 : + case "A82" : return 82; - case /* A83 */83 : + case "A83" : return 83; - case /* A84 */84 : + case "A84" : return 84; - case /* A85 */85 : + case "A85" : return 85; - case /* A86 */86 : + case "A86" : return 86; - case /* A87 */87 : + case "A87" : return 87; - case /* A88 */88 : + case "A88" : return 88; - case /* A89 */89 : + case "A89" : return 89; - case /* A90 */90 : + case "A90" : return 90; - case /* A91 */91 : + case "A91" : return 91; - case /* A92 */92 : + case "A92" : return 92; - case /* A93 */93 : + case "A93" : return 93; - case /* A94 */94 : + case "A94" : return 94; - case /* A95 */95 : + case "A95" : return 95; - case /* A96 */96 : + case "A96" : return 96; - case /* A97 */97 : + case "A97" : return 97; - case /* A98 */98 : + case "A98" : return 98; - case /* A99 */99 : + case "A99" : return 99; - case /* A100 */100 : + case "A100" : return 100; - case /* A101 */101 : + case "A101" : return 101; - case /* A102 */102 : + case "A102" : return 102; - case /* A103 */103 : + case "A103" : return 103; - case /* A104 */104 : + case "A104" : return 104; - case /* A105 */105 : + case "A105" : return 105; - case /* A106 */106 : + case "A106" : return 106; - case /* A107 */107 : + case "A107" : return 107; - case /* A108 */108 : + case "A108" : return 108; - case /* A109 */109 : + case "A109" : return 109; - case /* A110 */110 : + case "A110" : return 110; - case /* A111 */111 : + case "A111" : return 111; - case /* A112 */112 : + case "A112" : return 112; - case /* A113 */113 : + case "A113" : return 113; - case /* A114 */114 : + case "A114" : return 114; - case /* A115 */115 : + case "A115" : return 115; - case /* A116 */116 : + case "A116" : return 116; - case /* A117 */117 : + case "A117" : return 117; - case /* A118 */118 : + case "A118" : return 118; - case /* A119 */119 : + case "A119" : return 119; - case /* A120 */120 : + case "A120" : return 120; - case /* A121 */121 : + case "A121" : return 121; - case /* A122 */122 : + case "A122" : return 122; - case /* A123 */123 : + case "A123" : return 123; - case /* A124 */124 : + case "A124" : return 124; - case /* A125 */125 : + case "A125" : return 125; - case /* A126 */126 : + case "A126" : return 126; - case /* A127 */127 : + case "A127" : return 127; - case /* A128 */128 : + case "A128" : return 128; - case /* A129 */129 : + case "A129" : return 129; - case /* A130 */130 : + case "A130" : return 130; - case /* A131 */131 : + case "A131" : return 131; - case /* A132 */132 : + case "A132" : return 132; - case /* A133 */133 : + case "A133" : return 133; - case /* A134 */134 : + case "A134" : return 134; - case /* A135 */135 : + case "A135" : return 135; - case /* A136 */136 : + case "A136" : return 136; - case /* A137 */137 : + case "A137" : return 137; - case /* A138 */138 : + case "A138" : return 138; - case /* A139 */139 : + case "A139" : return 139; - case /* A140 */140 : + case "A140" : return 140; - case /* A141 */141 : + case "A141" : return 141; - case /* A142 */142 : + case "A142" : return 142; - case /* A143 */143 : + case "A143" : return 143; - case /* A144 */144 : + case "A144" : return 144; - case /* A145 */145 : + case "A145" : return 145; - case /* A146 */146 : + case "A146" : return 146; - case /* A147 */147 : + case "A147" : return 147; - case /* A148 */148 : + case "A148" : return 148; - case /* A149 */149 : + case "A149" : return 149; - case /* A150 */150 : + case "A150" : return 150; - case /* A151 */151 : + case "A151" : return 151; - case /* A152 */152 : + case "A152" : return 152; - case /* A153 */153 : + case "A153" : return 153; - case /* A154 */154 : + case "A154" : return 154; - case /* A155 */155 : + case "A155" : return 155; - case /* A156 */156 : + case "A156" : return 156; - case /* A157 */157 : + case "A157" : return 157; - case /* A158 */158 : + case "A158" : return 158; - case /* A159 */159 : + case "A159" : return 159; - case /* A160 */160 : + case "A160" : return 160; - case /* A161 */161 : + case "A161" : return 161; - case /* A162 */162 : + case "A162" : return 162; - case /* A163 */163 : + case "A163" : return 163; - case /* A164 */164 : + case "A164" : return 164; - case /* A165 */165 : + case "A165" : return 165; - case /* A166 */166 : + case "A166" : return 166; - case /* A167 */167 : + case "A167" : return 167; - case /* A168 */168 : + case "A168" : return 168; - case /* A169 */169 : + case "A169" : return 169; - case /* A170 */170 : + case "A170" : return 170; - case /* A171 */171 : + case "A171" : return 171; - case /* A172 */172 : + case "A172" : return 172; - case /* A173 */173 : + case "A173" : return 173; - case /* A174 */174 : + case "A174" : return 174; - case /* A175 */175 : + case "A175" : return 175; - case /* A176 */176 : + case "A176" : return 176; - case /* A177 */177 : + case "A177" : return 177; - case /* A178 */178 : + case "A178" : return 178; - case /* A179 */179 : + case "A179" : return 179; - case /* A180 */180 : + case "A180" : return 180; - case /* A181 */181 : + case "A181" : return 181; - case /* A182 */182 : + case "A182" : return 182; - case /* A183 */183 : + case "A183" : return 183; - case /* A184 */184 : + case "A184" : return 184; - case /* A185 */185 : + case "A185" : return 185; - case /* A186 */186 : + case "A186" : return 186; - case /* A187 */187 : + case "A187" : return 187; - case /* A188 */188 : + case "A188" : return 188; - case /* A189 */189 : + case "A189" : return 189; - case /* A190 */190 : + case "A190" : return 190; - case /* A191 */191 : + case "A191" : return 191; - case /* A192 */192 : + case "A192" : return 192; - case /* A193 */193 : + case "A193" : return 193; - case /* A194 */194 : + case "A194" : return 194; - case /* A195 */195 : + case "A195" : return 195; - case /* A196 */196 : + case "A196" : return 196; - case /* A197 */197 : + case "A197" : return 197; - case /* A198 */198 : + case "A198" : return 198; - case /* A199 */199 : + case "A199" : return 199; - case /* A200 */200 : + case "A200" : return 200; - case /* A201 */201 : + case "A201" : return 201; - case /* A202 */202 : + case "A202" : return 202; - case /* A203 */203 : + case "A203" : return 203; - case /* A204 */204 : + case "A204" : return 204; - case /* A205 */205 : + case "A205" : return 205; - case /* A206 */206 : + case "A206" : return 206; - case /* A207 */207 : + case "A207" : return 207; - case /* A208 */208 : + case "A208" : return 208; - case /* A209 */209 : + case "A209" : return 209; - case /* A210 */210 : + case "A210" : return 210; - case /* A211 */211 : + case "A211" : return 211; - case /* A212 */212 : + case "A212" : return 212; - case /* A213 */213 : + case "A213" : return 213; - case /* A214 */214 : + case "A214" : return 214; - case /* A215 */215 : + case "A215" : return 215; - case /* A216 */216 : + case "A216" : return 216; - case /* A217 */217 : + case "A217" : return 217; - case /* A218 */218 : + case "A218" : return 218; - case /* A219 */219 : + case "A219" : return 219; - case /* A220 */220 : + case "A220" : return 220; - case /* A221 */221 : + case "A221" : return 221; - case /* A222 */222 : + case "A222" : return 222; - case /* A223 */223 : + case "A223" : return 223; - case /* A224 */224 : + case "A224" : return 224; - case /* A225 */225 : + case "A225" : return 225; - case /* A226 */226 : + case "A226" : return 226; - case /* A227 */227 : + case "A227" : return 227; - case /* A228 */228 : + case "A228" : return 228; - case /* A229 */229 : + case "A229" : return 229; - case /* A230 */230 : + case "A230" : return 230; - case /* A231 */231 : + case "A231" : return 231; - case /* A232 */232 : + case "A232" : return 232; - case /* A233 */233 : + case "A233" : return 233; - case /* A234 */234 : + case "A234" : return 234; - case /* A235 */235 : + case "A235" : return 235; - case /* A236 */236 : + case "A236" : return 236; - case /* A237 */237 : + case "A237" : return 237; - case /* A238 */238 : + case "A238" : return 238; - case /* A239 */239 : + case "A239" : return 239; - case /* A240 */240 : + case "A240" : return 240; - case /* A241 */241 : + case "A241" : return 241; - case /* A242 */242 : + case "A242" : return 242; - case /* A243 */243 : + case "A243" : return 243; - case /* A244 */244 : + case "A244" : return 244; - case /* A245 */245 : + case "A245" : return 245; - case /* A246 */246 : + case "A246" : return 246; - case /* A247 */247 : + case "A247" : return 247; - case /* A248 */248 : + case "A248" : return 248; - case /* A249 */249 : + case "A249" : return 249; - case /* A250 */250 : + case "A250" : return 250; - case /* A251 */251 : + case "A251" : return 251; - case /* A252 */252 : + case "A252" : return 252; - case /* A253 */253 : + case "A253" : return 253; - case /* A254 */254 : + case "A254" : return 254; - case /* A255 */255 : + case "A255" : return 255; - case /* A256 */256 : + case "A256" : return 256; - case /* A257 */257 : + case "A257" : return 257; - case /* A258 */258 : + case "A258" : return 258; - case /* A259 */259 : + case "A259" : return 259; - case /* A260 */260 : + case "A260" : return 260; - case /* A261 */261 : + case "A261" : return 261; - case /* A262 */262 : + case "A262" : return 262; - case /* A263 */263 : + case "A263" : return 263; - case /* A264 */264 : + case "A264" : return 264; - case /* A265 */265 : + case "A265" : return 265; - case /* A266 */266 : + case "A266" : return 266; - case /* A267 */267 : + case "A267" : return 267; - case /* A268 */268 : + case "A268" : return 268; - case /* A269 */269 : + case "A269" : return 269; - case /* A270 */270 : + case "A270" : return 270; - case /* A271 */271 : + case "A271" : return 271; - case /* A272 */272 : + case "A272" : return 272; - case /* A273 */273 : + case "A273" : return 273; - case /* A274 */274 : + case "A274" : return 274; - case /* A275 */275 : + case "A275" : return 275; - case /* A276 */276 : + case "A276" : return 276; - case /* A277 */277 : + case "A277" : return 277; - case /* A278 */278 : + case "A278" : return 278; - case /* A279 */279 : + case "A279" : return 279; - case /* A280 */280 : + case "A280" : return 280; - case /* A281 */281 : + case "A281" : return 281; - case /* A282 */282 : + case "A282" : return 282; - case /* A283 */283 : + case "A283" : return 283; - case /* A284 */284 : + case "A284" : return 284; - case /* A285 */285 : + case "A285" : return 285; - case /* A286 */286 : + case "A286" : return 286; - case /* A287 */287 : + case "A287" : return 287; - case /* A288 */288 : + case "A288" : return 288; - case /* A289 */289 : + case "A289" : return 289; - case /* A290 */290 : + case "A290" : return 290; - case /* A291 */291 : + case "A291" : return 291; - case /* A292 */292 : + case "A292" : return 292; - case /* A293 */293 : + case "A293" : return 293; - case /* A294 */294 : + case "A294" : return 294; - case /* A295 */295 : + case "A295" : return 295; - case /* A296 */296 : + case "A296" : return 296; - case /* A297 */297 : + case "A297" : return 297; - case /* A298 */298 : + case "A298" : return 298; - case /* A299 */299 : + case "A299" : return 299; } @@ -609,605 +609,605 @@ function to_enum(param) { function to_string(param) { switch (param) { - case /* A0 */0 : + case "A0" : return "A0"; - case /* A1 */1 : + case "A1" : return "A1"; - case /* A2 */2 : + case "A2" : return "A2"; - case /* A3 */3 : + case "A3" : return "A3"; - case /* A4 */4 : + case "A4" : return "A4"; - case /* A5 */5 : + case "A5" : return "A5"; - case /* A6 */6 : + case "A6" : return "A6"; - case /* A7 */7 : + case "A7" : return "A7"; - case /* A8 */8 : + case "A8" : return "A8"; - case /* A9 */9 : + case "A9" : return "A9"; - case /* A10 */10 : + case "A10" : return "A10"; - case /* A11 */11 : + case "A11" : return "A11"; - case /* A12 */12 : + case "A12" : return "A12"; - case /* A13 */13 : + case "A13" : return "A13"; - case /* A14 */14 : + case "A14" : return "A14"; - case /* A15 */15 : + case "A15" : return "A15"; - case /* A16 */16 : + case "A16" : return "A16"; - case /* A17 */17 : + case "A17" : return "A17"; - case /* A18 */18 : + case "A18" : return "A18"; - case /* A19 */19 : + case "A19" : return "A19"; - case /* A20 */20 : + case "A20" : return "A20"; - case /* A21 */21 : + case "A21" : return "A21"; - case /* A22 */22 : + case "A22" : return "A22"; - case /* A23 */23 : + case "A23" : return "A23"; - case /* A24 */24 : + case "A24" : return "A24"; - case /* A25 */25 : + case "A25" : return "A25"; - case /* A26 */26 : + case "A26" : return "A26"; - case /* A27 */27 : + case "A27" : return "A27"; - case /* A28 */28 : + case "A28" : return "A28"; - case /* A29 */29 : + case "A29" : return "A29"; - case /* A30 */30 : + case "A30" : return "A30"; - case /* A31 */31 : + case "A31" : return "A31"; - case /* A32 */32 : + case "A32" : return "A32"; - case /* A33 */33 : + case "A33" : return "A33"; - case /* A34 */34 : + case "A34" : return "A34"; - case /* A35 */35 : + case "A35" : return "A35"; - case /* A36 */36 : + case "A36" : return "A36"; - case /* A37 */37 : + case "A37" : return "A37"; - case /* A38 */38 : + case "A38" : return "A38"; - case /* A39 */39 : + case "A39" : return "A39"; - case /* A40 */40 : + case "A40" : return "A40"; - case /* A41 */41 : + case "A41" : return "A41"; - case /* A42 */42 : + case "A42" : return "A42"; - case /* A43 */43 : + case "A43" : return "A43"; - case /* A44 */44 : + case "A44" : return "A44"; - case /* A45 */45 : + case "A45" : return "A45"; - case /* A46 */46 : + case "A46" : return "A46"; - case /* A47 */47 : + case "A47" : return "A47"; - case /* A48 */48 : + case "A48" : return "A48"; - case /* A49 */49 : + case "A49" : return "A49"; - case /* A50 */50 : + case "A50" : return "A50"; - case /* A51 */51 : + case "A51" : return "A51"; - case /* A52 */52 : + case "A52" : return "A52"; - case /* A53 */53 : + case "A53" : return "A53"; - case /* A54 */54 : + case "A54" : return "A54"; - case /* A55 */55 : + case "A55" : return "A55"; - case /* A56 */56 : + case "A56" : return "A56"; - case /* A57 */57 : + case "A57" : return "A57"; - case /* A58 */58 : + case "A58" : return "A58"; - case /* A59 */59 : + case "A59" : return "A59"; - case /* A60 */60 : + case "A60" : return "A60"; - case /* A61 */61 : + case "A61" : return "A61"; - case /* A62 */62 : + case "A62" : return "A62"; - case /* A63 */63 : + case "A63" : return "A63"; - case /* A64 */64 : + case "A64" : return "A64"; - case /* A65 */65 : + case "A65" : return "A65"; - case /* A66 */66 : + case "A66" : return "A66"; - case /* A67 */67 : + case "A67" : return "A67"; - case /* A68 */68 : + case "A68" : return "A68"; - case /* A69 */69 : + case "A69" : return "A69"; - case /* A70 */70 : + case "A70" : return "A70"; - case /* A71 */71 : + case "A71" : return "A71"; - case /* A72 */72 : + case "A72" : return "A72"; - case /* A73 */73 : + case "A73" : return "A73"; - case /* A74 */74 : + case "A74" : return "A74"; - case /* A75 */75 : + case "A75" : return "A75"; - case /* A76 */76 : + case "A76" : return "A76"; - case /* A77 */77 : + case "A77" : return "A77"; - case /* A78 */78 : + case "A78" : return "A78"; - case /* A79 */79 : + case "A79" : return "A79"; - case /* A80 */80 : + case "A80" : return "A80"; - case /* A81 */81 : + case "A81" : return "A81"; - case /* A82 */82 : + case "A82" : return "A82"; - case /* A83 */83 : + case "A83" : return "A83"; - case /* A84 */84 : + case "A84" : return "A84"; - case /* A85 */85 : + case "A85" : return "A85"; - case /* A86 */86 : + case "A86" : return "A86"; - case /* A87 */87 : + case "A87" : return "A87"; - case /* A88 */88 : + case "A88" : return "A88"; - case /* A89 */89 : + case "A89" : return "A89"; - case /* A90 */90 : + case "A90" : return "A90"; - case /* A91 */91 : + case "A91" : return "A91"; - case /* A92 */92 : + case "A92" : return "A92"; - case /* A93 */93 : + case "A93" : return "A93"; - case /* A94 */94 : + case "A94" : return "A94"; - case /* A95 */95 : + case "A95" : return "A95"; - case /* A96 */96 : + case "A96" : return "A96"; - case /* A97 */97 : + case "A97" : return "A97"; - case /* A98 */98 : + case "A98" : return "A98"; - case /* A99 */99 : + case "A99" : return "A99"; - case /* A100 */100 : + case "A100" : return "A100"; - case /* A101 */101 : + case "A101" : return "A101"; - case /* A102 */102 : + case "A102" : return "A102"; - case /* A103 */103 : + case "A103" : return "A103"; - case /* A104 */104 : + case "A104" : return "A104"; - case /* A105 */105 : + case "A105" : return "A105"; - case /* A106 */106 : + case "A106" : return "A106"; - case /* A107 */107 : + case "A107" : return "A107"; - case /* A108 */108 : + case "A108" : return "A108"; - case /* A109 */109 : + case "A109" : return "A109"; - case /* A110 */110 : + case "A110" : return "A110"; - case /* A111 */111 : + case "A111" : return "A111"; - case /* A112 */112 : + case "A112" : return "A112"; - case /* A113 */113 : + case "A113" : return "A113"; - case /* A114 */114 : + case "A114" : return "A114"; - case /* A115 */115 : + case "A115" : return "A115"; - case /* A116 */116 : + case "A116" : return "A116"; - case /* A117 */117 : + case "A117" : return "A117"; - case /* A118 */118 : + case "A118" : return "A118"; - case /* A119 */119 : + case "A119" : return "A119"; - case /* A120 */120 : + case "A120" : return "A120"; - case /* A121 */121 : + case "A121" : return "A121"; - case /* A122 */122 : + case "A122" : return "A122"; - case /* A123 */123 : + case "A123" : return "A123"; - case /* A124 */124 : + case "A124" : return "A124"; - case /* A125 */125 : + case "A125" : return "A125"; - case /* A126 */126 : + case "A126" : return "A126"; - case /* A127 */127 : + case "A127" : return "A127"; - case /* A128 */128 : + case "A128" : return "A128"; - case /* A129 */129 : + case "A129" : return "A129"; - case /* A130 */130 : + case "A130" : return "A130"; - case /* A131 */131 : + case "A131" : return "A131"; - case /* A132 */132 : + case "A132" : return "A132"; - case /* A133 */133 : + case "A133" : return "A133"; - case /* A134 */134 : + case "A134" : return "A134"; - case /* A135 */135 : + case "A135" : return "A135"; - case /* A136 */136 : + case "A136" : return "A136"; - case /* A137 */137 : + case "A137" : return "A137"; - case /* A138 */138 : + case "A138" : return "A138"; - case /* A139 */139 : + case "A139" : return "A139"; - case /* A140 */140 : + case "A140" : return "A140"; - case /* A141 */141 : + case "A141" : return "A141"; - case /* A142 */142 : + case "A142" : return "A142"; - case /* A143 */143 : + case "A143" : return "A143"; - case /* A144 */144 : + case "A144" : return "A144"; - case /* A145 */145 : + case "A145" : return "A145"; - case /* A146 */146 : + case "A146" : return "A146"; - case /* A147 */147 : + case "A147" : return "A147"; - case /* A148 */148 : + case "A148" : return "A148"; - case /* A149 */149 : + case "A149" : return "A149"; - case /* A150 */150 : + case "A150" : return "A150"; - case /* A151 */151 : + case "A151" : return "A151"; - case /* A152 */152 : + case "A152" : return "A152"; - case /* A153 */153 : + case "A153" : return "A153"; - case /* A154 */154 : + case "A154" : return "A154"; - case /* A155 */155 : + case "A155" : return "A155"; - case /* A156 */156 : + case "A156" : return "A156"; - case /* A157 */157 : + case "A157" : return "A157"; - case /* A158 */158 : + case "A158" : return "A158"; - case /* A159 */159 : + case "A159" : return "A159"; - case /* A160 */160 : + case "A160" : return "A160"; - case /* A161 */161 : + case "A161" : return "A161"; - case /* A162 */162 : + case "A162" : return "A162"; - case /* A163 */163 : + case "A163" : return "A163"; - case /* A164 */164 : + case "A164" : return "A164"; - case /* A165 */165 : + case "A165" : return "A165"; - case /* A166 */166 : + case "A166" : return "A166"; - case /* A167 */167 : + case "A167" : return "A167"; - case /* A168 */168 : + case "A168" : return "A168"; - case /* A169 */169 : + case "A169" : return "A169"; - case /* A170 */170 : + case "A170" : return "A170"; - case /* A171 */171 : + case "A171" : return "A171"; - case /* A172 */172 : + case "A172" : return "A172"; - case /* A173 */173 : + case "A173" : return "A173"; - case /* A174 */174 : + case "A174" : return "A174"; - case /* A175 */175 : + case "A175" : return "A175"; - case /* A176 */176 : + case "A176" : return "A176"; - case /* A177 */177 : + case "A177" : return "A177"; - case /* A178 */178 : + case "A178" : return "A178"; - case /* A179 */179 : + case "A179" : return "A179"; - case /* A180 */180 : + case "A180" : return "A180"; - case /* A181 */181 : + case "A181" : return "A181"; - case /* A182 */182 : + case "A182" : return "A182"; - case /* A183 */183 : + case "A183" : return "A183"; - case /* A184 */184 : + case "A184" : return "A184"; - case /* A185 */185 : + case "A185" : return "A185"; - case /* A186 */186 : + case "A186" : return "A186"; - case /* A187 */187 : + case "A187" : return "A187"; - case /* A188 */188 : + case "A188" : return "A188"; - case /* A189 */189 : + case "A189" : return "A189"; - case /* A190 */190 : + case "A190" : return "A190"; - case /* A191 */191 : + case "A191" : return "A191"; - case /* A192 */192 : + case "A192" : return "A192"; - case /* A193 */193 : + case "A193" : return "A193"; - case /* A194 */194 : + case "A194" : return "A194"; - case /* A195 */195 : + case "A195" : return "A195"; - case /* A196 */196 : + case "A196" : return "A196"; - case /* A197 */197 : + case "A197" : return "A197"; - case /* A198 */198 : + case "A198" : return "A198"; - case /* A199 */199 : + case "A199" : return "A199"; - case /* A200 */200 : + case "A200" : return "A200"; - case /* A201 */201 : + case "A201" : return "A201"; - case /* A202 */202 : + case "A202" : return "A202"; - case /* A203 */203 : + case "A203" : return "A203"; - case /* A204 */204 : + case "A204" : return "A204"; - case /* A205 */205 : + case "A205" : return "A205"; - case /* A206 */206 : + case "A206" : return "A206"; - case /* A207 */207 : + case "A207" : return "A207"; - case /* A208 */208 : + case "A208" : return "A208"; - case /* A209 */209 : + case "A209" : return "A209"; - case /* A210 */210 : + case "A210" : return "A210"; - case /* A211 */211 : + case "A211" : return "A211"; - case /* A212 */212 : + case "A212" : return "A212"; - case /* A213 */213 : + case "A213" : return "A213"; - case /* A214 */214 : + case "A214" : return "A214"; - case /* A215 */215 : + case "A215" : return "A215"; - case /* A216 */216 : + case "A216" : return "A216"; - case /* A217 */217 : + case "A217" : return "A217"; - case /* A218 */218 : + case "A218" : return "A218"; - case /* A219 */219 : + case "A219" : return "A219"; - case /* A220 */220 : + case "A220" : return "A220"; - case /* A221 */221 : + case "A221" : return "A221"; - case /* A222 */222 : + case "A222" : return "A222"; - case /* A223 */223 : + case "A223" : return "A223"; - case /* A224 */224 : + case "A224" : return "A224"; - case /* A225 */225 : + case "A225" : return "A225"; - case /* A226 */226 : + case "A226" : return "A226"; - case /* A227 */227 : + case "A227" : return "A227"; - case /* A228 */228 : + case "A228" : return "A228"; - case /* A229 */229 : + case "A229" : return "A229"; - case /* A230 */230 : + case "A230" : return "A230"; - case /* A231 */231 : + case "A231" : return "A231"; - case /* A232 */232 : + case "A232" : return "A232"; - case /* A233 */233 : + case "A233" : return "A233"; - case /* A234 */234 : + case "A234" : return "A234"; - case /* A235 */235 : + case "A235" : return "A235"; - case /* A236 */236 : + case "A236" : return "A236"; - case /* A237 */237 : + case "A237" : return "A237"; - case /* A238 */238 : + case "A238" : return "A238"; - case /* A239 */239 : + case "A239" : return "A239"; - case /* A240 */240 : + case "A240" : return "A240"; - case /* A241 */241 : + case "A241" : return "A241"; - case /* A242 */242 : + case "A242" : return "A242"; - case /* A243 */243 : + case "A243" : return "A243"; - case /* A244 */244 : + case "A244" : return "A244"; - case /* A245 */245 : + case "A245" : return "A245"; - case /* A246 */246 : + case "A246" : return "A246"; - case /* A247 */247 : + case "A247" : return "A247"; - case /* A248 */248 : + case "A248" : return "A248"; - case /* A249 */249 : + case "A249" : return "A249"; - case /* A250 */250 : + case "A250" : return "A250"; - case /* A251 */251 : + case "A251" : return "A251"; - case /* A252 */252 : + case "A252" : return "A252"; - case /* A253 */253 : + case "A253" : return "A253"; - case /* A254 */254 : + case "A254" : return "A254"; - case /* A255 */255 : + case "A255" : return "A255"; - case /* A256 */256 : + case "A256" : return "A256"; - case /* A257 */257 : + case "A257" : return "A257"; - case /* A258 */258 : + case "A258" : return "A258"; - case /* A259 */259 : + case "A259" : return "A259"; - case /* A260 */260 : + case "A260" : return "A260"; - case /* A261 */261 : + case "A261" : return "A261"; - case /* A262 */262 : + case "A262" : return "A262"; - case /* A263 */263 : + case "A263" : return "A263"; - case /* A264 */264 : + case "A264" : return "A264"; - case /* A265 */265 : + case "A265" : return "A265"; - case /* A266 */266 : + case "A266" : return "A266"; - case /* A267 */267 : + case "A267" : return "A267"; - case /* A268 */268 : + case "A268" : return "A268"; - case /* A269 */269 : + case "A269" : return "A269"; - case /* A270 */270 : + case "A270" : return "A270"; - case /* A271 */271 : + case "A271" : return "A271"; - case /* A272 */272 : + case "A272" : return "A272"; - case /* A273 */273 : + case "A273" : return "A273"; - case /* A274 */274 : + case "A274" : return "A274"; - case /* A275 */275 : + case "A275" : return "A275"; - case /* A276 */276 : + case "A276" : return "A276"; - case /* A277 */277 : + case "A277" : return "A277"; - case /* A278 */278 : + case "A278" : return "A278"; - case /* A279 */279 : + case "A279" : return "A279"; - case /* A280 */280 : + case "A280" : return "A280"; - case /* A281 */281 : + case "A281" : return "A281"; - case /* A282 */282 : + case "A282" : return "A282"; - case /* A283 */283 : + case "A283" : return "A283"; - case /* A284 */284 : + case "A284" : return "A284"; - case /* A285 */285 : + case "A285" : return "A285"; - case /* A286 */286 : + case "A286" : return "A286"; - case /* A287 */287 : + case "A287" : return "A287"; - case /* A288 */288 : + case "A288" : return "A288"; - case /* A289 */289 : + case "A289" : return "A289"; - case /* A290 */290 : + case "A290" : return "A290"; - case /* A291 */291 : + case "A291" : return "A291"; - case /* A292 */292 : + case "A292" : return "A292"; - case /* A293 */293 : + case "A293" : return "A293"; - case /* A294 */294 : + case "A294" : return "A294"; - case /* A295 */295 : + case "A295" : return "A295"; - case /* A296 */296 : + case "A296" : return "A296"; - case /* A297 */297 : + case "A297" : return "A297"; - case /* A298 */298 : + case "A298" : return "A298"; - case /* A299 */299 : + case "A299" : return "A299"; } diff --git a/jscomp/test/block_alias_test.js b/jscomp/test/block_alias_test.js index ec33b640dd..e6e7ed9f87 100644 --- a/jscomp/test/block_alias_test.js +++ b/jscomp/test/block_alias_test.js @@ -23,7 +23,7 @@ function b(loc, x) { var Block = {}; var v0 = { - TAG: /* A */1, + TAG: "A", _0: 0, _1: 1 }; @@ -31,7 +31,7 @@ var v0 = { var Block$1 = {}; var v1 = { - TAG: /* A */1, + TAG: "A", _0: 0, _1: 1 }; @@ -60,7 +60,7 @@ eq("File \"block_alias_test.ml\", line 32, characters 6-13", List.length({ }), 2); b("File \"block_alias_test.ml\", line 33, characters 5-12", Caml_obj.equal(v0, { - TAG: /* A */1, + TAG: "A", _0: 0, _1: 1 })); diff --git a/jscomp/test/bs_array_test.js b/jscomp/test/bs_array_test.js index 9c7594dae9..c1d60d82e9 100644 --- a/jscomp/test/bs_array_test.js +++ b/jscomp/test/bs_array_test.js @@ -37,7 +37,7 @@ function neq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Neq */1, + TAG: "Neq", _0: x, _1: y }; diff --git a/jscomp/test/bs_auto_uncurry_test.js b/jscomp/test/bs_auto_uncurry_test.js index 7b1b0449c7..8026d1e533 100644 --- a/jscomp/test/bs_auto_uncurry_test.js +++ b/jscomp/test/bs_auto_uncurry_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/bs_float_test.js b/jscomp/test/bs_float_test.js index 87d2b38bce..70500ee6e5 100644 --- a/jscomp/test/bs_float_test.js +++ b/jscomp/test/bs_float_test.js @@ -30,7 +30,7 @@ function neq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Neq */1, + TAG: "Neq", _0: x, _1: y }; diff --git a/jscomp/test/bs_ignore_effect.js b/jscomp/test/bs_ignore_effect.js index a98a609280..debffe9502 100644 --- a/jscomp/test/bs_ignore_effect.js +++ b/jscomp/test/bs_ignore_effect.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -41,7 +41,7 @@ var h = (v.contents = v.contents + 1 | 0, { lo: 0 }); -var z = (v.contents = v.contents + 1 | 0, add(3.0, 2.0)); +var z = (v.contents = v.contents + 1 | 0, "Float", add(3.0, 2.0)); eq("File \"bs_ignore_effect.ml\", line 26, characters 5-12", v.contents, 2); diff --git a/jscomp/test/bs_ignore_test.js b/jscomp/test/bs_ignore_test.js index 5bb2630f5f..79070b8bc4 100644 --- a/jscomp/test/bs_ignore_test.js +++ b/jscomp/test/bs_ignore_test.js @@ -19,20 +19,20 @@ function add_dyn(kind,x,y){ ; function string_of_kind(kind) { - if (kind) { - return "string"; - } else { + if (kind === "Float") { return "float"; + } else { + return "string"; } } function add2(k, x, y) { - return add_dyn(k ? "string" : "float", x, y); + return add_dyn(string_of_kind(k), x, y); } -console.log(add2(/* Float */0, 3.0, 2.0)); +console.log(add2("Float", 3.0, 2.0)); -console.log(add2(/* String */1, "x", "y")); +console.log(add2("String", "x", "y")); exports.string_of_kind = string_of_kind; exports.add2 = add2; diff --git a/jscomp/test/bs_int_test.js b/jscomp/test/bs_int_test.js index 988311b5bd..f46b1a3889 100644 --- a/jscomp/test/bs_int_test.js +++ b/jscomp/test/bs_int_test.js @@ -30,7 +30,7 @@ function neq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Neq */1, + TAG: "Neq", _0: x, _1: y }; diff --git a/jscomp/test/bs_map_test.js b/jscomp/test/bs_map_test.js index 5a8b0140e1..298044243b 100644 --- a/jscomp/test/bs_map_test.js +++ b/jscomp/test/bs_map_test.js @@ -20,7 +20,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -37,7 +37,7 @@ function b(loc, v) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: v }; }) diff --git a/jscomp/test/bs_node_string_buffer_test.js b/jscomp/test/bs_node_string_buffer_test.js index 013e914d74..05555da2f0 100644 --- a/jscomp/test/bs_node_string_buffer_test.js +++ b/jscomp/test/bs_node_string_buffer_test.js @@ -4,17 +4,17 @@ var $$Node = require("../../lib/js/node.js"); function f(str) { var match = $$Node.test(str); - if (match[0]) { - console.log([ - "buffer", - Buffer.isBuffer(match[1]) - ]); - } else { + if (match[0] === "String") { console.log([ "string", match[1] ]); + return ; } + console.log([ + "buffer", + Buffer.isBuffer(match[1]) + ]); } f("xx"); diff --git a/jscomp/test/bs_rbset_int_bench.js b/jscomp/test/bs_rbset_int_bench.js index 85cf974cd6..e81ba6f617 100644 --- a/jscomp/test/bs_rbset_int_bench.js +++ b/jscomp/test/bs_rbset_int_bench.js @@ -3,7 +3,7 @@ var Rbset = require("./rbset.js"); function bench(param) { - var data = /* Empty */0; + var data = "Empty"; console.time("bs_rbset_int_bench.ml 7"); for(var i = 0; i <= 1000000; ++i){ data = Rbset.add(i, data); diff --git a/jscomp/test/bs_string_test.js b/jscomp/test/bs_string_test.js index 41bd1cc2c1..f215a227c1 100644 --- a/jscomp/test/bs_string_test.js +++ b/jscomp/test/bs_string_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/buffer_test.js b/jscomp/test/buffer_test.js index 206bcd4d42..3880afcf46 100644 --- a/jscomp/test/buffer_test.js +++ b/jscomp/test/buffer_test.js @@ -11,7 +11,7 @@ var suites_0 = [ "equal", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ Caml_bytes.get(Bytes.make(3, /* 'a' */97), 0), Bytes.make(3, /* 'a' */97)[0] @@ -31,7 +31,7 @@ var suites_1 = { var u = Bytes.make(3, /* 'a' */97); u[0] = /* 'b' */98; return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ u[0], /* 'g' */103 @@ -52,7 +52,7 @@ var suites_1 = { $$Buffer.add_string(v, String(i)); } return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Buffer.contents(v), _1: "012345678910" }; diff --git a/jscomp/test/build.ninja b/jscomp/test/build.ninja index 4f6ce47b11..09f6d12761 100644 --- a/jscomp/test/build.ninja +++ b/jscomp/test/build.ninja @@ -54,10 +54,6 @@ o test/array_subtle_test.cmi test/array_subtle_test.cmj : cc test/array_subtle_t o test/array_test.cmj : cc_cmi test/array_test.ml | test/array_test.cmi test/mt.cmj $bsc $stdlib runtime o test/array_test.cmi : cc test/array_test.mli | $bsc $stdlib runtime o test/ast_abstract_test.cmi test/ast_abstract_test.cmj : cc test/ast_abstract_test.ml | test/mt.cmj $bsc $stdlib runtime -o test/ast_js_mapper_poly_test.cmi test/ast_js_mapper_poly_test.cmj : cc test/ast_js_mapper_poly_test.ml | test/mt.cmj $bsc $stdlib runtime -o test/ast_js_mapper_test.cmj : cc_cmi test/ast_js_mapper_test.ml | test/ast_js_mapper_test.cmi $bsc $stdlib runtime -o test/ast_js_mapper_test.cmi : cc test/ast_js_mapper_test.mli | $bsc $stdlib runtime -o test/ast_mapper_defensive_test.cmi test/ast_mapper_defensive_test.cmj : cc test/ast_mapper_defensive_test.ml | test/mt.cmj $bsc $stdlib runtime o test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj : cc test/ast_mapper_unused_warning_test.ml | $bsc $stdlib runtime o test/async_await.cmi test/async_await.cmj : cc test/async_await.res | $bsc $stdlib runtime o test/async_ideas.cmi test/async_ideas.cmj : cc test/async_ideas.ml | $bsc $stdlib runtime @@ -420,7 +416,6 @@ o test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj o test/largest_int_flow.cmi test/largest_int_flow.cmj : cc test/largest_int_flow.ml | $bsc $stdlib runtime o test/lazy_demo.cmi test/lazy_demo.cmj : cc test/lazy_demo.res | $bsc $stdlib runtime o test/lazy_test.cmi test/lazy_test.cmj : cc test/lazy_test.ml | test/mt.cmj $bsc $stdlib runtime -o test/lexer_test.cmi test/lexer_test.cmj : cc test/lexer_test.ml | test/arith_lexer.cmj test/arith_parser.cmj test/arith_syntax.cmj test/mt.cmj test/number_lexer.cmj $bsc $stdlib runtime o test/lib_js_test.cmi test/lib_js_test.cmj : cc test/lib_js_test.ml | test/mt.cmj $bsc $stdlib runtime o test/libarg_test.cmi test/libarg_test.cmj : cc test/libarg_test.ml | test/mt.cmj $bsc $stdlib runtime o test/libqueue_test.cmi test/libqueue_test.cmj : cc test/libqueue_test.ml | $bsc $stdlib runtime @@ -726,4 +721,4 @@ o test/variant.cmi test/variant.cmj : cc test/variant.ml | $bsc $stdlib runtime o test/variantsMatching.cmi test/variantsMatching.cmj : cc test/variantsMatching.res | $bsc $stdlib runtime o test/watch_test.cmi test/watch_test.cmj : cc test/watch_test.ml | $bsc $stdlib runtime o test/webpack_config.cmi test/webpack_config.cmj : cc test/webpack_config.ml | $bsc $stdlib runtime -o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/app_root_finder.cmi test/app_root_finder.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_js_mapper_poly_test.cmi test/ast_js_mapper_poly_test.cmj test/ast_js_mapper_test.cmi test/ast_js_mapper_test.cmj test/ast_mapper_defensive_test.cmi test/ast_mapper_defensive_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_node_string_buffer_test.cmi test/bs_node_string_buffer_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/caml_sys_poly_fill_test.cmi test/caml_sys_poly_fill_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_dyntype.cmi test/derive_dyntype.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/derive_type_test.cmi test/derive_type_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_def.cmi test/exception_def.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebind_test.cmi test/exception_rebind_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exn_error_pattern.cmi test/exn_error_pattern.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/flow_parser_reg_test.cmi test/flow_parser_reg_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fs_test.cmi test/fs_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2652_test.cmi test/gpr_2652_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hamming_test.cmi test/hamming_test.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_promise_basic_test.cmi test/js_promise_basic_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lexer_test.cmi test/lexer_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_fs_test.cmi test/node_fs_test.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/promise_catch_test.cmi test/promise_catch_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/rec_value_test.cmi test/rec_value_test.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simple_derive_test.cmi test/simple_derive_test.cmj test/simple_derive_use.cmi test/simple_derive_use.cmj test/simple_lexer_test.cmi test/simple_lexer_test.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_literal_print_test.cmi test/string_literal_print_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_obj_simple_ffi.cmi test/test_obj_simple_ffi.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_require.cmi test/test_require.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/ui_defs.cmi test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/unsafe_this.cmi test/unsafe_this.cmj test/update_record_test.cmi test/update_record_test.cmj test/utf8_decode_test.cmi test/utf8_decode_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/watch_test.cmi test/watch_test.cmj test/webpack_config.cmi test/webpack_config.cmj +o test : phony test/406_primitive_test.cmi test/406_primitive_test.cmj test/EmptyRecord.cmi test/EmptyRecord.cmj test/SafePromises.cmi test/SafePromises.cmj test/UncurriedAlways.cmi test/UncurriedAlways.cmj test/UncurriedExternals.cmi test/UncurriedExternals.cmj test/UncurriedPervasives.cmi test/UncurriedPervasives.cmj test/a.cmi test/a.cmj test/a_filename_test.cmi test/a_filename_test.cmj test/a_list_test.cmi test/a_list_test.cmj test/a_recursive_type.cmi test/a_recursive_type.cmj test/a_scope_bug.cmi test/a_scope_bug.cmj test/a_string_test.cmi test/a_string_test.cmj test/abstract_type.cmi test/abstract_type.cmj test/adt_optimize_test.cmi test/adt_optimize_test.cmj test/alias_default_value_test.cmi test/alias_default_value_test.cmj test/alias_test.cmi test/alias_test.cmj test/and_or_tailcall_test.cmi test/and_or_tailcall_test.cmj test/app_root_finder.cmi test/app_root_finder.cmj test/argv_test.cmi test/argv_test.cmj test/ari_regress_test.cmi test/ari_regress_test.cmj test/arith_lexer.cmi test/arith_lexer.cmj test/arith_parser.cmi test/arith_parser.cmj test/arith_syntax.cmi test/arith_syntax.cmj test/arity.cmi test/arity.cmj test/arity_deopt.cmi test/arity_deopt.cmj test/arity_infer.cmi test/arity_infer.cmj test/array_data_util.cmi test/array_data_util.cmj test/array_safe_get.cmi test/array_safe_get.cmj test/array_subtle_test.cmi test/array_subtle_test.cmj test/array_test.cmi test/array_test.cmj test/ast_abstract_test.cmi test/ast_abstract_test.cmj test/ast_mapper_unused_warning_test.cmi test/ast_mapper_unused_warning_test.cmj test/async_await.cmi test/async_await.cmj test/async_ideas.cmi test/async_ideas.cmj test/async_inline.cmi test/async_inline.cmj test/attr_test.cmi test/attr_test.cmj test/b.cmi test/b.cmj test/bal_set_mini.cmi test/bal_set_mini.cmj test/bang_primitive.cmi test/bang_primitive.cmj test/basic_module_test.cmi test/basic_module_test.cmj test/bb.cmi test/bb.cmj test/bdd.cmi test/bdd.cmj test/belt_internal_test.cmi test/belt_internal_test.cmj test/belt_result_alias_test.cmi test/belt_result_alias_test.cmj test/bench.cmi test/bench.cmj test/big_enum.cmi test/big_enum.cmj test/big_polyvar_test.cmi test/big_polyvar_test.cmj test/block_alias_test.cmi test/block_alias_test.cmj test/boolean_test.cmi test/boolean_test.cmj test/bs_MapInt_test.cmi test/bs_MapInt_test.cmj test/bs_abstract_test.cmi test/bs_abstract_test.cmj test/bs_array_test.cmi test/bs_array_test.cmj test/bs_auto_uncurry.cmi test/bs_auto_uncurry.cmj test/bs_auto_uncurry_test.cmi test/bs_auto_uncurry_test.cmj test/bs_float_test.cmi test/bs_float_test.cmj test/bs_hashmap_test.cmi test/bs_hashmap_test.cmj test/bs_hashset_int_test.cmi test/bs_hashset_int_test.cmj test/bs_hashtbl_string_test.cmi test/bs_hashtbl_string_test.cmj test/bs_ignore_effect.cmi test/bs_ignore_effect.cmj test/bs_ignore_test.cmi test/bs_ignore_test.cmj test/bs_int_test.cmi test/bs_int_test.cmj test/bs_list_test.cmi test/bs_list_test.cmj test/bs_map_set_dict_test.cmi test/bs_map_set_dict_test.cmj test/bs_map_test.cmi test/bs_map_test.cmj test/bs_min_max_test.cmi test/bs_min_max_test.cmj test/bs_mutable_set_test.cmi test/bs_mutable_set_test.cmj test/bs_node_string_buffer_test.cmi test/bs_node_string_buffer_test.cmj test/bs_poly_map_test.cmi test/bs_poly_map_test.cmj test/bs_poly_mutable_map_test.cmi test/bs_poly_mutable_map_test.cmj test/bs_poly_mutable_set_test.cmi test/bs_poly_mutable_set_test.cmj test/bs_poly_set_test.cmi test/bs_poly_set_test.cmj test/bs_qualified.cmi test/bs_qualified.cmj test/bs_queue_test.cmi test/bs_queue_test.cmj test/bs_rbset_int_bench.cmi test/bs_rbset_int_bench.cmj test/bs_rest_test.cmi test/bs_rest_test.cmj test/bs_set_bench.cmi test/bs_set_bench.cmj test/bs_set_int_test.cmi test/bs_set_int_test.cmj test/bs_sort_test.cmi test/bs_sort_test.cmj test/bs_splice_partial.cmi test/bs_splice_partial.cmj test/bs_stack_test.cmi test/bs_stack_test.cmj test/bs_string_test.cmi test/bs_string_test.cmj test/bs_unwrap_test.cmi test/bs_unwrap_test.cmj test/buffer_test.cmi test/buffer_test.cmj test/bytes_split_gpr_743_test.cmi test/bytes_split_gpr_743_test.cmj test/caml_compare_test.cmi test/caml_compare_test.cmj test/caml_format_test.cmi test/caml_format_test.cmj test/caml_sys_poly_fill_test.cmi test/caml_sys_poly_fill_test.cmj test/chain_code_test.cmi test/chain_code_test.cmj test/chn_test.cmi test/chn_test.cmj test/class_type_ffi_test.cmi test/class_type_ffi_test.cmj test/coercion_module_alias_test.cmi test/coercion_module_alias_test.cmj test/compare_test.cmi test/compare_test.cmj test/complete_parmatch_test.cmi test/complete_parmatch_test.cmj test/complex_if_test.cmi test/complex_if_test.cmj test/complex_test.cmi test/complex_test.cmj test/complex_while_loop.cmi test/complex_while_loop.cmj test/condition_compilation_test.cmi test/condition_compilation_test.cmj test/config1_test.cmi test/config1_test.cmj test/console_log_test.cmi test/console_log_test.cmj test/const_block_test.cmi test/const_block_test.cmj test/const_defs.cmi test/const_defs.cmj test/const_defs_test.cmi test/const_defs_test.cmj test/const_test.cmi test/const_test.cmj test/cont_int_fold_test.cmi test/cont_int_fold_test.cmj test/cps_test.cmi test/cps_test.cmj test/cross_module_inline_test.cmi test/cross_module_inline_test.cmj test/custom_error_test.cmi test/custom_error_test.cmj test/debug_keep_test.cmi test/debug_keep_test.cmj test/debug_mode_value.cmi test/debug_mode_value.cmj test/debug_tmp.cmi test/debug_tmp.cmj test/debugger_test.cmi test/debugger_test.cmj test/default_export_test.cmi test/default_export_test.cmj test/defunctor_make_test.cmi test/defunctor_make_test.cmj test/demo_int_map.cmi test/demo_int_map.cmj test/demo_page.cmi test/demo_page.cmj test/demo_pipe.cmi test/demo_pipe.cmj test/derive_dyntype.cmi test/derive_dyntype.cmj test/derive_projector_test.cmi test/derive_projector_test.cmj test/derive_type_test.cmi test/derive_type_test.cmj test/digest_test.cmi test/digest_test.cmj test/directives.cmi test/directives.cmj test/div_by_zero_test.cmi test/div_by_zero_test.cmj test/dollar_escape_test.cmi test/dollar_escape_test.cmj test/earger_curry_test.cmi test/earger_curry_test.cmj test/effect.cmi test/effect.cmj test/epsilon_test.cmi test/epsilon_test.cmj test/equal_box_test.cmi test/equal_box_test.cmj test/equal_exception_test.cmi test/equal_exception_test.cmj test/equal_test.cmi test/equal_test.cmj test/es6_export.cmi test/es6_export.cmj test/es6_import.cmi test/es6_import.cmj test/es6_module_test.cmi test/es6_module_test.cmj test/escape_esmodule.cmi test/escape_esmodule.cmj test/esmodule_ref.cmi test/esmodule_ref.cmj test/event_ffi.cmi test/event_ffi.cmj test/exception_alias.cmi test/exception_alias.cmj test/exception_def.cmi test/exception_def.cmj test/exception_raise_test.cmi test/exception_raise_test.cmj test/exception_rebind_test.cmi test/exception_rebind_test.cmj test/exception_rebound_err_test.cmi test/exception_rebound_err_test.cmj test/exception_value_test.cmi test/exception_value_test.cmj test/exn_error_pattern.cmi test/exn_error_pattern.cmj test/exponentiation_precedence_test.cmi test/exponentiation_precedence_test.cmj test/export_keyword.cmi test/export_keyword.cmj test/ext_array_test.cmi test/ext_array_test.cmj test/ext_bytes_test.cmi test/ext_bytes_test.cmj test/ext_filename_test.cmi test/ext_filename_test.cmj test/ext_list_test.cmi test/ext_list_test.cmj test/ext_pervasives_test.cmi test/ext_pervasives_test.cmj test/ext_string_test.cmi test/ext_string_test.cmj test/ext_sys_test.cmi test/ext_sys_test.cmj test/extensible_variant_test.cmi test/extensible_variant_test.cmj test/external_polyfill_test.cmi test/external_polyfill_test.cmj test/external_ppx.cmi test/external_ppx.cmj test/external_ppx2.cmi test/external_ppx2.cmj test/fail_comp.cmi test/fail_comp.cmj test/ffi_arity_test.cmi test/ffi_arity_test.cmj test/ffi_array_test.cmi test/ffi_array_test.cmj test/ffi_js_test.cmi test/ffi_js_test.cmj test/ffi_splice_test.cmi test/ffi_splice_test.cmj test/ffi_test.cmi test/ffi_test.cmj test/fib.cmi test/fib.cmj test/flattern_order_test.cmi test/flattern_order_test.cmj test/flexible_array_test.cmi test/flexible_array_test.cmj test/float_array.cmi test/float_array.cmj test/float_of_bits_test.cmi test/float_of_bits_test.cmj test/float_record.cmi test/float_record.cmj test/float_test.cmi test/float_test.cmj test/floatarray_test.cmi test/floatarray_test.cmj test/flow_parser_reg_test.cmi test/flow_parser_reg_test.cmj test/for_loop_test.cmi test/for_loop_test.cmj test/for_side_effect_test.cmi test/for_side_effect_test.cmj test/format_regression.cmi test/format_regression.cmj test/format_test.cmi test/format_test.cmj test/fs_test.cmi test/fs_test.cmj test/fun_pattern_match.cmi test/fun_pattern_match.cmj test/functor_app_test.cmi test/functor_app_test.cmj test/functor_def.cmi test/functor_def.cmj test/functor_ffi.cmi test/functor_ffi.cmj test/functor_inst.cmi test/functor_inst.cmj test/functors.cmi test/functors.cmj test/gbk.cmi test/gbk.cmj test/genlex_test.cmi test/genlex_test.cmj test/gentTypeReTest.cmi test/gentTypeReTest.cmj test/global_exception_regression_test.cmi test/global_exception_regression_test.cmj test/global_mangles.cmi test/global_mangles.cmj test/global_module_alias_test.cmi test/global_module_alias_test.cmj test/google_closure_test.cmi test/google_closure_test.cmj test/gpr496_test.cmi test/gpr496_test.cmj test/gpr_1072.cmi test/gpr_1072.cmj test/gpr_1072_reg.cmi test/gpr_1072_reg.cmj test/gpr_1150.cmi test/gpr_1150.cmj test/gpr_1154_test.cmi test/gpr_1154_test.cmj test/gpr_1170.cmi test/gpr_1170.cmj test/gpr_1240_missing_unbox.cmi test/gpr_1240_missing_unbox.cmj test/gpr_1245_test.cmi test/gpr_1245_test.cmj test/gpr_1268.cmi test/gpr_1268.cmj test/gpr_1409_test.cmi test/gpr_1409_test.cmj test/gpr_1423_app_test.cmi test/gpr_1423_app_test.cmj test/gpr_1423_nav.cmi test/gpr_1423_nav.cmj test/gpr_1438.cmi test/gpr_1438.cmj test/gpr_1481.cmi test/gpr_1481.cmj test/gpr_1484.cmi test/gpr_1484.cmj test/gpr_1503_test.cmi test/gpr_1503_test.cmj test/gpr_1539_test.cmi test/gpr_1539_test.cmj test/gpr_1658_test.cmi test/gpr_1658_test.cmj test/gpr_1667_test.cmi test/gpr_1667_test.cmj test/gpr_1692_test.cmi test/gpr_1692_test.cmj test/gpr_1698_test.cmi test/gpr_1698_test.cmj test/gpr_1701_test.cmi test/gpr_1701_test.cmj test/gpr_1716_test.cmi test/gpr_1716_test.cmj test/gpr_1717_test.cmi test/gpr_1717_test.cmj test/gpr_1728_test.cmi test/gpr_1728_test.cmj test/gpr_1749_test.cmi test/gpr_1749_test.cmj test/gpr_1759_test.cmi test/gpr_1759_test.cmj test/gpr_1760_test.cmi test/gpr_1760_test.cmj test/gpr_1762_test.cmi test/gpr_1762_test.cmj test/gpr_1817_test.cmi test/gpr_1817_test.cmj test/gpr_1822_test.cmi test/gpr_1822_test.cmj test/gpr_1891_test.cmi test/gpr_1891_test.cmj test/gpr_1943_test.cmi test/gpr_1943_test.cmj test/gpr_1946_test.cmi test/gpr_1946_test.cmj test/gpr_2316_test.cmi test/gpr_2316_test.cmj test/gpr_2352_test.cmi test/gpr_2352_test.cmj test/gpr_2413_test.cmi test/gpr_2413_test.cmj test/gpr_2474.cmi test/gpr_2474.cmj test/gpr_2487.cmi test/gpr_2487.cmj test/gpr_2503_test.cmi test/gpr_2503_test.cmj test/gpr_2608_test.cmi test/gpr_2608_test.cmj test/gpr_2614_test.cmi test/gpr_2614_test.cmj test/gpr_2633_test.cmi test/gpr_2633_test.cmj test/gpr_2642_test.cmi test/gpr_2642_test.cmj test/gpr_2652_test.cmi test/gpr_2652_test.cmj test/gpr_2682_test.cmi test/gpr_2682_test.cmj test/gpr_2700_test.cmi test/gpr_2700_test.cmj test/gpr_2731_test.cmi test/gpr_2731_test.cmj test/gpr_2789_test.cmi test/gpr_2789_test.cmj test/gpr_2931_test.cmi test/gpr_2931_test.cmj test/gpr_3142_test.cmi test/gpr_3142_test.cmj test/gpr_3154_test.cmi test/gpr_3154_test.cmj test/gpr_3209_test.cmi test/gpr_3209_test.cmj test/gpr_3492_test.cmi test/gpr_3492_test.cmj test/gpr_3519_jsx_test.cmi test/gpr_3519_jsx_test.cmj test/gpr_3519_test.cmi test/gpr_3519_test.cmj test/gpr_3536_test.cmi test/gpr_3536_test.cmj test/gpr_3546_test.cmi test/gpr_3546_test.cmj test/gpr_3548_test.cmi test/gpr_3548_test.cmj test/gpr_3549_test.cmi test/gpr_3549_test.cmj test/gpr_3566_drive_test.cmi test/gpr_3566_drive_test.cmj test/gpr_3566_test.cmi test/gpr_3566_test.cmj test/gpr_3595_test.cmi test/gpr_3595_test.cmj test/gpr_3609_test.cmi test/gpr_3609_test.cmj test/gpr_3697_test.cmi test/gpr_3697_test.cmj test/gpr_373_test.cmi test/gpr_373_test.cmj test/gpr_3770_test.cmi test/gpr_3770_test.cmj test/gpr_3852_alias.cmi test/gpr_3852_alias.cmj test/gpr_3852_alias_reify.cmi test/gpr_3852_alias_reify.cmj test/gpr_3852_effect.cmi test/gpr_3852_effect.cmj test/gpr_3865.cmi test/gpr_3865.cmj test/gpr_3865_bar.cmi test/gpr_3865_bar.cmj test/gpr_3865_foo.cmi test/gpr_3865_foo.cmj test/gpr_3875_test.cmi test/gpr_3875_test.cmj test/gpr_3877_test.cmi test/gpr_3877_test.cmj test/gpr_3895_test.cmi test/gpr_3895_test.cmj test/gpr_3897_test.cmi test/gpr_3897_test.cmj test/gpr_3931_test.cmi test/gpr_3931_test.cmj test/gpr_3980_test.cmi test/gpr_3980_test.cmj test/gpr_4025_test.cmi test/gpr_4025_test.cmj test/gpr_405_test.cmi test/gpr_405_test.cmj test/gpr_4069_test.cmi test/gpr_4069_test.cmj test/gpr_4265_test.cmi test/gpr_4265_test.cmj test/gpr_4274_test.cmi test/gpr_4274_test.cmj test/gpr_4280_test.cmi test/gpr_4280_test.cmj test/gpr_4407_test.cmi test/gpr_4407_test.cmj test/gpr_441.cmi test/gpr_441.cmj test/gpr_4442_test.cmi test/gpr_4442_test.cmj test/gpr_4491_test.cmi test/gpr_4491_test.cmj test/gpr_4494_test.cmi test/gpr_4494_test.cmj test/gpr_4519_test.cmi test/gpr_4519_test.cmj test/gpr_459_test.cmi test/gpr_459_test.cmj test/gpr_4632.cmi test/gpr_4632.cmj test/gpr_4639_test.cmi test/gpr_4639_test.cmj test/gpr_4900_test.cmi test/gpr_4900_test.cmj test/gpr_4924_test.cmi test/gpr_4924_test.cmj test/gpr_4931.cmi test/gpr_4931.cmj test/gpr_4931_allow.cmi test/gpr_4931_allow.cmj test/gpr_5071_test.cmi test/gpr_5071_test.cmj test/gpr_5169_test.cmi test/gpr_5169_test.cmj test/gpr_5218_test.cmi test/gpr_5218_test.cmj test/gpr_5280_optimize_test.cmi test/gpr_5280_optimize_test.cmj test/gpr_5312.cmi test/gpr_5312.cmj test/gpr_5557.cmi test/gpr_5557.cmj test/gpr_5753.cmi test/gpr_5753.cmj test/gpr_658.cmi test/gpr_658.cmj test/gpr_858_test.cmi test/gpr_858_test.cmj test/gpr_858_unit2_test.cmi test/gpr_858_unit2_test.cmj test/gpr_904_test.cmi test/gpr_904_test.cmj test/gpr_974_test.cmi test/gpr_974_test.cmj test/gpr_977_test.cmi test/gpr_977_test.cmj test/gpr_return_type_unused_attribute.cmi test/gpr_return_type_unused_attribute.cmj test/gray_code_test.cmi test/gray_code_test.cmj test/guide_for_ext.cmi test/guide_for_ext.cmj test/hamming_test.cmi test/hamming_test.cmj test/hash_collision_test.cmi test/hash_collision_test.cmj test/hash_sugar_desugar.cmi test/hash_sugar_desugar.cmj test/hash_test.cmi test/hash_test.cmj test/hashtbl_test.cmi test/hashtbl_test.cmj test/hello.foo.cmi test/hello.foo.cmj test/hello_res.cmi test/hello_res.cmj test/ignore_test.cmi test/ignore_test.cmj test/imm_map_bench.cmi test/imm_map_bench.cmj test/include_side_effect.cmi test/include_side_effect.cmj test/include_side_effect_free.cmi test/include_side_effect_free.cmj test/incomplete_toplevel_test.cmi test/incomplete_toplevel_test.cmj test/infer_type_test.cmi test/infer_type_test.cmj test/inline_const.cmi test/inline_const.cmj test/inline_const_test.cmi test/inline_const_test.cmj test/inline_edge_cases.cmi test/inline_edge_cases.cmj test/inline_map2_test.cmi test/inline_map2_test.cmj test/inline_map_demo.cmi test/inline_map_demo.cmj test/inline_map_test.cmi test/inline_map_test.cmj test/inline_record_test.cmi test/inline_record_test.cmj test/inline_regression_test.cmi test/inline_regression_test.cmj test/inline_string_test.cmi test/inline_string_test.cmj test/inner_call.cmi test/inner_call.cmj test/inner_define.cmi test/inner_define.cmj test/inner_unused.cmi test/inner_unused.cmj test/installation_test.cmi test/installation_test.cmj test/int32_test.cmi test/int32_test.cmj test/int64_mul_div_test.cmi test/int64_mul_div_test.cmj test/int64_string_bench.cmi test/int64_string_bench.cmj test/int64_string_test.cmi test/int64_string_test.cmj test/int64_test.cmi test/int64_test.cmj test/int_hashtbl_test.cmi test/int_hashtbl_test.cmj test/int_map.cmi test/int_map.cmj test/int_overflow_test.cmi test/int_overflow_test.cmj test/int_poly_var.cmi test/int_poly_var.cmj test/int_switch_test.cmi test/int_switch_test.cmj test/internal_unused_test.cmi test/internal_unused_test.cmj test/io_test.cmi test/io_test.cmj test/js_array_test.cmi test/js_array_test.cmj test/js_bool_test.cmi test/js_bool_test.cmj test/js_cast_test.cmi test/js_cast_test.cmj test/js_date_test.cmi test/js_date_test.cmj test/js_dict_test.cmi test/js_dict_test.cmj test/js_exception_catch_test.cmi test/js_exception_catch_test.cmj test/js_float_test.cmi test/js_float_test.cmj test/js_global_test.cmi test/js_global_test.cmj test/js_int_test.cmi test/js_int_test.cmj test/js_json_test.cmi test/js_json_test.cmj test/js_list_test.cmi test/js_list_test.cmj test/js_math_test.cmi test/js_math_test.cmj test/js_null_test.cmi test/js_null_test.cmj test/js_null_undefined_test.cmi test/js_null_undefined_test.cmj test/js_nullable_test.cmi test/js_nullable_test.cmj test/js_obj_test.cmi test/js_obj_test.cmj test/js_option_test.cmi test/js_option_test.cmj test/js_promise_basic_test.cmi test/js_promise_basic_test.cmj test/js_re_test.cmi test/js_re_test.cmj test/js_string_test.cmi test/js_string_test.cmj test/js_typed_array_test.cmi test/js_typed_array_test.cmj test/js_undefined_test.cmi test/js_undefined_test.cmj test/js_val.cmi test/js_val.cmj test/jsoo_400_test.cmi test/jsoo_400_test.cmj test/jsoo_485_test.cmi test/jsoo_485_test.cmj test/jsxv4_newtype.cmi test/jsxv4_newtype.cmj test/key_word_property.cmi test/key_word_property.cmj test/key_word_property2.cmi test/key_word_property2.cmj test/key_word_property_plus_test.cmi test/key_word_property_plus_test.cmj test/label_uncurry.cmi test/label_uncurry.cmj test/large_integer_pat.cmi test/large_integer_pat.cmj test/large_record_duplication_test.cmi test/large_record_duplication_test.cmj test/largest_int_flow.cmi test/largest_int_flow.cmj test/lazy_demo.cmi test/lazy_demo.cmj test/lazy_test.cmi test/lazy_test.cmj test/lib_js_test.cmi test/lib_js_test.cmj test/libarg_test.cmi test/libarg_test.cmj test/libqueue_test.cmi test/libqueue_test.cmj test/limits_test.cmi test/limits_test.cmj test/list_stack.cmi test/list_stack.cmj test/list_test.cmi test/list_test.cmj test/local_exception_test.cmi test/local_exception_test.cmj test/loop_regression_test.cmi test/loop_regression_test.cmj test/loop_suites_test.cmi test/loop_suites_test.cmj test/map_find_test.cmi test/map_find_test.cmj test/map_test.cmi test/map_test.cmj test/mario_game.cmi test/mario_game.cmj test/marshal.cmi test/marshal.cmj test/meth_annotation.cmi test/meth_annotation.cmj test/method_name_test.cmi test/method_name_test.cmj test/method_string_name.cmi test/method_string_name.cmj test/minimal_test.cmi test/minimal_test.cmj test/miss_colon_test.cmi test/miss_colon_test.cmj test/mock_mt.cmi test/mock_mt.cmj test/module_alias_test.cmi test/module_alias_test.cmj test/module_as_class_ffi.cmi test/module_as_class_ffi.cmj test/module_as_function.cmi test/module_as_function.cmj test/module_missing_conversion.cmi test/module_missing_conversion.cmj test/module_parameter_test.cmi test/module_parameter_test.cmj test/module_splice_test.cmi test/module_splice_test.cmj test/more_poly_variant_test.cmi test/more_poly_variant_test.cmj test/more_uncurry.cmi test/more_uncurry.cmj test/mpr_6033_test.cmi test/mpr_6033_test.cmj test/mt.cmi test/mt.cmj test/mt_global.cmi test/mt_global.cmj test/mutable_obj_test.cmi test/mutable_obj_test.cmj test/mutable_uncurry_test.cmi test/mutable_uncurry_test.cmj test/mutual_non_recursive_type.cmi test/mutual_non_recursive_type.cmj test/name_mangle_test.cmi test/name_mangle_test.cmj test/nested_include.cmi test/nested_include.cmj test/nested_module_alias.cmi test/nested_module_alias.cmj test/nested_obj_literal.cmi test/nested_obj_literal.cmj test/nested_obj_test.cmi test/nested_obj_test.cmj test/nested_pattern_match_test.cmi test/nested_pattern_match_test.cmj test/noassert.cmi test/noassert.cmj test/node_fs_test.cmi test/node_fs_test.cmj test/node_path_test.cmi test/node_path_test.cmj test/null_list_test.cmi test/null_list_test.cmj test/number_lexer.cmi test/number_lexer.cmj test/obj_literal_ppx.cmi test/obj_literal_ppx.cmj test/obj_literal_ppx_test.cmi test/obj_literal_ppx_test.cmj test/obj_magic_test.cmi test/obj_magic_test.cmj test/obj_type_test.cmi test/obj_type_test.cmj test/ocaml_re_test.cmi test/ocaml_re_test.cmj test/of_string_test.cmi test/of_string_test.cmj test/offset.cmi test/offset.cmj test/option_encoding_test.cmi test/option_encoding_test.cmj test/option_record_none_test.cmi test/option_record_none_test.cmj test/option_repr_test.cmi test/option_repr_test.cmj test/optional_ffi_test.cmi test/optional_ffi_test.cmj test/optional_regression_test.cmi test/optional_regression_test.cmj test/pipe_send_readline.cmi test/pipe_send_readline.cmj test/pipe_syntax.cmi test/pipe_syntax.cmj test/poly_empty_array.cmi test/poly_empty_array.cmj test/poly_variant_test.cmi test/poly_variant_test.cmj test/polymorphic_raw_test.cmi test/polymorphic_raw_test.cmj test/polymorphism_test.cmi test/polymorphism_test.cmj test/polyvar_convert.cmi test/polyvar_convert.cmj test/polyvar_test.cmi test/polyvar_test.cmj test/ppx_apply_test.cmi test/ppx_apply_test.cmj test/pq_test.cmi test/pq_test.cmj test/pr6726.cmi test/pr6726.cmj test/pr_regression_test.cmi test/pr_regression_test.cmj test/prepend_data_ffi.cmi test/prepend_data_ffi.cmj test/primitive_reg_test.cmi test/primitive_reg_test.cmj test/print_alpha_test.cmi test/print_alpha_test.cmj test/promise_catch_test.cmi test/promise_catch_test.cmj test/queue_402.cmi test/queue_402.cmj test/queue_test.cmi test/queue_test.cmj test/random_test.cmi test/random_test.cmj test/raw_hash_tbl_bench.cmi test/raw_hash_tbl_bench.cmj test/raw_output_test.cmi test/raw_output_test.cmj test/raw_pure_test.cmi test/raw_pure_test.cmj test/rbset.cmi test/rbset.cmj test/react.cmi test/react.cmj test/reactDOMRe.cmi test/reactDOMRe.cmj test/reactDOMServerRe.cmi test/reactDOMServerRe.cmj test/reactEvent.cmi test/reactEvent.cmj test/reactTestUtils.cmi test/reactTestUtils.cmj test/reasonReact.cmi test/reasonReact.cmj test/reasonReactCompat.cmi test/reasonReactCompat.cmj test/reasonReactOptimizedCreateClass.cmi test/reasonReactOptimizedCreateClass.cmj test/reasonReactRouter.cmi test/reasonReactRouter.cmj test/rebind_module.cmi test/rebind_module.cmj test/rebind_module_test.cmi test/rebind_module_test.cmj test/rec_array_test.cmi test/rec_array_test.cmj test/rec_fun_test.cmi test/rec_fun_test.cmj test/rec_module_opt.cmi test/rec_module_opt.cmj test/rec_module_test.cmi test/rec_module_test.cmj test/rec_value_test.cmi test/rec_value_test.cmj test/record_debug_test.cmi test/record_debug_test.cmj test/record_extension_test.cmi test/record_extension_test.cmj test/record_name_test.cmi test/record_name_test.cmj test/record_regression.cmi test/record_regression.cmj test/record_with_test.cmi test/record_with_test.cmj test/recursive_module.cmi test/recursive_module.cmj test/recursive_module_test.cmi test/recursive_module_test.cmj test/recursive_react_component.cmi test/recursive_react_component.cmj test/recursive_records_test.cmi test/recursive_records_test.cmj test/recursive_unbound_module_test.cmi test/recursive_unbound_module_test.cmj test/regression_print.cmi test/regression_print.cmj test/relative_path.cmi test/relative_path.cmj test/res_debug.cmi test/res_debug.cmj test/return_check.cmi test/return_check.cmj test/runtime_encoding_test.cmi test/runtime_encoding_test.cmj test/set_annotation.cmi test/set_annotation.cmj test/set_gen.cmi test/set_gen.cmj test/sexp.cmi test/sexp.cmj test/sexpm.cmi test/sexpm.cmj test/sexpm_test.cmi test/sexpm_test.cmj test/side_effect.cmi test/side_effect.cmj test/side_effect_free.cmi test/side_effect_free.cmj test/simple_derive_test.cmi test/simple_derive_test.cmj test/simple_derive_use.cmi test/simple_derive_use.cmj test/simple_lexer_test.cmi test/simple_lexer_test.cmj test/simplify_lambda_632o.cmi test/simplify_lambda_632o.cmj test/single_module_alias.cmi test/single_module_alias.cmj test/singular_unit_test.cmi test/singular_unit_test.cmj test/small_inline_test.cmi test/small_inline_test.cmj test/splice_test.cmi test/splice_test.cmj test/stack_comp_test.cmi test/stack_comp_test.cmj test/stack_test.cmi test/stack_test.cmj test/stream_parser_test.cmi test/stream_parser_test.cmj test/string_bound_get_test.cmi test/string_bound_get_test.cmj test/string_constant_compare.cmi test/string_constant_compare.cmj test/string_get_set_test.cmi test/string_get_set_test.cmj test/string_literal_print_test.cmi test/string_literal_print_test.cmj test/string_runtime_test.cmi test/string_runtime_test.cmj test/string_set.cmi test/string_set.cmj test/string_set_test.cmi test/string_set_test.cmj test/string_test.cmi test/string_test.cmj test/string_unicode_test.cmi test/string_unicode_test.cmj test/stringmatch_test.cmi test/stringmatch_test.cmj test/submodule.cmi test/submodule.cmj test/submodule_call.cmi test/submodule_call.cmj test/switch_case_test.cmi test/switch_case_test.cmj test/switch_string.cmi test/switch_string.cmj test/tailcall_inline_test.cmi test/tailcall_inline_test.cmj test/template.cmi test/template.cmj test/test.cmi test/test.cmj test/test2.cmi test/test2.cmj test/test_alias.cmi test/test_alias.cmj test/test_ari.cmi test/test_ari.cmj test/test_array.cmi test/test_array.cmj test/test_array_append.cmi test/test_array_append.cmj test/test_array_primitive.cmi test/test_array_primitive.cmj test/test_bool_equal.cmi test/test_bool_equal.cmj test/test_bs_this.cmi test/test_bs_this.cmj test/test_bug.cmi test/test_bug.cmj test/test_bytes.cmi test/test_bytes.cmj test/test_case_opt_collision.cmi test/test_case_opt_collision.cmj test/test_case_set.cmi test/test_case_set.cmj test/test_char.cmi test/test_char.cmj test/test_closure.cmi test/test_closure.cmj test/test_common.cmi test/test_common.cmj test/test_const_elim.cmi test/test_const_elim.cmj test/test_const_propogate.cmi test/test_const_propogate.cmj test/test_cpp.cmi test/test_cpp.cmj test/test_cps.cmi test/test_cps.cmj test/test_demo.cmi test/test_demo.cmj test/test_dup_param.cmi test/test_dup_param.cmj test/test_eq.cmi test/test_eq.cmj test/test_exception.cmi test/test_exception.cmj test/test_exception_escape.cmi test/test_exception_escape.cmj test/test_export2.cmi test/test_export2.cmj test/test_external.cmi test/test_external.cmj test/test_external_unit.cmi test/test_external_unit.cmj test/test_ffi.cmi test/test_ffi.cmj test/test_fib.cmi test/test_fib.cmj test/test_filename.cmi test/test_filename.cmj test/test_for_loop.cmi test/test_for_loop.cmj test/test_for_map.cmi test/test_for_map.cmj test/test_for_map2.cmi test/test_for_map2.cmj test/test_format.cmi test/test_format.cmj test/test_formatter.cmi test/test_formatter.cmj test/test_functor_dead_code.cmi test/test_functor_dead_code.cmj test/test_generative_module.cmi test/test_generative_module.cmj test/test_global_print.cmi test/test_global_print.cmj test/test_google_closure.cmi test/test_google_closure.cmj test/test_include.cmi test/test_include.cmj test/test_incomplete.cmi test/test_incomplete.cmj test/test_incr_ref.cmi test/test_incr_ref.cmj test/test_int_map_find.cmi test/test_int_map_find.cmj test/test_internalOO.cmi test/test_internalOO.cmj test/test_is_js.cmi test/test_is_js.cmj test/test_js_ffi.cmi test/test_js_ffi.cmj test/test_let.cmi test/test_let.cmj test/test_list.cmi test/test_list.cmj test/test_literal.cmi test/test_literal.cmj test/test_literals.cmi test/test_literals.cmj test/test_match_exception.cmi test/test_match_exception.cmj test/test_mutliple.cmi test/test_mutliple.cmj test/test_nat64.cmi test/test_nat64.cmj test/test_nested_let.cmi test/test_nested_let.cmj test/test_nested_print.cmi test/test_nested_print.cmj test/test_non_export.cmi test/test_non_export.cmj test/test_nullary.cmi test/test_nullary.cmj test/test_obj.cmi test/test_obj.cmj test/test_obj_simple_ffi.cmi test/test_obj_simple_ffi.cmj test/test_order.cmi test/test_order.cmj test/test_order_tailcall.cmi test/test_order_tailcall.cmj test/test_other_exn.cmi test/test_other_exn.cmj test/test_pack.cmi test/test_pack.cmj test/test_per.cmi test/test_per.cmj test/test_pervasive.cmi test/test_pervasive.cmj test/test_pervasives2.cmi test/test_pervasives2.cmj test/test_pervasives3.cmi test/test_pervasives3.cmj test/test_primitive.cmi test/test_primitive.cmj test/test_ramification.cmi test/test_ramification.cmj test/test_react.cmi test/test_react.cmj test/test_react_case.cmi test/test_react_case.cmj test/test_regex.cmi test/test_regex.cmj test/test_require.cmi test/test_require.cmj test/test_runtime_encoding.cmi test/test_runtime_encoding.cmj test/test_scope.cmi test/test_scope.cmj test/test_seq.cmi test/test_seq.cmj test/test_set.cmi test/test_set.cmj test/test_side_effect_functor.cmi test/test_side_effect_functor.cmj test/test_simple_include.cmi test/test_simple_include.cmj test/test_simple_pattern_match.cmi test/test_simple_pattern_match.cmj test/test_simple_ref.cmi test/test_simple_ref.cmj test/test_simple_tailcall.cmi test/test_simple_tailcall.cmj test/test_small.cmi test/test_small.cmj test/test_sprintf.cmi test/test_sprintf.cmj test/test_stack.cmi test/test_stack.cmj test/test_static_catch_ident.cmi test/test_static_catch_ident.cmj test/test_string.cmi test/test_string.cmj test/test_string_case.cmi test/test_string_case.cmj test/test_string_const.cmi test/test_string_const.cmj test/test_string_map.cmi test/test_string_map.cmj test/test_string_switch.cmi test/test_string_switch.cmj test/test_switch.cmi test/test_switch.cmj test/test_trywith.cmi test/test_trywith.cmj test/test_tuple.cmi test/test_tuple.cmj test/test_tuple_destructring.cmi test/test_tuple_destructring.cmj test/test_type_based_arity.cmi test/test_type_based_arity.cmj test/test_u.cmi test/test_u.cmj test/test_unknown.cmi test/test_unknown.cmj test/test_unsafe_cmp.cmi test/test_unsafe_cmp.cmj test/test_unsafe_obj_ffi.cmi test/test_unsafe_obj_ffi.cmj test/test_unsafe_obj_ffi_ppx.cmi test/test_unsafe_obj_ffi_ppx.cmj test/test_unsupported_primitive.cmi test/test_unsupported_primitive.cmj test/test_while_closure.cmi test/test_while_closure.cmj test/test_while_side_effect.cmi test/test_while_side_effect.cmj test/test_zero_nullable.cmi test/test_zero_nullable.cmj test/then_mangle_test.cmi test/then_mangle_test.cmj test/ticker.cmi test/ticker.cmj test/to_string_test.cmi test/to_string_test.cmj test/topsort_test.cmi test/topsort_test.cmj test/tramp_fib.cmi test/tramp_fib.cmj test/tuple_alloc.cmi test/tuple_alloc.cmj test/type_disambiguate.cmi test/type_disambiguate.cmj test/typeof_test.cmi test/typeof_test.cmj test/ui_defs.cmi test/unboxed_attribute.cmi test/unboxed_attribute.cmj test/unboxed_attribute_test.cmi test/unboxed_attribute_test.cmj test/unboxed_crash.cmi test/unboxed_crash.cmj test/unboxed_use_case.cmi test/unboxed_use_case.cmj test/uncurried_cast.cmi test/uncurried_cast.cmj test/uncurried_default.args.cmi test/uncurried_default.args.cmj test/uncurried_pipe.cmi test/uncurried_pipe.cmj test/uncurry_external_test.cmi test/uncurry_external_test.cmj test/uncurry_glob_test.cmi test/uncurry_glob_test.cmj test/uncurry_test.cmi test/uncurry_test.cmj test/undef_regression2_test.cmi test/undef_regression2_test.cmj test/undef_regression_test.cmi test/undef_regression_test.cmj test/undefine_conditional.cmi test/undefine_conditional.cmj test/unicode_type_error.cmi test/unicode_type_error.cmj test/unit_undefined_test.cmi test/unit_undefined_test.cmj test/unitest_string.cmi test/unitest_string.cmj test/unsafe_full_apply_primitive.cmi test/unsafe_full_apply_primitive.cmj test/unsafe_ppx_test.cmi test/unsafe_ppx_test.cmj test/unsafe_this.cmi test/unsafe_this.cmj test/update_record_test.cmi test/update_record_test.cmj test/utf8_decode_test.cmi test/utf8_decode_test.cmj test/variant.cmi test/variant.cmj test/variantsMatching.cmi test/variantsMatching.cmj test/watch_test.cmi test/watch_test.cmj test/webpack_config.cmi test/webpack_config.cmj diff --git a/jscomp/test/bytes_split_gpr_743_test.js b/jscomp/test/bytes_split_gpr_743_test.js index e1ba233cd1..5027299d28 100644 --- a/jscomp/test/bytes_split_gpr_743_test.js +++ b/jscomp/test/bytes_split_gpr_743_test.js @@ -21,7 +21,7 @@ function eq(loc, param) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/caml_compare_test.js b/jscomp/test/caml_compare_test.js index a3d09debbd..8ab709c534 100644 --- a/jscomp/test/caml_compare_test.js +++ b/jscomp/test/caml_compare_test.js @@ -24,7 +24,7 @@ var suites = { "File \"caml_compare_test.ml\", line 9, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan(undefined, 1) }; @@ -35,7 +35,7 @@ var suites = { "option2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan(1, 2) }; @@ -46,7 +46,7 @@ var suites = { "File \"caml_compare_test.ml\", line 11, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.greaterthan({ hd: 1, @@ -60,7 +60,7 @@ var suites = { "listeq", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.equal({ hd: 1, @@ -89,7 +89,7 @@ var suites = { "listneq", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.greaterthan({ hd: 1, @@ -118,34 +118,34 @@ var suites = { "custom_u", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.greaterthan([ { - TAG: /* A */0, + TAG: "A", _0: 3 }, { - TAG: /* B */1, + TAG: "B", _0: 2, _1: false }, { - TAG: /* C */2, + TAG: "C", _0: 1 } ], [ { - TAG: /* A */0, + TAG: "A", _0: 3 }, { - TAG: /* B */1, + TAG: "B", _0: 2, _1: false }, { - TAG: /* C */2, + TAG: "C", _0: 0 } ]) @@ -157,34 +157,34 @@ var suites = { "custom_u2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.equal([ { - TAG: /* A */0, + TAG: "A", _0: 3 }, { - TAG: /* B */1, + TAG: "B", _0: 2, _1: false }, { - TAG: /* C */2, + TAG: "C", _0: 1 } ], [ { - TAG: /* A */0, + TAG: "A", _0: 3 }, { - TAG: /* B */1, + TAG: "B", _0: 2, _1: false }, { - TAG: /* C */2, + TAG: "C", _0: 1 } ]) @@ -196,7 +196,7 @@ var suites = { "function", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: function_equal_test }; @@ -207,7 +207,7 @@ var suites = { "File \"caml_compare_test.ml\", line 17, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan(undefined, 1) }; @@ -218,7 +218,7 @@ var suites = { "File \"caml_compare_test.ml\", line 28, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan(undefined, [ 1, @@ -232,7 +232,7 @@ var suites = { "File \"caml_compare_test.ml\", line 31, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.greaterthan([ 1, @@ -246,7 +246,7 @@ var suites = { "File \"caml_compare_test.ml\", line 34, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan({ hd: 2, @@ -314,7 +314,7 @@ var suites = { "File \"caml_compare_test.ml\", line 37, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan({ hd: 1, @@ -334,7 +334,7 @@ var suites = { "File \"caml_compare_test.ml\", line 40, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.lessthan(/* [] */0, { hd: 409, @@ -348,7 +348,7 @@ var suites = { "File \"caml_compare_test.ml\", line 43, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Caml_obj.greaterthan({ hd: 2, @@ -416,7 +416,7 @@ var suites = { "File \"caml_compare_test.ml\", line 47, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: false }; @@ -427,7 +427,7 @@ var suites = { "File \"caml_compare_test.ml\", line 50, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: false }; @@ -438,7 +438,7 @@ var suites = { "File \"caml_compare_test.ml\", line 53, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Caml_obj.equal({ hd: 2, @@ -506,7 +506,7 @@ var suites = { "File \"caml_compare_test.ml\", line 56, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Caml_obj.equal({ hd: 2, @@ -574,7 +574,7 @@ var suites = { "cmp_id", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: 1, y: 2 @@ -591,7 +591,7 @@ var suites = { "cmp_val", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: 1 }, { @@ -606,7 +606,7 @@ var suites = { "cmp_val2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: 2 }, { @@ -621,7 +621,7 @@ var suites = { "cmp_empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({}, {}), _1: 0 }; @@ -632,7 +632,7 @@ var suites = { "cmp_empty2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({}, {x:1}), _1: -1 }; @@ -643,7 +643,7 @@ var suites = { "cmp_swap", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: 1, y: 2 @@ -660,7 +660,7 @@ var suites = { "cmp_size", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({x:1}, {x:1, y:2}), _1: -1 }; @@ -671,7 +671,7 @@ var suites = { "cmp_size2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({x:1, y:2}, {x:1}), _1: 1 }; @@ -682,7 +682,7 @@ var suites = { "cmp_order", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: 0, y: 1 @@ -699,7 +699,7 @@ var suites = { "cmp_order2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: 1, y: 0 @@ -716,7 +716,7 @@ var suites = { "cmp_in_list", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ hd: { x: 1 @@ -737,7 +737,7 @@ var suites = { "cmp_in_list2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ hd: { x: 2 @@ -758,7 +758,7 @@ var suites = { "cmp_with_list", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: { hd: 0, @@ -779,7 +779,7 @@ var suites = { "cmp_with_list2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ x: { hd: 1, @@ -800,7 +800,7 @@ var suites = { "eq_id", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: Caml_obj.equal({ x: 1, y: 2 @@ -816,7 +816,7 @@ var suites = { "eq_val", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({ x: 1 }, { @@ -831,7 +831,7 @@ var suites = { "eq_val2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({ x: 2 }, { @@ -846,7 +846,7 @@ var suites = { "eq_empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({}, {}), _1: true }; @@ -857,7 +857,7 @@ var suites = { "eq_empty2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({}, {x:1}), _1: false }; @@ -868,7 +868,7 @@ var suites = { "eq_swap", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: Caml_obj.equal({ x: 1, y: 2 @@ -884,7 +884,7 @@ var suites = { "eq_size", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({x:1}, {x:1, y:2}), _1: false }; @@ -895,7 +895,7 @@ var suites = { "eq_size2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({x:1, y:2}, {x:1}), _1: false }; @@ -906,7 +906,7 @@ var suites = { "eq_in_list", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({ hd: { x: 1 @@ -927,7 +927,7 @@ var suites = { "eq_in_list2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({ hd: { x: 2 @@ -948,7 +948,7 @@ var suites = { "eq_with_list", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({ x: { hd: 0, @@ -969,7 +969,7 @@ var suites = { "eq_with_list2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({ x: { hd: 0, @@ -990,7 +990,7 @@ var suites = { "eq_no_prototype", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.equal({x:1}, ((function(){let o = Object.create(null);o.x = 1;return o;})())), _1: true }; @@ -1001,7 +1001,7 @@ var suites = { "File \"caml_compare_test.ml\", line 88, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare(null, { hd: 3, tl: /* [] */0 @@ -1015,7 +1015,7 @@ var suites = { "File \"caml_compare_test.ml\", line 91, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare({ hd: 3, tl: /* [] */0 @@ -1029,7 +1029,7 @@ var suites = { "File \"caml_compare_test.ml\", line 94, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare(null, 0), _1: -1 }; @@ -1040,7 +1040,7 @@ var suites = { "File \"caml_compare_test.ml\", line 97, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare(0, null), _1: 1 }; @@ -1051,7 +1051,7 @@ var suites = { "File \"caml_compare_test.ml\", line 100, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare(undefined, 0), _1: -1 }; @@ -1062,7 +1062,7 @@ var suites = { "File \"caml_compare_test.ml\", line 103, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare(0, undefined), _1: 1 }; diff --git a/jscomp/test/caml_format_test.js b/jscomp/test/caml_format_test.js index e71fc1ac81..f268556077 100644 --- a/jscomp/test/caml_format_test.js +++ b/jscomp/test/caml_format_test.js @@ -91,7 +91,7 @@ function from_of_string(xs) { "of_string " + String(i), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_format.int_of_string(b), _1: a }; @@ -104,23 +104,23 @@ var to_str = Caml_format.int_of_string; var pairs = [ [ - /* FP_infinite */3, + "FP_infinite", "infinity" ], [ - /* FP_infinite */3, + "FP_infinite", "+infinity" ], [ - /* FP_infinite */3, + "FP_infinite", "-infinity" ], [ - /* FP_zero */2, + "FP_zero", "0" ], [ - /* FP_zero */2, + "FP_zero", "0." ] ]; @@ -145,9 +145,9 @@ var suites = Pervasives.$at(from_of_string(of_string), Pervasives.$at({ "isnan_of_string", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, - _1: Pervasives.classify_float(Caml_format.float_of_string("nan")) === /* FP_nan */4 + _1: Pervasives.classify_float(Caml_format.float_of_string("nan")) === "FP_nan" }; }) ], @@ -159,7 +159,7 @@ var suites = Pervasives.$at(from_of_string(of_string), Pervasives.$at({ "infinity_of_string " + String(i), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: Pervasives.classify_float(Caml_format.float_of_string(b)) }; @@ -170,7 +170,7 @@ var suites = Pervasives.$at(from_of_string(of_string), Pervasives.$at({ "throw", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_format.float_of_string(""); }) @@ -182,7 +182,7 @@ var suites = Pervasives.$at(from_of_string(of_string), Pervasives.$at({ "format_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: " 33", _1: Caml_format.format_int("%32d", 33) }; @@ -197,7 +197,7 @@ var suites = Pervasives.$at(from_of_string(of_string), Pervasives.$at({ "normal_float_of_string " + String(i), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: Caml_format.float_of_string(b) }; @@ -321,7 +321,7 @@ var int64_suites_0 = [ "i64_simple7", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.to_string([ 0, 3333 @@ -336,7 +336,7 @@ var int64_suites_1 = { "i64_simple15", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.to_string(Caml_int64.neg_one), _1: "-1" }; @@ -347,7 +347,7 @@ var int64_suites_1 = { "i64_simple16", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.to_string([ -1, 4294956185 @@ -430,7 +430,7 @@ Mt.from_pair_suites("Caml_format_test", Pervasives.$at(suites, Pervasives.$at($$ "loat_format " + String(i), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_format.format_float(fmt, f), _1: str_result }; @@ -443,7 +443,7 @@ Mt.from_pair_suites("Caml_format_test", Pervasives.$at(suites, Pervasives.$at($$ "int64_of_string " + String(i) + " ", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_format.int64_of_string(b), _1: a }; diff --git a/jscomp/test/caml_sys_poly_fill_test.js b/jscomp/test/caml_sys_poly_fill_test.js index 92cf65e11a..ed51d2e780 100644 --- a/jscomp/test/caml_sys_poly_fill_test.js +++ b/jscomp/test/caml_sys_poly_fill_test.js @@ -21,7 +21,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/chain_code_test.js b/jscomp/test/chain_code_test.js index 649bfdbe47..607ed8dab3 100644 --- a/jscomp/test/chain_code_test.js +++ b/jscomp/test/chain_code_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/chn_test.js b/jscomp/test/chn_test.js index b08d24631c..c35dfd983c 100644 --- a/jscomp/test/chn_test.js +++ b/jscomp/test/chn_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/compare_test.js b/jscomp/test/compare_test.js index d6168a7567..b66416d084 100644 --- a/jscomp/test/compare_test.js +++ b/jscomp/test/compare_test.js @@ -3,42 +3,42 @@ function compare(x, y) { switch (x) { - case /* A */0 : - return y === /* A */0; - case /* B */1 : - return y === /* B */1; - case /* C */2 : - return y === /* C */2; + case "A" : + return y === "A"; + case "B" : + return y === "B"; + case "C" : + return y === "C"; } } function compare2(x, y) { switch (x) { - case /* A */0 : + case "A" : switch (y) { - case /* A */0 : + case "A" : return true; - case /* B */1 : - case /* C */2 : + case "B" : + case "C" : return false; } - case /* B */1 : + case "B" : switch (y) { - case /* B */1 : + case "B" : return true; - case /* A */0 : - case /* C */2 : + case "A" : + case "C" : return false; } - case /* C */2 : + case "C" : switch (y) { - case /* A */0 : - case /* B */1 : + case "A" : + case "B" : return false; - case /* C */2 : + case "C" : return true; } diff --git a/jscomp/test/complex_if_test.js b/jscomp/test/complex_if_test.js index 09a610c8cb..48f2894311 100644 --- a/jscomp/test/complex_if_test.js +++ b/jscomp/test/complex_if_test.js @@ -125,7 +125,7 @@ var suites_0 = [ "complete_escape", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Bytes.to_string(escaped(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" }; diff --git a/jscomp/test/complex_test.js b/jscomp/test/complex_test.js index 5f7f98ed6e..824decbb1c 100644 --- a/jscomp/test/complex_test.js +++ b/jscomp/test/complex_test.js @@ -7,7 +7,7 @@ var suites_0 = [ "basic_add", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { re: 2, im: 2 diff --git a/jscomp/test/condition_compilation_test.js b/jscomp/test/condition_compilation_test.js index 6bef8d12b5..5ccc2cfb13 100644 --- a/jscomp/test/condition_compilation_test.js +++ b/jscomp/test/condition_compilation_test.js @@ -25,7 +25,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/const_block_test.js b/jscomp/test/const_block_test.js index 50d419e131..53ade22a08 100644 --- a/jscomp/test/const_block_test.js +++ b/jscomp/test/const_block_test.js @@ -36,7 +36,7 @@ function h(param) { function g(param) { f(undefined); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ Caml_array.get(a, 0), Caml_array.get(b, 0) @@ -60,7 +60,7 @@ var suites_1 = { Caml_array.set(c, 0, 3); Caml_array.set(c, 1, 4); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 3, 4, diff --git a/jscomp/test/const_test.js b/jscomp/test/const_test.js index 707632ab59..a0ab6df38e 100644 --- a/jscomp/test/const_test.js +++ b/jscomp/test/const_test.js @@ -11,15 +11,15 @@ function ff(x) { function fff(x) { var x$1 = { - TAG: /* A */0, + TAG: "A", _0: x }; - switch (x$1.TAG | 0) { - case /* A */0 : + switch (x$1.TAG) { + case "A" : return x; - case /* B */1 : + case "B" : return 1; - case /* C */2 : + case "C" : return 2; } diff --git a/jscomp/test/cps_test.js b/jscomp/test/cps_test.js index f4827f4720..43d895659d 100644 --- a/jscomp/test/cps_test.js +++ b/jscomp/test/cps_test.js @@ -78,7 +78,7 @@ Mt.from_pair_suites("Cps_test", { "cps_test_sum", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 55, _1: test(undefined) }; @@ -89,7 +89,7 @@ Mt.from_pair_suites("Cps_test", { "cps_test_closure", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 15, _1: test_closure(undefined) }; @@ -100,7 +100,7 @@ Mt.from_pair_suites("Cps_test", { "cps_test_closure2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 30, _1: test_closure2(undefined) }; diff --git a/jscomp/test/debug_mode_value.js b/jscomp/test/debug_mode_value.js index 1d00ec559c..75e10167b2 100644 --- a/jscomp/test/debug_mode_value.js +++ b/jscomp/test/debug_mode_value.js @@ -2,6 +2,7 @@ var u = { + TAG: "A", _0: 1, _1: 2, [Symbol.for("name")]: "A" diff --git a/jscomp/test/defunctor_make_test.js b/jscomp/test/defunctor_make_test.js index 59df578281..12d0b76fc6 100644 --- a/jscomp/test/defunctor_make_test.js +++ b/jscomp/test/defunctor_make_test.js @@ -16,7 +16,7 @@ var Comparable = { }; function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param._4; @@ -26,7 +26,8 @@ function height(param) { function create(l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -37,11 +38,11 @@ function create(l, x, d, r) { function bal(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l._4; + hl = typeof l !== "object" ? 0 : l._4; var hr; - hr = /* tag */typeof r === "number" ? 0 : r._4; + hr = typeof r !== "object" ? 0 : r._4; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -55,7 +56,7 @@ function bal(l, x, d, r) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw { @@ -65,7 +66,8 @@ function bal(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -73,7 +75,7 @@ function bal(l, x, d, r) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -87,7 +89,7 @@ function bal(l, x, d, r) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw { @@ -98,12 +100,13 @@ function bal(l, x, d, r) { } function add(x, data, compare, param) { - if (/* tag */typeof param === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof param !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, _2: data, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } @@ -113,7 +116,8 @@ function add(x, data, compare, param) { var l = param._0; var c = compare(x, v); if (c === 0) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: data, @@ -138,7 +142,7 @@ function add$1(x, data, v) { function empty(v) { return { compare: v, - data: /* Empty */0 + data: "Empty" }; } @@ -156,12 +160,12 @@ var V1 = { var v0 = { compare: V0, - data: /* Empty */0 + data: "Empty" }; var v1 = { compare: V1, - data: /* Empty */0 + data: "Empty" }; var v3 = add$1(3, "a", v0); diff --git a/jscomp/test/demo_int_map.js b/jscomp/test/demo_int_map.js index 5be0b06730..9480d86069 100644 --- a/jscomp/test/demo_int_map.js +++ b/jscomp/test/demo_int_map.js @@ -2,7 +2,7 @@ function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param.h; @@ -12,7 +12,8 @@ function height(param) { function create(l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: d, @@ -23,11 +24,11 @@ function create(l, x, d, r) { function bal(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; + hr = typeof r !== "object" ? 0 : r.h; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -41,7 +42,7 @@ function bal(l, x, d, r) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw { @@ -51,7 +52,8 @@ function bal(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: d, @@ -59,7 +61,7 @@ function bal(l, x, d, r) { h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -73,7 +75,7 @@ function bal(l, x, d, r) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw { @@ -84,12 +86,13 @@ function bal(l, x, d, r) { } function add(x, data, m) { - if (/* tag */typeof m === "number") { - return /* Node */{ - l: /* Empty */0, + if (typeof m !== "object") { + return { + TAG: "Node", + l: "Empty", v: x, d: data, - r: /* Empty */0, + r: "Empty", h: 1 }; } @@ -102,7 +105,8 @@ function add(x, data, m) { if (d === data) { return m; } else { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: data, @@ -130,7 +134,7 @@ function add(x, data, m) { function find(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -146,7 +150,7 @@ function find(x, _param) { } function test(param) { - var m = /* Empty */0; + var m = "Empty"; for(var i = 0; i <= 1000000; ++i){ m = add(i, i, m); } diff --git a/jscomp/test/demo_page.js b/jscomp/test/demo_page.js index 6cce5b607e..d100c75bb8 100644 --- a/jscomp/test/demo_page.js +++ b/jscomp/test/demo_page.js @@ -21,10 +21,11 @@ function sum(n) { } function map(f, param) { - if (/* tag */typeof param === "number") { - return /* Nil */0; + if (typeof param !== "object") { + return "Nil"; } else { - return /* Cons */{ + return { + TAG: "Cons", _0: Curry._1(f, param._0), _1: map(f, param._1) }; diff --git a/jscomp/test/derive_projector_test.js b/jscomp/test/derive_projector_test.js index 6f08d20a43..457e6b0ca5 100644 --- a/jscomp/test/derive_projector_test.js +++ b/jscomp/test/derive_projector_test.js @@ -15,14 +15,14 @@ function c_x(param) { function d_int(param_0) { return { - TAG: /* D_int */0, + TAG: "D_int", _0: param_0 }; } function d_tuple(param_0, param_1) { return { - TAG: /* D_tuple */1, + TAG: "D_tuple", _0: param_0, _1: param_1 }; @@ -30,14 +30,14 @@ function d_tuple(param_0, param_1) { function newContent(param_0) { return { - TAG: /* NewContent */2, + TAG: "NewContent", _0: param_0 }; } function d_tweak(param_0) { return { - TAG: /* D_tweak */3, + TAG: "D_tweak", _0: param_0 }; } @@ -51,24 +51,24 @@ function d(param) { } var v = { - TAG: /* D_int */0, + TAG: "D_int", _0: 3 }; var h_1 = { hd: { - TAG: /* D_int */0, + TAG: "D_int", _0: 3 }, tl: { hd: { - TAG: /* D_tuple */1, + TAG: "D_tuple", _0: 3, _1: "hgo" }, tl: { hd: { - TAG: /* D_tweak */3, + TAG: "D_tweak", _0: [ 3, "hgo" @@ -76,7 +76,7 @@ var h_1 = { }, tl: { hd: { - TAG: /* NewContent */2, + TAG: "NewContent", _0: "3" }, tl: /* [] */0 @@ -86,25 +86,27 @@ var h_1 = { }; var h = { - hd: /* D_empty */0, + hd: "D_empty", tl: h_1 }; function xx(param_0) { - return /* Xx */{ + return { + TAG: "Xx", _0: param_0 }; } function a(param_0) { - return /* A */{ + return { + TAG: "A", _0: param_0 }; } -var d_empty = /* D_empty */0; +var d_empty = "D_empty"; -var hei = /* Hei */0; +var hei = "Hei"; exports.u_x = u_x; exports.b_x = b_x; diff --git a/jscomp/test/digest_test.js b/jscomp/test/digest_test.js index a7f2ed23e8..35efcb0d25 100644 --- a/jscomp/test/digest_test.js +++ b/jscomp/test/digest_test.js @@ -149,7 +149,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ "File \"digest_test.ml\", line 6, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(Digest.string("value")), _1: "2063c1608d6e0baf80249c42e2be5804" }; @@ -160,7 +160,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ "File \"digest_test.ml\", line 7, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(Digest.string("The quick brown fox jumps over the lazy dog")), _1: "9e107d9d372bb6826bd81d3542a419d6" }; @@ -171,7 +171,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ "File \"digest_test.ml\", line 9, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(Digest.string("The quick brown fox jumps over the lazy dog.")), _1: "e4d909c290d0fb1ca068ffaddf22cbd0" }; @@ -182,7 +182,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ "File \"digest_test.ml\", line 11, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(Digest.string("")), _1: "d41d8cd98f00b204e9800998ecf8427e" }; @@ -193,7 +193,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ "File \"digest_test.ml\", line 12, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(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" }; @@ -204,7 +204,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ "File \"digest_test.ml\", line 13, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(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" }; @@ -221,7 +221,7 @@ Mt.from_pair_suites("Digest_test", Pervasives.$at({ String(i), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Digest.to_hex(Digest.string("a".repeat(i))), _1: Caml_array.get(ref, i) }; diff --git a/jscomp/test/div_by_zero_test.js b/jscomp/test/div_by_zero_test.js index c4d3b80ddd..94b0a57885 100644 --- a/jscomp/test/div_by_zero_test.js +++ b/jscomp/test/div_by_zero_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -40,7 +40,7 @@ add([ "File \"div_by_zero_test.ml\", line 14, characters 7-14", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_int32.div(3, 0); }) @@ -52,7 +52,7 @@ add([ "File \"div_by_zero_test.ml\", line 15, characters 7-14", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_int32.mod_(3, 0); }) @@ -64,7 +64,7 @@ add([ "File \"div_by_zero_test.ml\", line 16, characters 7-14", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_int32.div(3, 0); }) @@ -76,7 +76,7 @@ add([ "File \"div_by_zero_test.ml\", line 17, characters 7-14", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_int32.mod_(3, 0); }) @@ -88,7 +88,7 @@ add([ "File \"div_by_zero_test.ml\", line 18, characters 7-14", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_int64.div([ 0, @@ -103,7 +103,7 @@ add([ "File \"div_by_zero_test.ml\", line 19, characters 7-14", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { Caml_int64.mod_([ 0, diff --git a/jscomp/test/dollar_escape_test.js b/jscomp/test/dollar_escape_test.js index 25f5122e12..a58f39d9b8 100644 --- a/jscomp/test/dollar_escape_test.js +++ b/jscomp/test/dollar_escape_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/earger_curry_test.js b/jscomp/test/earger_curry_test.js index 36cd0fbf39..43b22bfb03 100644 --- a/jscomp/test/earger_curry_test.js +++ b/jscomp/test/earger_curry_test.js @@ -76,7 +76,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/epsilon_test.js b/jscomp/test/epsilon_test.js index df9f8119ab..8ec0602a58 100644 --- a/jscomp/test/epsilon_test.js +++ b/jscomp/test/epsilon_test.js @@ -9,7 +9,7 @@ var suites_0 = [ "epsilon", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Pervasives.epsilon_float, _1: v }; @@ -21,7 +21,7 @@ var suites_1 = { "raw_epsilon", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2.220446049250313e-16, _1: v }; diff --git a/jscomp/test/es6_module_test.js b/jscomp/test/es6_module_test.js index 80195aaa0e..204b8acbb4 100644 --- a/jscomp/test/es6_module_test.js +++ b/jscomp/test/es6_module_test.js @@ -12,7 +12,7 @@ Mt.from_pair_suites("Es6_module_test", { "list_length", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: List.length({ hd: 1, tl: { @@ -29,7 +29,7 @@ Mt.from_pair_suites("Es6_module_test", { "length", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: 3 }; diff --git a/jscomp/test/exception_raise_test.js b/jscomp/test/exception_raise_test.js index 6b9d4599d4..3d3ee7f02f 100644 --- a/jscomp/test/exception_raise_test.js +++ b/jscomp/test/exception_raise_test.js @@ -135,7 +135,7 @@ var suites = { "File \"exception_raise_test.ml\", line 114, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ f, ff, @@ -157,7 +157,7 @@ var suites = { (function (param) { if (a1.RE_EXN_ID === Js_exn.$$Error) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a1._1, _1: 2 }; diff --git a/jscomp/test/exception_rebound_err_test.js b/jscomp/test/exception_rebound_err_test.js index c23a8b33fa..f66fbe40e0 100644 --- a/jscomp/test/exception_rebound_err_test.js +++ b/jscomp/test/exception_rebound_err_test.js @@ -20,7 +20,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/ext_string_test.js b/jscomp/test/ext_string_test.js index e6ff377110..ee11813b24 100644 --- a/jscomp/test/ext_string_test.js +++ b/jscomp/test/ext_string_test.js @@ -505,12 +505,12 @@ function is_valid_source_name(name) { }); if (x !== undefined) { if (is_valid_module_file(x)) { - return /* Good */0; + return "Good"; } else { - return /* Invalid_module_name */1; + return "Invalid_module_name"; } } else { - return /* Suffix_mismatch */2; + return "Suffix_mismatch"; } } diff --git a/jscomp/test/extensible_variant_test.js b/jscomp/test/extensible_variant_test.js index 99f2a288bb..5174a45eae 100644 --- a/jscomp/test/extensible_variant_test.js +++ b/jscomp/test/extensible_variant_test.js @@ -38,7 +38,7 @@ var suites_0 = [ "test_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: to_int({ RE_EXN_ID: Int, @@ -54,7 +54,7 @@ var suites_1 = { "test_int2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 0, _1: to_int({ RE_EXN_ID: Int$1, @@ -69,7 +69,7 @@ var suites_1 = { "test_string", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -1, _1: to_int({ RE_EXN_ID: Str, diff --git a/jscomp/test/ffi_arity_test.js b/jscomp/test/ffi_arity_test.js index 17b93b1a08..4a46e8d4b4 100644 --- a/jscomp/test/ffi_arity_test.js +++ b/jscomp/test/ffi_arity_test.js @@ -72,7 +72,7 @@ Mt.from_pair_suites("Ffi_arity_test", { "File \"ffi_arity_test.ml\", line 45, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: v, _1: [ 0, @@ -87,7 +87,7 @@ Mt.from_pair_suites("Ffi_arity_test", { "File \"ffi_arity_test.ml\", line 46, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: vv, _1: [ 1, @@ -102,7 +102,7 @@ Mt.from_pair_suites("Ffi_arity_test", { "File \"ffi_arity_test.ml\", line 47, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: hh, _1: [ 1, diff --git a/jscomp/test/ffi_array_test.js b/jscomp/test/ffi_array_test.js index 49fd46df84..1287be811b 100644 --- a/jscomp/test/ffi_array_test.js +++ b/jscomp/test/ffi_array_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/ffi_js_test.js b/jscomp/test/ffi_js_test.js index 6a5ee1a859..ceb5788d16 100644 --- a/jscomp/test/ffi_js_test.js +++ b/jscomp/test/ffi_js_test.js @@ -28,7 +28,7 @@ function eq(loc, param) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -94,7 +94,7 @@ var u = { contents: 3 }; -var side_effect_config = (u.contents = u.contents + 1 | 0, { +var side_effect_config = (u.contents = u.contents + 1 | 0, "Int", { hi: 3, low: 32 }); diff --git a/jscomp/test/ffi_splice_test.js b/jscomp/test/ffi_splice_test.js index e8d75dfe5b..d11509bb51 100644 --- a/jscomp/test/ffi_splice_test.js +++ b/jscomp/test/ffi_splice_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/flexible_array_test.js b/jscomp/test/flexible_array_test.js index fcee2d0ab1..c8e968b4e5 100644 --- a/jscomp/test/flexible_array_test.js +++ b/jscomp/test/flexible_array_test.js @@ -9,7 +9,7 @@ function sub(_tr, _k) { while(true) { var k = _k; var tr = _tr; - if (/* tag */typeof tr === "number") { + if (typeof tr !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -30,12 +30,13 @@ function sub(_tr, _k) { } function update(tr, k, w) { - if (/* tag */typeof tr === "number") { + if (typeof tr !== "object") { if (k === 1) { - return /* Br */{ + return { + TAG: "Br", _0: w, - _1: /* Lf */0, - _2: /* Lf */0 + _1: "Lf", + _2: "Lf" }; } throw { @@ -46,7 +47,8 @@ function update(tr, k, w) { var r = tr._2; var l = tr._1; if (k === 1) { - return /* Br */{ + return { + TAG: "Br", _0: w, _1: l, _2: r @@ -54,13 +56,15 @@ function update(tr, k, w) { } var v = tr._0; if (k % 2 === 0) { - return /* Br */{ + return { + TAG: "Br", _0: v, _1: update(l, k / 2 | 0, w), _2: r }; } else { - return /* Br */{ + return { + TAG: "Br", _0: v, _1: l, _2: update(r, k / 2 | 0, w) @@ -69,26 +73,28 @@ function update(tr, k, w) { } function $$delete(tr, n) { - if (/* tag */typeof tr === "number") { + if (typeof tr !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } if (n === 1) { - return /* Lf */0; + return "Lf"; } var r = tr._2; var l = tr._1; var v = tr._0; if (n % 2 === 0) { - return /* Br */{ + return { + TAG: "Br", _0: v, _1: $$delete(l, n / 2 | 0), _2: r }; } else { - return /* Br */{ + return { + TAG: "Br", _0: v, _1: l, _2: $$delete(r, n / 2 | 0) @@ -97,14 +103,16 @@ function $$delete(tr, n) { } function loext(tr, w) { - if (/* tag */typeof tr === "number") { - return /* Br */{ + if (typeof tr !== "object") { + return { + TAG: "Br", _0: w, - _1: /* Lf */0, - _2: /* Lf */0 + _1: "Lf", + _2: "Lf" }; } else { - return /* Br */{ + return { + TAG: "Br", _0: w, _1: loext(tr._2, tr._0), _2: tr._1 @@ -113,23 +121,24 @@ function loext(tr, w) { } function lorem(tr) { - if (/* tag */typeof tr === "number") { + if (typeof tr !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var l = tr._1; - if (/* tag */typeof l !== "number") { - return /* Br */{ + if (typeof l === "object") { + return { + TAG: "Br", _0: l._0, _1: tr._2, _2: lorem(l) }; } var tmp = tr._2; - if (/* tag */typeof tmp === "number") { - return /* Lf */0; + if (typeof tmp !== "object") { + return "Lf"; } throw { RE_EXN_ID: "Assert_failure", @@ -143,7 +152,7 @@ function lorem(tr) { } var empty = [ - /* Lf */0, + "Lf", 0 ]; diff --git a/jscomp/test/float_of_bits_test.js b/jscomp/test/float_of_bits_test.js index bd6bd426a4..5774ad62d2 100644 --- a/jscomp/test/float_of_bits_test.js +++ b/jscomp/test/float_of_bits_test.js @@ -32,7 +32,7 @@ function from_pairs(pair) { "int32_float_of_bits " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_float.int_float_of_bits(i32), _1: f }; @@ -43,7 +43,7 @@ function from_pairs(pair) { "int32_bits_of_float " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_float.int_bits_of_float(f), _1: i32 }; @@ -60,7 +60,7 @@ var suites = Pervasives.$at({ "one", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.bits_of_float(1.0), _1: one_float }; @@ -71,7 +71,7 @@ var suites = Pervasives.$at({ "two", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.float_of_bits(one_float), _1: 1.0 }; diff --git a/jscomp/test/float_test.js b/jscomp/test/float_test.js index 624beb360c..277cd91d1b 100644 --- a/jscomp/test/float_test.js +++ b/jscomp/test/float_test.js @@ -128,7 +128,7 @@ function from_pairs(ps) { "pair " + i, (function (param) { return { - TAG: /* Approx */5, + TAG: "Approx", _0: a, _1: b }; @@ -177,7 +177,7 @@ function float_greaterequal(x, y) { var generic_greaterequal = Caml_obj.greaterequal; -Mt_global.collect_eq(test_id, suites, "File \"float_test.ml\", line 60, characters 5-12", Pervasives.classify_float(3), /* FP_normal */0); +Mt_global.collect_eq(test_id, suites, "File \"float_test.ml\", line 60, characters 5-12", Pervasives.classify_float(3), "FP_normal"); Mt_global.collect_eq(test_id, suites, "File \"float_test.ml\", line 61, characters 5-12", Caml_float.modf_float(-3.125), [ -0.125, @@ -330,7 +330,7 @@ Mt.from_pair_suites("Float_test", Pervasives.$at({ "mod_float", (function (param) { return { - TAG: /* Approx */5, + TAG: "Approx", _0: 3.2 % 0.5, _1: 0.200000000000000178 }; @@ -341,7 +341,7 @@ Mt.from_pair_suites("Float_test", Pervasives.$at({ "modf_float1", (function (param) { return { - TAG: /* Approx */5, + TAG: "Approx", _0: a, _1: 0.299999999999997158 }; @@ -352,7 +352,7 @@ Mt.from_pair_suites("Float_test", Pervasives.$at({ "modf_float2", (function (param) { return { - TAG: /* Approx */5, + TAG: "Approx", _0: b, _1: 32 }; @@ -363,7 +363,7 @@ Mt.from_pair_suites("Float_test", Pervasives.$at({ "int_of_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: 3 }; diff --git a/jscomp/test/flow_parser_reg_test.js b/jscomp/test/flow_parser_reg_test.js index 25a2a439d3..1e32935ee4 100644 --- a/jscomp/test/flow_parser_reg_test.js +++ b/jscomp/test/flow_parser_reg_test.js @@ -84,7 +84,7 @@ function btwn_exclusive(loc1, loc2) { } function string_of_filename(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return "(global)"; } else { return param._0; @@ -92,14 +92,14 @@ function string_of_filename(param) { } function order_of_filename(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 1; } - switch (param.TAG | 0) { - case /* LibFile */0 : + switch (param.TAG) { + case "LibFile" : return 2; - case /* SourceFile */1 : - case /* JsonFile */2 : + case "SourceFile" : + case "JsonFile" : return 3; } @@ -154,10 +154,10 @@ var Literal = Caml_module.init_mod([ 44, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "RegExp" @@ -169,14 +169,14 @@ var Type = Caml_module.init_mod([ 191, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Param" @@ -186,25 +186,25 @@ var Type = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Indexer" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "CallProperty" @@ -215,10 +215,10 @@ var Type = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Identifier" @@ -228,34 +228,34 @@ var Type = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "StringLiteral" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "NumberLiteral" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "BooleanLiteral" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Variance" @@ -268,7 +268,7 @@ var Type = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ParameterInstantiation" @@ -281,63 +281,63 @@ var Statement = Caml_module.init_mod([ 493, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Block" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "If" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Labeled" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Break" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Continue" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "With" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "TypeAlias" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Case" @@ -347,24 +347,24 @@ var Statement = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Return" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Throw" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "CatchClause" @@ -374,10 +374,10 @@ var Statement = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Declarator" @@ -387,80 +387,80 @@ var Statement = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "While" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DoWhile" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "For" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ForIn" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ForOf" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Let" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Interface" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareVariable" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareFunction" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareModule" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Specifier" @@ -470,17 +470,17 @@ var Statement = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareExportDeclaration" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "NamedSpecifier" @@ -490,7 +490,7 @@ var Statement = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Expression" @@ -503,28 +503,28 @@ var Expression = Caml_module.init_mod([ 758, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadElement" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Array" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Element" @@ -534,25 +534,25 @@ var Expression = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "TaggedTemplate" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadProperty" @@ -563,87 +563,87 @@ var Expression = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Sequence" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Unary" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Binary" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Assignment" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Update" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Logical" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Conditional" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "New" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Call" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Member" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Yield" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Block" @@ -653,21 +653,21 @@ var Expression = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Generator" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Let" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "TypeCast" @@ -680,67 +680,67 @@ var JSX = Caml_module.init_mod([ 861, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Identifier" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "NamespacedName" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ExpressionContainer" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Text" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Attribute" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadAttribute" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "MemberExpression" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Opening" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Closing" @@ -753,22 +753,22 @@ var Pattern = Caml_module.init_mod([ 919, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadProperty" @@ -779,10 +779,10 @@ var Pattern = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadElement" @@ -792,7 +792,7 @@ var Pattern = Caml_module.init_mod([ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Assignment" @@ -805,32 +805,32 @@ var Class = Caml_module.init_mod([ 978, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Method" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Implements" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Body" @@ -839,10 +839,10 @@ var Class = Caml_module.init_mod([ }); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "RegExp" @@ -850,14 +850,14 @@ Caml_module.update_mod({ }, Literal, Literal); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Param" @@ -867,25 +867,25 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Indexer" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "CallProperty" @@ -896,10 +896,10 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Identifier" @@ -909,34 +909,34 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "StringLiteral" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "NumberLiteral" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "BooleanLiteral" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Variance" @@ -949,7 +949,7 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ParameterInstantiation" @@ -958,63 +958,63 @@ Caml_module.update_mod({ }, Type, Type); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Block" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "If" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Labeled" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Break" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Continue" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "With" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "TypeAlias" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Case" @@ -1024,24 +1024,24 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Return" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Throw" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "CatchClause" @@ -1051,10 +1051,10 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Declarator" @@ -1064,80 +1064,80 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "While" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DoWhile" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "For" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ForIn" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ForOf" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Let" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Interface" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareVariable" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareFunction" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareModule" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Specifier" @@ -1147,17 +1147,17 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "DeclareExportDeclaration" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "NamedSpecifier" @@ -1167,7 +1167,7 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Expression" @@ -1176,28 +1176,28 @@ Caml_module.update_mod({ }, Statement, Statement); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadElement" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Array" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Element" @@ -1207,25 +1207,25 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "TaggedTemplate" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadProperty" @@ -1236,87 +1236,87 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Sequence" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Unary" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Binary" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Assignment" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Update" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Logical" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Conditional" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "New" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Call" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Member" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Yield" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Block" @@ -1326,21 +1326,21 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Generator" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Let" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "TypeCast" @@ -1349,67 +1349,67 @@ Caml_module.update_mod({ }, Expression, Expression); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Identifier" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "NamespacedName" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "ExpressionContainer" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Text" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Attribute" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadAttribute" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "MemberExpression" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Opening" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Closing" @@ -1418,22 +1418,22 @@ Caml_module.update_mod({ }, JSX, JSX); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadProperty" @@ -1444,10 +1444,10 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [[ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "SpreadElement" @@ -1457,7 +1457,7 @@ Caml_module.update_mod({ ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Assignment" @@ -1466,32 +1466,32 @@ Caml_module.update_mod({ }, Pattern, Pattern); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Method" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Property" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Implements" ], [ { - TAG: /* Module */0, + TAG: "Module", _0: [] }, "Body" @@ -1500,247 +1500,247 @@ Caml_module.update_mod({ }, Class, Class); function token_to_string(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { switch (param) { - case /* T_IDENTIFIER */0 : + case "T_IDENTIFIER" : return "T_IDENTIFIER"; - case /* T_LCURLY */1 : + case "T_LCURLY" : return "T_LCURLY"; - case /* T_RCURLY */2 : + case "T_RCURLY" : return "T_RCURLY"; - case /* T_LPAREN */3 : + case "T_LPAREN" : return "T_LPAREN"; - case /* T_RPAREN */4 : + case "T_RPAREN" : return "T_RPAREN"; - case /* T_LBRACKET */5 : + case "T_LBRACKET" : return "T_LBRACKET"; - case /* T_RBRACKET */6 : + case "T_RBRACKET" : return "T_RBRACKET"; - case /* T_SEMICOLON */7 : + case "T_SEMICOLON" : return "T_SEMICOLON"; - case /* T_COMMA */8 : + case "T_COMMA" : return "T_COMMA"; - case /* T_PERIOD */9 : + case "T_PERIOD" : return "T_PERIOD"; - case /* T_ARROW */10 : + case "T_ARROW" : return "T_ARROW"; - case /* T_ELLIPSIS */11 : + case "T_ELLIPSIS" : return "T_ELLIPSIS"; - case /* T_AT */12 : + case "T_AT" : return "T_AT"; - case /* T_FUNCTION */13 : + case "T_FUNCTION" : return "T_FUNCTION"; - case /* T_IF */14 : + case "T_IF" : return "T_IF"; - case /* T_IN */15 : + case "T_IN" : return "T_IN"; - case /* T_INSTANCEOF */16 : + case "T_INSTANCEOF" : return "T_INSTANCEOF"; - case /* T_RETURN */17 : + case "T_RETURN" : return "T_RETURN"; - case /* T_SWITCH */18 : + case "T_SWITCH" : return "T_SWITCH"; - case /* T_THIS */19 : + case "T_THIS" : return "T_THIS"; - case /* T_THROW */20 : + case "T_THROW" : return "T_THROW"; - case /* T_TRY */21 : + case "T_TRY" : return "T_TRY"; - case /* T_VAR */22 : + case "T_VAR" : return "T_VAR"; - case /* T_WHILE */23 : + case "T_WHILE" : return "T_WHILE"; - case /* T_WITH */24 : + case "T_WITH" : return "T_WITH"; - case /* T_CONST */25 : + case "T_CONST" : return "T_CONST"; - case /* T_LET */26 : + case "T_LET" : return "T_LET"; - case /* T_NULL */27 : + case "T_NULL" : return "T_NULL"; - case /* T_FALSE */28 : + case "T_FALSE" : return "T_FALSE"; - case /* T_TRUE */29 : + case "T_TRUE" : return "T_TRUE"; - case /* T_BREAK */30 : + case "T_BREAK" : return "T_BREAK"; - case /* T_CASE */31 : + case "T_CASE" : return "T_CASE"; - case /* T_CATCH */32 : + case "T_CATCH" : return "T_CATCH"; - case /* T_CONTINUE */33 : + case "T_CONTINUE" : return "T_CONTINUE"; - case /* T_DEFAULT */34 : + case "T_DEFAULT" : return "T_DEFAULT"; - case /* T_DO */35 : + case "T_DO" : return "T_DO"; - case /* T_FINALLY */36 : + case "T_FINALLY" : return "T_FINALLY"; - case /* T_FOR */37 : + case "T_FOR" : return "T_FOR"; - case /* T_CLASS */38 : + case "T_CLASS" : return "T_CLASS"; - case /* T_EXTENDS */39 : + case "T_EXTENDS" : return "T_EXTENDS"; - case /* T_STATIC */40 : + case "T_STATIC" : return "T_STATIC"; - case /* T_ELSE */41 : + case "T_ELSE" : return "T_ELSE"; - case /* T_NEW */42 : + case "T_NEW" : return "T_NEW"; - case /* T_DELETE */43 : + case "T_DELETE" : return "T_DELETE"; - case /* T_TYPEOF */44 : + case "T_TYPEOF" : return "T_TYPEOF"; - case /* T_VOID */45 : + case "T_VOID" : return "T_VOID"; - case /* T_ENUM */46 : + case "T_ENUM" : return "T_ENUM"; - case /* T_EXPORT */47 : + case "T_EXPORT" : return "T_EXPORT"; - case /* T_IMPORT */48 : + case "T_IMPORT" : return "T_IMPORT"; - case /* T_SUPER */49 : + case "T_SUPER" : return "T_SUPER"; - case /* T_IMPLEMENTS */50 : + case "T_IMPLEMENTS" : return "T_IMPLEMENTS"; - case /* T_INTERFACE */51 : + case "T_INTERFACE" : return "T_INTERFACE"; - case /* T_PACKAGE */52 : + case "T_PACKAGE" : return "T_PACKAGE"; - case /* T_PRIVATE */53 : + case "T_PRIVATE" : return "T_PRIVATE"; - case /* T_PROTECTED */54 : + case "T_PROTECTED" : return "T_PROTECTED"; - case /* T_PUBLIC */55 : + case "T_PUBLIC" : return "T_PUBLIC"; - case /* T_YIELD */56 : + case "T_YIELD" : return "T_YIELD"; - case /* T_DEBUGGER */57 : + case "T_DEBUGGER" : return "T_DEBUGGER"; - case /* T_DECLARE */58 : + case "T_DECLARE" : return "T_DECLARE"; - case /* T_TYPE */59 : + case "T_TYPE" : return "T_TYPE"; - case /* T_OF */60 : + case "T_OF" : return "T_OF"; - case /* T_ASYNC */61 : + case "T_ASYNC" : return "T_ASYNC"; - case /* T_AWAIT */62 : + case "T_AWAIT" : return "T_AWAIT"; - case /* T_RSHIFT3_ASSIGN */63 : + case "T_RSHIFT3_ASSIGN" : return "T_RSHIFT3_ASSIGN"; - case /* T_RSHIFT_ASSIGN */64 : + case "T_RSHIFT_ASSIGN" : return "T_RSHIFT_ASSIGN"; - case /* T_LSHIFT_ASSIGN */65 : + case "T_LSHIFT_ASSIGN" : return "T_LSHIFT_ASSIGN"; - case /* T_BIT_XOR_ASSIGN */66 : + case "T_BIT_XOR_ASSIGN" : return "T_BIT_XOR_ASSIGN"; - case /* T_BIT_OR_ASSIGN */67 : + case "T_BIT_OR_ASSIGN" : return "T_BIT_OR_ASSIGN"; - case /* T_BIT_AND_ASSIGN */68 : + case "T_BIT_AND_ASSIGN" : return "T_BIT_AND_ASSIGN"; - case /* T_MOD_ASSIGN */69 : + case "T_MOD_ASSIGN" : return "T_MOD_ASSIGN"; - case /* T_DIV_ASSIGN */70 : + case "T_DIV_ASSIGN" : return "T_DIV_ASSIGN"; - case /* T_MULT_ASSIGN */71 : + case "T_MULT_ASSIGN" : return "T_MULT_ASSIGN"; - case /* T_EXP_ASSIGN */72 : + case "T_EXP_ASSIGN" : return "T_EXP_ASSIGN"; - case /* T_MINUS_ASSIGN */73 : + case "T_MINUS_ASSIGN" : return "T_MINUS_ASSIGN"; - case /* T_PLUS_ASSIGN */74 : + case "T_PLUS_ASSIGN" : return "T_PLUS_ASSIGN"; - case /* T_ASSIGN */75 : + case "T_ASSIGN" : return "T_ASSIGN"; - case /* T_PLING */76 : + case "T_PLING" : return "T_PLING"; - case /* T_COLON */77 : + case "T_COLON" : return "T_COLON"; - case /* T_OR */78 : + case "T_OR" : return "T_OR"; - case /* T_AND */79 : + case "T_AND" : return "T_AND"; - case /* T_BIT_OR */80 : + case "T_BIT_OR" : return "T_BIT_OR"; - case /* T_BIT_XOR */81 : + case "T_BIT_XOR" : return "T_BIT_XOR"; - case /* T_BIT_AND */82 : + case "T_BIT_AND" : return "T_BIT_AND"; - case /* T_EQUAL */83 : + case "T_EQUAL" : return "T_EQUAL"; - case /* T_NOT_EQUAL */84 : + case "T_NOT_EQUAL" : return "T_NOT_EQUAL"; - case /* T_STRICT_EQUAL */85 : + case "T_STRICT_EQUAL" : return "T_STRICT_EQUAL"; - case /* T_STRICT_NOT_EQUAL */86 : + case "T_STRICT_NOT_EQUAL" : return "T_STRICT_NOT_EQUAL"; - case /* T_LESS_THAN_EQUAL */87 : + case "T_LESS_THAN_EQUAL" : return "T_LESS_THAN_EQUAL"; - case /* T_GREATER_THAN_EQUAL */88 : + case "T_GREATER_THAN_EQUAL" : return "T_GREATER_THAN_EQUAL"; - case /* T_LESS_THAN */89 : + case "T_LESS_THAN" : return "T_LESS_THAN"; - case /* T_GREATER_THAN */90 : + case "T_GREATER_THAN" : return "T_GREATER_THAN"; - case /* T_LSHIFT */91 : + case "T_LSHIFT" : return "T_LSHIFT"; - case /* T_RSHIFT */92 : + case "T_RSHIFT" : return "T_RSHIFT"; - case /* T_RSHIFT3 */93 : + case "T_RSHIFT3" : return "T_RSHIFT3"; - case /* T_PLUS */94 : + case "T_PLUS" : return "T_PLUS"; - case /* T_MINUS */95 : + case "T_MINUS" : return "T_MINUS"; - case /* T_DIV */96 : + case "T_DIV" : return "T_DIV"; - case /* T_MULT */97 : + case "T_MULT" : return "T_MULT"; - case /* T_EXP */98 : + case "T_EXP" : return "T_EXP"; - case /* T_MOD */99 : + case "T_MOD" : return "T_MOD"; - case /* T_NOT */100 : + case "T_NOT" : return "T_NOT"; - case /* T_BIT_NOT */101 : + case "T_BIT_NOT" : return "T_BIT_NOT"; - case /* T_INCR */102 : + case "T_INCR" : return "T_INCR"; - case /* T_DECR */103 : + case "T_DECR" : return "T_DECR"; - case /* T_ERROR */104 : + case "T_ERROR" : return "T_ERROR"; - case /* T_EOF */105 : + case "T_EOF" : return "T_EOF"; - case /* T_JSX_IDENTIFIER */106 : + case "T_JSX_IDENTIFIER" : return "T_JSX_IDENTIFIER"; - case /* T_ANY_TYPE */107 : + case "T_ANY_TYPE" : return "T_ANY_TYPE"; - case /* T_BOOLEAN_TYPE */108 : + case "T_BOOLEAN_TYPE" : return "T_BOOLEAN_TYPE"; - case /* T_NUMBER_TYPE */109 : + case "T_NUMBER_TYPE" : return "T_NUMBER_TYPE"; - case /* T_STRING_TYPE */110 : + case "T_STRING_TYPE" : return "T_STRING_TYPE"; - case /* T_VOID_TYPE */111 : + case "T_VOID_TYPE" : return "T_VOID_TYPE"; } } else { - switch (param.TAG | 0) { - case /* T_NUMBER */0 : + switch (param.TAG) { + case "T_NUMBER" : return "T_NUMBER"; - case /* T_STRING */1 : + case "T_STRING" : return "T_STRING"; - case /* T_TEMPLATE_PART */2 : + case "T_TEMPLATE_PART" : return "T_TEMPLATE_PART"; - case /* T_REGEXP */3 : + case "T_REGEXP" : return "T_REGEXP"; - case /* T_JSX_TEXT */4 : + case "T_JSX_TEXT" : return "T_JSX_TEXT"; - case /* T_NUMBER_SINGLETON_TYPE */5 : + case "T_NUMBER_SINGLETON_TYPE" : return "T_NUMBER_SINGLETON_TYPE"; } @@ -1824,26 +1824,26 @@ function get_result_and_clear_state(param) { var env = match[0]; var match$1; var exit = 0; - if (/* tag */typeof lex_token === "number") { + if (typeof lex_token !== "object") { exit = 2; } else { - switch (lex_token.TAG | 0) { - case /* T_TEMPLATE_PART */2 : + switch (lex_token.TAG) { + case "T_TEMPLATE_PART" : var match$2 = lex_token._0; match$1 = [ match$2[0], match$2[1].literal ]; break; - case /* T_REGEXP */3 : + case "T_REGEXP" : var match$3 = lex_token._0; match$1 = [ match$3[0], "/" + (match$3[1] + ("/" + match$3[2])) ]; break; - case /* T_STRING */1 : - case /* T_JSX_TEXT */4 : + case "T_STRING" : + case "T_JSX_TEXT" : exit = 1; break; default: @@ -1903,14 +1903,14 @@ function lex_error(env, loc, err) { function unexpected_error(env, loc, value) { return lex_error(env, loc, { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: value }); } function unexpected_error_w_suggest(env, loc, value, suggest) { return lex_error(env, loc, { - TAG: /* UnexpectedTokenWithSuggestion */2, + TAG: "UnexpectedTokenWithSuggestion", _0: value, _1: suggest }); @@ -1920,7 +1920,7 @@ function illegal_number(env, lexbuf, word, token) { var loc = from_lb(env.lex_source, lexbuf); yyback(word.length, lexbuf); var env$1 = lex_error(env, loc, { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ @@ -2166,10 +2166,10 @@ function save_comment(env, start, _end, buf, multiline) { var loc = btwn(start, _end); var s = $$Buffer.contents(buf); var c = multiline ? ({ - TAG: /* Block */0, + TAG: "Block", _0: s }) : ({ - TAG: /* Line */1, + TAG: "Line", _0: s }); var lex_comments_acc_0 = [ @@ -2305,21 +2305,21 @@ function utf16to8(code) { function mk_num_singleton(number_type, num, neg) { var value; switch (number_type) { - case /* LEGACY_OCTAL */1 : + case "LEGACY_OCTAL" : value = Caml_format.int_of_string("0o" + num); break; - case /* BINARY */0 : - case /* OCTAL */2 : + case "BINARY" : + case "OCTAL" : value = Caml_format.int_of_string(num); break; - case /* NORMAL */3 : + case "NORMAL" : value = float_of_string(num); break; } var value$1 = neg === "" ? value : - value; return { - TAG: /* T_NUMBER_SINGLETON_TYPE */5, + TAG: "T_NUMBER_SINGLETON_TYPE", _0: number_type, _1: value$1 }; @@ -2334,252 +2334,252 @@ List.iter((function (param) { }), { hd: [ "function", - /* T_FUNCTION */13 + "T_FUNCTION" ], tl: { hd: [ "if", - /* T_IF */14 + "T_IF" ], tl: { hd: [ "in", - /* T_IN */15 + "T_IN" ], tl: { hd: [ "instanceof", - /* T_INSTANCEOF */16 + "T_INSTANCEOF" ], tl: { hd: [ "return", - /* T_RETURN */17 + "T_RETURN" ], tl: { hd: [ "switch", - /* T_SWITCH */18 + "T_SWITCH" ], tl: { hd: [ "this", - /* T_THIS */19 + "T_THIS" ], tl: { hd: [ "throw", - /* T_THROW */20 + "T_THROW" ], tl: { hd: [ "try", - /* T_TRY */21 + "T_TRY" ], tl: { hd: [ "var", - /* T_VAR */22 + "T_VAR" ], tl: { hd: [ "while", - /* T_WHILE */23 + "T_WHILE" ], tl: { hd: [ "with", - /* T_WITH */24 + "T_WITH" ], tl: { hd: [ "const", - /* T_CONST */25 + "T_CONST" ], tl: { hd: [ "let", - /* T_LET */26 + "T_LET" ], tl: { hd: [ "null", - /* T_NULL */27 + "T_NULL" ], tl: { hd: [ "false", - /* T_FALSE */28 + "T_FALSE" ], tl: { hd: [ "true", - /* T_TRUE */29 + "T_TRUE" ], tl: { hd: [ "break", - /* T_BREAK */30 + "T_BREAK" ], tl: { hd: [ "case", - /* T_CASE */31 + "T_CASE" ], tl: { hd: [ "catch", - /* T_CATCH */32 + "T_CATCH" ], tl: { hd: [ "continue", - /* T_CONTINUE */33 + "T_CONTINUE" ], tl: { hd: [ "default", - /* T_DEFAULT */34 + "T_DEFAULT" ], tl: { hd: [ "do", - /* T_DO */35 + "T_DO" ], tl: { hd: [ "finally", - /* T_FINALLY */36 + "T_FINALLY" ], tl: { hd: [ "for", - /* T_FOR */37 + "T_FOR" ], tl: { hd: [ "class", - /* T_CLASS */38 + "T_CLASS" ], tl: { hd: [ "extends", - /* T_EXTENDS */39 + "T_EXTENDS" ], tl: { hd: [ "static", - /* T_STATIC */40 + "T_STATIC" ], tl: { hd: [ "else", - /* T_ELSE */41 + "T_ELSE" ], tl: { hd: [ "new", - /* T_NEW */42 + "T_NEW" ], tl: { hd: [ "delete", - /* T_DELETE */43 + "T_DELETE" ], tl: { hd: [ "typeof", - /* T_TYPEOF */44 + "T_TYPEOF" ], tl: { hd: [ "void", - /* T_VOID */45 + "T_VOID" ], tl: { hd: [ "enum", - /* T_ENUM */46 + "T_ENUM" ], tl: { hd: [ "export", - /* T_EXPORT */47 + "T_EXPORT" ], tl: { hd: [ "import", - /* T_IMPORT */48 + "T_IMPORT" ], tl: { hd: [ "super", - /* T_SUPER */49 + "T_SUPER" ], tl: { hd: [ "implements", - /* T_IMPLEMENTS */50 + "T_IMPLEMENTS" ], tl: { hd: [ "interface", - /* T_INTERFACE */51 + "T_INTERFACE" ], tl: { hd: [ "package", - /* T_PACKAGE */52 + "T_PACKAGE" ], tl: { hd: [ "private", - /* T_PRIVATE */53 + "T_PRIVATE" ], tl: { hd: [ "protected", - /* T_PROTECTED */54 + "T_PROTECTED" ], tl: { hd: [ "public", - /* T_PUBLIC */55 + "T_PUBLIC" ], tl: { hd: [ "yield", - /* T_YIELD */56 + "T_YIELD" ], tl: { hd: [ "debugger", - /* T_DEBUGGER */57 + "T_DEBUGGER" ], tl: { hd: [ "declare", - /* T_DECLARE */58 + "T_DECLARE" ], tl: { hd: [ "type", - /* T_TYPE */59 + "T_TYPE" ], tl: { hd: [ "of", - /* T_OF */60 + "T_OF" ], tl: { hd: [ "async", - /* T_ASYNC */61 + "T_ASYNC" ], tl: { hd: [ "await", - /* T_AWAIT */62 + "T_AWAIT" ], tl: /* [] */0 } @@ -2638,57 +2638,57 @@ List.iter((function (param) { }), { hd: [ "static", - /* T_STATIC */40 + "T_STATIC" ], tl: { hd: [ "typeof", - /* T_TYPEOF */44 + "T_TYPEOF" ], tl: { hd: [ "any", - /* T_ANY_TYPE */107 + "T_ANY_TYPE" ], tl: { hd: [ "bool", - /* T_BOOLEAN_TYPE */108 + "T_BOOLEAN_TYPE" ], tl: { hd: [ "boolean", - /* T_BOOLEAN_TYPE */108 + "T_BOOLEAN_TYPE" ], tl: { hd: [ "true", - /* T_TRUE */29 + "T_TRUE" ], tl: { hd: [ "false", - /* T_FALSE */28 + "T_FALSE" ], tl: { hd: [ "number", - /* T_NUMBER_TYPE */109 + "T_NUMBER_TYPE" ], tl: { hd: [ "string", - /* T_STRING_TYPE */110 + "T_STRING_TYPE" ], tl: { hd: [ "void", - /* T_VOID_TYPE */111 + "T_VOID_TYPE" ], tl: { hd: [ "null", - /* T_NULL */27 + "T_NULL" ], tl: /* [] */0 } @@ -2729,7 +2729,7 @@ function token(env, lexbuf) { return token(env, lexbuf); case 1 : var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return token(env$1, lexbuf); @@ -2758,7 +2758,7 @@ function token(env, lexbuf) { if (escape_type === ":") { return [ env$4, - /* T_COLON */77 + "T_COLON" ]; } else { return token(env$4, lexbuf); @@ -2779,7 +2779,7 @@ function token(env, lexbuf) { yyback(1, lexbuf); return [ env, - /* T_MULT */97 + "T_MULT" ]; case 6 : var start$2 = from_lb(env.lex_source, lexbuf); @@ -2791,7 +2791,7 @@ function token(env, lexbuf) { if (lexbuf.lex_start_pos !== 0) { return [ env, - /* T_ERROR */104 + "T_ERROR" ]; } var match$3 = line_comment(env, $$Buffer.create(127), lexbuf); @@ -2806,7 +2806,7 @@ function token(env, lexbuf) { return [ match$4[0], { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ btwn(start$3, match$4[1]), $$Buffer.contents(buf$3), @@ -2825,7 +2825,7 @@ function token(env, lexbuf) { return [ match$5[0], { - TAG: /* T_TEMPLATE_PART */2, + TAG: "T_TEMPLATE_PART", _0: [ match$5[1], { @@ -2840,43 +2840,43 @@ function token(env, lexbuf) { case 10 : var w = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w, { - TAG: /* T_NUMBER */0, - _0: /* BINARY */0 + TAG: "T_NUMBER", + _0: "BINARY" }); case 11 : return [ env, { - TAG: /* T_NUMBER */0, - _0: /* BINARY */0 + TAG: "T_NUMBER", + _0: "BINARY" } ]; case 12 : var w$1 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$1, { - TAG: /* T_NUMBER */0, - _0: /* OCTAL */2 + TAG: "T_NUMBER", + _0: "OCTAL" }); case 13 : return [ env, { - TAG: /* T_NUMBER */0, - _0: /* OCTAL */2 + TAG: "T_NUMBER", + _0: "OCTAL" } ]; case 14 : var w$2 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$2, { - TAG: /* T_NUMBER */0, - _0: /* LEGACY_OCTAL */1 + TAG: "T_NUMBER", + _0: "LEGACY_OCTAL" }); case 15 : return [ env, { - TAG: /* T_NUMBER */0, - _0: /* LEGACY_OCTAL */1 + TAG: "T_NUMBER", + _0: "LEGACY_OCTAL" } ]; case 16 : @@ -2889,8 +2889,8 @@ function token(env, lexbuf) { return [ env, { - TAG: /* T_NUMBER */0, - _0: /* NORMAL */3 + TAG: "T_NUMBER", + _0: "NORMAL" } ]; case 22 : @@ -2907,7 +2907,7 @@ function token(env, lexbuf) { if (exn.RE_EXN_ID === "Not_found") { return [ env, - /* T_IDENTIFIER */0 + "T_IDENTIFIER" ]; } throw exn; @@ -2915,288 +2915,288 @@ function token(env, lexbuf) { case 23 : return [ env, - /* T_LCURLY */1 + "T_LCURLY" ]; case 24 : return [ env, - /* T_RCURLY */2 + "T_RCURLY" ]; case 25 : return [ env, - /* T_LPAREN */3 + "T_LPAREN" ]; case 26 : return [ env, - /* T_RPAREN */4 + "T_RPAREN" ]; case 27 : return [ env, - /* T_LBRACKET */5 + "T_LBRACKET" ]; case 28 : return [ env, - /* T_RBRACKET */6 + "T_RBRACKET" ]; case 29 : return [ env, - /* T_ELLIPSIS */11 + "T_ELLIPSIS" ]; case 30 : return [ env, - /* T_PERIOD */9 + "T_PERIOD" ]; case 31 : return [ env, - /* T_SEMICOLON */7 + "T_SEMICOLON" ]; case 32 : return [ env, - /* T_COMMA */8 + "T_COMMA" ]; case 33 : return [ env, - /* T_COLON */77 + "T_COLON" ]; case 34 : return [ env, - /* T_PLING */76 + "T_PLING" ]; case 35 : return [ env, - /* T_AND */79 + "T_AND" ]; case 36 : return [ env, - /* T_OR */78 + "T_OR" ]; case 37 : return [ env, - /* T_STRICT_EQUAL */85 + "T_STRICT_EQUAL" ]; case 38 : return [ env, - /* T_STRICT_NOT_EQUAL */86 + "T_STRICT_NOT_EQUAL" ]; case 39 : return [ env, - /* T_LESS_THAN_EQUAL */87 + "T_LESS_THAN_EQUAL" ]; case 40 : return [ env, - /* T_GREATER_THAN_EQUAL */88 + "T_GREATER_THAN_EQUAL" ]; case 41 : return [ env, - /* T_EQUAL */83 + "T_EQUAL" ]; case 42 : return [ env, - /* T_NOT_EQUAL */84 + "T_NOT_EQUAL" ]; case 43 : return [ env, - /* T_INCR */102 + "T_INCR" ]; case 44 : return [ env, - /* T_DECR */103 + "T_DECR" ]; case 45 : return [ env, - /* T_LSHIFT_ASSIGN */65 + "T_LSHIFT_ASSIGN" ]; case 46 : return [ env, - /* T_LSHIFT */91 + "T_LSHIFT" ]; case 47 : return [ env, - /* T_RSHIFT_ASSIGN */64 + "T_RSHIFT_ASSIGN" ]; case 48 : return [ env, - /* T_RSHIFT3_ASSIGN */63 + "T_RSHIFT3_ASSIGN" ]; case 49 : return [ env, - /* T_RSHIFT3 */93 + "T_RSHIFT3" ]; case 50 : return [ env, - /* T_RSHIFT */92 + "T_RSHIFT" ]; case 51 : return [ env, - /* T_PLUS_ASSIGN */74 + "T_PLUS_ASSIGN" ]; case 52 : return [ env, - /* T_MINUS_ASSIGN */73 + "T_MINUS_ASSIGN" ]; case 53 : return [ env, - /* T_MULT_ASSIGN */71 + "T_MULT_ASSIGN" ]; case 54 : return [ env, - /* T_EXP_ASSIGN */72 + "T_EXP_ASSIGN" ]; case 55 : return [ env, - /* T_MOD_ASSIGN */69 + "T_MOD_ASSIGN" ]; case 56 : return [ env, - /* T_BIT_AND_ASSIGN */68 + "T_BIT_AND_ASSIGN" ]; case 57 : return [ env, - /* T_BIT_OR_ASSIGN */67 + "T_BIT_OR_ASSIGN" ]; case 58 : return [ env, - /* T_BIT_XOR_ASSIGN */66 + "T_BIT_XOR_ASSIGN" ]; case 59 : return [ env, - /* T_LESS_THAN */89 + "T_LESS_THAN" ]; case 60 : return [ env, - /* T_GREATER_THAN */90 + "T_GREATER_THAN" ]; case 61 : return [ env, - /* T_PLUS */94 + "T_PLUS" ]; case 62 : return [ env, - /* T_MINUS */95 + "T_MINUS" ]; case 63 : return [ env, - /* T_MULT */97 + "T_MULT" ]; case 64 : return [ env, - /* T_EXP */98 + "T_EXP" ]; case 65 : return [ env, - /* T_MOD */99 + "T_MOD" ]; case 66 : return [ env, - /* T_BIT_OR */80 + "T_BIT_OR" ]; case 67 : return [ env, - /* T_BIT_AND */82 + "T_BIT_AND" ]; case 68 : return [ env, - /* T_BIT_XOR */81 + "T_BIT_XOR" ]; case 69 : return [ env, - /* T_NOT */100 + "T_NOT" ]; case 70 : return [ env, - /* T_BIT_NOT */101 + "T_BIT_NOT" ]; case 71 : return [ env, - /* T_ASSIGN */75 + "T_ASSIGN" ]; case 72 : return [ env, - /* T_ARROW */10 + "T_ARROW" ]; case 73 : return [ env, - /* T_DIV_ASSIGN */70 + "T_DIV_ASSIGN" ]; case 74 : return [ env, - /* T_DIV */96 + "T_DIV" ]; case 75 : return [ env, - /* T_AT */12 + "T_AT" ]; case 76 : var env$8; if (env.lex_in_comment_syntax) { var loc$1 = from_lb(env.lex_source, lexbuf); - env$8 = lex_error(env, loc$1, /* UnexpectedEOS */4); + env$8 = lex_error(env, loc$1, "UnexpectedEOS"); } else { env$8 = env; } return [ env$8, - /* T_EOF */105 + "T_EOF" ]; case 77 : var env$9 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ env$9, - /* T_ERROR */104 + "T_ERROR" ]; default: Curry._1(lexbuf.refill_buff, lexbuf); @@ -3205,8 +3205,8 @@ function token(env, lexbuf) { } var w$3 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return illegal_number(env, lexbuf, w$3, { - TAG: /* T_NUMBER */0, - _0: /* NORMAL */3 + TAG: "T_NUMBER", + _0: "NORMAL" }); }; } @@ -3292,7 +3292,7 @@ function template_part(env, start, cooked, raw, literal, lexbuf) { switch (__ocaml_lex_state$1) { case 0 : var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ @@ -3380,7 +3380,7 @@ function string_quote(env, q, buf, raw, octal, lexbuf) { var x = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); $$Buffer.add_string(raw, x); var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); $$Buffer.add_string(buf, x); @@ -3410,7 +3410,7 @@ function comment(env, buf, lexbuf) { switch (__ocaml_lex_state$1) { case 0 : var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ @@ -3499,7 +3499,7 @@ function type_token(env, lexbuf) { if (escape_type === ":") { return [ env$3, - /* T_COLON */77 + "T_COLON" ]; } else { return type_token(env$3, lexbuf); @@ -3520,7 +3520,7 @@ function type_token(env, lexbuf) { yyback(1, lexbuf); return [ env, - /* T_MULT */97 + "T_MULT" ]; case 5 : var start$2 = from_lb(env.lex_source, lexbuf); @@ -3538,7 +3538,7 @@ function type_token(env, lexbuf) { return [ match$3[0], { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ btwn(start$3, match$3[1]), $$Buffer.contents(buf$3), @@ -3551,37 +3551,37 @@ function type_token(env, lexbuf) { var neg = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); var w = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); - return illegal_number(env, lexbuf, w, mk_num_singleton(/* BINARY */0, num, neg)); + return illegal_number(env, lexbuf, w, mk_num_singleton("BINARY", num, neg)); case 8 : var neg$1 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$1 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, - mk_num_singleton(/* BINARY */0, num$1, neg$1) + mk_num_singleton("BINARY", num$1, neg$1) ]; case 9 : var neg$2 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$2 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); var w$1 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); - return illegal_number(env, lexbuf, w$1, mk_num_singleton(/* OCTAL */2, num$2, neg$2)); + return illegal_number(env, lexbuf, w$1, mk_num_singleton("OCTAL", num$2, neg$2)); case 10 : var neg$3 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$3 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, - mk_num_singleton(/* OCTAL */2, num$3, neg$3) + mk_num_singleton("OCTAL", num$3, neg$3) ]; case 11 : var neg$4 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$4 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); var w$2 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); - return illegal_number(env, lexbuf, w$2, mk_num_singleton(/* LEGACY_OCTAL */1, num$4, neg$4)); + return illegal_number(env, lexbuf, w$2, mk_num_singleton("LEGACY_OCTAL", num$4, neg$4)); case 12 : var neg$5 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$5 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, - mk_num_singleton(/* LEGACY_OCTAL */1, num$5, neg$5) + mk_num_singleton("LEGACY_OCTAL", num$5, neg$5) ]; case 13 : var neg$6 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); @@ -3591,18 +3591,18 @@ function type_token(env, lexbuf) { try { match$4 = [ env, - mk_num_singleton(/* NORMAL */3, num$6, neg$6) + mk_num_singleton("NORMAL", num$6, neg$6) ]; } catch (exn){ if (Sys.win32) { var loc$1 = from_lb(env.lex_source, lexbuf); - var env$7 = lex_error(env, loc$1, /* WindowsFloatOfString */59); + var env$7 = lex_error(env, loc$1, "WindowsFloatOfString"); match$4 = [ env$7, { - TAG: /* T_NUMBER_SINGLETON_TYPE */5, - _0: /* NORMAL */3, + TAG: "T_NUMBER_SINGLETON_TYPE", + _0: "NORMAL", _1: 789.0 } ]; @@ -3617,18 +3617,18 @@ function type_token(env, lexbuf) { try { return [ env, - mk_num_singleton(/* NORMAL */3, num$7, neg$7) + mk_num_singleton("NORMAL", num$7, neg$7) ]; } catch (exn$1){ if (Sys.win32) { var loc$2 = from_lb(env.lex_source, lexbuf); - var env$8 = lex_error(env, loc$2, /* WindowsFloatOfString */59); + var env$8 = lex_error(env, loc$2, "WindowsFloatOfString"); return [ env$8, { - TAG: /* T_NUMBER_SINGLETON_TYPE */5, - _0: /* NORMAL */3, + TAG: "T_NUMBER_SINGLETON_TYPE", + _0: "NORMAL", _1: 789.0 } ]; @@ -3639,25 +3639,25 @@ function type_token(env, lexbuf) { var neg$8 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$8 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); var w$4 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); - return illegal_number(env, lexbuf, w$4, mk_num_singleton(/* NORMAL */3, num$8, neg$8)); + return illegal_number(env, lexbuf, w$4, mk_num_singleton("NORMAL", num$8, neg$8)); case 16 : var neg$9 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$9 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), lexbuf.lex_curr_pos); return [ env, - mk_num_singleton(/* NORMAL */3, num$9, neg$9) + mk_num_singleton("NORMAL", num$9, neg$9) ]; case 17 : var neg$10 = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, Caml_array.get(lexbuf.lex_mem, 0)); var num$10 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 0), Caml_array.get(lexbuf.lex_mem, 1)); var w$5 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), lexbuf.lex_curr_pos); - return illegal_number(env, lexbuf, w$5, mk_num_singleton(/* NORMAL */3, num$10, neg$10)); + return illegal_number(env, lexbuf, w$5, mk_num_singleton("NORMAL", num$10, neg$10)); case 18 : var neg$11 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 1), Caml_array.get(lexbuf.lex_mem, 0)); var num$11 = Lexing.sub_lexeme(lexbuf, Caml_array.get(lexbuf.lex_mem, 3), Caml_array.get(lexbuf.lex_mem, 2)); return [ env, - mk_num_singleton(/* NORMAL */3, num$11, neg$11) + mk_num_singleton("NORMAL", num$11, neg$11) ]; case 19 : var word = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos, lexbuf.lex_curr_pos); @@ -3673,7 +3673,7 @@ function type_token(env, lexbuf) { if (exn$2.RE_EXN_ID === "Not_found") { return [ env, - /* T_IDENTIFIER */0 + "T_IDENTIFIER" ]; } throw exn$2; @@ -3681,134 +3681,134 @@ function type_token(env, lexbuf) { case 22 : return [ env, - /* T_LCURLY */1 + "T_LCURLY" ]; case 23 : return [ env, - /* T_RCURLY */2 + "T_RCURLY" ]; case 24 : return [ env, - /* T_LPAREN */3 + "T_LPAREN" ]; case 25 : return [ env, - /* T_RPAREN */4 + "T_RPAREN" ]; case 26 : return [ env, - /* T_ELLIPSIS */11 + "T_ELLIPSIS" ]; case 27 : return [ env, - /* T_PERIOD */9 + "T_PERIOD" ]; case 28 : return [ env, - /* T_SEMICOLON */7 + "T_SEMICOLON" ]; case 29 : return [ env, - /* T_COMMA */8 + "T_COMMA" ]; case 20 : case 32 : return [ env, - /* T_LBRACKET */5 + "T_LBRACKET" ]; case 21 : case 33 : return [ env, - /* T_RBRACKET */6 + "T_RBRACKET" ]; case 34 : return [ env, - /* T_LESS_THAN */89 + "T_LESS_THAN" ]; case 35 : return [ env, - /* T_GREATER_THAN */90 + "T_GREATER_THAN" ]; case 31 : case 37 : return [ env, - /* T_PLING */76 + "T_PLING" ]; case 38 : return [ env, - /* T_MULT */97 + "T_MULT" ]; case 30 : case 39 : return [ env, - /* T_COLON */77 + "T_COLON" ]; case 40 : return [ env, - /* T_BIT_OR */80 + "T_BIT_OR" ]; case 41 : return [ env, - /* T_BIT_AND */82 + "T_BIT_AND" ]; case 42 : return [ env, - /* T_TYPEOF */44 + "T_TYPEOF" ]; case 43 : return [ env, - /* T_ARROW */10 + "T_ARROW" ]; case 36 : case 44 : return [ env, - /* T_ASSIGN */75 + "T_ASSIGN" ]; case 45 : return [ env, - /* T_PLUS */94 + "T_PLUS" ]; case 46 : return [ env, - /* T_MINUS */95 + "T_MINUS" ]; case 47 : var env$9; if (env.lex_in_comment_syntax) { var loc$3 = from_lb(env.lex_source, lexbuf); - env$9 = lex_error(env, loc$3, /* UnexpectedEOS */4); + env$9 = lex_error(env, loc$3, "UnexpectedEOS"); } else { env$9 = env; } return [ env$9, - /* T_EOF */105 + "T_EOF" ]; case 48 : return [ env, - /* T_ERROR */104 + "T_ERROR" ]; default: Curry._1(lexbuf.refill_buff, lexbuf); @@ -3858,7 +3858,7 @@ function __ocaml_lex_template_tail_rec(_env, lexbuf, ___ocaml_lex_state) { return [ match$2[0], { - TAG: /* T_TEMPLATE_PART */2, + TAG: "T_TEMPLATE_PART", _0: [ match$2[1], { @@ -3872,13 +3872,13 @@ function __ocaml_lex_template_tail_rec(_env, lexbuf, ___ocaml_lex_state) { ]; case 5 : var env$3 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ env$3, { - TAG: /* T_TEMPLATE_PART */2, + TAG: "T_TEMPLATE_PART", _0: [ from_lb(env$3.lex_source, lexbuf), { @@ -3907,7 +3907,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { case 0 : var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); switch (mode) { - case /* JSX_SINGLE_QUOTED_TEXT */0 : + case "JSX_SINGLE_QUOTED_TEXT" : if (c === 39) { return [ env, @@ -3915,7 +3915,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { ]; } break; - case /* JSX_DOUBLE_QUOTED_TEXT */1 : + case "JSX_DOUBLE_QUOTED_TEXT" : if (c === 34) { return [ env, @@ -3923,7 +3923,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { ]; } break; - case /* JSX_CHILD_TEXT */2 : + case "JSX_CHILD_TEXT" : var exit = 0; if (!(c !== 60 && c !== 123)) { exit = 2; @@ -3943,7 +3943,7 @@ function jsx_text(env, mode, buf, raw, lexbuf) { return jsx_text(env, mode, buf, raw, lexbuf); case 1 : var env$1 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ @@ -4891,7 +4891,7 @@ function string_escape(env, buf, lexbuf) { var hex_code = Lexing.sub_lexeme(lexbuf, lexbuf.lex_start_pos + 2 | 0, lexbuf.lex_curr_pos - 1 | 0); var code$6 = Caml_format.int_of_string("0x" + hex_code); var env$1 = code$6 > 1114111 ? lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }) : env; List.iter((function (param) { @@ -4904,7 +4904,7 @@ function string_escape(env, buf, lexbuf) { case 15 : var c$2 = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); var env$2 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); $$Buffer.add_char(buf, c$2); @@ -4942,7 +4942,7 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { case 0 : return [ env, - /* T_EOF */105 + "T_EOF" ]; case 1 : Lexing.new_line(lexbuf); @@ -4971,43 +4971,43 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { case 5 : return [ env, - /* T_LESS_THAN */89 + "T_LESS_THAN" ]; case 6 : return [ env, - /* T_DIV */96 + "T_DIV" ]; case 7 : return [ env, - /* T_GREATER_THAN */90 + "T_GREATER_THAN" ]; case 8 : return [ env, - /* T_LCURLY */1 + "T_LCURLY" ]; case 9 : return [ env, - /* T_COLON */77 + "T_COLON" ]; case 10 : return [ env, - /* T_PERIOD */9 + "T_PERIOD" ]; case 11 : return [ env, - /* T_ASSIGN */75 + "T_ASSIGN" ]; case 12 : unicode_fix_cols(lexbuf); return [ env, - /* T_JSX_IDENTIFIER */106 + "T_JSX_IDENTIFIER" ]; case 13 : var quote = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); @@ -5015,7 +5015,7 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { var buf$2 = $$Buffer.create(127); var raw = $$Buffer.create(127); $$Buffer.add_char(raw, quote); - var mode = quote === /* '\'' */39 ? /* JSX_SINGLE_QUOTED_TEXT */0 : /* JSX_DOUBLE_QUOTED_TEXT */1; + var mode = quote === /* '\'' */39 ? "JSX_SINGLE_QUOTED_TEXT" : "JSX_DOUBLE_QUOTED_TEXT"; var match$2 = jsx_text(env, mode, buf$2, raw, lexbuf); $$Buffer.add_char(raw, quote); var value = $$Buffer.contents(buf$2); @@ -5023,7 +5023,7 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { return [ match$2[0], { - TAG: /* T_JSX_TEXT */4, + TAG: "T_JSX_TEXT", _0: [ btwn(start$2, match$2[1]), value, @@ -5034,7 +5034,7 @@ function __ocaml_lex_jsx_tag_rec(_env, lexbuf, ___ocaml_lex_state) { case 14 : return [ env, - /* T_ERROR */104 + "T_ERROR" ]; default: Curry._1(lexbuf.refill_buff, lexbuf); @@ -5053,7 +5053,7 @@ function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { case 0 : return [ env, - /* T_EOF */105 + "T_EOF" ]; case 1 : Lexing.new_line(lexbuf); @@ -5089,7 +5089,7 @@ function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { return [ env$3, { - TAG: /* T_REGEXP */3, + TAG: "T_REGEXP", _0: [ loc, $$Buffer.contents(buf$2), @@ -5099,12 +5099,12 @@ function __ocaml_lex_regexp_rec(_env, lexbuf, ___ocaml_lex_state) { ]; case 6 : var env$4 = lex_error(env, from_lb(env.lex_source, lexbuf), { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: "ILLEGAL" }); return [ env$4, - /* T_ERROR */104 + "T_ERROR" ]; default: Curry._1(lexbuf.refill_buff, lexbuf); @@ -5122,14 +5122,14 @@ function regexp_body(env, buf, lexbuf) { switch (__ocaml_lex_state$1) { case 0 : var loc = from_lb(env.lex_source, lexbuf); - var env$1 = lex_error(env, loc, /* UnterminatedRegExp */13); + var env$1 = lex_error(env, loc, "UnterminatedRegExp"); return [ env$1, "" ]; case 1 : var loc$1 = from_lb(env.lex_source, lexbuf); - var env$2 = lex_error(env, loc$1, /* UnterminatedRegExp */13); + var env$2 = lex_error(env, loc$1, "UnterminatedRegExp"); return [ env$2, "" @@ -5156,7 +5156,7 @@ function regexp_body(env, buf, lexbuf) { return regexp_body(env$3, buf, lexbuf); case 6 : var loc$2 = from_lb(env.lex_source, lexbuf); - var env$4 = lex_error(env, loc$2, /* UnterminatedRegExp */13); + var env$4 = lex_error(env, loc$2, "UnterminatedRegExp"); return [ env$4, "" @@ -5184,13 +5184,13 @@ function jsx_child(env, start, buf, raw, lexbuf) { $$Buffer.add_string(raw, lt); $$Buffer.add_string(buf, lt); Lexing.new_line(lexbuf); - var match = jsx_text(env, /* JSX_CHILD_TEXT */2, buf, raw, lexbuf); + var match = jsx_text(env, "JSX_CHILD_TEXT", buf, raw, lexbuf); var value = $$Buffer.contents(buf); var raw$1 = $$Buffer.contents(raw); return [ match[0], { - TAG: /* T_JSX_TEXT */4, + TAG: "T_JSX_TEXT", _0: [ btwn(start, match[1]), value, @@ -5201,29 +5201,29 @@ function jsx_child(env, start, buf, raw, lexbuf) { case 1 : return [ env, - /* T_EOF */105 + "T_EOF" ]; case 2 : return [ env, - /* T_LESS_THAN */89 + "T_LESS_THAN" ]; case 3 : return [ env, - /* T_LCURLY */1 + "T_LCURLY" ]; case 4 : var c = Caml_bytes.get(lexbuf.lex_buffer, lexbuf.lex_start_pos); $$Buffer.add_char(raw, c); $$Buffer.add_char(buf, c); - var match$1 = jsx_text(env, /* JSX_CHILD_TEXT */2, buf, raw, lexbuf); + var match$1 = jsx_text(env, "JSX_CHILD_TEXT", buf, raw, lexbuf); var value$1 = $$Buffer.contents(buf); var raw$2 = $$Buffer.contents(raw); return [ match$1[0], { - TAG: /* T_JSX_TEXT */4, + TAG: "T_JSX_TEXT", _0: [ btwn(start, match$1[1]), value$1, @@ -5271,7 +5271,7 @@ function token$1(env) { } function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param.h; @@ -5280,10 +5280,11 @@ function height(param) { function create(l, v, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; - return /* Node */{ + hr = typeof r !== "object" ? 0 : r.h; + return { + TAG: "Node", l: l, v: v, r: r, @@ -5293,11 +5294,11 @@ function create(l, v, r) { function bal(l, v, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; + hr = typeof r !== "object" ? 0 : r.h; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Set.bal", @@ -5310,7 +5311,7 @@ function bal(l, v, r) { if (height(ll) >= height(lr)) { return create(ll, lv, create(lr, v, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, lr.l), lr.v, create(lr.r, v, r)); } throw { @@ -5320,14 +5321,15 @@ function bal(l, v, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", l: l, v: v, r: r, h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Set.bal", @@ -5340,7 +5342,7 @@ function bal(l, v, r) { if (height(rr) >= height(rl)) { return create(create(l, v, rl), rv, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, v, rl.l), rl.v, create(rl.r, rv, rr)); } throw { @@ -5351,11 +5353,12 @@ function bal(l, v, r) { } function add(x, t) { - if (/* tag */typeof t === "number") { - return /* Node */{ - l: /* Empty */0, + if (typeof t !== "object") { + return { + TAG: "Node", + l: "Empty", v: x, - r: /* Empty */0, + r: "Empty", h: 1 }; } @@ -5385,7 +5388,7 @@ function add(x, t) { function mem(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = Caml.string_compare(x, param.v); @@ -5454,23 +5457,23 @@ function lex(t) { var match = t.la_lex_mode; var match$1; switch (match) { - case /* TYPE */1 : + case "TYPE" : match$1 = type_token$1(lex_env); break; - case /* JSX_TAG */2 : + case "JSX_TAG" : match$1 = jsx_tag(lex_env); break; - case /* JSX_CHILD */3 : + case "JSX_CHILD" : match$1 = jsx_child$1(lex_env); break; - case /* TEMPLATE */4 : + case "TEMPLATE" : match$1 = template_tail(lex_env); break; - case /* REGEXP */5 : + case "REGEXP" : match$1 = regexp(lex_env); break; - case /* NORMAL */0 : - case /* PREDICATE */6 : + case "NORMAL" : + case "PREDICATE" : match$1 = token$1(lex_env); break; @@ -5520,7 +5523,7 @@ function init_env(token_sinkOpt, parse_optionsOpt, source, content) { var token_sink = token_sinkOpt !== undefined ? Caml_option.valFromOption(token_sinkOpt) : undefined; var parse_options = parse_optionsOpt !== undefined ? Caml_option.valFromOption(parse_optionsOpt) : undefined; var lb = Lexing.from_string(content); - if (source !== undefined && /* tag */typeof source !== "number") { + if (source !== undefined && typeof source === "object") { var init = lb.lex_curr_p; lb.lex_curr_p = { pos_fname: source._0, @@ -5539,9 +5542,9 @@ function init_env(token_sinkOpt, parse_optionsOpt, source, content) { comments: { contents: /* [] */0 }, - labels: /* Empty */0, + labels: "Empty", exports: { - contents: /* Empty */0 + contents: "Empty" }, last_loc: { contents: undefined @@ -5559,7 +5562,7 @@ function init_env(token_sinkOpt, parse_optionsOpt, source, content) { error_callback: undefined, lex_mode_stack: { contents: { - hd: /* NORMAL */0, + hd: "NORMAL", tl: /* [] */0 } }, @@ -5567,7 +5570,7 @@ function init_env(token_sinkOpt, parse_optionsOpt, source, content) { contents: lex_env }, lookahead: { - contents: create$1(lex_env, /* NORMAL */0) + contents: create$1(lex_env, "NORMAL") }, token_sink: { contents: token_sink @@ -5611,7 +5614,7 @@ function record_export(env, param) { return error_at(env, [ param[0], { - TAG: /* DuplicateExport */7, + TAG: "DuplicateExport", _0: export_name } ]); @@ -5734,7 +5737,7 @@ function enter_function(env, async, generator) { newrecord.in_function = true; newrecord.in_switch = false; newrecord.in_loop = false; - newrecord.labels = /* Empty */0; + newrecord.labels = "Empty"; return newrecord; } @@ -5823,14 +5826,14 @@ function is_line_terminator(env) { function is_implicit_semicolon(env) { var match = token$2(undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return is_line_terminator(env); } switch (match) { - case /* T_SEMICOLON */7 : + case "T_SEMICOLON" : return false; - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return true; default: return is_line_terminator(env); @@ -5839,7 +5842,7 @@ function is_implicit_semicolon(env) { function semicolon_loc(iOpt, env) { var i = iOpt !== undefined ? iOpt : 0; - if (token$2(i, env) === /* T_SEMICOLON */7) { + if (token$2(i, env) === "T_SEMICOLON") { return loc(i, env); } @@ -5852,17 +5855,17 @@ function is_identifier(iOpt, env) { if (is_strict_reserved(name) || is_restricted(name) || is_future_reserved(name)) { return true; } - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return false; } switch (match) { - case /* T_IDENTIFIER */0 : - case /* T_LET */26 : - case /* T_DECLARE */58 : - case /* T_TYPE */59 : - case /* T_OF */60 : - case /* T_ASYNC */61 : - case /* T_AWAIT */62 : + case "T_IDENTIFIER" : + case "T_LET" : + case "T_DECLARE" : + case "T_TYPE" : + case "T_OF" : + case "T_ASYNC" : + case "T_AWAIT" : return true; default: return false; @@ -5871,10 +5874,10 @@ function is_identifier(iOpt, env) { function is_function(iOpt, env) { var i = iOpt !== undefined ? iOpt : 0; - if (token$2(i, env) === /* T_FUNCTION */13) { + if (token$2(i, env) === "T_FUNCTION") { return true; - } else if (token$2(i, env) === /* T_ASYNC */61) { - return token$2(i + 1 | 0, env) === /* T_FUNCTION */13; + } else if (token$2(i, env) === "T_ASYNC") { + return token$2(i + 1 | 0, env) === "T_FUNCTION"; } else { return false; } @@ -5883,12 +5886,12 @@ function is_function(iOpt, env) { function is_class(iOpt, env) { var i = iOpt !== undefined ? iOpt : 0; var match = token$2(i, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return false; } switch (match) { - case /* T_AT */12 : - case /* T_CLASS */38 : + case "T_AT" : + case "T_CLASS" : return true; default: return false; @@ -5905,34 +5908,34 @@ function error(env, e) { function get_unexpected_error(param) { var tmp = param[0]; - if (/* tag */typeof tmp === "number") { + if (typeof tmp !== "object") { switch (tmp) { - case /* T_IDENTIFIER */0 : - return /* UnexpectedIdentifier */2; - case /* T_EOF */105 : - return /* UnexpectedEOS */4; + case "T_IDENTIFIER" : + return "UnexpectedIdentifier"; + case "T_EOF" : + return "UnexpectedEOS"; default: } } else { - switch (tmp.TAG | 0) { - case /* T_NUMBER */0 : - return /* UnexpectedNumber */0; - case /* T_STRING */1 : - case /* T_JSX_TEXT */4 : - return /* UnexpectedString */1; + switch (tmp.TAG) { + case "T_NUMBER" : + return "UnexpectedNumber"; + case "T_STRING" : + case "T_JSX_TEXT" : + return "UnexpectedString"; default: } } var word = param[1]; if (is_future_reserved(word)) { - return /* UnexpectedReserved */3; + return "UnexpectedReserved"; } else if (is_strict_reserved(word)) { - return /* StrictReservedWord */39; + return "StrictReservedWord"; } else { return { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: word }; } @@ -5951,7 +5954,7 @@ function error_on_decorators(env) { return List.iter((function (decorator) { error_at(env, [ decorator[0], - /* UnsupportedDecorator */57 + "UnsupportedDecorator" ]); }), param); }; @@ -6051,7 +6054,7 @@ function double_pop_lex_mode(env) { function semicolon(env) { if (!is_implicit_semicolon(env)) { - if (token$2(undefined, env) === /* T_SEMICOLON */7) { + if (token$2(undefined, env) === "T_SEMICOLON") { return token$3(env); } else { return error_unexpected(env); @@ -6091,8 +6094,8 @@ function save_state(env) { if (orig_token_sink !== undefined) { var buffer = { length: 0, - first: /* Nil */0, - last: /* Nil */0 + first: "Nil", + last: "Nil" }; env.token_sink.contents = (function (token_data) { Queue.add(token_data, buffer); @@ -6131,7 +6134,8 @@ function to_parse(env, parse) { try { var result = Curry._1(parse, env); reset_token_sink(true, env, saved_state.token_buffer); - return /* ParsedSuccessfully */{ + return { + TAG: "ParsedSuccessfully", _0: result }; } @@ -6145,7 +6149,7 @@ function to_parse(env, parse) { env.lex_mode_stack.contents = saved_state.saved_lex_mode_stack; env.lex_env.contents = saved_state.saved_lex_env; env.lookahead.contents = create$1(env.lex_env.contents, List.hd(env.lex_mode_stack.contents)); - return /* FailedToParse */0; + return "FailedToParse"; } throw exn; } @@ -6171,7 +6175,7 @@ var Parser_env_Try = { }; function height$1(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param.h; @@ -6180,10 +6184,11 @@ function height$1(param) { function create$2(l, v, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; - return /* Node */{ + hr = typeof r !== "object" ? 0 : r.h; + return { + TAG: "Node", l: l, v: v, r: r, @@ -6193,11 +6198,11 @@ function create$2(l, v, r) { function bal$1(l, v, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; + hr = typeof r !== "object" ? 0 : r.h; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Set.bal", @@ -6210,7 +6215,7 @@ function bal$1(l, v, r) { if (height$1(ll) >= height$1(lr)) { return create$2(ll, lv, create$2(lr, v, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create$2(create$2(ll, lv, lr.l), lr.v, create$2(lr.r, v, r)); } throw { @@ -6220,14 +6225,15 @@ function bal$1(l, v, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", l: l, v: v, r: r, h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Set.bal", @@ -6240,7 +6246,7 @@ function bal$1(l, v, r) { if (height$1(rr) >= height$1(rl)) { return create$2(create$2(l, v, rl), rv, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create$2(create$2(l, v, rl.l), rl.v, create$2(rl.r, rv, rr)); } throw { @@ -6251,11 +6257,12 @@ function bal$1(l, v, r) { } function add$1(x, t) { - if (/* tag */typeof t === "number") { - return /* Node */{ - l: /* Empty */0, + if (typeof t !== "object") { + return { + TAG: "Node", + l: "Empty", v: x, - r: /* Empty */0, + r: "Empty", h: 1 }; } @@ -6285,7 +6292,7 @@ function add$1(x, t) { function mem$1(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = Caml.string_compare(x, param.v); @@ -6298,7 +6305,7 @@ function mem$1(x, _param) { } function height$2(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param.h; @@ -6308,7 +6315,8 @@ function height$2(param) { function create$3(l, x, d, r) { var hl = height$2(l); var hr = height$2(r); - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: d, @@ -6319,11 +6327,11 @@ function create$3(l, x, d, r) { function bal$2(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; + hr = typeof r !== "object" ? 0 : r.h; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -6337,7 +6345,7 @@ function bal$2(l, x, d, r) { if (height$2(ll) >= height$2(lr)) { return create$3(ll, lv, ld, create$3(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create$3(create$3(ll, lv, ld, lr.l), lr.v, lr.d, create$3(lr.r, x, d, r)); } throw { @@ -6347,7 +6355,8 @@ function bal$2(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: d, @@ -6355,7 +6364,7 @@ function bal$2(l, x, d, r) { h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -6369,7 +6378,7 @@ function bal$2(l, x, d, r) { if (height$2(rr) >= height$2(rl)) { return create$3(create$3(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create$3(create$3(l, x, d, rl.l), rl.v, rl.d, create$3(rl.r, rv, rd, rr)); } throw { @@ -6380,12 +6389,13 @@ function bal$2(l, x, d, r) { } function add$2(x, data, m) { - if (/* tag */typeof m === "number") { - return /* Node */{ - l: /* Empty */0, + if (typeof m !== "object") { + return { + TAG: "Node", + l: "Empty", v: x, d: data, - r: /* Empty */0, + r: "Empty", h: 1 }; } @@ -6398,7 +6408,8 @@ function add$2(x, data, m) { if (d === data) { return m; } else { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: data, @@ -6426,7 +6437,7 @@ function add$2(x, data, m) { function find(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -6451,7 +6462,7 @@ function compare$1(param, param$1) { } function height$3(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param.h; @@ -6460,10 +6471,11 @@ function height$3(param) { function create$4(l, v, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; - return /* Node */{ + hr = typeof r !== "object" ? 0 : r.h; + return { + TAG: "Node", l: l, v: v, r: r, @@ -6473,11 +6485,11 @@ function create$4(l, v, r) { function bal$3(l, v, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; + hr = typeof r !== "object" ? 0 : r.h; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Set.bal", @@ -6490,7 +6502,7 @@ function bal$3(l, v, r) { if (height$3(ll) >= height$3(lr)) { return create$4(ll, lv, create$4(lr, v, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create$4(create$4(ll, lv, lr.l), lr.v, create$4(lr.r, v, r)); } throw { @@ -6500,14 +6512,15 @@ function bal$3(l, v, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", l: l, v: v, r: r, h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Set.bal", @@ -6520,7 +6533,7 @@ function bal$3(l, v, r) { if (height$3(rr) >= height$3(rl)) { return create$4(create$4(l, v, rl), rv, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create$4(create$4(l, v, rl.l), rl.v, create$4(rl.r, rv, rr)); } throw { @@ -6531,11 +6544,12 @@ function bal$3(l, v, r) { } function add$3(x, t) { - if (/* tag */typeof t === "number") { - return /* Node */{ - l: /* Empty */0, + if (typeof t !== "object") { + return { + TAG: "Node", + l: "Empty", v: x, - r: /* Empty */0, + r: "Empty", h: 1 }; } @@ -6565,7 +6579,7 @@ function add$3(x, t) { function mem$2(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = compare$1(x, param.v); @@ -6597,7 +6611,7 @@ function filter_duplicate_errors(errs) { ]; } }), [ - /* Empty */0, + "Empty", /* [] */0 ], errs$1); return List.rev(match[1]); @@ -6608,7 +6622,7 @@ function with_loc(fn, env) { var result = Curry._1(fn, env); var loc = env.last_loc.contents; var end_loc = loc !== undefined ? loc : (error(env, { - TAG: /* Assertion */0, + TAG: "Assertion", _0: "did not consume any tokens" }), Curry._2(Parser_env_Peek.loc, undefined, env)); return [ @@ -6622,98 +6636,98 @@ var Parse = Caml_module.init_mod([ 95, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [ [ - /* Function */0, + "Function", "program" ], [ - /* Function */0, + "Function", "statement" ], [ - /* Function */0, + "Function", "statement_list_item" ], [ - /* Function */0, + "Function", "statement_list" ], [ - /* Function */0, + "Function", "statement_list_with_directives" ], [ - /* Function */0, + "Function", "module_body" ], [ - /* Function */0, + "Function", "expression" ], [ - /* Function */0, + "Function", "assignment" ], [ - /* Function */0, + "Function", "object_initializer" ], [ - /* Function */0, + "Function", "array_initializer" ], [ - /* Function */0, + "Function", "identifier" ], [ - /* Function */0, + "Function", "identifier_or_reserved_keyword" ], [ - /* Function */0, + "Function", "identifier_with_type" ], [ - /* Function */0, + "Function", "block_body" ], [ - /* Function */0, + "Function", "function_block_body" ], [ - /* Function */0, + "Function", "jsx_element" ], [ - /* Function */0, + "Function", "pattern" ], [ - /* Function */0, + "Function", "pattern_from_expr" ], [ - /* Function */0, + "Function", "object_key" ], [ - /* Function */0, + "Function", "class_declaration" ], [ - /* Function */0, + "Function", "class_expression" ], [ - /* Function */0, + "Function", "is_assignable_lhs" ], [ - /* Function */0, + "Function", "predicate" ] ] @@ -6721,19 +6735,19 @@ var Parse = Caml_module.init_mod([ function prefix(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return postfix(env); } - if (match !== /* T_PLING */76) { + if (match !== "T_PLING") { return postfix(env); } var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_PLING */76); + token$4(env, "T_PLING"); var t = prefix(env); return [ btwn(loc, t[0]), { - TAG: /* Nullable */0, + TAG: "Nullable", _0: t } ]; @@ -6776,20 +6790,20 @@ function rev_nonempty_acc(acc) { } function intersection(env) { - maybe(env, /* T_BIT_AND */82); + maybe(env, "T_BIT_AND"); var left = prefix(env); return Curry._2(intersection_with, env, left); } function function_param_list(env) { - token$4(env, /* T_LPAREN */3); + token$4(env, "T_LPAREN"); var ret = Curry._2(function_param_list_without_parens, env, /* [] */0); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); return ret; } function union(env) { - maybe(env, /* T_BIT_OR */80); + maybe(env, "T_BIT_OR"); var left = intersection(env); return Curry._2(union_with, env, left); } @@ -6802,40 +6816,40 @@ function primary(env) { var loc = Curry._2(Parser_env_Peek.loc, undefined, env); var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof token$5 === "number") { + if (typeof token$5 !== "object") { switch (token$5) { - case /* T_IDENTIFIER */0 : + case "T_IDENTIFIER" : var match = generic(env); return [ match[0], { - TAG: /* Generic */4, + TAG: "Generic", _0: match[1] } ]; - case /* T_LCURLY */1 : + case "T_LCURLY" : var match$1 = Curry._2(_object, undefined, env); return [ match$1[0], { - TAG: /* Object */2, + TAG: "Object", _0: match$1[1] } ]; - case /* T_LPAREN */3 : + case "T_LPAREN" : var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var _type = param_list_or_type(env); - if (_type.TAG !== /* ParamList */0) { + if (_type.TAG !== "ParamList") { return _type._0; } var match$2 = _type._0; - token$4(env, /* T_ARROW */10); + token$4(env, "T_ARROW"); var returnType = union(env); var end_loc = returnType[0]; return [ btwn(start_loc, end_loc), { - TAG: /* Function */1, + TAG: "Function", _0: { params: match$2[1], returnType: returnType, @@ -6844,45 +6858,45 @@ function primary(env) { } } ]; - case /* T_LBRACKET */5 : + case "T_LBRACKET" : var start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LBRACKET */5); + token$4(env, "T_LBRACKET"); var tl = types(env, /* [] */0); var end_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); return [ btwn(start_loc$1, end_loc$1), { - TAG: /* Tuple */8, + TAG: "Tuple", _0: tl } ]; - case /* T_FALSE */28 : - case /* T_TRUE */29 : + case "T_FALSE" : + case "T_TRUE" : exit = 2; break; - case /* T_TYPEOF */44 : + case "T_TYPEOF" : var start_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_TYPEOF */44); + token$4(env, "T_TYPEOF"); var t = primary(env); return [ btwn(start_loc$2, t[0]), { - TAG: /* Typeof */7, + TAG: "Typeof", _0: t } ]; - case /* T_LESS_THAN */89 : + case "T_LESS_THAN" : var start_loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); var typeParameters = Curry._2(type_parameter_declaration, false, env); var match$3 = function_param_list(env); - token$4(env, /* T_ARROW */10); + token$4(env, "T_ARROW"); var returnType$1 = union(env); var end_loc$2 = returnType$1[0]; return [ btwn(start_loc$3, end_loc$2), { - TAG: /* Function */1, + TAG: "Function", _0: { params: match$3[1], returnType: returnType$1, @@ -6891,28 +6905,28 @@ function primary(env) { } } ]; - case /* T_MULT */97 : - token$4(env, /* T_MULT */97); + case "T_MULT" : + token$4(env, "T_MULT"); return [ loc, - /* Exists */6 + "Exists" ]; default: exit = 1; } } else { - switch (token$5.TAG | 0) { - case /* T_STRING */1 : + switch (token$5.TAG) { + case "T_STRING" : var match$4 = token$5._0; var octal = match$4[3]; var raw = match$4[2]; var value = match$4[1]; var loc$1 = match$4[0]; if (octal) { - strict_error(env, /* StrictOctalLiteral */31); + strict_error(env, "StrictOctalLiteral"); } token$4(env, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ loc$1, value, @@ -6923,29 +6937,29 @@ function primary(env) { return [ loc$1, { - TAG: /* StringLiteral */9, + TAG: "StringLiteral", _0: { value: value, raw: raw } } ]; - case /* T_NUMBER_SINGLETON_TYPE */5 : + case "T_NUMBER_SINGLETON_TYPE" : var value$1 = token$5._1; var number_type = token$5._0; var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, { - TAG: /* T_NUMBER_SINGLETON_TYPE */5, + TAG: "T_NUMBER_SINGLETON_TYPE", _0: number_type, _1: value$1 }); - if (number_type === /* LEGACY_OCTAL */1) { - strict_error(env, /* StrictOctalLiteral */31); + if (number_type === "LEGACY_OCTAL") { + strict_error(env, "StrictOctalLiteral"); } return [ loc, { - TAG: /* NumberLiteral */10, + TAG: "NumberLiteral", _0: { value: value$1, raw: raw$1 @@ -6969,17 +6983,17 @@ function primary(env) { error_unexpected(env); return [ loc, - /* Any */0 + "Any" ]; } case 2 : var raw$2 = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, token$5); - var value$2 = token$5 === /* T_TRUE */29; + var value$2 = token$5 === "T_TRUE"; return [ loc, { - TAG: /* BooleanLiteral */11, + TAG: "BooleanLiteral", _0: { value: value$2, raw: raw$2 @@ -6991,22 +7005,22 @@ function primary(env) { } function primitive(param) { - if (/* tag */typeof param !== "number") { + if (typeof param === "object") { return ; } switch (param) { - case /* T_NULL */27 : - return /* Null */2; - case /* T_ANY_TYPE */107 : - return /* Any */0; - case /* T_BOOLEAN_TYPE */108 : - return /* Boolean */5; - case /* T_NUMBER_TYPE */109 : - return /* Number */3; - case /* T_STRING_TYPE */110 : - return /* String */4; - case /* T_VOID_TYPE */111 : - return /* Void */1; + case "T_NULL" : + return "Null"; + case "T_ANY_TYPE" : + return "Any"; + case "T_BOOLEAN_TYPE" : + return "Boolean"; + case "T_NUMBER_TYPE" : + return "Number"; + case "T_STRING_TYPE" : + return "String"; + case "T_VOID_TYPE" : + return "Void"; default: return ; } @@ -7014,10 +7028,10 @@ function primitive(param) { function function_param_with_id(env, name) { if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAnnotation */6); + error(env, "UnexpectedTypeAnnotation"); } - var optional = maybe(env, /* T_PLING */76); - token$4(env, /* T_COLON */77); + var optional = maybe(env, "T_PLING"); + token$4(env, "T_COLON"); var typeAnnotation = union(env); return [ btwn(name[0], typeAnnotation[0]), @@ -7032,14 +7046,14 @@ function function_param_with_id(env, name) { function postfix_with(env, _t) { while(true) { var t = _t; - if (!(!Curry._1(Parser_env_Peek.is_line_terminator, env) && maybe(env, /* T_LBRACKET */5))) { + if (!(!Curry._1(Parser_env_Peek.is_line_terminator, env) && maybe(env, "T_LBRACKET"))) { return t; } var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); var loc = btwn(t[0], end_loc); var t_1 = { - TAG: /* Array */3, + TAG: "Array", _0: t }; var t$1 = [ @@ -7056,7 +7070,7 @@ function generic_type_with_identifier(env, id) { return [ match[0], { - TAG: /* Generic */4, + TAG: "Generic", _0: match[1] } ]; @@ -7066,10 +7080,10 @@ function function_param_or_generic_type(env) { var id = Curry._2(Parse.identifier, undefined, env); var match = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_PLING */76 : - case /* T_COLON */77 : + case "T_PLING" : + case "T_COLON" : exit = 2; break; default: @@ -7081,14 +7095,14 @@ function function_param_or_generic_type(env) { switch (exit) { case 1 : return { - TAG: /* Type */1, + TAG: "Type", _0: Curry._2(union_with, env, Curry._2(intersection_with, env, postfix_with(env, generic_type_with_identifier(env, id)))) }; case 2 : var param = function_param_with_id(env, id); - maybe(env, /* T_COMMA */8); + maybe(env, "T_COMMA"); return { - TAG: /* ParamList */0, + TAG: "ParamList", _0: Curry._2(function_param_list_without_parens, env, { hd: param, tl: /* [] */0 @@ -7099,28 +7113,28 @@ function function_param_or_generic_type(env) { } function param_list_or_type(env) { - token$4(env, /* T_LPAREN */3); + token$4(env, "T_LPAREN"); var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); var ret; var exit = 0; - if (/* tag */typeof token$5 === "number") { + if (typeof token$5 !== "object") { switch (token$5) { - case /* T_IDENTIFIER */0 : + case "T_IDENTIFIER" : ret = function_param_or_generic_type(env); break; - case /* T_RPAREN */4 : + case "T_RPAREN" : ret = { - TAG: /* ParamList */0, + TAG: "ParamList", _0: [ undefined, /* [] */0 ] }; break; - case /* T_ELLIPSIS */11 : - case /* T_EOF */105 : + case "T_ELLIPSIS" : + case "T_EOF" : ret = { - TAG: /* ParamList */0, + TAG: "ParamList", _0: Curry._2(function_param_list_without_parens, env, /* [] */0) }; break; @@ -7135,21 +7149,21 @@ function param_list_or_type(env) { if (match !== undefined) { var match$1 = Curry._2(Parser_env_Peek.token, 1, env); var exit$1 = 0; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { switch (match$1) { - case /* T_PLING */76 : - case /* T_COLON */77 : + case "T_PLING" : + case "T_COLON" : exit$1 = 2; break; default: ret = { - TAG: /* Type */1, + TAG: "Type", _0: union(env) }; } } else { ret = { - TAG: /* Type */1, + TAG: "Type", _0: union(env) }; } @@ -7157,13 +7171,13 @@ function param_list_or_type(env) { var match$2 = Curry._1(Parse.identifier_or_reserved_keyword, env); var name = match$2[0]; if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAnnotation */6); + error(env, "UnexpectedTypeAnnotation"); } - var optional = maybe(env, /* T_PLING */76); - token$4(env, /* T_COLON */77); + var optional = maybe(env, "T_PLING"); + token$4(env, "T_COLON"); var typeAnnotation = union(env); - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RPAREN */4) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RPAREN") { + token$4(env, "T_COMMA"); } var param_0 = btwn(name[0], typeAnnotation[0]); var param_1 = { @@ -7176,7 +7190,7 @@ function param_list_or_type(env) { param_1 ]; ret = { - TAG: /* ParamList */0, + TAG: "ParamList", _0: Curry._2(function_param_list_without_parens, env, { hd: param, tl: /* [] */0 @@ -7186,12 +7200,12 @@ function param_list_or_type(env) { } else { ret = { - TAG: /* Type */1, + TAG: "Type", _0: union(env) }; } } - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); return ret; } @@ -7201,7 +7215,7 @@ function postfix(env) { } function intersection_with(env, left) { - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_BIT_AND */82) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_BIT_AND") { var _acc = { hd: left, tl: /* [] */0 @@ -7209,8 +7223,8 @@ function intersection_with(env, left) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_BIT_AND */82) { - token$4(env, /* T_BIT_AND */82); + if (typeof match !== "object" && match === "T_BIT_AND") { + token$4(env, "T_BIT_AND"); _acc = { hd: prefix(env), tl: acc @@ -7221,7 +7235,7 @@ function intersection_with(env, left) { return [ match$1[0], { - TAG: /* Intersection */6, + TAG: "Intersection", _0: match$1[1] } ]; @@ -7243,11 +7257,11 @@ function function_param_list_without_parens(env) { var acc = _acc; var t = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof t === "number") { + if (typeof t !== "object") { switch (t) { - case /* T_RPAREN */4 : - case /* T_ELLIPSIS */11 : - case /* T_EOF */105 : + case "T_RPAREN" : + case "T_ELLIPSIS" : + case "T_EOF" : exit = 2; break; default: @@ -7263,13 +7277,13 @@ function function_param_list_without_parens(env) { hd: acc_0, tl: acc }; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RPAREN */4) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RPAREN") { + token$4(env, "T_COMMA"); } _acc = acc$1; continue ; case 2 : - var rest = t === /* T_ELLIPSIS */11 ? (token$4(env, /* T_ELLIPSIS */11), param(env)) : undefined; + var rest = t === "T_ELLIPSIS" ? (token$4(env, "T_ELLIPSIS"), param(env)) : undefined; return [ rest, List.rev(acc) @@ -7286,15 +7300,15 @@ function params(env, allow_default, _require_default, _acc) { var require_default = _require_default; var match = Curry._2(Parser_env_Peek.token, undefined, env); var variance; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_PLUS */94 : + case "T_PLUS" : token$3(env); - variance = /* Plus */0; + variance = "Plus"; break; - case /* T_MINUS */95 : + case "T_MINUS" : token$3(env); - variance = /* Minus */1; + variance = "Minus"; break; default: variance = undefined; @@ -7302,14 +7316,14 @@ function params(env, allow_default, _require_default, _acc) { } else { variance = undefined; } - var match$1 = Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28); + var match$1 = Curry._2(Parse.identifier_with_type, env, "StrictParamName"); var id = match$1[1]; var loc = match$1[0]; var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); var match$3; if (allow_default) { var exit = 0; - if (/* tag */typeof match$2 === "number" && match$2 === /* T_ASSIGN */75) { + if (typeof match$2 !== "object" && match$2 === "T_ASSIGN") { token$3(env); match$3 = [ union(env), @@ -7322,7 +7336,7 @@ function params(env, allow_default, _require_default, _acc) { if (require_default) { error_at(env, [ loc, - /* MissingTypeParamDefault */58 + "MissingTypeParamDefault" ]); } match$3 = [ @@ -7352,17 +7366,17 @@ function params(env, allow_default, _require_default, _acc) { tl: acc }; var match$4 = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match$4 === "number") { + if (typeof match$4 !== "object") { switch (match$4) { - case /* T_GREATER_THAN */90 : - case /* T_EOF */105 : + case "T_GREATER_THAN" : + case "T_EOF" : return List.rev(acc$1); default: } } - token$4(env, /* T_COMMA */8); - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_GREATER_THAN */90) { + token$4(env, "T_COMMA"); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_GREATER_THAN") { return List.rev(acc$1); } _acc = acc$1; @@ -7373,16 +7387,16 @@ function params(env, allow_default, _require_default, _acc) { function type_parameter_declaration(allow_default, env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_LESS_THAN */89) { + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_LESS_THAN") { return ; } if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAnnotation */6); + error(env, "UnexpectedTypeAnnotation"); } - token$4(env, /* T_LESS_THAN */89); + token$4(env, "T_LESS_THAN"); var params$1 = params(env, allow_default, false, /* [] */0); var loc = btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); - token$4(env, /* T_GREATER_THAN */90); + token$4(env, "T_GREATER_THAN"); return [ loc, { @@ -7394,7 +7408,7 @@ function type_parameter_declaration(allow_default, env) { function methodish(env, start_loc) { var typeParameters = Curry._2(type_parameter_declaration, false, env); var match = function_param_list(env); - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); var returnType = union(env); var loc = btwn(start_loc, returnType[0]); return [ @@ -7412,7 +7426,7 @@ function method_property(env, start_loc, $$static, key) { var value = methodish(env, start_loc); var value_0 = value[0]; var value_1 = { - TAG: /* Function */1, + TAG: "Function", _0: value[1] }; var value$1 = [ @@ -7444,10 +7458,10 @@ function call_property(env, start_loc, $$static) { function property(env, start_loc, $$static, key) { if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAnnotation */6); + error(env, "UnexpectedTypeAnnotation"); } - var optional = maybe(env, /* T_PLING */76); - token$4(env, /* T_COLON */77); + var optional = maybe(env, "T_PLING"); + token$4(env, "T_COLON"); var value = union(env); return [ btwn(start_loc, value[0]), @@ -7462,12 +7476,12 @@ function property(env, start_loc, $$static, key) { } function indexer_property(env, start_loc, $$static) { - token$4(env, /* T_LBRACKET */5); + token$4(env, "T_LBRACKET"); var match = Curry._1(Parse.identifier_or_reserved_keyword, env); - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); var key = union(env); - token$4(env, /* T_RBRACKET */6); - token$4(env, /* T_COLON */77); + token$4(env, "T_RBRACKET"); + token$4(env, "T_COLON"); var value = union(env); return [ btwn(start_loc, value[0]), @@ -7482,14 +7496,14 @@ function indexer_property(env, start_loc, $$static) { function semicolon$1(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return error_unexpected(env); } switch (match) { - case /* T_RCURLY */2 : + case "T_RCURLY" : return ; - case /* T_SEMICOLON */7 : - case /* T_COMMA */8 : + case "T_SEMICOLON" : + case "T_COMMA" : return token$3(env); default: return error_unexpected(env); @@ -7503,12 +7517,12 @@ function properties(allow_static, env, _param) { var indexers = param[1]; var acc = param[0]; var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var $$static = allow_static && maybe(env, /* T_STATIC */40); + var $$static = allow_static && maybe(env, "T_STATIC"); var match = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_LBRACKET */5 : + case "T_LBRACKET" : var indexer = indexer_property(env, start_loc, $$static); semicolon$1(env); _param = [ @@ -7520,12 +7534,12 @@ function properties(allow_static, env, _param) { callProperties ]; continue ; - case /* T_LPAREN */3 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_LESS_THAN" : exit = 3; break; - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : exit = 2; break; default: @@ -7539,13 +7553,13 @@ function properties(allow_static, env, _param) { var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var match$2; var exit$1 = 0; - if ($$static && /* tag */typeof match$1 === "number" && match$1 === /* T_COLON */77) { + if ($$static && typeof match$1 !== "object" && match$1 === "T_COLON") { strict_error_at(env, [ start_loc, - /* StrictReservedWord */39 + "StrictReservedWord" ]); var static_key_1 = { - TAG: /* Identifier */1, + TAG: "Identifier", _0: [ start_loc, { @@ -7567,7 +7581,7 @@ function properties(allow_static, env, _param) { exit$1 = 4; } if (exit$1 === 4) { - push_lex_mode(env, /* NORMAL */0); + push_lex_mode(env, "NORMAL"); var key = Curry._1(Parse.object_key, env); pop_lex_mode(env); match$2 = [ @@ -7579,10 +7593,10 @@ function properties(allow_static, env, _param) { var $$static$1 = match$2[0]; var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); var property$1; - if (/* tag */typeof match$3 === "number") { + if (typeof match$3 !== "object") { switch (match$3) { - case /* T_LPAREN */3 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_LESS_THAN" : property$1 = method_property(env, start_loc, $$static$1, key$1); break; default: @@ -7627,14 +7641,14 @@ function properties(allow_static, env, _param) { function _object(allow_staticOpt, env) { var allow_static = allow_staticOpt !== undefined ? allow_staticOpt : false; var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var match = properties(allow_static, env, [ /* [] */0, /* [] */0, /* [] */0 ]); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return [ btwn(start_loc, end_loc), { @@ -7649,10 +7663,10 @@ function types(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RBRACKET */6 : - case /* T_EOF */105 : + case "T_RBRACKET" : + case "T_EOF" : return List.rev(acc); default: @@ -7663,8 +7677,8 @@ function types(env, _acc) { hd: acc_0, tl: acc }; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RBRACKET */6) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RBRACKET") { + token$4(env, "T_COMMA"); } _acc = acc$1; continue ; @@ -7675,10 +7689,10 @@ function params$1(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_GREATER_THAN */90 : - case /* T_EOF */105 : + case "T_GREATER_THAN" : + case "T_EOF" : return List.rev(acc); default: @@ -7689,8 +7703,8 @@ function params$1(env, _acc) { hd: acc_0, tl: acc }; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_GREATER_THAN */90) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_GREATER_THAN") { + token$4(env, "T_COMMA"); } _acc = acc$1; continue ; @@ -7699,13 +7713,13 @@ function params$1(env, _acc) { function type_parameter_instantiation(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_LESS_THAN */89) { + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_LESS_THAN") { return ; } - token$4(env, /* T_LESS_THAN */89); + token$4(env, "T_LESS_THAN"); var params$2 = params$1(env, /* [] */0); var loc = btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); - token$4(env, /* T_GREATER_THAN */90); + token$4(env, "T_GREATER_THAN"); return [ loc, { @@ -7719,17 +7733,17 @@ function identifier(env, _param) { var param = _param; var qualification = param[1]; var q_loc = param[0]; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_PERIOD */9) { + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_PERIOD") { return [ q_loc, qualification ]; } - token$4(env, /* T_PERIOD */9); + token$4(env, "T_PERIOD"); var id = Curry._2(Parse.identifier, undefined, env); var loc = btwn(q_loc, id[0]); var qualification$1 = { - TAG: /* Qualified */1, + TAG: "Qualified", _0: [ loc, { @@ -7749,7 +7763,7 @@ function identifier(env, _param) { function raw_generic_with_identifier(env, id) { var id_0 = id[0]; var id_1 = { - TAG: /* Unqualified */0, + TAG: "Unqualified", _0: id }; var id$1 = [ @@ -7770,7 +7784,7 @@ function raw_generic_with_identifier(env, id) { } function union_with(env, left) { - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_BIT_OR */80) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_BIT_OR") { var _acc = { hd: left, tl: /* [] */0 @@ -7778,8 +7792,8 @@ function union_with(env, left) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_BIT_OR */80) { - token$4(env, /* T_BIT_OR */80); + if (typeof match !== "object" && match === "T_BIT_OR") { + token$4(env, "T_BIT_OR"); _acc = { hd: intersection(env), tl: acc @@ -7790,7 +7804,7 @@ function union_with(env, left) { return [ match$1[0], { - TAG: /* Union */5, + TAG: "Union", _0: match$1[1] } ]; @@ -7804,10 +7818,10 @@ var _type = union; function annotation(env) { if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAnnotation */6); + error(env, "UnexpectedTypeAnnotation"); } var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); var typeAnnotation = union(env); var loc = env.last_loc.contents; var end_loc; @@ -7832,7 +7846,7 @@ function annotation(env) { function annotation_opt(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_COLON */77) { + if (typeof match !== "object" && match === "T_COLON") { return annotation(env); } @@ -7840,7 +7854,7 @@ function annotation_opt(env) { function wrap(f, env) { var env$1 = with_strict(true, env); - push_lex_mode(env$1, /* TYPE */1); + push_lex_mode(env$1, "TYPE"); var ret = Curry._1(f, env$1); pop_lex_mode(env$1); return ret; @@ -7867,17 +7881,17 @@ function pattern(check_env, _param) { while(true) { var param = _param; var p = param[1]; - switch (p.TAG | 0) { - case /* Object */0 : + switch (p.TAG) { + case "Object" : var o = p._0; return List.fold_left(object_property, check_env, o.properties); - case /* Array */1 : + case "Array" : var arr = p._0; return List.fold_left(array_element, check_env, arr.elements); - case /* Assignment */2 : + case "Assignment" : _param = p._0.left; continue ; - case /* Identifier */3 : + case "Identifier" : var id = p._0; var name = id[1].name; var param_names = check_env[1]; @@ -7885,7 +7899,7 @@ function pattern(check_env, _param) { if (mem$1(name, param_names)) { error_at(env, [ id[0], - /* StrictParamDupe */29 + "StrictParamDupe" ]); } var match = identifier_no_dupe_check([ @@ -7896,10 +7910,10 @@ function pattern(check_env, _param) { match[0], add$1(name, match[1]) ]; - case /* Expression */4 : + case "Expression" : error_at(check_env[0], [ param[0], - /* ExpectedPatternFoundExpression */18 + "ExpectedPatternFoundExpression" ]); return check_env; @@ -7908,18 +7922,18 @@ function pattern(check_env, _param) { } function object_property(check_env, param) { - if (param.TAG !== /* Property */0) { + if (param.TAG !== "Property") { return pattern(check_env, param._0[1].argument); } var property = param._0[1]; var id = property.key; var check_env$1; - switch (id.TAG | 0) { - case /* Identifier */1 : + switch (id.TAG) { + case "Identifier" : check_env$1 = identifier_no_dupe_check(check_env, id._0); break; - case /* Literal */0 : - case /* Computed */2 : + case "Literal" : + case "Computed" : check_env$1 = check_env; break; @@ -7929,7 +7943,7 @@ function object_property(check_env, param) { function array_element(check_env, param) { if (param !== undefined) { - if (param.TAG === /* Element */0) { + if (param.TAG === "Element") { return pattern(check_env, param._0); } else { return pattern(check_env, param._0[1].argument); @@ -7946,13 +7960,13 @@ function identifier_no_dupe_check(param, param$1) { if (is_restricted(name)) { strict_error_at(env, [ loc, - /* StrictParamName */28 + "StrictParamName" ]); } if (is_future_reserved(name) || is_strict_reserved(name)) { strict_error_at(env, [ loc, - /* StrictReservedWord */39 + "StrictReservedWord" ]); } return [ @@ -7972,32 +7986,32 @@ function strict_post_check(env, strict, simple, id, params) { if (is_restricted(name)) { strict_error_at(env$1, [ loc, - /* StrictFunctionName */30 + "StrictFunctionName" ]); } if (is_future_reserved(name) || is_strict_reserved(name)) { strict_error_at(env$1, [ loc, - /* StrictReservedWord */39 + "StrictReservedWord" ]); } } List.fold_left(pattern, [ env$1, - /* Empty */0 + "Empty" ], params); } function param$1(env) { - var id = Curry._2(Parse.pattern, env, /* StrictParamName */28); - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_ASSIGN */75) { + var id = Curry._2(Parse.pattern, env, "StrictParamName"); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_ASSIGN") { return [ id, undefined ]; } - token$4(env, /* T_ASSIGN */75); + token$4(env, "T_ASSIGN"); var $$default = Curry._1(Parse.assignment, env); return [ id, @@ -8013,11 +8027,11 @@ function param_list(env, _param) { var params = param$2[0]; var t = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof t === "number") { + if (typeof t !== "object") { switch (t) { - case /* T_RPAREN */4 : - case /* T_ELLIPSIS */11 : - case /* T_EOF */105 : + case "T_RPAREN" : + case "T_ELLIPSIS" : + case "T_EOF" : exit = 2; break; default: @@ -8031,8 +8045,8 @@ function param_list(env, _param) { var match = param$1(env); var $$default = match[1]; var has_default$1 = has_default || $$default !== undefined; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RPAREN */4) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RPAREN") { + token$4(env, "T_COMMA"); } _param = [ { @@ -8047,9 +8061,9 @@ function param_list(env, _param) { ]; continue ; case 2 : - var rest = t === /* T_ELLIPSIS */11 ? (token$4(env, /* T_ELLIPSIS */11), Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28)) : undefined; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RPAREN */4) { - error(env, /* ParameterAfterRestParameter */47); + var rest = t === "T_ELLIPSIS" ? (token$4(env, "T_ELLIPSIS"), Curry._2(Parse.identifier_with_type, env, "StrictParamName")) : undefined; + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RPAREN") { + error(env, "ParameterAfterRestParameter"); } return [ List.rev(params), @@ -8062,13 +8076,13 @@ function param_list(env, _param) { } function function_params(env) { - token$4(env, /* T_LPAREN */3); + token$4(env, "T_LPAREN"); var match = param_list(env, [ /* [] */0, /* [] */0, false ]); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); return [ match[0], match[1], @@ -8083,7 +8097,7 @@ function function_body(env, async, generator) { return [ loc, { - TAG: /* BodyBlock */0, + TAG: "BodyBlock", _0: [ loc, match[1] @@ -8094,9 +8108,9 @@ function function_body(env, async, generator) { } function generator(env, is_async) { - var match = maybe(env, /* T_MULT */97); + var match = maybe(env, "T_MULT"); if (is_async && match) { - error(env, /* AsyncGenerator */48); + error(env, "AsyncGenerator"); return true; } else { return match; @@ -8104,7 +8118,7 @@ function generator(env, is_async) { } function is_simple_param(param) { - if (param[1].TAG === /* Identifier */3) { + if (param[1].TAG === "Identifier") { return true; } else { return false; @@ -8121,24 +8135,24 @@ function is_simple_function_params(params, defaults, rest) { function _function(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var async = maybe(env, /* T_ASYNC */61); - token$4(env, /* T_FUNCTION */13); + var async = maybe(env, "T_ASYNC"); + token$4(env, "T_FUNCTION"); var generator$1 = generator(env, async); var match = env.in_export; var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var match$2; var exit = 0; - if (match && /* tag */typeof match$1 === "number") { + if (match && typeof match$1 !== "object") { switch (match$1) { - case /* T_LPAREN */3 : + case "T_LPAREN" : match$2 = [ undefined, undefined ]; break; - case /* T_LESS_THAN */89 : + case "T_LESS_THAN" : var typeParams = Curry._1(type_parameter_declaration$1, env); - var id = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LPAREN */3 ? undefined : Curry._2(Parse.identifier, /* StrictFunctionName */30, env); + var id = Curry._2(Parser_env_Peek.token, undefined, env) === "T_LPAREN" ? undefined : Curry._2(Parse.identifier, "StrictFunctionName", env); match$2 = [ typeParams, id @@ -8151,7 +8165,7 @@ function _function(env) { exit = 1; } if (exit === 1) { - var id$1 = Curry._2(Parse.identifier, /* StrictFunctionName */30, env); + var id$1 = Curry._2(Parse.identifier, "StrictFunctionName", env); match$2 = [ Curry._1(type_parameter_declaration$1, env), id$1 @@ -8169,7 +8183,7 @@ function _function(env) { var simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$4[2], simple, id$2, params); var match$5; - match$5 = body.TAG === /* BodyBlock */0 ? [ + match$5 = body.TAG === "BodyBlock" ? [ body._0[0], false ] : [ @@ -8179,7 +8193,7 @@ function _function(env) { return [ btwn(start_loc, match$5[0]), { - TAG: /* FunctionDeclaration */18, + TAG: "FunctionDeclaration", _0: { id: id$2, params: params, @@ -8198,16 +8212,16 @@ function _function(env) { } function variable_declaration(env) { - var id = Curry._2(Parse.pattern, env, /* StrictVarName */27); + var id = Curry._2(Parse.pattern, env, "StrictVarName"); var match; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_ASSIGN */75) { - token$4(env, /* T_ASSIGN */75); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_ASSIGN") { + token$4(env, "T_ASSIGN"); match = [ Curry._1(Parse.assignment, env), /* [] */0 ]; } else { - match = id[1].TAG === /* Identifier */3 ? [ + match = id[1].TAG === "Identifier" ? [ undefined, /* [] */0 ] : [ @@ -8215,7 +8229,7 @@ function variable_declaration(env) { { hd: [ id[0], - /* NoUninitializedDestructuring */43 + "NoUninitializedDestructuring" ], tl: /* [] */0 } @@ -8246,8 +8260,8 @@ function helper(env, _decls, _errs) { tl: decls }; var errs$1 = Pervasives.$at(match[1], errs); - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_COMMA */8) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_COMMA") { + token$4(env, "T_COMMA"); _errs = errs$1; _decls = decls$1; continue ; @@ -8281,7 +8295,7 @@ function declarations(token$5, kind, env) { function $$const(env) { var env$1 = with_no_let(true, env); - var match = declarations(/* T_CONST */25, /* Const */2, env$1); + var match = declarations("T_CONST", "Const", env$1); var match$1 = match[0]; var variable = match$1[1]; var errs = List.fold_left((function (errs, decl) { @@ -8291,7 +8305,7 @@ function $$const(env) { return { hd: [ decl[0], - /* NoUninitializedConst */42 + "NoUninitializedConst" ], tl: errs }; @@ -8308,38 +8322,38 @@ function $$const(env) { function _let(env) { var env$1 = with_no_let(true, env); - return declarations(/* T_LET */26, /* Let */1, env$1); + return declarations("T_LET", "Let", env$1); } function variable(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var match = Curry._2(Parser_env_Peek.token, undefined, env); var match$1; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_VAR */22 : - match$1 = declarations(/* T_VAR */22, /* Var */0, env); + case "T_VAR" : + match$1 = declarations("T_VAR", "Var", env); break; - case /* T_CONST */25 : + case "T_CONST" : match$1 = $$const(env); break; - case /* T_LET */26 : + case "T_LET" : match$1 = _let(env); break; default: error_unexpected(env); - match$1 = declarations(/* T_VAR */22, /* Var */0, env); + match$1 = declarations("T_VAR", "Var", env); } } else { error_unexpected(env); - match$1 = declarations(/* T_VAR */22, /* Var */0, env); + match$1 = declarations("T_VAR", "Var", env); } var match$2 = match$1[0]; return [ [ btwn(start_loc, match$2[0]), { - TAG: /* VariableDeclaration */19, + TAG: "VariableDeclaration", _0: match$2[1] } ], @@ -8349,18 +8363,18 @@ function variable(env) { function is_tighter(a, b) { var a_prec; - a_prec = a.TAG === /* Left_assoc */0 ? a._0 : a._0 - 1 | 0; + a_prec = a.TAG === "Left_assoc" ? a._0 : a._0 - 1 | 0; return a_prec >= b._0; } function is_lhs(param) { var tmp = param[1]; - if (/* tag */typeof tmp === "number") { + if (typeof tmp !== "object") { return false; } - switch (tmp.TAG | 0) { - case /* Member */13 : - case /* Identifier */18 : + switch (tmp.TAG) { + case "Member" : + case "Identifier" : return true; default: return false; @@ -8369,14 +8383,14 @@ function is_lhs(param) { function is_assignable_lhs(param) { var tmp = param[1]; - if (/* tag */typeof tmp === "number") { + if (typeof tmp !== "object") { return false; } - switch (tmp.TAG | 0) { - case /* Array */0 : - case /* Object */1 : - case /* Member */13 : - case /* Identifier */18 : + switch (tmp.TAG) { + case "Array" : + case "Object" : + case "Member" : + case "Identifier" : return true; default: return false; @@ -8386,46 +8400,46 @@ function is_assignable_lhs(param) { function assignment_op(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var op; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RSHIFT3_ASSIGN */63 : - op = /* RShift3Assign */9; + case "T_RSHIFT3_ASSIGN" : + op = "RShift3Assign"; break; - case /* T_RSHIFT_ASSIGN */64 : - op = /* RShiftAssign */8; + case "T_RSHIFT_ASSIGN" : + op = "RShiftAssign"; break; - case /* T_LSHIFT_ASSIGN */65 : - op = /* LShiftAssign */7; + case "T_LSHIFT_ASSIGN" : + op = "LShiftAssign"; break; - case /* T_BIT_XOR_ASSIGN */66 : - op = /* BitXorAssign */11; + case "T_BIT_XOR_ASSIGN" : + op = "BitXorAssign"; break; - case /* T_BIT_OR_ASSIGN */67 : - op = /* BitOrAssign */10; + case "T_BIT_OR_ASSIGN" : + op = "BitOrAssign"; break; - case /* T_BIT_AND_ASSIGN */68 : - op = /* BitAndAssign */12; + case "T_BIT_AND_ASSIGN" : + op = "BitAndAssign"; break; - case /* T_MOD_ASSIGN */69 : - op = /* ModAssign */6; + case "T_MOD_ASSIGN" : + op = "ModAssign"; break; - case /* T_DIV_ASSIGN */70 : - op = /* DivAssign */5; + case "T_DIV_ASSIGN" : + op = "DivAssign"; break; - case /* T_MULT_ASSIGN */71 : - op = /* MultAssign */3; + case "T_MULT_ASSIGN" : + op = "MultAssign"; break; - case /* T_EXP_ASSIGN */72 : - op = /* ExpAssign */4; + case "T_EXP_ASSIGN" : + op = "ExpAssign"; break; - case /* T_MINUS_ASSIGN */73 : - op = /* MinusAssign */2; + case "T_MINUS_ASSIGN" : + op = "MinusAssign"; break; - case /* T_PLUS_ASSIGN */74 : - op = /* PlusAssign */1; + case "T_PLUS_ASSIGN" : + op = "PlusAssign"; break; - case /* T_ASSIGN */75 : - op = /* Assign */0; + case "T_ASSIGN" : + op = "Assign"; break; default: op = undefined; @@ -8442,19 +8456,19 @@ function assignment_op(env) { function conditional(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var expr = Curry._1(logical, env); - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_PLING */76) { + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_PLING") { return expr; } - token$4(env, /* T_PLING */76); + token$4(env, "T_PLING"); var env$p = with_no_in(false, env); var consequent = Curry._1(assignment, env$p); - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); var match = with_loc(assignment, env); var loc = btwn(start_loc, match[0]); return [ loc, { - TAG: /* Conditional */10, + TAG: "Conditional", _0: { test: expr, consequent: consequent, @@ -8466,30 +8480,30 @@ function conditional(env) { function peek_unary_op(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return ; } switch (match) { - case /* T_DELETE */43 : - return /* Delete */6; - case /* T_TYPEOF */44 : - return /* Typeof */4; - case /* T_VOID */45 : - return /* Void */5; - case /* T_AWAIT */62 : + case "T_DELETE" : + return "Delete"; + case "T_TYPEOF" : + return "Typeof"; + case "T_VOID" : + return "Void"; + case "T_AWAIT" : if (env.allow_await) { - return /* Await */7; + return "Await"; } else { return ; } - case /* T_PLUS */94 : - return /* Plus */1; - case /* T_MINUS */95 : - return /* Minus */0; - case /* T_NOT */100 : - return /* Not */2; - case /* T_BIT_NOT */101 : - return /* BitNot */3; + case "T_PLUS" : + return "Plus"; + case "T_MINUS" : + return "Minus"; + case "T_NOT" : + return "Not"; + case "T_BIT_NOT" : + return "BitNot"; default: return ; } @@ -8502,12 +8516,12 @@ function unary(env) { token$3(env); var argument = unary(env); var loc = btwn(begin_loc, argument[0]); - if (op === /* Delete */6) { + if (op === "Delete") { var tmp = argument[1]; - if (/* tag */typeof tmp !== "number" && tmp.TAG === /* Identifier */18) { + if (typeof tmp === "object" && tmp.TAG === "Identifier") { strict_error_at(env, [ loc, - /* StrictDelete */32 + "StrictDelete" ]); } @@ -8515,7 +8529,7 @@ function unary(env) { return [ loc, { - TAG: /* Unary */5, + TAG: "Unary", _0: { operator: op, prefix: true, @@ -8526,13 +8540,13 @@ function unary(env) { } var match = Curry._2(Parser_env_Peek.token, undefined, env); var op$1; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_INCR */102 : - op$1 = /* Increment */0; + case "T_INCR" : + op$1 = "Increment"; break; - case /* T_DECR */103 : - op$1 = /* Decrement */1; + case "T_DECR" : + op$1 = "Decrement"; break; default: op$1 = undefined; @@ -8547,13 +8561,13 @@ function unary(env) { } var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var op$2; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { switch (match$1) { - case /* T_INCR */102 : - op$2 = /* Increment */0; + case "T_INCR" : + op$2 = "Increment"; break; - case /* T_DECR */103 : - op$2 = /* Decrement */1; + case "T_DECR" : + op$2 = "Decrement"; break; default: op$2 = undefined; @@ -8567,13 +8581,13 @@ function unary(env) { if (!is_lhs(argument$1)) { error_at(env, [ argument$1[0], - /* InvalidLHSInAssignment */14 + "InvalidLHSInAssignment" ]); } var match$2 = argument$1[1]; - if (/* tag */typeof match$2 !== "number" && match$2.TAG === /* Identifier */18) { + if (typeof match$2 === "object" && match$2.TAG === "Identifier") { if (is_restricted(match$2._0[1].name)) { - strict_error(env, /* StrictLHSPostfix */37); + strict_error(env, "StrictLHSPostfix"); } } @@ -8582,7 +8596,7 @@ function unary(env) { return [ btwn(argument$1[0], end_loc), { - TAG: /* Update */8, + TAG: "Update", _0: { operator: op$2, argument: argument$1, @@ -8596,20 +8610,20 @@ function unary(env) { if (!is_lhs(argument$2)) { error_at(env, [ argument$2[0], - /* InvalidLHSInAssignment */14 + "InvalidLHSInAssignment" ]); } var match$3 = argument$2[1]; - if (/* tag */typeof match$3 !== "number" && match$3.TAG === /* Identifier */18) { + if (typeof match$3 === "object" && match$3.TAG === "Identifier") { if (is_restricted(match$3._0[1].name)) { - strict_error(env, /* StrictLHSPrefix */38); + strict_error(env, "StrictLHSPrefix"); } } return [ btwn(begin_loc, argument$2[0]), { - TAG: /* Update */8, + TAG: "Update", _0: { operator: op$1, argument: argument$2, @@ -8623,7 +8637,7 @@ function left_hand_side(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var expr; var exit = 0; - if (/* tag */typeof match === "number" && match === /* T_NEW */42) { + if (typeof match !== "object" && match === "T_NEW") { expr = _new(env, (function (new_expr, _args) { return new_expr; })); @@ -8635,13 +8649,13 @@ function left_hand_side(env) { } var expr$1 = member(env, expr); var part = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof part === "number") { - if (part === /* T_LPAREN */3) { + if (typeof part !== "object") { + if (part === "T_LPAREN") { return call(env, expr$1); } else { return expr$1; } - } else if (part.TAG === /* T_TEMPLATE_PART */2) { + } else if (part.TAG === "T_TEMPLATE_PART") { return member(env, tagged_template(env, expr$1, part._0)); } else { return expr$1; @@ -8652,15 +8666,15 @@ function call(env, _left) { while(true) { var left = _left; var part = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof part !== "number") { - if (part.TAG === /* T_TEMPLATE_PART */2) { + if (typeof part === "object") { + if (part.TAG === "T_TEMPLATE_PART") { return tagged_template(env, left, part._0); } else { return left; } } switch (part) { - case /* T_LPAREN */3 : + case "T_LPAREN" : if (env.no_call) { return left; } @@ -8668,7 +8682,7 @@ function call(env, _left) { _left = [ btwn(left[0], match[0]), { - TAG: /* Call */12, + TAG: "Call", _0: { callee: left, arguments: match[1] @@ -8676,20 +8690,20 @@ function call(env, _left) { } ]; continue ; - case /* T_LBRACKET */5 : - token$4(env, /* T_LBRACKET */5); + case "T_LBRACKET" : + token$4(env, "T_LBRACKET"); var expr = Curry._1(Parse.expression, env); var last_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var loc = btwn(left[0], last_loc); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); _left = [ loc, { - TAG: /* Member */13, + TAG: "Member", _0: { _object: left, property: { - TAG: /* PropertyExpression */1, + TAG: "PropertyExpression", _0: expr }, computed: true @@ -8697,18 +8711,18 @@ function call(env, _left) { } ]; continue ; - case /* T_PERIOD */9 : - token$4(env, /* T_PERIOD */9); + case "T_PERIOD" : + token$4(env, "T_PERIOD"); var match$1 = identifier_or_reserved_keyword(env); var id = match$1[0]; _left = [ btwn(left[0], id[0]), { - TAG: /* Member */13, + TAG: "Member", _0: { _object: left, property: { - TAG: /* PropertyIdentifier */0, + TAG: "PropertyIdentifier", _0: id }, computed: false @@ -8726,9 +8740,9 @@ function _new(env, _finish_fn) { while(true) { var finish_fn = _finish_fn; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_NEW */42) { + if (typeof match !== "object" && match === "T_NEW") { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_NEW */42); + token$4(env, "T_NEW"); var finish_fn$p = (function(finish_fn,start_loc){ return function finish_fn$p(callee, args) { var match = args !== undefined ? [ @@ -8740,7 +8754,7 @@ function _new(env, _finish_fn) { ]; var callee$p_0 = btwn(start_loc, match[0]); var callee$p_1 = { - TAG: /* New */11, + TAG: "New", _0: { callee: callee, arguments: match[1] @@ -8761,51 +8775,51 @@ function _new(env, _finish_fn) { var callee = member(with_no_call(true, env), expr); var part = Curry._2(Parser_env_Peek.token, undefined, env); var callee$1; - callee$1 = /* tag */typeof part === "number" || part.TAG !== /* T_TEMPLATE_PART */2 ? callee : tagged_template(env, callee, part._0); + callee$1 = typeof part !== "object" || part.TAG !== "T_TEMPLATE_PART" ? callee : tagged_template(env, callee, part._0); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var args; - args = /* tag */typeof match$1 === "number" && match$1 === /* T_LPAREN */3 ? Curry._1($$arguments, env) : undefined; + args = typeof match$1 !== "object" && match$1 === "T_LPAREN" ? Curry._1($$arguments, env) : undefined; return Curry._2(finish_fn, callee$1, args); }; } function member(env, left) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return left; } switch (match) { - case /* T_LBRACKET */5 : - token$4(env, /* T_LBRACKET */5); + case "T_LBRACKET" : + token$4(env, "T_LBRACKET"); var expr = Curry._1(Parse.expression, with_no_call(false, env)); var last_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); return call(env, [ btwn(left[0], last_loc), { - TAG: /* Member */13, + TAG: "Member", _0: { _object: left, property: { - TAG: /* PropertyExpression */1, + TAG: "PropertyExpression", _0: expr }, computed: true } } ]); - case /* T_PERIOD */9 : - token$4(env, /* T_PERIOD */9); + case "T_PERIOD" : + token$4(env, "T_PERIOD"); var match$1 = identifier_or_reserved_keyword(env); var id = match$1[0]; return call(env, [ btwn(left[0], id[0]), { - TAG: /* Member */13, + TAG: "Member", _0: { _object: left, property: { - TAG: /* PropertyIdentifier */0, + TAG: "PropertyIdentifier", _0: id }, computed: false @@ -8819,11 +8833,11 @@ function member(env, left) { function _function$1(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - var async = maybe(env, /* T_ASYNC */61); - token$4(env, /* T_FUNCTION */13); + var async = maybe(env, "T_ASYNC"); + token$4(env, "T_FUNCTION"); var generator$1 = generator(env, async); var match; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LPAREN */3) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_LPAREN") { match = [ undefined, undefined @@ -8831,7 +8845,7 @@ function _function$1(env) { } else { var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var id; - id = /* tag */typeof match$1 === "number" && match$1 === /* T_LESS_THAN */89 ? undefined : Curry._2(Parse.identifier, /* StrictFunctionName */30, env); + id = typeof match$1 !== "object" && match$1 === "T_LESS_THAN" ? undefined : Curry._2(Parse.identifier, "StrictFunctionName", env); match = [ id, Curry._1(type_parameter_declaration$1, env) @@ -8849,11 +8863,11 @@ function _function$1(env) { var simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$3[2], simple, id$1, params); var expression; - expression = body.TAG === /* BodyBlock */0 ? false : true; + expression = body.TAG === "BodyBlock" ? false : true; return [ btwn(start_loc, match$3[0]), { - TAG: /* Function */2, + TAG: "Function", _0: { id: id$1, params: params, @@ -8875,21 +8889,21 @@ function number(env, number_type) { var value = Curry._2(Parser_env_Peek.value, undefined, env); var value$1; switch (number_type) { - case /* LEGACY_OCTAL */1 : - strict_error(env, /* StrictOctalLiteral */31); + case "LEGACY_OCTAL" : + strict_error(env, "StrictOctalLiteral"); value$1 = Caml_format.int_of_string("0o" + value); break; - case /* BINARY */0 : - case /* OCTAL */2 : + case "BINARY" : + case "OCTAL" : value$1 = Caml_format.int_of_string(value); break; - case /* NORMAL */3 : + case "NORMAL" : try { value$1 = float_of_string(value); } catch (exn){ if (Sys.win32) { - error(env, /* WindowsFloatOfString */59); + error(env, "WindowsFloatOfString"); value$1 = 789.0; } else { throw exn; @@ -8899,7 +8913,7 @@ function number(env, number_type) { } token$4(env, { - TAG: /* T_NUMBER */0, + TAG: "T_NUMBER", _0: number_type }); return value$1; @@ -8909,36 +8923,36 @@ function primary$1(env) { var loc = Curry._2(Parser_env_Peek.loc, undefined, env); var number_type = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof number_type === "number") { + if (typeof number_type !== "object") { switch (number_type) { - case /* T_LCURLY */1 : + case "T_LCURLY" : var match = Curry._1(Parse.object_initializer, env); return [ match[0], { - TAG: /* Object */1, + TAG: "Object", _0: match[1] } ]; - case /* T_LPAREN */3 : - token$4(env, /* T_LPAREN */3); + case "T_LPAREN" : + token$4(env, "T_LPAREN"); var expression = Curry._1(assignment, env); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var ret; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { switch (match$1) { - case /* T_COMMA */8 : + case "T_COMMA" : ret = sequence(env, { hd: expression, tl: /* [] */0 }); break; - case /* T_COLON */77 : + case "T_COLON" : var typeAnnotation = wrap(annotation, env); ret = [ btwn(expression[0], typeAnnotation[0]), { - TAG: /* TypeCast */24, + TAG: "TypeCast", _0: { expression: expression, typeAnnotation: typeAnnotation @@ -8952,45 +8966,45 @@ function primary$1(env) { } else { ret = expression; } - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); return ret; - case /* T_LBRACKET */5 : + case "T_LBRACKET" : var match$2 = Curry._1(array_initializer, env); return [ match$2[0], { - TAG: /* Array */0, + TAG: "Array", _0: match$2[1] } ]; - case /* T_THIS */19 : - token$4(env, /* T_THIS */19); + case "T_THIS" : + token$4(env, "T_THIS"); return [ loc, - /* This */0 + "This" ]; - case /* T_NULL */27 : + case "T_NULL" : var raw = Curry._2(Parser_env_Peek.value, undefined, env); - token$4(env, /* T_NULL */27); + token$4(env, "T_NULL"); return [ loc, { - TAG: /* Literal */19, + TAG: "Literal", _0: { - value: /* Null */0, + value: "Null", raw: raw } } ]; - case /* T_FALSE */28 : - case /* T_TRUE */29 : + case "T_FALSE" : + case "T_TRUE" : exit = 2; break; - case /* T_CLASS */38 : + case "T_CLASS" : return Curry._1(Parse.class_expression, env); - case /* T_SUPER */49 : + case "T_SUPER" : var loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_SUPER */49); + token$4(env, "T_SUPER"); var id_1 = { name: "super", typeAnnotation: undefined, @@ -9003,26 +9017,26 @@ function primary$1(env) { return [ loc$1, { - TAG: /* Identifier */18, + TAG: "Identifier", _0: id } ]; - case /* T_LESS_THAN */89 : + case "T_LESS_THAN" : var match$3 = Curry._1(Parse.jsx_element, env); return [ match$3[0], { - TAG: /* JSXElement */22, + TAG: "JSXElement", _0: match$3[1] } ]; - case /* T_DIV_ASSIGN */70 : - case /* T_DIV */96 : - push_lex_mode(env, /* REGEXP */5); + case "T_DIV_ASSIGN" : + case "T_DIV" : + push_lex_mode(env, "REGEXP"); var loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); var match$4 = Curry._2(Parser_env_Peek.token, undefined, env); var match$5; - if (/* tag */typeof match$4 === "number") { + if (typeof match$4 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -9033,7 +9047,7 @@ function primary$1(env) { Error: new Error() }; } - if (match$4.TAG === /* T_REGEXP */3) { + if (match$4.TAG === "T_REGEXP") { var match$6 = match$4._0; var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); token$3(env); @@ -9083,12 +9097,12 @@ function primary$1(env) { var flags = $$Buffer.contents(filtered_flags); if (flags !== raw_flags) { error(env, { - TAG: /* InvalidRegExpFlags */3, + TAG: "InvalidRegExpFlags", _0: raw_flags }); } var value = { - TAG: /* RegExp */3, + TAG: "RegExp", _0: { pattern: match$5[1], flags: flags @@ -9097,7 +9111,7 @@ function primary$1(env) { return [ loc$2, { - TAG: /* Literal */19, + TAG: "Literal", _0: { value: value, raw: match$5[0] @@ -9108,34 +9122,34 @@ function primary$1(env) { exit = 1; } } else { - switch (number_type.TAG | 0) { - case /* T_NUMBER */0 : + switch (number_type.TAG) { + case "T_NUMBER" : var raw$2 = Curry._2(Parser_env_Peek.value, undefined, env); var value$1 = { - TAG: /* Number */2, + TAG: "Number", _0: number(env, number_type._0) }; return [ loc, { - TAG: /* Literal */19, + TAG: "Literal", _0: { value: value$1, raw: raw$2 } } ]; - case /* T_STRING */1 : + case "T_STRING" : var match$7 = number_type._0; var octal = match$7[3]; var raw$3 = match$7[2]; var value$2 = match$7[1]; var loc$3 = match$7[0]; if (octal) { - strict_error(env, /* StrictOctalLiteral */31); + strict_error(env, "StrictOctalLiteral"); } token$4(env, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ loc$3, value$2, @@ -9144,25 +9158,25 @@ function primary$1(env) { ] }); var value$3 = { - TAG: /* String */0, + TAG: "String", _0: value$2 }; return [ loc$3, { - TAG: /* Literal */19, + TAG: "Literal", _0: { value: value$3, raw: raw$3 } } ]; - case /* T_TEMPLATE_PART */2 : + case "T_TEMPLATE_PART" : var match$8 = Curry._2(template_literal, env, number_type._0); return [ match$8[0], { - TAG: /* TemplateLiteral */20, + TAG: "TemplateLiteral", _0: match$8[1] } ]; @@ -9177,21 +9191,21 @@ function primary$1(env) { return [ id$1[0], { - TAG: /* Identifier */18, + TAG: "Identifier", _0: id$1 } ]; } error_unexpected(env); - if (number_type === /* T_ERROR */104) { + if (number_type === "T_ERROR") { token$3(env); } return [ loc, { - TAG: /* Literal */19, + TAG: "Literal", _0: { - value: /* Null */0, + value: "Null", raw: "null" } } @@ -9200,13 +9214,13 @@ function primary$1(env) { var raw$4 = Curry._2(Parser_env_Peek.value, undefined, env); token$4(env, number_type); var value$4 = { - TAG: /* Boolean */1, - _0: number_type === /* T_TRUE */29 + TAG: "Boolean", + _0: number_type === "T_TRUE" }; return [ loc, { - TAG: /* Literal */19, + TAG: "Literal", _0: { value: value$4, raw: raw$4 @@ -9222,7 +9236,7 @@ function tagged_template(env, tag, part) { return [ btwn(tag[0], quasi[0]), { - TAG: /* TaggedTemplate */21, + TAG: "TaggedTemplate", _0: { tag: tag, quasi: quasi @@ -9235,8 +9249,8 @@ function sequence(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_COMMA */8) { - token$4(env, /* T_COMMA */8); + if (typeof match !== "object" && match === "T_COMMA") { + token$4(env, "T_COMMA"); var expr = Curry._1(assignment, env); _acc = { hd: expr, @@ -9250,7 +9264,7 @@ function sequence(env, _acc) { return [ btwn(first_loc, last_loc), { - TAG: /* Sequence */4, + TAG: "Sequence", _0: { expressions: expressions } @@ -9264,13 +9278,13 @@ function identifier_or_reserved_keyword(env) { var lex_value = Curry._2(Parser_env_Peek.value, undefined, env); var lex_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var exit = 0; - if (/* tag */typeof lex_token === "number") { + if (typeof lex_token !== "object") { switch (lex_token) { - case /* T_IDENTIFIER */0 : - case /* T_DECLARE */58 : - case /* T_TYPE */59 : - case /* T_OF */60 : - case /* T_ASYNC */61 : + case "T_IDENTIFIER" : + case "T_DECLARE" : + case "T_TYPE" : + case "T_OF" : + case "T_ASYNC" : exit = 2; break; default: @@ -9283,59 +9297,59 @@ function identifier_or_reserved_keyword(env) { case 1 : var err; var exit$1 = 0; - if (/* tag */typeof lex_token === "number") { + if (typeof lex_token !== "object") { switch (lex_token) { - case /* T_FUNCTION */13 : - case /* T_IF */14 : - case /* T_IN */15 : - case /* T_INSTANCEOF */16 : - case /* T_RETURN */17 : - case /* T_SWITCH */18 : - case /* T_THIS */19 : - case /* T_THROW */20 : - case /* T_TRY */21 : - case /* T_VAR */22 : - case /* T_WHILE */23 : - case /* T_WITH */24 : - case /* T_CONST */25 : - case /* T_LET */26 : - case /* T_NULL */27 : - case /* T_FALSE */28 : - case /* T_TRUE */29 : - case /* T_BREAK */30 : - case /* T_CASE */31 : - case /* T_CATCH */32 : - case /* T_CONTINUE */33 : - case /* T_DEFAULT */34 : - case /* T_DO */35 : - case /* T_FINALLY */36 : - case /* T_FOR */37 : - case /* T_CLASS */38 : - case /* T_EXTENDS */39 : - case /* T_STATIC */40 : - case /* T_ELSE */41 : - case /* T_NEW */42 : - case /* T_DELETE */43 : - case /* T_TYPEOF */44 : - case /* T_VOID */45 : - case /* T_ENUM */46 : - case /* T_EXPORT */47 : - case /* T_IMPORT */48 : - case /* T_SUPER */49 : - case /* T_IMPLEMENTS */50 : - case /* T_INTERFACE */51 : - case /* T_PACKAGE */52 : - case /* T_PRIVATE */53 : - case /* T_PROTECTED */54 : - case /* T_PUBLIC */55 : - case /* T_YIELD */56 : - case /* T_DEBUGGER */57 : - case /* T_AWAIT */62 : - case /* T_ANY_TYPE */107 : - case /* T_BOOLEAN_TYPE */108 : - case /* T_NUMBER_TYPE */109 : - case /* T_STRING_TYPE */110 : - case /* T_VOID_TYPE */111 : + case "T_FUNCTION" : + case "T_IF" : + case "T_IN" : + case "T_INSTANCEOF" : + case "T_RETURN" : + case "T_SWITCH" : + case "T_THIS" : + case "T_THROW" : + case "T_TRY" : + case "T_VAR" : + case "T_WHILE" : + case "T_WITH" : + case "T_CONST" : + case "T_LET" : + case "T_NULL" : + case "T_FALSE" : + case "T_TRUE" : + case "T_BREAK" : + case "T_CASE" : + case "T_CATCH" : + case "T_CONTINUE" : + case "T_DEFAULT" : + case "T_DO" : + case "T_FINALLY" : + case "T_FOR" : + case "T_CLASS" : + case "T_EXTENDS" : + case "T_STATIC" : + case "T_ELSE" : + case "T_NEW" : + case "T_DELETE" : + case "T_TYPEOF" : + case "T_VOID" : + case "T_ENUM" : + case "T_EXPORT" : + case "T_IMPORT" : + case "T_SUPER" : + case "T_IMPLEMENTS" : + case "T_INTERFACE" : + case "T_PACKAGE" : + case "T_PRIVATE" : + case "T_PROTECTED" : + case "T_PUBLIC" : + case "T_YIELD" : + case "T_DEBUGGER" : + case "T_AWAIT" : + case "T_ANY_TYPE" : + case "T_BOOLEAN_TYPE" : + case "T_NUMBER_TYPE" : + case "T_STRING_TYPE" : + case "T_VOID_TYPE" : exit$1 = 3; break; default: @@ -9385,15 +9399,15 @@ function assignment_but_not_arrow_function(env) { if (!is_assignable_lhs(expr)) { error_at(env, [ expr[0], - /* InvalidLHSInAssignment */14 + "InvalidLHSInAssignment" ]); } var match = expr[1]; - if (/* tag */typeof match !== "number" && match.TAG === /* Identifier */18) { + if (typeof match === "object" && match.TAG === "Identifier") { if (is_restricted(match._0[1].name)) { strict_error_at(env, [ expr[0], - /* StrictLHSAssignment */36 + "StrictLHSAssignment" ]); } @@ -9404,7 +9418,7 @@ function assignment_but_not_arrow_function(env) { return [ loc, { - TAG: /* Assignment */7, + TAG: "Assignment", _0: { operator: operator, left: left, @@ -9425,10 +9439,10 @@ function try_assignment_but_not_arrow_function(env) { var env$1 = with_error_callback(error_callback, env); var ret = assignment_but_not_arrow_function(env$1); var match = Curry._2(Parser_env_Peek.token, undefined, env$1); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_ARROW */10 : - case /* T_COLON */77 : + case "T_ARROW" : + case "T_COLON" : throw { RE_EXN_ID: Parser_env_Try.Rollback, Error: new Error() @@ -9447,10 +9461,10 @@ function try_assignment_but_not_arrow_function(env) { }; } var match$1 = ret[1]; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { return ret; } - if (match$1.TAG !== /* Identifier */18) { + if (match$1.TAG !== "Identifier") { return ret; } if (match$1._0[1].name !== "async") { @@ -9469,17 +9483,17 @@ function assignment(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var match$1 = Curry._2(Parser_env_Peek.is_identifier, undefined, env); var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_YIELD */56 : + case "T_YIELD" : if (env.allow_yield) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_YIELD */56); + token$4(env, "T_YIELD"); if (!env.allow_yield) { - error(env, /* IllegalYield */24); + error(env, "IllegalYield"); } - var delegate = maybe(env, /* T_MULT */97); - var has_argument = !(Curry._2(Parser_env_Peek.token, undefined, env) === /* T_SEMICOLON */7 || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)); + var delegate = maybe(env, "T_MULT"); + var has_argument = !(Curry._2(Parser_env_Peek.token, undefined, env) === "T_SEMICOLON" || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)); var argument = delegate || has_argument ? Curry._1(assignment, env) : undefined; var end_loc; if (argument !== undefined) { @@ -9493,7 +9507,7 @@ function assignment(env) { return [ btwn(start_loc, end_loc), { - TAG: /* Yield */14, + TAG: "Yield", _0: { argument: argument, delegate: delegate @@ -9503,8 +9517,8 @@ function assignment(env) { } exit = 2; break; - case /* T_LPAREN */3 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_LESS_THAN" : break; default: exit = 2; @@ -9516,11 +9530,11 @@ function assignment(env) { return assignment_but_not_arrow_function(env); } var expr = Curry._2(Parser_env_Try.to_parse, env, try_assignment_but_not_arrow_function); - if (/* tag */typeof expr !== "number") { + if (typeof expr === "object") { return expr._0; } var expr$1 = Curry._2(Parser_env_Try.to_parse, env, try_arrow_function); - if (/* tag */typeof expr$1 === "number") { + if (typeof expr$1 !== "object") { return assignment_but_not_arrow_function(env); } else { return expr$1._0; @@ -9531,7 +9545,7 @@ function make_logical(left, right, operator, loc) { return [ loc, { - TAG: /* Logical */9, + TAG: "Logical", _0: { operator: operator, left: left, @@ -9546,23 +9560,23 @@ function logical_and(env, _left, _lloc) { var lloc = _lloc; var left = _left; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return [ lloc, left ]; } - if (match !== /* T_AND */79) { + if (match !== "T_AND") { return [ lloc, left ]; } - token$4(env, /* T_AND */79); + token$4(env, "T_AND"); var match$1 = with_loc(binary, env); var loc = btwn(lloc, match$1[0]); _lloc = loc; - _left = make_logical(left, match$1[1], /* And */1, loc); + _left = make_logical(left, match$1[1], "And", loc); continue ; }; } @@ -9572,24 +9586,24 @@ function logical_or(env, _left, _lloc) { var lloc = _lloc; var left = _left; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return [ lloc, left ]; } - if (match !== /* T_OR */78) { + if (match !== "T_OR") { return [ lloc, left ]; } - token$4(env, /* T_OR */78); + token$4(env, "T_OR"); var match$1 = with_loc(binary, env); var match$2 = logical_and(env, match$1[1], match$1[0]); var loc = btwn(lloc, match$2[0]); _lloc = loc; - _left = make_logical(left, match$2[1], /* Or */0, loc); + _left = make_logical(left, match$2[1], "Or", loc); continue ; }; } @@ -9603,202 +9617,202 @@ function logical(env) { function binary_op(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var ret; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_IN */15 : + case "T_IN" : ret = env.no_in ? undefined : [ - /* In */20, + "In", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 6 } ]; break; - case /* T_INSTANCEOF */16 : + case "T_INSTANCEOF" : ret = [ - /* Instanceof */21, + "Instanceof", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 6 } ]; break; - case /* T_BIT_OR */80 : + case "T_BIT_OR" : ret = [ - /* BitOr */17, + "BitOr", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 2 } ]; break; - case /* T_BIT_XOR */81 : + case "T_BIT_XOR" : ret = [ - /* Xor */18, + "Xor", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 3 } ]; break; - case /* T_BIT_AND */82 : + case "T_BIT_AND" : ret = [ - /* BitAnd */19, + "BitAnd", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 4 } ]; break; - case /* T_EQUAL */83 : + case "T_EQUAL" : ret = [ - /* Equal */0, + "Equal", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 5 } ]; break; - case /* T_NOT_EQUAL */84 : + case "T_NOT_EQUAL" : ret = [ - /* NotEqual */1, + "NotEqual", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 5 } ]; break; - case /* T_STRICT_EQUAL */85 : + case "T_STRICT_EQUAL" : ret = [ - /* StrictEqual */2, + "StrictEqual", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 5 } ]; break; - case /* T_STRICT_NOT_EQUAL */86 : + case "T_STRICT_NOT_EQUAL" : ret = [ - /* StrictNotEqual */3, + "StrictNotEqual", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 5 } ]; break; - case /* T_LESS_THAN_EQUAL */87 : + case "T_LESS_THAN_EQUAL" : ret = [ - /* LessThanEqual */5, + "LessThanEqual", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 6 } ]; break; - case /* T_GREATER_THAN_EQUAL */88 : + case "T_GREATER_THAN_EQUAL" : ret = [ - /* GreaterThanEqual */7, + "GreaterThanEqual", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 6 } ]; break; - case /* T_LESS_THAN */89 : + case "T_LESS_THAN" : ret = [ - /* LessThan */4, + "LessThan", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 6 } ]; break; - case /* T_GREATER_THAN */90 : + case "T_GREATER_THAN" : ret = [ - /* GreaterThan */6, + "GreaterThan", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 6 } ]; break; - case /* T_LSHIFT */91 : + case "T_LSHIFT" : ret = [ - /* LShift */8, + "LShift", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 7 } ]; break; - case /* T_RSHIFT */92 : + case "T_RSHIFT" : ret = [ - /* RShift */9, + "RShift", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 7 } ]; break; - case /* T_RSHIFT3 */93 : + case "T_RSHIFT3" : ret = [ - /* RShift3 */10, + "RShift3", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 7 } ]; break; - case /* T_PLUS */94 : + case "T_PLUS" : ret = [ - /* Plus */11, + "Plus", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 8 } ]; break; - case /* T_MINUS */95 : + case "T_MINUS" : ret = [ - /* Minus */12, + "Minus", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 8 } ]; break; - case /* T_DIV */96 : + case "T_DIV" : ret = [ - /* Div */15, + "Div", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 9 } ]; break; - case /* T_MULT */97 : + case "T_MULT" : ret = [ - /* Mult */13, + "Mult", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 9 } ]; break; - case /* T_EXP */98 : + case "T_EXP" : ret = [ - /* Exp */14, + "Exp", { - TAG: /* Right_assoc */1, + TAG: "Right_assoc", _0: 10 } ]; break; - case /* T_MOD */99 : + case "T_MOD" : ret = [ - /* Mod */16, + "Mod", { - TAG: /* Left_assoc */0, + TAG: "Left_assoc", _0: 9 } ]; @@ -9819,7 +9833,7 @@ function make_binary(left, right, operator, loc) { return [ loc, { - TAG: /* Binary */6, + TAG: "Binary", _0: { operator: operator, left: left, @@ -9878,10 +9892,10 @@ function binary(env) { var loc = env.last_loc.contents; var end_loc = loc !== undefined ? loc : right[0]; var right_loc = btwn(start_loc, end_loc); - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LESS_THAN */89) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_LESS_THAN") { var tmp = right[1]; - if (/* tag */typeof tmp !== "number" && tmp.TAG === /* JSXElement */22) { - error(env, /* AdjacentJSXElements */46); + if (typeof tmp === "object" && tmp.TAG === "JSXElement") { + error(env, "AdjacentJSXElements"); } } @@ -9906,10 +9920,10 @@ function binary(env) { }; } var rop = match[0]; - if (is_unary && rop === /* Exp */14) { + if (is_unary && rop === "Exp") { error_at(env, [ right_loc, - /* InvalidLHSInExponentiation */15 + "InvalidLHSInExponentiation" ]); } _stack = add_to_stack(right, [ @@ -9922,24 +9936,24 @@ function binary(env) { function argument(env) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return { - TAG: /* Expression */0, + TAG: "Expression", _0: Curry._1(assignment, env) }; } - if (match !== /* T_ELLIPSIS */11) { + if (match !== "T_ELLIPSIS") { return { - TAG: /* Expression */0, + TAG: "Expression", _0: Curry._1(assignment, env) }; } var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_ELLIPSIS */11); + token$4(env, "T_ELLIPSIS"); var argument$1 = Curry._1(assignment, env); var loc = btwn(start_loc, argument$1[0]); return { - TAG: /* Spread */1, + TAG: "Spread", _0: [ loc, { @@ -9953,10 +9967,10 @@ function arguments$p(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RPAREN */4 : - case /* T_EOF */105 : + case "T_RPAREN" : + case "T_EOF" : return List.rev(acc); default: @@ -9967,8 +9981,8 @@ function arguments$p(env, _acc) { hd: acc_0, tl: acc }; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RPAREN */4) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RPAREN") { + token$4(env, "T_COMMA"); } _acc = acc$1; continue ; @@ -9977,10 +9991,10 @@ function arguments$p(env, _acc) { function $$arguments(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_LPAREN"); var args = arguments$p(env, /* [] */0); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); return [ btwn(start_loc, end_loc), args @@ -9997,11 +10011,11 @@ function template_parts(env, _quasis, _expressions) { tl: expressions }; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_RCURLY */2) { - push_lex_mode(env, /* TEMPLATE */4); + if (typeof match !== "object" && match === "T_RCURLY") { + push_lex_mode(env, "TEMPLATE"); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var match$2; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -10012,7 +10026,7 @@ function template_parts(env, _quasis, _expressions) { Error: new Error() }; } - if (match$1.TAG === /* T_TEMPLATE_PART */2) { + if (match$1.TAG === "T_TEMPLATE_PART") { var match$3 = match$1._0; var tail = match$3[2]; var match$4 = match$3[1]; @@ -10089,7 +10103,7 @@ function template_literal(env, part) { var match = part[1]; var start_loc = part[0]; token$4(env, { - TAG: /* T_TEMPLATE_PART */2, + TAG: "T_TEMPLATE_PART", _0: part }); var head_1 = { @@ -10128,22 +10142,22 @@ function elements(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_COMMA */8 : - token$4(env, /* T_COMMA */8); + case "T_COMMA" : + token$4(env, "T_COMMA"); _acc = { hd: undefined, tl: acc }; continue ; - case /* T_ELLIPSIS */11 : + case "T_ELLIPSIS" : var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_ELLIPSIS */11); + token$4(env, "T_ELLIPSIS"); var argument = Curry._1(assignment, env); var loc = btwn(start_loc, argument[0]); var elem = { - TAG: /* Spread */1, + TAG: "Spread", _0: [ loc, { @@ -10156,19 +10170,19 @@ function elements(env, _acc) { tl: acc }; continue ; - case /* T_RBRACKET */6 : - case /* T_EOF */105 : + case "T_RBRACKET" : + case "T_EOF" : return List.rev(acc); default: } } var elem$1 = { - TAG: /* Expression */0, + TAG: "Expression", _0: Curry._1(assignment, env) }; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RBRACKET */6) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RBRACKET") { + token$4(env, "T_COMMA"); } _acc = { hd: elem$1, @@ -10180,10 +10194,10 @@ function elements(env, _acc) { function array_initializer(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LBRACKET */5); + token$4(env, "T_LBRACKET"); var elements$1 = elements(env, /* [] */0); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); return [ btwn(start_loc, end_loc), { @@ -10193,11 +10207,11 @@ function array_initializer(env) { } function error_callback$1(param, param$1) { - if (/* tag */typeof param$1 === "number") { + if (typeof param$1 !== "object") { switch (param$1) { - case /* StrictParamName */28 : - case /* NewlineBeforeArrow */44 : - case /* ParameterAfterRestParameter */47 : + case "StrictParamName" : + case "NewlineBeforeArrow" : + case "ParameterAfterRestParameter" : return ; default: throw { @@ -10216,14 +10230,14 @@ function error_callback$1(param, param$1) { function try_arrow_function(env) { var env$1 = with_error_callback(error_callback$1, env); var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); - var async = Curry._2(Parser_env_Peek.token, 1, env$1) !== /* T_ARROW */10 && maybe(env$1, /* T_ASYNC */61); + var async = Curry._2(Parser_env_Peek.token, 1, env$1) !== "T_ARROW" && maybe(env$1, "T_ASYNC"); var typeParameters = Curry._1(type_parameter_declaration$1, env$1); var match; if (Curry._2(Parser_env_Peek.is_identifier, undefined, env$1) && typeParameters === undefined) { - var id = Curry._2(Parse.identifier, /* StrictParamName */28, env$1); + var id = Curry._2(Parse.identifier, "StrictParamName", env$1); var param_0 = id[0]; var param_1 = { - TAG: /* Identifier */3, + TAG: "Identifier", _0: id }; var param = [ @@ -10253,16 +10267,16 @@ function try_arrow_function(env) { var params = match[0]; var predicate = Curry._1(Parse.predicate, env$1); var env$2 = params === /* [] */0 || rest !== undefined ? without_error_callback(env$1) : env$1; - if (Curry._1(Parser_env_Peek.is_line_terminator, env$2) && Curry._2(Parser_env_Peek.token, undefined, env$2) === /* T_ARROW */10) { - error(env$2, /* NewlineBeforeArrow */44); + if (Curry._1(Parser_env_Peek.is_line_terminator, env$2) && Curry._2(Parser_env_Peek.token, undefined, env$2) === "T_ARROW") { + error(env$2, "NewlineBeforeArrow"); } - token$4(env$2, /* T_ARROW */10); + token$4(env$2, "T_ARROW"); var env$3 = without_error_callback(env$2); var match$2 = with_loc((function (param) { var generator = false; var env = with_in_function(true, param); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_LCURLY */1) { + if (typeof match !== "object" && match === "T_LCURLY") { var match$1 = function_body(env, async, generator); return [ match$1[1], @@ -10273,7 +10287,7 @@ function try_arrow_function(env) { var expr = Curry._1(Parse.assignment, env$1); return [ { - TAG: /* BodyExpression */1, + TAG: "BodyExpression", _0: expr }, env$1.in_strict_mode @@ -10284,12 +10298,12 @@ function try_arrow_function(env) { var simple = is_simple_function_params(params, defaults, rest); strict_post_check(env$3, match$3[1], simple, undefined, params); var expression; - expression = body.TAG === /* BodyBlock */0 ? false : true; + expression = body.TAG === "BodyBlock" ? false : true; var loc = btwn(start_loc, match$2[0]); return [ loc, { - TAG: /* ArrowFunction */3, + TAG: "ArrowFunction", _0: { id: undefined, params: params, @@ -10311,10 +10325,10 @@ function decorator_list_helper(env, _decorators) { while(true) { var decorators = _decorators; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return decorators; } - if (match !== /* T_AT */12) { + if (match !== "T_AT") { return decorators; } token$3(env); @@ -10336,36 +10350,36 @@ function decorator_list(env) { function key(env) { var number_type = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof number_type === "number") { - if (number_type === /* T_LBRACKET */5) { + if (typeof number_type !== "object") { + if (number_type === "T_LBRACKET") { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LBRACKET */5); + token$4(env, "T_LBRACKET"); var expr = Curry._1(Parse.assignment, with_no_in(false, env)); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); return [ btwn(start_loc, end_loc), { - TAG: /* Computed */2, + TAG: "Computed", _0: expr } ]; } } else { - switch (number_type.TAG | 0) { - case /* T_NUMBER */0 : + switch (number_type.TAG) { + case "T_NUMBER" : var raw = Curry._2(Parser_env_Peek.value, undefined, env); var loc = Curry._2(Parser_env_Peek.loc, undefined, env); var value = number(env, number_type._0); var value$1 = { - TAG: /* Number */2, + TAG: "Number", _0: value }; return [ loc, { - TAG: /* Literal */0, + TAG: "Literal", _0: [ loc, { @@ -10375,17 +10389,17 @@ function key(env) { ] } ]; - case /* T_STRING */1 : + case "T_STRING" : var match = number_type._0; var octal = match[3]; var raw$1 = match[2]; var value$2 = match[1]; var loc$1 = match[0]; if (octal) { - strict_error(env, /* StrictOctalLiteral */31); + strict_error(env, "StrictOctalLiteral"); } token$4(env, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ loc$1, value$2, @@ -10394,13 +10408,13 @@ function key(env) { ] }); var value$3 = { - TAG: /* String */0, + TAG: "String", _0: value$2 }; return [ loc$1, { - TAG: /* Literal */0, + TAG: "Literal", _0: [ loc$1, { @@ -10419,7 +10433,7 @@ function key(env) { return [ id[0], { - TAG: /* Identifier */1, + TAG: "Identifier", _0: id } ]; @@ -10430,19 +10444,19 @@ function _method(env, kind) { var match = key(env); var typeParameters; switch (kind) { - case /* Init */0 : + case "Init" : typeParameters = Curry._1(type_parameter_declaration$1, env); break; - case /* Get */1 : - case /* Set */2 : + case "Get" : + case "Set" : typeParameters = undefined; break; } - token$4(env, /* T_LPAREN */3); + token$4(env, "T_LPAREN"); var params; switch (kind) { - case /* Init */0 : + case "Init" : throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -10452,16 +10466,16 @@ function _method(env, kind) { ], Error: new Error() }; - case /* Get */1 : + case "Get" : params = /* [] */0; break; - case /* Set */2 : - var param = Curry._2(Parse.identifier_with_type, env, /* StrictParamName */28); + case "Set" : + var param = Curry._2(Parse.identifier_with_type, env, "StrictParamName"); params = { hd: [ param[0], { - TAG: /* Identifier */3, + TAG: "Identifier", _0: param } ], @@ -10470,14 +10484,14 @@ function _method(env, kind) { break; } - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var returnType = wrap(annotation_opt, env); var match$1 = function_body(env, false, generator$1); var body = match$1[1]; var simple = is_simple_function_params(params, /* [] */0, undefined); strict_post_check(env, match$1[2], simple, undefined, params); var match$2; - match$2 = body.TAG === /* BodyBlock */0 ? [ + match$2 = body.TAG === "BodyBlock" ? [ body._0[0], false ] : [ @@ -10510,11 +10524,11 @@ function _method(env, kind) { function property$1(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_ELLIPSIS */11) { - token$4(env, /* T_ELLIPSIS */11); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_ELLIPSIS") { + token$4(env, "T_ELLIPSIS"); var argument = Curry._1(Parse.assignment, env); return { - TAG: /* SpreadProperty */1, + TAG: "SpreadProperty", _0: [ btwn(start_loc, argument[0]), { @@ -10523,7 +10537,7 @@ function property$1(env) { ] }; } - var async = Curry._2(Parser_env_Peek.is_identifier, 1, env) && maybe(env, /* T_ASYNC */61); + var async = Curry._2(Parser_env_Peek.is_identifier, 1, env) && maybe(env, "T_ASYNC"); var match = generator(env, async); var match$1 = key(env); var tmp; @@ -10532,17 +10546,17 @@ function property$1(env) { exit = 1; } else { var key$1 = match$1[1]; - switch (key$1.TAG | 0) { - case /* Identifier */1 : + switch (key$1.TAG) { + case "Identifier" : switch (key$1._0[1].name) { case "get" : var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); var exit$1 = 0; - if (/* tag */typeof match$2 === "number") { + if (typeof match$2 !== "object") { switch (match$2) { - case /* T_LPAREN */3 : - case /* T_COLON */77 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_COLON" : + case "T_LESS_THAN" : exit$1 = 2; break; default: @@ -10558,11 +10572,11 @@ function property$1(env) { case "set" : var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); var exit$2 = 0; - if (/* tag */typeof match$3 === "number") { + if (typeof match$3 !== "object") { switch (match$3) { - case /* T_LPAREN */3 : - case /* T_COLON */77 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_COLON" : + case "T_LESS_THAN" : exit$2 = 2; break; default: @@ -10579,8 +10593,8 @@ function property$1(env) { exit = 1; } break; - case /* Literal */0 : - case /* Computed */2 : + case "Literal" : + case "Computed" : exit = 1; break; @@ -10590,17 +10604,17 @@ function property$1(env) { tmp = init(env, start_loc, match$1[1], async, match); } return { - TAG: /* Property */0, + TAG: "Property", _0: tmp }; } function get(env, start_loc) { - var match = _method(env, /* Get */1); + var match = _method(env, "Get"); var match$1 = match[1]; var end_loc = match$1[0]; var value_1 = { - TAG: /* Function */2, + TAG: "Function", _0: match$1[1] }; var value = [ @@ -10612,7 +10626,7 @@ function get(env, start_loc) { { key: match[0], value: value, - kind: /* Get */1, + kind: "Get", _method: false, shorthand: false } @@ -10620,11 +10634,11 @@ function get(env, start_loc) { } function set(env, start_loc) { - var match = _method(env, /* Set */2); + var match = _method(env, "Set"); var match$1 = match[1]; var end_loc = match$1[0]; var value_1 = { - TAG: /* Function */2, + TAG: "Function", _0: match$1[1] }; var value = [ @@ -10636,7 +10650,7 @@ function set(env, start_loc) { { key: match[0], value: value, - kind: /* Set */2, + kind: "Set", _method: false, shorthand: false } @@ -10647,14 +10661,14 @@ function init(env, start_loc, key, async, generator) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var match$1; var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_COMMA */8 : + case "T_RCURLY" : + case "T_COMMA" : exit = 2; break; - case /* T_LPAREN */3 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_LESS_THAN" : exit = 3; break; default: @@ -10665,7 +10679,7 @@ function init(env, start_loc, key, async, generator) { } switch (exit) { case 1 : - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); match$1 = [ Curry._1(Parse.assignment, env), false, @@ -10674,28 +10688,28 @@ function init(env, start_loc, key, async, generator) { break; case 2 : var tmp; - switch (key.TAG | 0) { - case /* Literal */0 : + switch (key.TAG) { + case "Literal" : var lit = key._0; tmp = [ lit[0], { - TAG: /* Literal */19, + TAG: "Literal", _0: lit[1] } ]; break; - case /* Identifier */1 : + case "Identifier" : var id = key._0; tmp = [ id[0], { - TAG: /* Identifier */18, + TAG: "Identifier", _0: id } ]; break; - case /* Computed */2 : + case "Computed" : tmp = key._0; break; @@ -10718,7 +10732,7 @@ function init(env, start_loc, key, async, generator) { var simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$3[2], simple, undefined, params); var match$4; - match$4 = body.TAG === /* BodyBlock */0 ? [ + match$4 = body.TAG === "BodyBlock" ? [ body._0[0], false ] : [ @@ -10727,7 +10741,7 @@ function init(env, start_loc, key, async, generator) { ]; var value_0 = match$4[0]; var value_1 = { - TAG: /* Function */2, + TAG: "Function", _0: { id: undefined, params: params, @@ -10760,7 +10774,7 @@ function init(env, start_loc, key, async, generator) { { key: key, value: value$1, - kind: /* Init */0, + kind: "Init", _method: match$1[2], shorthand: match$1[1] } @@ -10768,43 +10782,43 @@ function init(env, start_loc, key, async, generator) { } function check_property(env, prop_map, prop) { - if (prop.TAG !== /* Property */0) { + if (prop.TAG !== "Property") { return prop_map; } var match = prop._0; var prop$1 = match[1]; var prop_loc = match[0]; var exit = 0; - switch (prop$1.key.TAG | 0) { - case /* Literal */0 : - case /* Identifier */1 : + switch (prop$1.key.TAG) { + case "Literal" : + case "Identifier" : exit = 1; break; - case /* Computed */2 : + case "Computed" : return prop_map; } if (exit === 1) { var match$1 = prop$1.key; var key; - switch (match$1.TAG | 0) { - case /* Literal */0 : + switch (match$1.TAG) { + case "Literal" : var s = match$1._0[1].value; - if (/* tag */typeof s === "number") { + if (typeof s !== "object") { key = "null"; } else { - switch (s.TAG | 0) { - case /* String */0 : + switch (s.TAG) { + case "String" : key = s._0; break; - case /* Boolean */1 : + case "Boolean" : var b = s._0; key = b ? "true" : "false"; break; - case /* Number */2 : + case "Number" : key = Pervasives.string_of_float(s._0); break; - case /* RegExp */3 : + case "RegExp" : throw { RE_EXN_ID: "Failure", _1: "RegExp cannot be property key", @@ -10814,10 +10828,10 @@ function check_property(env, prop_map, prop) { } } break; - case /* Identifier */1 : + case "Identifier" : key = match$1._0[1].name; break; - case /* Computed */2 : + case "Computed" : throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -10836,7 +10850,7 @@ function check_property(env, prop_map, prop) { catch (raw_exn){ var exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.RE_EXN_ID === "Not_found") { - prev_kinds = /* Empty */0; + prev_kinds = "Empty"; } else { throw exn; } @@ -10844,13 +10858,13 @@ function check_property(env, prop_map, prop) { var match$2 = prop$1.kind; var kind_string; switch (match$2) { - case /* Init */0 : + case "Init" : kind_string = "Init"; break; - case /* Get */1 : + case "Get" : kind_string = "Get"; break; - case /* Set */2 : + case "Set" : kind_string = "Set"; break; @@ -10861,12 +10875,12 @@ function check_property(env, prop_map, prop) { if (mem$1("Init", prev_kinds)) { strict_error_at(env, [ prop_loc, - /* StrictDuplicateProperty */33 + "StrictDuplicateProperty" ]); } else if (mem$1("Set", prev_kinds) || mem$1("Get", prev_kinds)) { error_at(env, [ prop_loc, - /* AccessorDataProperty */34 + "AccessorDataProperty" ]); } break; @@ -10881,12 +10895,12 @@ function check_property(env, prop_map, prop) { if (mem$1("Init", prev_kinds)) { error_at(env, [ prop_loc, - /* AccessorDataProperty */34 + "AccessorDataProperty" ]); } else if (mem$1(kind_string, prev_kinds)) { error_at(env, [ prop_loc, - /* AccessorGetSet */35 + "AccessorGetSet" ]); } @@ -10902,10 +10916,10 @@ function properties$1(env, _param) { var param = _param; var acc = param[1]; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return List.rev(acc); default: @@ -10913,8 +10927,8 @@ function properties$1(env, _param) { } var prop = property$1(env); var prop_map = check_property(env, param[0], prop); - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RCURLY */2) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RCURLY") { + token$4(env, "T_COMMA"); } _param = [ prop_map, @@ -10929,13 +10943,13 @@ function properties$1(env, _param) { function _initializer(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var props = properties$1(env, [ - /* Empty */0, + "Empty", /* [] */0 ]); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return [ btwn(start_loc, end_loc), { @@ -10963,27 +10977,27 @@ function class_implements(env, _acc) { tl: acc }; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return List.rev(acc$1); } - if (match !== /* T_COMMA */8) { + if (match !== "T_COMMA") { return List.rev(acc$1); } - token$4(env, /* T_COMMA */8); + token$4(env, "T_COMMA"); _acc = acc$1; continue ; }; } function get$1(env, start_loc, decorators, $$static) { - var match = _method(env, /* Get */1); + var match = _method(env, "Get"); var value = match[1]; return { - TAG: /* Method */0, + TAG: "Method", _0: [ btwn(start_loc, value[0]), { - kind: /* Get */2, + kind: "Get", key: match[0], value: value, static: $$static, @@ -10994,14 +11008,14 @@ function get$1(env, start_loc, decorators, $$static) { } function set$1(env, start_loc, decorators, $$static) { - var match = _method(env, /* Set */2); + var match = _method(env, "Set"); var value = match[1]; return { - TAG: /* Method */0, + TAG: "Method", _0: [ btwn(start_loc, value[0]), { - kind: /* Set */3, + kind: "Set", key: match[0], value: value, static: $$static, @@ -11014,11 +11028,11 @@ function set$1(env, start_loc, decorators, $$static) { function init$1(env, start_loc, decorators, key, async, generator, $$static) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_SEMICOLON */7 : - case /* T_ASSIGN */75 : - case /* T_COLON */77 : + case "T_SEMICOLON" : + case "T_ASSIGN" : + case "T_COLON" : exit = 2; break; default: @@ -11028,16 +11042,16 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { if (exit === 2 && !async && !generator) { var typeAnnotation = wrap(annotation_opt, env); var options = env.parse_options; - var value = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_ASSIGN */75 && ($$static && options.esproposal_class_static_fields || !$$static && options.esproposal_class_instance_fields) ? (token$4(env, /* T_ASSIGN */75), Curry._1(Parse.expression, env)) : undefined; + var value = Curry._2(Parser_env_Peek.token, undefined, env) === "T_ASSIGN" && ($$static && options.esproposal_class_static_fields || !$$static && options.esproposal_class_instance_fields) ? (token$4(env, "T_ASSIGN"), Curry._1(Parse.expression, env)) : undefined; var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - if (maybe(env, /* T_SEMICOLON */7) || !(Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LBRACKET */5 || Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LPAREN */3)) { + if (maybe(env, "T_SEMICOLON") || !(Curry._2(Parser_env_Peek.token, undefined, env) === "T_LBRACKET" || Curry._2(Parser_env_Peek.token, undefined, env) === "T_LPAREN")) { } else { error_unexpected(env); } var loc = btwn(start_loc, end_loc); return { - TAG: /* Property */1, + TAG: "Property", _0: [ loc, { @@ -11060,7 +11074,7 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { var simple = is_simple_function_params(params, defaults, rest); strict_post_check(env, match$2[2], simple, undefined, params); var match$3; - match$3 = body.TAG === /* BodyBlock */0 ? [ + match$3 = body.TAG === "BodyBlock" ? [ body._0[0], false ] : [ @@ -11086,21 +11100,21 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { value_1 ]; var kind; - switch (key.TAG | 0) { - case /* Literal */0 : + switch (key.TAG) { + case "Literal" : var match$4 = key._0[1].value; - kind = /* tag */typeof match$4 === "number" || !(match$4.TAG === /* String */0 && match$4._0 === "constructor") ? /* Method */1 : /* Constructor */0; + kind = typeof match$4 !== "object" || !(match$4.TAG === "String" && match$4._0 === "constructor") ? "Method" : "Constructor"; break; - case /* Identifier */1 : - kind = key._0[1].name === "constructor" ? /* Constructor */0 : /* Method */1; + case "Identifier" : + kind = key._0[1].name === "constructor" ? "Constructor" : "Method"; break; - case /* Computed */2 : - kind = /* Method */1; + case "Computed" : + kind = "Method"; break; } return { - TAG: /* Method */0, + TAG: "Method", _0: [ btwn(start_loc, end_loc$1), { @@ -11117,27 +11131,27 @@ function init$1(env, start_loc, decorators, key, async, generator, $$static) { function class_element(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var decorators = decorator_list(env); - var $$static = maybe(env, /* T_STATIC */40); - var async = Curry._2(Parser_env_Peek.token, 1, env) !== /* T_LPAREN */3 && Curry._2(Parser_env_Peek.token, 1, env) !== /* T_COLON */77 && maybe(env, /* T_ASYNC */61); + var $$static = maybe(env, "T_STATIC"); + var async = Curry._2(Parser_env_Peek.token, 1, env) !== "T_LPAREN" && Curry._2(Parser_env_Peek.token, 1, env) !== "T_COLON" && maybe(env, "T_ASYNC"); var generator$1 = generator(env, async); var match = key(env); if (!async && !generator$1) { var key$1 = match[1]; - switch (key$1.TAG | 0) { - case /* Identifier */1 : + switch (key$1.TAG) { + case "Identifier" : switch (key$1._0[1].name) { case "get" : var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof match$1 !== "number") { + if (typeof match$1 === "object") { return get$1(env, start_loc, decorators, $$static); } switch (match$1) { - case /* T_LPAREN */3 : - case /* T_SEMICOLON */7 : - case /* T_ASSIGN */75 : - case /* T_COLON */77 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_SEMICOLON" : + case "T_ASSIGN" : + case "T_COLON" : + case "T_LESS_THAN" : exit = 2; break; default: @@ -11150,15 +11164,15 @@ function class_element(env) { case "set" : var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); var exit$1 = 0; - if (/* tag */typeof match$2 !== "number") { + if (typeof match$2 === "object") { return set$1(env, start_loc, decorators, $$static); } switch (match$2) { - case /* T_LPAREN */3 : - case /* T_SEMICOLON */7 : - case /* T_ASSIGN */75 : - case /* T_COLON */77 : - case /* T_LESS_THAN */89 : + case "T_LPAREN" : + case "T_SEMICOLON" : + case "T_ASSIGN" : + case "T_COLON" : + case "T_LESS_THAN" : exit$1 = 2; break; default: @@ -11172,8 +11186,8 @@ function class_element(env) { } break; - case /* Literal */0 : - case /* Computed */2 : + case "Literal" : + case "Computed" : break; } @@ -11185,13 +11199,13 @@ function elements$1(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_SEMICOLON */7 : - token$4(env, /* T_SEMICOLON */7); + case "T_SEMICOLON" : + token$4(env, "T_SEMICOLON"); continue ; - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return List.rev(acc); default: _acc = { @@ -11212,10 +11226,10 @@ function elements$1(env, _acc) { function class_body(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var body = elements$1(env, /* [] */0); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return [ btwn(start_loc, end_loc), { @@ -11226,8 +11240,8 @@ function class_body(env) { function _class(env) { var match; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_EXTENDS */39) { - token$4(env, /* T_EXTENDS */39); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_EXTENDS") { + token$4(env, "T_EXTENDS"); var superClass = left_hand_side(with_allow_yield(false, env)); var superTypeParameters = wrap(type_parameter_instantiation, env); match = [ @@ -11240,7 +11254,7 @@ function _class(env) { undefined ]; } - var $$implements = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_IMPLEMENTS */50 ? (!env.parse_options.types ? error(env, /* UnexpectedTypeInterface */10) : undefined, token$4(env, /* T_IMPLEMENTS */50), class_implements(env, /* [] */0)) : /* [] */0; + var $$implements = Curry._2(Parser_env_Peek.token, undefined, env) === "T_IMPLEMENTS" ? (!env.parse_options.types ? error(env, "UnexpectedTypeInterface") : undefined, token$4(env, "T_IMPLEMENTS"), class_implements(env, /* [] */0)) : /* [] */0; var body = Curry._1(class_body, env); return [ body, @@ -11254,7 +11268,7 @@ function class_declaration(env, decorators) { var env$1 = with_strict(true, env); var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); var decorators$1 = Pervasives.$at(decorators, decorator_list(env$1)); - token$4(env$1, /* T_CLASS */38); + token$4(env$1, "T_CLASS"); var tmp_env = with_no_let(true, env$1); var match = env$1.in_export; var match$1 = Curry._2(Parser_env_Peek.is_identifier, undefined, tmp_env); @@ -11266,7 +11280,7 @@ function class_declaration(env, decorators) { return [ loc, { - TAG: /* ClassDeclaration */20, + TAG: "ClassDeclaration", _0: { id: id, body: body, @@ -11283,15 +11297,15 @@ function class_declaration(env, decorators) { function class_expression(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var decorators = decorator_list(env); - token$4(env, /* T_CLASS */38); + token$4(env, "T_CLASS"); var match = Curry._2(Parser_env_Peek.token, undefined, env); var match$1; var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_LCURLY */1 : - case /* T_EXTENDS */39 : - case /* T_LESS_THAN */89 : + case "T_LCURLY" : + case "T_EXTENDS" : + case "T_LESS_THAN" : match$1 = [ undefined, undefined @@ -11317,7 +11331,7 @@ function class_expression(env) { return [ loc, { - TAG: /* Class */23, + TAG: "Class", _0: { id: match$1[0], body: body, @@ -11334,18 +11348,18 @@ function class_expression(env) { function declare(in_moduleOpt, env) { var in_module = in_moduleOpt !== undefined ? in_moduleOpt : false; if (!env.parse_options.types) { - error(env, /* UnexpectedTypeDeclaration */7); + error(env, "UnexpectedTypeDeclaration"); } var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var match = Curry._2(Parser_env_Peek.token, 1, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_IDENTIFIER */0 : + case "T_IDENTIFIER" : if (Curry._2(Parser_env_Peek.value, 1, env) === "module") { - token$4(env, /* T_DECLARE */58); + token$4(env, "T_DECLARE"); contextual(env, "module"); - if (in_module || Curry._2(Parser_env_Peek.token, undefined, env) === /* T_PERIOD */9) { - token$4(env, /* T_PERIOD */9); + if (in_module || Curry._2(Parser_env_Peek.token, undefined, env) === "T_PERIOD") { + token$4(env, "T_PERIOD"); contextual(env, "exports"); var type_annot = wrap(annotation, env); var loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); @@ -11355,16 +11369,16 @@ function declare(in_moduleOpt, env) { return [ loc$1, { - TAG: /* DeclareModuleExports */26, + TAG: "DeclareModuleExports", _0: type_annot } ]; } else { var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var id; - if (/* tag */typeof match$1 === "number" || match$1.TAG !== /* T_STRING */1) { + if (typeof match$1 !== "object" || match$1.TAG !== "T_STRING") { id = { - TAG: /* Identifier */0, + TAG: "Identifier", _0: Curry._2(Parse.identifier, undefined, env) }; } else { @@ -11374,10 +11388,10 @@ function declare(in_moduleOpt, env) { var value = match$2[1]; var loc$2 = match$2[0]; if (octal) { - strict_error(env, /* StrictOctalLiteral */31); + strict_error(env, "StrictOctalLiteral"); } token$4(env, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ loc$2, value, @@ -11386,11 +11400,11 @@ function declare(in_moduleOpt, env) { ] }); var value$1 = { - TAG: /* String */0, + TAG: "String", _0: value }; id = { - TAG: /* Literal */1, + TAG: "Literal", _0: [ loc$2, { @@ -11401,10 +11415,10 @@ function declare(in_moduleOpt, env) { }; } var body_start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var match$3 = module_items(env, undefined, /* [] */0); var module_kind = match$3[0]; - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); var body_end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var body_loc = btwn(body_start_loc, body_end_loc); var body_1 = { @@ -11416,13 +11430,13 @@ function declare(in_moduleOpt, env) { ]; var loc$3 = btwn(start_loc, body_loc); var kind = module_kind !== undefined ? module_kind : ({ - TAG: /* CommonJS */0, + TAG: "CommonJS", _0: loc$3 }); return [ loc$3, { - TAG: /* DeclareModule */25, + TAG: "DeclareModule", _0: { id: id, body: body, @@ -11433,44 +11447,44 @@ function declare(in_moduleOpt, env) { } } break; - case /* T_FUNCTION */13 : - token$4(env, /* T_DECLARE */58); + case "T_FUNCTION" : + token$4(env, "T_DECLARE"); return declare_function_statement(env, start_loc); - case /* T_VAR */22 : - token$4(env, /* T_DECLARE */58); + case "T_VAR" : + token$4(env, "T_DECLARE"); return declare_var_statement(env, start_loc); - case /* T_CLASS */38 : - token$4(env, /* T_DECLARE */58); + case "T_CLASS" : + token$4(env, "T_DECLARE"); var match$4 = Curry._2(declare_class, env, start_loc); return [ match$4[0], { - TAG: /* DeclareClass */24, + TAG: "DeclareClass", _0: match$4[1] } ]; - case /* T_EXPORT */47 : + case "T_EXPORT" : if (in_module) { return declare_export_declaration(in_module, env); } break; - case /* T_INTERFACE */51 : - token$4(env, /* T_DECLARE */58); + case "T_INTERFACE" : + token$4(env, "T_DECLARE"); return $$interface(env); - case /* T_TYPE */59 : - token$4(env, /* T_DECLARE */58); + case "T_TYPE" : + token$4(env, "T_DECLARE"); return type_alias(env); - case /* T_ASYNC */61 : - token$4(env, /* T_DECLARE */58); - error(env, /* DeclareAsync */49); - token$4(env, /* T_ASYNC */61); + case "T_ASYNC" : + token$4(env, "T_DECLARE"); + error(env, "DeclareAsync"); + token$4(env, "T_ASYNC"); return declare_function_statement(env, start_loc); default: } } if (in_module) { - token$4(env, /* T_DECLARE */58); + token$4(env, "T_DECLARE"); return declare_var_statement(env, start_loc); } else { return Curry._1(Parse.statement, env); @@ -11480,13 +11494,13 @@ function declare(in_moduleOpt, env) { function type_alias_helper(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAlias */5); + error(env, "UnexpectedTypeAlias"); } - token$4(env, /* T_TYPE */59); - push_lex_mode(env, /* TYPE */1); + token$4(env, "T_TYPE"); + push_lex_mode(env, "TYPE"); var id = Curry._2(Parse.identifier, undefined, env); var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); - token$4(env, /* T_ASSIGN */75); + token$4(env, "T_ASSIGN"); var right = wrap(_type, env); var end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); var end_loc$1 = end_loc !== undefined ? end_loc : right[0]; @@ -11505,17 +11519,17 @@ function type_alias_helper(env) { function export_source(env) { contextual(env, "from"); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number" && match.TAG === /* T_STRING */1) { + if (typeof match === "object" && match.TAG === "T_STRING") { var match$1 = match._0; var octal = match$1[3]; var raw = match$1[2]; var value = match$1[1]; var loc = match$1[0]; if (octal) { - strict_error(env, /* StrictOctalLiteral */31); + strict_error(env, "StrictOctalLiteral"); } token$4(env, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ loc, value, @@ -11524,7 +11538,7 @@ function export_source(env) { ] }); var value$1 = { - TAG: /* String */0, + TAG: "String", _0: value }; return [ @@ -11537,7 +11551,7 @@ function export_source(env) { } var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); var value$2 = { - TAG: /* String */0, + TAG: "String", _0: raw$1 }; var ret_0 = Curry._2(Parser_env_Peek.loc, undefined, env); @@ -11554,8 +11568,8 @@ function export_source(env) { } function declare_var(env, start_loc) { - token$4(env, /* T_VAR */22); - var id = Curry._2(Parse.identifier_with_type, env, /* StrictVarName */27); + token$4(env, "T_VAR"); + var id = Curry._2(Parse.identifier_with_type, env, "StrictVarName"); var loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); var end_loc = loc !== undefined ? loc : id[0]; var loc$1 = btwn(start_loc, end_loc); @@ -11573,10 +11587,10 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { var errs = _errs; var specifiers = _specifiers; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return [ List.rev(specifiers), List.rev(errs) @@ -11623,8 +11637,8 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { loc$1, specifier_1 ]; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_COMMA */8) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_COMMA") { + token$4(env, "T_COMMA"); } var errs$1 = err !== undefined ? ({ hd: err, @@ -11640,17 +11654,17 @@ function export_specifiers_and_errs(env, _specifiers, _errs) { } function declare_function(env, start_loc) { - token$4(env, /* T_FUNCTION */13); + token$4(env, "T_FUNCTION"); var id = Curry._2(Parse.identifier, undefined, env); var start_sig_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var typeParameters = Curry._1(type_parameter_declaration$1, env); var match = wrap(function_param_list, env); - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); var returnType = wrap(_type, env); var end_loc = returnType[0]; var loc = btwn(start_sig_loc, end_loc); var value_1 = { - TAG: /* Function */1, + TAG: "Function", _0: { params: match[1], returnType: returnType, @@ -11703,7 +11717,7 @@ function type_alias(env) { return [ match[0], { - TAG: /* TypeAlias */7, + TAG: "TypeAlias", _0: match[1] } ]; @@ -11717,7 +11731,7 @@ function $$interface(env) { return [ match[0], { - TAG: /* InterfaceDeclaration */21, + TAG: "InterfaceDeclaration", _0: match[1] } ]; @@ -11728,7 +11742,7 @@ function declare_var_statement(env, start_loc) { return [ match[0], { - TAG: /* DeclareVariable */22, + TAG: "DeclareVariable", _0: match[1] } ]; @@ -11737,39 +11751,39 @@ function declare_var_statement(env, start_loc) { function declare_export_declaration(allow_export_typeOpt, env) { var allow_export_type = allow_export_typeOpt !== undefined ? allow_export_typeOpt : false; if (!env.parse_options.types) { - error(env, /* UnexpectedTypeDeclaration */7); + error(env, "UnexpectedTypeDeclaration"); } var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_DECLARE */58); + token$4(env, "T_DECLARE"); var env$1 = with_in_export(true, with_strict(true, env)); - token$4(env$1, /* T_EXPORT */47); + token$4(env$1, "T_EXPORT"); var match = Curry._2(Parser_env_Peek.token, undefined, env$1); var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_DEFAULT */34 : - token$4(env$1, /* T_DEFAULT */34); + case "T_DEFAULT" : + token$4(env$1, "T_DEFAULT"); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env$1); var match$2; var exit$1 = 0; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { switch (match$1) { - case /* T_FUNCTION */13 : + case "T_FUNCTION" : var fn = declare_function(env$1, start_loc); match$2 = [ fn[0], { - TAG: /* Function */1, + TAG: "Function", _0: fn } ]; break; - case /* T_CLASS */38 : + case "T_CLASS" : var _class = Curry._2(declare_class, env$1, start_loc); match$2 = [ _class[0], { - TAG: /* Class */2, + TAG: "Class", _0: _class } ]; @@ -11788,7 +11802,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { match$2 = [ end_loc, { - TAG: /* DefaultType */3, + TAG: "DefaultType", _0: _type$1 } ]; @@ -11796,7 +11810,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { return [ btwn(start_loc, match$2[0]), { - TAG: /* DeclareExportDeclaration */27, + TAG: "DeclareExportDeclaration", _0: { default: true, declaration: match$2[1], @@ -11805,14 +11819,14 @@ function declare_export_declaration(allow_export_typeOpt, env) { } } ]; - case /* T_FUNCTION */13 : - case /* T_VAR */22 : - case /* T_CONST */25 : - case /* T_LET */26 : - case /* T_CLASS */38 : + case "T_FUNCTION" : + case "T_VAR" : + case "T_CONST" : + case "T_LET" : + case "T_CLASS" : exit = 2; break; - case /* T_INTERFACE */51 : + case "T_INTERFACE" : if (allow_export_type) { var match$3 = Curry._1(interface_helper, env$1); var iface_loc = match$3[0]; @@ -11820,11 +11834,11 @@ function declare_export_declaration(allow_export_typeOpt, env) { return [ loc$1, { - TAG: /* DeclareExportDeclaration */27, + TAG: "DeclareExportDeclaration", _0: { default: false, declaration: { - TAG: /* Interface */5, + TAG: "Interface", _0: [ iface_loc, match$3[1] @@ -11838,7 +11852,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { } exit = 1; break; - case /* T_TYPE */59 : + case "T_TYPE" : if (allow_export_type) { var match$4 = type_alias_helper(env$1); var alias_loc = match$4[0]; @@ -11846,11 +11860,11 @@ function declare_export_declaration(allow_export_typeOpt, env) { return [ loc$2, { - TAG: /* DeclareExportDeclaration */27, + TAG: "DeclareExportDeclaration", _0: { default: false, declaration: { - TAG: /* NamedType */4, + TAG: "NamedType", _0: [ alias_loc, match$4[1] @@ -11864,13 +11878,13 @@ function declare_export_declaration(allow_export_typeOpt, env) { } exit = 1; break; - case /* T_MULT */97 : + case "T_MULT" : var loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env$1); - token$4(env$1, /* T_MULT */97); + token$4(env$1, "T_MULT"); var parse_export_star_as = env$1.parse_options.esproposal_export_star_as; - var local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error(env$1, /* UnexpectedTypeDeclaration */7), undefined)) : undefined; + var local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error(env$1, "UnexpectedTypeDeclaration"), undefined)) : undefined; var specifiers = { - TAG: /* ExportBatchSpecifier */1, + TAG: "ExportBatchSpecifier", _0: loc$3, _1: local_name }; @@ -11882,7 +11896,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { return [ btwn(start_loc, end_loc$1), { - TAG: /* DeclareExportDeclaration */27, + TAG: "DeclareExportDeclaration", _0: { default: false, declaration: undefined, @@ -11900,26 +11914,26 @@ function declare_export_declaration(allow_export_typeOpt, env) { switch (exit) { case 1 : var match$5 = Curry._2(Parser_env_Peek.token, undefined, env$1); - if (/* tag */typeof match$5 === "number") { + if (typeof match$5 !== "object") { switch (match$5) { - case /* T_INTERFACE */51 : - error(env$1, /* DeclareExportInterface */53); + case "T_INTERFACE" : + error(env$1, "DeclareExportInterface"); break; - case /* T_TYPE */59 : - error(env$1, /* DeclareExportType */52); + case "T_TYPE" : + error(env$1, "DeclareExportType"); break; default: } } - token$4(env$1, /* T_LCURLY */1); + token$4(env$1, "T_LCURLY"); var match$6 = export_specifiers_and_errs(env$1, /* [] */0, /* [] */0); var specifiers$1 = { - TAG: /* ExportSpecifiers */0, + TAG: "ExportSpecifiers", _0: match$6[0] }; var end_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env$1); - token$4(env$1, /* T_RCURLY */2); + token$4(env$1, "T_RCURLY"); var source$2 = Curry._2(Parser_env_Peek.value, undefined, env$1) === "from" ? export_source(env$1) : (List.iter((function (param) { return error_at(env$1, param); }), match$6[1]), undefined); @@ -11931,7 +11945,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { return [ btwn(start_loc, end_loc$3), { - TAG: /* DeclareExportDeclaration */27, + TAG: "DeclareExportDeclaration", _0: { default: false, declaration: undefined, @@ -11944,29 +11958,29 @@ function declare_export_declaration(allow_export_typeOpt, env) { var token$5 = Curry._2(Parser_env_Peek.token, undefined, env$1); var match$7; var exit$2 = 0; - if (/* tag */typeof token$5 === "number") { + if (typeof token$5 !== "object") { switch (token$5) { - case /* T_FUNCTION */13 : + case "T_FUNCTION" : var fn$1 = declare_function(env$1, start_loc); match$7 = [ fn$1[0], { - TAG: /* Function */1, + TAG: "Function", _0: fn$1 } ]; break; - case /* T_VAR */22 : - case /* T_CONST */25 : - case /* T_LET */26 : + case "T_VAR" : + case "T_CONST" : + case "T_LET" : exit$2 = 3; break; - case /* T_CLASS */38 : + case "T_CLASS" : var _class$1 = Curry._2(declare_class, env$1, start_loc); match$7 = [ _class$1[0], { - TAG: /* Class */2, + TAG: "Class", _0: _class$1 } ]; @@ -11994,13 +12008,13 @@ function declare_export_declaration(allow_export_typeOpt, env) { }; } if (exit$2 === 3) { - if (/* tag */typeof token$5 === "number") { + if (typeof token$5 !== "object") { switch (token$5) { - case /* T_CONST */25 : - error(env$1, /* DeclareExportConst */51); + case "T_CONST" : + error(env$1, "DeclareExportConst"); break; - case /* T_LET */26 : - error(env$1, /* DeclareExportLet */50); + case "T_LET" : + error(env$1, "DeclareExportLet"); break; default: @@ -12010,7 +12024,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { match$7 = [ $$var[0], { - TAG: /* Variable */0, + TAG: "Variable", _0: $$var } ]; @@ -12018,7 +12032,7 @@ function declare_export_declaration(allow_export_typeOpt, env) { return [ btwn(start_loc, match$7[0]), { - TAG: /* DeclareExportDeclaration */27, + TAG: "DeclareExportDeclaration", _0: { default: false, declaration: match$7[1], @@ -12036,7 +12050,7 @@ function declare_function_statement(env, start_loc) { return [ match[0], { - TAG: /* DeclareFunction */23, + TAG: "DeclareFunction", _0: match[1] } ]; @@ -12050,7 +12064,7 @@ function expression(env) { return [ btwn(expression$1[0], end_loc), { - TAG: /* Expression */1, + TAG: "Expression", _0: { expression: expression$1 } @@ -12067,13 +12081,13 @@ function supers(env, _acc) { tl: acc }; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return List.rev(acc$1); } - if (match !== /* T_COMMA */8) { + if (match !== "T_COMMA") { return List.rev(acc$1); } - token$4(env, /* T_COMMA */8); + token$4(env, "T_COMMA"); _acc = acc$1; continue ; }; @@ -12081,10 +12095,10 @@ function supers(env, _acc) { function declare_class(env, start_loc) { var env$1 = with_strict(true, env); - token$4(env$1, /* T_CLASS */38); + token$4(env$1, "T_CLASS"); var id = Curry._2(Parse.identifier, undefined, env$1); var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env$1); - var $$extends = Curry._2(Parser_env_Peek.token, undefined, env$1) === /* T_EXTENDS */39 ? (token$4(env$1, /* T_EXTENDS */39), supers(env$1, /* [] */0)) : /* [] */0; + var $$extends = Curry._2(Parser_env_Peek.token, undefined, env$1) === "T_EXTENDS" ? (token$4(env$1, "T_EXTENDS"), supers(env$1, /* [] */0)) : /* [] */0; var mixins = Curry._2(Parser_env_Peek.value, undefined, env$1) === "mixins" ? (contextual(env$1, "mixins"), supers(env$1, /* [] */0)) : /* [] */0; var body = _object$1(true, env$1); var loc = btwn(start_loc, body[0]); @@ -12109,13 +12123,13 @@ function supers$1(env, _acc) { tl: acc }; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return List.rev(acc$1); } - if (match !== /* T_COMMA */8) { + if (match !== "T_COMMA") { return List.rev(acc$1); } - token$4(env, /* T_COMMA */8); + token$4(env, "T_COMMA"); _acc = acc$1; continue ; }; @@ -12124,12 +12138,12 @@ function supers$1(env, _acc) { function interface_helper(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); if (!env.parse_options.types) { - error(env, /* UnexpectedTypeInterface */10); + error(env, "UnexpectedTypeInterface"); } - token$4(env, /* T_INTERFACE */51); + token$4(env, "T_INTERFACE"); var id = Curry._2(Parse.identifier, undefined, env); var typeParameters = Curry._1(type_parameter_declaration_with_defaults, env); - var $$extends = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_EXTENDS */39 ? (token$4(env, /* T_EXTENDS */39), supers$1(env, /* [] */0)) : /* [] */0; + var $$extends = Curry._2(Parser_env_Peek.token, undefined, env) === "T_EXTENDS" ? (token$4(env, "T_EXTENDS"), supers$1(env, /* [] */0)) : /* [] */0; var body = _object$1(true, env); var loc = btwn(start_loc, body[0]); return [ @@ -12149,10 +12163,10 @@ function module_items(env, _module_kind, _acc) { var acc = _acc; var module_kind = _module_kind; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return [ module_kind, List.rev(acc) @@ -12166,27 +12180,27 @@ function module_items(env, _module_kind, _acc) { var loc = stmt[0]; var module_kind$1; if (module_kind !== undefined) { - if (module_kind.TAG === /* CommonJS */0) { - if (/* tag */typeof stmt$1 === "number") { + if (module_kind.TAG === "CommonJS") { + if (typeof stmt$1 !== "object") { module_kind$1 = module_kind; } else { - switch (stmt$1.TAG | 0) { - case /* DeclareModuleExports */26 : - error(env, /* DuplicateDeclareModuleExports */60); + switch (stmt$1.TAG) { + case "DeclareModuleExports" : + error(env, "DuplicateDeclareModuleExports"); module_kind$1 = module_kind; break; - case /* DeclareExportDeclaration */27 : + case "DeclareExportDeclaration" : var declaration = stmt$1._0.declaration; if (declaration !== undefined) { - switch (declaration.TAG | 0) { - case /* NamedType */4 : - case /* Interface */5 : + switch (declaration.TAG) { + case "NamedType" : + case "Interface" : break; default: - error(env, /* AmbiguousDeclareModuleKind */61); + error(env, "AmbiguousDeclareModuleKind"); } } else { - error(env, /* AmbiguousDeclareModuleKind */61); + error(env, "AmbiguousDeclareModuleKind"); } module_kind$1 = module_kind; break; @@ -12194,39 +12208,39 @@ function module_items(env, _module_kind, _acc) { module_kind$1 = module_kind; } } - } else if (/* tag */typeof stmt$1 === "number" || stmt$1.TAG !== /* DeclareModuleExports */26) { + } else if (typeof stmt$1 !== "object" || stmt$1.TAG !== "DeclareModuleExports") { module_kind$1 = module_kind; } else { - error(env, /* AmbiguousDeclareModuleKind */61); + error(env, "AmbiguousDeclareModuleKind"); module_kind$1 = module_kind; } - } else if (/* tag */typeof stmt$1 === "number") { + } else if (typeof stmt$1 !== "object") { module_kind$1 = module_kind; } else { - switch (stmt$1.TAG | 0) { - case /* DeclareModuleExports */26 : + switch (stmt$1.TAG) { + case "DeclareModuleExports" : module_kind$1 = { - TAG: /* CommonJS */0, + TAG: "CommonJS", _0: loc }; break; - case /* DeclareExportDeclaration */27 : + case "DeclareExportDeclaration" : var declaration$1 = stmt$1._0.declaration; if (declaration$1 !== undefined) { - switch (declaration$1.TAG | 0) { - case /* NamedType */4 : - case /* Interface */5 : + switch (declaration$1.TAG) { + case "NamedType" : + case "Interface" : module_kind$1 = module_kind; break; default: module_kind$1 = { - TAG: /* ES */1, + TAG: "ES", _0: loc }; } } else { module_kind$1 = { - TAG: /* ES */1, + TAG: "ES", _0: loc }; } @@ -12248,19 +12262,19 @@ function fold(acc, _param) { while(true) { var param = _param; var match = param[1]; - switch (match.TAG | 0) { - case /* Object */0 : + switch (match.TAG) { + case "Object" : return List.fold_left((function (acc, prop) { - if (prop.TAG === /* Property */0) { + if (prop.TAG === "Property") { return fold(acc, prop._0[1].pattern); } else { return fold(acc, prop._0[1].argument); } }), acc, match._0.properties); - case /* Array */1 : + case "Array" : return List.fold_left((function (acc, elem) { if (elem !== undefined) { - if (elem.TAG === /* Element */0) { + if (elem.TAG === "Element") { return fold(acc, elem._0); } else { return fold(acc, elem._0[1].argument); @@ -12269,10 +12283,10 @@ function fold(acc, _param) { return acc; } }), acc, match._0.elements); - case /* Assignment */2 : + case "Assignment" : _param = match._0.left; continue ; - case /* Identifier */3 : + case "Identifier" : var match$1 = match._0; return { hd: [ @@ -12281,7 +12295,7 @@ function fold(acc, _param) { ], tl: acc }; - case /* Expression */4 : + case "Expression" : throw { RE_EXN_ID: "Failure", _1: "Parser error: No such thing as an expression pattern!", @@ -12296,7 +12310,7 @@ function assert_can_be_forin_or_forof(env, err, param) { if (param === undefined) { return error(env, err); } - if (param.TAG === /* InitDeclaration */0) { + if (param.TAG === "InitDeclaration") { var match = param._0; var declarations = match[1].declarations; if (declarations && declarations.hd[1].init === undefined && !declarations.tl) { @@ -12323,18 +12337,18 @@ function assert_can_be_forin_or_forof(env, err, param) { function _if(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_IF */14); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_IF"); + token$4(env, "T_LPAREN"); var test = Curry._1(Parse.expression, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); Curry._2(Parser_env_Peek.token, undefined, env); - var consequent = Curry._2(Parser_env_Peek.is_function, undefined, env) ? (strict_error(env, /* StrictFunctionStatement */45), _function(env)) : Curry._1(Parse.statement, env); - var alternate = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_ELSE */41 ? (token$4(env, /* T_ELSE */41), Curry._1(Parse.statement, env)) : undefined; + var consequent = Curry._2(Parser_env_Peek.is_function, undefined, env) ? (strict_error(env, "StrictFunctionStatement"), _function(env)) : Curry._1(Parse.statement, env); + var alternate = Curry._2(Parser_env_Peek.token, undefined, env) === "T_ELSE" ? (token$4(env, "T_ELSE"), Curry._1(Parse.statement, env)) : undefined; var end_loc = alternate !== undefined ? alternate[0] : consequent[0]; return [ btwn(start_loc, end_loc), { - TAG: /* If */2, + TAG: "If", _0: { test: test, consequent: consequent, @@ -12350,10 +12364,10 @@ function case_list(env, _param) { var acc = param[1]; var seen_default = param[0]; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return List.rev(acc); default: @@ -12362,27 +12376,27 @@ function case_list(env, _param) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var test; - if (/* tag */typeof match$1 === "number" && match$1 === /* T_DEFAULT */34) { + if (typeof match$1 !== "object" && match$1 === "T_DEFAULT") { if (seen_default) { - error(env, /* MultipleDefaultsInSwitch */19); + error(env, "MultipleDefaultsInSwitch"); } - token$4(env, /* T_DEFAULT */34); + token$4(env, "T_DEFAULT"); test = undefined; } else { - token$4(env, /* T_CASE */31); + token$4(env, "T_CASE"); test = Curry._1(Parse.expression, env); } var seen_default$1 = seen_default || test === undefined; var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); var term_fn = function (param) { - if (/* tag */typeof param !== "number") { + if (typeof param === "object") { return false; } switch (param) { - case /* T_RCURLY */2 : - case /* T_CASE */31 : - case /* T_DEFAULT */34 : + case "T_RCURLY" : + case "T_CASE" : + case "T_DEFAULT" : return true; default: return false; @@ -12429,17 +12443,17 @@ function var_or_const(env) { function source(env) { contextual(env, "from"); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number" && match.TAG === /* T_STRING */1) { + if (typeof match === "object" && match.TAG === "T_STRING") { var match$1 = match._0; var octal = match$1[3]; var raw = match$1[2]; var value = match$1[1]; var loc = match$1[0]; if (octal) { - strict_error(env, /* StrictOctalLiteral */31); + strict_error(env, "StrictOctalLiteral"); } token$4(env, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ loc, value, @@ -12448,7 +12462,7 @@ function source(env) { ] }); var value$1 = { - TAG: /* String */0, + TAG: "String", _0: value }; return [ @@ -12461,7 +12475,7 @@ function source(env) { } var raw$1 = Curry._2(Parser_env_Peek.value, undefined, env); var value$2 = { - TAG: /* String */0, + TAG: "String", _0: raw$1 }; var ret_0 = Curry._2(Parser_env_Peek.loc, undefined, env); @@ -12481,10 +12495,10 @@ function specifier_list(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return List.rev(acc); default: @@ -12498,7 +12512,7 @@ function specifier_list(env, _acc) { contextual(env, "as"); var local = Curry._2(Parse.identifier, undefined, env); specifier = { - TAG: /* ImportNamedSpecifier */0, + TAG: "ImportNamedSpecifier", _0: { local: local, remote: remote @@ -12509,15 +12523,15 @@ function specifier_list(env, _acc) { error_at(env, err); } specifier = { - TAG: /* ImportNamedSpecifier */0, + TAG: "ImportNamedSpecifier", _0: { local: undefined, remote: remote } }; } - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_COMMA */8) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_COMMA") { + token$4(env, "T_COMMA"); } _acc = { hd: specifier, @@ -12530,13 +12544,13 @@ function specifier_list(env, _acc) { function named_or_namespace_specifier(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_MULT */97) { - token$4(env, /* T_MULT */97); + if (typeof match !== "object" && match === "T_MULT") { + token$4(env, "T_MULT"); contextual(env, "as"); var id = Curry._2(Parse.identifier, undefined, env); return { hd: { - TAG: /* ImportNamespaceSpecifier */2, + TAG: "ImportNamespaceSpecifier", _0: [ btwn(start_loc, id[0]), id @@ -12545,18 +12559,18 @@ function named_or_namespace_specifier(env) { tl: /* [] */0 }; } - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var specifiers = specifier_list(env, /* [] */0); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return specifiers; } function from_expr(env, param) { var expr = param[1]; var loc = param[0]; - if (/* tag */typeof expr !== "number") { - switch (expr.TAG | 0) { - case /* Array */0 : + if (typeof expr === "object") { + switch (expr.TAG) { + case "Array" : var param$1 = [ loc, expr._0 @@ -12565,10 +12579,10 @@ function from_expr(env, param) { if (param === undefined) { return ; } - if (param.TAG === /* Expression */0) { + if (param.TAG === "Expression") { var match = param._0; return { - TAG: /* Element */0, + TAG: "Element", _0: Curry._2(Parse.pattern_from_expr, env, [ match[0], match[1] @@ -12578,7 +12592,7 @@ function from_expr(env, param) { var match$1 = param._0; var argument = Curry._2(Parse.pattern_from_expr, env, match$1[1].argument); return { - TAG: /* Spread */1, + TAG: "Spread", _0: [ match$1[0], { @@ -12590,40 +12604,40 @@ function from_expr(env, param) { return [ param$1[0], { - TAG: /* Array */1, + TAG: "Array", _0: { elements: elements, typeAnnotation: undefined } } ]; - case /* Object */1 : + case "Object" : var param$2 = [ loc, expr._0 ]; var properties = List.map((function (param) { - if (param.TAG === /* Property */0) { + if (param.TAG === "Property") { var match = param._0; var match$1 = match[1]; var key = match$1.key; var key$1; - switch (key.TAG | 0) { - case /* Literal */0 : + switch (key.TAG) { + case "Literal" : key$1 = { - TAG: /* Literal */0, + TAG: "Literal", _0: key._0 }; break; - case /* Identifier */1 : + case "Identifier" : key$1 = { - TAG: /* Identifier */1, + TAG: "Identifier", _0: key._0 }; break; - case /* Computed */2 : + case "Computed" : key$1 = { - TAG: /* Computed */2, + TAG: "Computed", _0: key._0 }; break; @@ -12631,7 +12645,7 @@ function from_expr(env, param) { } var pattern = Curry._2(Parse.pattern_from_expr, env, match$1.value); return { - TAG: /* Property */0, + TAG: "Property", _0: [ match[0], { @@ -12645,7 +12659,7 @@ function from_expr(env, param) { var match$2 = param._0; var argument = Curry._2(Parse.pattern_from_expr, env, match$2[1].argument); return { - TAG: /* SpreadProperty */1, + TAG: "SpreadProperty", _0: [ match$2[0], { @@ -12657,20 +12671,20 @@ function from_expr(env, param) { return [ param$2[0], { - TAG: /* Object */0, + TAG: "Object", _0: { properties: properties, typeAnnotation: undefined } } ]; - case /* Assignment */7 : + case "Assignment" : var match = expr._0; - if (match.operator === /* Assign */0) { + if (match.operator === "Assign") { return [ loc, { - TAG: /* Assignment */2, + TAG: "Assignment", _0: { left: match.left, right: match.right @@ -12679,11 +12693,11 @@ function from_expr(env, param) { ]; } break; - case /* Identifier */18 : + case "Identifier" : return [ loc, { - TAG: /* Identifier */3, + TAG: "Identifier", _0: expr._0 } ]; @@ -12694,7 +12708,7 @@ function from_expr(env, param) { return [ loc, { - TAG: /* Expression */4, + TAG: "Expression", _0: [ loc, expr @@ -12706,11 +12720,11 @@ function from_expr(env, param) { function _object$2(restricted_error) { var property = function (env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - if (maybe(env, /* T_ELLIPSIS */11)) { + if (maybe(env, "T_ELLIPSIS")) { var argument = pattern$1(env, restricted_error); var loc = btwn(start_loc, argument[0]); return { - TAG: /* SpreadProperty */1, + TAG: "SpreadProperty", _0: [ loc, { @@ -12722,22 +12736,22 @@ function _object$2(restricted_error) { var match = Curry._1(Parse.object_key, env); var lit = match[1]; var key; - switch (lit.TAG | 0) { - case /* Literal */0 : + switch (lit.TAG) { + case "Literal" : key = { - TAG: /* Literal */0, + TAG: "Literal", _0: lit._0 }; break; - case /* Identifier */1 : + case "Identifier" : key = { - TAG: /* Identifier */1, + TAG: "Identifier", _0: lit._0 }; break; - case /* Computed */2 : + case "Computed" : key = { - TAG: /* Computed */2, + TAG: "Computed", _0: lit._0 }; break; @@ -12746,8 +12760,8 @@ function _object$2(restricted_error) { var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var prop; var exit = 0; - if (/* tag */typeof match$1 === "number" && match$1 === /* T_COLON */77) { - token$4(env, /* T_COLON */77); + if (typeof match$1 !== "object" && match$1 === "T_COLON") { + token$4(env, "T_COLON"); prop = [ pattern$1(env, restricted_error), false @@ -12756,12 +12770,12 @@ function _object$2(restricted_error) { exit = 1; } if (exit === 1) { - switch (key.TAG | 0) { - case /* Identifier */1 : + switch (key.TAG) { + case "Identifier" : var id = key._0; var pattern_0 = id[0]; var pattern_1 = { - TAG: /* Identifier */3, + TAG: "Identifier", _0: id }; var pattern$2 = [ @@ -12773,8 +12787,8 @@ function _object$2(restricted_error) { true ]; break; - case /* Literal */0 : - case /* Computed */2 : + case "Literal" : + case "Computed" : error_unexpected(env); prop = undefined; break; @@ -12787,14 +12801,14 @@ function _object$2(restricted_error) { var pattern$3 = prop[0]; var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); var pattern$4; - if (/* tag */typeof match$2 === "number" && match$2 === /* T_ASSIGN */75) { - token$4(env, /* T_ASSIGN */75); + if (typeof match$2 !== "object" && match$2 === "T_ASSIGN") { + token$4(env, "T_ASSIGN"); var $$default = Curry._1(Parse.assignment, env); var loc$1 = btwn(pattern$3[0], $$default[0]); pattern$4 = [ loc$1, { - TAG: /* Assignment */2, + TAG: "Assignment", _0: { left: pattern$3, right: $$default @@ -12806,7 +12820,7 @@ function _object$2(restricted_error) { } var loc$2 = btwn(start_loc, pattern$4[0]); return { - TAG: /* Property */0, + TAG: "Property", _0: [ loc$2, { @@ -12821,10 +12835,10 @@ function _object$2(restricted_error) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_RCURLY */2 : - case /* T_EOF */105 : + case "T_RCURLY" : + case "T_EOF" : return List.rev(acc); default: @@ -12832,8 +12846,8 @@ function _object$2(restricted_error) { } var prop = property(env); if (prop !== undefined) { - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RCURLY */2) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RCURLY") { + token$4(env, "T_COMMA"); } _acc = { hd: prop, @@ -12846,12 +12860,12 @@ function _object$2(restricted_error) { }; return function (env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var properties$1 = properties(env, /* [] */0); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); var match; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_COLON */77) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_COLON") { var typeAnnotation = wrap(annotation, env); match = [ typeAnnotation[0], @@ -12866,7 +12880,7 @@ function _object$2(restricted_error) { return [ btwn(start_loc, match[0]), { - TAG: /* Object */0, + TAG: "Object", _0: { properties: properties$1, typeAnnotation: match[1] @@ -12881,22 +12895,22 @@ function _array(restricted_error) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_COMMA */8 : - token$4(env, /* T_COMMA */8); + case "T_COMMA" : + token$4(env, "T_COMMA"); _acc = { hd: undefined, tl: acc }; continue ; - case /* T_ELLIPSIS */11 : + case "T_ELLIPSIS" : var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_ELLIPSIS */11); + token$4(env, "T_ELLIPSIS"); var argument = pattern$1(env, restricted_error); var loc = btwn(start_loc, argument[0]); var element = { - TAG: /* Spread */1, + TAG: "Spread", _0: [ loc, { @@ -12909,8 +12923,8 @@ function _array(restricted_error) { tl: acc }; continue ; - case /* T_RBRACKET */6 : - case /* T_EOF */105 : + case "T_RBRACKET" : + case "T_EOF" : return List.rev(acc); default: @@ -12919,14 +12933,14 @@ function _array(restricted_error) { var pattern$2 = pattern$1(env, restricted_error); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env); var pattern$3; - if (/* tag */typeof match$1 === "number" && match$1 === /* T_ASSIGN */75) { - token$4(env, /* T_ASSIGN */75); + if (typeof match$1 !== "object" && match$1 === "T_ASSIGN") { + token$4(env, "T_ASSIGN"); var $$default = Curry._1(Parse.expression, env); var loc$1 = btwn(pattern$2[0], $$default[0]); pattern$3 = [ loc$1, { - TAG: /* Assignment */2, + TAG: "Assignment", _0: { left: pattern$2, right: $$default @@ -12937,11 +12951,11 @@ function _array(restricted_error) { pattern$3 = pattern$2; } var element$1 = { - TAG: /* Element */0, + TAG: "Element", _0: pattern$3 }; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_RBRACKET */6) { - token$4(env, /* T_COMMA */8); + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_RBRACKET") { + token$4(env, "T_COMMA"); } _acc = { hd: element$1, @@ -12952,12 +12966,12 @@ function _array(restricted_error) { }; return function (env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LBRACKET */5); + token$4(env, "T_LBRACKET"); var elements$1 = elements(env, /* [] */0); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RBRACKET */6); + token$4(env, "T_RBRACKET"); var match; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_COLON */77) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_COLON") { var typeAnnotation = wrap(annotation, env); match = [ typeAnnotation[0], @@ -12972,7 +12986,7 @@ function _array(restricted_error) { return [ btwn(start_loc, match[0]), { - TAG: /* Array */1, + TAG: "Array", _0: { elements: elements$1, typeAnnotation: match[1] @@ -12984,11 +12998,11 @@ function _array(restricted_error) { function pattern$1(env, restricted_error) { var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_LCURLY */1 : + case "T_LCURLY" : return _object$2(restricted_error)(env); - case /* T_LBRACKET */5 : + case "T_LBRACKET" : return _array(restricted_error)(env); default: @@ -12998,20 +13012,20 @@ function pattern$1(env, restricted_error) { return [ id[0], { - TAG: /* Identifier */3, + TAG: "Identifier", _0: id } ]; } function spread_attribute(env) { - push_lex_mode(env, /* NORMAL */0); + push_lex_mode(env, "NORMAL"); var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); - token$4(env, /* T_ELLIPSIS */11); + token$4(env, "T_LCURLY"); + token$4(env, "T_ELLIPSIS"); var argument = Curry._1(assignment, env); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); pop_lex_mode(env); return [ btwn(start_loc, end_loc), @@ -13022,24 +13036,24 @@ function spread_attribute(env) { } function expression_container(env) { - push_lex_mode(env, /* NORMAL */0); + push_lex_mode(env, "NORMAL"); var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var expression; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_RCURLY */2) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_RCURLY") { var empty_loc = btwn_exclusive(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env)); expression = { - TAG: /* EmptyExpression */1, + TAG: "EmptyExpression", _0: empty_loc }; } else { expression = { - TAG: /* Expression */0, + TAG: "Expression", _0: Curry._1(Parse.expression, env) }; } var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); pop_lex_mode(env); return [ btwn(start_loc, end_loc), @@ -13052,7 +13066,7 @@ function expression_container(env) { function identifier$1(env) { var loc = Curry._2(Parser_env_Peek.loc, undefined, env); var name = Curry._2(Parser_env_Peek.value, undefined, env); - token$4(env, /* T_JSX_IDENTIFIER */106); + token$4(env, "T_JSX_IDENTIFIER"); return [ loc, { @@ -13065,17 +13079,17 @@ function member_expression(env, _member) { while(true) { var member = _member; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return member; } - if (match !== /* T_PERIOD */9) { + if (match !== "T_PERIOD") { return member; } var _object = { - TAG: /* MemberExpression */1, + TAG: "MemberExpression", _0: member }; - token$4(env, /* T_PERIOD */9); + token$4(env, "T_PERIOD"); var property = identifier$1(env); var loc = btwn(member[0], property[0]); var member_1 = { @@ -13094,19 +13108,19 @@ function member_expression(env, _member) { function name(env) { var name$1 = identifier$1(env); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return { - TAG: /* Identifier */0, + TAG: "Identifier", _0: name$1 }; } switch (match) { - case /* T_PERIOD */9 : + case "T_PERIOD" : var _object = { - TAG: /* Identifier */0, + TAG: "Identifier", _0: name$1 }; - token$4(env, /* T_PERIOD */9); + token$4(env, "T_PERIOD"); var property = identifier$1(env); var loc = btwn(name$1[0], property[0]); var member_1 = { @@ -13118,15 +13132,15 @@ function name(env) { member_1 ]; return { - TAG: /* MemberExpression */2, + TAG: "MemberExpression", _0: member_expression(env, member) }; - case /* T_COLON */77 : - token$4(env, /* T_COLON */77); + case "T_COLON" : + token$4(env, "T_COLON"); var name$2 = identifier$1(env); var loc$1 = btwn(name$1[0], name$2[0]); return { - TAG: /* NamespacedName */1, + TAG: "NamespacedName", _0: [ loc$1, { @@ -13137,7 +13151,7 @@ function name(env) { }; default: return { - TAG: /* Identifier */0, + TAG: "Identifier", _0: name$1 }; } @@ -13147,14 +13161,14 @@ function attribute(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); var name = identifier$1(env); var match; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_COLON */77) { - token$4(env, /* T_COLON */77); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_COLON") { + token$4(env, "T_COLON"); var name$1 = identifier$1(env); var loc = btwn(name[0], name$1[0]); match = [ loc, { - TAG: /* NamespacedName */1, + TAG: "NamespacedName", _0: [ loc, { @@ -13168,29 +13182,29 @@ function attribute(env) { match = [ name[0], { - TAG: /* Identifier */0, + TAG: "Identifier", _0: name } ]; } var match$1; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_ASSIGN */75) { - token$4(env, /* T_ASSIGN */75); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_ASSIGN") { + token$4(env, "T_ASSIGN"); var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof token$5 === "number") { - if (token$5 === /* T_LCURLY */1) { + if (typeof token$5 !== "object") { + if (token$5 === "T_LCURLY") { var match$2 = expression_container(env); var expression_container$1 = match$2[1]; var loc$1 = match$2[0]; var match$3 = expression_container$1.expression; - if (match$3.TAG !== /* Expression */0) { - error(env, /* JSXAttributeValueEmptyExpression */40); + if (match$3.TAG !== "Expression") { + error(env, "JSXAttributeValueEmptyExpression"); } match$1 = [ loc$1, { - TAG: /* ExpressionContainer */1, + TAG: "ExpressionContainer", _0: loc$1, _1: expression_container$1 } @@ -13198,18 +13212,18 @@ function attribute(env) { } else { exit = 1; } - } else if (token$5.TAG === /* T_JSX_TEXT */4) { + } else if (token$5.TAG === "T_JSX_TEXT") { var match$4 = token$5._0; var loc$2 = match$4[0]; token$4(env, token$5); var value = { - TAG: /* String */0, + TAG: "String", _0: match$4[1] }; match$1 = [ loc$2, { - TAG: /* Literal */0, + TAG: "Literal", _0: loc$2, _1: { value: value, @@ -13221,16 +13235,16 @@ function attribute(env) { exit = 1; } if (exit === 1) { - error(env, /* InvalidJSXAttributeValue */41); + error(env, "InvalidJSXAttributeValue"); var loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); match$1 = [ loc$3, { - TAG: /* Literal */0, + TAG: "Literal", _0: loc$3, _1: { value: { - TAG: /* String */0, + TAG: "String", _0: "" }, raw: "" @@ -13258,11 +13272,11 @@ function attributes(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_LCURLY */1 : + case "T_LCURLY" : var attribute$1 = { - TAG: /* SpreadAttribute */1, + TAG: "SpreadAttribute", _0: spread_attribute(env) }; _acc = { @@ -13270,16 +13284,16 @@ function attributes(env, _acc) { tl: acc }; continue ; - case /* T_GREATER_THAN */90 : - case /* T_DIV */96 : - case /* T_EOF */105 : + case "T_GREATER_THAN" : + case "T_DIV" : + case "T_EOF" : return List.rev(acc); default: } } var attribute$2 = { - TAG: /* Attribute */0, + TAG: "Attribute", _0: attribute(env) }; _acc = { @@ -13293,12 +13307,12 @@ function attributes(env, _acc) { function opening_element_without_lt(env, start_loc) { var name$1 = name(env); var attributes$1 = attributes(env, /* [] */0); - var selfClosing = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_DIV */96; + var selfClosing = Curry._2(Parser_env_Peek.token, undefined, env) === "T_DIV"; if (selfClosing) { - token$4(env, /* T_DIV */96); + token$4(env, "T_DIV"); } var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_GREATER_THAN */90); + token$4(env, "T_GREATER_THAN"); pop_lex_mode(env); return [ btwn(start_loc, end_loc), @@ -13311,10 +13325,10 @@ function opening_element_without_lt(env, start_loc) { } function closing_element_without_lt(env, start_loc) { - token$4(env, /* T_DIV */96); + token$4(env, "T_DIV"); var name$1 = name(env); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_GREATER_THAN */90); + token$4(env, "T_GREATER_THAN"); double_pop_lex_mode(env); return [ btwn(start_loc, end_loc), @@ -13326,25 +13340,25 @@ function closing_element_without_lt(env, start_loc) { function child(env) { var token$5 = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof token$5 === "number") { - if (token$5 === /* T_LCURLY */1) { + if (typeof token$5 !== "object") { + if (token$5 === "T_LCURLY") { var expression_container$1 = expression_container(env); return [ expression_container$1[0], { - TAG: /* ExpressionContainer */1, + TAG: "ExpressionContainer", _0: expression_container$1[1] } ]; } - } else if (token$5.TAG === /* T_JSX_TEXT */4) { + } else if (token$5.TAG === "T_JSX_TEXT") { var match = token$5._0; token$4(env, token$5); return [ match[0], { - TAG: /* Text */2, + TAG: "Text", _0: { value: match[1], raw: match[2] @@ -13356,7 +13370,7 @@ function child(env) { return [ element$1[0], { - TAG: /* Element */0, + TAG: "Element", _0: element$1[1] } ]; @@ -13364,32 +13378,32 @@ function child(env) { function element(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - push_lex_mode(env, /* JSX_TAG */2); - token$4(env, /* T_LESS_THAN */89); + push_lex_mode(env, "JSX_TAG"); + token$4(env, "T_LESS_THAN"); return Curry._2(element_without_lt, env, start_loc); } function element_or_closing(env) { - push_lex_mode(env, /* JSX_TAG */2); + push_lex_mode(env, "JSX_TAG"); var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LESS_THAN */89); + token$4(env, "T_LESS_THAN"); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return { - TAG: /* ChildElement */1, + TAG: "ChildElement", _0: Curry._2(element_without_lt, env, start_loc) }; } switch (match) { - case /* T_DIV */96 : - case /* T_EOF */105 : + case "T_DIV" : + case "T_EOF" : return { - TAG: /* Closing */0, + TAG: "Closing", _0: closing_element_without_lt(env, start_loc) }; default: return { - TAG: /* ChildElement */1, + TAG: "ChildElement", _0: Curry._2(element_without_lt, env, start_loc) }; } @@ -13399,11 +13413,11 @@ function children_and_closing(env, _acc) { while(true) { var acc = _acc; var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_LESS_THAN */89 : + case "T_LESS_THAN" : var closingElement = element_or_closing(env); - if (closingElement.TAG === /* Closing */0) { + if (closingElement.TAG === "Closing") { return [ List.rev(acc), closingElement._0 @@ -13412,7 +13426,7 @@ function children_and_closing(env, _acc) { var element = closingElement._0; var element_0 = element[0]; var element_1 = { - TAG: /* Element */0, + TAG: "Element", _0: element[1] }; var element$1 = [ @@ -13424,7 +13438,7 @@ function children_and_closing(env, _acc) { tl: acc }; continue ; - case /* T_EOF */105 : + case "T_EOF" : error_unexpected(env); return [ List.rev(acc), @@ -13448,18 +13462,18 @@ function children_and_closing(env, _acc) { } function normalize(name) { - switch (name.TAG | 0) { - case /* Identifier */0 : + switch (name.TAG) { + case "Identifier" : return name._0[1].name; - case /* NamespacedName */1 : + case "NamespacedName" : var match = name._0[1]; return match.namespace[1].name + (":" + match.name[1].name); - case /* MemberExpression */2 : + case "MemberExpression" : var match$1 = name._0[1]; var _object = match$1._object; var _object$1; - _object$1 = _object.TAG === /* Identifier */0 ? _object._0[1].name : normalize({ - TAG: /* MemberExpression */2, + _object$1 = _object.TAG === "Identifier" ? _object._0[1].name : normalize({ + TAG: "MemberExpression", _0: _object._0 }); return _object$1 + ("." + match$1.property[1].name); @@ -13472,14 +13486,14 @@ function element_without_lt(env, start_loc) { var match = openingElement[1].selfClosing ? [ /* [] */0, undefined - ] : (push_lex_mode(env, /* JSX_CHILD */3), children_and_closing(env, /* [] */0)); + ] : (push_lex_mode(env, "JSX_CHILD"), children_and_closing(env, /* [] */0)); var closingElement = match[1]; var end_loc; if (closingElement !== undefined) { var opening_name = normalize(openingElement[1].name); if (normalize(closingElement[1].name) !== opening_name) { error(env, { - TAG: /* ExpectedJSXClosingTag */6, + TAG: "ExpectedJSXClosingTag", _0: opening_name }); } @@ -13503,15 +13517,15 @@ function statement_list_item(decoratorsOpt, env) { error_on_decorators(env)(decorators); } var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_CONST */25 : + case "T_CONST" : return var_or_const(env); - case /* T_LET */26 : + case "T_LET" : var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LET */26); - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_LPAREN */3) { - token$4(env, /* T_LPAREN */3); + token$4(env, "T_LET"); + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_LPAREN") { + token$4(env, "T_LPAREN"); var match$1 = helper(with_no_let(true, env), /* [] */0, /* [] */0); var head = List.map((function (param) { var match = param[1]; @@ -13520,7 +13534,7 @@ function statement_list_item(decoratorsOpt, env) { init: match.init }; }), match$1[1]); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var body = Curry._1(Parse.statement, env); var end_loc = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); var end_loc$1 = end_loc !== undefined ? end_loc : match$1[0]; @@ -13531,7 +13545,7 @@ function statement_list_item(decoratorsOpt, env) { return [ btwn(start_loc, end_loc$1), { - TAG: /* Let */17, + TAG: "Let", _0: { head: head, body: body @@ -13541,10 +13555,10 @@ function statement_list_item(decoratorsOpt, env) { } var match$2 = helper(with_no_let(true, env), /* [] */0, /* [] */0); var declaration = { - TAG: /* VariableDeclaration */19, + TAG: "VariableDeclaration", _0: { declarations: match$2[1], - kind: /* Let */1 + kind: "Let" } }; var end_loc$2 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); @@ -13567,15 +13581,15 @@ function statement_list_item(decoratorsOpt, env) { if (Curry._2(Parser_env_Peek.is_class, undefined, env)) { return class_declaration$1(env, decorators); } - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return statement(env); } switch (match) { - case /* T_INTERFACE */51 : + case "T_INTERFACE" : return $$interface(env); - case /* T_DECLARE */58 : + case "T_DECLARE" : return declare(undefined, env); - case /* T_TYPE */59 : + case "T_TYPE" : return type_alias(env); default: return statement(env); @@ -13586,33 +13600,33 @@ function statement(env) { while(true) { var match = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { switch (match) { - case /* T_LCURLY */1 : + case "T_LCURLY" : var match$1 = Curry._1(Parse.block_body, env); return [ match$1[0], { - TAG: /* Block */0, + TAG: "Block", _0: match$1[1] } ]; - case /* T_SEMICOLON */7 : + case "T_SEMICOLON" : var loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_SEMICOLON */7); + token$4(env, "T_SEMICOLON"); return [ loc, - /* Empty */0 + "Empty" ]; - case /* T_IF */14 : + case "T_IF" : return _if(env); - case /* T_RETURN */17 : + case "T_RETURN" : if (!env.in_function) { - error(env, /* IllegalReturn */23); + error(env, "IllegalReturn"); } var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RETURN */17); - var argument = Curry._2(Parser_env_Peek.token, undefined, env) === /* T_SEMICOLON */7 || Curry._1(Parser_env_Peek.is_implicit_semicolon, env) ? undefined : Curry._1(Parse.expression, env); + token$4(env, "T_RETURN"); + var argument = Curry._2(Parser_env_Peek.token, undefined, env) === "T_SEMICOLON" || Curry._1(Parser_env_Peek.is_implicit_semicolon, env) ? undefined : Curry._1(Parse.expression, env); var loc$1 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); var end_loc = loc$1 !== undefined ? loc$1 : ( argument !== undefined ? argument[0] : start_loc @@ -13621,29 +13635,29 @@ function statement(env) { return [ btwn(start_loc, end_loc), { - TAG: /* Return */9, + TAG: "Return", _0: { argument: argument } } ]; - case /* T_SWITCH */18 : + case "T_SWITCH" : var start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_SWITCH */18); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_SWITCH"); + token$4(env, "T_LPAREN"); var discriminant = Curry._1(Parse.expression, env); - token$4(env, /* T_RPAREN */4); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_RPAREN"); + token$4(env, "T_LCURLY"); var cases = case_list(env, [ false, /* [] */0 ]); var end_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return [ btwn(start_loc$1, end_loc$1), { - TAG: /* Switch */8, + TAG: "Switch", _0: { discriminant: discriminant, cases: cases, @@ -13651,13 +13665,13 @@ function statement(env) { } } ]; - case /* T_THROW */20 : + case "T_THROW" : var start_loc$2 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_THROW */20); + token$4(env, "T_THROW"); if (Curry._1(Parser_env_Peek.is_line_terminator, env)) { error_at(env, [ start_loc$2, - /* NewlineAfterThrow */11 + "NewlineAfterThrow" ]); } var argument$1 = Curry._1(Parse.expression, env); @@ -13667,33 +13681,33 @@ function statement(env) { return [ btwn(start_loc$2, end_loc$2), { - TAG: /* Throw */10, + TAG: "Throw", _0: { argument: argument$1 } } ]; - case /* T_TRY */21 : + case "T_TRY" : var start_loc$3 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_TRY */21); + token$4(env, "T_TRY"); var block = Curry._1(Parse.block_body, env); var match$2 = Curry._2(Parser_env_Peek.token, undefined, env); var handler; - if (/* tag */typeof match$2 === "number" && match$2 === /* T_CATCH */32) { + if (typeof match$2 !== "object" && match$2 === "T_CATCH") { var start_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_CATCH */32); - token$4(env, /* T_LPAREN */3); - var id = Curry._2(Parse.identifier, /* StrictCatchVariable */26, env); + token$4(env, "T_CATCH"); + token$4(env, "T_LPAREN"); + var id = Curry._2(Parse.identifier, "StrictCatchVariable", env); var param_0 = id[0]; var param_1 = { - TAG: /* Identifier */3, + TAG: "Identifier", _0: id }; var param = [ param_0, param_1 ]; - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var body = Curry._1(Parse.block_body, env); var loc$3 = btwn(start_loc$4, body[0]); handler = [ @@ -13709,8 +13723,8 @@ function statement(env) { } var match$3 = Curry._2(Parser_env_Peek.token, undefined, env); var finalizer; - if (/* tag */typeof match$3 === "number" && match$3 === /* T_FINALLY */36) { - token$4(env, /* T_FINALLY */36); + if (typeof match$3 !== "object" && match$3 === "T_FINALLY") { + token$4(env, "T_FINALLY"); finalizer = Curry._1(Parse.block_body, env); } else { finalizer = undefined; @@ -13718,13 +13732,13 @@ function statement(env) { var end_loc$3 = finalizer !== undefined ? finalizer[0] : ( handler !== undefined ? handler[0] : (error_at(env, [ block[0], - /* NoCatchOrFinally */20 + "NoCatchOrFinally" ]), block[0]) ); return [ btwn(start_loc$3, end_loc$3), { - TAG: /* Try */11, + TAG: "Try", _0: { block: block, handler: handler, @@ -13733,59 +13747,59 @@ function statement(env) { } } ]; - case /* T_VAR */22 : + case "T_VAR" : return var_or_const(env); - case /* T_WHILE */23 : + case "T_WHILE" : var start_loc$5 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_WHILE */23); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_WHILE"); + token$4(env, "T_LPAREN"); var test = Curry._1(Parse.expression, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var body$1 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$5, body$1[0]), { - TAG: /* While */12, + TAG: "While", _0: { test: test, body: body$1 } } ]; - case /* T_WITH */24 : + case "T_WITH" : var start_loc$6 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_WITH */24); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_WITH"); + token$4(env, "T_LPAREN"); var _object = Curry._1(Parse.expression, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var body$2 = Curry._1(Parse.statement, env); var loc$4 = btwn(start_loc$6, body$2[0]); strict_error_at(env, [ loc$4, - /* StrictModeWith */25 + "StrictModeWith" ]); return [ loc$4, { - TAG: /* With */6, + TAG: "With", _0: { _object: _object, body: body$2 } } ]; - case /* T_BREAK */30 : + case "T_BREAK" : var start_loc$7 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_BREAK */30); + token$4(env, "T_BREAK"); var label; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_SEMICOLON */7 || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_SEMICOLON" || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)) { label = undefined; } else { var label$1 = Curry._2(Parse.identifier, undefined, env); var name = label$1[1].name; if (!mem$1(name, env.labels)) { error(env, { - TAG: /* UnknownLabel */4, + TAG: "UnknownLabel", _0: name }); } @@ -13799,31 +13813,31 @@ function statement(env) { if (label === undefined && !(env.in_loop || env.in_switch)) { error_at(env, [ loc$6, - /* IllegalBreak */22 + "IllegalBreak" ]); } semicolon(env); return [ loc$6, { - TAG: /* Break */4, + TAG: "Break", _0: { label: label } } ]; - case /* T_CONTINUE */33 : + case "T_CONTINUE" : var start_loc$8 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_CONTINUE */33); + token$4(env, "T_CONTINUE"); var label$2; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_SEMICOLON */7 || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_SEMICOLON" || Curry._1(Parser_env_Peek.is_implicit_semicolon, env)) { label$2 = undefined; } else { var label$3 = Curry._2(Parse.identifier, undefined, env); var name$1 = label$3[1].name; if (!mem$1(name$1, env.labels)) { error(env, { - TAG: /* UnknownLabel */4, + TAG: "UnknownLabel", _0: name$1 }); } @@ -13837,83 +13851,83 @@ function statement(env) { if (!env.in_loop) { error_at(env, [ loc$8, - /* IllegalContinue */21 + "IllegalContinue" ]); } semicolon(env); return [ loc$8, { - TAG: /* Continue */5, + TAG: "Continue", _0: { label: label$2 } } ]; - case /* T_DO */35 : + case "T_DO" : var start_loc$9 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_DO */35); + token$4(env, "T_DO"); var body$3 = Curry._1(Parse.statement, with_in_loop(true, env)); - token$4(env, /* T_WHILE */23); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_WHILE"); + token$4(env, "T_LPAREN"); var test$1 = Curry._1(Parse.expression, env); var end_loc$6 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var loc$9 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); var end_loc$7 = loc$9 !== undefined ? loc$9 : end_loc$6; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_SEMICOLON */7) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_SEMICOLON") { semicolon(env); } return [ btwn(start_loc$9, end_loc$7), { - TAG: /* DoWhile */13, + TAG: "DoWhile", _0: { body: body$3, test: test$1 } } ]; - case /* T_FOR */37 : + case "T_FOR" : var start_loc$10 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_FOR */37); - token$4(env, /* T_LPAREN */3); + token$4(env, "T_FOR"); + token$4(env, "T_LPAREN"); var match$4 = Curry._2(Parser_env_Peek.token, undefined, env); var match$5; var exit$1 = 0; - if (/* tag */typeof match$4 === "number") { + if (typeof match$4 !== "object") { switch (match$4) { - case /* T_SEMICOLON */7 : + case "T_SEMICOLON" : match$5 = [ undefined, /* [] */0 ]; break; - case /* T_VAR */22 : - var match$6 = declarations(/* T_VAR */22, /* Var */0, with_no_in(true, env)); + case "T_VAR" : + var match$6 = declarations("T_VAR", "Var", with_no_in(true, env)); match$5 = [ { - TAG: /* InitDeclaration */0, + TAG: "InitDeclaration", _0: match$6[0] }, match$6[1] ]; break; - case /* T_CONST */25 : + case "T_CONST" : var match$7 = $$const(with_no_in(true, env)); match$5 = [ { - TAG: /* InitDeclaration */0, + TAG: "InitDeclaration", _0: match$7[0] }, match$7[1] ]; break; - case /* T_LET */26 : + case "T_LET" : var match$8 = _let(with_no_in(true, env)); match$5 = [ { - TAG: /* InitDeclaration */0, + TAG: "InitDeclaration", _0: match$8[0] }, match$8[1] @@ -13929,7 +13943,7 @@ function statement(env) { var expr = Curry._1(Parse.expression, with_no_let(true, with_no_in(true, env))); match$5 = [ { - TAG: /* InitExpression */1, + TAG: "InitExpression", _0: expr }, /* [] */0 @@ -13937,17 +13951,17 @@ function statement(env) { } var init = match$5[0]; var match$9 = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match$9 === "number") { + if (typeof match$9 !== "object") { switch (match$9) { - case /* T_IN */15 : - assert_can_be_forin_or_forof(env, /* InvalidLHSInForIn */16, init); + case "T_IN" : + assert_can_be_forin_or_forof(env, "InvalidLHSInForIn", init); var left; if (init !== undefined) { - left = init.TAG === /* InitDeclaration */0 ? ({ - TAG: /* LeftDeclaration */0, + left = init.TAG === "InitDeclaration" ? ({ + TAG: "LeftDeclaration", _0: init._0 }) : ({ - TAG: /* LeftExpression */1, + TAG: "LeftExpression", _0: init._0 }); } else { @@ -13961,14 +13975,14 @@ function statement(env) { Error: new Error() }; } - token$4(env, /* T_IN */15); + token$4(env, "T_IN"); var right = Curry._1(Parse.expression, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var body$4 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$10, body$4[0]), { - TAG: /* ForIn */15, + TAG: "ForIn", _0: { left: left, right: right, @@ -13977,15 +13991,15 @@ function statement(env) { } } ]; - case /* T_OF */60 : - assert_can_be_forin_or_forof(env, /* InvalidLHSInForOf */17, init); + case "T_OF" : + assert_can_be_forin_or_forof(env, "InvalidLHSInForOf", init); var left$1; if (init !== undefined) { - left$1 = init.TAG === /* InitDeclaration */0 ? ({ - TAG: /* LeftDeclaration */0, + left$1 = init.TAG === "InitDeclaration" ? ({ + TAG: "LeftDeclaration", _0: init._0 }) : ({ - TAG: /* LeftExpression */1, + TAG: "LeftExpression", _0: init._0 }); } else { @@ -13999,14 +14013,14 @@ function statement(env) { Error: new Error() }; } - token$4(env, /* T_OF */60); + token$4(env, "T_OF"); var right$1 = Curry._1(Parse.assignment, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var body$5 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$10, body$5[0]), { - TAG: /* ForOf */16, + TAG: "ForOf", _0: { left: left$1, right: right$1, @@ -14021,20 +14035,20 @@ function statement(env) { List.iter((function (param) { return error_at(env, param); }), match$5[1]); - token$4(env, /* T_SEMICOLON */7); + token$4(env, "T_SEMICOLON"); var match$10 = Curry._2(Parser_env_Peek.token, undefined, env); var test$2; - test$2 = /* tag */typeof match$10 === "number" && match$10 === /* T_SEMICOLON */7 ? undefined : Curry._1(Parse.expression, env); - token$4(env, /* T_SEMICOLON */7); + test$2 = typeof match$10 !== "object" && match$10 === "T_SEMICOLON" ? undefined : Curry._1(Parse.expression, env); + token$4(env, "T_SEMICOLON"); var match$11 = Curry._2(Parser_env_Peek.token, undefined, env); var update; - update = /* tag */typeof match$11 === "number" && match$11 === /* T_RPAREN */4 ? undefined : Curry._1(Parse.expression, env); - token$4(env, /* T_RPAREN */4); + update = typeof match$11 !== "object" && match$11 === "T_RPAREN" ? undefined : Curry._1(Parse.expression, env); + token$4(env, "T_RPAREN"); var body$6 = Curry._1(Parse.statement, with_in_loop(true, env)); return [ btwn(start_loc$10, body$6[0]), { - TAG: /* For */14, + TAG: "For", _0: { init: init, test: test$2, @@ -14043,21 +14057,21 @@ function statement(env) { } } ]; - case /* T_DEBUGGER */57 : + case "T_DEBUGGER" : var start_loc$11 = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_DEBUGGER */57); + token$4(env, "T_DEBUGGER"); var loc$10 = Curry._2(Parser_env_Peek.semicolon_loc, undefined, env); var end_loc$8 = loc$10 !== undefined ? loc$10 : start_loc$11; semicolon(env); return [ btwn(start_loc$11, end_loc$8), - /* Debugger */1 + "Debugger" ]; - case /* T_EOF */105 : + case "T_EOF" : error_unexpected(env); return [ Curry._2(Parser_env_Peek.loc, undefined, env), - /* Empty */0 + "Empty" ]; default: exit = 2; @@ -14071,16 +14085,16 @@ function statement(env) { var match$12 = Curry._2(Parser_env_Peek.token, undefined, env); var label$4 = expr$1[1]; var loc$11 = expr$1[0]; - if (/* tag */typeof label$4 !== "number" && label$4.TAG === /* Identifier */18 && /* tag */typeof match$12 === "number" && match$12 === /* T_COLON */77) { + if (typeof label$4 === "object" && label$4.TAG === "Identifier" && typeof match$12 !== "object" && match$12 === "T_COLON") { var label$5 = label$4._0; var match$13 = label$5[1]; var name$2 = match$13.name; - token$4(env, /* T_COLON */77); + token$4(env, "T_COLON"); if (mem$1(name$2, env.labels)) { error_at(env, [ loc$11, { - TAG: /* Redeclaration */5, + TAG: "Redeclaration", _0: "Label", _1: name$2 } @@ -14091,7 +14105,7 @@ function statement(env) { return [ btwn(loc$11, labeled_stmt[0]), { - TAG: /* Labeled */3, + TAG: "Labeled", _0: { label: label$5, body: labeled_stmt @@ -14105,37 +14119,37 @@ function statement(env) { return [ btwn(expr$1[0], end_loc$9), { - TAG: /* Expression */1, + TAG: "Expression", _0: { expression: expr$1 } } ]; } - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return expression(env); } switch (match) { - case /* T_ELSE */41 : + case "T_ELSE" : return _if(env); - case /* T_RCURLY */2 : - case /* T_RPAREN */4 : - case /* T_RBRACKET */6 : - case /* T_COMMA */8 : - case /* T_PERIOD */9 : - case /* T_ARROW */10 : - case /* T_ELLIPSIS */11 : - case /* T_IN */15 : - case /* T_INSTANCEOF */16 : - case /* T_CASE */31 : - case /* T_CATCH */32 : - case /* T_DEFAULT */34 : - case /* T_FINALLY */36 : - case /* T_EXTENDS */39 : - case /* T_STATIC */40 : - case /* T_EXPORT */47 : - case /* T_IMPORT */48 : - case /* T_COLON */77 : + case "T_RCURLY" : + case "T_RPAREN" : + case "T_RBRACKET" : + case "T_COMMA" : + case "T_PERIOD" : + case "T_ARROW" : + case "T_ELLIPSIS" : + case "T_IN" : + case "T_INSTANCEOF" : + case "T_CASE" : + case "T_CATCH" : + case "T_DEFAULT" : + case "T_FINALLY" : + case "T_EXTENDS" : + case "T_STATIC" : + case "T_EXPORT" : + case "T_IMPORT" : + case "T_COLON" : break; default: return expression(env); @@ -14150,20 +14164,20 @@ function statement(env) { function module_item(env) { var decorators = decorator_list(env); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match !== "number") { + if (typeof match === "object") { return statement_list_item(decorators, env); } switch (match) { - case /* T_EXPORT */47 : + case "T_EXPORT" : var env$1 = with_in_export(true, with_strict(true, env)); var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env$1); - token$4(env$1, /* T_EXPORT */47); + token$4(env$1, "T_EXPORT"); var match$1 = Curry._2(Parser_env_Peek.token, undefined, env$1); var exit = 0; - if (/* tag */typeof match$1 === "number") { + if (typeof match$1 !== "object") { switch (match$1) { - case /* T_DEFAULT */34 : - token$4(env$1, /* T_DEFAULT */34); + case "T_DEFAULT" : + token$4(env$1, "T_DEFAULT"); record_export(env$1, [ btwn(start_loc, Curry._2(Parser_env_Peek.loc, undefined, env$1)), "default" @@ -14171,12 +14185,12 @@ function module_item(env) { var match$2 = Curry._2(Parser_env_Peek.token, undefined, env$1); var match$3; var exit$1 = 0; - if (/* tag */typeof match$2 === "number" && match$2 === /* T_FUNCTION */13) { + if (typeof match$2 !== "object" && match$2 === "T_FUNCTION") { var fn = _function(env$1); match$3 = [ fn[0], { - TAG: /* Declaration */0, + TAG: "Declaration", _0: fn } ]; @@ -14189,7 +14203,7 @@ function module_item(env) { match$3 = [ _class[0], { - TAG: /* Declaration */0, + TAG: "Declaration", _0: _class } ]; @@ -14201,7 +14215,7 @@ function module_item(env) { match$3 = [ end_loc, { - TAG: /* Expression */1, + TAG: "Expression", _0: expr } ]; @@ -14210,30 +14224,30 @@ function module_item(env) { return [ btwn(start_loc, match$3[0]), { - TAG: /* ExportDeclaration */28, + TAG: "ExportDeclaration", _0: { default: true, declaration: match$3[1], specifiers: undefined, source: undefined, - exportKind: /* ExportValue */1 + exportKind: "ExportValue" } } ]; - case /* T_INTERFACE */51 : + case "T_INTERFACE" : if (!env$1.parse_options.types) { - error(env$1, /* UnexpectedTypeExport */9); + error(env$1, "UnexpectedTypeExport"); } var $$interface$1 = $$interface(env$1); var match$4 = $$interface$1[1]; - if (/* tag */typeof match$4 === "number") { + if (typeof match$4 !== "object") { throw { RE_EXN_ID: "Failure", _1: "Internal Flow Error! Parsed `export interface` into something other than an interface declaration!", Error: new Error() }; } - if (match$4.TAG === /* InterfaceDeclaration */21) { + if (match$4.TAG === "InterfaceDeclaration") { record_export(env$1, [ $$interface$1[0], extract_ident_name(match$4._0.id) @@ -14249,34 +14263,34 @@ function module_item(env) { return [ btwn(start_loc, end_loc$1), { - TAG: /* ExportDeclaration */28, + TAG: "ExportDeclaration", _0: { default: false, declaration: { - TAG: /* Declaration */0, + TAG: "Declaration", _0: $$interface$1 }, specifiers: undefined, source: undefined, - exportKind: /* ExportType */0 + exportKind: "ExportType" } } ]; - case /* T_TYPE */59 : - if (Curry._2(Parser_env_Peek.token, 1, env$1) !== /* T_LCURLY */1) { + case "T_TYPE" : + if (Curry._2(Parser_env_Peek.token, 1, env$1) !== "T_LCURLY") { if (!env$1.parse_options.types) { - error(env$1, /* UnexpectedTypeExport */9); + error(env$1, "UnexpectedTypeExport"); } var type_alias$1 = type_alias(env$1); var match$5 = type_alias$1[1]; - if (/* tag */typeof match$5 === "number") { + if (typeof match$5 !== "object") { throw { RE_EXN_ID: "Failure", _1: "Internal Flow Error! Parsed `export type` into something other than a type alias!", Error: new Error() }; } - if (match$5.TAG === /* TypeAlias */7) { + if (match$5.TAG === "TypeAlias") { record_export(env$1, [ type_alias$1[0], extract_ident_name(match$5._0.id) @@ -14292,38 +14306,38 @@ function module_item(env) { return [ btwn(start_loc, end_loc$2), { - TAG: /* ExportDeclaration */28, + TAG: "ExportDeclaration", _0: { default: false, declaration: { - TAG: /* Declaration */0, + TAG: "Declaration", _0: type_alias$1 }, specifiers: undefined, source: undefined, - exportKind: /* ExportType */0 + exportKind: "ExportType" } } ]; } exit = 1; break; - case /* T_AT */12 : - case /* T_FUNCTION */13 : - case /* T_VAR */22 : - case /* T_CONST */25 : - case /* T_LET */26 : - case /* T_CLASS */38 : - case /* T_ASYNC */61 : + case "T_AT" : + case "T_FUNCTION" : + case "T_VAR" : + case "T_CONST" : + case "T_LET" : + case "T_CLASS" : + case "T_ASYNC" : exit = 2; break; - case /* T_MULT */97 : + case "T_MULT" : var loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env$1); - token$4(env$1, /* T_MULT */97); + token$4(env$1, "T_MULT"); var parse_export_star_as = env$1.parse_options.esproposal_export_star_as; - var local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error(env$1, /* UnexpectedTypeDeclaration */7), undefined)) : undefined; + var local_name = Curry._2(Parser_env_Peek.value, undefined, env$1) === "as" ? (contextual(env$1, "as"), parse_export_star_as ? Curry._2(Parse.identifier, undefined, env$1) : (error(env$1, "UnexpectedTypeDeclaration"), undefined)) : undefined; var specifiers = { - TAG: /* ExportBatchSpecifier */1, + TAG: "ExportBatchSpecifier", _0: loc$1, _1: local_name }; @@ -14335,13 +14349,13 @@ function module_item(env) { return [ btwn(start_loc, end_loc$3), { - TAG: /* ExportDeclaration */28, + TAG: "ExportDeclaration", _0: { default: false, declaration: undefined, specifiers: specifiers, source: source$2, - exportKind: /* ExportValue */1 + exportKind: "ExportValue" } } ]; @@ -14355,20 +14369,20 @@ function module_item(env) { case 1 : var match$6 = Curry._2(Parser_env_Peek.token, undefined, env$1); var exportKind; - if (/* tag */typeof match$6 === "number" && match$6 === /* T_TYPE */59) { + if (typeof match$6 !== "object" && match$6 === "T_TYPE") { token$3(env$1); - exportKind = /* ExportType */0; + exportKind = "ExportType"; } else { - exportKind = /* ExportValue */1; + exportKind = "ExportValue"; } - token$4(env$1, /* T_LCURLY */1); + token$4(env$1, "T_LCURLY"); var match$7 = export_specifiers_and_errs(env$1, /* [] */0, /* [] */0); var specifiers$1 = { - TAG: /* ExportSpecifiers */0, + TAG: "ExportSpecifiers", _0: match$7[0] }; var end_loc$4 = Curry._2(Parser_env_Peek.loc, undefined, env$1); - token$4(env$1, /* T_RCURLY */2); + token$4(env$1, "T_RCURLY"); var source$3 = Curry._2(Parser_env_Peek.value, undefined, env$1) === "from" ? export_source(env$1) : (List.iter((function (param) { return error_at(env$1, param); }), match$7[1]), undefined); @@ -14380,7 +14394,7 @@ function module_item(env) { return [ btwn(start_loc, end_loc$5), { - TAG: /* ExportDeclaration */28, + TAG: "ExportDeclaration", _0: { default: false, declaration: undefined, @@ -14395,15 +14409,15 @@ function module_item(env) { var match$8 = stmt[1]; var loc$4 = stmt[0]; var names; - if (/* tag */typeof match$8 === "number") { + if (typeof match$8 !== "object") { throw { RE_EXN_ID: "Failure", _1: "Internal Flow Error! Unexpected export statement declaration!", Error: new Error() }; } - switch (match$8.TAG | 0) { - case /* FunctionDeclaration */18 : + switch (match$8.TAG) { + case "FunctionDeclaration" : var id = match$8._0.id; if (id !== undefined) { names = { @@ -14416,12 +14430,12 @@ function module_item(env) { } else { error_at(env$1, [ loc$4, - /* ExportNamelessFunction */56 + "ExportNamelessFunction" ]); names = /* [] */0; } break; - case /* VariableDeclaration */19 : + case "VariableDeclaration" : names = List.fold_left((function (names, param) { var id = param[1].id; var param$1 = { @@ -14431,7 +14445,7 @@ function module_item(env) { return List.fold_left(fold, names, param$1); }), /* [] */0, match$8._0.declarations); break; - case /* ClassDeclaration */20 : + case "ClassDeclaration" : var id$1 = match$8._0.id; if (id$1 !== undefined) { names = { @@ -14444,7 +14458,7 @@ function module_item(env) { } else { error_at(env$1, [ loc$4, - /* ExportNamelessClass */55 + "ExportNamelessClass" ]); names = /* [] */0; } @@ -14460,61 +14474,61 @@ function module_item(env) { return record_export(env$1, param); }), names); var declaration = { - TAG: /* Declaration */0, + TAG: "Declaration", _0: stmt }; return [ btwn(start_loc, stmt[0]), { - TAG: /* ExportDeclaration */28, + TAG: "ExportDeclaration", _0: { default: false, declaration: declaration, specifiers: undefined, source: undefined, - exportKind: /* ExportValue */1 + exportKind: "ExportValue" } } ]; } - case /* T_IMPORT */48 : + case "T_IMPORT" : error_on_decorators(env)(decorators); var env$2 = with_strict(true, env); var start_loc$1 = Curry._2(Parser_env_Peek.loc, undefined, env$2); - token$4(env$2, /* T_IMPORT */48); + token$4(env$2, "T_IMPORT"); var match$9 = Curry._2(Parser_env_Peek.token, undefined, env$2); var match$10; - if (/* tag */typeof match$9 === "number") { + if (typeof match$9 !== "object") { switch (match$9) { - case /* T_TYPEOF */44 : + case "T_TYPEOF" : if (!env$2.parse_options.types) { - error(env$2, /* UnexpectedTypeImport */8); + error(env$2, "UnexpectedTypeImport"); } - token$4(env$2, /* T_TYPEOF */44); + token$4(env$2, "T_TYPEOF"); match$10 = [ - /* ImportTypeof */1, + "ImportTypeof", undefined ]; break; - case /* T_TYPE */59 : + case "T_TYPE" : if (!env$2.parse_options.types) { - error(env$2, /* UnexpectedTypeImport */8); + error(env$2, "UnexpectedTypeImport"); } match$10 = [ - /* ImportType */0, + "ImportType", Curry._2(Parse.identifier, undefined, env$2) ]; break; default: match$10 = [ - /* ImportValue */2, + "ImportValue", undefined ]; } } else { match$10 = [ - /* ImportValue */2, + "ImportValue", undefined ]; } @@ -14524,24 +14538,24 @@ function module_item(env) { var match$12 = Curry._2(Parser_env_Peek.is_identifier, undefined, env$2); var exit$2 = 0; var exit$3 = 0; - if (/* tag */typeof match$11 === "number") { - if (match$11 === /* T_COMMA */8) { + if (typeof match$11 !== "object") { + if (match$11 === "T_COMMA") { exit$2 = 1; } else { exit$3 = 2; } - } else if (match$11.TAG === /* T_STRING */1) { - if (importKind === /* ImportValue */2) { + } else if (match$11.TAG === "T_STRING") { + if (importKind === "ImportValue") { var match$13 = match$11._0; var octal = match$13[3]; var raw = match$13[2]; var value = match$13[1]; var str_loc = match$13[0]; if (octal) { - strict_error(env$2, /* StrictOctalLiteral */31); + strict_error(env$2, "StrictOctalLiteral"); } token$4(env$2, { - TAG: /* T_STRING */1, + TAG: "T_STRING", _0: [ str_loc, value, @@ -14550,7 +14564,7 @@ function module_item(env) { ] }); var value$1 = { - TAG: /* String */0, + TAG: "String", _0: value }; var source_1 = { @@ -14567,7 +14581,7 @@ function module_item(env) { return [ btwn(start_loc$1, end_loc$6), { - TAG: /* ImportDeclaration */29, + TAG: "ImportDeclaration", _0: { importKind: importKind, source: source$4, @@ -14592,7 +14606,7 @@ function module_item(env) { return [ btwn(start_loc$1, end_loc$7), { - TAG: /* ImportDeclaration */29, + TAG: "ImportDeclaration", _0: { importKind: importKind, source: source$5, @@ -14607,14 +14621,14 @@ function module_item(env) { var match$15 = Curry._2(Parser_env_Peek.value, undefined, env$2); var match$16; var exit$4 = 0; - if (type_ident !== undefined && /* tag */typeof match$14 === "number") { + if (type_ident !== undefined && typeof match$14 !== "object") { switch (match$14) { - case /* T_IDENTIFIER */0 : + case "T_IDENTIFIER" : if (match$15 === "from") { match$16 = [ - /* ImportValue */2, + "ImportValue", { - TAG: /* ImportDefaultSpecifier */1, + TAG: "ImportDefaultSpecifier", _0: type_ident } ]; @@ -14622,11 +14636,11 @@ function module_item(env) { exit$4 = 2; } break; - case /* T_COMMA */8 : + case "T_COMMA" : match$16 = [ - /* ImportValue */2, + "ImportValue", { - TAG: /* ImportDefaultSpecifier */1, + TAG: "ImportDefaultSpecifier", _0: type_ident } ]; @@ -14641,15 +14655,15 @@ function module_item(env) { match$16 = [ importKind, { - TAG: /* ImportDefaultSpecifier */1, + TAG: "ImportDefaultSpecifier", _0: Curry._2(Parse.identifier, undefined, env$2) } ]; } var match$17 = Curry._2(Parser_env_Peek.token, undefined, env$2); var additional_specifiers; - if (/* tag */typeof match$17 === "number" && match$17 === /* T_COMMA */8) { - token$4(env$2, /* T_COMMA */8); + if (typeof match$17 !== "object" && match$17 === "T_COMMA") { + token$4(env$2, "T_COMMA"); additional_specifiers = named_or_namespace_specifier(env$2); } else { additional_specifiers = /* [] */0; @@ -14661,7 +14675,7 @@ function module_item(env) { return [ btwn(start_loc$1, end_loc$8), { - TAG: /* ImportDeclaration */29, + TAG: "ImportDeclaration", _0: { importKind: match$16[0], source: source$6, @@ -14673,8 +14687,8 @@ function module_item(env) { } ]; } - case /* T_DECLARE */58 : - if (Curry._2(Parser_env_Peek.token, 1, env) === /* T_EXPORT */47) { + case "T_DECLARE" : + if (Curry._2(Parser_env_Peek.token, 1, env) === "T_EXPORT") { error_on_decorators(env)(decorators); return declare_export_declaration(undefined, env); } else { @@ -14690,7 +14704,7 @@ function statement_list(term_fn, env) { while(true) { var acc = _acc; var t = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof t === "number" && t === /* T_EOF */105) { + if (typeof t !== "object" && t === "T_EOF") { return List.rev(acc); } if (Curry._1(term_fn, t)) { @@ -14711,7 +14725,7 @@ function statement_list$1(_env, term_fn, item_fn, _param) { var stmts = param[1]; var string_tokens = param[0]; var t = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof t === "number" && t === /* T_EOF */105) { + if (typeof t !== "object" && t === "T_EOF") { return [ env, string_tokens, @@ -14737,14 +14751,14 @@ function statement_list$1(_env, term_fn, item_fn, _param) { tl: stmts }; var match = possible_directive[1]; - if (/* tag */typeof match === "number") { + if (typeof match !== "object") { return [ env, string_tokens, stmts$1 ]; } - if (match.TAG !== /* Expression */1) { + if (match.TAG !== "Expression") { return [ env, string_tokens, @@ -14753,14 +14767,14 @@ function statement_list$1(_env, term_fn, item_fn, _param) { } var match$1 = match._0.expression; var match$2 = match$1[1]; - if (/* tag */typeof match$2 === "number") { + if (typeof match$2 !== "object") { return [ env, string_tokens, stmts$1 ]; } - if (match$2.TAG !== /* Literal */19) { + if (match$2.TAG !== "Literal") { return [ env, string_tokens, @@ -14768,14 +14782,14 @@ function statement_list$1(_env, term_fn, item_fn, _param) { ]; } var str = match$2._0.value; - if (/* tag */typeof str === "number") { + if (typeof str !== "object") { return [ env, string_tokens, stmts$1 ]; } - if (str.TAG !== /* String */0) { + if (str.TAG !== "String") { return [ env, string_tokens, @@ -14806,11 +14820,11 @@ function directives(env, term_fn, item_fn) { var env$1 = match[0]; List.iter((function (param) { var token = param[1]; - if (/* tag */typeof token !== "number" && token.TAG === /* T_STRING */1) { + if (typeof token === "object" && token.TAG === "T_STRING") { if (token._0[3]) { return strict_error_at(env$1, [ param[0], - /* StrictOctalLiteral */31 + "StrictOctalLiteral" ]); } else { return ; @@ -14836,7 +14850,7 @@ function module_body(term_fn, env) { while(true) { var acc = _acc; var t = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof t === "number" && t === /* T_EOF */105) { + if (typeof t !== "object" && t === "T_EOF") { return List.rev(acc); } if (Curry._1(term_fn, t)) { @@ -14855,12 +14869,12 @@ function identifier$2(restricted_error, env) { var name = Curry._2(Parser_env_Peek.value, undefined, env); var t = Curry._2(Parser_env_Peek.token, undefined, env); var exit = 0; - if (/* tag */typeof t === "number" && t === /* T_LET */26) { + if (typeof t !== "object" && t === "T_LET") { if (env.in_strict_mode) { - strict_error(env, /* StrictReservedWord */39); + strict_error(env, "StrictReservedWord"); } else if (env.no_let) { error(env, { - TAG: /* UnexpectedToken */1, + TAG: "UnexpectedToken", _0: name }); } @@ -14870,22 +14884,22 @@ function identifier$2(restricted_error, env) { } if (exit === 1) { if (is_strict_reserved(name)) { - strict_error(env, /* StrictReservedWord */39); + strict_error(env, "StrictReservedWord"); token$3(env); - } else if (/* tag */typeof t === "number") { + } else if (typeof t !== "object") { switch (t) { - case /* T_DECLARE */58 : - case /* T_TYPE */59 : - case /* T_OF */60 : - case /* T_ASYNC */61 : - case /* T_AWAIT */62 : + case "T_DECLARE" : + case "T_TYPE" : + case "T_OF" : + case "T_ASYNC" : + case "T_AWAIT" : token$4(env, t); break; default: - token$4(env, /* T_IDENTIFIER */0); + token$4(env, "T_IDENTIFIER"); } } else { - token$4(env, /* T_IDENTIFIER */0); + token$4(env, "T_IDENTIFIER"); } } if (restricted_error !== undefined && is_restricted(name)) { @@ -14938,7 +14952,7 @@ function program(env) { return false; })); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_EOF */105); + token$4(env, "T_EOF"); var loc = stmts ? btwn(List.hd(stmts)[0], List.hd(List.rev(stmts))[0]) : end_loc; var comments = List.rev(env.comments.contents); return [ @@ -14951,7 +14965,7 @@ function program(env) { function expression$1(env) { var expr = Curry._1(assignment, env); var match = Curry._2(Parser_env_Peek.token, undefined, env); - if (/* tag */typeof match === "number" && match === /* T_COMMA */8) { + if (typeof match !== "object" && match === "T_COMMA") { return sequence(env, { hd: expr, tl: /* [] */0 @@ -14966,12 +14980,12 @@ function identifier_with_type(env, restricted_error) { var id = match[1]; var loc = match[0]; var match$1; - if (Curry._2(Parser_env_Peek.token, undefined, env) === /* T_PLING */76) { + if (Curry._2(Parser_env_Peek.token, undefined, env) === "T_PLING") { if (!env.parse_options.types) { - error(env, /* UnexpectedTypeAnnotation */6); + error(env, "UnexpectedTypeAnnotation"); } var loc$1 = btwn(loc, Curry._2(Parser_env_Peek.loc, undefined, env)); - token$4(env, /* T_PLING */76); + token$4(env, "T_PLING"); match$1 = [ loc$1, { @@ -14988,7 +15002,7 @@ function identifier_with_type(env, restricted_error) { } var id$1 = match$1[1]; var loc$2 = match$1[0]; - if (Curry._2(Parser_env_Peek.token, undefined, env) !== /* T_COLON */77) { + if (Curry._2(Parser_env_Peek.token, undefined, env) !== "T_COLON") { return [ loc$2, id$1 @@ -15009,13 +15023,13 @@ function identifier_with_type(env, restricted_error) { function block_body(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var term_fn = function (t) { - return t === /* T_RCURLY */2; + return t === "T_RCURLY"; }; var body = Curry._2(statement_list, term_fn, env); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return [ btwn(start_loc, end_loc), { @@ -15026,13 +15040,13 @@ function block_body(env) { function function_block_body(env) { var start_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_LCURLY */1); + token$4(env, "T_LCURLY"); var term_fn = function (t) { - return t === /* T_RCURLY */2; + return t === "T_RCURLY"; }; var match = statement_list_with_directives(term_fn, env); var end_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RCURLY */2); + token$4(env, "T_RCURLY"); return [ btwn(start_loc, end_loc), { @@ -15044,121 +15058,122 @@ function function_block_body(env) { function predicate(env) { var checks_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - if (!(Curry._2(Parser_env_Peek.token, undefined, env) === /* T_IDENTIFIER */0 && Curry._2(Parser_env_Peek.value, undefined, env) === "checks")) { + if (!(Curry._2(Parser_env_Peek.token, undefined, env) === "T_IDENTIFIER" && Curry._2(Parser_env_Peek.value, undefined, env) === "checks")) { return ; } - token$4(env, /* T_IDENTIFIER */0); - if (!maybe(env, /* T_LPAREN */3)) { + token$4(env, "T_IDENTIFIER"); + if (!maybe(env, "T_LPAREN")) { return [ checks_loc, - /* Inferred */0 + "Inferred" ]; } var exp = Curry._1(Parse.expression, env); var rparen_loc = Curry._2(Parser_env_Peek.loc, undefined, env); - token$4(env, /* T_RPAREN */4); + token$4(env, "T_RPAREN"); var loc = btwn(checks_loc, rparen_loc); return [ loc, - /* Declared */{ + { + TAG: "Declared", _0: exp } ]; } Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [ [ - /* Function */0, + "Function", "program" ], [ - /* Function */0, + "Function", "statement" ], [ - /* Function */0, + "Function", "statement_list_item" ], [ - /* Function */0, + "Function", "statement_list" ], [ - /* Function */0, + "Function", "statement_list_with_directives" ], [ - /* Function */0, + "Function", "module_body" ], [ - /* Function */0, + "Function", "expression" ], [ - /* Function */0, + "Function", "assignment" ], [ - /* Function */0, + "Function", "object_initializer" ], [ - /* Function */0, + "Function", "array_initializer" ], [ - /* Function */0, + "Function", "identifier" ], [ - /* Function */0, + "Function", "identifier_or_reserved_keyword" ], [ - /* Function */0, + "Function", "identifier_with_type" ], [ - /* Function */0, + "Function", "block_body" ], [ - /* Function */0, + "Function", "function_block_body" ], [ - /* Function */0, + "Function", "jsx_element" ], [ - /* Function */0, + "Function", "pattern" ], [ - /* Function */0, + "Function", "pattern_from_expr" ], [ - /* Function */0, + "Function", "object_key" ], [ - /* Function */0, + "Function", "class_declaration" ], [ - /* Function */0, + "Function", "class_expression" ], [ - /* Function */0, + "Function", "is_assignable_lhs" ], [ - /* Function */0, + "Function", "predicate" ] ] @@ -15238,7 +15253,7 @@ function regexp$1(loc, pattern, flags) { translation_errors.contents = { hd: [ loc, - /* InvalidRegExp */12 + "InvalidRegExp" ], tl: translation_errors.contents }; @@ -15275,7 +15290,7 @@ function parse(content, options) { var loc = function ($$location) { var match = $$location.source; var source = match !== undefined ? ( - /* tag */typeof match === "number" ? string("(global)") : string(match._0) + typeof match !== "object" ? string("(global)") : string(match._0) ) : $$null; return obj([ [ @@ -15332,49 +15347,49 @@ function parse(content, options) { var _type = function (param) { var t = param[1]; var loc = param[0]; - if (/* tag */typeof t === "number") { + if (typeof t !== "object") { switch (t) { - case /* Any */0 : + case "Any" : return node("AnyTypeAnnotation", loc, []); - case /* Void */1 : + case "Void" : return node("VoidTypeAnnotation", loc, []); - case /* Null */2 : + case "Null" : return node("NullTypeAnnotation", loc, []); - case /* Number */3 : + case "Number" : return node("NumberTypeAnnotation", loc, []); - case /* String */4 : + case "String" : return node("StringTypeAnnotation", loc, []); - case /* Boolean */5 : + case "Boolean" : return node("BooleanTypeAnnotation", loc, []); - case /* Exists */6 : + case "Exists" : return node("ExistsTypeAnnotation", loc, []); } } else { - switch (t.TAG | 0) { - case /* Nullable */0 : + switch (t.TAG) { + case "Nullable" : var t$1 = t._0; return node("NullableTypeAnnotation", loc, [[ "typeAnnotation", _type(t$1) ]]); - case /* Function */1 : + case "Function" : return function_type([ loc, t._0 ]); - case /* Object */2 : + case "Object" : return object_type([ loc, t._0 ]); - case /* Array */3 : + case "Array" : var t$2 = t._0; return node("ArrayTypeAnnotation", loc, [[ "elementType", _type(t$2) ]]); - case /* Generic */4 : + case "Generic" : var param$1 = [ loc, t._0 @@ -15382,7 +15397,7 @@ function parse(content, options) { var g = param$1[1]; var id = g.id; var id$1; - id$1 = id.TAG === /* Unqualified */0 ? identifier(id._0) : generic_type_qualified_identifier(id._0); + id$1 = id.TAG === "Unqualified" ? identifier(id._0) : generic_type_qualified_identifier(id._0); return node("GenericTypeAnnotation", param$1[0], [ [ "id", @@ -15393,7 +15408,7 @@ function parse(content, options) { option(type_parameter_instantiation, g.typeParameters) ] ]); - case /* Union */5 : + case "Union" : var param$2 = [ loc, t._0 @@ -15402,7 +15417,7 @@ function parse(content, options) { "types", array_of_list(_type, param$2[1]) ]]); - case /* Intersection */6 : + case "Intersection" : var param$3 = [ loc, t._0 @@ -15411,7 +15426,7 @@ function parse(content, options) { "types", array_of_list(_type, param$3[1]) ]]); - case /* Typeof */7 : + case "Typeof" : var param$4 = [ loc, t._0 @@ -15420,7 +15435,7 @@ function parse(content, options) { "argument", _type(param$4[1]) ]]); - case /* Tuple */8 : + case "Tuple" : var param$5 = [ loc, t._0 @@ -15429,7 +15444,7 @@ function parse(content, options) { "types", array_of_list(_type, param$5[1]) ]]); - case /* StringLiteral */9 : + case "StringLiteral" : var param$6 = [ loc, t._0 @@ -15445,7 +15460,7 @@ function parse(content, options) { string(s.raw) ] ]); - case /* NumberLiteral */10 : + case "NumberLiteral" : var param$7 = [ loc, t._0 @@ -15461,7 +15476,7 @@ function parse(content, options) { string(s$1.raw) ] ]); - case /* BooleanLiteral */11 : + case "BooleanLiteral" : var param$8 = [ loc, t._0 @@ -15484,32 +15499,32 @@ function parse(content, options) { var expression = function (param) { var arr = param[1]; var loc = param[0]; - if (/* tag */typeof arr === "number") { + if (typeof arr !== "object") { return node("ThisExpression", loc, []); } - switch (arr.TAG | 0) { - case /* Array */0 : + switch (arr.TAG) { + case "Array" : return node("ArrayExpression", loc, [[ "elements", array_of_list((function (param) { return option(expression_or_spread, param); }), arr._0.elements) ]]); - case /* Object */1 : + case "Object" : return node("ObjectExpression", loc, [[ "properties", array_of_list(object_property, arr._0.properties) ]]); - case /* Function */2 : + case "Function" : return function_expression([ loc, arr._0 ]); - case /* ArrowFunction */3 : + case "ArrowFunction" : var arrow = arr._0; var b = arrow.body; var body; - body = b.TAG === /* BodyBlock */0 ? block(b._0) : expression(b._0); + body = b.TAG === "BodyBlock" ? block(b._0) : expression(b._0); return node("ArrowFunctionExpression", loc, [ [ "id", @@ -15554,15 +15569,15 @@ function parse(content, options) { option(type_parameter_declaration, arrow.typeParameters) ] ]); - case /* Sequence */4 : + case "Sequence" : return node("SequenceExpression", loc, [[ "expressions", array_of_list(expression, arr._0.expressions) ]]); - case /* Unary */5 : + case "Unary" : var unary = arr._0; var match = unary.operator; - if (match === /* Await */7) { + if (match === "Await") { return node("AwaitExpression", loc, [[ "argument", expression(unary.argument) @@ -15571,28 +15586,28 @@ function parse(content, options) { var match$1 = unary.operator; var operator; switch (match$1) { - case /* Minus */0 : + case "Minus" : operator = "-"; break; - case /* Plus */1 : + case "Plus" : operator = "+"; break; - case /* Not */2 : + case "Not" : operator = "!"; break; - case /* BitNot */3 : + case "BitNot" : operator = "~"; break; - case /* Typeof */4 : + case "Typeof" : operator = "typeof"; break; - case /* Void */5 : + case "Void" : operator = "void"; break; - case /* Delete */6 : + case "Delete" : operator = "delete"; break; - case /* Await */7 : + case "Await" : throw { RE_EXN_ID: "Failure", _1: "matched above", @@ -15614,75 +15629,75 @@ function parse(content, options) { expression(unary.argument) ] ]); - case /* Binary */6 : + case "Binary" : var binary = arr._0; var match$2 = binary.operator; var operator$1; switch (match$2) { - case /* Equal */0 : + case "Equal" : operator$1 = "=="; break; - case /* NotEqual */1 : + case "NotEqual" : operator$1 = "!="; break; - case /* StrictEqual */2 : + case "StrictEqual" : operator$1 = "==="; break; - case /* StrictNotEqual */3 : + case "StrictNotEqual" : operator$1 = "!=="; break; - case /* LessThan */4 : + case "LessThan" : operator$1 = "<"; break; - case /* LessThanEqual */5 : + case "LessThanEqual" : operator$1 = "<="; break; - case /* GreaterThan */6 : + case "GreaterThan" : operator$1 = ">"; break; - case /* GreaterThanEqual */7 : + case "GreaterThanEqual" : operator$1 = ">="; break; - case /* LShift */8 : + case "LShift" : operator$1 = "<<"; break; - case /* RShift */9 : + case "RShift" : operator$1 = ">>"; break; - case /* RShift3 */10 : + case "RShift3" : operator$1 = ">>>"; break; - case /* Plus */11 : + case "Plus" : operator$1 = "+"; break; - case /* Minus */12 : + case "Minus" : operator$1 = "-"; break; - case /* Mult */13 : + case "Mult" : operator$1 = "*"; break; - case /* Exp */14 : + case "Exp" : operator$1 = "**"; break; - case /* Div */15 : + case "Div" : operator$1 = "/"; break; - case /* Mod */16 : + case "Mod" : operator$1 = "%"; break; - case /* BitOr */17 : + case "BitOr" : operator$1 = "|"; break; - case /* Xor */18 : + case "Xor" : operator$1 = "^"; break; - case /* BitAnd */19 : + case "BitAnd" : operator$1 = "&"; break; - case /* In */20 : + case "In" : operator$1 = "in"; break; - case /* Instanceof */21 : + case "Instanceof" : operator$1 = "instanceof"; break; @@ -15701,48 +15716,48 @@ function parse(content, options) { expression(binary.right) ] ]); - case /* Assignment */7 : + case "Assignment" : var assignment = arr._0; var match$3 = assignment.operator; var operator$2; switch (match$3) { - case /* Assign */0 : + case "Assign" : operator$2 = "="; break; - case /* PlusAssign */1 : + case "PlusAssign" : operator$2 = "+="; break; - case /* MinusAssign */2 : + case "MinusAssign" : operator$2 = "-="; break; - case /* MultAssign */3 : + case "MultAssign" : operator$2 = "*="; break; - case /* ExpAssign */4 : + case "ExpAssign" : operator$2 = "**="; break; - case /* DivAssign */5 : + case "DivAssign" : operator$2 = "/="; break; - case /* ModAssign */6 : + case "ModAssign" : operator$2 = "%="; break; - case /* LShiftAssign */7 : + case "LShiftAssign" : operator$2 = "<<="; break; - case /* RShiftAssign */8 : + case "RShiftAssign" : operator$2 = ">>="; break; - case /* RShift3Assign */9 : + case "RShift3Assign" : operator$2 = ">>>="; break; - case /* BitOrAssign */10 : + case "BitOrAssign" : operator$2 = "|="; break; - case /* BitXorAssign */11 : + case "BitXorAssign" : operator$2 = "^="; break; - case /* BitAndAssign */12 : + case "BitAndAssign" : operator$2 = "&="; break; @@ -15761,10 +15776,11 @@ function parse(content, options) { expression(assignment.right) ] ]); - case /* Update */8 : + case "Update" : var update = arr._0; var match$4 = update.operator; - var operator$3 = match$4 ? "--" : "++"; + var operator$3; + operator$3 = match$4 === "Increment" ? "++" : "--"; return node("UpdateExpression", loc, [ [ "operator", @@ -15779,10 +15795,11 @@ function parse(content, options) { bool(update.prefix) ] ]); - case /* Logical */9 : + case "Logical" : var logical = arr._0; var match$5 = logical.operator; - var operator$4 = match$5 ? "&&" : "||"; + var operator$4; + operator$4 = match$5 === "Or" ? "||" : "&&"; return node("LogicalExpression", loc, [ [ "operator", @@ -15797,7 +15814,7 @@ function parse(content, options) { expression(logical.right) ] ]); - case /* Conditional */10 : + case "Conditional" : var conditional = arr._0; return node("ConditionalExpression", loc, [ [ @@ -15813,7 +15830,7 @@ function parse(content, options) { expression(conditional.alternate) ] ]); - case /* New */11 : + case "New" : var _new = arr._0; return node("NewExpression", loc, [ [ @@ -15825,7 +15842,7 @@ function parse(content, options) { array_of_list(expression_or_spread, _new.arguments) ] ]); - case /* Call */12 : + case "Call" : var call = arr._0; return node("CallExpression", loc, [ [ @@ -15837,11 +15854,11 @@ function parse(content, options) { array_of_list(expression_or_spread, call.arguments) ] ]); - case /* Member */13 : + case "Member" : var member = arr._0; var id = member.property; var property; - property = id.TAG === /* PropertyIdentifier */0 ? identifier(id._0) : expression(id._0); + property = id.TAG === "PropertyIdentifier" ? identifier(id._0) : expression(id._0); return node("MemberExpression", loc, [ [ "object", @@ -15856,7 +15873,7 @@ function parse(content, options) { bool(member.computed) ] ]); - case /* Yield */14 : + case "Yield" : var $$yield = arr._0; return node("YieldExpression", loc, [ [ @@ -15868,7 +15885,7 @@ function parse(content, options) { bool($$yield.delegate) ] ]); - case /* Comprehension */15 : + case "Comprehension" : var comp = arr._0; return node("ComprehensionExpression", loc, [ [ @@ -15880,7 +15897,7 @@ function parse(content, options) { option(expression, comp.filter) ] ]); - case /* Generator */16 : + case "Generator" : var gen = arr._0; return node("GeneratorExpression", loc, [ [ @@ -15892,7 +15909,7 @@ function parse(content, options) { option(expression, gen.filter) ] ]); - case /* Let */17 : + case "Let" : var _let = arr._0; return node("LetExpression", loc, [ [ @@ -15904,19 +15921,19 @@ function parse(content, options) { expression(_let.body) ] ]); - case /* Identifier */18 : + case "Identifier" : return identifier(arr._0); - case /* Literal */19 : + case "Literal" : return literal([ loc, arr._0 ]); - case /* TemplateLiteral */20 : + case "TemplateLiteral" : return template_literal([ loc, arr._0 ]); - case /* TaggedTemplate */21 : + case "TaggedTemplate" : var param$1 = [ loc, arr._0 @@ -15932,12 +15949,12 @@ function parse(content, options) { template_literal(tagged.quasi) ] ]); - case /* JSXElement */22 : + case "JSXElement" : return jsx_element([ loc, arr._0 ]); - case /* Class */23 : + case "Class" : var param$2 = [ loc, arr._0 @@ -15973,7 +15990,7 @@ function parse(content, options) { array_of_list(expression, c.classDecorators) ] ]); - case /* TypeCast */24 : + case "TypeCast" : var typecast = arr._0; return node("TypeCastExpression", loc, [ [ @@ -16017,20 +16034,20 @@ function parse(content, options) { var value = lit.value; var loc = param[0]; var value_; - if (/* tag */typeof value === "number") { + if (typeof value !== "object") { value_ = $$null; } else { - switch (value.TAG | 0) { - case /* String */0 : + switch (value.TAG) { + case "String" : value_ = string(value._0); break; - case /* Boolean */1 : + case "Boolean" : value_ = bool(value._0); break; - case /* Number */2 : + case "Number" : value_ = number$1(value._0); break; - case /* RegExp */3 : + case "RegExp" : var match = value._0; value_ = regexp$1(loc, match.pattern, match.flags); break; @@ -16039,7 +16056,7 @@ function parse(content, options) { } var props; var exit = 0; - if (/* tag */typeof value === "number" || value.TAG !== /* RegExp */3) { + if (typeof value !== "object" || value.TAG !== "RegExp") { exit = 1; } else { var match$1 = value._0; @@ -16085,8 +16102,8 @@ function parse(content, options) { var pattern = function (param) { var obj = param[1]; var loc = param[0]; - switch (obj.TAG | 0) { - case /* Object */0 : + switch (obj.TAG) { + case "Object" : var obj$1 = obj._0; return node("ObjectPattern", loc, [ [ @@ -16098,7 +16115,7 @@ function parse(content, options) { option(type_annotation, obj$1.typeAnnotation) ] ]); - case /* Array */1 : + case "Array" : var arr = obj._0; return node("ArrayPattern", loc, [ [ @@ -16112,7 +16129,7 @@ function parse(content, options) { option(type_annotation, arr.typeAnnotation) ] ]); - case /* Assignment */2 : + case "Assignment" : var match = obj._0; return node("AssignmentPattern", loc, [ [ @@ -16124,33 +16141,33 @@ function parse(content, options) { expression(match.right) ] ]); - case /* Identifier */3 : + case "Identifier" : return identifier(obj._0); - case /* Expression */4 : + case "Expression" : return expression(obj._0); } }; var object_pattern_property = function (param) { - if (param.TAG === /* Property */0) { + if (param.TAG === "Property") { var match = param._0; var prop = match[1]; var lit = prop.key; var match$1; - switch (lit.TAG | 0) { - case /* Literal */0 : + switch (lit.TAG) { + case "Literal" : match$1 = [ literal(lit._0), false ]; break; - case /* Identifier */1 : + case "Identifier" : match$1 = [ identifier(lit._0), false ]; break; - case /* Computed */2 : + case "Computed" : match$1 = [ expression(lit._0), true @@ -16184,7 +16201,7 @@ function parse(content, options) { ]]); }; var array_pattern_element = function (p) { - if (p.TAG === /* Element */0) { + if (p.TAG === "Element") { return pattern(p._0); } var match = p._0; @@ -16194,25 +16211,25 @@ function parse(content, options) { ]]); }; var object_property = function (param) { - if (param.TAG === /* Property */0) { + if (param.TAG === "Property") { var match = param._0; var prop = match[1]; var lit = prop.key; var match$1; - switch (lit.TAG | 0) { - case /* Literal */0 : + switch (lit.TAG) { + case "Literal" : match$1 = [ literal(lit._0), false ]; break; - case /* Identifier */1 : + case "Identifier" : match$1 = [ identifier(lit._0), false ]; break; - case /* Computed */2 : + case "Computed" : match$1 = [ expression(lit._0), true @@ -16223,13 +16240,13 @@ function parse(content, options) { var match$2 = prop.kind; var kind; switch (match$2) { - case /* Init */0 : + case "Init" : kind = "init"; break; - case /* Get */1 : + case "Get" : kind = "get"; break; - case /* Set */2 : + case "Set" : kind = "set"; break; @@ -16280,7 +16297,7 @@ function parse(content, options) { ]); }; var expression_or_spread = function (expr) { - if (expr.TAG === /* Expression */0) { + if (expr.TAG === "Expression") { return expression(expr._0); } var match = expr._0; @@ -16312,7 +16329,7 @@ function parse(content, options) { var _function = param[1]; var b = _function.body; var body; - body = b.TAG === /* BodyBlock */0 ? block(b._0) : expression(b._0); + body = b.TAG === "BodyBlock" ? block(b._0) : expression(b._0); return node("FunctionExpression", param[0], [ [ "id", @@ -16428,7 +16445,7 @@ function parse(content, options) { var q = param[1]; var id = q.qualification; var qualification; - qualification = id.TAG === /* Unqualified */0 ? identifier(id._0) : generic_type_qualified_identifier(id._0); + qualification = id.TAG === "Unqualified" ? identifier(id._0) : generic_type_qualified_identifier(id._0); return node("QualifiedTypeIdentifier", param[0], [ [ "qualification", @@ -16449,25 +16466,25 @@ function parse(content, options) { var statement = function (param) { var b = param[1]; var loc = param[0]; - if (/* tag */typeof b === "number") { - if (b === /* Empty */0) { + if (typeof b !== "object") { + if (b === "Empty") { return node("EmptyStatement", loc, []); } else { return node("DebuggerStatement", loc, []); } } - switch (b.TAG | 0) { - case /* Block */0 : + switch (b.TAG) { + case "Block" : return block([ loc, b._0 ]); - case /* Expression */1 : + case "Expression" : return node("ExpressionStatement", loc, [[ "expression", expression(b._0.expression) ]]); - case /* If */2 : + case "If" : var _if = b._0; return node("IfStatement", loc, [ [ @@ -16483,7 +16500,7 @@ function parse(content, options) { option(statement, _if.alternate) ] ]); - case /* Labeled */3 : + case "Labeled" : var labeled = b._0; return node("LabeledStatement", loc, [ [ @@ -16495,17 +16512,17 @@ function parse(content, options) { statement(labeled.body) ] ]); - case /* Break */4 : + case "Break" : return node("BreakStatement", loc, [[ "label", option(identifier, b._0.label) ]]); - case /* Continue */5 : + case "Continue" : return node("ContinueStatement", loc, [[ "label", option(identifier, b._0.label) ]]); - case /* With */6 : + case "With" : var _with = b._0; return node("WithStatement", loc, [ [ @@ -16517,12 +16534,12 @@ function parse(content, options) { statement(_with.body) ] ]); - case /* TypeAlias */7 : + case "TypeAlias" : return type_alias([ loc, b._0 ]); - case /* Switch */8 : + case "Switch" : var $$switch = b._0; return node("SwitchStatement", loc, [ [ @@ -16538,17 +16555,17 @@ function parse(content, options) { bool($$switch.lexical) ] ]); - case /* Return */9 : + case "Return" : return node("ReturnStatement", loc, [[ "argument", option(expression, b._0.argument) ]]); - case /* Throw */10 : + case "Throw" : return node("ThrowStatement", loc, [[ "argument", expression(b._0.argument) ]]); - case /* Try */11 : + case "Try" : var _try = b._0; return node("TryStatement", loc, [ [ @@ -16568,7 +16585,7 @@ function parse(content, options) { option(block, _try.finalizer) ] ]); - case /* While */12 : + case "While" : var _while = b._0; return node("WhileStatement", loc, [ [ @@ -16580,7 +16597,7 @@ function parse(content, options) { statement(_while.body) ] ]); - case /* DoWhile */13 : + case "DoWhile" : var dowhile = b._0; return node("DoWhileStatement", loc, [ [ @@ -16592,10 +16609,10 @@ function parse(content, options) { expression(dowhile.test) ] ]); - case /* For */14 : + case "For" : var _for = b._0; var init = function (init$1) { - if (init$1.TAG === /* InitDeclaration */0) { + if (init$1.TAG === "InitDeclaration") { return variable_declaration(init$1._0); } else { return expression(init$1._0); @@ -16619,11 +16636,11 @@ function parse(content, options) { statement(_for.body) ] ]); - case /* ForIn */15 : + case "ForIn" : var forin = b._0; var left = forin.left; var left$1; - left$1 = left.TAG === /* LeftDeclaration */0 ? variable_declaration(left._0) : expression(left._0); + left$1 = left.TAG === "LeftDeclaration" ? variable_declaration(left._0) : expression(left._0); return node("ForInStatement", loc, [ [ "left", @@ -16642,11 +16659,11 @@ function parse(content, options) { bool(forin.each) ] ]); - case /* ForOf */16 : + case "ForOf" : var forof = b._0; var left$2 = forof.left; var left$3; - left$3 = left$2.TAG === /* LeftDeclaration */0 ? variable_declaration(left$2._0) : expression(left$2._0); + left$3 = left$2.TAG === "LeftDeclaration" ? variable_declaration(left$2._0) : expression(left$2._0); return node("ForOfStatement", loc, [ [ "left", @@ -16661,7 +16678,7 @@ function parse(content, options) { statement(forof.body) ] ]); - case /* Let */17 : + case "Let" : var _let = b._0; return node("LetStatement", loc, [ [ @@ -16673,7 +16690,7 @@ function parse(content, options) { statement(_let.body) ] ]); - case /* FunctionDeclaration */18 : + case "FunctionDeclaration" : var fn = b._0; var id = fn.id; var match = id !== undefined ? [ @@ -16685,7 +16702,7 @@ function parse(content, options) { ]; var b$1 = fn.body; var body; - body = b$1.TAG === /* BodyBlock */0 ? block(b$1._0) : expression(b$1._0); + body = b$1.TAG === "BodyBlock" ? block(b$1._0) : expression(b$1._0); return node(match[0], loc, [ [ "id", @@ -16730,12 +16747,12 @@ function parse(content, options) { option(type_parameter_declaration, fn.typeParameters) ] ]); - case /* VariableDeclaration */19 : + case "VariableDeclaration" : return variable_declaration([ loc, b._0 ]); - case /* ClassDeclaration */20 : + case "ClassDeclaration" : var param$1 = [ loc, b._0 @@ -16779,34 +16796,34 @@ function parse(content, options) { array_of_list(expression, c.classDecorators) ] ]); - case /* InterfaceDeclaration */21 : + case "InterfaceDeclaration" : return interface_declaration([ loc, b._0 ]); - case /* DeclareVariable */22 : + case "DeclareVariable" : return declare_variable([ loc, b._0 ]); - case /* DeclareFunction */23 : + case "DeclareFunction" : return declare_function([ loc, b._0 ]); - case /* DeclareClass */24 : + case "DeclareClass" : return declare_class([ loc, b._0 ]); - case /* DeclareModule */25 : + case "DeclareModule" : var m = b._0; var lit = m.id; var id$2; - id$2 = lit.TAG === /* Identifier */0 ? identifier(lit._0) : literal(lit._0); + id$2 = lit.TAG === "Identifier" ? identifier(lit._0) : literal(lit._0); var match$2 = m.kind; var tmp; - tmp = match$2.TAG === /* CommonJS */0 ? string("CommonJS") : string("ES"); + tmp = match$2.TAG === "CommonJS" ? string("CommonJS") : string("ES"); return node("DeclareModule", loc, [ [ "id", @@ -16821,33 +16838,33 @@ function parse(content, options) { tmp ] ]); - case /* DeclareModuleExports */26 : + case "DeclareModuleExports" : return node("DeclareModuleExports", loc, [[ "typeAnnotation", type_annotation(b._0) ]]); - case /* DeclareExportDeclaration */27 : + case "DeclareExportDeclaration" : var $$export = b._0; var match$3 = $$export.declaration; var declaration; if (match$3 !== undefined) { - switch (match$3.TAG | 0) { - case /* Variable */0 : + switch (match$3.TAG) { + case "Variable" : declaration = declare_variable(match$3._0); break; - case /* Function */1 : + case "Function" : declaration = declare_function(match$3._0); break; - case /* Class */2 : + case "Class" : declaration = declare_class(match$3._0); break; - case /* DefaultType */3 : + case "DefaultType" : declaration = _type(match$3._0); break; - case /* NamedType */4 : + case "NamedType" : declaration = type_alias(match$3._0); break; - case /* Interface */5 : + case "Interface" : declaration = interface_declaration(match$3._0); break; @@ -16873,11 +16890,11 @@ function parse(content, options) { option(literal, $$export.source) ] ]); - case /* ExportDeclaration */28 : + case "ExportDeclaration" : var $$export$1 = b._0; var match$4 = $$export$1.declaration; var declaration$1 = match$4 !== undefined ? ( - match$4.TAG === /* Declaration */0 ? statement(match$4._0) : expression(match$4._0) + match$4.TAG === "Declaration" ? statement(match$4._0) : expression(match$4._0) ) : $$null; return node("ExportDeclaration", loc, [ [ @@ -16898,14 +16915,14 @@ function parse(content, options) { ], [ "exportKind", - string($$export$1.exportKind ? "value" : "type") + string(export_kind($$export$1.exportKind)) ] ]); - case /* ImportDeclaration */29 : + case "ImportDeclaration" : var $$import = b._0; var specifiers = List.map((function (id) { - switch (id.TAG | 0) { - case /* ImportNamedSpecifier */0 : + switch (id.TAG) { + case "ImportNamedSpecifier" : var match = id._0; var local_id = match.local; var remote_id = match.remote; @@ -16920,13 +16937,13 @@ function parse(content, options) { option(identifier, local_id) ] ]); - case /* ImportDefaultSpecifier */1 : + case "ImportDefaultSpecifier" : var id$1 = id._0; return node("ImportDefaultSpecifier", id$1[0], [[ "id", identifier(id$1) ]]); - case /* ImportNamespaceSpecifier */2 : + case "ImportNamespaceSpecifier" : var param = id._0; return node("ImportNamespaceSpecifier", param[0], [[ "id", @@ -16938,13 +16955,13 @@ function parse(content, options) { var match$5 = $$import.importKind; var import_kind; switch (match$5) { - case /* ImportType */0 : + case "ImportType" : import_kind = "type"; break; - case /* ImportTypeof */1 : + case "ImportTypeof" : import_kind = "typeof"; break; - case /* ImportValue */2 : + case "ImportValue" : import_kind = "value"; break; @@ -16969,7 +16986,7 @@ function parse(content, options) { var jsx_expression_container = function (param) { var expr = param[1].expression; var expression$1; - expression$1 = expr.TAG === /* Expression */0 ? expression(expr._0) : node("JSXEmptyExpression", expr._0, []); + expression$1 = expr.TAG === "Expression" ? expression(expr._0) : node("JSXEmptyExpression", expr._0, []); return node("JSXExpressionContainer", param[0], [[ "expression", expression$1 @@ -17055,14 +17072,14 @@ function parse(content, options) { var prop = param[1]; var lit = prop.key; var key; - switch (lit.TAG | 0) { - case /* Literal */0 : + switch (lit.TAG) { + case "Literal" : key = literal(lit._0); break; - case /* Identifier */1 : + case "Identifier" : key = identifier(lit._0); break; - case /* Computed */2 : + case "Computed" : throw { RE_EXN_ID: "Failure", _1: "There should not be computed object type property keys", @@ -17130,18 +17147,18 @@ function parse(content, options) { var jsx_child = function (param) { var element = param[1]; var loc = param[0]; - switch (element.TAG | 0) { - case /* Element */0 : + switch (element.TAG) { + case "Element" : return jsx_element([ loc, element._0 ]); - case /* ExpressionContainer */1 : + case "ExpressionContainer" : return jsx_expression_container([ loc, element._0 ]); - case /* Text */2 : + case "Text" : var param$1 = [ loc, element._0 @@ -17169,7 +17186,7 @@ function parse(content, options) { var comment = function (param) { var c = param[1]; var match; - match = c.TAG === /* Block */0 ? [ + match = c.TAG === "Block" ? [ "Block", c._0 ] : [ @@ -17195,7 +17212,7 @@ function parse(content, options) { ]); }; var jsx_attribute_value = function (param) { - if (param.TAG === /* Literal */0) { + if (param.TAG === "Literal") { return literal([ param._0, param._1 @@ -17210,10 +17227,10 @@ function parse(content, options) { var type_param = function (param) { var tp = param[1]; var variance = function (param) { - if (param) { - return string("minus"); - } else { + if (param === "Plus") { return string("plus"); + } else { + return string("minus"); } }; return node("TypeParameter", param[0], [ @@ -17253,25 +17270,25 @@ function parse(content, options) { ]); }; var class_element = function (m) { - if (m.TAG === /* Method */0) { + if (m.TAG === "Method") { var param = m._0; var method_ = param[1]; var key = method_.key; var match; - switch (key.TAG | 0) { - case /* Literal */0 : + switch (key.TAG) { + case "Literal" : match = [ literal(key._0), false ]; break; - case /* Identifier */1 : + case "Identifier" : match = [ identifier(key._0), false ]; break; - case /* Computed */2 : + case "Computed" : match = [ expression(key._0), true @@ -17281,16 +17298,16 @@ function parse(content, options) { } var kind; switch (method_.kind) { - case /* Constructor */0 : + case "Constructor" : kind = "constructor"; break; - case /* Method */1 : + case "Method" : kind = "method"; break; - case /* Get */2 : + case "Get" : kind = "get"; break; - case /* Set */3 : + case "Set" : kind = "set"; break; @@ -17326,20 +17343,20 @@ function parse(content, options) { var prop = param$1[1]; var lit = prop.key; var match$1; - switch (lit.TAG | 0) { - case /* Literal */0 : + switch (lit.TAG) { + case "Literal" : match$1 = [ literal(lit._0), false ]; break; - case /* Identifier */1 : + case "Identifier" : match$1 = [ identifier(lit._0), false ]; break; - case /* Computed */2 : + case "Computed" : match$1 = [ expression(lit._0), true @@ -17395,23 +17412,23 @@ function parse(content, options) { ]); }; var jsx_name = function (id) { - switch (id.TAG | 0) { - case /* Identifier */0 : + switch (id.TAG) { + case "Identifier" : return jsx_identifier(id._0); - case /* NamespacedName */1 : + case "NamespacedName" : return jsx_namespaced_name(id._0); - case /* MemberExpression */2 : + case "MemberExpression" : return jsx_member_expression(id._0); } }; var jsx_opening_attribute = function (attribute) { - if (attribute.TAG === /* Attribute */0) { + if (attribute.TAG === "Attribute") { var param = attribute._0; var attribute$1 = param[1]; var id = attribute$1.name; var name; - name = id.TAG === /* Identifier */0 ? jsx_identifier(id._0) : jsx_namespaced_name(id._0); + name = id.TAG === "Identifier" ? jsx_identifier(id._0) : jsx_namespaced_name(id._0); return node("JSXAttribute", param[0], [ [ "name", @@ -17434,7 +17451,7 @@ function parse(content, options) { var member_expression = param[1]; var id = member_expression._object; var _object; - _object = id.TAG === /* Identifier */0 ? jsx_identifier(id._0) : jsx_member_expression(id._0); + _object = id.TAG === "Identifier" ? jsx_identifier(id._0) : jsx_member_expression(id._0); return node("JSXMemberExpression", param[0], [ [ "object", @@ -17476,6 +17493,13 @@ function parse(content, options) { ] ]); }; + var export_kind = function (param) { + if (param === "ExportType") { + return "type"; + } else { + return "value"; + } + }; var declare_function = function (param) { return node("DeclareFunction", param[0], [[ "id", @@ -17543,7 +17567,7 @@ function parse(content, options) { }; var export_specifiers = function (param) { if (param !== undefined) { - if (param.TAG === /* ExportSpecifiers */0) { + if (param.TAG === "ExportSpecifiers") { return array_of_list(export_specifier, param._0); } else { return array([node("ExportBatchSpecifier", param._0, [[ @@ -17560,13 +17584,13 @@ function parse(content, options) { var match = $$var.kind; var kind; switch (match) { - case /* Var */0 : + case "Var" : kind = "var"; break; - case /* Let */1 : + case "Let" : kind = "let"; break; - case /* Const */2 : + case "Const" : kind = "const"; break; @@ -17592,7 +17616,7 @@ function parse(content, options) { var g = param[1]; var id = g.id; var id$1; - id$1 = id.TAG === /* Unqualified */0 ? identifier(id._0) : generic_type_qualified_identifier(id._0); + id$1 = id.TAG === "Unqualified" ? identifier(id._0) : generic_type_qualified_identifier(id._0); return node("InterfaceExtends", param[0], [ [ "id", @@ -17648,7 +17672,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/for_loop_test.js b/jscomp/test/for_loop_test.js index a7d3e214e3..0988ca9aee 100644 --- a/jscomp/test/for_loop_test.js +++ b/jscomp/test/for_loop_test.js @@ -223,7 +223,7 @@ var suites_0 = [ "for_loop_test_3", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 90, _1: for_3(Caml_array.make(10, 2)) }; @@ -235,7 +235,7 @@ var suites_1 = { "for_loop_test_4", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 180, _1: for_4(Caml_array.make(10, 2)) }; @@ -246,7 +246,7 @@ var suites_1 = { "for_loop_test_5", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2420, _1: for_5(Caml_array.make(10, 2), 11) }; @@ -257,7 +257,7 @@ var suites_1 = { "for_loop_test_6", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 30, 1, @@ -273,7 +273,7 @@ var suites_1 = { "for_loop_test_7", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 84, _1: for_7(undefined) }; @@ -284,7 +284,7 @@ var suites_1 = { "for_loop_test_8", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 294, _1: for_8(undefined) }; @@ -295,7 +295,7 @@ var suites_1 = { "for_loop_test_9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [[ 10, [ diff --git a/jscomp/test/for_side_effect_test.js b/jscomp/test/for_side_effect_test.js index 92c54171e2..e5478d0a5d 100644 --- a/jscomp/test/for_side_effect_test.js +++ b/jscomp/test/for_side_effect_test.js @@ -22,7 +22,7 @@ var suites_0 = [ "for_order", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 10, _1: test2(undefined) }; diff --git a/jscomp/test/format_test.js b/jscomp/test/format_test.js index 76ba7983c2..38b747c930 100644 --- a/jscomp/test/format_test.js +++ b/jscomp/test/format_test.js @@ -21,7 +21,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -49,9 +49,9 @@ eq3("File \"format_test.ml\", line 36, characters 6-13", -Infinity, Number.NEGAT eq3("File \"format_test.ml\", line 37, characters 6-13", Pervasives.max_float, 1.79769313486231571e+308, Number.MAX_VALUE); -eq("File \"format_test.ml\", line 38, characters 5-12", Pervasives.classify_float(Infinity), /* FP_infinite */3); +eq("File \"format_test.ml\", line 38, characters 5-12", Pervasives.classify_float(Infinity), "FP_infinite"); -eq("File \"format_test.ml\", line 39, characters 5-12", Pervasives.classify_float(Infinity), /* FP_infinite */3); +eq("File \"format_test.ml\", line 39, characters 5-12", Pervasives.classify_float(Infinity), "FP_infinite"); eq("File \"format_test.ml\", line 42, characters 5-12", Pervasives.min_float, 2.22507385850720138e-308); @@ -63,7 +63,7 @@ eq("File \"format_test.ml\", line 45, characters 5-12", 1.00000000000000022 - 1, eq("File \"format_test.ml\", line 47, characters 5-12", 1.11253692925360069e-308 / 2.22507385850720138e-308, 0.5); -eq("File \"format_test.ml\", line 49, characters 5-12", Pervasives.classify_float(1.11253692925360069e-308), /* FP_subnormal */1); +eq("File \"format_test.ml\", line 49, characters 5-12", Pervasives.classify_float(1.11253692925360069e-308), "FP_subnormal"); eq("File \"format_test.ml\", line 50, characters 5-12", 1.11253692925360069e-308, 1.11253692925360069e-308); diff --git a/jscomp/test/fs_test.js b/jscomp/test/fs_test.js index 1efe4dc9d5..f555f946ff 100644 --- a/jscomp/test/fs_test.js +++ b/jscomp/test/fs_test.js @@ -21,7 +21,7 @@ function eq(loc, param) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/fun_pattern_match.js b/jscomp/test/fun_pattern_match.js index fd289f57b7..aa1b6bdae0 100644 --- a/jscomp/test/fun_pattern_match.js +++ b/jscomp/test/fun_pattern_match.js @@ -15,13 +15,13 @@ function f3(param) { var lhs = param.rank; return function (param) { var rhs = param.rank; - if (/* tag */typeof lhs === "number") { - lhs === /* Uninitialized */0; + if (typeof lhs !== "object") { + lhs === "Uninitialized"; } else { - if (/* tag */typeof rhs !== "number") { + if (typeof rhs === "object") { return Caml.int_compare(lhs._0, rhs._0); } - rhs === /* Uninitialized */0; + rhs === "Uninitialized"; } throw { RE_EXN_ID: "Assert_failure", @@ -39,13 +39,13 @@ function f4(param) { var lhs = param.rank; return function (param) { var rhs = param.rank; - if (/* tag */typeof lhs === "number") { - lhs === /* Uninitialized */0; + if (typeof lhs !== "object") { + lhs === "Uninitialized"; } else { - if (/* tag */typeof rhs !== "number") { + if (typeof rhs === "object") { return Caml.int_compare(lhs._0, rhs._0); } - rhs === /* Uninitialized */0; + rhs === "Uninitialized"; } throw { RE_EXN_ID: "Assert_failure", diff --git a/jscomp/test/functor_app_test.js b/jscomp/test/functor_app_test.js index 697719d850..41a0a18d02 100644 --- a/jscomp/test/functor_app_test.js +++ b/jscomp/test/functor_app_test.js @@ -20,7 +20,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/genlex_test.js b/jscomp/test/genlex_test.js index 41d60d34bb..7bdc11389a 100644 --- a/jscomp/test/genlex_test.js +++ b/jscomp/test/genlex_test.js @@ -59,40 +59,40 @@ var suites_0 = [ "lexer_stream_genlex", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { hd: { - TAG: /* Int */2, + TAG: "Int", _0: 3 }, tl: { hd: { - TAG: /* Kwd */0, + TAG: "Kwd", _0: "(" }, tl: { hd: { - TAG: /* Int */2, + TAG: "Int", _0: 3 }, tl: { hd: { - TAG: /* Kwd */0, + TAG: "Kwd", _0: "+" }, tl: { hd: { - TAG: /* Int */2, + TAG: "Int", _0: 2 }, tl: { hd: { - TAG: /* Int */2, + TAG: "Int", _0: -1 }, tl: { hd: { - TAG: /* Kwd */0, + TAG: "Kwd", _0: ")" }, tl: /* [] */0 diff --git a/jscomp/test/global_exception_regression_test.js b/jscomp/test/global_exception_regression_test.js index 32a4804abc..653e5f22ac 100644 --- a/jscomp/test/global_exception_regression_test.js +++ b/jscomp/test/global_exception_regression_test.js @@ -18,7 +18,7 @@ var suites_0 = [ "not_found_equal", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: u, _1: v }; @@ -30,7 +30,7 @@ var suites_1 = { "not_found_not_equal_end_of_file", (function (param) { return { - TAG: /* Neq */1, + TAG: "Neq", _0: u, _1: s }; diff --git a/jscomp/test/global_module_alias_test.js b/jscomp/test/global_module_alias_test.js index a291d059a6..2cb14379be 100644 --- a/jscomp/test/global_module_alias_test.js +++ b/jscomp/test/global_module_alias_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/google_closure_test.js b/jscomp/test/google_closure_test.js index 1a6d5c627c..e539c8e39f 100644 --- a/jscomp/test/google_closure_test.js +++ b/jscomp/test/google_closure_test.js @@ -8,7 +8,7 @@ Mt.from_pair_suites("Closure", { "partial", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ Test_google_closure.a, Test_google_closure.b, diff --git a/jscomp/test/gpr496_test.js b/jscomp/test/gpr496_test.js index 25b6dd0c0a..c110e7a73a 100644 --- a/jscomp/test/gpr496_test.js +++ b/jscomp/test/gpr496_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1154_test.js b/jscomp/test/gpr_1154_test.js index f3c928b6e0..5e969d8a69 100644 --- a/jscomp/test/gpr_1154_test.js +++ b/jscomp/test/gpr_1154_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1409_test.js b/jscomp/test/gpr_1409_test.js index 51966f9073..56a796cbf8 100644 --- a/jscomp/test/gpr_1409_test.js +++ b/jscomp/test/gpr_1409_test.js @@ -21,7 +21,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1423_app_test.js b/jscomp/test/gpr_1423_app_test.js index 4fb435e891..fb4facaa25 100644 --- a/jscomp/test/gpr_1423_app_test.js +++ b/jscomp/test/gpr_1423_app_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1503_test.js b/jscomp/test/gpr_1503_test.js index 609617caea..20e871cfc0 100644 --- a/jscomp/test/gpr_1503_test.js +++ b/jscomp/test/gpr_1503_test.js @@ -20,7 +20,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1539_test.js b/jscomp/test/gpr_1539_test.js index db2bf53afd..9fe42fd9da 100644 --- a/jscomp/test/gpr_1539_test.js +++ b/jscomp/test/gpr_1539_test.js @@ -7,17 +7,17 @@ var Point = Caml_module.init_mod([ 10, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [[ - /* Function */0, + "Function", "add" ]] }); Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [[ - /* Function */0, + "Function", "add" ]] }, Point, { diff --git a/jscomp/test/gpr_1658_test.js b/jscomp/test/gpr_1658_test.js index a0c151cfef..a1d16e8f13 100644 --- a/jscomp/test/gpr_1658_test.js +++ b/jscomp/test/gpr_1658_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -32,13 +32,13 @@ eq("File \"gpr_1658_test.ml\", line 11, characters 7-14", null, null); var match = Js_types.classify(null); -if (/* tag */typeof match === "number" && match === /* JSNull */2) { +if (typeof match !== "object" && match === "JSNull") { eq("File \"gpr_1658_test.ml\", line 14, characters 11-18", true, true); } else { eq("File \"gpr_1658_test.ml\", line 16, characters 11-18", true, false); } -eq("File \"gpr_1658_test.ml\", line 17, characters 7-14", true, Js_types.test(null, /* Null */1)); +eq("File \"gpr_1658_test.ml\", line 17, characters 7-14", true, Js_types.test(null, "Null")); Mt.from_pair_suites("File \"gpr_1658_test.ml\", line 19, characters 22-29", suites.contents); diff --git a/jscomp/test/gpr_1667_test.js b/jscomp/test/gpr_1667_test.js index bf704faa7c..05704ce8ad 100644 --- a/jscomp/test/gpr_1667_test.js +++ b/jscomp/test/gpr_1667_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1698_test.js b/jscomp/test/gpr_1698_test.js index 8b5a22830a..ac20086c44 100644 --- a/jscomp/test/gpr_1698_test.js +++ b/jscomp/test/gpr_1698_test.js @@ -4,20 +4,20 @@ function is_number(_expr) { while(true) { var expr = _expr; - switch (expr.TAG | 0) { - case /* Val */0 : - if (expr._0.TAG === /* Natural */0) { + switch (expr.TAG) { + case "Val" : + if (expr._0.TAG === "Natural") { return true; } else { return false; } - case /* Neg */1 : + case "Neg" : _expr = expr._0; continue ; - case /* Sum */2 : - case /* Pow */3 : - case /* Frac */4 : - case /* Gcd */5 : + case "Sum" : + case "Pow" : + case "Frac" : + case "Gcd" : return false; } @@ -36,18 +36,18 @@ function compare(context, state, _a, _b) { var exit$1 = 0; var exit$2 = 0; var exit$3 = 0; - switch (a.TAG | 0) { - case /* Val */0 : - switch (b.TAG | 0) { - case /* Val */0 : + switch (a.TAG) { + case "Val" : + switch (b.TAG) { + case "Val" : return 111; - case /* Neg */1 : + case "Neg" : exit$3 = 5; break; - case /* Sum */2 : + case "Sum" : exit$2 = 4; break; - case /* Frac */4 : + case "Frac" : throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -57,23 +57,23 @@ function compare(context, state, _a, _b) { ], Error: new Error() }; - case /* Pow */3 : - case /* Gcd */5 : + case "Pow" : + case "Gcd" : exit = 1; break; } break; - case /* Neg */1 : + case "Neg" : _a = a._0; continue ; - case /* Sum */2 : - case /* Pow */3 : + case "Sum" : + case "Pow" : exit$3 = 5; break; - case /* Frac */4 : - switch (b.TAG | 0) { - case /* Val */0 : + case "Frac" : + switch (b.TAG) { + case "Val" : throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -83,35 +83,35 @@ function compare(context, state, _a, _b) { ], Error: new Error() }; - case /* Neg */1 : + case "Neg" : exit$3 = 5; break; - case /* Sum */2 : + case "Sum" : exit$2 = 4; break; - case /* Frac */4 : + case "Frac" : na = a._0; da = a._1; nb = b._0; db = b._1; exit = 2; break; - case /* Pow */3 : - case /* Gcd */5 : + case "Pow" : + case "Gcd" : exit = 1; break; } break; - case /* Gcd */5 : - switch (b.TAG | 0) { - case /* Neg */1 : + case "Gcd" : + switch (b.TAG) { + case "Neg" : exit$3 = 5; break; - case /* Sum */2 : + case "Sum" : exit$2 = 4; break; - case /* Gcd */5 : + case "Gcd" : na = a._0; da = a._1; nb = b._0; @@ -125,11 +125,11 @@ function compare(context, state, _a, _b) { } if (exit$3 === 5) { - if (b.TAG === /* Neg */1) { + if (b.TAG === "Neg") { _b = b._0; continue ; } - if (a.TAG === /* Sum */2) { + if (a.TAG === "Sum") { if (is_number(b)) { return 1; } @@ -139,7 +139,7 @@ function compare(context, state, _a, _b) { } } if (exit$2 === 4) { - if (b.TAG === /* Sum */2) { + if (b.TAG === "Sum") { if (is_number(a)) { return -1; } @@ -149,25 +149,25 @@ function compare(context, state, _a, _b) { } } if (exit$1 === 3) { - switch (a.TAG | 0) { - case /* Sum */2 : + switch (a.TAG) { + case "Sum" : exit = 1; break; - case /* Pow */3 : + case "Pow" : return -1; - case /* Val */0 : - case /* Frac */4 : - case /* Gcd */5 : + case "Val" : + case "Frac" : + case "Gcd" : return 1; } } switch (exit) { case 1 : - switch (b.TAG | 0) { - case /* Pow */3 : + switch (b.TAG) { + case "Pow" : return 1; - case /* Gcd */5 : + case "Gcd" : return -1; default: return -1; @@ -186,20 +186,20 @@ function compare(context, state, _a, _b) { } var a = { - TAG: /* Sum */2, + TAG: "Sum", _0: { hd: { - TAG: /* Val */0, + TAG: "Val", _0: { - TAG: /* Symbol */1, + TAG: "Symbol", _0: "a" } }, tl: { hd: { - TAG: /* Val */0, + TAG: "Val", _0: { - TAG: /* Natural */0, + TAG: "Natural", _0: 2 } }, @@ -209,14 +209,14 @@ var a = { }; var b = { - TAG: /* Val */0, + TAG: "Val", _0: { - TAG: /* Symbol */1, + TAG: "Symbol", _0: "x" } }; -console.log(compare(/* InSum */0, { +console.log(compare("InSum", { complex: true }, a, b)); diff --git a/jscomp/test/gpr_1716_test.js b/jscomp/test/gpr_1716_test.js index f6ab45af62..cb2b2fc906 100644 --- a/jscomp/test/gpr_1716_test.js +++ b/jscomp/test/gpr_1716_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1728_test.js b/jscomp/test/gpr_1728_test.js index b859b7312c..bb013e5f15 100644 --- a/jscomp/test/gpr_1728_test.js +++ b/jscomp/test/gpr_1728_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1749_test.js b/jscomp/test/gpr_1749_test.js index 21d08559f9..186c4fe053 100644 --- a/jscomp/test/gpr_1749_test.js +++ b/jscomp/test/gpr_1749_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1760_test.js b/jscomp/test/gpr_1760_test.js index 17addd2192..f78ab96908 100644 --- a/jscomp/test/gpr_1760_test.js +++ b/jscomp/test/gpr_1760_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1762_test.js b/jscomp/test/gpr_1762_test.js index cea3e2ca0b..bc9b55c947 100644 --- a/jscomp/test/gpr_1762_test.js +++ b/jscomp/test/gpr_1762_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1817_test.js b/jscomp/test/gpr_1817_test.js index ae581904cb..6432213efe 100644 --- a/jscomp/test/gpr_1817_test.js +++ b/jscomp/test/gpr_1817_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1822_test.js b/jscomp/test/gpr_1822_test.js index 05c54bad83..ae9b61bb79 100644 --- a/jscomp/test/gpr_1822_test.js +++ b/jscomp/test/gpr_1822_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -28,13 +28,13 @@ function eq(loc, x, y) { } var myShape = { - TAG: /* Circle */0, + TAG: "Circle", _0: 10 }; var area; -area = myShape.TAG === /* Circle */0 ? 100 * 3.14 : Math.imul(10, myShape._1); +area = myShape.TAG === "Circle" ? 100 * 3.14 : Math.imul(10, myShape._1); eq("File \"gpr_1822_test.ml\", line 21, characters 6-13", area, 314); diff --git a/jscomp/test/gpr_1943_test.js b/jscomp/test/gpr_1943_test.js index af388a0209..9980438ea9 100644 --- a/jscomp/test/gpr_1943_test.js +++ b/jscomp/test/gpr_1943_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_1946_test.js b/jscomp/test/gpr_1946_test.js index e6c4a9af31..05a7fb6241 100644 --- a/jscomp/test/gpr_1946_test.js +++ b/jscomp/test/gpr_1946_test.js @@ -49,7 +49,7 @@ eq("File \"gpr_1946_test.ml\", line 30, characters 6-13", [ console.log(({ "5": 3 - }).TAG | 0); + }).TAG); Mt.from_pair_suites("File \"gpr_1946_test.ml\", line 33, characters 23-30", suites.contents); diff --git a/jscomp/test/gpr_2316_test.js b/jscomp/test/gpr_2316_test.js index 12ac0dcbe6..5d8fbc00ce 100644 --- a/jscomp/test/gpr_2316_test.js +++ b/jscomp/test/gpr_2316_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_2413_test.js b/jscomp/test/gpr_2413_test.js index 508d76a2d1..acb8fe0e4e 100644 --- a/jscomp/test/gpr_2413_test.js +++ b/jscomp/test/gpr_2413_test.js @@ -2,17 +2,17 @@ function f(param) { - switch (param.TAG | 0) { - case /* A */0 : + switch (param.TAG) { + case "A" : var a = param._0; - if (a.TAG === /* P */0) { + if (a.TAG === "P") { var a$1 = a._0; return a$1 + a$1 | 0; } var a$2 = a._0; return a$2 - a$2 | 0; - case /* B */1 : - case /* C */2 : + case "B" : + case "C" : break; } diff --git a/jscomp/test/gpr_2642_test.js b/jscomp/test/gpr_2642_test.js index 9ba372bcdc..0655f9b8a7 100644 --- a/jscomp/test/gpr_2642_test.js +++ b/jscomp/test/gpr_2642_test.js @@ -4,13 +4,13 @@ function isfree(id, _id$p) { while(true) { var id$p = _id$p; - switch (id$p.TAG | 0) { - case /* Pident */0 : + switch (id$p.TAG) { + case "Pident" : return id === id$p._0; - case /* Pdot */1 : + case "Pdot" : _id$p = id$p._0; continue ; - case /* Papply */2 : + case "Papply" : if (isfree(id, id$p._0)) { return true; } diff --git a/jscomp/test/gpr_3209_test.js b/jscomp/test/gpr_3209_test.js index fec8f3e920..1d0f435ec9 100644 --- a/jscomp/test/gpr_3209_test.js +++ b/jscomp/test/gpr_3209_test.js @@ -2,19 +2,19 @@ function f9(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { switch (param) { - case /* T60 */0 : - case /* T61 */1 : - case /* T62 */2 : + case "T60" : + case "T61" : + case "T62" : return 1; default: return 3; } } else { - switch (param.TAG | 0) { - case /* T64 */0 : - case /* T65 */1 : + switch (param.TAG) { + case "T64" : + case "T65" : return 2; default: return 3; diff --git a/jscomp/test/gpr_3536_test.js b/jscomp/test/gpr_3536_test.js index 0667ea157b..5923da0e21 100644 --- a/jscomp/test/gpr_3536_test.js +++ b/jscomp/test/gpr_3536_test.js @@ -35,7 +35,8 @@ Mt.from_pair_suites("Gpr_3536_test", suites.contents); var v = 5; -var u = /* Some */{ +var u = { + TAG: "Some", _0: 3 }; diff --git a/jscomp/test/gpr_3546_test.js b/jscomp/test/gpr_3546_test.js index a7ccbed93f..f78dec6184 100644 --- a/jscomp/test/gpr_3546_test.js +++ b/jscomp/test/gpr_3546_test.js @@ -2,14 +2,15 @@ function t_error3(param_0) { - return /* T_error3 */{ + return { + TAG: "T_error3", _0: param_0 }; } -var t_error = /* T_error */0; +var t_error = "T_error"; -var t_error2 = /* T_error2 */0; +var t_error2 = "T_error2"; exports.t_error = t_error; exports.t_error2 = t_error2; diff --git a/jscomp/test/gpr_3566_test.js b/jscomp/test/gpr_3566_test.js index b2848d39f3..2804a12e94 100644 --- a/jscomp/test/gpr_3566_test.js +++ b/jscomp/test/gpr_3566_test.js @@ -5,7 +5,7 @@ var Caml_obj = require("../../lib/js/caml_obj.js"); var Caml_option = require("../../lib/js/caml_option.js"); function eq_A(x, y) { - if (x.TAG === /* A */0 && y.TAG === /* A */0) { + if (x.TAG === "A" && y.TAG === "A") { return x._0 === y._0; } else { return false; @@ -15,12 +15,12 @@ function eq_A(x, y) { function Test($star) { console.log("no inline"); var u = { - TAG: /* A */0, + TAG: "A", _0: 3 }; var Block = {}; var b = eq_A({ - TAG: /* A */0, + TAG: "A", _0: 3 }, u); return { @@ -35,10 +35,10 @@ function Test2($star) { console.log("no inline"); var Block = {}; var b = eq_A({ - TAG: /* A */0, + TAG: "A", _0: 3 }, { - TAG: /* A */0, + TAG: "A", _0: 3 }); return { @@ -50,7 +50,7 @@ function Test2($star) { function f(i, y) { var x = { - TAG: /* A */0, + TAG: "A", _0: i }; return eq_A(x, y); diff --git a/jscomp/test/gpr_3609_test.js b/jscomp/test/gpr_3609_test.js index 7cb88b2676..eb5ac991ac 100644 --- a/jscomp/test/gpr_3609_test.js +++ b/jscomp/test/gpr_3609_test.js @@ -2,7 +2,7 @@ function func(state) { - if (/* tag */typeof state === "number") { + if (typeof state !== "object") { return 0; } else { return 0 + state._0 | 0; diff --git a/jscomp/test/gpr_3697_test.js b/jscomp/test/gpr_3697_test.js index a2cd1dcf22..57b0452783 100644 --- a/jscomp/test/gpr_3697_test.js +++ b/jscomp/test/gpr_3697_test.js @@ -3,7 +3,8 @@ var CamlinternalLazy = require("../../lib/js/camlinternalLazy.js"); function fix(param) { - return /* Fix */{ + return { + TAG: "Fix", _0: { LAZY_DONE: false, VAL: (function () { diff --git a/jscomp/test/gpr_3931_test.js b/jscomp/test/gpr_3931_test.js index 7317201eaa..22958a5e2f 100644 --- a/jscomp/test/gpr_3931_test.js +++ b/jscomp/test/gpr_3931_test.js @@ -9,9 +9,9 @@ var PA = Caml_module.init_mod([ 3, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [[ - /* Function */0, + "Function", "print" ]] }); @@ -21,9 +21,9 @@ var P = Caml_module.init_mod([ 11, 6 ], { - TAG: /* Module */0, + TAG: "Module", _0: [[ - /* Function */0, + "Function", "print" ]] }); @@ -33,9 +33,9 @@ function print(a) { } Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [[ - /* Function */0, + "Function", "print" ]] }, PA, { @@ -47,9 +47,9 @@ function print$1(i) { } Caml_module.update_mod({ - TAG: /* Module */0, + TAG: "Module", _0: [[ - /* Function */0, + "Function", "print" ]] }, P, { diff --git a/jscomp/test/gpr_4407_test.js b/jscomp/test/gpr_4407_test.js index b876ac157b..b539c25c19 100644 --- a/jscomp/test/gpr_4407_test.js +++ b/jscomp/test/gpr_4407_test.js @@ -15,7 +15,8 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -var non_debug_u = /* A */{ +var non_debug_u = { + TAG: "A", _0: 1, _1: 2 }; diff --git a/jscomp/test/gpr_4519_test.js b/jscomp/test/gpr_4519_test.js index 3eadc4a4f6..a1cc069080 100644 --- a/jscomp/test/gpr_4519_test.js +++ b/jscomp/test/gpr_4519_test.js @@ -16,17 +16,17 @@ function eq(loc, x, y) { function nextFor(x) { if (x !== undefined) { - if (x) { - return ; + if (x === "Required") { + return "Optional"; } else { - return /* Optional */1; + return ; } } else { - return /* Required */0; + return "Required"; } } -eq("File \"gpr_4519_test.ml\", line 17, characters 6-13", /* Optional */1, /* Optional */1); +eq("File \"gpr_4519_test.ml\", line 17, characters 6-13", nextFor("Required"), "Optional"); Mt.from_pair_suites("Gpr_4519_test", suites.contents); diff --git a/jscomp/test/gpr_459_test.js b/jscomp/test/gpr_459_test.js index 0a44f64e5a..dca3b50385 100644 --- a/jscomp/test/gpr_459_test.js +++ b/jscomp/test/gpr_459_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_4900_test.js b/jscomp/test/gpr_4900_test.js index 74ae3021a2..3c6e35f7bd 100644 --- a/jscomp/test/gpr_4900_test.js +++ b/jscomp/test/gpr_4900_test.js @@ -11,7 +11,7 @@ var test_id = { }; function showToJs(x) { - if (/* tag */typeof x === "number" && x === /* No */0) { + if (typeof x !== "object" && x === "No") { return false; } else { return true; diff --git a/jscomp/test/gpr_4924_test.js b/jscomp/test/gpr_4924_test.js index 3ba99c54b6..417fa0305f 100644 --- a/jscomp/test/gpr_4924_test.js +++ b/jscomp/test/gpr_4924_test.js @@ -11,7 +11,7 @@ var test_id = { }; function u(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return 0; } else { return 1; @@ -19,7 +19,7 @@ function u(b) { } function u1(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return true; } else { return false; @@ -27,7 +27,7 @@ function u1(b) { } function u2(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return false; } else { return true; @@ -41,7 +41,7 @@ Mt.eq_suites(test_id, suites, "File \"gpr_4924_test.ml\", line 26, characters 30 Mt.eq_suites(test_id, suites, "File \"gpr_4924_test.ml\", line 27, characters 30-37", true, true); function u3(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return 3; } else { return 4; @@ -49,7 +49,7 @@ function u3(b) { } function u4(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return 3; } else { return 4; @@ -57,7 +57,7 @@ function u4(b) { } function u5(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return false; } else { return true; @@ -65,7 +65,7 @@ function u5(b) { } function u6(b) { - if (/* tag */typeof b === "number" && b === /* A */0) { + if (typeof b !== "object" && b === "A") { return true; } else { return false; diff --git a/jscomp/test/gpr_5169_test.js b/jscomp/test/gpr_5169_test.js index 697db483c7..7fef87b939 100644 --- a/jscomp/test/gpr_5169_test.js +++ b/jscomp/test/gpr_5169_test.js @@ -23,15 +23,17 @@ var g; var h = 1; -var i = /* None */0; +var i = "None"; -var j = /* Some */{ +var j = { + TAG: "Some", _0: 1 }; -var k = /* None */0; +var k = "None"; -var l = /* Some */{ +var l = { + TAG: "Some", _0: 1 }; diff --git a/jscomp/test/gpr_5280_optimize_test.js b/jscomp/test/gpr_5280_optimize_test.js index bfe97c2249..f986715f6a 100644 --- a/jscomp/test/gpr_5280_optimize_test.js +++ b/jscomp/test/gpr_5280_optimize_test.js @@ -1,13 +1,14 @@ 'use strict'; -var a = /* Color */{ +var a = { + TAG: "Color", _0: "#ffff" }; var c; -c = /* tag */typeof a === "number" ? "orange" : "white"; +c = typeof a !== "object" ? "orange" : "white"; exports.a = a; exports.c = c; diff --git a/jscomp/test/gpr_904_test.js b/jscomp/test/gpr_904_test.js index 56b570d020..a4028ec11f 100644 --- a/jscomp/test/gpr_904_test.js +++ b/jscomp/test/gpr_904_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/gpr_977_test.js b/jscomp/test/gpr_977_test.js index 6c5a5051f4..c993dced66 100644 --- a/jscomp/test/gpr_977_test.js +++ b/jscomp/test/gpr_977_test.js @@ -18,7 +18,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/hamming_test.js b/jscomp/test/hamming_test.js index 891416e7da..0435d896ef 100644 --- a/jscomp/test/hamming_test.js +++ b/jscomp/test/hamming_test.js @@ -110,7 +110,8 @@ function map(f, l) { LAZY_DONE: false, VAL: (function () { var match = CamlinternalLazy.force(l); - return /* Cons */{ + return { + TAG: "Cons", _0: Curry._1(f, match._0), _1: map(f, match._1) }; @@ -130,17 +131,20 @@ function merge(cmp, l1, l2) { var x1 = match._0; var c = Curry._2(cmp, x1, x2); if (c === 0) { - return /* Cons */{ + return { + TAG: "Cons", _0: x1, _1: merge(cmp, ll1, ll2) }; } else if (c < 0) { - return /* Cons */{ + return { + TAG: "Cons", _0: x1, _1: merge(cmp, ll1, l2) }; } else { - return /* Cons */{ + return { + TAG: "Cons", _0: x2, _1: merge(cmp, l1, ll2) }; @@ -174,7 +178,8 @@ function iter_interval(f, _l, _param) { var hamming = { LAZY_DONE: false, VAL: (function () { - return /* Cons */{ + return { + TAG: "Cons", _0: nn1, _1: merge(cmp, ham2, merge(cmp, ham3, ham5)) }; @@ -212,7 +217,7 @@ Mt.from_pair_suites("Hamming_test", { "output", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$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" }; diff --git a/jscomp/test/hashtbl_test.js b/jscomp/test/hashtbl_test.js index cf46cb0403..2b31fb4e4f 100644 --- a/jscomp/test/hashtbl_test.js +++ b/jscomp/test/hashtbl_test.js @@ -46,7 +46,7 @@ var suites_0 = [ "simple", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { hd: [ 1, @@ -70,7 +70,7 @@ var suites_1 = { "more_iterations", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.init(1001, (function (i) { return [ (i << 1), @@ -88,7 +88,7 @@ var suites_1 = { var tbl = MoreLabels.Hashtbl.create(undefined, 30); Hashtbl.add(tbl, 3, 3); return { - TAG: /* Eq */0, + TAG: "Eq", _0: tbl.size, _1: 1 }; diff --git a/jscomp/test/ignore_test.js b/jscomp/test/ignore_test.js index 246d975f60..f6e4c8d512 100644 --- a/jscomp/test/ignore_test.js +++ b/jscomp/test/ignore_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/inline_map2_test.js b/jscomp/test/inline_map2_test.js index e750e8824b..70085dca5e 100644 --- a/jscomp/test/inline_map2_test.js +++ b/jscomp/test/inline_map2_test.js @@ -8,7 +8,7 @@ var Caml_option = require("../../lib/js/caml_option.js"); function Make(Ord) { var height = function (param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param._4; @@ -17,7 +17,8 @@ function Make(Ord) { var create = function (l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -26,21 +27,22 @@ function Make(Ord) { }; }; var singleton = function (x, d) { - return /* Node */{ - _0: /* Empty */0, + return { + TAG: "Node", + _0: "Empty", _1: x, _2: d, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; }; var bal = function (l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l._4; + hl = typeof l !== "object" ? 0 : l._4; var hr; - hr = /* tag */typeof r === "number" ? 0 : r._4; + hr = typeof r !== "object" ? 0 : r._4; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -54,7 +56,7 @@ function Make(Ord) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw { @@ -64,7 +66,8 @@ function Make(Ord) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -72,7 +75,7 @@ function Make(Ord) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -86,7 +89,7 @@ function Make(Ord) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw { @@ -96,19 +99,20 @@ function Make(Ord) { }; }; var is_empty = function (param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } else { return false; } }; var add = function (x, data, param) { - if (/* tag */typeof param === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof param !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, _2: data, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } @@ -118,7 +122,8 @@ function Make(Ord) { var l = param._0; var c = Curry._2(Ord.compare, x, v); if (c === 0) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: data, @@ -134,7 +139,7 @@ function Make(Ord) { var find = function (x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -151,7 +156,7 @@ function Make(Ord) { var mem = function (x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = Curry._2(Ord.compare, x, param._1); @@ -165,14 +170,14 @@ function Make(Ord) { var min_binding = function (_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return [ param._1, param._2 @@ -185,14 +190,14 @@ function Make(Ord) { var max_binding = function (_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var r = param._3; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return [ param._1, param._2 @@ -203,7 +208,7 @@ function Make(Ord) { }; }; var remove_min_binding = function (param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.remove_min_elt", @@ -211,15 +216,15 @@ function Make(Ord) { }; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return param._3; } else { return bal(remove_min_binding(l), param._1, param._2, param._3); } }; var remove = function (x, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var r = param._3; var d = param._2; @@ -227,10 +232,10 @@ function Make(Ord) { var l = param._0; var c = Curry._2(Ord.compare, x, v); if (c === 0) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return r; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return l; } var match = min_binding(r); @@ -244,7 +249,7 @@ function Make(Ord) { var iter = function (f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } iter(f, param._0); @@ -254,13 +259,14 @@ function Make(Ord) { }; }; var map = function (f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var l$p = map(f, param._0); var d$p = Curry._1(f, param._2); var r$p = map(f, param._3); - return /* Node */{ + return { + TAG: "Node", _0: l$p, _1: param._1, _2: d$p, @@ -269,14 +275,15 @@ function Make(Ord) { }; }; var mapi = function (f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var v = param._1; var l$p = mapi(f, param._0); var d$p = Curry._2(f, v, param._2); var r$p = mapi(f, param._3); - return /* Node */{ + return { + TAG: "Node", _0: l$p, _1: v, _2: d$p, @@ -288,7 +295,7 @@ function Make(Ord) { while(true) { var accu = _accu; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return accu; } _accu = Curry._3(f, m._1, m._2, fold(f, m._0, accu)); @@ -299,7 +306,7 @@ function Make(Ord) { var for_all = function (p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } if (!Curry._2(p, param._1, param._2)) { @@ -315,7 +322,7 @@ function Make(Ord) { var exists = function (p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } if (Curry._2(p, param._1, param._2)) { @@ -329,25 +336,25 @@ function Make(Ord) { }; }; var add_min_binding = function (k, v, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton(k, v); } else { return bal(add_min_binding(k, v, param._0), param._1, param._2, param._3); } }; var add_max_binding = function (k, v, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton(k, v); } else { return bal(param._0, param._1, param._2, add_max_binding(k, v, param._3)); } }; var join = function (l, v, d, r) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return add_min_binding(v, d, r); } var lh = l._4; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return add_max_binding(v, d, l); } var rh = r._4; @@ -360,10 +367,10 @@ function Make(Ord) { } }; var concat = function (t1, t2) { - if (/* tag */typeof t1 === "number") { + if (typeof t1 !== "object") { return t2; } - if (/* tag */typeof t2 === "number") { + if (typeof t2 !== "object") { return t1; } var match = min_binding(t2); @@ -377,11 +384,11 @@ function Make(Ord) { } }; var split = function (x, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, + "Empty", undefined, - /* Empty */0 + "Empty" ]; } var r = param._3; @@ -412,9 +419,9 @@ function Make(Ord) { ]; }; var merge = function (f, s1, s2) { - if (/* tag */typeof s1 === "number") { - if (/* tag */typeof s2 === "number") { - return /* Empty */0; + if (typeof s1 !== "object") { + if (typeof s2 !== "object") { + return "Empty"; } } else { @@ -425,7 +432,7 @@ function Make(Ord) { } } - if (/* tag */typeof s2 === "number") { + if (typeof s2 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -441,8 +448,8 @@ function Make(Ord) { return concat_or_join(merge(f, match$1[0], s2._0), v2, Curry._3(f, v2, match$1[1], Caml_option.some(s2._2)), merge(f, match$1[2], s2._3)); }; var filter = function (p, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var d = param._2; var v = param._1; @@ -456,10 +463,10 @@ function Make(Ord) { } }; var partition = function (p, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, - /* Empty */0 + "Empty", + "Empty" ]; } var d = param._2; @@ -487,10 +494,11 @@ function Make(Ord) { while(true) { var e = _e; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return e; } - _e = /* More */{ + _e = { + TAG: "More", _0: m._1, _1: m._2, _2: m._3, @@ -501,19 +509,19 @@ function Make(Ord) { }; }; var compare = function (cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + var _e1 = cons_enum(m1, "End"); + var _e2 = cons_enum(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return 0; } else { return -1; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return 1; } var c = Curry._2(Ord.compare, e1._0, e2._0); @@ -530,19 +538,19 @@ function Make(Ord) { }; }; var equal = function (cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + var _e1 = cons_enum(m1, "End"); + var _e2 = cons_enum(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return true; } else { return false; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return false; } if (Curry._2(Ord.compare, e1._0, e2._0) !== 0) { @@ -557,7 +565,7 @@ function Make(Ord) { }; }; var cardinal = function (param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return (cardinal(param._0) + 1 | 0) + cardinal(param._3) | 0; @@ -567,7 +575,7 @@ function Make(Ord) { while(true) { var param = _param; var accu = _accu; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return accu; } _param = param._0; @@ -589,7 +597,7 @@ function Make(Ord) { create: create, singleton: singleton, bal: bal, - empty: /* Empty */0, + empty: "Empty", is_empty: is_empty, add: add, find: find, @@ -624,7 +632,7 @@ function Make(Ord) { } function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param._4; @@ -634,7 +642,8 @@ function height(param) { function create(l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -644,22 +653,23 @@ function create(l, x, d, r) { } function singleton(x, d) { - return /* Node */{ - _0: /* Empty */0, + return { + TAG: "Node", + _0: "Empty", _1: x, _2: d, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } function bal(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l._4; + hl = typeof l !== "object" ? 0 : l._4; var hr; - hr = /* tag */typeof r === "number" ? 0 : r._4; + hr = typeof r !== "object" ? 0 : r._4; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -673,7 +683,7 @@ function bal(l, x, d, r) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw { @@ -683,7 +693,8 @@ function bal(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -691,7 +702,7 @@ function bal(l, x, d, r) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -705,7 +716,7 @@ function bal(l, x, d, r) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw { @@ -716,7 +727,7 @@ function bal(l, x, d, r) { } function is_empty(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } else { return false; @@ -724,12 +735,13 @@ function is_empty(param) { } function add(x, data, param) { - if (/* tag */typeof param === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof param !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, _2: data, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } @@ -739,7 +751,8 @@ function add(x, data, param) { var l = param._0; var c = Caml.int_compare(x, v); if (c === 0) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: data, @@ -756,7 +769,7 @@ function add(x, data, param) { function find(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -774,7 +787,7 @@ function find(x, _param) { function mem(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = Caml.int_compare(x, param._1); @@ -789,14 +802,14 @@ function mem(x, _param) { function min_binding(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return [ param._1, param._2 @@ -810,14 +823,14 @@ function min_binding(_param) { function max_binding(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var r = param._3; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return [ param._1, param._2 @@ -829,7 +842,7 @@ function max_binding(_param) { } function remove_min_binding(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.remove_min_elt", @@ -837,7 +850,7 @@ function remove_min_binding(param) { }; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return param._3; } else { return bal(remove_min_binding(l), param._1, param._2, param._3); @@ -845,8 +858,8 @@ function remove_min_binding(param) { } function remove(x, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var r = param._3; var d = param._2; @@ -854,10 +867,10 @@ function remove(x, param) { var l = param._0; var c = Caml.int_compare(x, v); if (c === 0) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return r; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return l; } var match = min_binding(r); @@ -872,7 +885,7 @@ function remove(x, param) { function iter(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } iter(f, param._0); @@ -883,13 +896,14 @@ function iter(f, _param) { } function map(f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var l$p = map(f, param._0); var d$p = Curry._1(f, param._2); var r$p = map(f, param._3); - return /* Node */{ + return { + TAG: "Node", _0: l$p, _1: param._1, _2: d$p, @@ -899,14 +913,15 @@ function map(f, param) { } function mapi(f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var v = param._1; var l$p = mapi(f, param._0); var d$p = Curry._2(f, v, param._2); var r$p = mapi(f, param._3); - return /* Node */{ + return { + TAG: "Node", _0: l$p, _1: v, _2: d$p, @@ -919,7 +934,7 @@ function fold(f, _m, _accu) { while(true) { var accu = _accu; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return accu; } _accu = Curry._3(f, m._1, m._2, fold(f, m._0, accu)); @@ -931,7 +946,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } if (!Curry._2(p, param._1, param._2)) { @@ -948,7 +963,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } if (Curry._2(p, param._1, param._2)) { @@ -963,7 +978,7 @@ function exists(p, _param) { } function add_min_binding(k, v, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton(k, v); } else { return bal(add_min_binding(k, v, param._0), param._1, param._2, param._3); @@ -971,7 +986,7 @@ function add_min_binding(k, v, param) { } function add_max_binding(k, v, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton(k, v); } else { return bal(param._0, param._1, param._2, add_max_binding(k, v, param._3)); @@ -979,11 +994,11 @@ function add_max_binding(k, v, param) { } function join(l, v, d, r) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return add_min_binding(v, d, r); } var lh = l._4; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return add_max_binding(v, d, l); } var rh = r._4; @@ -997,10 +1012,10 @@ function join(l, v, d, r) { } function concat(t1, t2) { - if (/* tag */typeof t1 === "number") { + if (typeof t1 !== "object") { return t2; } - if (/* tag */typeof t2 === "number") { + if (typeof t2 !== "object") { return t1; } var match = min_binding(t2); @@ -1016,11 +1031,11 @@ function concat_or_join(t1, v, d, t2) { } function split(x, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, + "Empty", undefined, - /* Empty */0 + "Empty" ]; } var r = param._3; @@ -1052,9 +1067,9 @@ function split(x, param) { } function merge(f, s1, s2) { - if (/* tag */typeof s1 === "number") { - if (/* tag */typeof s2 === "number") { - return /* Empty */0; + if (typeof s1 !== "object") { + if (typeof s2 !== "object") { + return "Empty"; } } else { @@ -1065,7 +1080,7 @@ function merge(f, s1, s2) { } } - if (/* tag */typeof s2 === "number") { + if (typeof s2 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -1082,8 +1097,8 @@ function merge(f, s1, s2) { } function filter(p, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var d = param._2; var v = param._1; @@ -1098,10 +1113,10 @@ function filter(p, param) { } function partition(p, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, - /* Empty */0 + "Empty", + "Empty" ]; } var d = param._2; @@ -1130,10 +1145,11 @@ function cons_enum(_m, _e) { while(true) { var e = _e; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return e; } - _e = /* More */{ + _e = { + TAG: "More", _0: m._1, _1: m._2, _2: m._3, @@ -1145,19 +1161,19 @@ function cons_enum(_m, _e) { } function compare(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + var _e1 = cons_enum(m1, "End"); + var _e2 = cons_enum(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return 0; } else { return -1; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return 1; } var c = Caml.int_compare(e1._0, e2._0); @@ -1175,19 +1191,19 @@ function compare(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + var _e1 = cons_enum(m1, "End"); + var _e2 = cons_enum(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return true; } else { return false; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return false; } if (e1._0 !== e2._0) { @@ -1203,7 +1219,7 @@ function equal(cmp, m1, m2) { } function cardinal(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return (cardinal(param._0) + 1 | 0) + cardinal(param._3) | 0; @@ -1214,7 +1230,7 @@ function bindings_aux(_accu, _param) { while(true) { var param = _param; var accu = _accu; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return accu; } _param = param._0; @@ -1238,7 +1254,7 @@ var IntMap = { create: create, singleton: singleton, bal: bal, - empty: /* Empty */0, + empty: "Empty", is_empty: is_empty, add: add, find: find, @@ -1273,7 +1289,7 @@ var IntMap = { var m = List.fold_left((function (acc, param) { return add(param[0], param[1], acc); - }), /* Empty */0, { + }), "Empty", { hd: [ 10, /* 'a' */97 @@ -1300,7 +1316,7 @@ var m = List.fold_left((function (acc, param) { }); function height$1(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param._4; @@ -1310,7 +1326,8 @@ function height$1(param) { function create$1(l, x, d, r) { var hl = height$1(l); var hr = height$1(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -1320,22 +1337,23 @@ function create$1(l, x, d, r) { } function singleton$1(x, d) { - return /* Node */{ - _0: /* Empty */0, + return { + TAG: "Node", + _0: "Empty", _1: x, _2: d, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } function bal$1(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l._4; + hl = typeof l !== "object" ? 0 : l._4; var hr; - hr = /* tag */typeof r === "number" ? 0 : r._4; + hr = typeof r !== "object" ? 0 : r._4; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -1349,7 +1367,7 @@ function bal$1(l, x, d, r) { if (height$1(ll) >= height$1(lr)) { return create$1(ll, lv, ld, create$1(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create$1(create$1(ll, lv, ld, lr._0), lr._1, lr._2, create$1(lr._3, x, d, r)); } throw { @@ -1359,7 +1377,8 @@ function bal$1(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -1367,7 +1386,7 @@ function bal$1(l, x, d, r) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -1381,7 +1400,7 @@ function bal$1(l, x, d, r) { if (height$1(rr) >= height$1(rl)) { return create$1(create$1(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create$1(create$1(l, x, d, rl._0), rl._1, rl._2, create$1(rl._3, rv, rd, rr)); } throw { @@ -1392,7 +1411,7 @@ function bal$1(l, x, d, r) { } function is_empty$1(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } else { return false; @@ -1400,12 +1419,13 @@ function is_empty$1(param) { } function add$1(x, data, param) { - if (/* tag */typeof param === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof param !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, _2: data, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } @@ -1415,7 +1435,8 @@ function add$1(x, data, param) { var l = param._0; var c = Caml.string_compare(x, v); if (c === 0) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: data, @@ -1432,7 +1453,7 @@ function add$1(x, data, param) { function find$1(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -1450,7 +1471,7 @@ function find$1(x, _param) { function mem$1(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = Caml.string_compare(x, param._1); @@ -1465,14 +1486,14 @@ function mem$1(x, _param) { function min_binding$1(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return [ param._1, param._2 @@ -1486,14 +1507,14 @@ function min_binding$1(_param) { function max_binding$1(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var r = param._3; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return [ param._1, param._2 @@ -1505,7 +1526,7 @@ function max_binding$1(_param) { } function remove_min_binding$1(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.remove_min_elt", @@ -1513,7 +1534,7 @@ function remove_min_binding$1(param) { }; } var l = param._0; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return param._3; } else { return bal$1(remove_min_binding$1(l), param._1, param._2, param._3); @@ -1521,8 +1542,8 @@ function remove_min_binding$1(param) { } function remove$1(x, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var r = param._3; var d = param._2; @@ -1530,10 +1551,10 @@ function remove$1(x, param) { var l = param._0; var c = Caml.string_compare(x, v); if (c === 0) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return r; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return l; } var match = min_binding$1(r); @@ -1548,7 +1569,7 @@ function remove$1(x, param) { function iter$1(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } iter$1(f, param._0); @@ -1559,13 +1580,14 @@ function iter$1(f, _param) { } function map$1(f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var l$p = map$1(f, param._0); var d$p = Curry._1(f, param._2); var r$p = map$1(f, param._3); - return /* Node */{ + return { + TAG: "Node", _0: l$p, _1: param._1, _2: d$p, @@ -1575,14 +1597,15 @@ function map$1(f, param) { } function mapi$1(f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var v = param._1; var l$p = mapi$1(f, param._0); var d$p = Curry._2(f, v, param._2); var r$p = mapi$1(f, param._3); - return /* Node */{ + return { + TAG: "Node", _0: l$p, _1: v, _2: d$p, @@ -1595,7 +1618,7 @@ function fold$1(f, _m, _accu) { while(true) { var accu = _accu; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return accu; } _accu = Curry._3(f, m._1, m._2, fold$1(f, m._0, accu)); @@ -1607,7 +1630,7 @@ function fold$1(f, _m, _accu) { function for_all$1(p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } if (!Curry._2(p, param._1, param._2)) { @@ -1624,7 +1647,7 @@ function for_all$1(p, _param) { function exists$1(p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } if (Curry._2(p, param._1, param._2)) { @@ -1639,7 +1662,7 @@ function exists$1(p, _param) { } function add_min_binding$1(k, v, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton$1(k, v); } else { return bal$1(add_min_binding$1(k, v, param._0), param._1, param._2, param._3); @@ -1647,7 +1670,7 @@ function add_min_binding$1(k, v, param) { } function add_max_binding$1(k, v, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton$1(k, v); } else { return bal$1(param._0, param._1, param._2, add_max_binding$1(k, v, param._3)); @@ -1655,11 +1678,11 @@ function add_max_binding$1(k, v, param) { } function join$1(l, v, d, r) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return add_min_binding$1(v, d, r); } var lh = l._4; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return add_max_binding$1(v, d, l); } var rh = r._4; @@ -1673,10 +1696,10 @@ function join$1(l, v, d, r) { } function concat$1(t1, t2) { - if (/* tag */typeof t1 === "number") { + if (typeof t1 !== "object") { return t2; } - if (/* tag */typeof t2 === "number") { + if (typeof t2 !== "object") { return t1; } var match = min_binding$1(t2); @@ -1692,11 +1715,11 @@ function concat_or_join$1(t1, v, d, t2) { } function split$1(x, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, + "Empty", undefined, - /* Empty */0 + "Empty" ]; } var r = param._3; @@ -1728,9 +1751,9 @@ function split$1(x, param) { } function merge$1(f, s1, s2) { - if (/* tag */typeof s1 === "number") { - if (/* tag */typeof s2 === "number") { - return /* Empty */0; + if (typeof s1 !== "object") { + if (typeof s2 !== "object") { + return "Empty"; } } else { @@ -1741,7 +1764,7 @@ function merge$1(f, s1, s2) { } } - if (/* tag */typeof s2 === "number") { + if (typeof s2 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -1758,8 +1781,8 @@ function merge$1(f, s1, s2) { } function filter$1(p, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var d = param._2; var v = param._1; @@ -1774,10 +1797,10 @@ function filter$1(p, param) { } function partition$1(p, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, - /* Empty */0 + "Empty", + "Empty" ]; } var d = param._2; @@ -1806,10 +1829,11 @@ function cons_enum$1(_m, _e) { while(true) { var e = _e; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return e; } - _e = /* More */{ + _e = { + TAG: "More", _0: m._1, _1: m._2, _2: m._3, @@ -1821,19 +1845,19 @@ function cons_enum$1(_m, _e) { } function compare$1(cmp, m1, m2) { - var _e1 = cons_enum$1(m1, /* End */0); - var _e2 = cons_enum$1(m2, /* End */0); + var _e1 = cons_enum$1(m1, "End"); + var _e2 = cons_enum$1(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return 0; } else { return -1; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return 1; } var c = Caml.string_compare(e1._0, e2._0); @@ -1851,19 +1875,19 @@ function compare$1(cmp, m1, m2) { } function equal$1(cmp, m1, m2) { - var _e1 = cons_enum$1(m1, /* End */0); - var _e2 = cons_enum$1(m2, /* End */0); + var _e1 = cons_enum$1(m1, "End"); + var _e2 = cons_enum$1(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return true; } else { return false; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return false; } if (Caml.string_compare(e1._0, e2._0) !== 0) { @@ -1879,7 +1903,7 @@ function equal$1(cmp, m1, m2) { } function cardinal$1(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return (cardinal$1(param._0) + 1 | 0) + cardinal$1(param._3) | 0; @@ -1890,7 +1914,7 @@ function bindings_aux$1(_accu, _param) { while(true) { var param = _param; var accu = _accu; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return accu; } _param = param._0; @@ -1914,7 +1938,7 @@ var SMap = { create: create$1, singleton: singleton$1, bal: bal$1, - empty: /* Empty */0, + empty: "Empty", is_empty: is_empty$1, add: add$1, find: find$1, @@ -1949,7 +1973,7 @@ var SMap = { var s = List.fold_left((function (acc, param) { return add$1(param[0], param[1], acc); - }), /* Empty */0, { + }), "Empty", { hd: [ "10", /* 'a' */97 @@ -1980,7 +2004,7 @@ Mt.from_pair_suites("Inline_map2_test", { "assertion1", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: find(10, m), _1: /* 'a' */97 }; @@ -1991,7 +2015,7 @@ Mt.from_pair_suites("Inline_map2_test", { "assertion2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: find$1("10", s), _1: /* 'a' */97 }; @@ -2001,7 +2025,7 @@ Mt.from_pair_suites("Inline_map2_test", { } }); -var empty = /* Empty */0; +var empty = "Empty"; exports.Make = Make; exports.IntMap = IntMap; diff --git a/jscomp/test/inline_map_demo.js b/jscomp/test/inline_map_demo.js index c141f7d250..e731598bc5 100644 --- a/jscomp/test/inline_map_demo.js +++ b/jscomp/test/inline_map_demo.js @@ -5,7 +5,7 @@ var Caml = require("../../lib/js/caml.js"); var List = require("../../lib/js/list.js"); function height(x) { - if (/* tag */typeof x === "number") { + if (typeof x !== "object") { return 0; } else { return x._4; @@ -15,7 +15,8 @@ function height(x) { function create(l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -26,11 +27,11 @@ function create(l, x, d, r) { function bal(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l._4; + hl = typeof l !== "object" ? 0 : l._4; var hr; - hr = /* tag */typeof r === "number" ? 0 : r._4; + hr = typeof r !== "object" ? 0 : r._4; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -48,7 +49,7 @@ function bal(l, x, d, r) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw { @@ -62,7 +63,8 @@ function bal(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -70,7 +72,7 @@ function bal(l, x, d, r) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -88,7 +90,7 @@ function bal(l, x, d, r) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw { @@ -103,12 +105,13 @@ function bal(l, x, d, r) { } function add(x, data, tree) { - if (/* tag */typeof tree === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof tree !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, _2: data, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } @@ -118,7 +121,8 @@ function add(x, data, tree) { var l = tree._0; var c = Caml.int_compare(x, v); if (c === 0) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: data, @@ -134,7 +138,7 @@ function add(x, data, tree) { var m = List.fold_left((function (acc, param) { return add(param[0], param[1], acc); - }), /* Empty */0, { + }), "Empty", { hd: [ 10, /* 'a' */97 @@ -163,7 +167,7 @@ var m = List.fold_left((function (acc, param) { function find(px, _x) { while(true) { var x = _x; - if (/* tag */typeof x === "number") { + if (typeof x !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -183,7 +187,7 @@ Mt.from_pair_suites("Inline_map_demo", { "find", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: find(10, m), _1: /* 'a' */97 }; diff --git a/jscomp/test/inline_map_test.js b/jscomp/test/inline_map_test.js index 538a70d250..2393bc1951 100644 --- a/jscomp/test/inline_map_test.js +++ b/jscomp/test/inline_map_test.js @@ -5,7 +5,7 @@ var Caml = require("../../lib/js/caml.js"); var List = require("../../lib/js/list.js"); function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param._4; @@ -15,7 +15,8 @@ function height(param) { function create(l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -26,11 +27,11 @@ function create(l, x, d, r) { function bal(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l._4; + hl = typeof l !== "object" ? 0 : l._4; var hr; - hr = /* tag */typeof r === "number" ? 0 : r._4; + hr = typeof r !== "object" ? 0 : r._4; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -44,7 +45,7 @@ function bal(l, x, d, r) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr._0), lr._1, lr._2, create(lr._3, x, d, r)); } throw { @@ -54,7 +55,8 @@ function bal(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: d, @@ -62,7 +64,7 @@ function bal(l, x, d, r) { _4: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -76,7 +78,7 @@ function bal(l, x, d, r) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl._0), rl._1, rl._2, create(rl._3, rv, rd, rr)); } throw { @@ -87,12 +89,13 @@ function bal(l, x, d, r) { } function add(x, data, param) { - if (/* tag */typeof param === "number") { - return /* Node */{ - _0: /* Empty */0, + if (typeof param !== "object") { + return { + TAG: "Node", + _0: "Empty", _1: x, _2: data, - _3: /* Empty */0, + _3: "Empty", _4: 1 }; } @@ -102,7 +105,8 @@ function add(x, data, param) { var l = param._0; var c = Caml.int_compare(x, v); if (c === 0) { - return /* Node */{ + return { + TAG: "Node", _0: l, _1: x, _2: data, @@ -119,7 +123,7 @@ function add(x, data, param) { function find(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -136,7 +140,7 @@ function find(x, _param) { var m = List.fold_left((function (acc, param) { return add(param[0], param[1], acc); - }), /* Empty */0, { + }), "Empty", { hd: [ 10, /* 'a' */97 @@ -167,7 +171,7 @@ Mt.from_pair_suites("Inline_map_test", { "find", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: find(10, m), _1: /* 'a' */97 }; diff --git a/jscomp/test/inline_record_test.js b/jscomp/test/inline_record_test.js index 6b0674f355..2b90b28a8b 100644 --- a/jscomp/test/inline_record_test.js +++ b/jscomp/test/inline_record_test.js @@ -17,13 +17,13 @@ function eq(loc, x, y) { } var v = { - TAG: /* A0 */0, + TAG: "A0", lbl: 3, more: /* [] */0 }; var v1 = { - TAG: /* A1 */1, + TAG: "A1", more: { hd: 1, tl: { @@ -34,7 +34,7 @@ var v1 = { }; function f(x) { - if (x.TAG === /* A0 */0) { + if (x.TAG === "A0") { return List.fold_left((function (prim0, prim1) { return prim0 + prim1 | 0; }), x.lbl, x.more); @@ -80,7 +80,7 @@ if (A0 === A0) { eq("File \"inline_record_test.ml\", line 51, characters 6-13", tmp, 3); function ff(x) { - if (x.TAG === /* A0 */0) { + if (x.TAG === "A0") { x.x = x.x + 1 | 0; } else { x.z = x.z + 2 | 0; @@ -88,14 +88,14 @@ function ff(x) { } var v4 = { - TAG: /* A0 */0, + TAG: "A0", x: 0, y: 0, z: 0 }; var v5 = { - TAG: /* A1 */1, + TAG: "A1", z: 0 }; @@ -106,7 +106,7 @@ for(var i = 0; i <= 10; ++i){ var tmp$1; -if (v4.TAG === /* A0 */0) { +if (v4.TAG === "A0") { tmp$1 = v4.x; } else { throw { @@ -124,7 +124,7 @@ eq("File \"inline_record_test.ml\", line 69, characters 6-13", tmp$1, 11); var tmp$2; -if (v5.TAG === /* A0 */0) { +if (v5.TAG === "A0") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -181,10 +181,11 @@ if (v6.RE_EXN_ID === A4) { eq("File \"inline_record_test.ml\", line 87, characters 6-13", tmp$3, 11); function ff1(x) { - if (/* tag */typeof x === "number") { - return /* A1 */0; + if (typeof x !== "object") { + return "A1"; } else { - return /* A0 */{ + return { + TAG: "A0", lbl: x.lbl + 1 | 0, more: x.more }; @@ -193,12 +194,14 @@ function ff1(x) { Mt.from_pair_suites("Inline_record_test", suites.contents); -var v2 = /* A0 */{ +var v2 = { + TAG: "A0", lbl: 3, more: /* [] */0 }; -var vvv = /* A0 */{ +var vvv = { + TAG: "A0", lbl: 3, more: /* [] */0 }; diff --git a/jscomp/test/inline_regression_test.js b/jscomp/test/inline_regression_test.js index b5e490e2a5..66440296af 100644 --- a/jscomp/test/inline_regression_test.js +++ b/jscomp/test/inline_regression_test.js @@ -47,7 +47,7 @@ var suites_0 = [ "basename", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: basename("b/c/a.b"), _1: "a.b" }; diff --git a/jscomp/test/installation_test.js b/jscomp/test/installation_test.js index 85e46c8705..04efc48572 100644 --- a/jscomp/test/installation_test.js +++ b/jscomp/test/installation_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/int32_test.js b/jscomp/test/int32_test.js index b1efd4b5fc..34de6fcc84 100644 --- a/jscomp/test/int32_test.js +++ b/jscomp/test/int32_test.js @@ -157,7 +157,7 @@ var suites = { "File \"int32_test.ml\", line 31, characters 2-9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: 1 }; @@ -168,7 +168,7 @@ var suites = { "File \"int32_test.ml\", line 32, characters 2-9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -2147483647, _1: -2147483647 }; @@ -181,7 +181,7 @@ var suites = { "shift_right_logical_cases " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: b }; @@ -192,7 +192,7 @@ var suites = { "shift_right_cases " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: b }; @@ -203,7 +203,7 @@ var suites = { "shift_left_cases " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: b }; diff --git a/jscomp/test/int64_mul_div_test.js b/jscomp/test/int64_mul_div_test.js index 0f4ff5d084..f593df2a14 100644 --- a/jscomp/test/int64_mul_div_test.js +++ b/jscomp/test/int64_mul_div_test.js @@ -9,7 +9,7 @@ var Pervasives = require("../../lib/js/pervasives.js"); function commutative_mul(result, a, b) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ result, result @@ -1517,7 +1517,7 @@ function from(xs) { "small_divs " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ c, d @@ -1573,7 +1573,7 @@ function from_compare(xs) { "int64_compare " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: c, _1: Caml_int64.compare(a, b) }; @@ -1590,7 +1590,7 @@ function from_to_string(xs) { "to_string " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: str_a, _1: Caml_int64.to_string(a) }; @@ -1606,7 +1606,7 @@ Mt.from_pair_suites("Int64_mul_div_test", Pervasives.$at(from_pairs("random", pa "to_float_" + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.to_float(i64), _1: f }; @@ -1619,7 +1619,7 @@ Mt.from_pair_suites("Int64_mul_div_test", Pervasives.$at(from_pairs("random", pa "of_float_" + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.of_float(f), _1: i64 }; @@ -1630,7 +1630,7 @@ Mt.from_pair_suites("Int64_mul_div_test", Pervasives.$at(from_pairs("random", pa "compare_check_complete", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.map((function (param) { return true; }), check_complete_compare), @@ -1644,7 +1644,7 @@ Mt.from_pair_suites("Int64_mul_div_test", Pervasives.$at(from_pairs("random", pa "div_rem_0", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.zero, _1: Caml_int64.zero }; @@ -1655,7 +1655,7 @@ Mt.from_pair_suites("Int64_mul_div_test", Pervasives.$at(from_pairs("random", pa "div_rem_1", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.neg_one, _1: Caml_int64.neg_one }; @@ -1666,7 +1666,7 @@ Mt.from_pair_suites("Int64_mul_div_test", Pervasives.$at(from_pairs("random", pa "File \"int64_mul_div_test.ml\", line 214, characters 5-12", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.to_float(Int64.max_int), _1: 9.22337203685477581e+18 }; diff --git a/jscomp/test/int64_test.js b/jscomp/test/int64_test.js index 59f6d3a7ef..2116a2aac5 100644 --- a/jscomp/test/int64_test.js +++ b/jscomp/test/int64_test.js @@ -20,7 +20,7 @@ var a = [ function commutative_add(result, a, b) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ result, result @@ -853,7 +853,7 @@ var suites = Pervasives.$at({ "add_one", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: v, _1: [ 0, @@ -867,7 +867,7 @@ var suites = Pervasives.$at({ "add_2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 4294967294 @@ -881,7 +881,7 @@ var suites = Pervasives.$at({ "add_3", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.zero, _1: Caml_int64.zero }; @@ -1005,7 +1005,7 @@ var suites = Pervasives.$at({ "to_int32", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Caml_int64.to_int32([ 0, @@ -1019,7 +1019,7 @@ var suites = Pervasives.$at({ "to_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Caml_int64.to_int32([ 0, @@ -1033,7 +1033,7 @@ var suites = Pervasives.$at({ "of_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 3 @@ -1050,7 +1050,7 @@ var suites = Pervasives.$at({ "lognot", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ -1, 4294967293 @@ -1067,7 +1067,7 @@ var suites = Pervasives.$at({ "neg", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ -1, 4294967294 @@ -1084,7 +1084,7 @@ var suites = Pervasives.$at({ "File \"int64_test.ml\", line 80, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Int64.min_int, _1: Caml_int64.neg(Int64.min_int) }; @@ -1095,7 +1095,7 @@ var suites = Pervasives.$at({ "File \"int64_test.ml\", line 81, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Int64.max_int, _1: Caml_int64.neg(Caml_int64.add(Int64.min_int, Caml_int64.one)) }; @@ -1106,7 +1106,7 @@ var suites = Pervasives.$at({ "sub1", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 2 @@ -1123,7 +1123,7 @@ var suites = Pervasives.$at({ "xor1", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ 0, @@ -1152,7 +1152,7 @@ var suites = Pervasives.$at({ "or", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 4294967295 @@ -1169,7 +1169,7 @@ var suites = Pervasives.$at({ "and", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 4008636142 @@ -1186,7 +1186,7 @@ var suites = Pervasives.$at({ "lsl", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.map((function (x) { return Caml_int64.lsl_(Caml_int64.one, x); }), $$Array.init(64, (function (i) { @@ -1452,7 +1452,7 @@ var suites = Pervasives.$at({ "lsr", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.map((function (x) { return Caml_int64.lsr_(Caml_int64.neg_one, x); }), $$Array.init(64, (function (i) { @@ -1715,7 +1715,7 @@ var suites = Pervasives.$at({ "asr", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.map((function (x) { return Caml_int64.asr_(Caml_int64.neg_one, x); }), $$Array.init(64, (function (i) { @@ -1795,7 +1795,7 @@ var suites = Pervasives.$at({ "mul simple", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 6 @@ -1812,7 +1812,7 @@ var suites = Pervasives.$at({ "of_int32", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.map(Caml_int64.of_int32, [ 0, -2147483648 @@ -1832,7 +1832,7 @@ var suites = Pervasives.$at({ "of_int32_singleton", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ -1, 4294967293 @@ -1849,7 +1849,7 @@ var suites = Pervasives.$at({ "File \"int64_test.ml\", line 134, characters 4-11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 3 @@ -1866,7 +1866,7 @@ var suites = Pervasives.$at({ "to_int32", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.map(Caml_int64.to_int32, [ Caml_int64.zero, [ @@ -1886,7 +1886,7 @@ var suites = Pervasives.$at({ "discard_sign", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.discard_sign(Caml_int64.neg_one), _1: Caml_int64.max_int }; @@ -1897,7 +1897,7 @@ var suites = Pervasives.$at({ "div_mod", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.div_mod([ 0, 7 @@ -1920,7 +1920,7 @@ var suites = Pervasives.$at({ "to_hex", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.to_hex(Caml_int64.neg_one), _1: "ffffffffffffffff" }; @@ -1931,7 +1931,7 @@ var suites = Pervasives.$at({ "generic_compare", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare([ 1, 0 @@ -1945,7 +1945,7 @@ var suites = Pervasives.$at({ "test_compier_literal", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 4294967295 @@ -1962,7 +1962,7 @@ var suites = Pervasives.$at({ "generic_compare2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_obj.compare([ 0, 2147483648 @@ -1976,7 +1976,7 @@ var suites = Pervasives.$at({ "shift_left", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 4294967040 @@ -1993,7 +1993,7 @@ var suites = Pervasives.$at({ "fib_int64", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: fib(1000, Caml_int64.one, [ 0, 2 @@ -2010,7 +2010,7 @@ var suites = Pervasives.$at({ "fac_int64", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: fac(30, Caml_int64.one), _1: [ -2040662563, @@ -2024,7 +2024,7 @@ var suites = Pervasives.$at({ "File \"int64_test.ml\", line 163, characters 6-13", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.add(Int64.max_int, Int64.max_int), _1: [ -1, @@ -2038,7 +2038,7 @@ var suites = Pervasives.$at({ "File \"int64_test.ml\", line 166, characters 6-13", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.add(Int64.min_int, Int64.min_int), _1: Caml_int64.zero }; @@ -2049,7 +2049,7 @@ var suites = Pervasives.$at({ "File \"int64_test.ml\", line 170, characters 6-13", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_int64.neg_one, _1: Caml_int64.neg_one }; @@ -2102,7 +2102,7 @@ var suites = Pervasives.$at({ "shift_left_cases " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: b }; @@ -2113,7 +2113,7 @@ var suites = Pervasives.$at({ "shift_right_cases " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: b }; @@ -2124,7 +2124,7 @@ var suites = Pervasives.$at({ "shift_right_logical_cases " + i, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: a, _1: b }; @@ -2147,7 +2147,7 @@ function eq(loc, x, y) { function id(loc, x) { var float_value = Caml_int64.float_of_bits(x); var match = Pervasives.classify_float(float_value); - if (match === /* FP_nan */4) { + if (match === "FP_nan") { return ; } else { return eq(loc, Caml_int64.bits_of_float(float_value), x); diff --git a/jscomp/test/int_hashtbl_test.js b/jscomp/test/int_hashtbl_test.js index b6435782bd..d68238f8c4 100644 --- a/jscomp/test/int_hashtbl_test.js +++ b/jscomp/test/int_hashtbl_test.js @@ -61,7 +61,7 @@ var suites_0 = [ "simple", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { hd: [ 1, @@ -85,7 +85,7 @@ var suites_1 = { "more_iterations", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: $$Array.init(1001, (function (i) { return [ (i << 1), diff --git a/jscomp/test/int_map.js b/jscomp/test/int_map.js index fe3b276233..b563f70641 100644 --- a/jscomp/test/int_map.js +++ b/jscomp/test/int_map.js @@ -5,7 +5,7 @@ var Curry = require("../../lib/js/curry.js"); var Caml_option = require("../../lib/js/caml_option.js"); function height(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return param.h; @@ -15,7 +15,8 @@ function height(param) { function create(l, x, d, r) { var hl = height(l); var hr = height(r); - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: d, @@ -25,22 +26,23 @@ function create(l, x, d, r) { } function singleton(x, d) { - return /* Node */{ - l: /* Empty */0, + return { + TAG: "Node", + l: "Empty", v: x, d: d, - r: /* Empty */0, + r: "Empty", h: 1 }; } function bal(l, x, d, r) { var hl; - hl = /* tag */typeof l === "number" ? 0 : l.h; + hl = typeof l !== "object" ? 0 : l.h; var hr; - hr = /* tag */typeof r === "number" ? 0 : r.h; + hr = typeof r !== "object" ? 0 : r.h; if (hl > (hr + 2 | 0)) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -54,7 +56,7 @@ function bal(l, x, d, r) { if (height(ll) >= height(lr)) { return create(ll, lv, ld, create(lr, x, d, r)); } - if (/* tag */typeof lr !== "number") { + if (typeof lr === "object") { return create(create(ll, lv, ld, lr.l), lr.v, lr.d, create(lr.r, x, d, r)); } throw { @@ -64,7 +66,8 @@ function bal(l, x, d, r) { }; } if (hr <= (hl + 2 | 0)) { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: d, @@ -72,7 +75,7 @@ function bal(l, x, d, r) { h: hl >= hr ? hl + 1 | 0 : hr + 1 | 0 }; } - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.bal", @@ -86,7 +89,7 @@ function bal(l, x, d, r) { if (height(rr) >= height(rl)) { return create(create(l, x, d, rl), rv, rd, rr); } - if (/* tag */typeof rl !== "number") { + if (typeof rl === "object") { return create(create(l, x, d, rl.l), rl.v, rl.d, create(rl.r, rv, rd, rr)); } throw { @@ -97,7 +100,7 @@ function bal(l, x, d, r) { } function is_empty(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } else { return false; @@ -105,12 +108,13 @@ function is_empty(param) { } function add(x, data, m) { - if (/* tag */typeof m === "number") { - return /* Node */{ - l: /* Empty */0, + if (typeof m !== "object") { + return { + TAG: "Node", + l: "Empty", v: x, d: data, - r: /* Empty */0, + r: "Empty", h: 1 }; } @@ -123,7 +127,8 @@ function add(x, data, m) { if (d === data) { return m; } else { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: data, @@ -151,7 +156,7 @@ function add(x, data, m) { function find(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -169,7 +174,7 @@ function find(x, _param) { function find_first(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -184,7 +189,7 @@ function find_first(f, _param) { var param$1 = _param$1; var d0 = _d0; var v0 = _v0; - if (/* tag */typeof param$1 === "number") { + if (typeof param$1 !== "object") { return [ v0, d0 @@ -209,7 +214,7 @@ function find_first(f, _param) { function find_first_opt(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } var v = param.v; @@ -221,7 +226,7 @@ function find_first_opt(f, _param) { var param$1 = _param$1; var d0 = _d0; var v0 = _v0; - if (/* tag */typeof param$1 === "number") { + if (typeof param$1 !== "object") { return [ v0, d0 @@ -246,7 +251,7 @@ function find_first_opt(f, _param) { function find_last(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() @@ -261,7 +266,7 @@ function find_last(f, _param) { var param$1 = _param$1; var d0 = _d0; var v0 = _v0; - if (/* tag */typeof param$1 === "number") { + if (typeof param$1 !== "object") { return [ v0, d0 @@ -286,7 +291,7 @@ function find_last(f, _param) { function find_last_opt(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } var v = param.v; @@ -298,7 +303,7 @@ function find_last_opt(f, _param) { var param$1 = _param$1; var d0 = _d0; var v0 = _v0; - if (/* tag */typeof param$1 === "number") { + if (typeof param$1 !== "object") { return [ v0, d0 @@ -323,7 +328,7 @@ function find_last_opt(f, _param) { function find_opt(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } var c = Caml.int_compare(x, param.v); @@ -338,7 +343,7 @@ function find_opt(x, _param) { function mem(x, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } var c = Caml.int_compare(x, param.v); @@ -353,14 +358,14 @@ function mem(x, _param) { function min_binding(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var l = param.l; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return [ param.v, param.d @@ -374,11 +379,11 @@ function min_binding(_param) { function min_binding_opt(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } var l = param.l; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return [ param.v, param.d @@ -392,14 +397,14 @@ function min_binding_opt(_param) { function max_binding(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Not_found", Error: new Error() }; } var r = param.r; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return [ param.v, param.d @@ -413,11 +418,11 @@ function max_binding(_param) { function max_binding_opt(_param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } var r = param.r; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return [ param.v, param.d @@ -429,7 +434,7 @@ function max_binding_opt(_param) { } function remove_min_binding(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { throw { RE_EXN_ID: "Invalid_argument", _1: "Map.remove_min_elt", @@ -437,7 +442,7 @@ function remove_min_binding(param) { }; } var l = param.l; - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return param.r; } else { return bal(remove_min_binding(l), param.v, param.d, param.r); @@ -445,10 +450,10 @@ function remove_min_binding(param) { } function merge(t1, t2) { - if (/* tag */typeof t1 === "number") { + if (typeof t1 !== "object") { return t2; } - if (/* tag */typeof t2 === "number") { + if (typeof t2 !== "object") { return t1; } var match = min_binding(t2); @@ -456,8 +461,8 @@ function merge(t1, t2) { } function remove(x, m) { - if (/* tag */typeof m === "number") { - return /* Empty */0; + if (typeof m !== "object") { + return "Empty"; } var r = m.r; var d = m.d; @@ -484,18 +489,19 @@ function remove(x, m) { } function update(x, f, m) { - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { var data = Curry._1(f, undefined); if (data !== undefined) { - return /* Node */{ - l: /* Empty */0, + return { + TAG: "Node", + l: "Empty", v: x, d: Caml_option.valFromOption(data), - r: /* Empty */0, + r: "Empty", h: 1 }; } else { - return /* Empty */0; + return "Empty"; } } var r = m.r; @@ -512,7 +518,8 @@ function update(x, f, m) { if (d === data$2) { return m; } else { - return /* Node */{ + return { + TAG: "Node", l: l, v: x, d: data$2, @@ -540,7 +547,7 @@ function update(x, f, m) { function iter(f, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return ; } iter(f, param.l); @@ -551,13 +558,14 @@ function iter(f, _param) { } function map(f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var l$p = map(f, param.l); var d$p = Curry._1(f, param.d); var r$p = map(f, param.r); - return /* Node */{ + return { + TAG: "Node", l: l$p, v: param.v, d: d$p, @@ -567,14 +575,15 @@ function map(f, param) { } function mapi(f, param) { - if (/* tag */typeof param === "number") { - return /* Empty */0; + if (typeof param !== "object") { + return "Empty"; } var v = param.v; var l$p = mapi(f, param.l); var d$p = Curry._2(f, v, param.d); var r$p = mapi(f, param.r); - return /* Node */{ + return { + TAG: "Node", l: l$p, v: v, d: d$p, @@ -587,7 +596,7 @@ function fold(f, _m, _accu) { while(true) { var accu = _accu; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return accu; } _accu = Curry._3(f, m.v, m.d, fold(f, m.l, accu)); @@ -599,7 +608,7 @@ function fold(f, _m, _accu) { function for_all(p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return true; } if (!Curry._2(p, param.v, param.d)) { @@ -616,7 +625,7 @@ function for_all(p, _param) { function exists(p, _param) { while(true) { var param = _param; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return false; } if (Curry._2(p, param.v, param.d)) { @@ -631,7 +640,7 @@ function exists(p, _param) { } function add_min_binding(k, x, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton(k, x); } else { return bal(add_min_binding(k, x, param.l), param.v, param.d, param.r); @@ -639,7 +648,7 @@ function add_min_binding(k, x, param) { } function add_max_binding(k, x, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return singleton(k, x); } else { return bal(param.l, param.v, param.d, add_max_binding(k, x, param.r)); @@ -647,11 +656,11 @@ function add_max_binding(k, x, param) { } function join(l, v, d, r) { - if (/* tag */typeof l === "number") { + if (typeof l !== "object") { return add_min_binding(v, d, r); } var lh = l.h; - if (/* tag */typeof r === "number") { + if (typeof r !== "object") { return add_max_binding(v, d, l); } var rh = r.h; @@ -665,10 +674,10 @@ function join(l, v, d, r) { } function concat(t1, t2) { - if (/* tag */typeof t1 === "number") { + if (typeof t1 !== "object") { return t2; } - if (/* tag */typeof t2 === "number") { + if (typeof t2 !== "object") { return t1; } var match = min_binding(t2); @@ -684,11 +693,11 @@ function concat_or_join(t1, v, d, t2) { } function split(x, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, + "Empty", undefined, - /* Empty */0 + "Empty" ]; } var r = param.r; @@ -720,9 +729,9 @@ function split(x, param) { } function merge$1(f, s1, s2) { - if (/* tag */typeof s1 === "number") { - if (/* tag */typeof s2 === "number") { - return /* Empty */0; + if (typeof s1 !== "object") { + if (typeof s2 !== "object") { + return "Empty"; } } else { @@ -733,7 +742,7 @@ function merge$1(f, s1, s2) { } } - if (/* tag */typeof s2 === "number") { + if (typeof s2 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -750,12 +759,12 @@ function merge$1(f, s1, s2) { } function union(f, s1, s2) { - if (/* tag */typeof s1 === "number") { + if (typeof s1 !== "object") { return s2; } var d1 = s1.d; var v1 = s1.v; - if (/* tag */typeof s2 === "number") { + if (typeof s2 !== "object") { return s1; } var d2 = s2.d; @@ -783,8 +792,8 @@ function union(f, s1, s2) { } function filter(p, m) { - if (/* tag */typeof m === "number") { - return /* Empty */0; + if (typeof m !== "object") { + return "Empty"; } var r = m.r; var d = m.d; @@ -805,10 +814,10 @@ function filter(p, m) { } function partition(p, param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return [ - /* Empty */0, - /* Empty */0 + "Empty", + "Empty" ]; } var d = param.d; @@ -837,10 +846,11 @@ function cons_enum(_m, _e) { while(true) { var e = _e; var m = _m; - if (/* tag */typeof m === "number") { + if (typeof m !== "object") { return e; } - _e = /* More */{ + _e = { + TAG: "More", _0: m.v, _1: m.d, _2: m.r, @@ -852,19 +862,19 @@ function cons_enum(_m, _e) { } function compare(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + var _e1 = cons_enum(m1, "End"); + var _e2 = cons_enum(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return 0; } else { return -1; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return 1; } var c = Caml.int_compare(e1._0, e2._0); @@ -882,19 +892,19 @@ function compare(cmp, m1, m2) { } function equal(cmp, m1, m2) { - var _e1 = cons_enum(m1, /* End */0); - var _e2 = cons_enum(m2, /* End */0); + var _e1 = cons_enum(m1, "End"); + var _e2 = cons_enum(m2, "End"); while(true) { var e2 = _e2; var e1 = _e1; - if (/* tag */typeof e1 === "number") { - if (/* tag */typeof e2 === "number") { + if (typeof e1 !== "object") { + if (typeof e2 !== "object") { return true; } else { return false; } } - if (/* tag */typeof e2 === "number") { + if (typeof e2 !== "object") { return false; } if (e1._0 !== e2._0) { @@ -910,7 +920,7 @@ function equal(cmp, m1, m2) { } function cardinal(param) { - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return 0; } else { return (cardinal(param.l) + 1 | 0) + cardinal(param.r) | 0; @@ -921,7 +931,7 @@ function bindings_aux(_accu, _param) { while(true) { var param = _param; var accu = _accu; - if (/* tag */typeof param === "number") { + if (typeof param !== "object") { return accu; } _param = param.l; @@ -940,7 +950,7 @@ function bindings(s) { return bindings_aux(/* [] */0, s); } -var empty = /* Empty */0; +var empty = "Empty"; var choose = min_binding; diff --git a/jscomp/test/int_overflow_test.js b/jscomp/test/int_overflow_test.js index 39d4afdfe9..b5550ab687 100644 --- a/jscomp/test/int_overflow_test.js +++ b/jscomp/test/int_overflow_test.js @@ -42,7 +42,7 @@ Mt.from_pair_suites("Int_overflow_test", { "plus_overflow", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: (Int32.max_int + 1 | 0) === Int32.min_int }; @@ -53,7 +53,7 @@ Mt.from_pair_suites("Int_overflow_test", { "minus_overflow", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: (Int32.min_int - Int32.one | 0) === Int32.max_int }; @@ -64,7 +64,7 @@ Mt.from_pair_suites("Int_overflow_test", { "flow_again", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2147483646, _1: (Int32.max_int + Int32.max_int | 0) + Int32.min_int | 0 }; @@ -75,7 +75,7 @@ Mt.from_pair_suites("Int_overflow_test", { "flow_again", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -2, _1: Int32.max_int + Int32.max_int | 0 }; @@ -86,7 +86,7 @@ Mt.from_pair_suites("Int_overflow_test", { "hash_test", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: hash_variant("xxyyzzuuxxzzyy00112233"), _1: 544087776 }; @@ -97,7 +97,7 @@ Mt.from_pair_suites("Int_overflow_test", { "hash_test2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: hash_variant("xxyyzxzzyy"), _1: -449896130 }; @@ -108,7 +108,7 @@ Mt.from_pair_suites("Int_overflow_test", { "File \"int_overflow_test.ml\", line 37, characters 2-9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: hash_variant2("xxyyzzuuxxzzyy00112233"), _1: 544087776 }; @@ -119,7 +119,7 @@ Mt.from_pair_suites("Int_overflow_test", { "File \"int_overflow_test.ml\", line 38, characters 2-9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: hash_variant2("xxyyzxzzyy"), _1: -449896130 }; @@ -130,7 +130,7 @@ Mt.from_pair_suites("Int_overflow_test", { "int_literal_flow", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -1, _1: -1 }; @@ -141,7 +141,7 @@ Mt.from_pair_suites("Int_overflow_test", { "int_literal_flow2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -1, _1: -1 }; @@ -152,7 +152,7 @@ Mt.from_pair_suites("Int_overflow_test", { "int_literal_flow3", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -1, _1: -1 }; @@ -163,7 +163,7 @@ Mt.from_pair_suites("Int_overflow_test", { "int32_mul", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -33554431, _1: -33554431 }; @@ -174,7 +174,7 @@ Mt.from_pair_suites("Int_overflow_test", { "File \"int_overflow_test.ml\", line 44, characters 3-10", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Number("3") | 0, _1: 3 }; @@ -185,7 +185,7 @@ Mt.from_pair_suites("Int_overflow_test", { "File \"int_overflow_test.ml\", line 46, characters 3-10", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Number("3.2") | 0, _1: 3 }; diff --git a/jscomp/test/int_poly_var.js b/jscomp/test/int_poly_var.js index 85c4e9e757..211aa2d534 100644 --- a/jscomp/test/int_poly_var.js +++ b/jscomp/test/int_poly_var.js @@ -11,7 +11,7 @@ var suites = { }; function nest(x) { - if (x.TAG === /* A */0) { + if (x.TAG === "A") { var match = x._0; if (match === 0) { return 0; @@ -70,52 +70,52 @@ var hihi = f3(3, 0); var hh10 = "3" === 3; var tuple_0 = nest({ - TAG: /* A */0, + TAG: "A", _0: 0 }); var tuple_1 = nest({ - TAG: /* A */0, + TAG: "A", _0: 1 }); var tuple_2 = nest({ - TAG: /* A */0, + TAG: "A", _0: 2 }); var tuple_3 = nest({ - TAG: /* B */1, + TAG: "B", _0: 1, _1: 0 }); var tuple_4 = nest({ - TAG: /* B */1, + TAG: "B", _0: 1, _1: 1 }); var tuple_5 = nest({ - TAG: /* B */1, + TAG: "B", _0: 2, _1: 1 }); var tuple_6 = nest({ - TAG: /* B */1, + TAG: "B", _0: 2, _1: 2 }); var tuple_7 = nest({ - TAG: /* B */1, + TAG: "B", _0: 0, _1: 0 }); var tuple_8 = nest({ - TAG: /* B */1, + TAG: "B", _0: 0, _1: 1 }); diff --git a/jscomp/test/int_switch_test.js b/jscomp/test/int_switch_test.js index 6807d6fc28..1434c5ae75 100644 --- a/jscomp/test/int_switch_test.js +++ b/jscomp/test/int_switch_test.js @@ -50,13 +50,13 @@ function f22(x) { function f33(x) { var match = Curry._1(x, undefined); switch (match) { - case /* A */0 : + case "A" : return /* 'a' */97; - case /* B */1 : + case "B" : return /* 'b' */98; - case /* C */2 : + case "C" : return /* 'c' */99; - case /* D */3 : + case "D" : return /* 'x' */120; } diff --git a/jscomp/test/js_array_test.js b/jscomp/test/js_array_test.js index 338e7c7345..b887d59090 100644 --- a/jscomp/test/js_array_test.js +++ b/jscomp/test/js_array_test.js @@ -15,7 +15,7 @@ var suites_0 = [ 5 ]; return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 2, 4 @@ -39,7 +39,7 @@ var suites_1 = { 5 ]; return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: (Js_vector.filterInPlace((function (x) { return x > 10; @@ -52,7 +52,7 @@ var suites_1 = { "isArray_array", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Array.isArray([]) }; @@ -63,7 +63,7 @@ var suites_1 = { "isArray_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Array.isArray(34) }; @@ -74,7 +74,7 @@ var suites_1 = { "length", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: [ 1, @@ -89,7 +89,7 @@ var suites_1 = { "copyWithin", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 2, @@ -112,7 +112,7 @@ var suites_1 = { "copyWithinFrom", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 4, 5, @@ -135,7 +135,7 @@ var suites_1 = { "copyWithinFromRange", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 4, 2, @@ -158,7 +158,7 @@ var suites_1 = { "fillInPlace", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 4, 4, @@ -177,7 +177,7 @@ var suites_1 = { "fillFromInPlace", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 4, @@ -196,7 +196,7 @@ var suites_1 = { "fillRangeInPlace", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 4, @@ -215,7 +215,7 @@ var suites_1 = { "pop", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Caml_option.undefined_to_opt([ 1, @@ -230,7 +230,7 @@ var suites_1 = { "pop - empty array", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Caml_option.undefined_to_opt([].pop()) }; @@ -241,7 +241,7 @@ var suites_1 = { "push", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: [ 1, @@ -256,7 +256,7 @@ var suites_1 = { "pushMany", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 5, _1: [ 1, @@ -271,7 +271,7 @@ var suites_1 = { "reverseInPlace", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 3, 2, @@ -290,7 +290,7 @@ var suites_1 = { "shift", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: Caml_option.undefined_to_opt([ 1, @@ -305,7 +305,7 @@ var suites_1 = { "shift - empty array", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Caml_option.undefined_to_opt([].shift()) }; @@ -316,7 +316,7 @@ var suites_1 = { "sortInPlace", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 2, @@ -335,7 +335,7 @@ var suites_1 = { "sortInPlaceWith", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 3, 2, @@ -363,7 +363,7 @@ var suites_1 = { ]; var removed = arr.splice(2, 0, 5); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ 1, @@ -393,7 +393,7 @@ var suites_1 = { ]; var removed = arr.splice(2); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ 1, @@ -423,7 +423,7 @@ var suites_1 = { ]; var removed = arr.splice(2, 1); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ 1, @@ -444,7 +444,7 @@ var suites_1 = { "unshift", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: [ 1, @@ -459,7 +459,7 @@ var suites_1 = { "unshiftMany", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 5, _1: [ 1, @@ -474,7 +474,7 @@ var suites_1 = { "append", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 2, @@ -494,7 +494,7 @@ var suites_1 = { "concat", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 2, @@ -518,7 +518,7 @@ var suites_1 = { "concatMany", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 2, @@ -547,7 +547,7 @@ var suites_1 = { "includes", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: [ 1, @@ -562,7 +562,7 @@ var suites_1 = { "indexOf", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: [ 1, @@ -577,7 +577,7 @@ var suites_1 = { "indexOfFrom", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: [ 1, @@ -593,7 +593,7 @@ var suites_1 = { "join", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1,2,3", _1: [ 1, @@ -608,7 +608,7 @@ var suites_1 = { "joinWith", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1;2;3", _1: [ 1, @@ -623,7 +623,7 @@ var suites_1 = { "lastIndexOf", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: [ 1, @@ -638,7 +638,7 @@ var suites_1 = { "lastIndexOfFrom", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: [ 1, @@ -654,7 +654,7 @@ var suites_1 = { "slice", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 2, 3 @@ -674,7 +674,7 @@ var suites_1 = { "copy", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 2, @@ -697,7 +697,7 @@ var suites_1 = { "sliceFrom", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 3, 4, @@ -718,7 +718,7 @@ var suites_1 = { "toString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1,2,3", _1: [ 1, @@ -733,7 +733,7 @@ var suites_1 = { "toLocaleString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1,2,3", _1: [ 1, @@ -748,7 +748,7 @@ var suites_1 = { "every", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: [ 1, @@ -765,7 +765,7 @@ var suites_1 = { "everyi", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: [ 1, @@ -782,7 +782,7 @@ var suites_1 = { "filter", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 2, 4 @@ -803,7 +803,7 @@ var suites_1 = { "filteri", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1, 3 @@ -824,7 +824,7 @@ var suites_1 = { "find", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Caml_option.undefined_to_opt([ 1, @@ -842,7 +842,7 @@ var suites_1 = { "find - no match", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Caml_option.undefined_to_opt([ 1, @@ -860,7 +860,7 @@ var suites_1 = { "findi", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: Caml_option.undefined_to_opt([ 1, @@ -878,7 +878,7 @@ var suites_1 = { "findi - no match", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Caml_option.undefined_to_opt([ 1, @@ -896,7 +896,7 @@ var suites_1 = { "findIndex", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: [ 1, @@ -914,7 +914,7 @@ var suites_1 = { "findIndexi", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 0, _1: [ 1, @@ -942,7 +942,7 @@ var suites_1 = { sum.contents = sum.contents + n | 0; }); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 6, _1: sum.contents }; @@ -963,7 +963,7 @@ var suites_1 = { sum.contents = sum.contents + i | 0; }); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: sum.contents }; @@ -974,7 +974,7 @@ var suites_1 = { "map", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 2, 4, @@ -997,7 +997,7 @@ var suites_1 = { "map", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 0, 2, @@ -1020,7 +1020,7 @@ var suites_1 = { "reduce", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -10, _1: [ 1, @@ -1038,7 +1038,7 @@ var suites_1 = { "reducei", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -6, _1: [ 1, @@ -1056,7 +1056,7 @@ var suites_1 = { "reduceRight", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -10, _1: [ 1, @@ -1074,7 +1074,7 @@ var suites_1 = { "reduceRighti", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -6, _1: [ 1, @@ -1092,7 +1092,7 @@ var suites_1 = { "some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: [ 1, @@ -1110,7 +1110,7 @@ var suites_1 = { "somei", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: [ 1, diff --git a/jscomp/test/js_bool_test.js b/jscomp/test/js_bool_test.js index d61e1c7692..99b0baa4da 100644 --- a/jscomp/test/js_bool_test.js +++ b/jscomp/test/js_bool_test.js @@ -34,7 +34,7 @@ var suites_0 = [ "?bool_eq_caml_bool", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: u, _1: true }; @@ -46,7 +46,7 @@ var suites_1 = { "js_bool_eq_js_bool", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: v, _1: true }; @@ -57,7 +57,7 @@ var suites_1 = { "js_bool_neq_acml_bool", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true === true }; diff --git a/jscomp/test/js_cast_test.js b/jscomp/test/js_cast_test.js index 6bc8bde816..545c7639ad 100644 --- a/jscomp/test/js_cast_test.js +++ b/jscomp/test/js_cast_test.js @@ -25,7 +25,7 @@ function add_test(loc, test) { function eq(loc, x, y) { add_test(loc, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/js_date_test.js b/jscomp/test/js_date_test.js index 02c5d43fad..4fdbf7eb90 100644 --- a/jscomp/test/js_date_test.js +++ b/jscomp/test/js_date_test.js @@ -11,7 +11,7 @@ var suites_0 = [ "valueOf", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 195131516789, _1: new Date("1976-03-08T12:34:56.789+01:23").valueOf() }; @@ -23,7 +23,7 @@ var suites_1 = { "make", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: new Date().getTime() > 1487223505382 }; }) @@ -33,7 +33,7 @@ var suites_1 = { "parseAsFloat", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Date.parse("1976-03-08T12:34:56.789+01:23"), _1: 195131516789 }; @@ -44,7 +44,7 @@ var suites_1 = { "parseAsFloat_invalid", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: Number.isNaN(Date.parse("gibberish")) }; }) @@ -54,7 +54,7 @@ var suites_1 = { "fromFloat", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1976-03-08T11:11:56.789Z", _1: new Date(195131516789).toISOString() }; @@ -65,7 +65,7 @@ var suites_1 = { "fromString_valid", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 195131516789, _1: new Date("1976-03-08T12:34:56.789+01:23").getTime() }; @@ -76,7 +76,7 @@ var suites_1 = { "fromString_invalid", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: Number.isNaN(new Date("gibberish").getTime()) }; }) @@ -87,7 +87,7 @@ var suites_1 = { (function (param) { var d = new Date(1984, 4); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4 @@ -105,7 +105,7 @@ var suites_1 = { (function (param) { var d = new Date(1984, 4, 6); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -125,7 +125,7 @@ var suites_1 = { (function (param) { var d = new Date(1984, 4, 6, 3); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -147,7 +147,7 @@ var suites_1 = { (function (param) { var d = new Date(1984, 4, 6, 3, 59); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -171,7 +171,7 @@ var suites_1 = { (function (param) { var d = new Date(1984, 4, 6, 3, 59, 27); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -198,7 +198,7 @@ var suites_1 = { var d = Date.UTC(1984, 4); var d$1 = new Date(d); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4 @@ -217,7 +217,7 @@ var suites_1 = { var d = Date.UTC(1984, 4, 6); var d$1 = new Date(d); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -238,7 +238,7 @@ var suites_1 = { var d = Date.UTC(1984, 4, 6, 3); var d$1 = new Date(d); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -261,7 +261,7 @@ var suites_1 = { var d = Date.UTC(1984, 4, 6, 3, 59); var d$1 = new Date(d); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -286,7 +286,7 @@ var suites_1 = { var d = Date.UTC(1984, 4, 6, 3, 59, 27); var d$1 = new Date(d); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1984, 4, @@ -311,7 +311,7 @@ var suites_1 = { "getFullYear", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1976, _1: new Date("1976-03-08T12:34:56.789+01:23").getFullYear() }; @@ -322,7 +322,7 @@ var suites_1 = { "getMilliseconds", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 789, _1: new Date("1976-03-08T12:34:56.789+01:23").getMilliseconds() }; @@ -333,7 +333,7 @@ var suites_1 = { "getSeconds", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 56, _1: new Date("1976-03-08T12:34:56.789+01:23").getSeconds() }; @@ -344,7 +344,7 @@ var suites_1 = { "getTime", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 195131516789, _1: new Date("1976-03-08T12:34:56.789+01:23").getTime() }; @@ -355,7 +355,7 @@ var suites_1 = { "getUTCDate", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 8, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCDate() }; @@ -366,7 +366,7 @@ var suites_1 = { "getUTCDay", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCDay() }; @@ -377,7 +377,7 @@ var suites_1 = { "getUTCFUllYear", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1976, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCFullYear() }; @@ -388,7 +388,7 @@ var suites_1 = { "getUTCHours", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 11, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCHours() }; @@ -399,7 +399,7 @@ var suites_1 = { "getUTCMilliseconds", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 789, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMilliseconds() }; @@ -410,7 +410,7 @@ var suites_1 = { "getUTCMinutes", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 11, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMinutes() }; @@ -421,7 +421,7 @@ var suites_1 = { "getUTCMonth", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCMonth() }; @@ -432,7 +432,7 @@ var suites_1 = { "getUTCSeconds", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 56, _1: new Date("1976-03-08T12:34:56.789+01:23").getUTCSeconds() }; @@ -443,7 +443,7 @@ var suites_1 = { "getYear", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1976, _1: new Date("1976-03-08T12:34:56.789+01:23").getFullYear() }; @@ -456,7 +456,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setDate(12); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 12, _1: d.getDate() }; @@ -469,7 +469,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setFullYear(1986); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1986, _1: d.getFullYear() }; @@ -482,7 +482,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setFullYear(1986, 7); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1986, 7 @@ -501,7 +501,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setFullYear(1986, 7, 23); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1986, 7, @@ -522,7 +522,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setHours(22); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 22, _1: d.getHours() }; @@ -535,7 +535,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setHours(22, 48); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 22, 48 @@ -554,7 +554,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setHours(22, 48, 54); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 22, 48, @@ -575,7 +575,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMilliseconds(543); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 543, _1: d.getMilliseconds() }; @@ -588,7 +588,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMinutes(18); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 18, _1: d.getMinutes() }; @@ -601,7 +601,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMinutes(18, 42); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 18, 42 @@ -620,7 +620,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMinutes(18, 42, 311); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 18, 42, @@ -641,7 +641,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMonth(10); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 10, _1: d.getMonth() }; @@ -654,7 +654,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setMonth(10, 14); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 10, 14 @@ -673,7 +673,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setSeconds(36); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 36, _1: d.getSeconds() }; @@ -686,7 +686,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setSeconds(36, 420); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 36, 420 @@ -705,7 +705,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCDate(12); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 12, _1: d.getUTCDate() }; @@ -718,7 +718,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCFullYear(1986); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1986, _1: d.getUTCFullYear() }; @@ -731,7 +731,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCFullYear(1986, 7); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1986, 7 @@ -750,7 +750,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCFullYear(1986, 7, 23); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 1986, 7, @@ -771,7 +771,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCHours(22); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 22, _1: d.getUTCHours() }; @@ -784,7 +784,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCHours(22, 48); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 22, 48 @@ -803,7 +803,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCHours(22, 48, 54); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 22, 48, @@ -824,7 +824,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMilliseconds(543); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 543, _1: d.getUTCMilliseconds() }; @@ -837,7 +837,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMinutes(18); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 18, _1: d.getUTCMinutes() }; @@ -850,7 +850,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMinutes(18, 42); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 18, 42 @@ -869,7 +869,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMinutes(18, 42, 311); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 18, 42, @@ -890,7 +890,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMonth(10); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 10, _1: d.getUTCMonth() }; @@ -903,7 +903,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCMonth(10, 14); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 10, 14 @@ -922,7 +922,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCSeconds(36); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 36, _1: d.getUTCSeconds() }; @@ -935,7 +935,7 @@ var suites_1 = { var d = new Date("1976-03-08T12:34:56.789+01:23"); d.setUTCSeconds(36, 420); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 36, 420 @@ -952,7 +952,7 @@ var suites_1 = { "toDateString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "Mon Mar 08 1976", _1: new Date("1976-03-08T12:34:56.789+01:23").toDateString() }; @@ -963,7 +963,7 @@ var suites_1 = { "toGMTString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "Mon, 08 Mar 1976 11:11:56 GMT", _1: new Date("1976-03-08T12:34:56.789+01:23").toUTCString() }; @@ -974,7 +974,7 @@ var suites_1 = { "toISOString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1976-03-08T11:11:56.789Z", _1: new Date("1976-03-08T12:34:56.789+01:23").toISOString() }; @@ -985,7 +985,7 @@ var suites_1 = { "toJSON", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1976-03-08T11:11:56.789Z", _1: new Date("1976-03-08T12:34:56.789+01:23").toJSON() }; @@ -996,7 +996,7 @@ var suites_1 = { "toJSONUnsafe", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1976-03-08T11:11:56.789Z", _1: new Date("1976-03-08T12:34:56.789+01:23").toJSON() }; @@ -1007,7 +1007,7 @@ var suites_1 = { "toUTCString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "Mon, 08 Mar 1976 11:11:56 GMT", _1: new Date("1976-03-08T12:34:56.789+01:23").toUTCString() }; @@ -1021,7 +1021,7 @@ var suites_1 = { var b = new Date("2013-03-01T01:10:00"); var c = new Date("2013-03-01T01:10:01"); return { - TAG: /* Ok */4, + TAG: "Ok", _0: Caml_obj.equal(a, b) && Caml_obj.notequal(b, c) && Caml_obj.greaterthan(c, b) }; }) diff --git a/jscomp/test/js_dict_test.js b/jscomp/test/js_dict_test.js index 2d9176cbbe..172c2ada8c 100644 --- a/jscomp/test/js_dict_test.js +++ b/jscomp/test/js_dict_test.js @@ -14,7 +14,7 @@ var suites_0 = [ "empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [], _1: Object.keys({}) }; @@ -26,7 +26,7 @@ var suites_1 = { "get", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 43, _1: Js_dict.get({ foo: 43, @@ -40,7 +40,7 @@ var suites_1 = { "get - property not in object", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Js_dict.get({ foo: 43, @@ -54,7 +54,7 @@ var suites_1 = { "unsafe_get", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 43, _1: ({ foo: 43, @@ -73,7 +73,7 @@ var suites_1 = { }; o["foo"] = 36; return { - TAG: /* Eq */0, + TAG: "Eq", _0: 36, _1: Js_dict.get(o, "foo") }; @@ -84,7 +84,7 @@ var suites_1 = { "keys", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ "foo", "bar" @@ -101,7 +101,7 @@ var suites_1 = { "entries", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ "foo", @@ -124,7 +124,7 @@ var suites_1 = { "values", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ 43, 86 @@ -141,7 +141,7 @@ var suites_1 = { "fromList - []", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: {}, _1: Js_dict.fromList(/* [] */0) }; @@ -152,7 +152,7 @@ var suites_1 = { "fromList", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ "x", @@ -184,7 +184,7 @@ var suites_1 = { "fromArray - []", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: {}, _1: Js_dict.fromArray([]) }; @@ -195,7 +195,7 @@ var suites_1 = { "fromArray", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ [ "x", @@ -224,7 +224,7 @@ var suites_1 = { "map", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { foo: "43", bar: "86" diff --git a/jscomp/test/js_exception_catch_test.js b/jscomp/test/js_exception_catch_test.js index 8294cfb084..84a0a5dc61 100644 --- a/jscomp/test/js_exception_catch_test.js +++ b/jscomp/test/js_exception_catch_test.js @@ -29,7 +29,7 @@ function add_test(loc, test) { function eq(loc, x, y) { add_test(loc, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -39,7 +39,7 @@ function eq(loc, x, y) { function false_(loc) { add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -48,7 +48,7 @@ function false_(loc) { function true_(loc) { add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); @@ -67,7 +67,7 @@ catch (raw_x){ if (x.RE_EXN_ID === Js_exn.$$Error) { add_test("File \"js_exception_catch_test.ml\", line 21, characters 10-17", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); @@ -79,7 +79,7 @@ catch (raw_x){ if (exit === 1) { add_test("File \"js_exception_catch_test.ml\", line 22, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); diff --git a/jscomp/test/js_float_test.js b/jscomp/test/js_float_test.js index c7165db570..b4435418a3 100644 --- a/jscomp/test/js_float_test.js +++ b/jscomp/test/js_float_test.js @@ -7,7 +7,7 @@ var suites_0 = [ "_NaN <> _NaN", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: NaN === NaN }; @@ -19,7 +19,7 @@ var suites_1 = { "isNaN - _NaN", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Number.isNaN(NaN) }; @@ -30,7 +30,7 @@ var suites_1 = { "isNaN - 0.", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Number.isNaN(0) }; @@ -41,7 +41,7 @@ var suites_1 = { "isFinite - infinity", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Number.isFinite(Pervasives.infinity) }; @@ -52,7 +52,7 @@ var suites_1 = { "isFinite - neg_infinity", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Number.isFinite(Pervasives.neg_infinity) }; @@ -63,7 +63,7 @@ var suites_1 = { "isFinite - _NaN", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Number.isFinite(NaN) }; @@ -74,7 +74,7 @@ var suites_1 = { "isFinite - 0.", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Number.isFinite(0) }; @@ -85,7 +85,7 @@ var suites_1 = { "toExponential", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.23456e+2", _1: (123.456).toExponential() }; @@ -96,7 +96,7 @@ var suites_1 = { "toExponential - large number", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2e+21", _1: (1.2e21).toExponential() }; @@ -107,7 +107,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.23e+2", _1: (123.456).toExponential(2) }; @@ -118,7 +118,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:4", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2346e+2", _1: (123.456).toExponential(4) }; @@ -129,7 +129,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:20", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "0.00000000000000000000e+0", _1: (0).toExponential(20) }; @@ -140,7 +140,7 @@ var suites_1 = { "File \"js_float_test.ml\", line 31, characters 3-10", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toExponential(101); }) @@ -152,7 +152,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toExponential(-1); }) @@ -164,7 +164,7 @@ var suites_1 = { "toFixed", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123", _1: (123.456).toFixed() }; @@ -175,7 +175,7 @@ var suites_1 = { "toFixed - large number", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2e+21", _1: (1.2e21).toFixed() }; @@ -186,7 +186,7 @@ var suites_1 = { "toFixedWithPrecision - digits:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123.46", _1: (123.456).toFixed(2) }; @@ -197,7 +197,7 @@ var suites_1 = { "toFixedWithPrecision - digits:4", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123.4560", _1: (123.456).toFixed(4) }; @@ -208,7 +208,7 @@ var suites_1 = { "toFixedWithPrecision - digits:20", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "0.00000000000000000000", _1: (0).toFixed(20) }; @@ -219,7 +219,7 @@ var suites_1 = { "toFixedWithPrecision - digits:101", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toFixed(101); }) @@ -231,7 +231,7 @@ var suites_1 = { "toFixedWithPrecision - digits:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toFixed(-1); }) @@ -243,7 +243,7 @@ var suites_1 = { "toPrecision", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123.456", _1: (123.456).toPrecision() }; @@ -254,7 +254,7 @@ var suites_1 = { "toPrecision - large number", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2e+21", _1: (1.2e21).toPrecision() }; @@ -265,7 +265,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2e+2", _1: (123.456).toPrecision(2) }; @@ -276,7 +276,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:4", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123.5", _1: (123.456).toPrecision(4) }; @@ -287,7 +287,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:20", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "0.0000000000000000000", _1: (0).toPrecision(20) }; @@ -298,7 +298,7 @@ var suites_1 = { "File \"js_float_test.ml\", line 61, characters 3-10", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toPrecision(101); }) @@ -310,7 +310,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toPrecision(-1); }) @@ -322,7 +322,7 @@ var suites_1 = { "toString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.23", _1: (1.23).toString() }; @@ -333,7 +333,7 @@ var suites_1 = { "toString - large number", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2e+21", _1: (1.2e21).toString() }; @@ -344,7 +344,7 @@ var suites_1 = { "toStringWithRadix - radix:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1111011.0111010010111100011010100111111011111001110111", _1: (123.456).toString(2) }; @@ -355,7 +355,7 @@ var suites_1 = { "toStringWithRadix - radix:16", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "7b.74bc6a7ef9dc", _1: (123.456).toString(16) }; @@ -366,7 +366,7 @@ var suites_1 = { "toStringWithRadix - radix:36", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "3f", _1: (123).toString(36) }; @@ -377,7 +377,7 @@ var suites_1 = { "toStringWithRadix - radix:37", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toString(37); }) @@ -389,7 +389,7 @@ var suites_1 = { "toStringWithRadix - radix:1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toString(1); }) @@ -401,7 +401,7 @@ var suites_1 = { "toStringWithRadix - radix:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toString(-1); }) @@ -413,7 +413,7 @@ var suites_1 = { "fromString - 123", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 123, _1: Number("123") }; @@ -424,7 +424,7 @@ var suites_1 = { "fromString - 12.3", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 12.3, _1: Number("12.3") }; @@ -435,7 +435,7 @@ var suites_1 = { "fromString - empty string", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 0, _1: Number("") }; @@ -446,7 +446,7 @@ var suites_1 = { "fromString - 0x11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 17, _1: Number("0x11") }; @@ -457,7 +457,7 @@ var suites_1 = { "fromString - 0b11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Number("0b11") }; @@ -468,7 +468,7 @@ var suites_1 = { "fromString - 0o11", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 9, _1: Number("0o11") }; @@ -479,7 +479,7 @@ var suites_1 = { "fromString - invalid string", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Number.isNaN(Number("foo")) }; diff --git a/jscomp/test/js_global_test.js b/jscomp/test/js_global_test.js index 8b8f4d0eb9..86a255995e 100644 --- a/jscomp/test/js_global_test.js +++ b/jscomp/test/js_global_test.js @@ -10,7 +10,7 @@ var suites_0 = [ }), 0); clearTimeout(handle); return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; }) @@ -25,7 +25,7 @@ var suites_1 = { }), 0); clearInterval(handle); return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; }) @@ -35,7 +35,7 @@ var suites_1 = { "encodeURI", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: encodeURI("[-=-]"), _1: "%5B-=-%5D" }; @@ -46,7 +46,7 @@ var suites_1 = { "decodeURI", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: decodeURI("%5B-=-%5D"), _1: "[-=-]" }; @@ -57,7 +57,7 @@ var suites_1 = { "encodeURIComponent", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: encodeURIComponent("[-=-]"), _1: "%5B-%3D-%5D" }; @@ -68,7 +68,7 @@ var suites_1 = { "decodeURIComponent", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: decodeURIComponent("%5B-%3D-%5D"), _1: "[-=-]" }; diff --git a/jscomp/test/js_int_test.js b/jscomp/test/js_int_test.js index 5bcf654c0b..ae1b2d31fe 100644 --- a/jscomp/test/js_int_test.js +++ b/jscomp/test/js_int_test.js @@ -6,7 +6,7 @@ var suites_0 = [ "toExponential", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.23456e+5", _1: (123456).toExponential() }; @@ -18,7 +18,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.23e+5", _1: (123456).toExponential(2) }; @@ -29,7 +29,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:4", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2346e+5", _1: (123456).toExponential(4) }; @@ -40,7 +40,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:20", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "0.00000000000000000000e+0", _1: (0).toExponential(20) }; @@ -51,7 +51,7 @@ var suites_1 = { "File \"js_int_test.ml\", line 12, characters 3-10", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toExponential(101); }) @@ -63,7 +63,7 @@ var suites_1 = { "toExponentialWithPrecision - digits:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toExponential(-1); }) @@ -75,7 +75,7 @@ var suites_1 = { "toPrecision", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123456", _1: (123456).toPrecision() }; @@ -86,7 +86,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.2e+5", _1: (123456).toPrecision(2) }; @@ -97,7 +97,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:4", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1.235e+5", _1: (123456).toPrecision(4) }; @@ -108,7 +108,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:20", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "0.0000000000000000000", _1: (0).toPrecision(20) }; @@ -119,7 +119,7 @@ var suites_1 = { "File \"js_int_test.ml\", line 25, characters 3-10", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toPrecision(101); }) @@ -131,7 +131,7 @@ var suites_1 = { "toPrecisionWithPrecision - digits:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toPrecision(-1); }) @@ -143,7 +143,7 @@ var suites_1 = { "toString", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "123", _1: (123).toString() }; @@ -154,7 +154,7 @@ var suites_1 = { "toStringWithRadix - radix:2", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "11110001001000000", _1: (123456).toString(2) }; @@ -165,7 +165,7 @@ var suites_1 = { "toStringWithRadix - radix:16", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "1e240", _1: (123456).toString(16) }; @@ -176,7 +176,7 @@ var suites_1 = { "toStringWithRadix - radix:36", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "2n9c", _1: (123456).toString(36) }; @@ -187,7 +187,7 @@ var suites_1 = { "toStringWithRadix - radix:37", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toString(37); }) @@ -199,7 +199,7 @@ var suites_1 = { "toStringWithRadix - radix:1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toString(1); }) @@ -211,7 +211,7 @@ var suites_1 = { "toStringWithRadix - radix:-1", (function (param) { return { - TAG: /* ThrowAny */7, + TAG: "ThrowAny", _0: (function (param) { (0).toString(-1); }) diff --git a/jscomp/test/js_json_test.js b/jscomp/test/js_json_test.js index 64359ede10..65db2c777f 100644 --- a/jscomp/test/js_json_test.js +++ b/jscomp/test/js_json_test.js @@ -32,7 +32,7 @@ function add_test(loc, test) { function eq(loc, x, y) { add_test(loc, (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -42,7 +42,7 @@ function eq(loc, x, y) { function false_(loc) { add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -51,7 +51,7 @@ function false_(loc) { function true_(loc) { add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); @@ -61,41 +61,41 @@ var v = JSON.parse(" { \"x\" : [1, 2, 3 ] } "); add_test("File \"js_json_test.ml\", line 24, characters 11-18", (function (param) { var ty = Js_json.classify(v); - if (/* tag */typeof ty === "number") { + if (typeof ty !== "object") { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; } - if (ty.TAG !== /* JSONObject */2) { + if (ty.TAG !== "JSONObject") { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; } var v$1 = Js_dict.get(ty._0, "x"); if (v$1 === undefined) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; } var ty2 = Js_json.classify(Caml_option.valFromOption(v$1)); - if (/* tag */typeof ty2 === "number") { + if (typeof ty2 !== "object") { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; } - if (ty2.TAG !== /* JSONArray */3) { + if (ty2.TAG !== "JSONArray") { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; } ty2._0.forEach(function (x) { var ty3 = Js_json.classify(x); - if (/* tag */typeof ty3 === "number") { + if (typeof ty3 !== "object") { throw { RE_EXN_ID: "Assert_failure", _1: [ @@ -106,7 +106,7 @@ add_test("File \"js_json_test.ml\", line 24, characters 11-18", (function (param Error: new Error() }; } - if (ty3.TAG === /* JSONNumber */1) { + if (ty3.TAG === "JSONNumber") { return ; } throw { @@ -120,22 +120,22 @@ add_test("File \"js_json_test.ml\", line 24, characters 11-18", (function (param }; }); return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); -eq("File \"js_json_test.ml\", line 49, characters 5-12", Js_json.test(v, /* Object */2), true); +eq("File \"js_json_test.ml\", line 49, characters 5-12", Js_json.test(v, "Object"), true); var json = JSON.parse(JSON.stringify(null)); var ty = Js_json.classify(json); -if (/* tag */typeof ty === "number") { - if (ty === /* JSONNull */2) { +if (typeof ty !== "object") { + if (ty === "JSONNull") { add_test("File \"js_json_test.ml\", line 55, characters 24-31", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); @@ -143,7 +143,7 @@ if (/* tag */typeof ty === "number") { console.log(ty); add_test("File \"js_json_test.ml\", line 56, characters 27-34", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -152,7 +152,7 @@ if (/* tag */typeof ty === "number") { console.log(ty); add_test("File \"js_json_test.ml\", line 56, characters 27-34", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -162,19 +162,19 @@ var json$1 = JSON.parse(JSON.stringify("test string")); var ty$1 = Js_json.classify(json$1); -if (/* tag */typeof ty$1 === "number") { +if (typeof ty$1 !== "object") { add_test("File \"js_json_test.ml\", line 66, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); -} else if (ty$1.TAG === /* JSONString */0) { +} else if (ty$1.TAG === "JSONString") { eq("File \"js_json_test.ml\", line 65, characters 25-32", ty$1._0, "test string"); } else { add_test("File \"js_json_test.ml\", line 66, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -186,7 +186,7 @@ var ty$2 = Js_json.classify(json$2); var exit = 0; -if (/* tag */typeof ty$2 === "number" || ty$2.TAG !== /* JSONNumber */1) { +if (typeof ty$2 !== "object" || ty$2.TAG !== "JSONNumber") { exit = 1; } else { eq("File \"js_json_test.ml\", line 75, characters 25-32", ty$2._0, 1.23456789); @@ -195,7 +195,7 @@ if (/* tag */typeof ty$2 === "number" || ty$2.TAG !== /* JSONNumber */1) { if (exit === 1) { add_test("File \"js_json_test.ml\", line 76, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -207,7 +207,7 @@ var ty$3 = Js_json.classify(json$3); var exit$1 = 0; -if (/* tag */typeof ty$3 === "number" || ty$3.TAG !== /* JSONNumber */1) { +if (typeof ty$3 !== "object" || ty$3.TAG !== "JSONNumber") { exit$1 = 1; } else { eq("File \"js_json_test.ml\", line 85, characters 25-32", ty$3._0 | 0, -1347440721); @@ -216,7 +216,7 @@ if (/* tag */typeof ty$3 === "number" || ty$3.TAG !== /* JSONNumber */1) { if (exit$1 === 1) { add_test("File \"js_json_test.ml\", line 86, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -225,23 +225,23 @@ if (exit$1 === 1) { function test(v) { var json = JSON.parse(JSON.stringify(v)); var ty = Js_json.classify(json); - if (/* tag */typeof ty !== "number") { + if (typeof ty === "object") { return add_test("File \"js_json_test.ml\", line 97, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } switch (ty) { - case /* JSONFalse */0 : + case "JSONFalse" : return eq("File \"js_json_test.ml\", line 96, characters 25-32", false, v); - case /* JSONTrue */1 : + case "JSONTrue" : return eq("File \"js_json_test.ml\", line 95, characters 24-31", true, v); default: return add_test("File \"js_json_test.ml\", line 97, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -277,45 +277,45 @@ var json$4 = JSON.parse(JSON.stringify(dict)); var ty$4 = Js_json.classify(json$4); -if (/* tag */typeof ty$4 === "number") { +if (typeof ty$4 !== "object") { add_test("File \"js_json_test.ml\", line 135, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); -} else if (ty$4.TAG === /* JSONObject */2) { +} else if (ty$4.TAG === "JSONObject") { var x = ty$4._0; var ta = Js_json.classify(option_get(Js_dict.get(x, "a"))); - if (/* tag */typeof ta === "number") { + if (typeof ta !== "object") { add_test("File \"js_json_test.ml\", line 133, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ta.TAG === /* JSONString */0) { + } else if (ta.TAG === "JSONString") { if (ta._0 !== "test string") { add_test("File \"js_json_test.ml\", line 124, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } else { var ty$5 = Js_json.classify(option_get(Js_dict.get(x, "b"))); - if (/* tag */typeof ty$5 === "number") { + if (typeof ty$5 !== "object") { add_test("File \"js_json_test.ml\", line 131, characters 22-29", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$5.TAG === /* JSONNumber */1) { + } else if (ty$5.TAG === "JSONNumber") { var b = ty$5._0; add_test("File \"js_json_test.ml\", line 130, characters 19-26", (function (param) { return { - TAG: /* Approx */5, + TAG: "Approx", _0: 123.0, _1: b }; @@ -323,7 +323,7 @@ if (/* tag */typeof ty$4 === "number") { } else { add_test("File \"js_json_test.ml\", line 131, characters 22-29", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -332,7 +332,7 @@ if (/* tag */typeof ty$4 === "number") { } else { add_test("File \"js_json_test.ml\", line 133, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -340,7 +340,7 @@ if (/* tag */typeof ty$4 === "number") { } else { add_test("File \"js_json_test.ml\", line 135, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -348,131 +348,131 @@ if (/* tag */typeof ty$4 === "number") { function eq_at_i(loc, json, i, kind, expected) { var ty = Js_json.classify(json); - if (/* tag */typeof ty === "number") { + if (typeof ty !== "object") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } - if (ty.TAG !== /* JSONArray */3) { + if (ty.TAG !== "JSONArray") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } var ty$1 = Js_json.classify(Caml_array.get(ty._0, i)); switch (kind) { - case /* String */0 : - if (/* tag */typeof ty$1 === "number") { + case "String" : + if (typeof ty$1 !== "object") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$1.TAG === /* JSONString */0) { + } else if (ty$1.TAG === "JSONString") { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } - case /* Number */1 : - if (/* tag */typeof ty$1 === "number") { + case "Number" : + if (typeof ty$1 !== "object") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$1.TAG === /* JSONNumber */1) { + } else if (ty$1.TAG === "JSONNumber") { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } - case /* Object */2 : - if (/* tag */typeof ty$1 === "number") { + case "Object" : + if (typeof ty$1 !== "object") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$1.TAG === /* JSONObject */2) { + } else if (ty$1.TAG === "JSONObject") { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } - case /* Array */3 : - if (/* tag */typeof ty$1 === "number") { + case "Array" : + if (typeof ty$1 !== "object") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$1.TAG === /* JSONArray */3) { + } else if (ty$1.TAG === "JSONArray") { return eq(loc, ty$1._0, expected); } else { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } - case /* Boolean */4 : - if (/* tag */typeof ty$1 !== "number") { + case "Boolean" : + if (typeof ty$1 === "object") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } switch (ty$1) { - case /* JSONFalse */0 : + case "JSONFalse" : return eq(loc, false, expected); - case /* JSONTrue */1 : + case "JSONTrue" : return eq(loc, true, expected); default: return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); } - case /* Null */5 : - if (/* tag */typeof ty$1 === "number") { - if (ty$1 === /* JSONNull */2) { + case "Null" : + if (typeof ty$1 !== "object") { + if (ty$1 === "JSONNull") { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); } else { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -480,7 +480,7 @@ function eq_at_i(loc, json, i, kind, expected) { } else { return add_test(loc, (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -497,11 +497,11 @@ var json$5 = JSON.parse(JSON.stringify($$Array.map((function (prim) { "string 2" ]))); -eq_at_i("File \"js_json_test.ml\", line 194, characters 10-17", json$5, 0, /* String */0, "string 0"); +eq_at_i("File \"js_json_test.ml\", line 194, characters 10-17", json$5, 0, "String", "string 0"); -eq_at_i("File \"js_json_test.ml\", line 195, characters 10-17", json$5, 1, /* String */0, "string 1"); +eq_at_i("File \"js_json_test.ml\", line 195, characters 10-17", json$5, 1, "String", "string 1"); -eq_at_i("File \"js_json_test.ml\", line 196, characters 10-17", json$5, 2, /* String */0, "string 2"); +eq_at_i("File \"js_json_test.ml\", line 196, characters 10-17", json$5, 2, "String", "string 2"); var json$6 = JSON.parse(JSON.stringify([ "string 0", @@ -509,11 +509,11 @@ var json$6 = JSON.parse(JSON.stringify([ "string 2" ])); -eq_at_i("File \"js_json_test.ml\", line 206, characters 10-17", json$6, 0, /* String */0, "string 0"); +eq_at_i("File \"js_json_test.ml\", line 206, characters 10-17", json$6, 0, "String", "string 0"); -eq_at_i("File \"js_json_test.ml\", line 207, characters 10-17", json$6, 1, /* String */0, "string 1"); +eq_at_i("File \"js_json_test.ml\", line 207, characters 10-17", json$6, 1, "String", "string 1"); -eq_at_i("File \"js_json_test.ml\", line 208, characters 10-17", json$6, 2, /* String */0, "string 2"); +eq_at_i("File \"js_json_test.ml\", line 208, characters 10-17", json$6, 2, "String", "string 2"); var a = [ 1.0000001, @@ -523,11 +523,11 @@ var a = [ var json$7 = JSON.parse(JSON.stringify(a)); -eq_at_i("File \"js_json_test.ml\", line 220, characters 10-17", json$7, 0, /* Number */1, Caml_array.get(a, 0)); +eq_at_i("File \"js_json_test.ml\", line 220, characters 10-17", json$7, 0, "Number", Caml_array.get(a, 0)); -eq_at_i("File \"js_json_test.ml\", line 221, characters 10-17", json$7, 1, /* Number */1, Caml_array.get(a, 1)); +eq_at_i("File \"js_json_test.ml\", line 221, characters 10-17", json$7, 1, "Number", Caml_array.get(a, 1)); -eq_at_i("File \"js_json_test.ml\", line 222, characters 10-17", json$7, 2, /* Number */1, Caml_array.get(a, 2)); +eq_at_i("File \"js_json_test.ml\", line 222, characters 10-17", json$7, 2, "Number", Caml_array.get(a, 2)); var a$1 = [ 0, @@ -539,11 +539,11 @@ var json$8 = JSON.parse(JSON.stringify($$Array.map((function (prim) { return prim; }), a$1))); -eq_at_i("File \"js_json_test.ml\", line 235, characters 10-17", json$8, 0, /* Number */1, Caml_array.get(a$1, 0)); +eq_at_i("File \"js_json_test.ml\", line 235, characters 10-17", json$8, 0, "Number", Caml_array.get(a$1, 0)); -eq_at_i("File \"js_json_test.ml\", line 236, characters 10-17", json$8, 1, /* Number */1, Caml_array.get(a$1, 1)); +eq_at_i("File \"js_json_test.ml\", line 236, characters 10-17", json$8, 1, "Number", Caml_array.get(a$1, 1)); -eq_at_i("File \"js_json_test.ml\", line 237, characters 10-17", json$8, 2, /* Number */1, Caml_array.get(a$1, 2)); +eq_at_i("File \"js_json_test.ml\", line 237, characters 10-17", json$8, 2, "Number", Caml_array.get(a$1, 2)); var a$2 = [ true, @@ -553,11 +553,11 @@ var a$2 = [ var json$9 = JSON.parse(JSON.stringify(a$2)); -eq_at_i("File \"js_json_test.ml\", line 249, characters 10-17", json$9, 0, /* Boolean */4, Caml_array.get(a$2, 0)); +eq_at_i("File \"js_json_test.ml\", line 249, characters 10-17", json$9, 0, "Boolean", Caml_array.get(a$2, 0)); -eq_at_i("File \"js_json_test.ml\", line 250, characters 10-17", json$9, 1, /* Boolean */4, Caml_array.get(a$2, 1)); +eq_at_i("File \"js_json_test.ml\", line 250, characters 10-17", json$9, 1, "Boolean", Caml_array.get(a$2, 1)); -eq_at_i("File \"js_json_test.ml\", line 251, characters 10-17", json$9, 2, /* Boolean */4, Caml_array.get(a$2, 2)); +eq_at_i("File \"js_json_test.ml\", line 251, characters 10-17", json$9, 2, "Boolean", Caml_array.get(a$2, 2)); function make_d(s, i) { var d = {}; @@ -575,37 +575,37 @@ var json$10 = JSON.parse(JSON.stringify(a$3)); var ty$6 = Js_json.classify(json$10); -if (/* tag */typeof ty$6 === "number") { +if (typeof ty$6 !== "object") { add_test("File \"js_json_test.ml\", line 283, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); -} else if (ty$6.TAG === /* JSONArray */3) { +} else if (ty$6.TAG === "JSONArray") { var ty$7 = Js_json.classify(Caml_array.get(ty$6._0, 1)); - if (/* tag */typeof ty$7 === "number") { + if (typeof ty$7 !== "object") { add_test("File \"js_json_test.ml\", line 281, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$7.TAG === /* JSONObject */2) { + } else if (ty$7.TAG === "JSONObject") { var ty$8 = Js_json.classify(option_get(Js_dict.get(ty$7._0, "a"))); - if (/* tag */typeof ty$8 === "number") { + if (typeof ty$8 !== "object") { add_test("File \"js_json_test.ml\", line 279, characters 20-27", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); - } else if (ty$8.TAG === /* JSONString */0) { + } else if (ty$8.TAG === "JSONString") { eq("File \"js_json_test.ml\", line 278, characters 34-41", ty$8._0, "bbb"); } else { add_test("File \"js_json_test.ml\", line 279, characters 20-27", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -613,7 +613,7 @@ if (/* tag */typeof ty$6 === "number") { } else { add_test("File \"js_json_test.ml\", line 281, characters 18-25", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -621,7 +621,7 @@ if (/* tag */typeof ty$6 === "number") { } else { add_test("File \"js_json_test.ml\", line 283, characters 16-23", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -631,7 +631,7 @@ try { JSON.parse("{{ A}"); add_test("File \"js_json_test.ml\", line 289, characters 11-18", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: false }; })); @@ -639,7 +639,7 @@ try { catch (exn){ add_test("File \"js_json_test.ml\", line 292, characters 10-17", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; })); diff --git a/jscomp/test/js_list_test.js b/jscomp/test/js_list_test.js index f1794c7245..ef5d5dff59 100644 --- a/jscomp/test/js_list_test.js +++ b/jscomp/test/js_list_test.js @@ -19,7 +19,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/js_math_test.js b/jscomp/test/js_math_test.js index 6f54f17e0c..9d35ca4163 100644 --- a/jscomp/test/js_math_test.js +++ b/jscomp/test/js_math_test.js @@ -7,7 +7,7 @@ var suites_0 = [ "_E", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 2.718, _2: Math.E @@ -20,7 +20,7 @@ var suites_1 = { "_LN2", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.693, _2: Math.LN2 @@ -32,7 +32,7 @@ var suites_1 = { "_LN10", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 2.303, _2: Math.LN10 @@ -44,7 +44,7 @@ var suites_1 = { "_LOG2E", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 1.443, _2: Math.LOG2E @@ -56,7 +56,7 @@ var suites_1 = { "_LOG10E", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.434, _2: Math.LOG10E @@ -68,7 +68,7 @@ var suites_1 = { "_PI", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.00001, _1: 3.14159, _2: Math.PI @@ -80,7 +80,7 @@ var suites_1 = { "_SQRT1_2", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.707, _2: Math.SQRT1_2 @@ -92,7 +92,7 @@ var suites_1 = { "_SQRT2", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 1.414, _2: Math.SQRT2 @@ -104,7 +104,7 @@ var suites_1 = { "abs_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.abs(-4) }; @@ -115,7 +115,7 @@ var suites_1 = { "abs_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 1.2, _1: Math.abs(-1.2) }; @@ -126,7 +126,7 @@ var suites_1 = { "acos", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 1.159, _2: Math.acos(0.4) @@ -138,7 +138,7 @@ var suites_1 = { "acosh", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.622, _2: Math.acosh(1.2) @@ -150,7 +150,7 @@ var suites_1 = { "asin", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.411, _2: Math.asin(0.4) @@ -162,7 +162,7 @@ var suites_1 = { "asinh", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.390, _2: Math.asinh(0.4) @@ -174,7 +174,7 @@ var suites_1 = { "atan", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.380, _2: Math.atan(0.4) @@ -186,7 +186,7 @@ var suites_1 = { "atanh", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.423, _2: Math.atanh(0.4) @@ -198,7 +198,7 @@ var suites_1 = { "atan2", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.588, _2: Math.atan2(0.4, 0.6) @@ -210,7 +210,7 @@ var suites_1 = { "cbrt", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Math.cbrt(8) }; @@ -221,7 +221,7 @@ var suites_1 = { "unsafe_ceil_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.ceil(3.2) }; @@ -232,7 +232,7 @@ var suites_1 = { "ceil_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Js_math.ceil_int(3.2) }; @@ -243,7 +243,7 @@ var suites_1 = { "ceil_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.ceil(3.2) }; @@ -254,7 +254,7 @@ var suites_1 = { "cos", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.921, _2: Math.cos(0.4) @@ -266,7 +266,7 @@ var suites_1 = { "cosh", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 1.081, _2: Math.cosh(0.4) @@ -278,7 +278,7 @@ var suites_1 = { "exp", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 1.491, _2: Math.exp(0.4) @@ -290,7 +290,7 @@ var suites_1 = { "expm1", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.491, _2: Math.expm1(0.4) @@ -302,7 +302,7 @@ var suites_1 = { "unsafe_floor_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Math.floor(3.2) }; @@ -313,7 +313,7 @@ var suites_1 = { "floor_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Js_math.floor_int(3.2) }; @@ -324,7 +324,7 @@ var suites_1 = { "floor_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Math.floor(3.2) }; @@ -335,7 +335,7 @@ var suites_1 = { "fround", (function (param) { return { - TAG: /* Approx */5, + TAG: "Approx", _0: 3.2, _1: Math.fround(3.2) }; @@ -346,7 +346,7 @@ var suites_1 = { "hypot", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.721, _2: Math.hypot(0.4, 0.6) @@ -358,7 +358,7 @@ var suites_1 = { "hypotMany", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 1.077, _2: Math.hypot(0.4, 0.6, 0.8) @@ -370,7 +370,7 @@ var suites_1 = { "imul", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 8, _1: Math.imul(4, 2) }; @@ -381,7 +381,7 @@ var suites_1 = { "log", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: -0.916, _2: Math.log(0.4) @@ -393,7 +393,7 @@ var suites_1 = { "log1p", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.336, _2: Math.log1p(0.4) @@ -405,7 +405,7 @@ var suites_1 = { "log10", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: -0.397, _2: Math.log10(0.4) @@ -417,7 +417,7 @@ var suites_1 = { "log2", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: -1.321, _2: Math.log2(0.4) @@ -429,7 +429,7 @@ var suites_1 = { "max_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.max(2, 4) }; @@ -440,7 +440,7 @@ var suites_1 = { "maxMany_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.max(2, 4, 3) }; @@ -451,7 +451,7 @@ var suites_1 = { "max_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4.2, _1: Math.max(2.7, 4.2) }; @@ -462,7 +462,7 @@ var suites_1 = { "maxMany_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4.2, _1: Math.max(2.7, 4.2, 3.9) }; @@ -473,7 +473,7 @@ var suites_1 = { "min_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Math.min(2, 4) }; @@ -484,7 +484,7 @@ var suites_1 = { "minMany_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Math.min(2, 4, 3) }; @@ -495,7 +495,7 @@ var suites_1 = { "min_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2.7, _1: Math.min(2.7, 4.2) }; @@ -506,7 +506,7 @@ var suites_1 = { "minMany_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2.7, _1: Math.min(2.7, 4.2, 3.9) }; @@ -518,7 +518,7 @@ var suites_1 = { (function (param) { var a = Math.random(); return { - TAG: /* Ok */4, + TAG: "Ok", _0: a >= 0 && a < 1 }; }) @@ -529,7 +529,7 @@ var suites_1 = { (function (param) { var a = Js_math.random_int(1, 3); return { - TAG: /* Ok */4, + TAG: "Ok", _0: a >= 1 && a < 3 }; }) @@ -539,7 +539,7 @@ var suites_1 = { "unsafe_round", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Math.round(3.2) }; @@ -550,7 +550,7 @@ var suites_1 = { "round", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Math.round(3.2) }; @@ -561,7 +561,7 @@ var suites_1 = { "sign_int", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -1, _1: Math.sign(-4) }; @@ -572,7 +572,7 @@ var suites_1 = { "sign_float", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -1, _1: Math.sign(-4.2) }; @@ -583,7 +583,7 @@ var suites_1 = { "sign_float -0", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: -0, _1: Math.sign(-0) }; @@ -594,7 +594,7 @@ var suites_1 = { "sin", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.389, _2: Math.sin(0.4) @@ -606,7 +606,7 @@ var suites_1 = { "sinh", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.410, _2: Math.sinh(0.4) @@ -618,7 +618,7 @@ var suites_1 = { "sqrt", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.632, _2: Math.sqrt(0.4) @@ -630,7 +630,7 @@ var suites_1 = { "tan", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.422, _2: Math.tan(0.4) @@ -642,7 +642,7 @@ var suites_1 = { "tanh", (function (param) { return { - TAG: /* ApproxThreshold */6, + TAG: "ApproxThreshold", _0: 0.001, _1: 0.379, _2: Math.tanh(0.4) @@ -654,7 +654,7 @@ var suites_1 = { "unsafe_trunc", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.trunc(4.2156) }; @@ -665,7 +665,7 @@ var suites_1 = { "trunc", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Math.trunc(4.2156) }; diff --git a/jscomp/test/js_null_test.js b/jscomp/test/js_null_test.js index 03fba07cb2..61914f17d0 100644 --- a/jscomp/test/js_null_test.js +++ b/jscomp/test/js_null_test.js @@ -8,7 +8,7 @@ var suites_0 = [ "toOption - empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: undefined }; @@ -20,7 +20,7 @@ var suites_1 = { "toOption - 'a", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: Caml_option.some(undefined), _1: Caml_option.some(undefined) }; @@ -31,7 +31,7 @@ var suites_1 = { "return", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "something", _1: Caml_option.null_to_opt("something") }; @@ -42,7 +42,7 @@ var suites_1 = { "test - empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -53,7 +53,7 @@ var suites_1 = { "test - 'a", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: false }; @@ -64,7 +64,7 @@ var suites_1 = { "bind - empty", (function (param) { return { - TAG: /* StrictEq */2, + TAG: "StrictEq", _0: null, _1: Js_null.bind(null, (function (v) { return v; @@ -77,7 +77,7 @@ var suites_1 = { "bind - 'a", (function (param) { return { - TAG: /* StrictEq */2, + TAG: "StrictEq", _0: 4, _1: Js_null.bind(2, (function (n) { return (n << 1); @@ -96,7 +96,7 @@ var suites_1 = { hit.contents = true; })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: hit.contents }; @@ -113,7 +113,7 @@ var suites_1 = { hit.contents = v; })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: hit.contents }; @@ -124,7 +124,7 @@ var suites_1 = { "fromOption - None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: null, _1: Js_null.fromOption(undefined) }; @@ -135,7 +135,7 @@ var suites_1 = { "fromOption - Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Js_null.fromOption(2) }; diff --git a/jscomp/test/js_null_undefined_test.js b/jscomp/test/js_null_undefined_test.js index 2adf4e3451..b4604ee939 100644 --- a/jscomp/test/js_null_undefined_test.js +++ b/jscomp/test/js_null_undefined_test.js @@ -8,7 +8,7 @@ var suites_0 = [ "toOption - null", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: undefined }; @@ -20,7 +20,7 @@ var suites_1 = { "toOption - undefined", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: undefined }; @@ -31,7 +31,7 @@ var suites_1 = { "toOption - empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: undefined }; @@ -42,7 +42,7 @@ var suites_1 = { "File \"js_null_undefined_test.ml\", line 7, characters 2-9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "foo", _1: Caml_option.nullable_to_opt("foo") }; @@ -53,7 +53,7 @@ var suites_1 = { "return", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: "something", _1: Caml_option.nullable_to_opt("something") }; @@ -64,7 +64,7 @@ var suites_1 = { "test - null", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -75,7 +75,7 @@ var suites_1 = { "test - undefined", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -86,7 +86,7 @@ var suites_1 = { "test - empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -97,7 +97,7 @@ var suites_1 = { "File \"js_null_undefined_test.ml\", line 12, characters 2-9", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -108,7 +108,7 @@ var suites_1 = { "bind - null", (function (param) { return { - TAG: /* StrictEq */2, + TAG: "StrictEq", _0: null, _1: Js_null_undefined.bind(null, (function (v) { return v; @@ -121,7 +121,7 @@ var suites_1 = { "bind - undefined", (function (param) { return { - TAG: /* StrictEq */2, + TAG: "StrictEq", _0: undefined, _1: Js_null_undefined.bind(undefined, (function (v) { return v; @@ -134,7 +134,7 @@ var suites_1 = { "bind - empty", (function (param) { return { - TAG: /* StrictEq */2, + TAG: "StrictEq", _0: undefined, _1: Js_null_undefined.bind(undefined, (function (v) { return v; @@ -147,7 +147,7 @@ var suites_1 = { "bind - 'a", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 4, _1: Js_null_undefined.bind(2, (function (n) { return (n << 1); @@ -166,7 +166,7 @@ var suites_1 = { hit.contents = true; })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: hit.contents }; @@ -183,7 +183,7 @@ var suites_1 = { hit.contents = true; })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: hit.contents }; @@ -200,7 +200,7 @@ var suites_1 = { hit.contents = true; })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: hit.contents }; @@ -217,7 +217,7 @@ var suites_1 = { hit.contents = v; })); return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: hit.contents }; @@ -228,7 +228,7 @@ var suites_1 = { "fromOption - None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Js_null_undefined.fromOption(undefined) }; @@ -239,7 +239,7 @@ var suites_1 = { "fromOption - Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Js_null_undefined.fromOption(2) }; @@ -250,7 +250,7 @@ var suites_1 = { "null <> undefined", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; }) @@ -260,7 +260,7 @@ var suites_1 = { "null <> empty", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; }) @@ -270,7 +270,7 @@ var suites_1 = { "undefined = empty", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; }) @@ -280,7 +280,7 @@ var suites_1 = { "File \"js_null_undefined_test.ml\", line 42, characters 2-9", (function (param) { return { - TAG: /* Ok */4, + TAG: "Ok", _0: true }; }) diff --git a/jscomp/test/js_nullable_test.js b/jscomp/test/js_nullable_test.js index c3554ca7a2..e480c583ab 100644 --- a/jscomp/test/js_nullable_test.js +++ b/jscomp/test/js_nullable_test.js @@ -17,7 +17,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; diff --git a/jscomp/test/js_obj_test.js b/jscomp/test/js_obj_test.js index 6d25cbd6c3..a9eac9d311 100644 --- a/jscomp/test/js_obj_test.js +++ b/jscomp/test/js_obj_test.js @@ -6,7 +6,7 @@ var suites_0 = [ "empty", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 0, _1: Object.keys({}).length }; @@ -18,7 +18,7 @@ var suites_1 = { "assign", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: { a: 1 }, diff --git a/jscomp/test/js_option_test.js b/jscomp/test/js_option_test.js index 56831e2d37..9b381c118a 100644 --- a/jscomp/test/js_option_test.js +++ b/jscomp/test/js_option_test.js @@ -11,7 +11,7 @@ var option_suites_0 = [ "option_isSome_Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -23,7 +23,7 @@ var option_suites_1 = { "option_isSome_None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: false }; @@ -34,7 +34,7 @@ var option_suites_1 = { "option_isNone_Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: false }; @@ -45,7 +45,7 @@ var option_suites_1 = { "option_isNone_None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: true }; @@ -56,7 +56,7 @@ var option_suites_1 = { "option_isSomeValue_Eq", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.isSomeValue(simpleEq, 2, 2) }; @@ -67,7 +67,7 @@ var option_suites_1 = { "option_isSomeValue_Diff", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Js_option.isSomeValue(simpleEq, 1, 2) }; @@ -78,7 +78,7 @@ var option_suites_1 = { "option_isSomeValue_DiffNone", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Js_option.isSomeValue(simpleEq, 1, undefined) }; @@ -89,7 +89,7 @@ var option_suites_1 = { "option_getExn_Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Js_option.getExn(2) }; @@ -100,7 +100,7 @@ var option_suites_1 = { "option_equal_Eq", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.equal(simpleEq, 2, 2) }; @@ -111,7 +111,7 @@ var option_suites_1 = { "option_equal_Diff", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Js_option.equal(simpleEq, 1, 2) }; @@ -122,7 +122,7 @@ var option_suites_1 = { "option_equal_DiffNone", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Js_option.equal(simpleEq, 1, undefined) }; @@ -133,7 +133,7 @@ var option_suites_1 = { "option_andThen_SomeSome", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.isSomeValue(simpleEq, 3, Js_option.andThen((function (a) { return a + 1 | 0; @@ -146,7 +146,7 @@ var option_suites_1 = { "option_andThen_SomeNone", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: false, _1: Js_option.isSomeValue(simpleEq, 3, Js_option.andThen((function (param) { @@ -159,7 +159,7 @@ var option_suites_1 = { "option_map_Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.isSomeValue(simpleEq, 3, Js_option.map((function (a) { return a + 1 | 0; @@ -172,7 +172,7 @@ var option_suites_1 = { "option_map_None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Js_option.map((function (a) { return a + 1 | 0; @@ -185,7 +185,7 @@ var option_suites_1 = { "option_default_Some", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 2, _1: Js_option.getWithDefault(3, 2) }; @@ -196,7 +196,7 @@ var option_suites_1 = { "option_default_None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: 3, _1: Js_option.getWithDefault(3, undefined) }; @@ -207,7 +207,7 @@ var option_suites_1 = { "option_filter_Pass", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.isSomeValue(simpleEq, 2, Js_option.filter((function (a) { return a % 2 === 0; @@ -220,7 +220,7 @@ var option_suites_1 = { "option_filter_Reject", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Js_option.filter((function (a) { return a % 3 === 0; @@ -233,7 +233,7 @@ var option_suites_1 = { "option_filter_None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Js_option.filter((function (a) { return a % 3 === 0; @@ -246,7 +246,7 @@ var option_suites_1 = { "option_firstSome_First", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.isSomeValue(simpleEq, 3, Js_option.firstSome(3, 2)) }; @@ -257,7 +257,7 @@ var option_suites_1 = { "option_firstSome_First", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: true, _1: Js_option.isSomeValue(simpleEq, 2, Js_option.firstSome(undefined, 2)) }; @@ -268,7 +268,7 @@ var option_suites_1 = { "option_firstSome_None", (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: undefined, _1: Js_option.firstSome(undefined, undefined) }; diff --git a/jscomp/test/js_promise_basic_test.js b/jscomp/test/js_promise_basic_test.js index f3ebb629ab..04e06ed160 100644 --- a/jscomp/test/js_promise_basic_test.js +++ b/jscomp/test/js_promise_basic_test.js @@ -21,7 +21,7 @@ function eq(loc, x, y) { loc + (" id " + String(test_id.contents)), (function (param) { return { - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: y }; @@ -372,7 +372,7 @@ Mt.from_promise_suites("Js_promise_basic_test", { "File \"js_promise_basic_test.ml\", line 191, characters 5-12", twop.then(function (x) { return Promise.resolve({ - TAG: /* Eq */0, + TAG: "Eq", _0: x, _1: 2 }); @@ -383,7 +383,7 @@ Mt.from_promise_suites("Js_promise_basic_test", { "File \"js_promise_basic_test.ml\", line 192, characters 5-12", twop.then(function (x) { return Promise.resolve({ - TAG: /* Neq */1, + TAG: "Neq", _0: x, _1: 3 }); diff --git a/jscomp/test/js_re_test.js b/jscomp/test/js_re_test.js index fd0433b6b3..69d760b4fb 100644 --- a/jscomp/test/js_re_test.js +++ b/jscomp/test/js_re_test.js @@ -11,14 +11,14 @@ var suites_0 = [ var result = re.exec("3-"); if (result === null) { return { - TAG: /* Fail */8, + TAG: "Fail", _0: undefined }; } var defined = Caml_array.get(result, 1); var $$undefined = Caml_array.get(result, 2); return { - TAG: /* Eq */0, + TAG: "Eq", _0: [ "3", null @@ -43,7 +43,7 @@ var suites_1 = { }; return { - TAG: /* Eq */0, + TAG: "Eq", _0: contentOf("div", "