diff --git a/.gitmodules b/.gitmodules index d1f6eda029..d3937bbb94 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "vendor/melange-compiler-libs"] path = vendor/melange-compiler-libs - url = https://github.com/melange-re/melange-compiler-libs.git + url = https://github.com/TheCBaH/melange-compiler-libs.git diff --git a/Changes.md b/Changes.md index 62da6f3d99..a265e87042 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,15 @@ +Unreleased +--------------- + +- BREAKING(code generation): name a module's runtime fields after the OCaml + namespace they come from, so that e.g. an exception `Foo` and a module `Foo` + can coexist in a structure instead of failing with `Foo are exported as + twice`. Extension constructors are emitted as `Foo$extension` and classes as + `foo$class`; values and modules keep their name. Mangled fields are also + exposed under their plain name when nothing else in the module claims it, so + JavaScript callers keep working + + 7.0.1-55 2026-07-12 --------------- diff --git a/jscomp/core/j.ml b/jscomp/core/j.ml index d766ac5ba6..94ddfef945 100644 --- a/jscomp/core/j.ml +++ b/jscomp/core/j.ml @@ -107,7 +107,13 @@ type number = | Uint of int32 type ident_info = Js_op.ident_info -type exports = Ident.t list +(* The unit's exported fields, with the namespace each comes from: that is what + decides the name they are exported under (see [Runtime_fields]). + + NOTE: no doc comments in this file. [gen/gen_traversal.ml] parses it as an + interface and picks the first type group carrying attributes, which a doc + comment would silently make this one. *) +type exports = Runtime_fields.t list type tag_info = Lam.Tag_info.t type property_name = string diff --git a/jscomp/core/js_dump.ml b/jscomp/core/js_dump.ml index a900e1f8fa..92f5b93e88 100644 --- a/jscomp/core/js_dump.ml +++ b/jscomp/core/js_dump.ml @@ -772,8 +772,23 @@ and expression_desc cxt ~(level : int) x : cxt = E.runtime_call ~module_name:Js_runtime_modules.option ~fn_name:"some" [ e ]) | Caml_block { fields = el; tag_info = Blk_module fields; _ } -> - expression_desc cxt ~level - (Object (List.map_combine fields el ~f:(fun x -> Ident.convert x))) + let properties = List.map_combine fields el ~f:Ident.convert in + (* Fields renamed to keep OCaml namespaces apart in the single namespace + of a JS object are also exposed under their plain OCaml name, for the + benefit of JavaScript callers written against it. Only when nothing + else claims that name, and only for values that are free to repeat -- + a coercion wrapper is not worth duplicating. *) + let aliases = + List.filter_map properties ~f:(fun (name, (e : J.expression)) -> + match (Runtime_fields.unmangle name, e.expression_desc) with + | Some plain, Var _ + when not + (List.exists properties ~f:(fun (other, _) -> + String.equal other plain)) -> + Some (Ident.convert plain, e) + | _ -> None) + in + expression_desc cxt ~level (Object (properties @ aliases)) (*name convention of Record is slight different from modules*) | Caml_block { fields = el; mutable_flag; tag_info = Blk_record fields; _ } -> if block_has_all_int_fields fields then diff --git a/jscomp/core/js_dump_import_export.ml b/jscomp/core/js_dump_import_export.ml index 0991ded9d4..7afb0ed005 100644 --- a/jscomp/core/js_dump_import_export.ml +++ b/jscomp/core/js_dump_import_export.ml @@ -47,33 +47,40 @@ let print_es6_export f s export = P.string f s); P.string f L.comma) -let export_name cxt id = - let id_name = Ident.name id in - let s = Ident.convert id_name in - let export, cxt = Js_pp.Scope.str_of_ident cxt id in - let is_default = id_name = L.default in +let export_name cxt (field : Runtime_fields.t) = + let name = Runtime_fields.name field in + let s = Ident.convert name in + let export, cxt = Js_pp.Scope.str_of_ident cxt field.id in + let is_default = name = L.default in let s = if is_default then L.default else s in (s, export, is_default, cxt) -let iter_exports cxt f idents ~add_esmodule ~print_export = +let iter_exports cxt f fields ~add_esmodule ~print_export = let first = ref true in let print_one s export = if !first then first := false else P.newline f; print_export f s export in - List.fold_left idents ~init:cxt ~f:(fun cxt id -> - let s, export, is_default, cxt = export_name cxt id in + List.fold_left fields ~init:cxt ~f:(fun cxt (field : Runtime_fields.t) -> + let s, export, is_default, cxt = export_name cxt field in print_one s export; + (* Fields whose name is mangled to keep OCaml namespaces apart are also + exported under their plain OCaml name, so that JavaScript code written + against it keeps working. Skipped when another export answers to that + name already. *) + (match Runtime_fields.compat_alias ~fields field with + | Some alias -> print_one (Ident.convert alias) export + | None -> ()); if add_esmodule && is_default then ( P.newline f; print_export f "__esModule" "true"); cxt) (* Print exports in CommonJS format *) -let module_exports cxt f (idents : Ident.t list) = - match idents with +let module_exports cxt f (fields : Runtime_fields.t list) = + match fields with | [] -> cxt - | idents -> + | fields -> P.at_least_two_lines f; P.string f L.module_; P.string f L.dot; @@ -82,19 +89,19 @@ let module_exports cxt f (idents : Ident.t list) = P.string f L.eq; P.space f; P.brace_vgroup f 1 (fun () -> - iter_exports cxt f idents ~add_esmodule:true + iter_exports cxt f fields ~add_esmodule:true ~print_export:print_commonjs_export) (** Print module in ES6 format, it is ES6, trailing comma is valid ES6 code *) -let es6_export cxt f (idents : Ident.t list) = - match idents with +let es6_export cxt f (fields : Runtime_fields.t list) = + match fields with | [] -> cxt - | idents -> + | fields -> P.at_least_two_lines f; P.string f L.export; P.space f; P.brace_vgroup f 1 (fun () -> - iter_exports cxt f idents ~add_esmodule:false + iter_exports cxt f fields ~add_esmodule:false ~print_export:print_es6_export) type module_ = { id : Ident.t; path : string; default : bool } diff --git a/jscomp/core/js_dump_import_export.mli b/jscomp/core/js_dump_import_export.mli index 4a6b8cf205..38b2806d40 100644 --- a/jscomp/core/js_dump_import_export.mli +++ b/jscomp/core/js_dump_import_export.mli @@ -24,8 +24,11 @@ open Import -val module_exports : Js_pp.Scope.t -> Js_pp.t -> Ident.t list -> Js_pp.Scope.t -val es6_export : Js_pp.Scope.t -> Js_pp.t -> Ident.t list -> Js_pp.Scope.t +val module_exports : + Js_pp.Scope.t -> Js_pp.t -> Runtime_fields.t list -> Js_pp.Scope.t + +val es6_export : + Js_pp.Scope.t -> Js_pp.t -> Runtime_fields.t list -> Js_pp.Scope.t type module_ = { id : Ident.t; path : string; default : bool } diff --git a/jscomp/core/lam_coercion.ml b/jscomp/core/lam_coercion.ml index 2097f5f7b7..0853c2e8d4 100644 --- a/jscomp/core/lam_coercion.ml +++ b/jscomp/core/lam_coercion.ml @@ -72,7 +72,7 @@ open Import *) type t = { - export_list : Ident.t list; + export_list : Runtime_fields.t list; export_set : Ident.Set.t; export_map : Lam.t Ident.Map.t; (* not used in code generation, mostly used @@ -83,30 +83,36 @@ type t = { let export_map t = t.export_map let groups t = t.groups +let export_idents export_list = List.map export_list ~f:Runtime_fields.id let handle_exports (meta : Lam_stats.t) (lambda_exports : Lam.t list) (reverse_input : Lam_group.t list) = - let (original_exports : Ident.t list) = meta.exports in + let (original_exports : Runtime_fields.t list) = meta.exports in let (original_export_set : Ident.Set.t) = meta.export_idents in let len = List.length original_exports in let tbl = String.Hashtbl.create len in let ({ export_list; export_set; _ } as result) = List.fold_right2 - ~f:(fun (original_export_id : Ident.t) (lam : Lam.t) (acc : t) -> + ~f:(fun (original_export : Runtime_fields.t) (lam : Lam.t) (acc : t) -> + let original_export_id = Runtime_fields.id original_export in let original_name = Ident.name original_export_id in + (* Two fields of different namespaces can share [original_name]; what + has to be unique is the name they are given at runtime. *) + let runtime_name = Runtime_fields.name original_export in let already_present = - let already_present = String.Hashtbl.mem tbl original_name in - String.Hashtbl.replace tbl ~key:original_name ~data:(); + let already_present = String.Hashtbl.mem tbl runtime_name in + String.Hashtbl.replace tbl ~key:runtime_name ~data:(); already_present in if already_present then - Mel_exception.error (Mel_duplicate_exports original_name); + Mel_exception.error (Mel_duplicate_exports runtime_name); + let export_field id = { original_export with Runtime_fields.id } in match lam with | Lvar id | Lmutvar id -> if Ident.name id = original_name then { acc with - export_list = id :: acc.export_list; + export_list = export_field id :: acc.export_list; export_set = (if Ident.stamp id = Ident.stamp original_export_id then acc.export_set @@ -120,7 +126,7 @@ let handle_exports (meta : Lam_stats.t) (lambda_exports : Lam.t list) Lam_util.alias_ident_or_global meta newid id NA; { acc with - export_list = newid :: acc.export_list; + export_list = export_field newid :: acc.export_list; export_map = Ident.Map.add ~key:newid ~data:lam acc.export_map; groups = Single @@ -150,7 +156,8 @@ let handle_exports (meta : Lam_stats.t) (lambda_exports : Lam.t list) of size 4 instead of 2 *) let newid = Ident.rename original_export_id in - (let arity = Lam_arity_analysis.get_arity meta lam in + let () = + let arity = Lam_arity_analysis.get_arity meta lam in if not (Lam_arity.first_arity_na arity) then Ident.Hashtbl.add meta.ident_tbl ~key:newid ~data: @@ -162,10 +169,11 @@ let handle_exports (meta : Lam_stats.t) (lambda_exports : Lam.t list) | Lfunction _ -> Some (lam, Lam_non_rec) | _ -> None); call_summary = Lam_call_summary.Unknown; - })); + }) + in { acc with - export_list = newid :: acc.export_list; + export_list = export_field newid :: acc.export_list; export_map = Ident.Map.add ~key:newid ~data:lam acc.export_map; groups = Single (Strict, newid, lam) :: acc.groups; }) @@ -193,7 +201,11 @@ let handle_exports (meta : Lam_stats.t) (lambda_exports : Lam.t list) ~init:(result.export_map, result.groups) reverse_input in - { result with export_map; groups = Lam_dce.remove export_list coerced_input } + { + result with + export_map; + groups = Lam_dce.remove (export_idents export_list) coerced_input; + } (* TODO: more flattening, - also for function compilation, flattening should be done first diff --git a/jscomp/core/lam_compile_main.cppo.ml b/jscomp/core/lam_compile_main.cppo.ml index d218adf627..23454e2451 100644 --- a/jscomp/core/lam_compile_main.cppo.ml +++ b/jscomp/core/lam_compile_main.cppo.ml @@ -116,14 +116,17 @@ let compile ~package_info (output_prefix: string) (lam: Lambda.lambda) = in let export_idents = Translmod.get_export_identifiers() in - let export_ident_sets = Ident.Set.of_list export_idents in + let export_ident_sets = + Ident.Set.of_list (List.map export_idents ~f:Runtime_fields.id) + in (* To make toplevel happy - reentrant for js-demo *) let () = #ifndef MELANGE_RELEASE_BUILD - List.iter export_idents ~f:(fun id -> + List.iter export_idents ~f:(fun (field : Runtime_fields.t) -> Log.warn ~loc:(Loc.of_pos __POS__) - (Pp.textf "export idents: %s/%d" (Ident.name id) (Ident.stamp id))); + (Pp.textf "export idents: %s/%d" + (Ident.name field.id) (Ident.stamp field.id))); #endif Lam_compile_env.reset (); in @@ -244,7 +247,7 @@ let compile ~package_info (output_prefix: string) (lam: Lambda.lambda) = #endif let js : J.program = { exports = meta.exports - ; export_set = Ident.Set.of_list meta.exports + ; export_set = Ident.Set.of_list (List.map meta.exports ~f:Runtime_fields.id) ; block = body } in diff --git a/jscomp/core/lam_stats.ml b/jscomp/core/lam_stats.ml index 85ecc21606..9087f38e18 100644 --- a/jscomp/core/lam_stats.ml +++ b/jscomp/core/lam_stats.ml @@ -42,7 +42,10 @@ open Import type t = { export_idents : Ident.Set.t; - exports : Ident.t list; (* It is kept since order matters? *) + exports : Runtime_fields.t list; + (** The compilation unit's runtime fields, in the order of the module + block. Each carries the namespace it comes from, which decides the + name it is exported under (see {!Runtime_fields}). *) ident_tbl : Lam_id_kind.t Ident.Hashtbl.t; (** we don't need count arities for all identifiers, for identifiers for sure it's not a function, there is no need to count them *) @@ -79,8 +82,8 @@ let print (v : t) = Pp.box (Pp.concat ~sep:(Pp.text "; ") (List.map - ~f:(fun export -> - Pp.text (Format.asprintf "%a" Ident.print export)) + ~f:(fun (export : Runtime_fields.t) -> + Pp.text (Format.asprintf "%a" Ident.print export.id)) v.exports)); ]); ] diff --git a/jscomp/core/lam_stats.mli b/jscomp/core/lam_stats.mli index 174ff483ed..17e5d17bb9 100644 --- a/jscomp/core/lam_stats.mli +++ b/jscomp/core/lam_stats.mli @@ -30,7 +30,7 @@ open Import type t = { export_idents : Ident.Set.t; - exports : Ident.t list; + exports : Runtime_fields.t list; ident_tbl : Lam_id_kind.t Ident.Hashtbl.t; (** we don't need count arities for all identifiers, for identifiers for sure it's not a function, there is no need to count them @@ -38,4 +38,5 @@ type t = { } val print : t -> _ Pp.t -val make : export_idents:Ident.t list -> export_ident_sets:Ident.Set.t -> t +val make : + export_idents:Runtime_fields.t list -> export_ident_sets:Ident.Set.t -> t diff --git a/jscomp/core/lam_stats_export.ml b/jscomp/core/lam_stats_export.ml index 7c1bd444e4..c1e98684a7 100644 --- a/jscomp/core/lam_stats_export.ml +++ b/jscomp/core/lam_stats_export.ml @@ -150,7 +150,9 @@ let values_of_export = -> Ident.Hashtbl.clear arity_cache; Ident.Hashtbl.clear nested_call_summary_cache; - List.fold_left meta.exports ~init:String.Map.empty ~f:(fun acc x -> + List.fold_left meta.exports ~init:String.Map.empty + ~f:(fun acc (field : Runtime_fields.t) -> + let x = field.id in let arity = memoize arity_cache x (fun () -> match Ident.Hashtbl.find meta.ident_tbl x with @@ -252,7 +254,9 @@ let values_of_export = when Lam_call_summary.is_unknown summary -> acc | _, _, _ -> - String.Map.add acc ~key:(Ident.name x) + (* Keyed by the name the field is given at runtime: that is what + other units resolve their accesses against. *) + String.Map.add acc ~key:(Runtime_fields.name field) ~data: { Js_cmj_format.arity; diff --git a/jscomp/test/dist/app_root_finder.js b/jscomp/test/dist/app_root_finder.js index f302861952..8b6da46c0b 100644 --- a/jscomp/test/dist/app_root_finder.js +++ b/jscomp/test/dist/app_root_finder.js @@ -16,8 +16,8 @@ function find_package_json(_dir) { } const new_dir = Path.dirname(dir); if (new_dir === dir) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } _dir = new_dir; diff --git a/jscomp/test/dist/arith_parser.js b/jscomp/test/dist/arith_parser.js index 9632440474..b8022bfb02 100644 --- a/jscomp/test/dist/arith_parser.js +++ b/jscomp/test/dist/arith_parser.js @@ -115,8 +115,8 @@ const yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }) diff --git a/jscomp/test/dist/arity_infer.js b/jscomp/test/dist/arity_infer.js index c9052ca355..1572b3e72b 100644 --- a/jscomp/test/dist/arity_infer.js +++ b/jscomp/test/dist/arity_infer.js @@ -12,16 +12,16 @@ function f0(x) { return x + 1 | 0; }); } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return tmp(3); } function f1(x) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); return Curry._1(undefined, x); } @@ -50,8 +50,8 @@ function f3(x) { }); break; default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return tmp(3); diff --git a/jscomp/test/dist/array_safe_get.js b/jscomp/test/dist/array_safe_get.js index f4a380201d..8da383c725 100644 --- a/jscomp/test/dist/array_safe_get.js +++ b/jscomp/test/dist/array_safe_get.js @@ -17,7 +17,7 @@ try { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (msg.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { console.log(msg._1); y = 0; } else { diff --git a/jscomp/test/dist/caml_compare_test.js b/jscomp/test/dist/caml_compare_test.js index a2be372d8d..ab78374016 100644 --- a/jscomp/test/dist/caml_compare_test.js +++ b/jscomp/test/dist/caml_compare_test.js @@ -17,7 +17,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - function_equal_test = exn.MEL_EXN_ID === Stdlib.Invalid_argument && exn._1 === "equal: functional value" ? true : false; + function_equal_test = exn.MEL_EXN_ID === Stdlib.Invalid_argument$extension && exn._1 === "equal: functional value" ? true : false; } const suites = { diff --git a/jscomp/test/dist/caml_sys_poly_fill_test.js b/jscomp/test/dist/caml_sys_poly_fill_test.js index def6c1aeb2..fa8f9ac1a9 100644 --- a/jscomp/test/dist/caml_sys_poly_fill_test.js +++ b/jscomp/test/dist/caml_sys_poly_fill_test.js @@ -54,7 +54,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = "Z"; } else { throw exn; diff --git a/jscomp/test/dist/class3_test.js b/jscomp/test/dist/class3_test.js index f4bc6c1134..1570f5a013 100644 --- a/jscomp/test/dist/class3_test.js +++ b/jscomp/test/dist/class3_test.js @@ -540,25 +540,38 @@ module.exports = { suites, test_id, eq, + point$class: point, point, + adjusted_point$class: adjusted_point, adjusted_point, + adjusted_point2$class: adjusted_point2, adjusted_point2, + printable_point$class: printable_point, printable_point, my_int, + printable_point2$class: printable_point2, printable_point2, + abstract_point$class: abstract_point, abstract_point, + vpoint$class: vpoint, vpoint, v: v$1, + abstract_point2$class: abstract_point2, abstract_point2, + point2$class: point2, point2, vv, + restricted_point$class: restricted_point, restricted_point, p: p$2, h: h$2, + point_again$class: point_again, point_again, hh, + point_again2$class: point_again2, point_again2, hhh, + point_again3$class: point_again3, point_again3, hhhh, } diff --git a/jscomp/test/dist/class4_test.js b/jscomp/test/dist/class4_test.js index 63a4a1ecaa..988d943071 100644 --- a/jscomp/test/dist/class4_test.js +++ b/jscomp/test/dist/class4_test.js @@ -98,6 +98,7 @@ function restricted_point2$p_init($$class) { const restricted_point2$p = CamlinternalOO.make_class(shared$1, restricted_point2$p_init); const Point = { + restricted_point$p$class: restricted_point, restricted_point$p: restricted_point }; @@ -219,12 +220,18 @@ module.exports = { suites, test_id, eq, + restricted_point$class: restricted_point, restricted_point, + restricted_point$p$class: restricted_point$p, restricted_point$p, + restricted_point2$p$class: restricted_point2$p, restricted_point2$p, Point, + abstract_point$class: abstract_point, abstract_point, + point$class: point, point, + colored_point$class: colored_point, colored_point, p$p, get_succ_x, diff --git a/jscomp/test/dist/class5_test.js b/jscomp/test/dist/class5_test.js index 6d08a7bab7..02e510addc 100644 --- a/jscomp/test/dist/class5_test.js +++ b/jscomp/test/dist/class5_test.js @@ -322,15 +322,22 @@ module.exports = { suites, test_id, eq, + printable_point$class: printable_point, printable_point, + printable_colored_point$class: printable_colored_point, printable_colored_point, p, + ref$class: ref, ref, v, + intlist$class: intlist, intlist, + intlist2$class: intlist2, intlist2, l: l$1, + point$class: point, point, + distance_point$class: distance_point, distance_point, a, b, diff --git a/jscomp/test/dist/class6_test.js b/jscomp/test/dist/class6_test.js index 1ff6c9274b..b5ea6518e6 100644 --- a/jscomp/test/dist/class6_test.js +++ b/jscomp/test/dist/class6_test.js @@ -117,8 +117,8 @@ function lookup_obj(obj, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -289,16 +289,23 @@ module.exports = { suites, test_id, eq, + point$class: point, point, + colored_point$class: colored_point, colored_point, colored_point_to_point, p, q, lookup_obj, + c$class: c, c, + d$class: d, d, + c2$p$class: c2$p, c2$p, + functional_point$class: functional_point, functional_point, + bad_functional_point$class: bad_functional_point, bad_functional_point, } /* point Not a pure module */ diff --git a/jscomp/test/dist/class7_test.js b/jscomp/test/dist/class7_test.js index 914e08a3ab..628768f416 100644 --- a/jscomp/test/dist/class7_test.js +++ b/jscomp/test/dist/class7_test.js @@ -354,14 +354,22 @@ module.exports = { suites, test_id, eq, + point$class: point, point, + ref$class: ref, ref, + backup$class: backup, backup, + backup_ref$class: backup_ref, backup_ref, get, + backup2$class: backup2, backup2, + backup_ref2$class: backup_ref2, backup_ref2, + window$class: $$window, $$window, + widget$class: widget, widget, } /* point Not a pure module */ diff --git a/jscomp/test/dist/class8_test.js b/jscomp/test/dist/class8_test.js index d7569c1c47..d1c0bedfdf 100644 --- a/jscomp/test/dist/class8_test.js +++ b/jscomp/test/dist/class8_test.js @@ -120,8 +120,11 @@ module.exports = { suites, test_id, eq, + comparable$class: comparable, comparable, + money$class: money, money, + money2$class: money2, money2, min, } diff --git a/jscomp/test/dist/class_fib_open_recursion_test.js b/jscomp/test/dist/class_fib_open_recursion_test.js index 92be399eb8..d183231f26 100644 --- a/jscomp/test/dist/class_fib_open_recursion_test.js +++ b/jscomp/test/dist/class_fib_open_recursion_test.js @@ -65,7 +65,7 @@ function memo_fib_init($$class) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const v = Curry._2(calc$1, self$2, x); Stdlib__Hashtbl.add(self$2[cache], x, v); return v; @@ -93,7 +93,9 @@ module.exports = { suites, test_id, eq, + fib$class: fib, fib, + memo_fib$class: memo_fib, memo_fib, } /* fib Not a pure module */ diff --git a/jscomp/test/dist/class_repr.js b/jscomp/test/dist/class_repr.js index f44b1d07b7..397dbe45d5 100644 --- a/jscomp/test/dist/class_repr.js +++ b/jscomp/test/dist/class_repr.js @@ -218,14 +218,19 @@ function xx0_init($$class) { const xx0 = CamlinternalOO.make_class(shared, xx0_init); module.exports = { + x0$class: x0, x0, + x$class: x, x, u, + xx$class: xx, xx, v1, v2, + point$class: point, point, v: v$1, + xx0$class: xx0, xx0, } /* x0 Not a pure module */ diff --git a/jscomp/test/dist/class_test.js b/jscomp/test/dist/class_test.js index 03d81b3224..0047c7a560 100644 --- a/jscomp/test/dist/class_test.js +++ b/jscomp/test/dist/class_test.js @@ -141,11 +141,13 @@ Mt.from_pair_suites("Class_test", { }); module.exports = { + point$class: point, point, p, zero, three, x0, + point2$class: point2, point2, one, two, diff --git a/jscomp/test/dist/custom_error_test.js b/jscomp/test/dist/custom_error_test.js index 3a952dd871..944fb66d3f 100644 --- a/jscomp/test/dist/custom_error_test.js +++ b/jscomp/test/dist/custom_error_test.js @@ -12,7 +12,7 @@ function test_js_error(param) { } catch (raw_err){ const err = Caml_js_exceptions.internalToOCamlException(raw_err); - if (err.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (err.MEL_EXN_ID === Js__Js_exn.Error$extension) { console.log(err._1.stack); return; } @@ -27,7 +27,7 @@ function test_js_error2(param) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (e.MEL_EXN_ID === Js__Js_exn.Error$extension) { console.log(e._1.stack); throw e; } @@ -42,7 +42,7 @@ function example1(param) { } catch (raw_err){ const err = Caml_js_exceptions.internalToOCamlException(raw_err); - if (err.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (err.MEL_EXN_ID === Js__Js_exn.Error$extension) { console.log(err._1.stack); return; } @@ -57,7 +57,7 @@ function example2(param) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (exn.MEL_EXN_ID === Js__Js_exn.Error$extension) { return; } throw exn; diff --git a/jscomp/test/dist/demo_int_map.js b/jscomp/test/dist/demo_int_map.js index c473774547..d5de5adb45 100644 --- a/jscomp/test/dist/demo_int_map.js +++ b/jscomp/test/dist/demo_int_map.js @@ -143,8 +143,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); diff --git a/jscomp/test/dist/equal_exception_test.js b/jscomp/test/dist/equal_exception_test.js index 93cca877dc..d54f2b0680 100644 --- a/jscomp/test/dist/equal_exception_test.js +++ b/jscomp/test/dist/equal_exception_test.js @@ -49,13 +49,13 @@ function is_equal(param) { function is_exception(param) { try { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -125,12 +125,12 @@ const suites = { tl: suites_1 }; -const e = new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +const e = new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); function eq(param) { - return param.MEL_EXN_ID === Stdlib.Not_found; + return param.MEL_EXN_ID === Stdlib.Not_found$extension; } const Not_found = /* @__PURE__ */ Caml_exceptions.create("Equal_exception_test.Not_found"); @@ -148,7 +148,7 @@ if (Caml_obj.caml_equal(e, new Caml_js_exceptions.MelangeError(Not_found, { }); } -if (Not_found === Stdlib.Not_found !== false) { +if (Not_found === Stdlib.Not_found$extension !== false) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -170,6 +170,7 @@ module.exports = { suites, e, eq, + Not_found$extension: Not_found, Not_found, } /* Not a pure module */ diff --git a/jscomp/test/dist/exception_alias.js b/jscomp/test/dist/exception_alias.js index d55f9b7cb3..6aa0eb625b 100644 --- a/jscomp/test/dist/exception_alias.js +++ b/jscomp/test/dist/exception_alias.js @@ -5,8 +5,8 @@ const Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); const Stdlib = require("melange/stdlib.js"); const Stdlib__List = require("melange/list.js"); -const a0 = new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +const a0 = new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); const b = Stdlib__List.length({ diff --git a/jscomp/test/dist/exception_def.js b/jscomp/test/dist/exception_def.js index 2d034e06ca..cb49b8cc3a 100644 --- a/jscomp/test/dist/exception_def.js +++ b/jscomp/test/dist/exception_def.js @@ -24,6 +24,7 @@ const A = /* @__PURE__ */ Caml_exceptions.create("Exception_def.A"); const A$1 = /* @__PURE__ */ Caml_exceptions.create("Exception_def.U.A"); const U = { + A$extension: A$1, A: A$1 }; @@ -45,8 +46,8 @@ const v_1 = [ 0 ]; -const v = new Caml_js_exceptions.MelangeError(Stdlib.Match_failure, { - MEL_EXN_ID: Stdlib.Match_failure, +const v = new Caml_js_exceptions.MelangeError(Stdlib.Match_failure$extension, { + MEL_EXN_ID: Stdlib.Match_failure$extension, _1: v_1 }); @@ -62,12 +63,12 @@ const h3 = new Caml_js_exceptions.MelangeError(H2, { MEL_EXN_ID: H2 }); -const h4 = new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +const h4 = new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); -const h5 = new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, +const h5 = new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "xx" }); @@ -79,15 +80,15 @@ Stdlib__Printexc.register_printer(function (s) { }); function p(e) { - if (e.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (e.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { return 0; } else if (e.MEL_EXN_ID === H2) { return 1; } else if (e.MEL_EXN_ID === H2) { return 2; - } else if (e.MEL_EXN_ID === Stdlib.Not_found) { + } else if (e.MEL_EXN_ID === Stdlib.Not_found$extension) { return 4; - } else if (e.MEL_EXN_ID === Stdlib.Not_found) { + } else if (e.MEL_EXN_ID === Stdlib.Not_found$extension) { return 3; } else { return -1; @@ -96,12 +97,12 @@ function p(e) { eq("File \"jscomp/test/exception_def.ml\", line 54, characters 6-13", p(h5), 0); -eq("File \"jscomp/test/exception_def.ml\", line 55, characters 6-13", p(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +eq("File \"jscomp/test/exception_def.ml\", line 55, characters 6-13", p(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })), 4); -eq("File \"jscomp/test/exception_def.ml\", line 56, characters 6-13", p(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +eq("File \"jscomp/test/exception_def.ml\", line 56, characters 6-13", p(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })), 4); eq("File \"jscomp/test/exception_def.ml\", line 57, characters 6-13", p(new Caml_js_exceptions.MelangeError(H2, { @@ -112,8 +113,8 @@ eq("File \"jscomp/test/exception_def.ml\", line 58, characters 6-13", p(new Caml MEL_EXN_ID: H2 })), 1); -eq("File \"jscomp/test/exception_def.ml\", line 59, characters 6-13", p(new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, +eq("File \"jscomp/test/exception_def.ml\", line 59, characters 6-13", p(new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "" })), 0); @@ -121,35 +122,45 @@ Mt.from_pair_suites("jscomp/test/exception_def.ml", suites.contents); const a = 3; -const Aa = Stdlib.Match_failure; +const Aa = Stdlib.Match_failure$extension; -const H0 = Stdlib.Not_found; +const H0 = Stdlib.Not_found$extension; const H3 = H2; -const H4 = Stdlib.Invalid_argument; +const H4 = Stdlib.Invalid_argument$extension; module.exports = { suites, test_id, eq, + A$extension: A, A, U, H, + Bx$extension: Bx, Bx, a, u, + Ax$extension: Ax, Ax, + XXX$extension: XXX, XXX, + Aa$extension: Aa, Aa, v, + H0$extension: H0, H0, + H1$extension: H1, H1, + H2$extension: H2, H2, + H3$extension: H3, H3, h2, h3, h4, + H4$extension: H4, H4, h5, p, diff --git a/jscomp/test/dist/exception_raise_test.js b/jscomp/test/dist/exception_raise_test.js index a760025d93..6511a9f308 100644 --- a/jscomp/test/dist/exception_raise_test.js +++ b/jscomp/test/dist/exception_raise_test.js @@ -27,7 +27,7 @@ function appf(g, x) { if (exn.MEL_EXN_ID === Local) { return 3; } - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return 2; } if (exn.MEL_EXN_ID === A) { @@ -102,7 +102,7 @@ try { } catch (raw_x$3){ const x$3 = Caml_js_exceptions.internalToOCamlException(raw_x$3); - if (x$3.MEL_EXN_ID === A || x$3.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (x$3.MEL_EXN_ID === A || x$3.MEL_EXN_ID === Js__Js_exn.Error$extension) { a0 = x$3._1; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -162,7 +162,7 @@ const suites = { hd: [ "File \"jscomp/test/exception_raise_test.ml\", line 116, characters 4-11", (function (param) { - if (a1.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (a1.MEL_EXN_ID === Js__Js_exn.Error$extension) { return { TAG: /* Eq */ 0, _0: a1._1, @@ -202,8 +202,8 @@ catch (raw_e$2){ } try { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } catch (raw_e$3){ @@ -246,11 +246,16 @@ eq("File \"jscomp/test/exception_raise_test.ml\", line 150, characters 5-12", (( Mt.from_pair_suites("Exception_raise_test", suites.contents); module.exports = { + Local$extension: Local, Local, + B$extension: B, B, + C$extension: C, C, + D$extension: D, D, appf, + A$extension: A, A, f, ff, diff --git a/jscomp/test/dist/exception_rebind_test.js b/jscomp/test/dist/exception_rebind_test.js index 4e161980c8..66f894812c 100644 --- a/jscomp/test/dist/exception_rebind_test.js +++ b/jscomp/test/dist/exception_rebind_test.js @@ -9,41 +9,47 @@ const Stdlib = require("melange/stdlib.js"); const E = /* @__PURE__ */ Caml_exceptions.create("Exception_rebind_test.A.E"); const A = { + E$extension: E, E }; const B = { + F$extension: E, F: E }; const A0 = /* @__PURE__ */ Caml_exceptions.create("Exception_rebind_test.A0"); -const u0 = new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, +const u0 = new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "x" }); -const u1 = new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, +const u1 = new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "x" }); -const u2 = new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +const u2 = new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); -const H = Exception_def.A; +const H = Exception_def.A$extension; -const H0 = Stdlib.Invalid_argument; +const H0 = Stdlib.Invalid_argument$extension; -const H1 = Stdlib.Invalid_argument; +const H1 = Stdlib.Invalid_argument$extension; module.exports = { A, B, + H$extension: H, H, + A0$extension: A0, A0, + H0$extension: H0, H0, + H1$extension: H1, H1, u0, u1, diff --git a/jscomp/test/dist/exception_rebound_err_test.js b/jscomp/test/dist/exception_rebound_err_test.js index cabac49831..e1aa962934 100644 --- a/jscomp/test/dist/exception_rebound_err_test.js +++ b/jscomp/test/dist/exception_rebound_err_test.js @@ -45,10 +45,10 @@ function test_js_error4(param) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Not_found) { + if (e.MEL_EXN_ID === Stdlib.Not_found$extension) { return 2; } - if (e.MEL_EXN_ID === Stdlib.Invalid_argument && e._1 === "x") { + if (e.MEL_EXN_ID === Stdlib.Invalid_argument$extension && e._1 === "x") { return 3; } if (e.MEL_EXN_ID === A) { @@ -73,7 +73,7 @@ function f(g) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return 1; } throw exn; @@ -88,8 +88,11 @@ module.exports = { suites, test_id, eq, + A$extension: A, A, + B$extension: B, B, + C$extension: C, C, test_js_error4, f, diff --git a/jscomp/test/dist/exception_repr_test.js b/jscomp/test/dist/exception_repr_test.js index 0d98e87e3f..b0cf1f4d6f 100644 --- a/jscomp/test/dist/exception_repr_test.js +++ b/jscomp/test/dist/exception_repr_test.js @@ -81,22 +81,26 @@ eq("File \"jscomp/test/exception_repr_test.ml\", line 26, characters 7-14", Stdl MEL_EXN_ID: Hello })).startsWith("Exception_repr_test.Hello"), true); -eq("File \"jscomp/test/exception_repr_test.ml\", line 27, characters 7-14", "A", Stdlib__Printexc.to_string(new Caml_js_exceptions.MelangeError(Exception_def.A, { - MEL_EXN_ID: Exception_def.A, +eq("File \"jscomp/test/exception_repr_test.ml\", line 27, characters 7-14", "A", Stdlib__Printexc.to_string(new Caml_js_exceptions.MelangeError(Exception_def.A$extension, { + MEL_EXN_ID: Exception_def.A$extension, _1: 3 }))); Mt.from_pair_suites("Exception_repr_test", suites.contents); -const AAA = Exception_def.A; +const AAA = Exception_def.A$extension; module.exports = { suites, test_id, eq, + Hi$extension: Hi, Hi, + Hello$extension: Hello, Hello, + A$extension: A, A, + AAA$extension: AAA, AAA, } /* Not a pure module */ diff --git a/jscomp/test/dist/exception_value_test.js b/jscomp/test/dist/exception_value_test.js index 4bca8e427f..d72627c3ec 100644 --- a/jscomp/test/dist/exception_value_test.js +++ b/jscomp/test/dist/exception_value_test.js @@ -8,8 +8,8 @@ const Js__Js_exn = require("melange.js/js_exn.js"); const Stdlib = require("melange/stdlib.js"); function f(param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -28,8 +28,8 @@ function assert_f(x) { } function hh(param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -50,7 +50,7 @@ function test_not_found(f, param) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return 2; } throw exn; @@ -63,7 +63,7 @@ function test_js_error2(param) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (e.MEL_EXN_ID === Js__Js_exn.Error$extension) { console.log(e._1.stack); throw e; } @@ -85,8 +85,11 @@ module.exports = { f, assert_f, hh, + A$extension: A, A, + B$extension: B, B, + C$extension: C, C, u, test_not_found, diff --git a/jscomp/test/dist/exn_error_pattern.js b/jscomp/test/dist/exn_error_pattern.js index f68511332c..5731f42e0c 100644 --- a/jscomp/test/dist/exn_error_pattern.js +++ b/jscomp/test/dist/exn_error_pattern.js @@ -9,11 +9,11 @@ const Stdlib = require("melange/stdlib.js"); function f(match) { if (Caml_exceptions.caml_is_extension(match)) { - if (match.MEL_EXN_ID === Stdlib.Not_found) { + if (match.MEL_EXN_ID === Stdlib.Not_found$extension) { return 0; - } else if (match.MEL_EXN_ID === Stdlib.Invalid_argument || match.MEL_EXN_ID === Stdlib.Stack_overflow) { + } else if (match.MEL_EXN_ID === Stdlib.Invalid_argument$extension || match.MEL_EXN_ID === Stdlib.Stack_overflow$extension) { return 1; - } else if (match.MEL_EXN_ID === Stdlib.Sys_error) { + } else if (match.MEL_EXN_ID === Stdlib.Sys_error$extension) { return 2; } else { return; @@ -28,9 +28,9 @@ const B = /* @__PURE__ */ Caml_exceptions.create("Exn_error_pattern.B"); function g(match) { if (Caml_exceptions.caml_is_extension(match)) { - if (match.MEL_EXN_ID === Stdlib.Not_found || match.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (match.MEL_EXN_ID === Stdlib.Not_found$extension || match.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { return 0; - } else if (match.MEL_EXN_ID === Stdlib.Sys_error) { + } else if (match.MEL_EXN_ID === Stdlib.Sys_error$extension) { return 2; } else if (match.MEL_EXN_ID === A || match.MEL_EXN_ID === B) { return match._1; @@ -53,21 +53,21 @@ function eq(loc, x, y) { Mt.eq_suites(test_id, suites, loc, x, y); } -eq("File \"jscomp/test/exn_error_pattern.ml\", line 30, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +eq("File \"jscomp/test/exn_error_pattern.ml\", line 30, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })), 0); -eq("File \"jscomp/test/exn_error_pattern.ml\", line 31, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, +eq("File \"jscomp/test/exn_error_pattern.ml\", line 31, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "" })), 1); -eq("File \"jscomp/test/exn_error_pattern.ml\", line 32, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Stack_overflow, { - MEL_EXN_ID: Stdlib.Stack_overflow +eq("File \"jscomp/test/exn_error_pattern.ml\", line 32, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Stack_overflow$extension, { + MEL_EXN_ID: Stdlib.Stack_overflow$extension })), 1); -eq("File \"jscomp/test/exn_error_pattern.ml\", line 33, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Sys_error, { - MEL_EXN_ID: Stdlib.Sys_error, +eq("File \"jscomp/test/exn_error_pattern.ml\", line 33, characters 5-12", f(new Caml_js_exceptions.MelangeError(Stdlib.Sys_error$extension, { + MEL_EXN_ID: Stdlib.Sys_error$extension, _1: "" })), 2); @@ -86,7 +86,9 @@ Mt.from_pair_suites("Exn_error_pattern", suites.contents); module.exports = { f, + A$extension: A, A, + B$extension: B, B, g, suites, diff --git a/jscomp/test/dist/ext_filename_test.js b/jscomp/test/dist/ext_filename_test.js index 64d902e0cf..8885bd7aca 100644 --- a/jscomp/test/dist/ext_filename_test.js +++ b/jscomp/test/dist/ext_filename_test.js @@ -70,7 +70,7 @@ function chop_extension(locOpt, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exn.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { return Curry._2(Stdlib__Format.ksprintf(Stdlib.invalid_arg, { TAG: /* Format */ 0, _0: { @@ -107,7 +107,7 @@ function chop_extension_if_any(fname) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exn.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { return fname; } throw exn; diff --git a/jscomp/test/dist/ext_pervasives_test.js b/jscomp/test/dist/ext_pervasives_test.js index 405c3c7bb4..7800fef99c 100644 --- a/jscomp/test/dist/ext_pervasives_test.js +++ b/jscomp/test/dist/ext_pervasives_test.js @@ -84,8 +84,8 @@ function invalid_argf(fmt) { function bad_argf(fmt) { return Stdlib__Format.ksprintf((function (x) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: x }); }), fmt); diff --git a/jscomp/test/dist/ext_string_test.js b/jscomp/test/dist/ext_string_test.js index cd411b705c..bfb0db2573 100644 --- a/jscomp/test/dist/ext_string_test.js +++ b/jscomp/test/dist/ext_string_test.js @@ -731,6 +731,7 @@ module.exports = { is_empty, repeat, unsafe_is_sub, + Local_exit$extension: Local_exit, Local_exit, find, contain_substring, diff --git a/jscomp/test/dist/extensible_variant_test.js b/jscomp/test/dist/extensible_variant_test.js index 3e3ebfe002..a9e13fb9dd 100644 --- a/jscomp/test/dist/extensible_variant_test.js +++ b/jscomp/test/dist/extensible_variant_test.js @@ -10,6 +10,7 @@ const Str = /* @__PURE__ */ Caml_exceptions.create("Extensible_variant_test.Str" const Int = /* @__PURE__ */ Caml_exceptions.create("Extensible_variant_test.N.Int"); const N = { + Int$extension: Int, Int }; @@ -91,8 +92,10 @@ const suites = { Mt.from_pair_suites("Extensible_variant_test", suites); module.exports = { + Str$extension: Str, Str, N, + Int$extension: Int$1, Int: Int$1, to_int, suites, diff --git a/jscomp/test/dist/flexible_array_test.js b/jscomp/test/dist/flexible_array_test.js index ee0523eb64..4f6db10119 100644 --- a/jscomp/test/dist/flexible_array_test.js +++ b/jscomp/test/dist/flexible_array_test.js @@ -14,8 +14,8 @@ function sub(_tr, _k) { const k = _k; const tr = _tr; if (/* tag */ typeof tr !== "object" && typeof tr !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (k === 1) { @@ -42,8 +42,8 @@ function update(tr, k, w) { _2: /* Lf */ 0 }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const r = tr._2; @@ -76,8 +76,8 @@ function update(tr, k, w) { function $$delete(tr, n) { if (/* tag */ typeof tr !== "object" && typeof tr !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (n === 1) { @@ -123,8 +123,8 @@ function loext(tr, w) { function lorem(tr) { if (/* tag */ typeof tr !== "object" && typeof tr !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = tr._1; diff --git a/jscomp/test/dist/flow_parser_reg_test.js b/jscomp/test/dist/flow_parser_reg_test.js index 071804845f..e716019d58 100644 --- a/jscomp/test/dist/flow_parser_reg_test.js +++ b/jscomp/test/dist/flow_parser_reg_test.js @@ -2213,7 +2213,7 @@ function parse_exponent(f) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(No_good, { MEL_EXN_ID: No_good }); @@ -3076,7 +3076,7 @@ function token(env, lexbuf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return [ env, /* T_IDENTIFIER */ 0 @@ -5115,7 +5115,7 @@ function type_token(env, lexbuf) { } catch (raw_exn){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { return [ env, /* T_IDENTIFIER */ 0 @@ -6319,8 +6319,9 @@ const Parser_env_Peek = { }; const Parser_env_Try = { - Rollback, - to_parse + Rollback$extension: Rollback, + to_parse, + Rollback }; const funarg$1 = { @@ -6587,8 +6588,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$2.compare, x, param.v); @@ -9553,8 +9554,8 @@ function assignment_but_not_arrow_function(env) { } function error_callback(param, param$1) { - throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback, { - MEL_EXN_ID: Parser_env_Try.Rollback + throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback$extension, { + MEL_EXN_ID: Parser_env_Try.Rollback$extension }); } @@ -9566,8 +9567,8 @@ function try_assignment_but_not_arrow_function(env) { switch (match) { case /* T_ARROW */ 10 : case /* T_COLON */ 77 : - throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback, { - MEL_EXN_ID: Parser_env_Try.Rollback + throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback$extension, { + MEL_EXN_ID: Parser_env_Try.Rollback$extension }); } } @@ -9575,8 +9576,8 @@ function try_assignment_but_not_arrow_function(env) { return ret; } if (Parser_env_Peek.value(undefined, env$1) === "checks") { - throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback, { - MEL_EXN_ID: Parser_env_Try.Rollback + throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback$extension, { + MEL_EXN_ID: Parser_env_Try.Rollback$extension }); } const match$1 = ret[1]; @@ -9590,8 +9591,8 @@ function try_assignment_but_not_arrow_function(env) { return ret; } if (!Parser_env_Peek.is_line_terminator(env$1)) { - throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback, { - MEL_EXN_ID: Parser_env_Try.Rollback + throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback$extension, { + MEL_EXN_ID: Parser_env_Try.Rollback$extension }); } return ret; @@ -10326,13 +10327,13 @@ function error_callback$1(param, param$1) { case /* ParameterAfterRestParameter */ 47 : return; default: - throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback, { - MEL_EXN_ID: Parser_env_Try.Rollback + throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback$extension, { + MEL_EXN_ID: Parser_env_Try.Rollback$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback, { - MEL_EXN_ID: Parser_env_Try.Rollback + throw new Caml_js_exceptions.MelangeError(Parser_env_Try.Rollback$extension, { + MEL_EXN_ID: Parser_env_Try.Rollback$extension }); } } @@ -10946,7 +10947,7 @@ function check_property(env, prop_map, prop) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { prev_kinds = /* Empty */ 0; } else { throw exn; diff --git a/jscomp/test/dist/global_exception_regression_test.js b/jscomp/test/dist/global_exception_regression_test.js index 3054088bda..a8fa95e32c 100644 --- a/jscomp/test/dist/global_exception_regression_test.js +++ b/jscomp/test/dist/global_exception_regression_test.js @@ -5,16 +5,16 @@ const Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); const Mt = require("./mt.js"); const Stdlib = require("melange/stdlib.js"); -const v = new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +const v = new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); -const u = new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +const u = new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); -const s = new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file +const s = new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); const suites_0 = [ diff --git a/jscomp/test/dist/gpr_1501_test.js b/jscomp/test/dist/gpr_1501_test.js index 648834118d..8a18a6b396 100644 --- a/jscomp/test/dist/gpr_1501_test.js +++ b/jscomp/test/dist/gpr_1501_test.js @@ -36,8 +36,8 @@ const A = /* @__PURE__ */ Caml_exceptions.create("Gpr_1501_test.A"); const B = /* @__PURE__ */ Caml_exceptions.create("Gpr_1501_test.B"); -eq("File \"jscomp/test/gpr_1501_test.ml\", line 14, characters 7-14", "Not_found", Stdlib__Printexc.to_string(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +eq("File \"jscomp/test/gpr_1501_test.ml\", line 14, characters 7-14", "Not_found", Stdlib__Printexc.to_string(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }))); eq("File \"jscomp/test/gpr_1501_test.ml\", line 15, characters 7-14", /Gpr_1501_test.A\/[0-9]+/.test(Stdlib__Printexc.to_string(new Caml_js_exceptions.MelangeError(A, { @@ -55,7 +55,9 @@ module.exports = { suites, test_id, eq, + A$extension: A, A, + B$extension: B, B, } /* Not a pure module */ diff --git a/jscomp/test/dist/gpr_1701_test.js b/jscomp/test/dist/gpr_1701_test.js index 39227ff98f..d22fd9e9df 100644 --- a/jscomp/test/dist/gpr_1701_test.js +++ b/jscomp/test/dist/gpr_1701_test.js @@ -38,7 +38,7 @@ function read_lines(inc) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { l = undefined; } else { throw exn; @@ -65,7 +65,7 @@ function read_lines2(inc) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return Stdlib__List.rev(acc); } throw exn; @@ -89,7 +89,7 @@ function read_lines3(inc) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return Stdlib__List.rev(acc); } throw exn; @@ -108,6 +108,7 @@ function fff(f, x) { } module.exports = { + Foo$extension: Foo, Foo, test, read_lines, diff --git a/jscomp/test/dist/gpr_2316_test.js b/jscomp/test/dist/gpr_2316_test.js index 40b2aaced1..4f88f9b4ba 100644 --- a/jscomp/test/dist/gpr_2316_test.js +++ b/jscomp/test/dist/gpr_2316_test.js @@ -40,7 +40,7 @@ try { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Failure) { + if (msg.MEL_EXN_ID === Stdlib.Failure$extension) { y = msg._1; } else { throw msg; @@ -59,7 +59,7 @@ try { } catch (raw_msg$1){ const msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg$1); - if (msg$1.MEL_EXN_ID === Stdlib.Failure) { + if (msg$1.MEL_EXN_ID === Stdlib.Failure$extension) { x = msg$1._1; } else { throw msg$1; diff --git a/jscomp/test/dist/gpr_405_test.js b/jscomp/test/dist/gpr_405_test.js index d27e02f5ff..b0efefe895 100644 --- a/jscomp/test/dist/gpr_405_test.js +++ b/jscomp/test/dist/gpr_405_test.js @@ -19,7 +19,7 @@ function Make(funarg) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -93,8 +93,8 @@ function Make(funarg) { Curry._3(H.add, l_labels, top$1, 0); } if (Curry._2(H.find, l_labels, top$1) > Curry._2(H.find, n_labels, top$1)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Graph.Mincut: graph not reducible" }); } diff --git a/jscomp/test/dist/if_used_test.js b/jscomp/test/dist/if_used_test.js index a8ede1f72a..7566415f3b 100644 --- a/jscomp/test/dist/if_used_test.js +++ b/jscomp/test/dist/if_used_test.js @@ -36,6 +36,7 @@ const point = CamlinternalOO.make_class(shared, point_init); const p = Curry._2(point[0], undefined, 7); module.exports = { + point$class: point, point, p, } diff --git a/jscomp/test/dist/inline_map2_test.js b/jscomp/test/dist/inline_map2_test.js index 8ceb0814ae..c6b90e5d16 100644 --- a/jscomp/test/dist/inline_map2_test.js +++ b/jscomp/test/dist/inline_map2_test.js @@ -139,8 +139,8 @@ function Make(Ord) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(Ord.compare, x, param._1); @@ -169,8 +169,8 @@ function Make(Ord) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param._0; @@ -188,8 +188,8 @@ function Make(Ord) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param._3; @@ -760,8 +760,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Caml.caml_int_compare(x, param._1); @@ -792,8 +792,8 @@ function min_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param._0; @@ -812,8 +812,8 @@ function max_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param._3; @@ -1435,8 +1435,8 @@ function find$1(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Caml.caml_string_compare(x, param._1); @@ -1467,8 +1467,8 @@ function min_binding$1(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param._0; @@ -1487,8 +1487,8 @@ function max_binding$1(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param._3; diff --git a/jscomp/test/dist/inline_map_test.js b/jscomp/test/dist/inline_map_test.js index e1f188ad93..8f6ae0505c 100644 --- a/jscomp/test/dist/inline_map_test.js +++ b/jscomp/test/dist/inline_map_test.js @@ -123,8 +123,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Caml.caml_int_compare(x, param._1); diff --git a/jscomp/test/dist/inline_record_test.js b/jscomp/test/dist/inline_record_test.js index 2a5076bc52..48d572a307 100644 --- a/jscomp/test/dist/inline_record_test.js +++ b/jscomp/test/dist/inline_record_test.js @@ -212,12 +212,14 @@ module.exports = { v1, f, v2, + A0$extension: A0, A0, v3, vvv, ff, v4, v5, + A4$extension: A4, A4, v6, ff0, diff --git a/jscomp/test/dist/int_map.js b/jscomp/test/dist/int_map.js index b2de6ab370..45f4bab231 100644 --- a/jscomp/test/dist/int_map.js +++ b/jscomp/test/dist/int_map.js @@ -180,8 +180,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -197,8 +197,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -273,8 +273,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -379,8 +379,8 @@ function min_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -417,8 +417,8 @@ function max_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; diff --git a/jscomp/test/dist/js_exception_catch_test.js b/jscomp/test/dist/js_exception_catch_test.js index 65fbb2c13c..42d6c77d5a 100644 --- a/jscomp/test/dist/js_exception_catch_test.js +++ b/jscomp/test/dist/js_exception_catch_test.js @@ -66,7 +66,7 @@ try { } catch (raw_x){ const x = Caml_js_exceptions.internalToOCamlException(raw_x); - if (x.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (x.MEL_EXN_ID === Js__Js_exn.Error$extension) { add_test("File \"jscomp/test/js_exception_catch_test.ml\", line 21, characters 10-17", (function (param) { return { TAG: /* Ok */ 4, @@ -100,9 +100,9 @@ function test(f) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Not_found) { + if (e.MEL_EXN_ID === Stdlib.Not_found$extension) { return "Not_found"; - } else if (e.MEL_EXN_ID === Stdlib.Invalid_argument) { + } else if (e.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { if (e._1 === "x") { return "Invalid_argument"; } else { @@ -122,7 +122,7 @@ function test(f) { } else { return "C"; } - } else if (e.MEL_EXN_ID === Js__Js_exn.$$Error) { + } else if (e.MEL_EXN_ID === Js__Js_exn.Error$extension) { return "Js_error"; } else { return "Any"; @@ -135,8 +135,8 @@ eq("File \"jscomp/test/js_exception_catch_test.ml\", line 43, characters 5-12", }), "No_error"); eq("File \"jscomp/test/js_exception_catch_test.ml\", line 44, characters 5-12", test(function (param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }), "Not_found"); @@ -209,8 +209,11 @@ module.exports = { eq, false_, true_, + A$extension: A, A, + B$extension: B, B, + C$extension: C, C, test, } diff --git a/jscomp/test/dist/js_promise_basic_test.js b/jscomp/test/dist/js_promise_basic_test.js index 3e68eaa73e..790aa96ddd 100644 --- a/jscomp/test/dist/js_promise_basic_test.js +++ b/jscomp/test/dist/js_promise_basic_test.js @@ -38,8 +38,8 @@ function assert_bool(b) { if (b) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Assertion Failure." }); } @@ -74,7 +74,7 @@ function andThenTest(param) { const h = Promise.resolve(); function assertIsNotFound(x) { - const match = Caml_exceptions.caml_is_extension(x) && x.MEL_EXN_ID === Stdlib.Not_found ? 0 : undefined; + const match = Caml_exceptions.caml_is_extension(x) && x.MEL_EXN_ID === Stdlib.Not_found$extension ? 0 : undefined; if (match !== undefined) { return h; } @@ -89,8 +89,8 @@ function assertIsNotFound(x) { } function catchTest(param) { - const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); return p.then(fail).catch(assertIsNotFound); } @@ -105,8 +105,8 @@ function orResolvedTest(param) { } function orRejectedTest(param) { - const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); return p.catch(function (param) { return Promise.resolve(22); @@ -125,8 +125,8 @@ function orElseResolvedTest(param) { } function orElseRejectedResolveTest(param) { - const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); return p.catch(function (param) { return Promise.resolve(22); @@ -136,15 +136,15 @@ function orElseRejectedResolveTest(param) { } function orElseRejectedRejectTest(param) { - const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); return p.catch(function (param) { - return Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Stack_overflow, { - MEL_EXN_ID: Stdlib.Stack_overflow + return Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Stack_overflow$extension, { + MEL_EXN_ID: Stdlib.Stack_overflow$extension })); }).then(fail).catch(function (error) { - const match = Caml_exceptions.caml_is_extension(error) && error.MEL_EXN_ID === Stdlib.Stack_overflow ? 0 : undefined; + const match = Caml_exceptions.caml_is_extension(error) && error.MEL_EXN_ID === Stdlib.Stack_overflow$extension ? 0 : undefined; if (match !== undefined) { return h; } @@ -167,8 +167,8 @@ function resolveTest(param) { } function rejectTest(param) { - const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); return p.catch(assertIsNotFound); } @@ -181,8 +181,8 @@ function thenCatchChainResolvedTest(param) { } function thenCatchChainRejectedTest(param) { - const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); return p.then(fail).catch(assertIsNotFound); } @@ -205,14 +205,14 @@ function allResolvedTest(param) { } function is_not_found(error) { - return error.MEL_EXN_ID === Stdlib.Not_found; + return error.MEL_EXN_ID === Stdlib.Not_found$extension; } function allRejectTest(param) { const p1 = Promise.resolve(1); const p2 = Promise.resolve(3); - const p3 = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + const p3 = Promise.reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); const promises = [ p1, @@ -220,7 +220,7 @@ function allRejectTest(param) { p3 ]; return Promise.all(promises).then(fail).catch(function (error) { - assert_bool(error.MEL_EXN_ID === Stdlib.Not_found); + assert_bool(error.MEL_EXN_ID === Stdlib.Not_found$extension); return h; }); } @@ -241,11 +241,11 @@ function raceTest(param) { function createPromiseRejectTest(param) { return new Promise((function (resolve, reject) { - reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + reject(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })); })).catch(function (error) { - assert_bool(error.MEL_EXN_ID === Stdlib.Not_found); + assert_bool(error.MEL_EXN_ID === Stdlib.Not_found$extension); return h; }); } diff --git a/jscomp/test/dist/large_obj_test.js b/jscomp/test/dist/large_obj_test.js index 1535fc3890..c777034932 100644 --- a/jscomp/test/dist/large_obj_test.js +++ b/jscomp/test/dist/large_obj_test.js @@ -929,6 +929,7 @@ if (Caml_oo_curry.js1(291536121, 2, v) !== 56) { module.exports = { raw_object, + raw_class$class: raw_class, raw_class, v, } diff --git a/jscomp/test/dist/large_record_duplication_test.js b/jscomp/test/dist/large_record_duplication_test.js index 20ff02494e..ce56781534 100644 --- a/jscomp/test/dist/large_record_duplication_test.js +++ b/jscomp/test/dist/large_record_duplication_test.js @@ -35,8 +35,8 @@ function f_small(u) { y: u.y }); } else { - return new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + return new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -199,8 +199,8 @@ eq("File \"jscomp/test/large_record_duplication_test.ml\", line 270, characters eq("File \"jscomp/test/large_record_duplication_test.ml\", line 271, characters 6-13", get_x0$2(v3), 9); -eq("File \"jscomp/test/large_record_duplication_test.ml\", line 272, characters 6-13", get_x0$2(new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found +eq("File \"jscomp/test/large_record_duplication_test.ml\", line 272, characters 6-13", get_x0$2(new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension })), undefined); Mt.from_pair_suites("Large_record_duplication_test", suites.contents); @@ -237,6 +237,7 @@ module.exports = { eq, v0, f0, + Small$extension: Small, Small, f_small, h, @@ -244,6 +245,7 @@ module.exports = { f1, v2, f2, + A0$extension: A0, A0, f3, get_x0: get_x0$2, diff --git a/jscomp/test/dist/lazy_test.js b/jscomp/test/dist/lazy_test.js index 2fad7d3c64..a3b3833b0a 100644 --- a/jscomp/test/dist/lazy_test.js +++ b/jscomp/test/dist/lazy_test.js @@ -77,7 +77,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Match_failure) { + if (exn.MEL_EXN_ID === Stdlib.Match_failure$extension) { h = 2; } else { throw exn; @@ -132,8 +132,8 @@ const f006 = { const f007 = { LAZY_DONE: false, VAL: (function () { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }) }; @@ -142,8 +142,8 @@ const f008 = { LAZY_DONE: false, VAL: (function () { console.log("hi"); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }) }; diff --git a/jscomp/test/dist/lexer_test.js b/jscomp/test/dist/lexer_test.js index 7ba2ff985e..76a02df217 100644 --- a/jscomp/test/dist/lexer_test.js +++ b/jscomp/test/dist/lexer_test.js @@ -44,8 +44,8 @@ function from_tokens(lst) { l.contents = match.tl; return match.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); }; } diff --git a/jscomp/test/dist/libqueue_test.js b/jscomp/test/dist/libqueue_test.js index 88ca5b1b52..d12113e0d3 100644 --- a/jscomp/test/dist/libqueue_test.js +++ b/jscomp/test/dist/libqueue_test.js @@ -17,7 +17,7 @@ function to_list(q) { } const Q = { - Empty: Stdlib__Queue.Empty, + Empty$extension: Stdlib__Queue.Empty$extension, create: Stdlib__Queue.create, add: Stdlib__Queue.add, push: Stdlib__Queue.push, @@ -38,7 +38,8 @@ const Q = { to_seq: Stdlib__Queue.to_seq, add_seq: Stdlib__Queue.add_seq, of_seq: Stdlib__Queue.of_seq, - to_list + to_list, + Empty: Stdlib__Queue.Empty$extension }; function does_raise(f, q) { @@ -48,7 +49,7 @@ function does_raise(f, q) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib__Queue.Empty) { + if (exn.MEL_EXN_ID === Stdlib__Queue.Empty$extension) { return true; } throw exn; diff --git a/jscomp/test/dist/local_exception_test.js b/jscomp/test/dist/local_exception_test.js index de7251943e..06e7694a30 100644 --- a/jscomp/test/dist/local_exception_test.js +++ b/jscomp/test/dist/local_exception_test.js @@ -26,10 +26,13 @@ const d = new Caml_js_exceptions.MelangeError(D, { }); module.exports = { + A$extension: A, A, v, + B$extension: B, B, u, + D$extension: D, D, d, } diff --git a/jscomp/test/dist/map_find_test.js b/jscomp/test/dist/map_find_test.js index 0f13ff061a..829cde9e35 100644 --- a/jscomp/test/dist/map_find_test.js +++ b/jscomp/test/dist/map_find_test.js @@ -144,8 +144,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -321,8 +321,8 @@ function find$1(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$1.compare, x, param.v); diff --git a/jscomp/test/dist/map_test.js b/jscomp/test/dist/map_test.js index ba70007bfb..2e2054dedb 100644 --- a/jscomp/test/dist/map_test.js +++ b/jscomp/test/dist/map_test.js @@ -366,8 +366,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); diff --git a/jscomp/test/dist/ocaml_parsetree_test.js b/jscomp/test/dist/ocaml_parsetree_test.js index 30e7063d46..78d80a66a8 100644 --- a/jscomp/test/dist/ocaml_parsetree_test.js +++ b/jscomp/test/dist/ocaml_parsetree_test.js @@ -40,7 +40,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn; } @@ -172,7 +172,7 @@ function set_styles(s) { } function style_of_tag(s) { - if (s.MEL_EXN_ID === Stdlib__Format.String_tag) { + if (s.MEL_EXN_ID === Stdlib__Format.String_tag$extension) { switch (s._1) { case "dim" : return { @@ -205,8 +205,8 @@ function style_of_tag(s) { case "warning" : return cur_styles.contents.warning; default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { @@ -240,7 +240,7 @@ function set_color_tag_handling(ppf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Curry._1(partial_arg, param); } throw exn; @@ -260,7 +260,7 @@ function set_color_tag_handling(ppf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Curry._1(partial_arg$1, param); } throw exn; @@ -682,8 +682,8 @@ function parse_opt(error, active, flags, s) { const match$1 = get_num(0, i$1 + 2 | 0); const n2 = match$1[1]; if (n2 < n1) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -703,8 +703,8 @@ function parse_opt(error, active, flags, s) { if (c >= 65) { if (c >= 97) { if (c >= 123) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -713,8 +713,8 @@ function parse_opt(error, active, flags, s) { continue; } if (c >= 91) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -726,8 +726,8 @@ function parse_opt(error, active, flags, s) { if (c >= 64) { return loop_letter_num(set_all, i + 1 | 0); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -736,16 +736,16 @@ function parse_opt(error, active, flags, s) { case 43 : return loop_letter_num(set, i + 1 | 0); case 44 : - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); case 45 : return loop_letter_num(clear, i + 1 | 0); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -753,8 +753,8 @@ function parse_opt(error, active, flags, s) { }; const loop_letter_num = function (myset, i) { if (i >= s.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -762,8 +762,8 @@ function parse_opt(error, active, flags, s) { if (match >= 65) { if (match >= 97) { if (match >= 123) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -771,8 +771,8 @@ function parse_opt(error, active, flags, s) { return loop(i + 1 | 0); } if (match >= 91) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -780,8 +780,8 @@ function parse_opt(error, active, flags, s) { return loop(i + 1 | 0); } if (match > 57 || match < 48) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1319,8 +1319,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { Stdlib__Format.pp_print_flush(ppf, undefined); const pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } let lines = num_loc_lines.contents; @@ -1331,8 +1331,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } if (lines >= (num_lines - 2 | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } Caml_io.caml_ml_flush(Stdlib.stdout); @@ -1366,8 +1366,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { function highlight_dumb(ppf, lb, loc) { const pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } const end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; @@ -1506,7 +1506,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { norepeat = false; } else { throw exn; @@ -1522,7 +1522,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Exit) { + if (exn$1.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$1; @@ -1538,7 +1538,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Exit) { + if (exn$2.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$2; @@ -1945,7 +1945,7 @@ function error_of_printer(loc, print, x) { } register_error_of_exn(function (msg) { - if (msg.MEL_EXN_ID === Stdlib.Sys_error) { + if (msg.MEL_EXN_ID === Stdlib.Sys_error$extension) { return Curry._1(errorf(in_file(input_name.contents), undefined, undefined, { TAG: /* Format */ 0, _0: { @@ -2424,7 +2424,7 @@ function get_pre_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -2437,7 +2437,7 @@ function mark_pre_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -2461,7 +2461,7 @@ function get_post_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -2474,7 +2474,7 @@ function mark_post_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -2488,7 +2488,7 @@ function get_info(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -2510,7 +2510,7 @@ function get_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -2532,7 +2532,7 @@ function get_pre_extra_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -2554,7 +2554,7 @@ function get_post_extra_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -4593,8 +4593,8 @@ const yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); }), (function (__caml_parser_env) { @@ -9267,14 +9267,14 @@ const yyact = [ const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); } return _2.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); }), (function (__caml_parser_env) { @@ -9284,14 +9284,14 @@ const yyact = [ const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); } return _2.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); }), (function (__caml_parser_env) { @@ -10591,44 +10591,44 @@ const yyact = [ }; }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }) @@ -10726,7 +10726,7 @@ try { } catch (raw_exn$1){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = ""; } else { throw exn$2; @@ -10830,7 +10830,7 @@ function query(loc, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { let exit = 0; let v$1; try { @@ -10839,7 +10839,7 @@ function query(loc, str) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return { TAG: /* Dir_bool */ 0, _0: false @@ -12345,7 +12345,7 @@ function token(lexbuf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { TAG: /* LIDENT */ 11, _0: s @@ -12385,7 +12385,7 @@ function token(lexbuf) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Failure) { + if (exn$1.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -12411,7 +12411,7 @@ function token(lexbuf) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Failure) { + if (exn$2.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -12432,7 +12432,7 @@ function token(lexbuf) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Failure) { + if (exn$3.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -12453,7 +12453,7 @@ function token(lexbuf) { } catch (raw_exn$4){ const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); - if (exn$4.MEL_EXN_ID === Stdlib.Failure) { + if (exn$4.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -13506,7 +13506,7 @@ function wrap(parsing_fun, lexbuf) { } throw err; } - if (err.MEL_EXN_ID !== Stdlib__Parsing.Parse_error && err.MEL_EXN_ID !== Escape_error) { + if (err.MEL_EXN_ID !== Stdlib__Parsing.Parse_error$extension && err.MEL_EXN_ID !== Escape_error) { throw err; } diff --git a/jscomp/test/dist/ocaml_proto_test.js b/jscomp/test/dist/ocaml_proto_test.js index 213e84ab11..4e135f1323 100644 --- a/jscomp/test/dist/ocaml_proto_test.js +++ b/jscomp/test/dist/ocaml_proto_test.js @@ -197,7 +197,7 @@ function file_option(file_options, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -217,7 +217,7 @@ function rev_split_by_char(c, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: Stdlib__String.sub(s, i, s.length - i | 0), tl: l @@ -1468,74 +1468,74 @@ const yyact = [ Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }) @@ -4008,8 +4008,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -4399,7 +4399,7 @@ function find_field_option(field_options, option_name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4624,7 +4624,7 @@ function get_default(field_name, field_options, field_type) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4668,7 +4668,7 @@ function not_found(f) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return true; } throw exn; @@ -4686,8 +4686,8 @@ function list_assoc2(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -5058,7 +5058,7 @@ function compile_message_p2(types, param, message) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -7160,7 +7160,7 @@ function module_of_file_name(file_name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, _1: { @@ -7291,7 +7291,7 @@ function compile_field_type(field_name, all_types, file_options, field_options, } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Compilation_error, { MEL_EXN_ID: Compilation_error, _1: { diff --git a/jscomp/test/dist/ocaml_re_test.js b/jscomp/test/dist/ocaml_re_test.js index 925c13f787..12f44d1116 100644 --- a/jscomp/test/dist/ocaml_re_test.js +++ b/jscomp/test/dist/ocaml_re_test.js @@ -428,8 +428,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -1525,7 +1525,7 @@ function find_state(re, desc) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const st = mk_state(re.ncol, desc); Curry._3(Re_automata_State.Table.add, re.states, desc, st); return st; @@ -1594,7 +1594,7 @@ function $$final(info, st, cat) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const st$p = delta$1(info, cat, -1, st); const res_0 = st$p.idx; const res_1 = status(st$p); @@ -1621,7 +1621,7 @@ function find_initial_state(re, cat) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const st = find_state(re, Re_automata_State.create(cat, re.initial)); re.initial_states = { hd: [ @@ -1735,7 +1735,7 @@ function trans_set(cache, cm, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const l = Stdlib__List.fold_right((function (param, l) { return union(seq(Caml_bytes.get(cm, param[0]), Caml_bytes.get(cm, param[1])), l); }), s, /* [] */ 0); @@ -3226,14 +3226,14 @@ function exec_internal(name, posOpt, lenOpt, groups, re, s) { function offset$1(t, i) { if (((i << 1) + 1 | 0) >= t.marks.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const m1 = Caml_array.get(t.marks, (i << 1)); if (m1 === -1) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const p1 = Caml_array.get(t.gpos, m1) - 1 | 0; @@ -3316,15 +3316,15 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { for (let j = 0; j < len; ++j) { try { if (Caml_string.get(s$p, j) !== Caml_string.get(s, i.contents + j | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } catch (exn){ - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -3333,7 +3333,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } catch (raw_exn){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn$1.MEL_EXN_ID === Stdlib.Exit) { + if (exn$1.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$1; @@ -3811,7 +3811,7 @@ function parse(multiline, dollar_endonly, dotall, ungreedy, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Parse_error, { MEL_EXN_ID: Parse_error }); @@ -4115,12 +4115,12 @@ function exec(rex, pos, s) { return substr._0; } if (substr === /* Failed */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } diff --git a/jscomp/test/dist/ocaml_typedtree_test.js b/jscomp/test/dist/ocaml_typedtree_test.js index a1ae868586..a77f629041 100644 --- a/jscomp/test/dist/ocaml_typedtree_test.js +++ b/jscomp/test/dist/ocaml_typedtree_test.js @@ -45,7 +45,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn; } @@ -287,8 +287,8 @@ function find_in_path_uncap(path, name) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -299,7 +299,7 @@ function remove_file(filename) { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Sys_error) { + if (msg.MEL_EXN_ID === Stdlib.Sys_error$extension) { return; } throw msg; @@ -320,7 +320,7 @@ function chop_extension_if_any(fname) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exn.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { return fname; } throw exn; @@ -450,7 +450,7 @@ function set_styles(s) { } function style_of_tag(s) { - if (s.MEL_EXN_ID === Stdlib__Format.String_tag) { + if (s.MEL_EXN_ID === Stdlib__Format.String_tag$extension) { switch (s._1) { case "dim" : return { @@ -483,8 +483,8 @@ function style_of_tag(s) { case "warning" : return cur_styles.contents.warning; default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { @@ -518,7 +518,7 @@ function set_color_tag_handling(ppf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Curry._1(partial_arg, param); } throw exn; @@ -538,7 +538,7 @@ function set_color_tag_handling(ppf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Curry._1(partial_arg$1, param); } throw exn; @@ -960,8 +960,8 @@ function parse_opt(error, active, flags, s) { const match$1 = get_num(0, i$1 + 2 | 0); const n2 = match$1[1]; if (n2 < n1) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -981,8 +981,8 @@ function parse_opt(error, active, flags, s) { if (c >= 65) { if (c >= 97) { if (c >= 123) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -991,8 +991,8 @@ function parse_opt(error, active, flags, s) { continue; } if (c >= 91) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1004,8 +1004,8 @@ function parse_opt(error, active, flags, s) { if (c >= 64) { return loop_letter_num(set_all, i + 1 | 0); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1014,16 +1014,16 @@ function parse_opt(error, active, flags, s) { case 43 : return loop_letter_num(set, i + 1 | 0); case 44 : - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); case 45 : return loop_letter_num(clear, i + 1 | 0); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1031,8 +1031,8 @@ function parse_opt(error, active, flags, s) { }; const loop_letter_num = function (myset, i) { if (i >= s.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1040,8 +1040,8 @@ function parse_opt(error, active, flags, s) { if (match >= 65) { if (match >= 97) { if (match >= 123) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1049,8 +1049,8 @@ function parse_opt(error, active, flags, s) { return loop(i + 1 | 0); } if (match >= 91) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1058,8 +1058,8 @@ function parse_opt(error, active, flags, s) { return loop(i + 1 | 0); } if (match > 57 || match < 48) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -1597,8 +1597,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { Stdlib__Format.pp_print_flush(ppf, undefined); const pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } let lines = num_loc_lines.contents; @@ -1609,8 +1609,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } if (lines >= (num_lines - 2 | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } Caml_io.caml_ml_flush(Stdlib.stdout); @@ -1644,8 +1644,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { function highlight_dumb(ppf, lb, loc) { const pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } const end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; @@ -1784,7 +1784,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { norepeat = false; } else { throw exn; @@ -1800,7 +1800,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Exit) { + if (exn$1.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$1; @@ -1816,7 +1816,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Exit) { + if (exn$2.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$2; @@ -2239,7 +2239,7 @@ function error_of_printer_file(print, x) { } register_error_of_exn(function (msg) { - if (msg.MEL_EXN_ID === Stdlib.Sys_error) { + if (msg.MEL_EXN_ID === Stdlib.Sys_error$extension) { return Curry._1(errorf(in_file(input_name.contents), undefined, undefined, { TAG: /* Format */ 0, _0: { @@ -2534,8 +2534,8 @@ function find_same(id, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param._1; @@ -2555,8 +2555,8 @@ function find_same(id, _param) { _k = k$1.previous; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -2570,8 +2570,8 @@ function find_name(name, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param._1; @@ -3074,8 +3074,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(OrderedString.compare, x, param.v); @@ -3091,8 +3091,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -3167,8 +3167,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -3273,8 +3273,8 @@ function min_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -3311,8 +3311,8 @@ function max_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -4294,8 +4294,8 @@ function min_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -4749,8 +4749,8 @@ function min_elt$1(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -5141,8 +5141,8 @@ function find$1(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$1.compare, x, param.v); @@ -6248,8 +6248,8 @@ function forget_abbrev_rec(mem, path) { } const mem$p = mem._0; mem$p.contents = forget_abbrev_rec(mem$p.contents, path); - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } @@ -6260,7 +6260,7 @@ function forget_abbrev(mem, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return; } throw exn; @@ -6314,8 +6314,8 @@ function extract_label_aux(_hd, l, _param) { }; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -6583,7 +6583,7 @@ function read_cmi(filename) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.End_of_file) { + if (e.MEL_EXN_ID === Stdlib.End_of_file$extension) { Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, @@ -6593,7 +6593,7 @@ function read_cmi(filename) { } }); } - if (e.MEL_EXN_ID === Stdlib.Failure) { + if (e.MEL_EXN_ID === Stdlib.Failure$extension) { Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); throw new Caml_js_exceptions.MelangeError($$Error$1, { MEL_EXN_ID: $$Error$1, @@ -6754,7 +6754,7 @@ function extract(l, tbl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: [ name, @@ -7791,7 +7791,7 @@ function get_pre_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -7804,7 +7804,7 @@ function mark_pre_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -7828,7 +7828,7 @@ function get_post_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -7841,7 +7841,7 @@ function mark_post_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -7855,7 +7855,7 @@ function get_info(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -7877,7 +7877,7 @@ function get_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -7899,7 +7899,7 @@ function get_pre_extra_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -7921,7 +7921,7 @@ function get_post_extra_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -10308,8 +10308,8 @@ function find$2(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Caml_obj.caml_compare(x, param._1); @@ -10448,7 +10448,7 @@ function module_path(s, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return p; } throw exn; @@ -10482,7 +10482,7 @@ function modtype_path(s, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return p; } throw exn; @@ -10507,7 +10507,7 @@ function type_path(s, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return p; } throw exn; @@ -11078,7 +11078,7 @@ function modtype(s, mty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return mty; } throw exn; @@ -11283,7 +11283,7 @@ function already_defined(s, tbl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -11670,7 +11670,7 @@ function check_consistency(ps) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__Hashtbl.add(crc_units, name, [ crco, source @@ -11764,8 +11764,8 @@ function read_pers_struct(modname, filename) { function find_pers_struct(checkOpt, name) { const check = checkOpt !== undefined ? checkOpt : true; if (name === "*predef*") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let r; @@ -11774,7 +11774,7 @@ function find_pers_struct(checkOpt, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { r = undefined; } else { throw exn; @@ -11786,8 +11786,8 @@ function find_pers_struct(checkOpt, name) { if (sg !== undefined) { ps = sg; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { @@ -11798,10 +11798,10 @@ function find_pers_struct(checkOpt, name) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { Stdlib__Hashtbl.add(persistent_structures, name, undefined); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn$1; @@ -11823,12 +11823,12 @@ function find_module_descr(path, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (id.stamp === 0 && id.name !== current_unit.contents) { return find_pers_struct(undefined, id.name).ps_comps; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn; @@ -11838,8 +11838,8 @@ function find_module_descr(path, env) { if (c.TAG === /* Structure_comps */ 0) { return find$2(path._1, c._0.comp_components)[0]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Papply */ 2 : const p1 = path._0; @@ -11847,8 +11847,8 @@ function find_module_descr(path, env) { if (f.TAG !== /* Structure_comps */ 0) { return Curry._3(components_of_functor_appl$p.contents, f._0, p1, path._1); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -11862,12 +11862,12 @@ function find$3(proj1, proj2, path, env) { if (c.TAG === /* Structure_comps */ 0) { return find$2(path._1, Curry._1(proj2, c._0))[0]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Papply */ 2 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -11913,7 +11913,7 @@ function find_module(alias, path, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (id.stamp === 0 && id.name !== current_unit.contents) { const ps = find_pers_struct(undefined, id.name); return { @@ -11925,8 +11925,8 @@ function find_module(alias, path, env) { md_loc: none }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn; @@ -11942,16 +11942,16 @@ function find_module(alias, path, env) { md_loc: none }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Papply */ 2 : const p2 = path._1; const desc1 = find_module_descr(path._0, env); const f = force(components_of_module_maker$p.contents, desc1); if (f.TAG === /* Structure_comps */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const f$1 = f._0; @@ -11970,7 +11970,7 @@ function find_module(alias, path, env) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { const mty = modtype(add_module(f$1.fcomp_param, p2, f$1.fcomp_subst), f$1.fcomp_res); Stdlib__Hashtbl.add(f$1.fcomp_subst_cache, p2, mty); md_type$1 = mty; @@ -12044,7 +12044,7 @@ function normalize_path(lax, env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { let tmp = true; if (!lax) { let tmp$1; @@ -12075,7 +12075,7 @@ function normalize_path$1(oloc, env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (oloc !== undefined) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, @@ -12114,8 +12114,8 @@ function find_type_expansion(path, env) { } const path$p = normalize_path$1(undefined, env, path); if (same(path, path$p)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return [ @@ -12148,8 +12148,8 @@ function find_type_expansion_opt(path, env) { } const path$p = normalize_path$1(undefined, env, path); if (same(path, path$p)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return [ @@ -12173,8 +12173,8 @@ function find_modtype_expansion(path, env) { if (mty !== undefined) { return mty; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -12189,7 +12189,7 @@ function is_functor_arg(_path, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -12214,10 +12214,10 @@ function lookup_module_descr(lid, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (s === current_unit.contents) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const ps = find_pers_struct(undefined, s); @@ -12251,8 +12251,8 @@ function lookup_module_descr(lid, env) { match$1[0] ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Lapply */ 2 : const match$2 = lookup_module_descr(lid._0, env); @@ -12261,8 +12261,8 @@ function lookup_module_descr(lid, env) { const match$3 = find_module(false, p2, env); const f = force(components_of_module_maker$p.contents, match$2[1]); if (f.TAG === /* Structure_comps */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const f$1 = f._0; @@ -12304,10 +12304,10 @@ function lookup_module(load, lid, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (s === current_unit.contents) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (transparent_modules.contents && !load) { @@ -12316,7 +12316,7 @@ function lookup_module(load, lid, env) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { prerr_warning(none, { TAG: /* No_cmi_file */ 32, _0: s @@ -12352,8 +12352,8 @@ function lookup_module(load, lid, env) { _2: match$1[1] }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Lapply */ 2 : const match$2 = lookup_module_descr(lid._0, env); @@ -12367,8 +12367,8 @@ function lookup_module(load, lid, env) { }; const f = force(components_of_module_maker$p.contents, match$2[1]); if (f.TAG === /* Structure_comps */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } may(Curry._3(check_modtype_inclusion.contents, env, match$3.md_type, p2), f._0.fcomp_arg); @@ -12396,12 +12396,12 @@ function lookup(proj1, proj2, lid, env) { match$1[0] ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Lapply */ 2 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -12437,7 +12437,7 @@ function lookup_all_simple(proj1, proj2, shadow, lid, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { comps = /* [] */ 0; } else { throw exn; @@ -12452,12 +12452,12 @@ function lookup_all_simple(proj1, proj2, shadow, lid, env) { ]; }), comps); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); case /* Lapply */ 2 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -12552,7 +12552,7 @@ function mark_value_used(env, name, vd) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -12571,7 +12571,7 @@ function mark_type_used(env, name, vd) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -12591,7 +12591,7 @@ function mark_constructor_used(usage, env, name, vd, constr) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -12612,7 +12612,7 @@ function mark_extension_used(usage, env, ext, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -12634,7 +12634,7 @@ function set_type_used_callback(name, td, callback) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -12674,7 +12674,7 @@ function mark_type_path(env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -12716,8 +12716,8 @@ function lookup_constructor(lid, env) { Curry._1(match$1[1], undefined); return desc; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -12748,7 +12748,7 @@ function lookup_all_constructors$1(lid, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (is_lident(lid)) { return /* [] */ 0; } @@ -12779,7 +12779,7 @@ function mark_constructor(usage, env, name, desc) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -12792,7 +12792,7 @@ function mark_constructor(usage, env, name, desc) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -12825,7 +12825,7 @@ function lookup_all_labels$1(lid, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (is_lident(lid)) { return /* [] */ 0; } @@ -12918,7 +12918,7 @@ function iter_types(f) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { safe = false; } else { throw exn; @@ -13043,7 +13043,7 @@ function find_all_comps(proj, s, param) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -13162,7 +13162,7 @@ function add_gadt_instances(env, lv, tl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -13184,7 +13184,7 @@ function add_gadt_instance_chain(env, lv, t) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -13220,7 +13220,7 @@ function scrape_alias(env, path, mty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return mty; } throw exn; @@ -13235,7 +13235,7 @@ function scrape_alias(env, path, mty) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return mty; } throw exn$1; @@ -13734,7 +13734,7 @@ function prefix_idents_and_subst$1(root, sub, sg) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const sgs$1 = { contents: /* [] */ 0 }; @@ -13749,7 +13749,7 @@ function prefix_idents_and_subst$1(root, sub, sg) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { const r = prefix_idents_and_subst(root, sub, sg); sgs.contents = { hd: [ @@ -13771,7 +13771,7 @@ function add_to_tbl(id, decl, tbl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { decls = /* [] */ 0; } else { throw exn; @@ -14378,7 +14378,7 @@ function components_of_functor_appl(f, p1, p2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const p = { TAG: /* Papply */ 2, _0: p1, @@ -16670,8 +16670,8 @@ const yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); }), (function (__caml_parser_env) { @@ -21344,14 +21344,14 @@ const yyact = [ const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); } return _2.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); }), (function (__caml_parser_env) { @@ -21361,14 +21361,14 @@ const yyact = [ const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); } return _2.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); }), (function (__caml_parser_env) { @@ -22668,44 +22668,44 @@ const yyact = [ }; }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }) @@ -22803,7 +22803,7 @@ try { } catch (raw_exn$1){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = ""; } else { throw exn$2; @@ -22907,7 +22907,7 @@ function query(loc, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { let exit = 0; let v$1; try { @@ -22916,7 +22916,7 @@ function query(loc, str) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return { TAG: /* Dir_bool */ 0, _0: false @@ -24428,7 +24428,7 @@ function token(lexbuf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { TAG: /* LIDENT */ 11, _0: s @@ -24468,7 +24468,7 @@ function token(lexbuf) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Failure) { + if (exn$1.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, _1: { @@ -24494,7 +24494,7 @@ function token(lexbuf) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Failure) { + if (exn$2.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, _1: { @@ -24515,7 +24515,7 @@ function token(lexbuf) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Failure) { + if (exn$3.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, _1: { @@ -24536,7 +24536,7 @@ function token(lexbuf) { } catch (raw_exn$4){ const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); - if (exn$4.MEL_EXN_ID === Stdlib.Failure) { + if (exn$4.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$4, { MEL_EXN_ID: $$Error$4, _1: { @@ -25589,7 +25589,7 @@ function wrap$1(parsing_fun, lexbuf) { } throw err; } - if (err.MEL_EXN_ID !== Stdlib__Parsing.Parse_error && err.MEL_EXN_ID !== Escape_error) { + if (err.MEL_EXN_ID !== Stdlib__Parsing.Parse_error$extension && err.MEL_EXN_ID !== Escape_error) { throw err; } @@ -25784,7 +25784,7 @@ function alpha_pat(env, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = /* Tpat_any */ 0; } else { throw exn; @@ -25817,7 +25817,7 @@ function alpha_pat(env, p) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return new_p; } throw exn$1; @@ -27409,7 +27409,7 @@ try { } catch (raw_exn$2){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$3.MEL_EXN_ID === Stdlib.Not_found$extension) { need_to_clear_env = true; } else { throw exn$3; @@ -28108,7 +28108,7 @@ function in_pervasives(p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -28779,7 +28779,7 @@ function free_vars_rec(_real, _ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn; } @@ -29103,7 +29103,7 @@ function get_level(env, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return binding_time(p); } throw exn; @@ -29119,7 +29119,7 @@ function normalize_package_path(env, _p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { t = undefined; } else { throw exn; @@ -29322,7 +29322,7 @@ function generalize_expansive(env, var_level, _ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { variance = Stdlib__List.map((function (param) { return Types_Variance.may_inv; }), tyl); @@ -29472,7 +29472,7 @@ function inv_type(hash, pty, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const inv$1 = { inv_type: ty$1, inv_parents: pty @@ -29512,7 +29512,7 @@ function compute_univars(ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._3(TypeHash.add, node_univars, inv.inv_type, { contents: Curry._1(singleton$2, univ) }); @@ -29535,7 +29535,7 @@ function compute_univars(ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* Empty */ 0; } throw exn; @@ -29896,7 +29896,7 @@ function get_new_abstract_name(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { index = 0; } else { throw exn; @@ -30162,15 +30162,15 @@ function copy_sep(fixed, free, bound, visited, ty) { const match = Stdlib__List.assq(ty$1, visited); const dl = is_Tunivar(ty$1) ? /* [] */ 0 : diff_list(bound, match[1]); if (Caml_obj.caml_notequal(dl, /* [] */ 0) && conflicts(univars, dl)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return match[0]; } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const t$1 = newvar(undefined, undefined); const match$1 = ty$1.desc; let visited$1; @@ -30458,7 +30458,7 @@ function expand_abbrev_gen(kind, find_type_expansion, env, ty) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Cannot_expand, { MEL_EXN_ID: Cannot_expand }); @@ -30662,8 +30662,8 @@ function extract_concrete_typedecl(env, ty) { const ty$1 = repr(ty); const match = ty$1.desc; if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match.TAG === /* Tconstr */ 3) { @@ -30683,8 +30683,8 @@ function extract_concrete_typedecl(env, ty) { catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); if (exn.MEL_EXN_ID === Cannot_expand) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn; @@ -30696,8 +30696,8 @@ function extract_concrete_typedecl(env, ty) { match$1[2] ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -30780,7 +30780,7 @@ function enforce_constraints(env, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -30831,7 +30831,7 @@ function generic_abbrev(env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -30860,7 +30860,7 @@ function generic_private_abbrev(env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -30884,7 +30884,7 @@ function is_contractive(env, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -31043,7 +31043,7 @@ function unify_univar(t1, t2, _param) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -31129,7 +31129,7 @@ function occur_univar(env, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { visited.contents = Curry._3(add$4, ty$1, bound, visited.contents); tmp$1 = true; } else { @@ -31165,7 +31165,7 @@ function occur_univar(env, ty) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__List.iter((function (param) { return occur_rec(bound, param); }), tl); @@ -31269,7 +31269,7 @@ function univars_escape(env, univar_pairs, vl, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__List.iter(occur, tl); } throw exn; @@ -31596,7 +31596,7 @@ function is_newtype(env, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -31629,7 +31629,7 @@ function expands_to_datatype(env, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } if (exn.MEL_EXN_ID === Cannot_expand) { @@ -31716,7 +31716,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._3(TypePairs.add, type_pairs, [ t1$p$1, t2$p$1 @@ -31838,7 +31838,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { inj = Stdlib__List.map((function (param) { return false; }), tl1); @@ -32003,7 +32003,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn$2; @@ -32349,7 +32349,7 @@ function mcomp(type_pairs, env, _t1, _t2) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$3.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn$3; @@ -32543,7 +32543,7 @@ function find_newtype_level(env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -32692,16 +32692,16 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { }, n), env$p); const decl = match[1]; if (decl.type_arity !== 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } let tmp = decl.type_kind; if (/* tag */ typeof tmp !== "object" && typeof tmp !== "function") { if (tmp === /* Type_abstract */ 0) { if (decl.type_private === /* Private */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } const t2 = decl.type_manifest; @@ -32717,23 +32717,23 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { if (allow_absent) { return complete(nl, ntl2); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); let exit$1 = 0; - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (allow_absent) { _nl1 = nl; continue; @@ -32743,9 +32743,9 @@ function complete_type_list(allow_absentOpt, env, nl1, lv2, mty2, nl2, tl2) { exit$1 = 2; } if (exit$1 === 2) { - if (exn.MEL_EXN_ID === Stdlib.Exit) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn; @@ -32776,8 +32776,8 @@ function unify_package(env, unify_list, lv1, p1, n1, tl1, lv2, p2, n2, tl2) { if (eq_package_path(env, p1, p2) || Curry._7(package_subtype.contents, env, p1, n1, tl1, p2, n2, tl2) && Curry._7(package_subtype.contents, env, p2, n2, tl2, p1, n1, tl1)) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -32795,7 +32795,7 @@ function unify_eq(env, t1, t2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -32964,7 +32964,7 @@ function unify_row(env, row1, row2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -33686,7 +33686,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { inj = Stdlib__List.map((function (param) { return false; }), tl1); @@ -33966,7 +33966,7 @@ function unify3(env, t1, t1$p, t2, t2$p) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { if (umode.contents === /* Expression */ 0) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, @@ -34539,7 +34539,7 @@ function filter_self_method(env, lab, priv, meths, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const pair_0 = create(lab); const pair = [ pair_0, @@ -34660,7 +34660,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._3(TypePairs.add, type_pairs, [ t1$p$1, t2$p$1 @@ -35127,7 +35127,7 @@ function moregen(inst_nongen, type_pairs, env, t1, t2) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */ 0 @@ -35475,7 +35475,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (Stdlib__List.exists((function (param) { return param[1] === t2$1; }), subst.contents)) { @@ -35527,7 +35527,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._3(TypePairs.add, type_pairs, [ t1$p$1, t2$p$1 @@ -35565,7 +35565,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { if (Stdlib__List.exists((function (param) { return param[1] === t2$p$1; }), subst.contents)) { @@ -35944,7 +35944,7 @@ function eqtype(rename, type_pairs, subst, env, t1, t2) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$3.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Unify, { MEL_EXN_ID: Unify, _1: /* [] */ 0 @@ -36382,7 +36382,7 @@ function match_class_types(traceOpt, env, pat_sch, subj_sch) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: { TAG: /* CM_Missing_value */ 8, @@ -36731,7 +36731,7 @@ function match_class_declarations(env, patt_params, patt_type, subj_params, subj } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: { TAG: /* CM_Missing_value */ 8, @@ -36926,8 +36926,8 @@ function find_cltype_for_path(env, p) { if (ty !== undefined) { const match$1 = repr(ty).desc; if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$1.TAG === /* Tobject */ 4) { @@ -36939,16 +36939,16 @@ function find_cltype_for_path(env, p) { ty ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -36997,7 +36997,7 @@ function build_subtype(env, visited, loops, posi, level, t) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return [ t$1, /* Unchanged */ 0 @@ -37075,8 +37075,8 @@ function build_subtype(env, visited, loops, posi, level, t) { try { const match$2 = t$p$1.desc; if (/* tag */ typeof match$2 !== "object" && typeof match$2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$2.TAG === /* Tobject */ 4) { @@ -37087,8 +37087,8 @@ function build_subtype(env, visited, loops, posi, level, t) { const match$4 = ty$1.desc; let match$5; if (/* tag */ typeof match$4 !== "object" && typeof match$4 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$4.TAG === /* Tobject */ 4) { @@ -37100,26 +37100,26 @@ function build_subtype(env, visited, loops, posi, level, t) { match$6[1] ]; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const tl1 = match$5[1]; if (Stdlib__List.exists((function (param) { return deep_occur(ty$1, param); }), tl1)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } ty$1.desc = { @@ -37183,17 +37183,17 @@ function build_subtype(env, visited, loops, posi, level, t) { /* Changed */ 2 ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { const match$8 = build_subtype(env, visited, loops, posi, level$p, t$p$1); const c$2 = match$8[1]; if (c$2 > /* Unchanged */ 0) { @@ -37264,7 +37264,7 @@ function build_subtype(env, visited, loops, posi, level, t) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$3.MEL_EXN_ID === Stdlib.Not_found$extension) { return [ t$1, /* Unchanged */ 0 @@ -37512,7 +37512,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._3(TypePairs.add, subtypes, [ t1$1, t2$1 @@ -37757,8 +37757,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { break; case /* Tunivar */ 9 : if (/* tag */ typeof match$7 !== "object" && typeof match$7 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$7.TAG === /* Tunivar */ 9) { @@ -37780,19 +37780,19 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { return cstrs; } if (match$1.TAG === /* Rpresent */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } else if (match.TAG === /* Rpresent */ 0) { const t1$1 = match._0; if (t1$1 !== undefined) { if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { @@ -37801,100 +37801,100 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { t1 = t1$1; t2 = t2$1; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { if (match$1._0 !== undefined) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } return cstrs; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else if (match._0) { if (match._1) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1._0) { if (match$1._1) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } return cstrs; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } else { const match$2 = match._1; if (match$2) { if (match$2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1._0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } const match$3 = match$1._1; if (match$3) { if (match$3.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } t1 = match$2.hd; t2 = match$3.hd; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -37907,16 +37907,16 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { }, t1, t2, cstrs); }), cstrs$4, pairs); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -37931,8 +37931,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { exit$6 = 2; break; default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -37948,8 +37948,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { const t1 = match._0; if (t1 !== undefined) { if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { @@ -37963,12 +37963,12 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { tl: trace }, t1, t2, cstrs); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } @@ -37977,8 +37977,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { if (match$2) { const t1$1 = match$2.hd; if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { @@ -37992,39 +37992,39 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { tl: trace }, t1$1, t2$1, cstrs); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$1.TAG === /* Rpresent */ 0) { if (match$1._0 !== undefined) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } return cstrs; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); }), cstrs, pairs); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } @@ -38033,7 +38033,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Exit) { + if (exn$1.MEL_EXN_ID === Stdlib.Exit$extension) { return { hd: [ trace, @@ -38182,8 +38182,8 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); if (exn$3.MEL_EXN_ID === Unify) { backtrack(snap); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn$3; @@ -38191,7 +38191,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } catch (raw_exn$4){ const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); - if (exn$4.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$4.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: [ trace, @@ -38307,7 +38307,7 @@ function subtype_rec(env, _trace, _t1, _t2, _cstrs) { } catch (raw_exn$5){ const exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); - if (exn$5.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$5.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: [ trace, @@ -38691,7 +38691,7 @@ function nondep_type_rec(env, id, _ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const ty$p = newty2(100000000, { TAG: /* Tvar */ 0, _0: undefined @@ -38716,13 +38716,13 @@ function nondep_type_rec(env, id, _ty) { catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); if (exn$1.MEL_EXN_ID === Cannot_expand) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (exn$1.MEL_EXN_ID === Unify) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn$1; @@ -38775,7 +38775,7 @@ function nondep_type_rec(env, id, _ty) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._3(TypeHash.add, nondep_variants, more, ty$p); const $$static = static_row(row$1); const more$p = $$static ? newty2(100000000, /* Tnil */ 0) : more; @@ -38807,8 +38807,8 @@ function nondep_type_rec(env, id, _ty) { if (isfree(id, p$2)) { const p$p = normalize_package_path(env, p$2); if (isfree(id, p$p)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } tmp = { @@ -38851,11 +38851,11 @@ function nondep_type(env, id, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn; @@ -38930,7 +38930,7 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { if (is_covariant) { tk = /* Type_abstract */ 0; } else { @@ -38947,7 +38947,7 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { if (is_covariant) { tm = undefined; } else { @@ -38974,11 +38974,11 @@ function nondep_type_decl(env, mid, id, is_covariant, decl) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn$2; @@ -39000,8 +39000,8 @@ function nondep_extension_constructor(env, mid, ext) { const ty$p = nondep_type_rec(env, mid, ty); const match$1 = repr(ty$p).desc; if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$1.TAG === /* Tconstr */ 3) { @@ -39010,8 +39010,8 @@ function nondep_extension_constructor(env, mid, ext) { match$1._1 ]; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { @@ -39043,11 +39043,11 @@ function nondep_extension_constructor(env, mid, ext) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { Curry._1(TypeHash.clear, nondep_hash); Curry._1(TypeHash.clear, nondep_variants); - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw exn; @@ -39673,8 +39673,8 @@ function print_simple_out_type(ppf, s) { const single = tys.hd; if (!/* tag */ (typeof single !== "object" && typeof single !== "function") && single.TAG === /* Otyp_tuple */ 9) { if (tys.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (variant === "Arity_1") { @@ -39696,8 +39696,8 @@ function print_simple_out_type(ppf, s) { } } if (tys.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return { @@ -39707,8 +39707,8 @@ function print_simple_out_type(ppf, s) { _2: result }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; let exit$3 = 0; @@ -39833,8 +39833,8 @@ function print_simple_out_type(ppf, s) { const single = tys.hd; if (!/* tag */ (typeof single !== "object" && typeof single !== "function") && single.TAG === /* Otyp_tuple */ 9) { if (tys.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (variant$1 === "Arity_1") { @@ -39856,8 +39856,8 @@ function print_simple_out_type(ppf, s) { } } if (tys.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return { @@ -39867,8 +39867,8 @@ function print_simple_out_type(ppf, s) { _2: result }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; let exit$4 = 0; @@ -43168,7 +43168,7 @@ function ident_name(id) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return id.name; } throw exn; @@ -43182,7 +43182,7 @@ function add_unique(id) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { unique_names.contents = add(id, unique_toplevel_name(id), unique_names.contents); return; } @@ -45095,8 +45095,8 @@ function find$4(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$3.compare, x, param.v); @@ -45124,8 +45124,8 @@ function index(l, x) { return 1 + index(l.tl, x) | 0; } } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -45193,7 +45193,7 @@ function normalize_type_path(cacheOpt, env, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return [ p, /* Id */ 0 @@ -45278,7 +45278,7 @@ function set_printing_env(env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { printing_map.contents = Curry._3(add$8, p1, { contents: { TAG: /* Paths */ 0, @@ -45378,8 +45378,8 @@ function best_type_path(p) { }), l); continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; }; @@ -45393,7 +45393,7 @@ function best_type_path(p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp$1 = true; } else { throw exn; @@ -45414,7 +45414,7 @@ function best_type_path(p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { p$p$p = p$p; } else { throw exn; @@ -45494,7 +45494,7 @@ function name_of_type(t) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const match = t.desc; let name; let exit = 0; @@ -50459,7 +50459,7 @@ function scrape(env, mty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return mty; } throw exn; @@ -50749,7 +50749,7 @@ function nondep_supertype(env, mid, mty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { switch (va) { case /* Co */ 0 : return { @@ -50766,8 +50766,8 @@ function nondep_supertype(env, mid, mty) { }; case /* Contra */ 1 : case /* Strict */ 2 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { @@ -50840,7 +50840,7 @@ function enrich_typedecl(env, p, decl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return decl; } throw exn; @@ -50966,15 +50966,15 @@ function contains_type(env, _path) { if (mty !== undefined) { return contains_type(env, mty); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } throw exn; @@ -51007,19 +51007,19 @@ function contains_type_sig(env) { if (match.type_private !== /* Private */ 0) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } case /* Sig_module */ 3 : return contains_type(env, param._1.md_type); case /* Sig_modtype */ 4 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); default: return; @@ -51035,7 +51035,7 @@ function contains_type$1(env, mty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return true; } throw exn; @@ -51412,8 +51412,8 @@ function find$5(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(P.compare, x, param.v); @@ -51700,7 +51700,7 @@ function rollback_path(subst, _p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { switch (p.TAG) { case /* Pdot */ 1 : const p1 = p._0; @@ -51737,7 +51737,7 @@ function collect_ids(subst, bindings, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { ids = /* Empty */ 0; } else { throw exn; @@ -52072,7 +52072,7 @@ function may_expand_module_path(env, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -52085,7 +52085,7 @@ function expand_module_path(env, cxt, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, _1: { @@ -52111,7 +52111,7 @@ function expand_module_alias(env, cxt, path) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$5, { MEL_EXN_ID: $$Error$5, _1: { @@ -52635,7 +52635,7 @@ function signatures(env, cxt, subst, sig1, sig2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const unpaired$1 = match$1[1] ? ({ hd: [ cxt, @@ -52899,8 +52899,8 @@ function check_modtype_inclusion$1(env, mty1, path1, mty2) { catch (raw_reasons){ const reasons = Caml_js_exceptions.internalToOCamlException(raw_reasons); if (reasons.MEL_EXN_ID === $$Error$5) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } throw reasons; @@ -55971,7 +55971,7 @@ function simple_match_args(p1, _p2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return omega; } throw exn; @@ -56145,7 +56145,7 @@ function discr_pat(q, pss) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: [ param[0], @@ -57212,8 +57212,8 @@ function build_other(ext, env) { while (true) { const i = _i; if (i > imax) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const ci = Stdlib__Char.chr(i); @@ -57232,7 +57232,7 @@ function build_other(ext, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { _param = param.tl; continue; } @@ -59637,7 +59637,7 @@ function warning_attribute(attrs) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib__Arg.Bad) { + if (exn.MEL_EXN_ID === Stdlib__Arg.Bad$extension) { return prerr_warning(loc, { TAG: /* Attribute_payload */ 30, _0: txt, @@ -59680,7 +59680,7 @@ function narrow_unbound_lid_error(env, loc, lid, make_error) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return narrow_unbound_lid_error(env, loc, mlid, (function (lid) { return { TAG: /* Unbound_module */ 20, @@ -59766,7 +59766,7 @@ function find_component(lookup, make_error, env, loc, lid) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return narrow_unbound_lid_error(env, loc, lid, make_error); } if (exn.MEL_EXN_ID === Recmodule) { @@ -60076,7 +60076,7 @@ function transl_type_param(env, styp) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const v = new_global_var(validate_name(name$1), undefined); type_variables.contents = add$5(name$1, v, type_variables.contents); ty$1 = v; @@ -60184,13 +60184,13 @@ function transl_type(env, policy, styp) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { try { ty$1 = instance(undefined, env, find$2(name$1, used_variables.contents)[0]); } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { const v = policy === /* Univars */ 2 ? new_pre_univar(name$1, undefined) : newvar(validate_name(name$1), undefined); used_variables.contents = add$5(name$1, [ v, @@ -60356,8 +60356,8 @@ function transl_type(env, policy, styp) { if (ty !== undefined) { const row = repr(ty).desc; if (/* tag */ typeof row !== "object" && typeof row !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } switch (row.TAG) { @@ -60368,17 +60368,17 @@ function transl_type(env, policy, styp) { if (static_row(row._0)) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } }; @@ -60396,7 +60396,7 @@ function transl_type(env, policy, styp) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { try { const s = lid$1.txt; let lid2; @@ -60427,7 +60427,7 @@ function transl_type(env, policy, styp) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$3.MEL_EXN_ID === Stdlib.Not_found$extension) { find_class$1(env, styp.ptyp_loc, lid$1.txt); throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", @@ -60627,7 +60627,7 @@ function transl_type(env, policy, styp) { } catch (raw_exn$4){ const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); - if (exn$4.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$4.MEL_EXN_ID === Stdlib.Not_found$extension) { t$1 = instance(undefined, env, find$2(alias, used_variables.contents)[0]); } else { throw exn$4; @@ -60657,7 +60657,7 @@ function transl_type(env, policy, styp) { } catch (raw_exn$5){ const exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); - if (exn$5.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$5.MEL_EXN_ID === Stdlib.Not_found$extension) { if (principal.contents) { begin_def(); } @@ -60812,7 +60812,7 @@ function transl_type(env, policy, styp) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__Hashtbl.add(hfields, h, [ l, f @@ -60889,15 +60889,15 @@ function transl_type(env, policy, styp) { ]; try { Stdlib__Hashtbl.iter((function (param, param$1) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); }), hfields); name$2.contents = nm; } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { name$2.contents = undefined; } else { throw exn; @@ -61295,7 +61295,7 @@ function globalize_used_variables(env, fixed) { } catch (raw_exn){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { if (fixed && is_Tvar(repr(ty))) { throw new Caml_js_exceptions.MelangeError($$Error$6, { MEL_EXN_ID: $$Error$6, @@ -62706,8 +62706,8 @@ function extract_concrete_record(env, ty) { const match = extract_concrete_typedecl(env, ty); const match$1 = match[2].type_kind; if (/* tag */ typeof match$1 !== "object" && typeof match$1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$1.TAG === /* Type_record */ 0) { @@ -62717,8 +62717,8 @@ function extract_concrete_record(env, ty) { match$1._0 ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -62735,8 +62735,8 @@ function extract_concrete_variant(env, ty) { /* [] */ 0 ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } else { if (cstrs.TAG !== /* Type_record */ 0) { @@ -62746,8 +62746,8 @@ function extract_concrete_variant(env, ty) { cstrs._0 ]; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -62761,7 +62761,7 @@ function extract_label_names(sexp, env, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -63065,15 +63065,15 @@ function has_variants(p) { if (tmp.TAG !== /* Tpat_variant */ 5) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); }), p); return false; } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return true; } throw exn; @@ -63633,7 +63633,7 @@ function expand_path(env, _p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { decl = undefined; } else { throw exn; @@ -63742,7 +63742,7 @@ function lookup_from_type(env, tpath, lid) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: lid.loc, @@ -63761,8 +63761,8 @@ function lookup_from_type(env, tpath, lid) { } case /* Ldot */ 1 : case /* Lapply */ 2 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -63864,7 +63864,7 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { try { const lbl$2 = lookup_from_type(env, tpath, lid); Curry._2(check_lk, tpath, lbl$2); @@ -63885,7 +63885,7 @@ function disambiguate(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { if (Caml_obj.caml_equal(lbls, /* [] */ 0)) { lbl = unbound_label_error(env, lid); } else { @@ -64315,7 +64315,7 @@ function lookup_from_type$1(env, tpath, lid) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: lid.loc, @@ -64334,8 +64334,8 @@ function lookup_from_type$1(env, tpath, lid) { } case /* Ldot */ 1 : case /* Lapply */ 2 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } @@ -64437,7 +64437,7 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { try { const lbl$2 = lookup_from_type$1(env, tpath, lid); Curry._2(check_lk, tpath, lbl$2); @@ -64458,7 +64458,7 @@ function disambiguate$1(warnOpt, check_lkOpt, scope, lid, env, opath, lbls) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { if (Caml_obj.caml_equal(lbls, /* [] */ 0)) { lbl = unbound_constructor_error(env, lid); } else { @@ -64734,7 +64734,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { opath = undefined; } else { throw exn; @@ -64947,7 +64947,7 @@ function type_pat(constrs, labels, no_existentials, mode, env, sp, expected_ty) } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { match$3 = [ undefined, newvar(undefined, undefined) @@ -65844,8 +65844,8 @@ function approx_type(env, _sty) { try { const match = lookup_type$1(args._0.txt, env); if (Stdlib__List.length(ctl) !== match[1].type_arity) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const tyl = Stdlib__List.map((function (param) { @@ -65855,7 +65855,7 @@ function approx_type(env, _sty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return newvar(undefined, undefined); } throw exn; @@ -66128,8 +66128,8 @@ function generalizable(level, ty) { return; } if (ty$1.level <= level) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } mark_type_node(ty$1); @@ -66142,7 +66142,7 @@ function generalizable(level, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { unmark_type(ty); return false; } @@ -66191,8 +66191,8 @@ function contains_variant_either(ty) { if (match.TAG === /* Rpresent */ 0) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); }), row$1.row_fields); } @@ -66205,7 +66205,7 @@ function contains_variant_either(ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { unmark_type(ty); return true; } @@ -66251,8 +66251,8 @@ function contains_polymorphic_variant(p) { switch (match.TAG) { case /* Ppat_variant */ 6 : case /* Ppat_type */ 11 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); default: return iter_ppat(loop, p); @@ -66264,7 +66264,7 @@ function contains_polymorphic_variant(p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return true; } throw exn; @@ -66286,14 +66286,14 @@ function contains_gadt(env, p) { if (!param[0].cstr_generalized) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); }), cstrs); } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn; } @@ -66306,7 +66306,7 @@ function contains_gadt(env, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return true; } throw exn; @@ -66411,7 +66411,7 @@ function duplicate_ident_types(loc, caselist, env) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return env; } throw exn; @@ -66991,7 +66991,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { opath = undefined; } else { throw exn; @@ -67136,15 +67136,15 @@ function type_expect_(in_function, env, sexp, ty_expected) { if (sarg$1 !== undefined) { const row = match$18.desc; if (/* tag */ typeof row !== "object" && typeof row !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (row.TAG === /* Tvariant */ 8) { const row0 = match$19.desc; if (/* tag */ typeof row0 !== "object" && typeof row0 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (row0.TAG === /* Tvariant */ 8) { @@ -67152,16 +67152,16 @@ function type_expect_(in_function, env, sexp, ty_expected) { const match$20 = row_field_repr_aux(/* [] */ 0, Stdlib__List.assoc(l$1, row$1.row_fields)); const match$21 = row_field_repr_aux(/* [] */ 0, Stdlib__List.assoc(l$1, row0._0.row_fields)); if (/* tag */ typeof match$20 !== "object" && typeof match$20 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$20.TAG === /* Rpresent */ 0) { const ty$1 = match$20._0; if (ty$1 !== undefined) { if (/* tag */ typeof match$21 !== "object" && typeof match$21 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (match$21.TAG === /* Rpresent */ 0) { @@ -67181,42 +67181,42 @@ function type_expect_(in_function, env, sexp, ty_expected) { exp_attributes: sexp.pexp_attributes }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { const arg$2 = may_map((function (param) { return type_exp(env, param); }), sarg$1); @@ -67289,7 +67289,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -67913,7 +67913,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn$5){ const exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); - if (exn$5.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$5.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: e.pexp_loc, @@ -68219,7 +68219,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn$7){ const exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); - if (exn$7.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$7.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: loc, @@ -68270,7 +68270,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn$8){ const exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); - if (exn$8.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$8.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: loc, @@ -68309,7 +68309,7 @@ function type_expect_(in_function, env, sexp, ty_expected) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$7, { MEL_EXN_ID: $$Error$7, _1: loc, @@ -68885,7 +68885,7 @@ function type_label_access(env, loc, srecord, lid) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { opath = undefined; } else { throw exn; @@ -69457,7 +69457,7 @@ function type_application(env, funct, sargs) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const match$9 = extract_label_aux(/* [] */ 0, name, more_sargs); const sargs1$1 = match$9[2]; const sarg0$2 = match$9[1]; @@ -69500,7 +69500,7 @@ function type_application(env, funct, sargs) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { match$4 = [ sargs, more_sargs, @@ -70026,7 +70026,7 @@ function type_cases(in_function, env, ty_arg, ty_res, partial_flag, loc, caselis catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); let exit = 0; - if (exn.MEL_EXN_ID === Empty || exn.MEL_EXN_ID === Stdlib.Not_found || exn.MEL_EXN_ID === NoGuard) { + if (exn.MEL_EXN_ID === Empty || exn.MEL_EXN_ID === Stdlib.Not_found$extension || exn.MEL_EXN_ID === NoGuard) { exit = 1; } else { throw exn; @@ -70263,7 +70263,7 @@ function type_let(checkOpt, check_strictOpt, env, rec_flag, spat_sexp_list, scop } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__Hashtbl.add(value_declarations, key, callback); } throw exn; @@ -72876,7 +72876,7 @@ function check_constraints_rec(env, loc, visited, _ty) { ] }); } - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, _1: loc, @@ -73048,8 +73048,8 @@ function find$6(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$6.compare, x, param.v); @@ -73111,7 +73111,7 @@ function check_coherence(env, loc, id, decl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$8, { MEL_EXN_ID: $$Error$8, _1: loc, @@ -73179,7 +73179,7 @@ function check_well_founded(env, loc, path, to_check, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { match$1 = [ false, exp_nodes @@ -73352,7 +73352,7 @@ function check_recursion(env, loc, path, decl, to_check) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn$1; } @@ -73384,7 +73384,7 @@ function get_variance(ty, visited) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Types_Variance.$$null; } throw exn; @@ -73442,7 +73442,7 @@ function compute_variance(env, visited, vari, ty) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__List.iter((function (param) { return compute_variance_rec(Types_Variance.may_inv, param); }), tl$1); @@ -74071,7 +74071,7 @@ function check_duplicates(sdecl_list) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__Hashtbl.add(constrs, pcd.pcd_name.txt, sdecl.ptype_name.txt); } throw exn; @@ -74092,7 +74092,7 @@ function check_duplicates(sdecl_list) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Stdlib__Hashtbl.add(labels, cname.txt, sdecl.ptype_name.txt); } throw exn; @@ -74472,7 +74472,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -74718,7 +74718,7 @@ function transl_type_decl(env, rec_flag, sdecl_list) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -75037,7 +75037,7 @@ function transl_type_extension(check_open, env, loc, styext) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn; } @@ -75579,7 +75579,7 @@ function explain_unbound(ppf, tv, tl, typ, kwd, lab) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -77276,7 +77276,7 @@ function enter_val(cl_num, vars, inh, lab, mut, virt, ty, val_env, met_env, par_ } }); } - if (tr.MEL_EXN_ID === Stdlib.Not_found) { + if (tr.MEL_EXN_ID === Stdlib.Not_found$extension) { match = [ undefined, virt @@ -77591,7 +77591,7 @@ function add_val(env, loc, lab, param, val_sig) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { virt$1 = virt; } else { throw exn; @@ -79137,7 +79137,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const match$5 = extract_label_aux(/* [] */ 0, name, more_sargs); match$3 = [ match$5[0], @@ -79174,7 +79174,7 @@ function class_expr(cl_num, val_env, met_env, _scl) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { match = [ sargs, more_sargs, @@ -80249,7 +80249,7 @@ function unify_parents_struct(env, ty, st) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -82390,8 +82390,8 @@ function merge_constraint(initial_env, loc, sg, constr) { if (match$1 !== undefined) { const match$2 = match$1.ptyp_desc; if (/* tag */ typeof match$2 !== "object" && typeof match$2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (match$2.TAG === /* Ptyp_constr */ 3) { @@ -82400,54 +82400,54 @@ function merge_constraint(initial_env, loc, sg, constr) { Stdlib__List.iter2((function (x, param) { const sx = x.ptyp_desc; if (/* tag */ typeof sx !== "object" && typeof sx !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (sx.TAG === /* Ptyp_var */ 0) { const sy = param[0].ptyp_desc; if (/* tag */ typeof sy !== "object" && typeof sy !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } if (sy.TAG === /* Ptyp_var */ 0) { if (sx._0 === sy._0) { return; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } }), stl, sdecl.ptype_params); lid$1 = match$2._0; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, _1: sdecl.ptype_loc, @@ -82463,7 +82463,7 @@ function merge_constraint(initial_env, loc, sg, constr) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -84160,7 +84160,7 @@ function modtype_of_package(env, loc, p, nl, tl) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const error = { TAG: /* Unbound_modtype */ 22, _0: lid_of_path(undefined, p) @@ -84456,7 +84456,7 @@ function type_module$1(aliasOpt, sttn, funct_body, anchor, env, smod) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, _1: smod.pmod_loc, @@ -85438,7 +85438,7 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError($$Error$10, { MEL_EXN_ID: $$Error$10, _1: in_file(sourcefile), diff --git a/jscomp/test/dist/offset.js b/jscomp/test/dist/offset.js index 73a330aa39..a563ca67f8 100644 --- a/jscomp/test/dist/offset.js +++ b/jscomp/test/dist/offset.js @@ -173,8 +173,8 @@ function min_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -205,8 +205,8 @@ function max_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -737,8 +737,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -755,8 +755,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -819,8 +819,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; diff --git a/jscomp/test/dist/opr_3576_test.js b/jscomp/test/dist/opr_3576_test.js index 6f9ad121d0..17b9277325 100644 --- a/jscomp/test/dist/opr_3576_test.js +++ b/jscomp/test/dist/opr_3576_test.js @@ -136,7 +136,9 @@ module.exports = { suites, test_id, eq, + a$class: a, a, + b$class: b, b, } /* a Not a pure module */ diff --git a/jscomp/test/dist/opr_4560_test.js b/jscomp/test/dist/opr_4560_test.js index be0f4ca0f7..cfac3d03b4 100644 --- a/jscomp/test/dist/opr_4560_test.js +++ b/jscomp/test/dist/opr_4560_test.js @@ -148,7 +148,9 @@ module.exports = { test_id, eq, magic, + c1$class: c1, c1, + c2$class: c2, c2, e, } diff --git a/jscomp/test/dist/parser_api.js b/jscomp/test/dist/parser_api.js index f50d378020..d4746f6898 100644 --- a/jscomp/test/dist/parser_api.js +++ b/jscomp/test/dist/parser_api.js @@ -42,7 +42,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { standard_library = standard_library_default; } else { throw exn; @@ -947,16 +947,16 @@ function find_in_path(path, name) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } if (Caml_external_polyfill.resolve("caml_sys_file_exists")(name)) { return name; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -987,8 +987,8 @@ function find_in_path_rel(path, name) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -1011,8 +1011,8 @@ function find_in_path_uncap(path, name) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -1023,7 +1023,7 @@ function remove_file(filename) { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Sys_error) { + if (msg.MEL_EXN_ID === Stdlib.Sys_error$extension) { return; } throw msg; @@ -1070,8 +1070,8 @@ function copy_file_chunk(ic, oc, len) { } const r = Stdlib.input(ic, buff, 0, n < 4096 ? n : 4096); if (r === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Stdlib.output(oc, buff, 0, r); @@ -1133,7 +1133,7 @@ function chop_extension_if_any(fname) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exn.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { return fname; } throw exn; @@ -1154,7 +1154,7 @@ function chop_extensions(file) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return file; } throw exn; @@ -1171,8 +1171,8 @@ function search_substring(pat, str, start) { return i; } if ((i + j | 0) >= str.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (Caml_string.get(str, i + j | 0) === Caml_string.get(pat, j)) { @@ -1196,7 +1196,7 @@ function replace_substring(before, after, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const suffix = Stdlib__String.sub(str, curr, str.length - curr | 0); return Stdlib__List.rev({ hd: suffix, @@ -1412,7 +1412,7 @@ function split(s, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { pos2 = undefined; } else { throw exn; @@ -1535,7 +1535,7 @@ function set_styles(s) { } function style_of_tag(s) { - if (s.MEL_EXN_ID === Stdlib__Format.String_tag) { + if (s.MEL_EXN_ID === Stdlib__Format.String_tag$extension) { switch (s._1) { case "dim" : return { @@ -1568,8 +1568,8 @@ function style_of_tag(s) { case "warning" : return cur_styles.contents.warning; default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } } else { @@ -1603,7 +1603,7 @@ function set_color_tag_handling(ppf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Curry._1(partial_arg, param); } throw exn; @@ -1623,7 +1623,7 @@ function set_color_tag_handling(ppf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Curry._1(partial_arg$1, param); } throw exn; @@ -1693,7 +1693,7 @@ const Misc_Color = { const Misc = { fatal_error, - Fatal_error, + Fatal_error$extension: Fatal_error, try_finally, map_end, map_left_right, @@ -1735,7 +1735,8 @@ const Misc = { edit_distance, split, cut_at, - Color: Misc_Color + Color: Misc_Color, + Fatal_error }; const Terminfo = {}; @@ -2106,8 +2107,8 @@ function parse_opt(error, active, flags, s) { const match$1 = get_num(0, i$1 + 2 | 0); const n2 = match$1[1]; if (n2 < n1) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2127,8 +2128,8 @@ function parse_opt(error, active, flags, s) { if (c >= 65) { if (c >= 97) { if (c >= 123) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2137,8 +2138,8 @@ function parse_opt(error, active, flags, s) { continue; } if (c >= 91) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2150,8 +2151,8 @@ function parse_opt(error, active, flags, s) { if (c >= 64) { return loop_letter_num(set_all, i + 1 | 0); } - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2160,16 +2161,16 @@ function parse_opt(error, active, flags, s) { case 43 : return loop_letter_num(set, i + 1 | 0); case 44 : - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); case 45 : return loop_letter_num(clear, i + 1 | 0); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2177,8 +2178,8 @@ function parse_opt(error, active, flags, s) { }; const loop_letter_num = function (myset, i) { if (i >= s.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2186,8 +2187,8 @@ function parse_opt(error, active, flags, s) { if (match >= 65) { if (match >= 97) { if (match >= 123) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2195,8 +2196,8 @@ function parse_opt(error, active, flags, s) { return loop(i + 1 | 0); } if (match >= 91) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -2204,8 +2205,8 @@ function parse_opt(error, active, flags, s) { return loop(i + 1 | 0); } if (match > 57 || match < 48) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad, { - MEL_EXN_ID: Stdlib__Arg.Bad, + throw new Caml_js_exceptions.MelangeError(Stdlib__Arg.Bad$extension, { + MEL_EXN_ID: Stdlib__Arg.Bad$extension, _1: "Ill-formed list of warnings" }); } @@ -3117,14 +3118,15 @@ const Warnings = { defaults_w, defaults_warn_error, print, - Errors, + Errors$extension: Errors, check_fatal, help_warnings, backup, restore, message, number, - super_print + super_print, + Errors }; const absname = { @@ -3243,8 +3245,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { Stdlib__Format.pp_print_flush(ppf, undefined); const pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } let lines = num_loc_lines.contents; @@ -3255,8 +3257,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { } if (lines >= (num_lines - 2 | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } Caml_io.caml_ml_flush(Stdlib.stdout); @@ -3290,8 +3292,8 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { function highlight_dumb(ppf, lb, loc) { const pos0 = -lb.lex_abs_pos | 0; if (pos0 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } const end_pos = (lb.lex_buffer_len - pos0 | 0) - 1 | 0; @@ -3430,7 +3432,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { norepeat = false; } else { throw exn; @@ -3446,7 +3448,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Exit) { + if (exn$1.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$1; @@ -3462,7 +3464,7 @@ function highlight_locations(ppf, locs) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Exit) { + if (exn$2.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn$2; @@ -3988,7 +3990,7 @@ function error_of_printer_file(print, x) { } register_error_of_exn(function (msg) { - if (msg.MEL_EXN_ID === Stdlib.Sys_error) { + if (msg.MEL_EXN_ID === Stdlib.Sys_error$extension) { return Curry._1(errorf(in_file(input_name.contents), undefined, undefined, { TAG: /* Format */ 0, _0: { @@ -4136,7 +4138,7 @@ const $$Location = { absolute_path, show_filename, absname, - $$Error, + Error$extension: $$Error, print_error_prefix, error, pp_ksprintf, @@ -4149,7 +4151,8 @@ const $$Location = { report_error, error_reporter, default_error_reporter, - report_exception + report_exception, + $$Error }; const Asttypes = {}; @@ -4200,7 +4203,7 @@ function split_at_dots(s, pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: Stdlib__String.sub(s, pos, s.length - pos | 0), tl: /* [] */ 0 @@ -4502,7 +4505,7 @@ function get_pre_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4515,7 +4518,7 @@ function mark_pre_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4539,7 +4542,7 @@ function get_post_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4552,7 +4555,7 @@ function mark_post_docs(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4566,7 +4569,7 @@ function get_info(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -4588,7 +4591,7 @@ function get_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -4610,7 +4613,7 @@ function get_pre_extra_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -4632,7 +4635,7 @@ function get_post_extra_text(pos) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return /* [] */ 0; } throw exn; @@ -6778,11 +6781,13 @@ function ill_formed_ast(loc, s) { } const Syntaxerr = { - $$Error: $$Error$1, - Escape_error, + Error$extension: $$Error$1, + Escape_error$extension: Escape_error, report_error: report_error$1, location_of_error, - ill_formed_ast + ill_formed_ast, + $$Error: $$Error$1, + Escape_error }; function mktyp(d) { @@ -7657,8 +7662,8 @@ const yyact = [ return Stdlib__Parsing.peek_val(__caml_parser_env, 1); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); }), (function (__caml_parser_env) { @@ -12331,14 +12336,14 @@ const yyact = [ const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); } return _2.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); }), (function (__caml_parser_env) { @@ -12348,14 +12353,14 @@ const yyact = [ const _2 = Stdlib__Parsing.peek_val(__caml_parser_env, 1); if (_2) { if (_2.tl) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); } return _2.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error, { - MEL_EXN_ID: Stdlib__Parsing.Parse_error + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.Parse_error$extension, { + MEL_EXN_ID: Stdlib__Parsing.Parse_error$extension }); }), (function (__caml_parser_env) { @@ -13655,44 +13660,44 @@ const yyact = [ }; }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }), (function (__caml_parser_env) { - throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit, { - MEL_EXN_ID: Stdlib__Parsing.YYexit, + throw new Caml_js_exceptions.MelangeError(Stdlib__Parsing.YYexit$extension, { + MEL_EXN_ID: Stdlib__Parsing.YYexit$extension, _1: Stdlib__Parsing.peek_val(__caml_parser_env, 0) }); }) @@ -13849,7 +13854,7 @@ try { } catch (raw_exn$1){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$2.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$2.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = ""; } else { throw exn$2; @@ -14136,7 +14141,7 @@ function query(loc, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { let exit = 0; let v$1; try { @@ -14145,7 +14150,7 @@ function query(loc, str) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return { TAG: /* Dir_bool */ 0, _0: false @@ -15588,7 +15593,7 @@ function token(lexbuf) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { TAG: /* LIDENT */ 11, _0: s @@ -15628,7 +15633,7 @@ function token(lexbuf) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Failure) { + if (exn$1.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -15654,7 +15659,7 @@ function token(lexbuf) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID === Stdlib.Failure) { + if (exn$2.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -15675,7 +15680,7 @@ function token(lexbuf) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID === Stdlib.Failure) { + if (exn$3.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -15696,7 +15701,7 @@ function token(lexbuf) { } catch (raw_exn$4){ const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); - if (exn$4.MEL_EXN_ID === Stdlib.Failure) { + if (exn$4.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError($$Error$2, { MEL_EXN_ID: $$Error$2, _1: { @@ -16744,7 +16749,7 @@ const Lexer = { init: init$2, token: token$1, skip_sharp_bang, - $$Error: $$Error$2, + Error$extension: $$Error$2, report_error: report_error$2, in_comment, in_string, @@ -16759,7 +16764,8 @@ const Lexer = { replace_directive_bool, remove_directive_built_in_value, define_key_value, - list_variables + list_variables, + $$Error: $$Error$2 }; function skip_phrase(lexbuf) { @@ -16843,7 +16849,7 @@ function wrap(parsing_fun, lexbuf) { } throw err; } - if (err.MEL_EXN_ID !== Stdlib__Parsing.Parse_error && err.MEL_EXN_ID !== Escape_error) { + if (err.MEL_EXN_ID !== Stdlib__Parsing.Parse_error$extension && err.MEL_EXN_ID !== Escape_error) { throw err; } diff --git a/jscomp/test/dist/pq_test.js b/jscomp/test/dist/pq_test.js index 7e98e9bdcc..22ffa8f03f 100644 --- a/jscomp/test/dist/pq_test.js +++ b/jscomp/test/dist/pq_test.js @@ -91,9 +91,10 @@ function extract(queue) { const PrioQueue = { empty: /* Empty */ 0, insert, - Queue_is_empty, + Queue_is_empty$extension: Queue_is_empty, remove_top, - extract + extract, + Queue_is_empty }; module.exports = { diff --git a/jscomp/test/dist/promise_catch_test.js b/jscomp/test/dist/promise_catch_test.js index 1b0677ad97..e7e0ca46ea 100644 --- a/jscomp/test/dist/promise_catch_test.js +++ b/jscomp/test/dist/promise_catch_test.js @@ -34,11 +34,11 @@ function eq(loc, x, y) { } function handler(e) { - if (e.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (e.MEL_EXN_ID === Js__Js_exn.Error$extension) { console.log("js error"); return Promise.resolve(0); } - if (e.MEL_EXN_ID === Stdlib.Not_found) { + if (e.MEL_EXN_ID === Stdlib.Not_found$extension) { console.log("hi"); return Promise.resolve(0); } @@ -54,9 +54,9 @@ function handler(e) { function myHandler(match) { if (Caml_exceptions.caml_is_extension(match)) { - if (match.MEL_EXN_ID === Stdlib.Not_found) { + if (match.MEL_EXN_ID === Stdlib.Not_found$extension) { return 1; - } else if (match.MEL_EXN_ID === Js__Js_exn.$$Error) { + } else if (match.MEL_EXN_ID === Js__Js_exn.Error$extension) { return 2; } else { return; diff --git a/jscomp/test/dist/qcc.js b/jscomp/test/dist/qcc.js index 556a6921b8..22f0ac713a 100644 --- a/jscomp/test/dist/qcc.js +++ b/jscomp/test/dist/qcc.js @@ -191,7 +191,7 @@ function next(param) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { c = undefined; } else { throw exn; diff --git a/jscomp/test/dist/re_or_res/reactDOMRe.js b/jscomp/test/dist/re_or_res/reactDOMRe.js index 77a211e0cc..e5f646dd4a 100644 --- a/jscomp/test/dist/re_or_res/reactDOMRe.js +++ b/jscomp/test/dist/re_or_res/reactDOMRe.js @@ -71,8 +71,8 @@ function hydrateToElementWithClassName(reactElement, className) { function hydrateToElementWithId(reactElement, id) { const element = document.getElementById(id); if (element == null) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "ReactDOMRe.hydrateToElementWithId : no element of id " + (id + " found in the HTML.") }); } diff --git a/jscomp/test/dist/re_or_res/reasonReact.js b/jscomp/test/dist/re_or_res/reasonReact.js index b36b5a3140..991f2b835f 100644 --- a/jscomp/test/dist/re_or_res/reasonReact.js +++ b/jscomp/test/dist/re_or_res/reasonReact.js @@ -51,8 +51,8 @@ function convertPropsIfTheyreFromJs(props, jsPropsToReason, debugName) { _0: jsPropsToReason(props) }; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "A JS component called the Reason component " + (debugName + " which didn't implement the JS->Reason React props conversion.") }); } diff --git a/jscomp/test/dist/rebind_module.js b/jscomp/test/dist/rebind_module.js index 240f5d514d..1b789d948b 100644 --- a/jscomp/test/dist/rebind_module.js +++ b/jscomp/test/dist/rebind_module.js @@ -8,7 +8,9 @@ const A = /* @__PURE__ */ Caml_exceptions.create("Rebind_module.A"); const AA = /* @__PURE__ */ Caml_exceptions.create("Rebind_module.AA"); module.exports = { + A$extension: A, A, + AA$extension: AA, AA, } /* No side effect */ diff --git a/jscomp/test/dist/rebind_module_test.js b/jscomp/test/dist/rebind_module_test.js index d683ebf4e6..47c648dd65 100644 --- a/jscomp/test/dist/rebind_module_test.js +++ b/jscomp/test/dist/rebind_module_test.js @@ -4,7 +4,7 @@ const Rebind_module = require("./rebind_module.js"); function x(v) { - if (v.MEL_EXN_ID === Rebind_module.AA) { + if (v.MEL_EXN_ID === Rebind_module.AA$extension) { return 0; } else { return 1; diff --git a/jscomp/test/dist/rec_module_test.js b/jscomp/test/dist/rec_module_test.js index a6a8dc8f3e..8cbb764a18 100644 --- a/jscomp/test/dist/rec_module_test.js +++ b/jscomp/test/dist/rec_module_test.js @@ -258,8 +258,8 @@ function min_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -290,8 +290,8 @@ function max_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -822,8 +822,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -840,8 +840,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -904,8 +904,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; diff --git a/jscomp/test/dist/record_debug_test.js b/jscomp/test/dist/record_debug_test.js index 1f3566ab12..53c1f91e2c 100644 --- a/jscomp/test/dist/record_debug_test.js +++ b/jscomp/test/dist/record_debug_test.js @@ -131,7 +131,9 @@ module.exports = { v, u, h, + A$extension: A, A, + B$extension: B, B, v0, v1, diff --git a/jscomp/test/dist/record_extension_test.js b/jscomp/test/dist/record_extension_test.js index 1fd40716c8..2f2d422376 100644 --- a/jscomp/test/dist/record_extension_test.js +++ b/jscomp/test/dist/record_extension_test.js @@ -86,13 +86,17 @@ module.exports = { suites, test_id, eq, + Inline_record$extension: Inline_record, Inline_record, f, v0, f2, f2_with, + A$extension: A, A, + B$extension: B, B, + C$extension: C, C, u, } diff --git a/jscomp/test/dist/recursive_module.js b/jscomp/test/dist/recursive_module.js index 0773caf43c..87b25dd519 100644 --- a/jscomp/test/dist/recursive_module.js +++ b/jscomp/test/dist/recursive_module.js @@ -113,7 +113,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib__Lazy.Undefined) { + if (exn.MEL_EXN_ID === Stdlib__Lazy.Undefined$extension) { tmp = -1; } else { throw exn; @@ -193,7 +193,7 @@ try { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Undefined_recursive_module) { + if (exn$1.MEL_EXN_ID === Stdlib.Undefined_recursive_module$extension) { tmp$1 = 4; } else { throw exn$1; diff --git a/jscomp/test/dist/scanf_io.js b/jscomp/test/dist/scanf_io.js index 1c6b1ea6d3..3063a7aa57 100644 --- a/jscomp/test/dist/scanf_io.js +++ b/jscomp/test/dist/scanf_io.js @@ -105,7 +105,7 @@ function get_lines(fname) { } catch (raw_s){ const s = Caml_js_exceptions.internalToOCamlException(raw_s); - if (s.MEL_EXN_ID === Stdlib__Scanf.Scan_failure) { + if (s.MEL_EXN_ID === Stdlib__Scanf.Scan_failure$extension) { const s$1 = Curry._2(Stdlib__Printf.sprintf({ TAG: /* Format */ 0, _0: { @@ -132,7 +132,7 @@ function get_lines(fname) { _1: s$1 }); } - if (s.MEL_EXN_ID === Stdlib.End_of_file) { + if (s.MEL_EXN_ID === Stdlib.End_of_file$extension) { const s$2 = Curry._1(Stdlib__Printf.sprintf({ TAG: /* Format */ 0, _0: { @@ -191,7 +191,7 @@ function add_digest_ib(ob, ib) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; diff --git a/jscomp/test/dist/set_gen.js b/jscomp/test/dist/set_gen.js index 1bbf8989be..3d96f8fadd 100644 --- a/jscomp/test/dist/set_gen.js +++ b/jscomp/test/dist/set_gen.js @@ -38,8 +38,8 @@ function min_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param._0; @@ -55,8 +55,8 @@ function max_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param._2; @@ -728,7 +728,9 @@ module.exports = { exists, max_int3, max_int_2, + Height_invariant_broken$extension: Height_invariant_broken, Height_invariant_broken, + Height_diff_borken$extension: Height_diff_borken, Height_diff_borken, check_height_and_diff, check, diff --git a/jscomp/test/dist/sexpm.js b/jscomp/test/dist/sexpm.js index eee2fed55e..ee5e2135d8 100644 --- a/jscomp/test/dist/sexpm.js +++ b/jscomp/test/dist/sexpm.js @@ -45,13 +45,13 @@ function _must_escape(s) { if (c !== 92) { exit = 1; } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else if (c >= 11) { @@ -69,8 +69,8 @@ function _must_escape(s) { case 34 : case 40 : case 41 : - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { @@ -78,15 +78,15 @@ function _must_escape(s) { } } else { if (c >= 9) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } exit = 1; } if (exit === 1 && c > 127) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } @@ -95,7 +95,7 @@ function _must_escape(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return true; } throw exn; diff --git a/jscomp/test/dist/stack_comp_test.js b/jscomp/test/dist/stack_comp_test.js index aafe0d9f90..7e7489c83b 100644 --- a/jscomp/test/dist/stack_comp_test.js +++ b/jscomp/test/dist/stack_comp_test.js @@ -42,7 +42,7 @@ function to_list(s) { } const S = { - Empty: Stdlib__Stack.Empty, + Empty$extension: Stdlib__Stack.Empty$extension, create: Stdlib__Stack.create, push: Stdlib__Stack.push, pop: Stdlib__Stack.pop, @@ -59,7 +59,8 @@ const S = { to_seq: Stdlib__Stack.to_seq, add_seq: Stdlib__Stack.add_seq, of_seq: Stdlib__Stack.of_seq, - to_list + to_list, + Empty: Stdlib__Stack.Empty$extension }; function does_raise(f, s) { @@ -69,7 +70,7 @@ function does_raise(f, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib__Stack.Empty) { + if (exn.MEL_EXN_ID === Stdlib__Stack.Empty$extension) { return true; } throw exn; diff --git a/jscomp/test/dist/stdlib_bytes_utf8_test.js b/jscomp/test/dist/stdlib_bytes_utf8_test.js index d77de71452..43fe195633 100644 --- a/jscomp/test/dist/stdlib_bytes_utf8_test.js +++ b/jscomp/test/dist/stdlib_bytes_utf8_test.js @@ -465,7 +465,7 @@ function raises(f) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exn.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { tmp = true; } else { throw exn; diff --git a/jscomp/test/dist/string_set.js b/jscomp/test/dist/string_set.js index 480c76dd43..54b59c85ea 100644 --- a/jscomp/test/dist/string_set.js +++ b/jscomp/test/dist/string_set.js @@ -225,8 +225,8 @@ function find(x, _tree) { while (true) { const tree = _tree; if (/* tag */ typeof tree !== "object" && typeof tree !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = tree._1; diff --git a/jscomp/test/dist/string_test.js b/jscomp/test/dist/string_test.js index 80f073e2b0..3340e345da 100644 --- a/jscomp/test/dist/string_test.js +++ b/jscomp/test/dist/string_test.js @@ -69,7 +69,7 @@ function rev_split_by_char(c, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: Stdlib__String.sub(s, i, s.length - i | 0), tl: l @@ -98,7 +98,7 @@ function xsplit(delim, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: Stdlib__String.sub(s, 0, i), tl: l diff --git a/jscomp/test/dist/test_common.js b/jscomp/test/dist/test_common.js index 869927a560..ed1ab8411b 100644 --- a/jscomp/test/dist/test_common.js +++ b/jscomp/test/dist/test_common.js @@ -8,7 +8,9 @@ const U = /* @__PURE__ */ Caml_exceptions.create("Test_common.U"); const H = /* @__PURE__ */ Caml_exceptions.create("Test_common.H"); module.exports = { + U$extension: U, U, + H$extension: H, H, } /* No side effect */ diff --git a/jscomp/test/dist/test_exception.js b/jscomp/test/dist/test_exception.js index b5750f29aa..8d947e1e98 100644 --- a/jscomp/test/dist/test_exception.js +++ b/jscomp/test/dist/test_exception.js @@ -16,27 +16,27 @@ function f(param) { } function g(param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } function h(param) { - throw new Caml_js_exceptions.MelangeError(Test_common.U, { - MEL_EXN_ID: Test_common.U, + throw new Caml_js_exceptions.MelangeError(Test_common.U$extension, { + MEL_EXN_ID: Test_common.U$extension, _1: 3 }); } function x(param) { - throw new Caml_js_exceptions.MelangeError(Test_common.H, { - MEL_EXN_ID: Test_common.H + throw new Caml_js_exceptions.MelangeError(Test_common.H$extension, { + MEL_EXN_ID: Test_common.H$extension }); } function xx(param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "x" }); } @@ -48,12 +48,14 @@ const a = new Caml_js_exceptions.MelangeError(Nullary, { }); module.exports = { + Local$extension: Local, Local, f, g, h, x, xx, + Nullary$extension: Nullary, Nullary, a, } diff --git a/jscomp/test/dist/test_for_map.js b/jscomp/test/dist/test_for_map.js index d2371b679f..b332e4752f 100644 --- a/jscomp/test/dist/test_for_map.js +++ b/jscomp/test/dist/test_for_map.js @@ -180,8 +180,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -197,8 +197,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -273,8 +273,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -379,8 +379,8 @@ function min_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -417,8 +417,8 @@ function max_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; diff --git a/jscomp/test/dist/test_internalOO.js b/jscomp/test/dist/test_internalOO.js index 0c93cb7571..1a7f656c1e 100644 --- a/jscomp/test/dist/test_internalOO.js +++ b/jscomp/test/dist/test_internalOO.js @@ -214,8 +214,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -231,8 +231,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -307,8 +307,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -413,8 +413,8 @@ function min_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -451,8 +451,8 @@ function max_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -1375,8 +1375,8 @@ function find$1(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$1.compare, x, param.v); @@ -1392,8 +1392,8 @@ function find_first$1(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -1468,8 +1468,8 @@ function find_last$1(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -1574,8 +1574,8 @@ function min_binding$1(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -1612,8 +1612,8 @@ function max_binding$1(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -2536,8 +2536,8 @@ function find$2(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$2.compare, x, param.v); @@ -2553,8 +2553,8 @@ function find_first$2(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -2629,8 +2629,8 @@ function find_last$2(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -2735,8 +2735,8 @@ function min_binding$2(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -2773,8 +2773,8 @@ function max_binding$2(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -3605,7 +3605,7 @@ function get_method_label(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const label = new_method(table); table.methods_by_name = Curry._3(add$1, name, label, table.methods_by_name); table.methods_by_label = Curry._3(add$2, label, true, table.methods_by_label); @@ -3643,7 +3643,7 @@ function get_method(table, label) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Caml_array.get(table.methods, label); } throw exn; @@ -3700,7 +3700,7 @@ function narrow(table, vars, virt_meths, concr_meths) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = true; } else { throw exn; @@ -3759,7 +3759,7 @@ function new_variable(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const index = new_slot(table); if (name !== "") { table.vars = Curry._3(add, name, index, table.vars); @@ -3798,7 +3798,7 @@ function get_variable(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ @@ -3888,8 +3888,8 @@ function make_class_store(pub_meths, class_init, init_table) { function dummy_class(loc) { const undef = function (param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Undefined_recursive_module, { - MEL_EXN_ID: Stdlib.Undefined_recursive_module, + throw new Caml_js_exceptions.MelangeError(Stdlib.Undefined_recursive_module$extension, { + MEL_EXN_ID: Stdlib.Undefined_recursive_module$extension, _1: loc }); }; diff --git a/jscomp/test/dist/test_list.js b/jscomp/test/dist/test_list.js index 54932d5d51..779ff55a49 100644 --- a/jscomp/test/dist/test_list.js +++ b/jscomp/test/dist/test_list.js @@ -443,8 +443,8 @@ function assoc(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -460,8 +460,8 @@ function assq(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -537,8 +537,8 @@ function find(p, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/jscomp/test/dist/test_literal.js b/jscomp/test/dist/test_literal.js index a3f6323b39..a1c8a78af9 100644 --- a/jscomp/test/dist/test_literal.js +++ b/jscomp/test/dist/test_literal.js @@ -41,6 +41,7 @@ const short_int_v = [1]; const empty = []; module.exports = { + Custom_inline$extension: Custom_inline, Custom_inline, v, vv, diff --git a/jscomp/test/dist/test_match_exception.js b/jscomp/test/dist/test_match_exception.js index fedf228043..68b7a9e76c 100644 --- a/jscomp/test/dist/test_match_exception.js +++ b/jscomp/test/dist/test_match_exception.js @@ -11,7 +11,7 @@ function f(g, x) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return 3; } throw exn; diff --git a/jscomp/test/dist/test_per.js b/jscomp/test/dist/test_per.js index d3b97d5c34..85cb8e8624 100644 --- a/jscomp/test/dist/test_per.js +++ b/jscomp/test/dist/test_per.js @@ -16,15 +16,15 @@ const Curry = require("melange.js/curry.js"); const Stdlib = require("melange/stdlib.js"); function failwith(s) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Failure, { - MEL_EXN_ID: Stdlib.Failure, + throw new Caml_js_exceptions.MelangeError(Stdlib.Failure$extension, { + MEL_EXN_ID: Stdlib.Failure$extension, _1: s }); } function invalid_arg(s) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: s }); } @@ -102,8 +102,8 @@ function $caret(s1, s2) { function char_of_int(n) { if (n < 0 || n > 255) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "char_of_int" }); } @@ -125,8 +125,8 @@ function bool_of_string(param) { case "true" : return true; default: - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "bool_of_string" }); } @@ -245,8 +245,8 @@ function output_string(oc, s) { function output(oc, s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "output" }); } @@ -255,8 +255,8 @@ function output(oc, s, ofs, len) { function output_substring(oc, s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "output_substring" }); } @@ -313,8 +313,8 @@ function open_in_bin(name) { function input(ic, s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "input" }); } @@ -330,8 +330,8 @@ function unsafe_really_input(ic, s, _ofs, _len) { } const r = Caml_external_polyfill.resolve("caml_ml_input")(ic, s, ofs, len); if (r === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } _len = len - r | 0; @@ -342,8 +342,8 @@ function unsafe_really_input(ic, s, _ofs, _len) { function really_input(ic, s, ofs, len) { if (ofs < 0 || len < 0 || ofs > (s.length - len | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "really_input" }); } @@ -382,8 +382,8 @@ function input_line(chan) { if (accu) { return build_result(Caml_bytes.caml_create_bytes(len), len, accu); } - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } if (n > 0) { @@ -536,6 +536,7 @@ const max_int = 2147483647; module.exports = { failwith, invalid_arg, + Exit$extension: Exit, Exit, min, max, diff --git a/jscomp/test/dist/test_pervasive.js b/jscomp/test/dist/test_pervasive.js index 4c24db57db..50a20f29fd 100644 --- a/jscomp/test/dist/test_pervasive.js +++ b/jscomp/test/dist/test_pervasive.js @@ -78,19 +78,19 @@ const Stdlib$1 = { of_seq: Stdlib__List.of_seq, invalid_arg: Stdlib.invalid_arg, failwith: Stdlib.failwith, - Exit: Stdlib.Exit, - Match_failure: Stdlib.Match_failure, - Assert_failure: Stdlib.Assert_failure, - Invalid_argument: Stdlib.Invalid_argument, - Failure: Stdlib.Failure, - Not_found: Stdlib.Not_found, - Out_of_memory: Stdlib.Out_of_memory, - Stack_overflow: Stdlib.Stack_overflow, - Sys_error: Stdlib.Sys_error, - End_of_file: Stdlib.End_of_file, - Division_by_zero: Stdlib.Division_by_zero, - Sys_blocked_io: Stdlib.Sys_blocked_io, - Undefined_recursive_module: Stdlib.Undefined_recursive_module, + Exit$extension: Stdlib.Exit$extension, + Match_failure$extension: Stdlib.Match_failure$extension, + Assert_failure$extension: Stdlib.Assert_failure$extension, + Invalid_argument$extension: Stdlib.Invalid_argument$extension, + Failure$extension: Stdlib.Failure$extension, + Not_found$extension: Stdlib.Not_found$extension, + Out_of_memory$extension: Stdlib.Out_of_memory$extension, + Stack_overflow$extension: Stdlib.Stack_overflow$extension, + Sys_error$extension: Stdlib.Sys_error$extension, + End_of_file$extension: Stdlib.End_of_file$extension, + Division_by_zero$extension: Stdlib.Division_by_zero$extension, + Sys_blocked_io$extension: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module$extension: Stdlib.Undefined_recursive_module$extension, abs: Stdlib.abs, max_int: Stdlib.max_int, min_int: Stdlib.min_int, @@ -173,7 +173,20 @@ const Stdlib$1 = { valid_float_lexem: Stdlib.valid_float_lexem, unsafe_really_input: Stdlib.unsafe_really_input, do_at_exit: Stdlib.do_at_exit, - do_domain_local_at_exit: Stdlib.do_domain_local_at_exit + do_domain_local_at_exit: Stdlib.do_domain_local_at_exit, + Exit: Stdlib.Exit$extension, + Match_failure: Stdlib.Match_failure$extension, + Assert_failure: Stdlib.Assert_failure$extension, + Invalid_argument: Stdlib.Invalid_argument$extension, + Failure: Stdlib.Failure$extension, + Not_found: Stdlib.Not_found$extension, + Out_of_memory: Stdlib.Out_of_memory$extension, + Stack_overflow: Stdlib.Stack_overflow$extension, + Sys_error: Stdlib.Sys_error$extension, + End_of_file: Stdlib.End_of_file$extension, + Division_by_zero: Stdlib.Division_by_zero$extension, + Sys_blocked_io: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module: Stdlib.Undefined_recursive_module$extension }; function a0(prim) { diff --git a/jscomp/test/dist/test_pervasives2.js b/jscomp/test/dist/test_pervasives2.js index cfeac68f25..0d476d53c6 100644 --- a/jscomp/test/dist/test_pervasives2.js +++ b/jscomp/test/dist/test_pervasives2.js @@ -79,19 +79,19 @@ const List = { of_seq: Stdlib__List.of_seq, invalid_arg: Stdlib.invalid_arg, failwith: Stdlib.failwith, - Exit: Stdlib.Exit, - Match_failure: Stdlib.Match_failure, - Assert_failure: Stdlib.Assert_failure, - Invalid_argument: Stdlib.Invalid_argument, - Failure: Stdlib.Failure, - Not_found: Stdlib.Not_found, - Out_of_memory: Stdlib.Out_of_memory, - Stack_overflow: Stdlib.Stack_overflow, - Sys_error: Stdlib.Sys_error, - End_of_file: Stdlib.End_of_file, - Division_by_zero: Stdlib.Division_by_zero, - Sys_blocked_io: Stdlib.Sys_blocked_io, - Undefined_recursive_module: Stdlib.Undefined_recursive_module, + Exit$extension: Stdlib.Exit$extension, + Match_failure$extension: Stdlib.Match_failure$extension, + Assert_failure$extension: Stdlib.Assert_failure$extension, + Invalid_argument$extension: Stdlib.Invalid_argument$extension, + Failure$extension: Stdlib.Failure$extension, + Not_found$extension: Stdlib.Not_found$extension, + Out_of_memory$extension: Stdlib.Out_of_memory$extension, + Stack_overflow$extension: Stdlib.Stack_overflow$extension, + Sys_error$extension: Stdlib.Sys_error$extension, + End_of_file$extension: Stdlib.End_of_file$extension, + Division_by_zero$extension: Stdlib.Division_by_zero$extension, + Sys_blocked_io$extension: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module$extension: Stdlib.Undefined_recursive_module$extension, abs: Stdlib.abs, max_int: Stdlib.max_int, min_int: Stdlib.min_int, @@ -174,11 +174,24 @@ const List = { valid_float_lexem: Stdlib.valid_float_lexem, unsafe_really_input: Stdlib.unsafe_really_input, do_at_exit: Stdlib.do_at_exit, - do_domain_local_at_exit: Stdlib.do_domain_local_at_exit + do_domain_local_at_exit: Stdlib.do_domain_local_at_exit, + Exit: Stdlib.Exit$extension, + Match_failure: Stdlib.Match_failure$extension, + Assert_failure: Stdlib.Assert_failure$extension, + Invalid_argument: Stdlib.Invalid_argument$extension, + Failure: Stdlib.Failure$extension, + Not_found: Stdlib.Not_found$extension, + Out_of_memory: Stdlib.Out_of_memory$extension, + Stack_overflow: Stdlib.Stack_overflow$extension, + Sys_error: Stdlib.Sys_error$extension, + End_of_file: Stdlib.End_of_file$extension, + Division_by_zero: Stdlib.Division_by_zero$extension, + Sys_blocked_io: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module: Stdlib.Undefined_recursive_module$extension }; const U = { - Empty: Stdlib__Stack.Empty, + Empty$extension: Stdlib__Stack.Empty$extension, create: Stdlib__Stack.create, push: Stdlib__Stack.push, pop: Stdlib__Stack.pop, @@ -197,19 +210,19 @@ const U = { of_seq: Stdlib__Stack.of_seq, invalid_arg: Stdlib.invalid_arg, failwith: Stdlib.failwith, - Exit: Stdlib.Exit, - Match_failure: Stdlib.Match_failure, - Assert_failure: Stdlib.Assert_failure, - Invalid_argument: Stdlib.Invalid_argument, - Failure: Stdlib.Failure, - Not_found: Stdlib.Not_found, - Out_of_memory: Stdlib.Out_of_memory, - Stack_overflow: Stdlib.Stack_overflow, - Sys_error: Stdlib.Sys_error, - End_of_file: Stdlib.End_of_file, - Division_by_zero: Stdlib.Division_by_zero, - Sys_blocked_io: Stdlib.Sys_blocked_io, - Undefined_recursive_module: Stdlib.Undefined_recursive_module, + Exit$extension: Stdlib.Exit$extension, + Match_failure$extension: Stdlib.Match_failure$extension, + Assert_failure$extension: Stdlib.Assert_failure$extension, + Invalid_argument$extension: Stdlib.Invalid_argument$extension, + Failure$extension: Stdlib.Failure$extension, + Not_found$extension: Stdlib.Not_found$extension, + Out_of_memory$extension: Stdlib.Out_of_memory$extension, + Stack_overflow$extension: Stdlib.Stack_overflow$extension, + Sys_error$extension: Stdlib.Sys_error$extension, + End_of_file$extension: Stdlib.End_of_file$extension, + Division_by_zero$extension: Stdlib.Division_by_zero$extension, + Sys_blocked_io$extension: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module$extension: Stdlib.Undefined_recursive_module$extension, abs: Stdlib.abs, max_int: Stdlib.max_int, min_int: Stdlib.min_int, @@ -292,7 +305,21 @@ const U = { valid_float_lexem: Stdlib.valid_float_lexem, unsafe_really_input: Stdlib.unsafe_really_input, do_at_exit: Stdlib.do_at_exit, - do_domain_local_at_exit: Stdlib.do_domain_local_at_exit + do_domain_local_at_exit: Stdlib.do_domain_local_at_exit, + Empty: Stdlib__Stack.Empty$extension, + Exit: Stdlib.Exit$extension, + Match_failure: Stdlib.Match_failure$extension, + Assert_failure: Stdlib.Assert_failure$extension, + Invalid_argument: Stdlib.Invalid_argument$extension, + Failure: Stdlib.Failure$extension, + Not_found: Stdlib.Not_found$extension, + Out_of_memory: Stdlib.Out_of_memory$extension, + Stack_overflow: Stdlib.Stack_overflow$extension, + Sys_error: Stdlib.Sys_error$extension, + End_of_file: Stdlib.End_of_file$extension, + Division_by_zero: Stdlib.Division_by_zero$extension, + Sys_blocked_io: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module: Stdlib.Undefined_recursive_module$extension }; const f = Stdlib.$at; diff --git a/jscomp/test/dist/test_pervasives3.js b/jscomp/test/dist/test_pervasives3.js index 0d93774f7f..61a86bd96e 100644 --- a/jscomp/test/dist/test_pervasives3.js +++ b/jscomp/test/dist/test_pervasives3.js @@ -7,19 +7,19 @@ const Stdlib__List = require("melange/list.js"); const Stdlib$1 = { invalid_arg: Stdlib.invalid_arg, failwith: Stdlib.failwith, - Exit: Stdlib.Exit, - Match_failure: Stdlib.Match_failure, - Assert_failure: Stdlib.Assert_failure, - Invalid_argument: Stdlib.Invalid_argument, - Failure: Stdlib.Failure, - Not_found: Stdlib.Not_found, - Out_of_memory: Stdlib.Out_of_memory, - Stack_overflow: Stdlib.Stack_overflow, - Sys_error: Stdlib.Sys_error, - End_of_file: Stdlib.End_of_file, - Division_by_zero: Stdlib.Division_by_zero, - Sys_blocked_io: Stdlib.Sys_blocked_io, - Undefined_recursive_module: Stdlib.Undefined_recursive_module, + Exit$extension: Stdlib.Exit$extension, + Match_failure$extension: Stdlib.Match_failure$extension, + Assert_failure$extension: Stdlib.Assert_failure$extension, + Invalid_argument$extension: Stdlib.Invalid_argument$extension, + Failure$extension: Stdlib.Failure$extension, + Not_found$extension: Stdlib.Not_found$extension, + Out_of_memory$extension: Stdlib.Out_of_memory$extension, + Stack_overflow$extension: Stdlib.Stack_overflow$extension, + Sys_error$extension: Stdlib.Sys_error$extension, + End_of_file$extension: Stdlib.End_of_file$extension, + Division_by_zero$extension: Stdlib.Division_by_zero$extension, + Sys_blocked_io$extension: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module$extension: Stdlib.Undefined_recursive_module$extension, abs: Stdlib.abs, max_int: Stdlib.max_int, min_int: Stdlib.min_int, @@ -174,7 +174,20 @@ const Stdlib$1 = { sort_uniq: Stdlib__List.sort_uniq, merge: Stdlib__List.merge, to_seq: Stdlib__List.to_seq, - of_seq: Stdlib__List.of_seq + of_seq: Stdlib__List.of_seq, + Exit: Stdlib.Exit$extension, + Match_failure: Stdlib.Match_failure$extension, + Assert_failure: Stdlib.Assert_failure$extension, + Invalid_argument: Stdlib.Invalid_argument$extension, + Failure: Stdlib.Failure$extension, + Not_found: Stdlib.Not_found$extension, + Out_of_memory: Stdlib.Out_of_memory$extension, + Stack_overflow: Stdlib.Stack_overflow$extension, + Sys_error: Stdlib.Sys_error$extension, + End_of_file: Stdlib.End_of_file$extension, + Division_by_zero: Stdlib.Division_by_zero$extension, + Sys_blocked_io: Stdlib.Sys_blocked_io$extension, + Undefined_recursive_module: Stdlib.Undefined_recursive_module$extension }; const v = Stdlib.$at; diff --git a/jscomp/test/dist/test_seq.js b/jscomp/test/dist/test_seq.js index 01366754e1..8361e9ff39 100644 --- a/jscomp/test/dist/test_seq.js +++ b/jscomp/test/dist/test_seq.js @@ -24,8 +24,8 @@ function assoc3(x, _l) { _l = l.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -57,7 +57,7 @@ function add_help(speclist) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { add1 = { hd: [ "-help", @@ -80,7 +80,7 @@ function add_help(speclist) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { add2 = { hd: [ "--help", @@ -100,8 +100,11 @@ function add_help(speclist) { } module.exports = { + Bad$extension: Bad, Bad, + Help$extension: Help, Help, + Stop$extension: Stop, Stop, assoc3, help_action, diff --git a/jscomp/test/dist/test_set.js b/jscomp/test/dist/test_set.js index 010bf6d182..10357f0668 100644 --- a/jscomp/test/dist/test_set.js +++ b/jscomp/test/dist/test_set.js @@ -148,8 +148,8 @@ function Make(Ord) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param._0; @@ -164,8 +164,8 @@ function Make(Ord) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param._2; @@ -561,8 +561,8 @@ function Make(Ord) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param._1; diff --git a/jscomp/test/dist/test_static_catch_ident.js b/jscomp/test/dist/test_static_catch_ident.js index b6f89bed57..756beb35ec 100644 --- a/jscomp/test/dist/test_static_catch_ident.js +++ b/jscomp/test/dist/test_static_catch_ident.js @@ -9,7 +9,7 @@ const Scan_failure = /* @__PURE__ */ Caml_exceptions.create("Test_static_catch_i function scanf_bad_input(ib, x) { let s; - if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure) { + if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure$extension) { s = x._1; } else { throw x; @@ -21,6 +21,7 @@ function scanf_bad_input(ib, x) { } module.exports = { + Scan_failure$extension: Scan_failure, Scan_failure, scanf_bad_input, } diff --git a/jscomp/test/dist/test_string_const.js b/jscomp/test/dist/test_string_const.js index c4a1dfb6e8..c93930eb6c 100644 --- a/jscomp/test/dist/test_string_const.js +++ b/jscomp/test/dist/test_string_const.js @@ -12,7 +12,7 @@ try { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (e.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { console.log(e._1); hh = /* 'a' */97; } else { diff --git a/jscomp/test/dist/test_string_map.js b/jscomp/test/dist/test_string_map.js index 1ceee98851..ad11b2af52 100644 --- a/jscomp/test/dist/test_string_map.js +++ b/jscomp/test/dist/test_string_map.js @@ -142,8 +142,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); diff --git a/jscomp/test/dist/test_trywith.js b/jscomp/test/dist/test_trywith.js index 31d547a2b4..f901300177 100644 --- a/jscomp/test/dist/test_trywith.js +++ b/jscomp/test/dist/test_trywith.js @@ -11,7 +11,7 @@ function ff(g, x) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.Not_found) { + if (exn.MEL_EXN_ID !== Stdlib.Not_found$extension) { throw exn; } @@ -21,7 +21,7 @@ function ff(g, x) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID !== Stdlib.Out_of_memory) { + if (exn$1.MEL_EXN_ID !== Stdlib.Out_of_memory$extension) { throw exn$1; } @@ -31,7 +31,7 @@ function ff(g, x) { } catch (raw_exn$2){ const exn$2 = Caml_js_exceptions.internalToOCamlException(raw_exn$2); - if (exn$2.MEL_EXN_ID !== Stdlib.Sys_error) { + if (exn$2.MEL_EXN_ID !== Stdlib.Sys_error$extension) { throw exn$2; } @@ -41,7 +41,7 @@ function ff(g, x) { } catch (raw_exn$3){ const exn$3 = Caml_js_exceptions.internalToOCamlException(raw_exn$3); - if (exn$3.MEL_EXN_ID !== Stdlib.Invalid_argument) { + if (exn$3.MEL_EXN_ID !== Stdlib.Invalid_argument$extension) { throw exn$3; } @@ -51,7 +51,7 @@ function ff(g, x) { } catch (raw_exn$4){ const exn$4 = Caml_js_exceptions.internalToOCamlException(raw_exn$4); - if (exn$4.MEL_EXN_ID !== Stdlib.End_of_file) { + if (exn$4.MEL_EXN_ID !== Stdlib.End_of_file$extension) { throw exn$4; } @@ -61,7 +61,7 @@ function ff(g, x) { } catch (raw_exn$5){ const exn$5 = Caml_js_exceptions.internalToOCamlException(raw_exn$5); - if (exn$5.MEL_EXN_ID !== Stdlib.Match_failure) { + if (exn$5.MEL_EXN_ID !== Stdlib.Match_failure$extension) { throw exn$5; } @@ -71,7 +71,7 @@ function ff(g, x) { } catch (raw_exn$6){ const exn$6 = Caml_js_exceptions.internalToOCamlException(raw_exn$6); - if (exn$6.MEL_EXN_ID !== Stdlib.Stack_overflow) { + if (exn$6.MEL_EXN_ID !== Stdlib.Stack_overflow$extension) { throw exn$6; } @@ -81,7 +81,7 @@ function ff(g, x) { } catch (raw_exn$7){ const exn$7 = Caml_js_exceptions.internalToOCamlException(raw_exn$7); - if (exn$7.MEL_EXN_ID !== Stdlib.Sys_blocked_io) { + if (exn$7.MEL_EXN_ID !== Stdlib.Sys_blocked_io$extension) { throw exn$7; } @@ -91,7 +91,7 @@ function ff(g, x) { } catch (raw_exn$8){ const exn$8 = Caml_js_exceptions.internalToOCamlException(raw_exn$8); - if (exn$8.MEL_EXN_ID !== Stdlib.Assert_failure) { + if (exn$8.MEL_EXN_ID !== Stdlib.Assert_failure$extension) { throw exn$8; } @@ -101,7 +101,7 @@ function ff(g, x) { } catch (raw_exn$9){ const exn$9 = Caml_js_exceptions.internalToOCamlException(raw_exn$9); - if (exn$9.MEL_EXN_ID === Stdlib.Undefined_recursive_module) { + if (exn$9.MEL_EXN_ID === Stdlib.Undefined_recursive_module$extension) { return; } throw exn$9; @@ -109,8 +109,8 @@ function ff(g, x) { } function u(param) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } diff --git a/jscomp/test/dist/testing.js b/jscomp/test/dist/testing.js index 733d564006..a11a04a3d1 100644 --- a/jscomp/test/dist/testing.js +++ b/jscomp/test/dist/testing.js @@ -145,8 +145,8 @@ function test_raises_this_exc(exc) { function failure_test(f, x, s) { return test_raises_exc_p((function (x) { - return Caml_obj.caml_equal(x, new Caml_js_exceptions.MelangeError(Stdlib.Failure, { - MEL_EXN_ID: Stdlib.Failure, + return Caml_obj.caml_equal(x, new Caml_js_exceptions.MelangeError(Stdlib.Failure$extension, { + MEL_EXN_ID: Stdlib.Failure$extension, _1: s })); }), f, x); @@ -154,7 +154,7 @@ function failure_test(f, x, s) { function scan_failure_test(f, x) { return test_raises_exc_p((function (param) { - return param.MEL_EXN_ID === Stdlib__Scanf.Scan_failure; + return param.MEL_EXN_ID === Stdlib__Scanf.Scan_failure$extension; }), f, x); } diff --git a/jscomp/test/dist/ticker.js b/jscomp/test/dist/ticker.js index 46f0cc290f..dc6801c689 100644 --- a/jscomp/test/dist/ticker.js +++ b/jscomp/test/dist/ticker.js @@ -30,7 +30,7 @@ function split(delim, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return { hd: Stdlib__String.sub(s, 0, i), tl: l @@ -286,8 +286,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -303,8 +303,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -379,8 +379,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -485,8 +485,8 @@ function min_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -523,8 +523,8 @@ function max_binding(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; diff --git a/jscomp/test/dist/topsort_test.js b/jscomp/test/dist/topsort_test.js index 39e937a00a..772de53a16 100644 --- a/jscomp/test/dist/topsort_test.js +++ b/jscomp/test/dist/topsort_test.js @@ -607,8 +607,8 @@ function min_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -639,8 +639,8 @@ function max_elt(_param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -1171,8 +1171,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -1189,8 +1189,8 @@ function find_first(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -1253,8 +1253,8 @@ function find_last(f, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -1817,6 +1817,7 @@ module.exports = { grwork, unsafe_topsort, String_set, + Cycle$extension: Cycle, Cycle, pathsort, } diff --git a/jscomp/test/dist/tscanf_test.js b/jscomp/test/dist/tscanf_test.js index f22207e95b..9e7094092c 100644 --- a/jscomp/test/dist/tscanf_test.js +++ b/jscomp/test/dist/tscanf_test.js @@ -1925,7 +1925,7 @@ function scan_elems$2(ib, accu) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure) { + if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure$extension) { Curry._1(Stdlib__Scanf.bscanf(ib, { TAG: /* Format */ 0, _0: { @@ -1937,7 +1937,7 @@ function scan_elems$2(ib, accu) { }), undefined); return accu; } - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return accu; } throw exn; @@ -2428,7 +2428,7 @@ function scan_elems$5(ib, scan_elem, accu) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure) { + if (exn.MEL_EXN_ID === Stdlib__Scanf.Scan_failure$extension) { return accu; } throw exn; @@ -3898,10 +3898,10 @@ function test44(param) { })); } -Testing.test_raises_this_exc(new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file - }))(test43, undefined) && Testing.test_raises_this_exc(new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file +Testing.test_raises_this_exc(new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension + }))(test43, undefined) && Testing.test_raises_this_exc(new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }))(test44, undefined); function test45(param) { @@ -4512,8 +4512,8 @@ function next_char(ob, param) { const s = Stdlib__Buffer.contents(ob); const len = s.length; if (len === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } const c = Caml_string.get(s, 0); diff --git a/jscomp/test/dist/variant.js b/jscomp/test/dist/variant.js index 3d62a4ecfe..56e0ba8409 100644 --- a/jscomp/test/dist/variant.js +++ b/jscomp/test/dist/variant.js @@ -87,7 +87,7 @@ function rollback_path(subst, p) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { switch (p.TAG) { case /* Pdot */ 1 : return "Pdot"; @@ -174,10 +174,15 @@ module.exports = { Make, M, rollback_path, + EA1$extension: EA1, EA1, + EA2$extension: EA2, EA2, + EB$extension: EB, EB, + EC$extension: EC, EC, + ED$extension: ED, ED, fooExn, } diff --git a/node_modules/melange.belt/belt_List.js b/node_modules/melange.belt/belt_List.js index 56869784f9..cbe38180e1 100644 --- a/node_modules/melange.belt/belt_List.js +++ b/node_modules/melange.belt/belt_List.js @@ -19,8 +19,8 @@ function headExn(x) { if (x) { return x.hd; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -35,8 +35,8 @@ function tailExn(x) { if (x) { return x.tl; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -71,8 +71,8 @@ function get(x, n) { function getExn(x, n) { if (n < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let _x = x; @@ -88,8 +88,8 @@ function getExn(x, n) { _x = x$1.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.belt/belt_MutableQueue.js b/node_modules/melange.belt/belt_MutableQueue.js index b2412858f2..df23d94a7f 100644 --- a/node_modules/melange.belt/belt_MutableQueue.js +++ b/node_modules/melange.belt/belt_MutableQueue.js @@ -58,8 +58,8 @@ function peekExn(q) { if (v !== undefined) { return Caml_option.valFromOption(v).content; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } @@ -94,8 +94,8 @@ function popExn(q) { return x$1.content; } } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } diff --git a/node_modules/melange.belt/belt_Option.js b/node_modules/melange.belt/belt_Option.js index e4de5921d7..f1fa50c458 100644 --- a/node_modules/melange.belt/belt_Option.js +++ b/node_modules/melange.belt/belt_Option.js @@ -32,8 +32,8 @@ function getExn(x) { if (x !== undefined) { return Caml_option.valFromOption(x); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } diff --git a/node_modules/melange.belt/belt_Result.js b/node_modules/melange.belt/belt_Result.js index 8ce6848c1b..fb5ad2f438 100644 --- a/node_modules/melange.belt/belt_Result.js +++ b/node_modules/melange.belt/belt_Result.js @@ -9,8 +9,8 @@ function getExn(x) { if (x.TAG === /* Ok */ 0) { return x._0; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } diff --git a/node_modules/melange.belt/belt_internalAVLset.js b/node_modules/melange.belt/belt_internalAVLset.js index 548bef4379..e81799e141 100644 --- a/node_modules/melange.belt/belt_internalAVLset.js +++ b/node_modules/melange.belt/belt_internalAVLset.js @@ -754,8 +754,8 @@ function getExn(_n, x, cmp) { _n = c < 0 ? t.l : t.r; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.belt/belt_internalAVLtree.js b/node_modules/melange.belt/belt_internalAVLtree.js index 83faa803ac..e9d21898b2 100644 --- a/node_modules/melange.belt/belt_internalAVLtree.js +++ b/node_modules/melange.belt/belt_internalAVLtree.js @@ -919,8 +919,8 @@ function getExn(_n, x, cmp) { _n = c < 0 ? n$1.l : n$1.r; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.belt/belt_internalMapInt.js b/node_modules/melange.belt/belt_internalMapInt.js index 40ab301ccb..eb7eddbea5 100644 --- a/node_modules/melange.belt/belt_internalMapInt.js +++ b/node_modules/melange.belt/belt_internalMapInt.js @@ -70,8 +70,8 @@ function getExn(_n, x) { _n = x < v ? n$1.l : n$1.r; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.belt/belt_internalMapString.js b/node_modules/melange.belt/belt_internalMapString.js index 2fe3f5db24..bd2026854d 100644 --- a/node_modules/melange.belt/belt_internalMapString.js +++ b/node_modules/melange.belt/belt_internalMapString.js @@ -70,8 +70,8 @@ function getExn(_n, x) { _n = x < v ? n$1.l : n$1.r; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.belt/belt_internalSetInt.js b/node_modules/melange.belt/belt_internalSetInt.js index 9f5aac67b1..5b69bec1ea 100644 --- a/node_modules/melange.belt/belt_internalSetInt.js +++ b/node_modules/melange.belt/belt_internalSetInt.js @@ -151,8 +151,8 @@ function getExn(_n, x) { _n = x < v ? t.l : t.r; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.belt/belt_internalSetString.js b/node_modules/melange.belt/belt_internalSetString.js index 970cd84c9a..029b190d90 100644 --- a/node_modules/melange.belt/belt_internalSetString.js +++ b/node_modules/melange.belt/belt_internalSetString.js @@ -151,8 +151,8 @@ function getExn(_n, x) { _n = x < v ? t.l : t.r; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange.js/js_exn.js b/node_modules/melange.js/js_exn.js index 7cbcb247d3..dbdadfb2de 100644 --- a/node_modules/melange.js/js_exn.js +++ b/node_modules/melange.js/js_exn.js @@ -45,6 +45,7 @@ function raiseUriError(str) { } module.exports = { + Error$extension: $$Error, $$Error, asJsExn, anyToExnInternal, diff --git a/node_modules/melange.js/js_exn.mjs b/node_modules/melange.js/js_exn.mjs index 660c90d40d..b951be4579 100644 --- a/node_modules/melange.js/js_exn.mjs +++ b/node_modules/melange.js/js_exn.mjs @@ -44,6 +44,7 @@ function raiseUriError(str) { } export { + $$Error as Error$extension, $$Error, asJsExn, anyToExnInternal, diff --git a/node_modules/melange/arg.js b/node_modules/melange/arg.js index cfe4b07e29..ee7572f9ad 100644 --- a/node_modules/melange/arg.js +++ b/node_modules/melange/arg.js @@ -37,8 +37,8 @@ function assoc3(x, _l) { _l = l.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -80,7 +80,7 @@ function add_help(speclist) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { add1 = { hd: [ "-help", @@ -103,7 +103,7 @@ function add_help(speclist) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { add2 = { hd: [ "--help", @@ -380,7 +380,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { try { const match$1 = split(s); match = [ @@ -390,7 +390,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Stop, { MEL_EXN_ID: Stop, _1: { @@ -588,8 +588,8 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return Curry._1(f._0, Stdlib__List.rev(acc)); case /* Expand */ 14 : if (!allow_expand) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Arg.Expand is only allowed with Arg.parse_and_expand_argv_dynamic" }); } @@ -783,7 +783,7 @@ function second_word(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { let exit = 0; let n$1; try { @@ -792,7 +792,7 @@ function second_word(s) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return len; } throw exn$1; @@ -912,7 +912,7 @@ function read_aux(trim, sep, file) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.End_of_file) { + if (exn.MEL_EXN_ID !== Stdlib.End_of_file$extension) { throw exn; } @@ -967,7 +967,9 @@ module.exports = { parse_argv_dynamic, parse_and_expand_argv_dynamic, parse_expand, + Help$extension: Help, Help, + Bad$extension: Bad, Bad, usage, usage_string, diff --git a/node_modules/melange/arg.mjs b/node_modules/melange/arg.mjs index c192631455..84d218ae64 100644 --- a/node_modules/melange/arg.mjs +++ b/node_modules/melange/arg.mjs @@ -36,8 +36,8 @@ function assoc3(x, _l) { _l = l.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -79,7 +79,7 @@ function add_help(speclist) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { add1 = { hd: [ "-help", @@ -102,7 +102,7 @@ function add_help(speclist) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { add2 = { hd: [ "--help", @@ -379,7 +379,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { try { const match$1 = split(s); match = [ @@ -389,7 +389,7 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError(Stop, { MEL_EXN_ID: Stop, _1: { @@ -587,8 +587,8 @@ function parse_and_expand_argv_dynamic_aux(allow_expand, current, argv, speclist return Curry._1(f._0, Stdlib__List.rev(acc)); case /* Expand */ 14 : if (!allow_expand) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Arg.Expand is only allowed with Arg.parse_and_expand_argv_dynamic" }); } @@ -782,7 +782,7 @@ function second_word(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { let exit = 0; let n$1; try { @@ -791,7 +791,7 @@ function second_word(s) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { return len; } throw exn$1; @@ -911,7 +911,7 @@ function read_aux(trim, sep, file) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID !== Stdlib.End_of_file) { + if (exn.MEL_EXN_ID !== Stdlib.End_of_file$extension) { throw exn; } @@ -966,7 +966,9 @@ export { parse_argv_dynamic, parse_and_expand_argv_dynamic, parse_expand, + Help as Help$extension, Help, + Bad as Bad$extension, Bad, usage, usage_string, diff --git a/node_modules/melange/buffer.js b/node_modules/melange/buffer.js index fe5c2fb68a..195418749d 100644 --- a/node_modules/melange/buffer.js +++ b/node_modules/melange/buffer.js @@ -262,8 +262,8 @@ function add_channel(b, ic, len) { } const n = unsafe_add_channel_up_to(b, ic, len); if (n < len) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } @@ -298,8 +298,8 @@ function advance_to_closing(opening, closing, k, s, start) { const i = _i; const k$1 = _k; if (i >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (Caml_string.get(s, i) === opening) { @@ -354,16 +354,16 @@ function advance_to_non_alpha(s, start) { function find_ident(s, start, lim) { if (start >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Caml_string.get(s, start); if (c !== 40 && c !== 123) { const stop = advance_to_non_alpha(s, start); if (stop === start) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return [ @@ -418,7 +418,7 @@ function add_substitute(b, f, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { add_char(b, /* '$' */36); _i = j; _previous = /* ' ' */32; diff --git a/node_modules/melange/buffer.mjs b/node_modules/melange/buffer.mjs index e5a376f3aa..d6e9ff6e8c 100644 --- a/node_modules/melange/buffer.mjs +++ b/node_modules/melange/buffer.mjs @@ -261,8 +261,8 @@ function add_channel(b, ic, len) { } const n = unsafe_add_channel_up_to(b, ic, len); if (n < len) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } @@ -297,8 +297,8 @@ function advance_to_closing(opening, closing, k, s, start) { const i = _i; const k$1 = _k; if (i >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (Caml_string.get(s, i) === opening) { @@ -353,16 +353,16 @@ function advance_to_non_alpha(s, start) { function find_ident(s, start, lim) { if (start >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Caml_string.get(s, start); if (c !== 40 && c !== 123) { const stop = advance_to_non_alpha(s, start); if (stop === start) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } return [ @@ -417,7 +417,7 @@ function add_substitute(b, f, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { add_char(b, /* '$' */36); _i = j; _previous = /* ' ' */32; diff --git a/node_modules/melange/bytes.js b/node_modules/melange/bytes.js index 1f842ed772..27d029cd71 100644 --- a/node_modules/melange/bytes.js +++ b/node_modules/melange/bytes.js @@ -486,8 +486,8 @@ function index_rec(s, lim, _i, c) { while (true) { const i = _i; if (i >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s[i] === c) { @@ -546,8 +546,8 @@ function rindex_rec(s, _i, c) { while (true) { const i = _i; if (i < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s[i] === c) { @@ -614,7 +614,7 @@ function contains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -638,7 +638,7 @@ function rcontains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; diff --git a/node_modules/melange/bytes.mjs b/node_modules/melange/bytes.mjs index c4651c33d0..ef569dc10d 100644 --- a/node_modules/melange/bytes.mjs +++ b/node_modules/melange/bytes.mjs @@ -485,8 +485,8 @@ function index_rec(s, lim, _i, c) { while (true) { const i = _i; if (i >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s[i] === c) { @@ -545,8 +545,8 @@ function rindex_rec(s, _i, c) { while (true) { const i = _i; if (i < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s[i] === c) { @@ -613,7 +613,7 @@ function contains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -637,7 +637,7 @@ function rcontains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; diff --git a/node_modules/melange/camlinternalFormat.js b/node_modules/melange/camlinternalFormat.js index 89a5317970..a28e094761 100644 --- a/node_modules/melange/camlinternalFormat.js +++ b/node_modules/melange/camlinternalFormat.js @@ -4607,7 +4607,7 @@ function open_box_of_string(str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { indent = invalid_box(); } else { throw exn; @@ -4873,20 +4873,20 @@ function fmt_ebb_of_string(legacy_behavior, str) { const parse_tag = function (is_open_tag, str_ind, end_ind) { try { if (str_ind === end_ind) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const match = Caml_string.get(str, str_ind); if (match !== 60) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const ind = Stdlib__String.index_from(str, str_ind + 1 | 0, /* '>' */62); if (ind >= end_ind) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const sub_str = Stdlib__String.sub(str, str_ind, (ind - str_ind | 0) + 1 | 0); @@ -4917,7 +4917,7 @@ function fmt_ebb_of_string(legacy_behavior, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const fmt_rest$1 = parse_literal(str_ind, str_ind, end_ind); const sub_format$1 = { TAG: /* Format */ 0, @@ -6913,8 +6913,8 @@ function fmt_ebb_of_string(legacy_behavior, str) { let match; try { if (str_ind$1 === end_ind || Caml_string.get(str, str_ind$1) !== /* '<' */60) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const str_ind_1 = parse_spaces(str_ind$1 + 1 | 0, end_ind); @@ -6922,15 +6922,15 @@ function fmt_ebb_of_string(legacy_behavior, str) { let exit = 0; if (match$1 >= 48) { if (match$1 >= 58) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } exit = 1; } else { if (match$1 !== 45) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } exit = 1; @@ -6942,8 +6942,8 @@ function fmt_ebb_of_string(legacy_behavior, str) { const match$3 = Caml_string.get(str, str_ind_3); if (match$3 > 57 || match$3 < 45) { if (match$3 !== 62) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const s = Stdlib__String.sub(str, str_ind$1 - 2 | 0, (str_ind_3 - str_ind$1 | 0) + 3 | 0); @@ -6958,15 +6958,15 @@ function fmt_ebb_of_string(legacy_behavior, str) { ]; } else { if (match$3 === 47 || match$3 === 46) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const match$4 = parse_integer(str_ind_3, end_ind); const str_ind_5 = parse_spaces(match$4[0], end_ind); if (Caml_string.get(str, str_ind_5) !== /* '>' */62) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const s$1 = Stdlib__String.sub(str, str_ind$1 - 2 | 0, (str_ind_5 - str_ind$1 | 0) + 3 | 0); @@ -6985,7 +6985,7 @@ function fmt_ebb_of_string(legacy_behavior, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found || exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension || exn.MEL_EXN_ID === Stdlib.Failure$extension) { match = [ str_ind$1, { @@ -7031,8 +7031,8 @@ function fmt_ebb_of_string(legacy_behavior, str) { const match$7 = parse_integer(str_ind_1$1, end_ind); const str_ind_3$1 = parse_spaces(match$7[0], end_ind); if (Caml_string.get(str, str_ind_3$1) !== /* '>' */62) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const s$2 = Stdlib__String.sub(str, str_ind$2 - 2 | 0, (str_ind_3$1 - str_ind$2 | 0) + 3 | 0); @@ -7049,7 +7049,7 @@ function fmt_ebb_of_string(legacy_behavior, str) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found || exn$1.MEL_EXN_ID === Stdlib.Failure) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension || exn$1.MEL_EXN_ID === Stdlib.Failure$extension) { match$5 = undefined; } else { throw exn$1; diff --git a/node_modules/melange/camlinternalFormat.mjs b/node_modules/melange/camlinternalFormat.mjs index 8f3af85258..d0776a904e 100644 --- a/node_modules/melange/camlinternalFormat.mjs +++ b/node_modules/melange/camlinternalFormat.mjs @@ -4606,7 +4606,7 @@ function open_box_of_string(str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { indent = invalid_box(); } else { throw exn; @@ -4872,20 +4872,20 @@ function fmt_ebb_of_string(legacy_behavior, str) { const parse_tag = function (is_open_tag, str_ind, end_ind) { try { if (str_ind === end_ind) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const match = Caml_string.get(str, str_ind); if (match !== 60) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const ind = Stdlib__String.index_from(str, str_ind + 1 | 0, /* '>' */62); if (ind >= end_ind) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const sub_str = Stdlib__String.sub(str, str_ind, (ind - str_ind | 0) + 1 | 0); @@ -4916,7 +4916,7 @@ function fmt_ebb_of_string(legacy_behavior, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const fmt_rest$1 = parse_literal(str_ind, str_ind, end_ind); const sub_format$1 = { TAG: /* Format */ 0, @@ -6912,8 +6912,8 @@ function fmt_ebb_of_string(legacy_behavior, str) { let match; try { if (str_ind$1 === end_ind || Caml_string.get(str, str_ind$1) !== /* '<' */60) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const str_ind_1 = parse_spaces(str_ind$1 + 1 | 0, end_ind); @@ -6921,15 +6921,15 @@ function fmt_ebb_of_string(legacy_behavior, str) { let exit = 0; if (match$1 >= 48) { if (match$1 >= 58) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } exit = 1; } else { if (match$1 !== 45) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } exit = 1; @@ -6941,8 +6941,8 @@ function fmt_ebb_of_string(legacy_behavior, str) { const match$3 = Caml_string.get(str, str_ind_3); if (match$3 > 57 || match$3 < 45) { if (match$3 !== 62) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const s = Stdlib__String.sub(str, str_ind$1 - 2 | 0, (str_ind_3 - str_ind$1 | 0) + 3 | 0); @@ -6957,15 +6957,15 @@ function fmt_ebb_of_string(legacy_behavior, str) { ]; } else { if (match$3 === 47 || match$3 === 46) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const match$4 = parse_integer(str_ind_3, end_ind); const str_ind_5 = parse_spaces(match$4[0], end_ind); if (Caml_string.get(str, str_ind_5) !== /* '>' */62) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const s$1 = Stdlib__String.sub(str, str_ind$1 - 2 | 0, (str_ind_5 - str_ind$1 | 0) + 3 | 0); @@ -6984,7 +6984,7 @@ function fmt_ebb_of_string(legacy_behavior, str) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found || exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension || exn.MEL_EXN_ID === Stdlib.Failure$extension) { match = [ str_ind$1, { @@ -7030,8 +7030,8 @@ function fmt_ebb_of_string(legacy_behavior, str) { const match$7 = parse_integer(str_ind_1$1, end_ind); const str_ind_3$1 = parse_spaces(match$7[0], end_ind); if (Caml_string.get(str, str_ind_3$1) !== /* '>' */62) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const s$2 = Stdlib__String.sub(str, str_ind$2 - 2 | 0, (str_ind_3$1 - str_ind$2 | 0) + 3 | 0); @@ -7048,7 +7048,7 @@ function fmt_ebb_of_string(legacy_behavior, str) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found || exn$1.MEL_EXN_ID === Stdlib.Failure) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension || exn$1.MEL_EXN_ID === Stdlib.Failure$extension) { match$5 = undefined; } else { throw exn$1; diff --git a/node_modules/melange/camlinternalLazy.js b/node_modules/melange/camlinternalLazy.js index 60cdaf0597..ec972fc516 100644 --- a/node_modules/melange/camlinternalLazy.js +++ b/node_modules/melange/camlinternalLazy.js @@ -77,6 +77,7 @@ function indirect(lzv) { } module.exports = { + Undefined$extension: Undefined, Undefined, force_lazy_block, force_val_lazy_block, diff --git a/node_modules/melange/camlinternalLazy.mjs b/node_modules/melange/camlinternalLazy.mjs index 66d5826786..4ebd84dfe1 100644 --- a/node_modules/melange/camlinternalLazy.mjs +++ b/node_modules/melange/camlinternalLazy.mjs @@ -76,6 +76,7 @@ function indirect(lzv) { } export { + Undefined as Undefined$extension, Undefined, force_lazy_block, force_val_lazy_block, diff --git a/node_modules/melange/camlinternalOO.js b/node_modules/melange/camlinternalOO.js index 1a854e93ba..b14e8b9a39 100644 --- a/node_modules/melange/camlinternalOO.js +++ b/node_modules/melange/camlinternalOO.js @@ -181,8 +181,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -343,8 +343,8 @@ function find$1(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$1.compare, x, param.v); @@ -492,8 +492,8 @@ function find$2(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$2.compare, x, param.v); @@ -579,7 +579,7 @@ function get_method_label(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const label = new_method(table); table.methods_by_name = Curry._3(add$1, name, label, table.methods_by_name); table.methods_by_label = Curry._3(add$2, label, true, table.methods_by_label); @@ -618,7 +618,7 @@ function get_method(table, label) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Caml_array.get(table.methods, label); } throw exn; @@ -675,7 +675,7 @@ function narrow(table, vars, virt_meths, concr_meths) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = true; } else { throw exn; @@ -734,7 +734,7 @@ function new_variable(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const index = new_slot(table); if (name !== "") { table.vars = Curry._3(add, name, index, table.vars); @@ -773,7 +773,7 @@ function get_variable(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ diff --git a/node_modules/melange/camlinternalOO.mjs b/node_modules/melange/camlinternalOO.mjs index a19262d71c..cebed27cf3 100644 --- a/node_modules/melange/camlinternalOO.mjs +++ b/node_modules/melange/camlinternalOO.mjs @@ -180,8 +180,8 @@ function find(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -342,8 +342,8 @@ function find$1(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$1.compare, x, param.v); @@ -491,8 +491,8 @@ function find$2(x, _param) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg$2.compare, x, param.v); @@ -578,7 +578,7 @@ function get_method_label(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const label = new_method(table); table.methods_by_name = Curry._3(add$1, name, label, table.methods_by_name); table.methods_by_label = Curry._3(add$2, label, true, table.methods_by_label); @@ -617,7 +617,7 @@ function get_method(table, label) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return Caml_array.get(table.methods, label); } throw exn; @@ -674,7 +674,7 @@ function narrow(table, vars, virt_meths, concr_meths) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { tmp = true; } else { throw exn; @@ -733,7 +733,7 @@ function new_variable(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const index = new_slot(table); if (name !== "") { table.vars = Curry._3(add, name, index, table.vars); @@ -772,7 +772,7 @@ function get_variable(table, name) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { throw new Caml_js_exceptions.MelangeError("Assert_failure", { MEL_EXN_ID: "Assert_failure", _1: [ diff --git a/node_modules/melange/digest.js b/node_modules/melange/digest.js index 1e3266a050..872bba7ea3 100644 --- a/node_modules/melange/digest.js +++ b/node_modules/melange/digest.js @@ -116,8 +116,8 @@ function channel(ic, toread) { } const n$1 = Stdlib.input(ic, buf, 0, Stdlib__Int.min(4096, toread$1)); if (n$1 === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Caml_external_polyfill.resolve("caml_blake2_update")(ctx, buf, 0, n$1); @@ -225,8 +225,8 @@ function channel$1(ic, toread) { } const n$1 = Stdlib.input(ic, buf, 0, Stdlib__Int.min(4096, toread$1)); if (n$1 === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Caml_external_polyfill.resolve("caml_blake2_update")(ctx, buf, 0, n$1); @@ -334,8 +334,8 @@ function channel$2(ic, toread) { } const n$1 = Stdlib.input(ic, buf, 0, Stdlib__Int.min(4096, toread$1)); if (n$1 === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Caml_external_polyfill.resolve("caml_blake2_update")(ctx, buf, 0, n$1); diff --git a/node_modules/melange/digest.mjs b/node_modules/melange/digest.mjs index e986b70d6d..e5deda9884 100644 --- a/node_modules/melange/digest.mjs +++ b/node_modules/melange/digest.mjs @@ -115,8 +115,8 @@ function channel(ic, toread) { } const n$1 = Stdlib.input(ic, buf, 0, Stdlib__Int.min(4096, toread$1)); if (n$1 === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Caml_external_polyfill.resolve("caml_blake2_update")(ctx, buf, 0, n$1); @@ -224,8 +224,8 @@ function channel$1(ic, toread) { } const n$1 = Stdlib.input(ic, buf, 0, Stdlib__Int.min(4096, toread$1)); if (n$1 === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Caml_external_polyfill.resolve("caml_blake2_update")(ctx, buf, 0, n$1); @@ -333,8 +333,8 @@ function channel$2(ic, toread) { } const n$1 = Stdlib.input(ic, buf, 0, Stdlib__Int.min(4096, toread$1)); if (n$1 === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } Caml_external_polyfill.resolve("caml_blake2_update")(ctx, buf, 0, n$1); diff --git a/node_modules/melange/dynarray.js b/node_modules/melange/dynarray.js index fd9d2b2abb..eef24b88ff 100644 --- a/node_modules/melange/dynarray.js +++ b/node_modules/melange/dynarray.js @@ -189,12 +189,13 @@ const Dummy_Array = { init, copy_from_array, unsafe_nocopy_from_array, - Dummy_found, + Dummy_found$extension: Dummy_found, unsafe_nocopy_to_array, blit_array, blit, prefix, - extend + extend, + Dummy_found }; const global_dummy = fresh(); @@ -666,8 +667,8 @@ function pop_last(a) { invalid_length(length, capacity); } if (length === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const last = length - 1 | 0; @@ -685,7 +686,7 @@ function pop_last_opt(a) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -867,7 +868,7 @@ function blit_assume_room(src, src_pos, src_length, dst, dst_pos, dst_length, bl } catch (raw_i){ const i = Caml_js_exceptions.internalToOCamlException(raw_i); - if (i.MEL_EXN_ID === Dummy_Array.Dummy_found) { + if (i.MEL_EXN_ID === Dummy_Array.Dummy_found$extension) { return missing_element(i._1, src_length); } throw i; @@ -1765,7 +1766,7 @@ function unsafe_to_iarray(capacity, f) { } catch (raw_i){ const i = Caml_js_exceptions.internalToOCamlException(raw_i); - if (i.MEL_EXN_ID === Dummy_Array.Dummy_found) { + if (i.MEL_EXN_ID === Dummy_Array.Dummy_found$extension) { tmp = missing_element(i._1, length); } else { throw i; diff --git a/node_modules/melange/dynarray.mjs b/node_modules/melange/dynarray.mjs index 61f6e6bb9c..1e8cf45593 100644 --- a/node_modules/melange/dynarray.mjs +++ b/node_modules/melange/dynarray.mjs @@ -188,12 +188,13 @@ const Dummy_Array = { init, copy_from_array, unsafe_nocopy_from_array, - Dummy_found, + Dummy_found$extension: Dummy_found, unsafe_nocopy_to_array, blit_array, blit, prefix, - extend + extend, + Dummy_found }; const global_dummy = fresh(); @@ -665,8 +666,8 @@ function pop_last(a) { invalid_length(length, capacity); } if (length === 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const last = length - 1 | 0; @@ -684,7 +685,7 @@ function pop_last_opt(a) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return; } throw exn; @@ -866,7 +867,7 @@ function blit_assume_room(src, src_pos, src_length, dst, dst_pos, dst_length, bl } catch (raw_i){ const i = Caml_js_exceptions.internalToOCamlException(raw_i); - if (i.MEL_EXN_ID === Dummy_Array.Dummy_found) { + if (i.MEL_EXN_ID === Dummy_Array.Dummy_found$extension) { return missing_element(i._1, src_length); } throw i; @@ -1764,7 +1765,7 @@ function unsafe_to_iarray(capacity, f) { } catch (raw_i){ const i = Caml_js_exceptions.internalToOCamlException(raw_i); - if (i.MEL_EXN_ID === Dummy_Array.Dummy_found) { + if (i.MEL_EXN_ID === Dummy_Array.Dummy_found$extension) { tmp = missing_element(i._1, length); } else { throw i; diff --git a/node_modules/melange/ephemeron.js b/node_modules/melange/ephemeron.js index 387fdabc40..bbe6d5c574 100644 --- a/node_modules/melange/ephemeron.js +++ b/node_modules/melange/ephemeron.js @@ -239,8 +239,8 @@ function MakeSeeded(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -342,8 +342,8 @@ function MakeSeeded(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -368,7 +368,7 @@ function MakeSeeded(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -714,8 +714,8 @@ function Make(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -817,8 +817,8 @@ function Make(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -843,7 +843,7 @@ function Make(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -1298,8 +1298,8 @@ function MakeSeeded$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1401,8 +1401,8 @@ function MakeSeeded$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1428,7 +1428,7 @@ function MakeSeeded$1(H1, H2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -1784,8 +1784,8 @@ function Make$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1887,8 +1887,8 @@ function Make$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1914,7 +1914,7 @@ function Make$1(H1, H2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -2150,22 +2150,22 @@ function query$2(eph, keys) { const l = Stdlib__Obj.Ephemeron.length(eph); try { if (l !== keys.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } for (let i = 0; i < l; ++i) { const k = Stdlib__Obj.Ephemeron.get_key(eph, i); if (k !== undefined) { if (Caml_option.valFromOption(k) !== Caml_array.get(keys, i)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -2173,7 +2173,7 @@ function query$2(eph, keys) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return; } throw exn; @@ -2409,8 +2409,8 @@ function MakeSeeded$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -2512,8 +2512,8 @@ function MakeSeeded$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -2540,7 +2540,7 @@ function MakeSeeded$2(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -2917,8 +2917,8 @@ function Make$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -3020,8 +3020,8 @@ function Make$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -3048,7 +3048,7 @@ function Make$2(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -3214,22 +3214,22 @@ function add$2(b, k, d) { function test_keys$1(k, e) { try { if (Stdlib__Obj.Ephemeron.length(e) !== k.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } for (let i = 0, i_finish = k.length; i < i_finish; ++i) { const x = Stdlib__Obj.Ephemeron.get_key(e, i); if (x !== undefined) { if (Caml_option.valFromOption(x) !== Caml_array.get(k, i)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -3237,7 +3237,7 @@ function test_keys$1(k, e) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn; diff --git a/node_modules/melange/ephemeron.mjs b/node_modules/melange/ephemeron.mjs index a29ffdf118..b718906b7c 100644 --- a/node_modules/melange/ephemeron.mjs +++ b/node_modules/melange/ephemeron.mjs @@ -238,8 +238,8 @@ function MakeSeeded(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -341,8 +341,8 @@ function MakeSeeded(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -367,7 +367,7 @@ function MakeSeeded(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -713,8 +713,8 @@ function Make(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -816,8 +816,8 @@ function Make(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -842,7 +842,7 @@ function Make(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -1297,8 +1297,8 @@ function MakeSeeded$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1400,8 +1400,8 @@ function MakeSeeded$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1427,7 +1427,7 @@ function MakeSeeded$1(H1, H2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -1783,8 +1783,8 @@ function Make$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1886,8 +1886,8 @@ function Make$1(H1, H2) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -1913,7 +1913,7 @@ function Make$1(H1, H2) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -2149,22 +2149,22 @@ function query$2(eph, keys) { const l = Stdlib__Obj.Ephemeron.length(eph); try { if (l !== keys.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } for (let i = 0; i < l; ++i) { const k = Stdlib__Obj.Ephemeron.get_key(eph, i); if (k !== undefined) { if (Caml_option.valFromOption(k) !== Caml_array.get(keys, i)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -2172,7 +2172,7 @@ function query$2(eph, keys) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return; } throw exn; @@ -2408,8 +2408,8 @@ function MakeSeeded$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -2511,8 +2511,8 @@ function MakeSeeded$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -2539,7 +2539,7 @@ function MakeSeeded$2(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -2916,8 +2916,8 @@ function Make$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -3019,8 +3019,8 @@ function Make$2(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (hkey === param._0) { @@ -3047,7 +3047,7 @@ function Make$2(H) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { const container = create(key, info); Caml_array.set(h.data, i, { TAG: /* Cons */ 0, @@ -3213,22 +3213,22 @@ function add$2(b, k, d) { function test_keys$1(k, e) { try { if (Stdlib__Obj.Ephemeron.length(e) !== k.length) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } for (let i = 0, i_finish = k.length; i < i_finish; ++i) { const x = Stdlib__Obj.Ephemeron.get_key(e, i); if (x !== undefined) { if (Caml_option.valFromOption(x) !== Caml_array.get(k, i)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } else { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } } @@ -3236,7 +3236,7 @@ function test_keys$1(k, e) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return false; } throw exn; diff --git a/node_modules/melange/filename.js b/node_modules/melange/filename.js index fc6b81c52e..33e3a904ee 100644 --- a/node_modules/melange/filename.js +++ b/node_modules/melange/filename.js @@ -139,7 +139,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { temp_dir_name = "/tmp"; } else { throw exn; @@ -237,7 +237,7 @@ try { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { temp_dir_name$1 = "."; } else { throw exn$1; @@ -677,7 +677,7 @@ function temp_file(temp_dirOpt, prefix, suffix) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Sys_error) { + if (e.MEL_EXN_ID === Stdlib.Sys_error$extension) { if (counter >= 20) { throw e; } @@ -717,7 +717,7 @@ function open_temp_file(modeOpt, permsOpt, temp_dirOpt, prefix, suffix) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Sys_error) { + if (e.MEL_EXN_ID === Stdlib.Sys_error$extension) { if (counter >= 20) { throw e; } @@ -742,7 +742,7 @@ function temp_dir(temp_dirOpt, permsOpt, prefix, suffix) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Sys_error) { + if (e.MEL_EXN_ID === Stdlib.Sys_error$extension) { if (counter >= 20) { throw e; } diff --git a/node_modules/melange/filename.mjs b/node_modules/melange/filename.mjs index 8c7c6c8b71..440c326d44 100644 --- a/node_modules/melange/filename.mjs +++ b/node_modules/melange/filename.mjs @@ -138,7 +138,7 @@ try { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { temp_dir_name = "/tmp"; } else { throw exn; @@ -236,7 +236,7 @@ try { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.Not_found) { + if (exn$1.MEL_EXN_ID === Stdlib.Not_found$extension) { temp_dir_name$1 = "."; } else { throw exn$1; @@ -676,7 +676,7 @@ function temp_file(temp_dirOpt, prefix, suffix) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Sys_error) { + if (e.MEL_EXN_ID === Stdlib.Sys_error$extension) { if (counter >= 20) { throw e; } @@ -716,7 +716,7 @@ function open_temp_file(modeOpt, permsOpt, temp_dirOpt, prefix, suffix) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Sys_error) { + if (e.MEL_EXN_ID === Stdlib.Sys_error$extension) { if (counter >= 20) { throw e; } @@ -741,7 +741,7 @@ function temp_dir(temp_dirOpt, permsOpt, prefix, suffix) { } catch (raw_e){ const e = Caml_js_exceptions.internalToOCamlException(raw_e); - if (e.MEL_EXN_ID === Stdlib.Sys_error) { + if (e.MEL_EXN_ID === Stdlib.Sys_error$extension) { if (counter >= 20) { throw e; } diff --git a/node_modules/melange/format.js b/node_modules/melange/format.js index ab66104c5a..f2dcc42528 100644 --- a/node_modules/melange/format.js +++ b/node_modules/melange/format.js @@ -889,8 +889,8 @@ function pp_set_geometry(state, max_indent, margin) { if (msg.TAG === /* Ok */ 0) { return pp_set_full_geometry(state, geometry); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Format.pp_set_geometry: " + msg._0 }); } @@ -2415,6 +2415,7 @@ module.exports = { set_ellipsis_text, pp_get_ellipsis_text, get_ellipsis_text, + String_tag$extension: String_tag, String_tag, pp_open_stag, open_stag, diff --git a/node_modules/melange/format.mjs b/node_modules/melange/format.mjs index f139dbc893..4850f8fe27 100644 --- a/node_modules/melange/format.mjs +++ b/node_modules/melange/format.mjs @@ -888,8 +888,8 @@ function pp_set_geometry(state, max_indent, margin) { if (msg.TAG === /* Ok */ 0) { return pp_set_full_geometry(state, geometry); } - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Format.pp_set_geometry: " + msg._0 }); } @@ -2414,6 +2414,7 @@ export { set_ellipsis_text, pp_get_ellipsis_text, get_ellipsis_text, + String_tag as String_tag$extension, String_tag, pp_open_stag, open_stag, diff --git a/node_modules/melange/fun.js b/node_modules/melange/fun.js index 2843ad6dd9..6e073ec4e3 100644 --- a/node_modules/melange/fun.js +++ b/node_modules/melange/fun.js @@ -74,6 +74,7 @@ module.exports = { flip, negate, protect, + Finally_raised$extension: Finally_raised, Finally_raised, } /* Not a pure module */ diff --git a/node_modules/melange/fun.mjs b/node_modules/melange/fun.mjs index c8f1651908..24cbd8e301 100644 --- a/node_modules/melange/fun.mjs +++ b/node_modules/melange/fun.mjs @@ -73,6 +73,7 @@ export { flip, negate, protect, + Finally_raised as Finally_raised$extension, Finally_raised, } /* Not a pure module */ diff --git a/node_modules/melange/hashtbl.js b/node_modules/melange/hashtbl.js index 4dac92d9c7..472471b1a4 100644 --- a/node_modules/melange/hashtbl.js +++ b/node_modules/melange/hashtbl.js @@ -476,8 +476,8 @@ function MakeSeeded(H) { const find = function (h, key) { const match = Caml_array.get(h.data, key_index(h, key)); if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k1 = match.key; @@ -487,8 +487,8 @@ function MakeSeeded(H) { return d1; } if (/* tag */ typeof next1 !== "object" && typeof next1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k2 = next1.key; @@ -498,8 +498,8 @@ function MakeSeeded(H) { return d2; } if (/* tag */ typeof next2 !== "object" && typeof next2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k3 = next2.key; @@ -512,8 +512,8 @@ function MakeSeeded(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param.key; @@ -788,8 +788,8 @@ function Make(H) { const find = function (h, key) { const match = Caml_array.get(h.data, key_index(h, key)); if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k1 = match.key; @@ -799,8 +799,8 @@ function Make(H) { return d1; } if (/* tag */ typeof next1 !== "object" && typeof next1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k2 = next1.key; @@ -810,8 +810,8 @@ function Make(H) { return d2; } if (/* tag */ typeof next2 !== "object" && typeof next2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k3 = next2.key; @@ -824,8 +824,8 @@ function Make(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param.key; @@ -1118,8 +1118,8 @@ function remove(h, key) { function find(h, key) { const match = Caml_array.get(h.data, key_index(h, key)); if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k1 = match.key; @@ -1129,8 +1129,8 @@ function find(h, key) { return d1; } if (/* tag */ typeof next1 !== "object" && typeof next1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k2 = next1.key; @@ -1140,8 +1140,8 @@ function find(h, key) { return d2; } if (/* tag */ typeof next2 !== "object" && typeof next2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k3 = next2.key; @@ -1154,8 +1154,8 @@ function find(h, key) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param.key; diff --git a/node_modules/melange/hashtbl.mjs b/node_modules/melange/hashtbl.mjs index 261e15c746..0cc9c70d67 100644 --- a/node_modules/melange/hashtbl.mjs +++ b/node_modules/melange/hashtbl.mjs @@ -475,8 +475,8 @@ function MakeSeeded(H) { const find = function (h, key) { const match = Caml_array.get(h.data, key_index(h, key)); if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k1 = match.key; @@ -486,8 +486,8 @@ function MakeSeeded(H) { return d1; } if (/* tag */ typeof next1 !== "object" && typeof next1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k2 = next1.key; @@ -497,8 +497,8 @@ function MakeSeeded(H) { return d2; } if (/* tag */ typeof next2 !== "object" && typeof next2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k3 = next2.key; @@ -511,8 +511,8 @@ function MakeSeeded(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param.key; @@ -787,8 +787,8 @@ function Make(H) { const find = function (h, key) { const match = Caml_array.get(h.data, key_index(h, key)); if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k1 = match.key; @@ -798,8 +798,8 @@ function Make(H) { return d1; } if (/* tag */ typeof next1 !== "object" && typeof next1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k2 = next1.key; @@ -809,8 +809,8 @@ function Make(H) { return d2; } if (/* tag */ typeof next2 !== "object" && typeof next2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k3 = next2.key; @@ -823,8 +823,8 @@ function Make(H) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param.key; @@ -1117,8 +1117,8 @@ function remove(h, key) { function find(h, key) { const match = Caml_array.get(h.data, key_index(h, key)); if (/* tag */ typeof match !== "object" && typeof match !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k1 = match.key; @@ -1128,8 +1128,8 @@ function find(h, key) { return d1; } if (/* tag */ typeof next1 !== "object" && typeof next1 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k2 = next1.key; @@ -1139,8 +1139,8 @@ function find(h, key) { return d2; } if (/* tag */ typeof next2 !== "object" && typeof next2 !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k3 = next2.key; @@ -1153,8 +1153,8 @@ function find(h, key) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const k = param.key; diff --git a/node_modules/melange/in_channel.js b/node_modules/melange/in_channel.js index 0091b66da0..3551041c84 100644 --- a/node_modules/melange/in_channel.js +++ b/node_modules/melange/in_channel.js @@ -47,7 +47,7 @@ function input_char(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -62,7 +62,7 @@ function input_byte(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -77,7 +77,7 @@ function input_line(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -92,7 +92,7 @@ function really_input(ic, buf, pos, len) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -106,7 +106,7 @@ function really_input_string(ic, len) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -167,7 +167,7 @@ function input_all(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Sys_error) { + if (exn.MEL_EXN_ID === Stdlib.Sys_error$extension) { initial_size = -1; } else { throw exn; @@ -186,7 +186,7 @@ function input_all(ic) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn$1.MEL_EXN_ID === Stdlib.End_of_file$extension) { return Caml_bytes.bytes_to_string(buf); } throw exn$1; @@ -220,7 +220,7 @@ function input_lines_dps(_dst, _offset, ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { dst[offset] = /* [] */ 0; return; } @@ -246,7 +246,7 @@ function input_lines(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return /* [] */ 0; } throw exn; @@ -268,7 +268,7 @@ function fold_lines(f, _accu, ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return accu; } throw exn; diff --git a/node_modules/melange/in_channel.mjs b/node_modules/melange/in_channel.mjs index 13cbb2a236..d469574ee8 100644 --- a/node_modules/melange/in_channel.mjs +++ b/node_modules/melange/in_channel.mjs @@ -46,7 +46,7 @@ function input_char(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -61,7 +61,7 @@ function input_byte(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -76,7 +76,7 @@ function input_line(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -91,7 +91,7 @@ function really_input(ic, buf, pos, len) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -105,7 +105,7 @@ function really_input_string(ic, len) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return; } throw exn; @@ -166,7 +166,7 @@ function input_all(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Sys_error) { + if (exn.MEL_EXN_ID === Stdlib.Sys_error$extension) { initial_size = -1; } else { throw exn; @@ -185,7 +185,7 @@ function input_all(ic) { } catch (raw_exn$1){ const exn$1 = Caml_js_exceptions.internalToOCamlException(raw_exn$1); - if (exn$1.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn$1.MEL_EXN_ID === Stdlib.End_of_file$extension) { return Caml_bytes.bytes_to_string(buf); } throw exn$1; @@ -219,7 +219,7 @@ function input_lines_dps(_dst, _offset, ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { dst[offset] = /* [] */ 0; return; } @@ -245,7 +245,7 @@ function input_lines(ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return /* [] */ 0; } throw exn; @@ -267,7 +267,7 @@ function fold_lines(f, _accu, ic) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { return accu; } throw exn; diff --git a/node_modules/melange/int32.js b/node_modules/melange/int32.js index f0bf863db0..5ec410984d 100644 --- a/node_modules/melange/int32.js +++ b/node_modules/melange/int32.js @@ -63,7 +63,7 @@ function of_string_opt(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { return; } throw exn; diff --git a/node_modules/melange/int32.mjs b/node_modules/melange/int32.mjs index a4b11ff749..0552f94efe 100644 --- a/node_modules/melange/int32.mjs +++ b/node_modules/melange/int32.mjs @@ -62,7 +62,7 @@ function of_string_opt(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { return; } throw exn; diff --git a/node_modules/melange/int64.js b/node_modules/melange/int64.js index 9d5822d95e..a6da8c50e7 100644 --- a/node_modules/melange/int64.js +++ b/node_modules/melange/int64.js @@ -53,7 +53,7 @@ function of_string_opt(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { return; } throw exn; diff --git a/node_modules/melange/int64.mjs b/node_modules/melange/int64.mjs index 199d101358..c2ed206062 100644 --- a/node_modules/melange/int64.mjs +++ b/node_modules/melange/int64.mjs @@ -52,7 +52,7 @@ function of_string_opt(s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { return; } throw exn; diff --git a/node_modules/melange/lazy.js b/node_modules/melange/lazy.js index bc6759662e..d655c5601f 100644 --- a/node_modules/melange/lazy.js +++ b/node_modules/melange/lazy.js @@ -148,7 +148,7 @@ function force(th) { }; } -const Undefined = CamlinternalLazy.Undefined; +const Undefined = CamlinternalLazy.Undefined$extension; const is_val$1 = CamlinternalLazy.is_val; @@ -162,6 +162,7 @@ const Mutexed = { }; module.exports = { + Undefined$extension: Undefined, Undefined, map, is_val: is_val$1, diff --git a/node_modules/melange/lazy.mjs b/node_modules/melange/lazy.mjs index 9d10054e67..232ce4f656 100644 --- a/node_modules/melange/lazy.mjs +++ b/node_modules/melange/lazy.mjs @@ -147,7 +147,7 @@ function force(th) { }; } -const Undefined = CamlinternalLazy.Undefined; +const Undefined = CamlinternalLazy.Undefined$extension; const is_val$1 = CamlinternalLazy.is_val; @@ -161,6 +161,7 @@ const Mutexed = { }; export { + Undefined as Undefined$extension, Undefined, map, is_val$1 as is_val, diff --git a/node_modules/melange/list.js b/node_modules/melange/list.js index f92694f521..d701602253 100644 --- a/node_modules/melange/list.js +++ b/node_modules/melange/list.js @@ -743,8 +743,8 @@ function assoc(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -775,8 +775,8 @@ function assq(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -867,8 +867,8 @@ function find(p, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange/list.mjs b/node_modules/melange/list.mjs index c405dfc985..560564e1c7 100644 --- a/node_modules/melange/list.mjs +++ b/node_modules/melange/list.mjs @@ -742,8 +742,8 @@ function assoc(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -774,8 +774,8 @@ function assq(x, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } @@ -866,8 +866,8 @@ function find(p, _param) { _param = param.tl; continue; } - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); }; } diff --git a/node_modules/melange/map.js b/node_modules/melange/map.js index c8d6af1924..bdbef2d888 100644 --- a/node_modules/melange/map.js +++ b/node_modules/melange/map.js @@ -167,8 +167,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -183,8 +183,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -257,8 +257,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -359,8 +359,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -395,8 +395,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; diff --git a/node_modules/melange/map.mjs b/node_modules/melange/map.mjs index 6a6704db9a..8f74f4a4f4 100644 --- a/node_modules/melange/map.mjs +++ b/node_modules/melange/map.mjs @@ -166,8 +166,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const c = Curry._2(funarg.compare, x, param.v); @@ -182,8 +182,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -256,8 +256,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -358,8 +358,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -394,8 +394,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; diff --git a/node_modules/melange/parsing.js b/node_modules/melange/parsing.js index 8291f8287b..dd69c14d8b 100644 --- a/node_modules/melange/parsing.js +++ b/node_modules/melange/parsing.js @@ -225,8 +225,10 @@ module.exports = { rhs_start_pos, rhs_end_pos, clear_parser, + Parse_error$extension: Parse_error, Parse_error, set_trace, + YYexit$extension: YYexit, YYexit, yyparse, peek_val, diff --git a/node_modules/melange/parsing.mjs b/node_modules/melange/parsing.mjs index 05d62e971c..6a8c04e9f2 100644 --- a/node_modules/melange/parsing.mjs +++ b/node_modules/melange/parsing.mjs @@ -224,8 +224,10 @@ export { rhs_start_pos, rhs_end_pos, clear_parser, + Parse_error as Parse_error$extension, Parse_error, set_trace, + YYexit as YYexit$extension, YYexit, yyparse, peek_val, diff --git a/node_modules/melange/printexc.js b/node_modules/melange/printexc.js index 4105eb299b..3e2bc8def3 100644 --- a/node_modules/melange/printexc.js +++ b/node_modules/melange/printexc.js @@ -108,23 +108,23 @@ function use_printers(x) { } function to_string_default(x) { - if (x.MEL_EXN_ID === Stdlib.Out_of_memory) { + if (x.MEL_EXN_ID === Stdlib.Out_of_memory$extension) { return "Out of memory"; } - if (x.MEL_EXN_ID === Stdlib.Stack_overflow) { + if (x.MEL_EXN_ID === Stdlib.Stack_overflow$extension) { return "Stack overflow"; } - if (x.MEL_EXN_ID === Stdlib.Match_failure) { + if (x.MEL_EXN_ID === Stdlib.Match_failure$extension) { const match = x._1; const $$char = match[2]; return Curry._5(Stdlib__Printf.sprintf(locfmt), match[0], match[1], $$char, $$char + 5 | 0, "Pattern matching failed"); } - if (x.MEL_EXN_ID === Stdlib.Assert_failure) { + if (x.MEL_EXN_ID === Stdlib.Assert_failure$extension) { const match$1 = x._1; const $$char$1 = match$1[2]; return Curry._5(Stdlib__Printf.sprintf(locfmt), match$1[0], match$1[1], $$char$1, $$char$1 + 6 | 0, "Assertion failed"); } - if (x.MEL_EXN_ID === Stdlib.Undefined_recursive_module) { + if (x.MEL_EXN_ID === Stdlib.Undefined_recursive_module$extension) { const match$2 = x._1; const $$char$2 = match$2[2]; return Curry._5(Stdlib__Printf.sprintf(locfmt), match$2[0], match$2[1], $$char$2, $$char$2 + 6 | 0, "Undefined recursive module"); @@ -215,7 +215,7 @@ function convert_raw_backtrace(bt) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { return; } throw exn; diff --git a/node_modules/melange/printexc.mjs b/node_modules/melange/printexc.mjs index 26939b75ee..e6a33766a5 100644 --- a/node_modules/melange/printexc.mjs +++ b/node_modules/melange/printexc.mjs @@ -107,23 +107,23 @@ function use_printers(x) { } function to_string_default(x) { - if (x.MEL_EXN_ID === Stdlib.Out_of_memory) { + if (x.MEL_EXN_ID === Stdlib.Out_of_memory$extension) { return "Out of memory"; } - if (x.MEL_EXN_ID === Stdlib.Stack_overflow) { + if (x.MEL_EXN_ID === Stdlib.Stack_overflow$extension) { return "Stack overflow"; } - if (x.MEL_EXN_ID === Stdlib.Match_failure) { + if (x.MEL_EXN_ID === Stdlib.Match_failure$extension) { const match = x._1; const $$char = match[2]; return Curry._5(Stdlib__Printf.sprintf(locfmt), match[0], match[1], $$char, $$char + 5 | 0, "Pattern matching failed"); } - if (x.MEL_EXN_ID === Stdlib.Assert_failure) { + if (x.MEL_EXN_ID === Stdlib.Assert_failure$extension) { const match$1 = x._1; const $$char$1 = match$1[2]; return Curry._5(Stdlib__Printf.sprintf(locfmt), match$1[0], match$1[1], $$char$1, $$char$1 + 6 | 0, "Assertion failed"); } - if (x.MEL_EXN_ID === Stdlib.Undefined_recursive_module) { + if (x.MEL_EXN_ID === Stdlib.Undefined_recursive_module$extension) { const match$2 = x._1; const $$char$2 = match$2[2]; return Curry._5(Stdlib__Printf.sprintf(locfmt), match$2[0], match$2[1], $$char$2, $$char$2 + 6 | 0, "Undefined recursive module"); @@ -214,7 +214,7 @@ function convert_raw_backtrace(bt) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Failure) { + if (exn.MEL_EXN_ID === Stdlib.Failure$extension) { return; } throw exn; diff --git a/node_modules/melange/queue.js b/node_modules/melange/queue.js index 297d2ebc34..fafe27a8ca 100644 --- a/node_modules/melange/queue.js +++ b/node_modules/melange/queue.js @@ -243,6 +243,7 @@ const pop = take; const top = peek; module.exports = { + Empty$extension: Empty, Empty, create, add, diff --git a/node_modules/melange/queue.mjs b/node_modules/melange/queue.mjs index 06a9348072..e0dd48a3f4 100644 --- a/node_modules/melange/queue.mjs +++ b/node_modules/melange/queue.mjs @@ -242,6 +242,7 @@ const pop = take; const top = peek; export { + Empty as Empty$extension, Empty, create, add, diff --git a/node_modules/melange/scanf.js b/node_modules/melange/scanf.js index e5b474b82a..df563cef7f 100644 --- a/node_modules/melange/scanf.js +++ b/node_modules/melange/scanf.js @@ -31,7 +31,7 @@ function next_char(ib) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { ib.ic_current_char = /* '\000' */0; ib.ic_current_char_is_valid = false; ib.ic_eof = true; @@ -52,8 +52,8 @@ function peek_char(ib) { function checked_peek_char(ib) { const c = peek_char(ib); if (ib.ic_eof) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } return c; @@ -131,8 +131,8 @@ function from_string(s) { const len = s.length; const next = function (param) { if (i.contents >= len) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } const c = Caml_string.get(s, i.contents); @@ -152,14 +152,14 @@ const file_buffer_size = { function scan_close_at_end(ic) { Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } function scan_raise_at_end(_ic) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } @@ -182,8 +182,8 @@ function from_ic(scan_close_ic, iname, ic) { return c; } if (eof.contents) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } lim.contents = Stdlib.input(ic, buf, 0, len); @@ -1367,7 +1367,7 @@ function scan_chars_in_char_set(char_set, scan_indic, width, ib) { function scanf_bad_input(ib, x) { let s; - if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure) { + if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure$extension) { s = x._1; } else { throw x; @@ -1729,7 +1729,7 @@ function make_scanf(ib, _fmt, readers) { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Failure) { + if (msg.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(Scan_failure, { MEL_EXN_ID: Scan_failure, _1: msg._1 @@ -1758,7 +1758,7 @@ function make_scanf(ib, _fmt, readers) { } catch (raw_msg$1){ const msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg$1); - if (msg$1.MEL_EXN_ID === Stdlib.Failure) { + if (msg$1.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(Scan_failure, { MEL_EXN_ID: Scan_failure, _1: msg$1._1 @@ -1976,13 +1976,13 @@ function kscanf_gen(ib, ef, af, param) { if (exc.MEL_EXN_ID === Scan_failure) { return Curry._2(ef, ib, exc); } - if (exc.MEL_EXN_ID === Stdlib.Failure) { + if (exc.MEL_EXN_ID === Stdlib.Failure$extension) { return Curry._2(ef, ib, exc); } - if (exc.MEL_EXN_ID === Stdlib.End_of_file) { + if (exc.MEL_EXN_ID === Stdlib.End_of_file$extension) { return Curry._2(ef, ib, exc); } - if (exc.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exc.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { const s = exc._1 + (" in format \"" + (Stdlib__String.escaped(str) + "\"")); throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -2045,7 +2045,7 @@ function bscanf_format(ib, format, f) { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Failure) { + if (msg.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(Scan_failure, { MEL_EXN_ID: Scan_failure, _1: msg._1 @@ -2100,6 +2100,7 @@ const Scanning = { module.exports = { Scanning, + Scan_failure$extension: Scan_failure, Scan_failure, bscanf, bscanf_opt, diff --git a/node_modules/melange/scanf.mjs b/node_modules/melange/scanf.mjs index 46aa4dae2a..101a0a9320 100644 --- a/node_modules/melange/scanf.mjs +++ b/node_modules/melange/scanf.mjs @@ -30,7 +30,7 @@ function next_char(ib) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.End_of_file) { + if (exn.MEL_EXN_ID === Stdlib.End_of_file$extension) { ib.ic_current_char = /* '\000' */0; ib.ic_current_char_is_valid = false; ib.ic_eof = true; @@ -51,8 +51,8 @@ function peek_char(ib) { function checked_peek_char(ib) { const c = peek_char(ib); if (ib.ic_eof) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } return c; @@ -130,8 +130,8 @@ function from_string(s) { const len = s.length; const next = function (param) { if (i.contents >= len) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } const c = Caml_string.get(s, i.contents); @@ -151,14 +151,14 @@ const file_buffer_size = { function scan_close_at_end(ic) { Caml_external_polyfill.resolve("caml_ml_close_channel")(ic); - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } function scan_raise_at_end(_ic) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } @@ -181,8 +181,8 @@ function from_ic(scan_close_ic, iname, ic) { return c; } if (eof.contents) { - throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file, { - MEL_EXN_ID: Stdlib.End_of_file + throw new Caml_js_exceptions.MelangeError(Stdlib.End_of_file$extension, { + MEL_EXN_ID: Stdlib.End_of_file$extension }); } lim.contents = Stdlib.input(ic, buf, 0, len); @@ -1366,7 +1366,7 @@ function scan_chars_in_char_set(char_set, scan_indic, width, ib) { function scanf_bad_input(ib, x) { let s; - if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure) { + if (x.MEL_EXN_ID === Scan_failure || x.MEL_EXN_ID === Stdlib.Failure$extension) { s = x._1; } else { throw x; @@ -1728,7 +1728,7 @@ function make_scanf(ib, _fmt, readers) { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Failure) { + if (msg.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(Scan_failure, { MEL_EXN_ID: Scan_failure, _1: msg._1 @@ -1757,7 +1757,7 @@ function make_scanf(ib, _fmt, readers) { } catch (raw_msg$1){ const msg$1 = Caml_js_exceptions.internalToOCamlException(raw_msg$1); - if (msg$1.MEL_EXN_ID === Stdlib.Failure) { + if (msg$1.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(Scan_failure, { MEL_EXN_ID: Scan_failure, _1: msg$1._1 @@ -1975,13 +1975,13 @@ function kscanf_gen(ib, ef, af, param) { if (exc.MEL_EXN_ID === Scan_failure) { return Curry._2(ef, ib, exc); } - if (exc.MEL_EXN_ID === Stdlib.Failure) { + if (exc.MEL_EXN_ID === Stdlib.Failure$extension) { return Curry._2(ef, ib, exc); } - if (exc.MEL_EXN_ID === Stdlib.End_of_file) { + if (exc.MEL_EXN_ID === Stdlib.End_of_file$extension) { return Curry._2(ef, ib, exc); } - if (exc.MEL_EXN_ID === Stdlib.Invalid_argument) { + if (exc.MEL_EXN_ID === Stdlib.Invalid_argument$extension) { const s = exc._1 + (" in format \"" + (Stdlib__String.escaped(str) + "\"")); throw new Caml_js_exceptions.MelangeError("Invalid_argument", { MEL_EXN_ID: "Invalid_argument", @@ -2044,7 +2044,7 @@ function bscanf_format(ib, format, f) { } catch (raw_msg){ const msg = Caml_js_exceptions.internalToOCamlException(raw_msg); - if (msg.MEL_EXN_ID === Stdlib.Failure) { + if (msg.MEL_EXN_ID === Stdlib.Failure$extension) { throw new Caml_js_exceptions.MelangeError(Scan_failure, { MEL_EXN_ID: Scan_failure, _1: msg._1 @@ -2099,6 +2099,7 @@ const Scanning = { export { Scanning, + Scan_failure as Scan_failure$extension, Scan_failure, bscanf, bscanf_opt, diff --git a/node_modules/melange/seq.js b/node_modules/melange/seq.js index 373d8cbfa3..6858f3e1ae 100644 --- a/node_modules/melange/seq.js +++ b/node_modules/melange/seq.js @@ -1257,6 +1257,7 @@ module.exports = { drop_while, group, memoize, + Forced_twice$extension: Forced_twice, Forced_twice, once, transpose, diff --git a/node_modules/melange/seq.mjs b/node_modules/melange/seq.mjs index 9251c31fe7..05f2992b40 100644 --- a/node_modules/melange/seq.mjs +++ b/node_modules/melange/seq.mjs @@ -1256,6 +1256,7 @@ export { drop_while, group, memoize, + Forced_twice as Forced_twice$extension, Forced_twice, once, transpose, diff --git a/node_modules/melange/set.js b/node_modules/melange/set.js index 611dfe021e..0c528b46f7 100644 --- a/node_modules/melange/set.js +++ b/node_modules/melange/set.js @@ -161,8 +161,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -191,8 +191,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -696,8 +696,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -713,8 +713,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -775,8 +775,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; diff --git a/node_modules/melange/set.mjs b/node_modules/melange/set.mjs index e63a67ef4f..1193ddc46a 100644 --- a/node_modules/melange/set.mjs +++ b/node_modules/melange/set.mjs @@ -160,8 +160,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const l = param.l; @@ -190,8 +190,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } let tmp = param.r; @@ -695,8 +695,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -712,8 +712,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; @@ -774,8 +774,8 @@ function Make(funarg) { while (true) { const param = _param; if (/* tag */ typeof param !== "object" && typeof param !== "function") { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } const v = param.v; diff --git a/node_modules/melange/stack.js b/node_modules/melange/stack.js index 07c0fac067..49ab92ef2e 100644 --- a/node_modules/melange/stack.js +++ b/node_modules/melange/stack.js @@ -125,6 +125,7 @@ function of_seq(g) { } module.exports = { + Empty$extension: Empty, Empty, create, push, diff --git a/node_modules/melange/stack.mjs b/node_modules/melange/stack.mjs index c65f427965..9f7e6173de 100644 --- a/node_modules/melange/stack.mjs +++ b/node_modules/melange/stack.mjs @@ -124,6 +124,7 @@ function of_seq(g) { } export { + Empty as Empty$extension, Empty, create, push, diff --git a/node_modules/melange/stdlib.js b/node_modules/melange/stdlib.js index 8995e6e318..b781e953ac 100644 --- a/node_modules/melange/stdlib.js +++ b/node_modules/melange/stdlib.js @@ -744,18 +744,31 @@ const LargeFile = { module.exports = { invalid_arg, failwith, + Exit$extension: Exit, Exit, + Match_failure$extension: Match_failure, Match_failure, + Assert_failure$extension: Assert_failure, Assert_failure, + Invalid_argument$extension: Invalid_argument, Invalid_argument, + Failure$extension: Failure, Failure, + Not_found$extension: Not_found, Not_found, + Out_of_memory$extension: Out_of_memory, Out_of_memory, + Stack_overflow$extension: Stack_overflow, Stack_overflow, + Sys_error$extension: Sys_error, Sys_error, + End_of_file$extension: End_of_file, End_of_file, + Division_by_zero$extension: Division_by_zero, Division_by_zero, + Sys_blocked_io$extension: Sys_blocked_io, Sys_blocked_io, + Undefined_recursive_module$extension: Undefined_recursive_module, Undefined_recursive_module, abs, max_int, diff --git a/node_modules/melange/stdlib.mjs b/node_modules/melange/stdlib.mjs index 72e70fb0c9..76f9196bdc 100644 --- a/node_modules/melange/stdlib.mjs +++ b/node_modules/melange/stdlib.mjs @@ -743,18 +743,31 @@ const LargeFile = { export { invalid_arg, failwith, + Exit as Exit$extension, Exit, + Match_failure as Match_failure$extension, Match_failure, + Assert_failure as Assert_failure$extension, Assert_failure, + Invalid_argument as Invalid_argument$extension, Invalid_argument, + Failure as Failure$extension, Failure, + Not_found as Not_found$extension, Not_found, + Out_of_memory as Out_of_memory$extension, Out_of_memory, + Stack_overflow as Stack_overflow$extension, Stack_overflow, + Sys_error as Sys_error$extension, Sys_error, + End_of_file as End_of_file$extension, End_of_file, + Division_by_zero as Division_by_zero$extension, Division_by_zero, + Sys_blocked_io as Sys_blocked_io$extension, Sys_blocked_io, + Undefined_recursive_module as Undefined_recursive_module$extension, Undefined_recursive_module, abs, max_int, diff --git a/node_modules/melange/string.js b/node_modules/melange/string.js index 26bafccaa6..58d2ff9143 100644 --- a/node_modules/melange/string.js +++ b/node_modules/melange/string.js @@ -220,8 +220,8 @@ function index_rec(s, lim, _i, c) { while (true) { const i = _i; if (i >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s.charCodeAt(i) === c) { @@ -280,8 +280,8 @@ function rindex_rec(s, _i, c) { while (true) { const i = _i; if (i < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s.charCodeAt(i) === c) { @@ -348,7 +348,7 @@ function contains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -372,7 +372,7 @@ function rcontains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -482,8 +482,8 @@ function find(start, sub, param, sub_periodic, s) { i = i - 1 | 0; }; if (i <= memory) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + p | 0; @@ -506,8 +506,8 @@ function find(start, sub, param, sub_periodic, s) { i$1 = i$1 - 1 | 0; }; if (i$1 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + q | 0; @@ -517,7 +517,7 @@ function find(start, sub, param, sub_periodic, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return j; } throw exn; @@ -628,8 +628,8 @@ function rfind(start, sub, param, rsub_periodic, s) { i = i - 1 | 0; }; if (i <= memory) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + p | 0; @@ -652,8 +652,8 @@ function rfind(start, sub, param, rsub_periodic, s) { i$1 = i$1 - 1 | 0; }; if (i$1 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + q | 0; @@ -663,7 +663,7 @@ function rfind(start, sub, param, rsub_periodic, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return (slen - 1 | 0) - (j + (sublen - 1 | 0) | 0) | 0; } throw exn; diff --git a/node_modules/melange/string.mjs b/node_modules/melange/string.mjs index aabd286e78..7a2b965e8c 100644 --- a/node_modules/melange/string.mjs +++ b/node_modules/melange/string.mjs @@ -219,8 +219,8 @@ function index_rec(s, lim, _i, c) { while (true) { const i = _i; if (i >= lim) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s.charCodeAt(i) === c) { @@ -279,8 +279,8 @@ function rindex_rec(s, _i, c) { while (true) { const i = _i; if (i < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); } if (s.charCodeAt(i) === c) { @@ -347,7 +347,7 @@ function contains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -371,7 +371,7 @@ function rcontains_from(s, i, c) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Not_found) { + if (exn.MEL_EXN_ID === Stdlib.Not_found$extension) { return false; } throw exn; @@ -481,8 +481,8 @@ function find(start, sub, param, sub_periodic, s) { i = i - 1 | 0; }; if (i <= memory) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + p | 0; @@ -505,8 +505,8 @@ function find(start, sub, param, sub_periodic, s) { i$1 = i$1 - 1 | 0; }; if (i$1 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + q | 0; @@ -516,7 +516,7 @@ function find(start, sub, param, sub_periodic, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return j; } throw exn; @@ -627,8 +627,8 @@ function rfind(start, sub, param, rsub_periodic, s) { i = i - 1 | 0; }; if (i <= memory) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + p | 0; @@ -651,8 +651,8 @@ function rfind(start, sub, param, rsub_periodic, s) { i$1 = i$1 - 1 | 0; }; if (i$1 < 0) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Exit, { - MEL_EXN_ID: Stdlib.Exit + throw new Caml_js_exceptions.MelangeError(Stdlib.Exit$extension, { + MEL_EXN_ID: Stdlib.Exit$extension }); } j = j + q | 0; @@ -662,7 +662,7 @@ function rfind(start, sub, param, rsub_periodic, s) { } catch (raw_exn){ const exn = Caml_js_exceptions.internalToOCamlException(raw_exn); - if (exn.MEL_EXN_ID === Stdlib.Exit) { + if (exn.MEL_EXN_ID === Stdlib.Exit$extension) { return (slen - 1 | 0) - (j + (sublen - 1 | 0) | 0) | 0; } throw exn; diff --git a/node_modules/melange/sys.js b/node_modules/melange/sys.js index 79e47d6491..85965cae26 100644 --- a/node_modules/melange/sys.js +++ b/node_modules/melange/sys.js @@ -287,6 +287,7 @@ module.exports = { signal_to_string, signal_of_int, signal_to_int, + Break$extension: Break, Break, catch_break, ocaml_version, diff --git a/node_modules/melange/sys.mjs b/node_modules/melange/sys.mjs index 77baef4566..cb48f06a6d 100644 --- a/node_modules/melange/sys.mjs +++ b/node_modules/melange/sys.mjs @@ -286,6 +286,7 @@ export { signal_to_string, signal_of_int, signal_to_int, + Break as Break$extension, Break, catch_break, ocaml_version, diff --git a/node_modules/melange/type.js b/node_modules/melange/type.js index babf9b719e..42d9c7a715 100644 --- a/node_modules/melange/type.js +++ b/node_modules/melange/type.js @@ -7,16 +7,17 @@ const Stdlib__Obj = require("./obj.js"); function make(param) { const Id = /* @__PURE__ */ Caml_exceptions.create("Id"); return { + Id$extension: Id, Id }; } function uid(A) { - return Stdlib__Obj.Extension_constructor.id(A.Id); + return Stdlib__Obj.Extension_constructor.id(A.Id$extension); } function provably_equal(A, B) { - if (A.Id === B.Id) { + if (A.Id$extension === B.Id$extension) { return /* Equal */ 0; } diff --git a/node_modules/melange/type.mjs b/node_modules/melange/type.mjs index 7b9a01408e..734a72ba76 100644 --- a/node_modules/melange/type.mjs +++ b/node_modules/melange/type.mjs @@ -6,16 +6,17 @@ import * as Stdlib__Obj from "./obj.mjs"; function make(param) { const Id = /* @__PURE__ */ Caml_exceptions.create("Id"); return { + Id$extension: Id, Id }; } function uid(A) { - return Stdlib__Obj.Extension_constructor.id(A.Id); + return Stdlib__Obj.Extension_constructor.id(A.Id$extension); } function provably_equal(A, B) { - if (A.Id === B.Id) { + if (A.Id$extension === B.Id$extension) { return /* Equal */ 0; } diff --git a/node_modules/melange/weak.js b/node_modules/melange/weak.js index a55d243776..5190689515 100644 --- a/node_modules/melange/weak.js +++ b/node_modules/melange/weak.js @@ -76,8 +76,8 @@ function blit(e1, o1, e2, o2, l) { function fill(ar, ofs, len, x) { if (ofs < 0 || len < 0 || ofs > (length(ar) - len | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Weak.fill" }); } @@ -355,8 +355,8 @@ function Make(H) { return find_aux(t, d, (function (_b, _i, _o, v) { return v; }), (function (_h, _i) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); })); }; diff --git a/node_modules/melange/weak.mjs b/node_modules/melange/weak.mjs index 4226645bcf..1cef909cde 100644 --- a/node_modules/melange/weak.mjs +++ b/node_modules/melange/weak.mjs @@ -75,8 +75,8 @@ function blit(e1, o1, e2, o2, l) { function fill(ar, ofs, len, x) { if (ofs < 0 || len < 0 || ofs > (length(ar) - len | 0)) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument, { - MEL_EXN_ID: Stdlib.Invalid_argument, + throw new Caml_js_exceptions.MelangeError(Stdlib.Invalid_argument$extension, { + MEL_EXN_ID: Stdlib.Invalid_argument$extension, _1: "Weak.fill" }); } @@ -354,8 +354,8 @@ function Make(H) { return find_aux(t, d, (function (_b, _i, _o, v) { return v; }), (function (_h, _i) { - throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found, { - MEL_EXN_ID: Stdlib.Not_found + throw new Caml_js_exceptions.MelangeError(Stdlib.Not_found$extension, { + MEL_EXN_ID: Stdlib.Not_found$extension }); })); }; diff --git a/test/blackbox-tests/exn-cause.t b/test/blackbox-tests/exn-cause.t index f0d363ca16..55a794fb2d 100644 --- a/test/blackbox-tests/exn-cause.t +++ b/test/blackbox-tests/exn-cause.t @@ -41,7 +41,7 @@ } catch (raw_x){ const x = Caml_js_exceptions.internalToOCamlException(raw_x); - if (x.MEL_EXN_ID === A || x.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (x.MEL_EXN_ID === A || x.MEL_EXN_ID === Js__Js_exn.Error$extension) { a0 = x._1; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -58,6 +58,7 @@ console.log(a0); module.exports = { + A$extension: A, A, } /* a0 Not a pure module */ @@ -101,7 +102,7 @@ Raise `null` / `undefined` } catch (raw_x){ const x = Caml_js_exceptions.internalToOCamlException(raw_x); - if (x.MEL_EXN_ID === A || x.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (x.MEL_EXN_ID === A || x.MEL_EXN_ID === Js__Js_exn.Error$extension) { a0 = x._1; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -123,7 +124,7 @@ Raise `null` / `undefined` } catch (raw_x$1){ const x$1 = Caml_js_exceptions.internalToOCamlException(raw_x$1); - if (x$1.MEL_EXN_ID === A || x$1.MEL_EXN_ID === Js__Js_exn.$$Error) { + if (x$1.MEL_EXN_ID === A || x$1.MEL_EXN_ID === Js__Js_exn.Error$extension) { a1 = x$1._1; } else { throw new Caml_js_exceptions.MelangeError("Assert_failure", { @@ -140,6 +141,7 @@ Raise `null` / `undefined` console.log(a0, a1); module.exports = { + A$extension: A, A, } /* a0 Not a pure module */ @@ -193,6 +195,7 @@ Raise `null` / `undefined` console.log(a0); module.exports = { + A$extension: A, A, } /* a0 Not a pure module */ @@ -248,6 +251,7 @@ Re-throw console.log(a0); module.exports = { + A$extension: A, A, } /* a0 Not a pure module */ @@ -286,6 +290,7 @@ Exception without raising }); module.exports = { + A$extension: A, A, _a, } diff --git a/test/blackbox-tests/mel-as-inline-records.t b/test/blackbox-tests/mel-as-inline-records.t index 1a8bacfe78..5e02d47633 100644 --- a/test/blackbox-tests/mel-as-inline-records.t +++ b/test/blackbox-tests/mel-as-inline-records.t @@ -50,6 +50,7 @@ Test `@mel.as` in inline records / record extensions module.exports = { user, user2, + UserException$extension: UserException, UserException, user3, } diff --git a/test/blackbox-tests/module-field-namespaces.t b/test/blackbox-tests/module-field-namespaces.t new file mode 100644 index 0000000000..389ce6021c --- /dev/null +++ b/test/blackbox-tests/module-field-namespaces.t @@ -0,0 +1,375 @@ +A module compiles to a JavaScript object, which has a single namespace, while +OCaml has one per sort of component. Fields whose namespace could clash with +another one are renamed: extension constructors get a `$extension` suffix, +classes a `$class` one. Values and modules keep their name. + + $ . ./setup.sh + $ cat > dune-project < (lang dune 3.8) + > (using melange 0.1) + > EOF + $ cat > dune < (melange.emit + > (target output) + > (module_systems (commonjs js) (es6 mjs))) + > EOF + +An exception and a module can share a name: OCaml accepts it, and so does +Melange now. `Foo` is taken by the module, so the exception is only reachable +under its mangled name. + + $ cat > collide.ml < exception Foo of string + > module Foo = struct let x = 1 end + > EOF + $ dune build @melange + $ cat _build/default/output/collide.js + // Generated by Melange + 'use strict'; + + const Caml_exceptions = require("melange.js/caml_exceptions.js"); + + const Foo = /* @__PURE__ */ Caml_exceptions.create("Melange__Collide.Foo"); + + const Foo$1 = { + x: 1 + }; + + module.exports = { + Foo$extension: Foo, + Foo: Foo$1, + } + /* No side effect */ + +Same story between a value and a class. + + $ cat > collide.ml < class foo = object method m = 1 end + > let foo = 2 + > EOF + $ dune build @melange + $ cat _build/default/output/collide.js | grep -A 4 "module.exports" + module.exports = { + foo$class: foo, + foo: foo$1, + } + /* foo Not a pure module */ + +Without a clash, the mangled field is also exposed under its plain OCaml name, +so JavaScript written against the old name keeps working. + + $ cat > collide.ml < exception Foo of string + > class bar = object method m = 1 end + > let v = 3 + > EOF + $ dune build @melange + $ cat _build/default/output/collide.js | grep -A 6 "module.exports" + module.exports = { + Foo$extension: Foo, + Foo, + bar$class: bar, + bar, + v, + } + +The same naming applies inside nested module objects. + + $ cat > nested.ml < module Clash = struct + > exception Foo of string + > module Foo = struct let x = 1 end + > end + > module Plain = struct + > exception Bar + > end + > EOF + $ dune build @melange + $ cat _build/default/output/nested.js + // Generated by Melange + 'use strict'; + + const Caml_exceptions = require("melange.js/caml_exceptions.js"); + + const Foo = /* @__PURE__ */ Caml_exceptions.create("Melange.Nested.Clash.Foo"); + + const Foo$1 = { + x: 1 + }; + + const Clash = { + Foo$extension: Foo, + Foo: Foo$1 + }; + + const Bar = /* @__PURE__ */ Caml_exceptions.create("Melange.Nested.Plain.Bar"); + + const Plain = { + Bar$extension: Bar, + Bar + }; + + module.exports = { + Clash, + Plain, + } + /* No side effect */ + +Another compilation unit reaches both `Foo`s, at the top level and nested. + + $ cat > consumer.ml < let a = Collide.v + > let b = Nested.Clash.Foo.x + > let c () = raise (Nested.Clash.Foo "boom") + > let d () = raise Nested.Plain.Bar + > EOF + $ dune build @melange + $ cat _build/default/output/consumer.js + // Generated by Melange + 'use strict'; + + const Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + const Melange__Collide = require("./collide.js"); + const Melange__Nested = require("./nested.js"); + + const b = Melange__Nested.Clash.Foo.x; + + function c(param) { + throw new Caml_js_exceptions.MelangeError(Melange__Nested.Clash.Foo$extension, { + MEL_EXN_ID: Melange__Nested.Clash.Foo$extension, + _1: "boom" + }); + } + + function d(param) { + throw new Caml_js_exceptions.MelangeError(Melange__Nested.Plain.Bar$extension, { + MEL_EXN_ID: Melange__Nested.Plain.Bar$extension + }); + } + + const a = Melange__Collide.v; + + module.exports = { + a, + b, + c, + d, + } + /* Melange__Collide Not a pure module */ + +It runs. + + $ cat > main.ml < let () = + > Js.log Consumer.b; + > (try Consumer.c () with Nested.Clash.Foo s -> Js.log s); + > (try Consumer.d () with Nested.Plain.Bar -> Js.log "bar") + > EOF + $ dune build @melange + $ node _build/default/output/main.js + 1 + boom + bar + +A signature can hide the module the exception clashes with. The field is still +named after its namespace, so the ascribed module and its users agree. + + $ cat > ascribed.ml < module M : sig + > exception Foo of string + > val v : int + > end = struct + > exception Foo of string + > module Foo = struct let x = 1 end + > let v = Foo.x + > end + > let f () = raise (M.Foo "hidden") + > EOF + $ dune build @melange + $ cat _build/default/output/ascribed.js + // Generated by Melange + 'use strict'; + + const Caml_exceptions = require("melange.js/caml_exceptions.js"); + const Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + + const Foo = /* @__PURE__ */ Caml_exceptions.create("Melange.Ascribed.M.Foo"); + + const M = { + Foo$extension: Foo, + v: 1, + Foo + }; + + function f(param) { + throw new Caml_js_exceptions.MelangeError(Foo, { + MEL_EXN_ID: Foo, + _1: "hidden" + }); + } + + module.exports = { + M, + f, + } + /* No side effect */ + +`include` and `open` rebind the fields of a module, and have to read them under +the names that module gave them. + + $ cat > included.ml < include Nested.Clash + > let y = Foo.x + > let z () = raise (Foo "included") + > open Nested.Plain + > let w () = raise Bar + > EOF + $ dune build @melange + $ cat _build/default/output/included.js + // Generated by Melange + 'use strict'; + + const Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + const Melange__Nested = require("./nested.js"); + + const Foo = Melange__Nested.Clash.Foo$extension; + + const y = Melange__Nested.Clash.Foo.x; + + function z(param) { + throw new Caml_js_exceptions.MelangeError(Foo, { + MEL_EXN_ID: Foo, + _1: "included" + }); + } + + function w(param) { + throw new Caml_js_exceptions.MelangeError(Melange__Nested.Plain.Bar$extension, { + MEL_EXN_ID: Melange__Nested.Plain.Bar$extension + }); + } + + const Foo$1 = Melange__Nested.Clash.Foo; + + module.exports = { + Foo$extension: Foo, + Foo: Foo$1, + y, + z, + w, + } + /* No side effect */ + +ES6 output names the exports the same way, aliases included. + + $ cat _build/default/output/collide.mjs | grep -A 6 "^export" + export { + Foo as Foo$extension, + Foo, + bar as bar$class, + bar, + v, + } + +Functors, first-class modules and local modules all reach their fields through +module coercions, which name fields from one side of the boundary only. + + $ cat > torture.ml < module type S = sig + > exception Foo of string + > module Foo : sig val x : int end + > class c : object method m : int end + > val c : int + > end + > module M : S = struct + > exception Foo of string + > module Foo = struct let x = 41 end + > class c = object method m = 7 end + > let c = 5 + > end + > module F (X : S) = struct + > let v = X.Foo.x + X.c + > let raise_it () = raise (X.Foo "functor") + > let m = (new X.c)#m + > end + > module A = F (M) + > let first_class = (module M : S) + > let unpacked () = + > let module U = (val first_class : S) in + > (U.Foo.x, U.c, (try raise (U.Foo "fc") with U.Foo s -> s)) + > let local () = + > let module L = struct + > exception Foo + > module Foo = struct let y = 3 end + > end in + > (L.Foo.y, (try raise L.Foo with L.Foo -> "local")) + > let () = + > Js.log (A.v, A.m, (try A.raise_it () with M.Foo s -> s)); + > Js.log (unpacked ()); + > Js.log (local ()) + > EOF + $ dune build @melange + $ cat _build/default/output/torture.js | grep -A 12 "^function F" + function F(X) { + const v = X.Foo.x + X.c | 0; + const raise_it = function (param) { + throw new Caml_js_exceptions.MelangeError(X.Foo$extension, { + MEL_EXN_ID: X.Foo$extension, + _1: "functor" + }); + }; + const tmp = Curry._1(X.c$class[0], undefined); + const m = Caml_oo_curry.js1(109, 1, tmp); + return { + v, + raise_it, + $ node _build/default/output/torture.js + [ 46, 7, 'functor' ] + [ 41, 5, 'fc' ] + [ 3, 'local' ] + +With cross-module optimization on, the inlined values still resolve. + + $ cat > dune < (melange.emit + > (target output) + > (compile_flags :standard --mel-cross-module-opt)) + > EOF + $ dune build @melange + $ cat _build/default/output/consumer.js + // Generated by Melange + 'use strict'; + + const Caml_js_exceptions = require("melange.js/caml_js_exceptions.js"); + const Melange__Collide = require("./collide.js"); + const Melange__Nested = require("./nested.js"); + + const b = Melange__Nested.Clash.Foo.x; + + function c(param) { + throw new Caml_js_exceptions.MelangeError(Melange__Nested.Clash.Foo$extension, { + MEL_EXN_ID: Melange__Nested.Clash.Foo$extension, + _1: "boom" + }); + } + + function d(param) { + throw new Caml_js_exceptions.MelangeError(Melange__Nested.Plain.Bar$extension, { + MEL_EXN_ID: Melange__Nested.Plain.Bar$extension + }); + } + + const a = Melange__Collide.v; + + module.exports = { + a, + b, + c, + d, + } + /* Melange__Collide Not a pure module */ + + $ node _build/default/output/main.js + 1 + boom + bar diff --git a/vendor/melange-compiler-libs b/vendor/melange-compiler-libs index f513fb1721..4e399de063 160000 --- a/vendor/melange-compiler-libs +++ b/vendor/melange-compiler-libs @@ -1 +1 @@ -Subproject commit f513fb172162b43b5771f67c6a2c1ad50874f2fe +Subproject commit 4e399de063b51c8d205474daa2a84a39f780772c