diff --git a/compiler/tests-full/dune b/compiler/tests-full/dune index 634f4e0d36..9877675b08 100644 --- a/compiler/tests-full/dune +++ b/compiler/tests-full/dune @@ -3,7 +3,7 @@ (mode (promote (until-clean))) (enabled_if - (= %{ocaml_version} "5.0.0")) + (= %{ocaml_version} "5.1.0")) (action (run %{bin:js_of_ocaml} @@ -16,7 +16,7 @@ (rule (targets stdlib.cma.output.js) (enabled_if - (= %{ocaml_version} "5.0.0")) + (= %{ocaml_version} "5.1.0")) (action (with-stdout-to %{targets} @@ -25,6 +25,6 @@ (rule (alias runtest) (enabled_if - (= %{ocaml_version} "5.0.0")) + (= %{ocaml_version} "5.1.0")) (action (diff stdlib.cma.expected.js stdlib.cma.output.js))) diff --git a/compiler/tests-full/stdlib.cma.expected.js b/compiler/tests-full/stdlib.cma.expected.js index 282f75cac5..e95d98a6a6 100644 --- a/compiler/tests-full/stdlib.cma.expected.js +++ b/compiler/tests-full/stdlib.cma.expected.js @@ -5,7 +5,7 @@ "use strict"; var runtime = globalThis.jsoo_runtime; function erase_rel(param){ - /*<>*/ if(typeof param === "number") + /*<>*/ if(typeof param === "number") /*<>*/ return 0; switch(param[0]){ case 0: @@ -71,7 +71,7 @@ /*<>*/ return [14, erase_rel(rest$13)]; } - /*<>*/ } + } function concat_fmtty(fmtty1, fmtty2){ /*<>*/ if(typeof fmtty1 === "number") /*<>*/ return fmtty2; @@ -303,7 +303,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib -//# unitInfo: Requires: Assert_failure, CamlinternalFormatBasics, Division_by_zero, End_of_file, Failure, Invalid_argument, Match_failure, Not_found, Out_of_memory, Stack_overflow, Sys_blocked_io, Sys_error, Undefined_recursive_module +//# unitInfo: Requires: CamlinternalFormatBasics (function (globalThis){ "use strict"; @@ -382,7 +382,7 @@ cst_Stdlib_Exit = "Stdlib.Exit", _a_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 32752), _b_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 65520), - _c_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 32752), + _c_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 32760), _d_ = runtime.caml_int64_create_lo_mi_hi(16777215, 16777215, 32751), _e_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 16), _f_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 15536); @@ -468,13 +468,13 @@ function int_of_string_opt(s){ /*<>*/ try{ /*<>*/ /*<>*/ var - _B_ = [0, /*<>*/ caml_int_of_string(s)]; - /*<>*/ return _B_; + _D_ = [0, /*<>*/ caml_int_of_string(s)]; + /*<>*/ return _D_; } - catch(_C_){ - var _A_ = caml_wrap_exception(_C_); - if(_A_[1] === Failure) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_A_, 0); + catch(_E_){ + var _C_ = caml_wrap_exception(_E_); + if(_C_[1] === Failure) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_C_, 0); } /*<>*/ } function valid_float_lexem(s){ @@ -500,50 +500,82 @@ function float_of_string_opt(s){ /*<>*/ try{ /*<>*/ /*<>*/ var - _y_ = [0, /*<>*/ caml_float_of_string(s)]; - /*<>*/ return _y_; + _A_ = [0, /*<>*/ caml_float_of_string(s)]; + /*<>*/ return _A_; } - catch(_z_){ - var _x_ = caml_wrap_exception(_z_); - if(_x_[1] === Failure) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_x_, 0); + catch(_B_){ + var _z_ = caml_wrap_exception(_B_); + if(_z_[1] === Failure) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_z_, 0); } /*<>*/ } function symbol$0(l1, l2){ /*<>*/ if(! l1) /*<>*/ return l2; - var tl = l1[2], hd = l1[1]; - /*<>*/ return [0, hd, symbol$0(tl, l2)]; - /*<>*/ } - /*<>*/ var - /*<>*/ stdin = - /*<>*/ caml_ml_open_descriptor_in(0), - /*<>*/ stdout = - /*<>*/ caml_ml_open_descriptor_out(1), - /*<>*/ stderr = - /*<>*/ caml_ml_open_descriptor_out(2); + var _x_ = l1[2], h1 = l1[1]; + if(! _x_) /*<>*/ return [0, h1, l2]; + var match = _x_[2], h2 = _x_[1]; + if(! match) /*<>*/ return [0, h1, [0, h2, l2]]; + /*<>*/ var + tl = match[2], + h3 = match[1], + /*<>*/ block = [0, h3, 24029], + dst = block, + offset = 1, + l1$0 = tl; + /*<>*/ for(;;){ + if(l1$0){ + var _y_ = l1$0[2], h1$0 = l1$0[1]; + if(_y_){ + var match$0 = _y_[2], h2$0 = _y_[1]; + if(match$0){ + /*<>*/ var + tl$0 = match$0[2], + h3$0 = match$0[1], + /*<>*/ dst$0 = [0, h3$0, 24029]; + dst[1 + offset] = [0, h1$0, [0, h2$0, dst$0]]; + var dst = dst$0, offset = 1, l1$0 = tl$0; + continue; + } + dst[1 + offset] = [0, h1$0, [0, h2$0, l2]]; + } + else + dst[1 + offset] = [0, h1$0, l2]; + } + else + dst[1 + offset] = l2; + /*<>*/ return [0, h1, [0, h2, block]]; + } + /*<>*/ } + /*<>*/ var + /*<>*/ stdin = + /*<>*/ caml_ml_open_descriptor_in(0), + /*<>*/ stdout = + /*<>*/ caml_ml_open_descriptor_out(1), + /*<>*/ stderr = + /*<>*/ caml_ml_open_descriptor_out(2); function open_out_gen(mode, perm, name){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var c = - /*<>*/ caml_ml_open_descriptor_out - ( /*<>*/ caml_sys_open(name, mode, perm)); - /*<>*/ /*<>*/ caml_ml_set_channel_name + /*<>*/ caml_ml_open_descriptor_out + ( /*<>*/ caml_sys_open(name, mode, perm)); + /*<>*/ /*<>*/ caml_ml_set_channel_name (c, name); - /*<>*/ return c; - /*<>*/ } + /*<>*/ return c; + /*<>*/ } function open_out(name){ - /*<>*/ return open_out_gen(_i_, 438, name); - /*<>*/ } + /*<>*/ return open_out_gen(_i_, 438, name); + /*<>*/ } function open_out_bin(name){ - /*<>*/ return open_out_gen(_j_, 438, name); - /*<>*/ } + /*<>*/ return open_out_gen(_j_, 438, name); + /*<>*/ } function flush_all(param){ - /*<>*/ var - param$0 = /*<>*/ runtime.caml_ml_out_channels_list(0); - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; + /*<>*/ var + param$0 = /*<>*/ runtime.caml_ml_out_channels_list(0); + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; var l = param$0[2], a = param$0[1]; - /*<>*/ try{ - /*<>*/ /*<>*/ caml_ml_flush(a); + /*<>*/ try{ + /*<>*/ /*<>*/ caml_ml_flush(a); } catch(_w_){ var _v_ = caml_wrap_exception(_w_); @@ -551,80 +583,80 @@ } var param$0 = l; } - /*<>*/ } + /*<>*/ } function output_bytes(oc, s){ - /*<>*/ return /*<>*/ caml_ml_output_bytes + /*<>*/ return /*<>*/ caml_ml_output_bytes (oc, s, 0, caml_ml_bytes_length(s)); - /*<>*/ } + /*<>*/ } function output_string(oc, s){ - /*<>*/ return /*<>*/ caml_ml_output + /*<>*/ return /*<>*/ caml_ml_output (oc, s, 0, caml_ml_string_length(s)); - /*<>*/ } + /*<>*/ } function output(oc, s, ofs, len){ - /*<>*/ if + /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) - /*<>*/ return /*<>*/ caml_ml_output_bytes + /*<>*/ return /*<>*/ caml_ml_output_bytes (oc, s, ofs, len); - /*<>*/ return invalid_arg(cst_output); - /*<>*/ } + /*<>*/ return invalid_arg(cst_output); + /*<>*/ } function output_substring(oc, s, ofs, len){ - /*<>*/ if + /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_string_length(s) - len | 0) >= ofs) - /*<>*/ return /*<>*/ caml_ml_output + /*<>*/ return /*<>*/ caml_ml_output (oc, s, ofs, len); - /*<>*/ return invalid_arg(cst_output_substring); - /*<>*/ } + /*<>*/ return invalid_arg(cst_output_substring); + /*<>*/ } function output_value(chan, v){ - /*<>*/ return /*<>*/ runtime.caml_output_value + /*<>*/ return /*<>*/ runtime.caml_output_value (chan, v, 0); - /*<>*/ } + /*<>*/ } function close_out(oc){ - /*<>*/ /*<>*/ caml_ml_flush(oc); - /*<>*/ return /*<>*/ caml_ml_close_channel + /*<>*/ /*<>*/ caml_ml_flush(oc); + /*<>*/ return /*<>*/ caml_ml_close_channel (oc); - /*<>*/ } + /*<>*/ } function close_out_noerr(oc){ - /*<>*/ try{ - /*<>*/ /*<>*/ caml_ml_flush(oc); + /*<>*/ try{ + /*<>*/ /*<>*/ caml_ml_flush(oc); } catch(_u_){} - /*<>*/ try{ - /*<>*/ /*<>*/ var - _s_ = /*<>*/ caml_ml_close_channel(oc); - /*<>*/ return _s_; + /*<>*/ try{ + /*<>*/ /*<>*/ var + _s_ = /*<>*/ caml_ml_close_channel(oc); + /*<>*/ return _s_; } - catch(_t_){ /*<>*/ return 0;} - /*<>*/ } + catch(_t_){ /*<>*/ return 0;} + /*<>*/ } function open_in_gen(mode, perm, name){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var c = - /*<>*/ caml_ml_open_descriptor_in - ( /*<>*/ caml_sys_open(name, mode, perm)); - /*<>*/ /*<>*/ caml_ml_set_channel_name + /*<>*/ caml_ml_open_descriptor_in + ( /*<>*/ caml_sys_open(name, mode, perm)); + /*<>*/ /*<>*/ caml_ml_set_channel_name (c, name); - /*<>*/ return c; - /*<>*/ } + /*<>*/ return c; + /*<>*/ } function open_in(name){ - /*<>*/ return open_in_gen(_k_, 0, name); - /*<>*/ } + /*<>*/ return open_in_gen(_k_, 0, name); + /*<>*/ } function open_in_bin(name){ - /*<>*/ return open_in_gen(_l_, 0, name); - /*<>*/ } + /*<>*/ return open_in_gen(_l_, 0, name); + /*<>*/ } function input(ic, s, ofs, len){ - /*<>*/ if + /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) - /*<>*/ return /*<>*/ caml_ml_input + /*<>*/ return /*<>*/ caml_ml_input (ic, s, ofs, len); - /*<>*/ return invalid_arg(cst_input); - /*<>*/ } + /*<>*/ return invalid_arg(cst_input); + /*<>*/ } function unsafe_really_input(ic, s, ofs, len){ - /*<>*/ var ofs$0 = ofs, len$0 = len; - /*<>*/ for(;;){ - if(0 >= len$0) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = /*<>*/ caml_ml_input(ic, s, ofs$0, len$0); - /*<>*/ if(0 === r) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ var ofs$0 = ofs, len$0 = len; + /*<>*/ for(;;){ + if(0 >= len$0) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_ml_input(ic, s, ofs$0, len$0); + /*<>*/ if(0 === r) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (End_of_file, 1); var len$1 = len$0 - r | 0, @@ -632,224 +664,224 @@ ofs$0 = ofs$1, len$0 = len$1; } - /*<>*/ } + /*<>*/ } function really_input(ic, s, ofs, len){ - /*<>*/ if + /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_bytes_length(s) - len | 0) >= ofs) - /*<>*/ return unsafe_really_input(ic, s, ofs, len); - /*<>*/ return invalid_arg(cst_really_input); - /*<>*/ } + /*<>*/ return unsafe_really_input(ic, s, ofs, len); + /*<>*/ return invalid_arg(cst_really_input); + /*<>*/ } function really_input_string(ic, len){ - /*<>*/ /*<>*/ var - s = /*<>*/ caml_create_bytes(len); - /*<>*/ really_input(ic, s, 0, len); + /*<>*/ /*<>*/ var + s = /*<>*/ caml_create_bytes(len); + /*<>*/ really_input(ic, s, 0, len); return caml_string_of_bytes(s); - /*<>*/ } + /*<>*/ } function input_line(chan){ - /*<>*/ function build_result(buf, pos, param){ + /*<>*/ function build_result(buf, pos, param){ var pos$0 = pos, param$0 = param; for(;;){ - if(! param$0) /*<>*/ return buf; - /*<>*/ var + if(! param$0) /*<>*/ return buf; + /*<>*/ var tl = param$0[2], hd = param$0[1], - /*<>*/ len = - /*<>*/ caml_ml_bytes_length(hd); - /*<>*/ /*<>*/ runtime.caml_blit_bytes + /*<>*/ len = + /*<>*/ caml_ml_bytes_length(hd); + /*<>*/ /*<>*/ runtime.caml_blit_bytes (hd, 0, buf, pos$0 - len | 0, len); var pos$1 = pos$0 - len | 0, pos$0 = pos$1, param$0 = tl; } } var accu = 0, len = 0; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - n = /*<>*/ runtime.caml_ml_input_scan_line(chan); - /*<>*/ if(0 === n){ + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + n = /*<>*/ runtime.caml_ml_input_scan_line(chan); + /*<>*/ if(0 === n){ if(! accu) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (End_of_file, 1); var _r_ = build_result - ( /*<>*/ caml_create_bytes(len), len, accu); + ( /*<>*/ caml_create_bytes(len), len, accu); } else{ if(0 >= n){ - /*<>*/ /*<>*/ var - beg = /*<>*/ caml_create_bytes(- n | 0); - /*<>*/ /*<>*/ caml_ml_input + /*<>*/ /*<>*/ var + beg = /*<>*/ caml_create_bytes(- n | 0); + /*<>*/ /*<>*/ caml_ml_input (chan, beg, 0, - n | 0); - /*<>*/ var + /*<>*/ var len$1 = len - n | 0, - /*<>*/ accu$0 = [0, beg, accu], + /*<>*/ accu$0 = [0, beg, accu], accu = accu$0, len = len$1; continue; } - /*<>*/ /*<>*/ var - res = /*<>*/ caml_create_bytes(n - 1 | 0); - /*<>*/ /*<>*/ caml_ml_input + /*<>*/ /*<>*/ var + res = /*<>*/ caml_create_bytes(n - 1 | 0); + /*<>*/ /*<>*/ caml_ml_input (chan, res, 0, n - 1 | 0); - /*<>*/ /*<>*/ caml_ml_input_char + /*<>*/ /*<>*/ caml_ml_input_char (chan); if(accu) var len$0 = (len + n | 0) - 1 | 0, _r_ = build_result - ( /*<>*/ caml_create_bytes(len$0), + ( /*<>*/ caml_create_bytes(len$0), len$0, [0, res, accu]); else var _r_ = res; } - /*<>*/ return /*<>*/ caml_string_of_bytes + /*<>*/ return /*<>*/ caml_string_of_bytes (_r_); } - /*<>*/ } + /*<>*/ } function close_in_noerr(ic){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _p_ = /*<>*/ caml_ml_close_channel(ic); - /*<>*/ return _p_; + /*<>*/ try{ + /*<>*/ /*<>*/ var + _p_ = /*<>*/ caml_ml_close_channel(ic); + /*<>*/ return _p_; } - catch(_q_){ /*<>*/ return 0;} - /*<>*/ } + catch(_q_){ /*<>*/ return 0;} + /*<>*/ } function print_char(c){ - /*<>*/ return /*<>*/ caml_ml_output_char + /*<>*/ return /*<>*/ caml_ml_output_char (stdout, c); - /*<>*/ } + /*<>*/ } function print_string(s){ - /*<>*/ return output_string(stdout, s); - /*<>*/ } + /*<>*/ return output_string(stdout, s); + /*<>*/ } function print_bytes(s){ - /*<>*/ return output_bytes(stdout, s); - /*<>*/ } + /*<>*/ return output_bytes(stdout, s); + /*<>*/ } function print_int(i){ - /*<>*/ return output_string(stdout, "" + i); - /*<>*/ } + /*<>*/ return output_string(stdout, "" + i); + /*<>*/ } function print_float(f){ - /*<>*/ return output_string(stdout, string_of_float(f)); - /*<>*/ } + /*<>*/ return output_string(stdout, string_of_float(f)); + /*<>*/ } function print_endline(s){ - /*<>*/ output_string(stdout, s); - /*<>*/ /*<>*/ caml_ml_output_char + /*<>*/ output_string(stdout, s); + /*<>*/ /*<>*/ caml_ml_output_char (stdout, 10); - /*<>*/ return /*<>*/ caml_ml_flush + /*<>*/ return /*<>*/ caml_ml_flush (stdout); - /*<>*/ } + /*<>*/ } function print_newline(param){ - /*<>*/ /*<>*/ caml_ml_output_char + /*<>*/ /*<>*/ caml_ml_output_char (stdout, 10); - /*<>*/ return /*<>*/ caml_ml_flush + /*<>*/ return /*<>*/ caml_ml_flush (stdout); - /*<>*/ } + /*<>*/ } function prerr_char(c){ - /*<>*/ return /*<>*/ caml_ml_output_char + /*<>*/ return /*<>*/ caml_ml_output_char (stderr, c); - /*<>*/ } + /*<>*/ } function prerr_string(s){ - /*<>*/ return output_string(stderr, s); - /*<>*/ } + /*<>*/ return output_string(stderr, s); + /*<>*/ } function prerr_bytes(s){ - /*<>*/ return output_bytes(stderr, s); - /*<>*/ } + /*<>*/ return output_bytes(stderr, s); + /*<>*/ } function prerr_int(i){ - /*<>*/ return output_string(stderr, "" + i); - /*<>*/ } + /*<>*/ return output_string(stderr, "" + i); + /*<>*/ } function prerr_float(f){ - /*<>*/ return output_string(stderr, string_of_float(f)); - /*<>*/ } + /*<>*/ return output_string(stderr, string_of_float(f)); + /*<>*/ } function prerr_endline(s){ - /*<>*/ output_string(stderr, s); - /*<>*/ /*<>*/ caml_ml_output_char + /*<>*/ output_string(stderr, s); + /*<>*/ /*<>*/ caml_ml_output_char (stderr, 10); - /*<>*/ return /*<>*/ caml_ml_flush + /*<>*/ return /*<>*/ caml_ml_flush (stderr); - /*<>*/ } + /*<>*/ } function prerr_newline(param){ - /*<>*/ /*<>*/ caml_ml_output_char + /*<>*/ /*<>*/ caml_ml_output_char (stderr, 10); - /*<>*/ return /*<>*/ caml_ml_flush + /*<>*/ return /*<>*/ caml_ml_flush (stderr); - /*<>*/ } + /*<>*/ } function read_line(param){ - /*<>*/ /*<>*/ caml_ml_flush(stdout); - /*<>*/ return input_line(stdin); - /*<>*/ } + /*<>*/ /*<>*/ caml_ml_flush(stdout); + /*<>*/ return input_line(stdin); + /*<>*/ } function read_int(param){ - /*<>*/ return /*<>*/ caml_int_of_string + /*<>*/ return /*<>*/ caml_int_of_string (read_line(0)); - /*<>*/ } + /*<>*/ } function read_int_opt(param){ - /*<>*/ return int_of_string_opt(read_line(0)); - /*<>*/ } + /*<>*/ return int_of_string_opt(read_line(0)); + /*<>*/ } function read_float(param){ - /*<>*/ return /*<>*/ caml_float_of_string + /*<>*/ return /*<>*/ caml_float_of_string (read_line(0)); - /*<>*/ } + /*<>*/ } function read_float_opt(param){ - /*<>*/ return float_of_string_opt(read_line(0)); - /*<>*/ } + /*<>*/ return float_of_string_opt(read_line(0)); + /*<>*/ } function string_of_format(param){ var str = param[2]; - /*<>*/ return str; + /*<>*/ return str; } function symbol$1(param, _n_){ - /*<>*/ var + /*<>*/ var str2 = _n_[2], fmt2 = _n_[1], str1 = param[2], fmt1 = param[1], - /*<>*/ _o_ = symbol(str1, symbol(cst$0, str2)); - /*<>*/ return [0, - /*<>*/ caml_call2 + /*<>*/ _o_ = symbol(str1, symbol(cst$0, str2)); + /*<>*/ return [0, + /*<>*/ caml_call2 (CamlinternalFormatBasics[3], fmt1, fmt2), _o_]; } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var exit_function = [0, flush_all]; function at_exit(f){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ f_yet_to_run = [0, 1], - /*<>*/ old_exit = - /*<>*/ caml_atomic_load(exit_function), + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ f_yet_to_run = [0, 1], + /*<>*/ old_exit = + /*<>*/ caml_atomic_load(exit_function), new_exit$0 = function(f_yet_to_run, old_exit){ function new_exit(param){ - /*<>*/ if(caml_atomic_cas(f_yet_to_run, 1, 0)) - /*<>*/ /*<>*/ caml_call1 + /*<>*/ if(caml_atomic_cas(f_yet_to_run, 1, 0)) + /*<>*/ /*<>*/ caml_call1 (f, 0); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (old_exit, 0); - /*<>*/ } + /*<>*/ } return new_exit; }, new_exit = new_exit$0(f_yet_to_run, old_exit), success = caml_atomic_cas(exit_function, old_exit, new_exit), - /*<>*/ _m_ = 1 - success; - if(! _m_) /*<>*/ return _m_; + /*<>*/ _m_ = 1 - success; + if(! _m_) /*<>*/ return _m_; } - /*<>*/ } - /*<>*/ /*<>*/ var + /*<>*/ } + /*<>*/ /*<>*/ var do_domain_local_at_exit = [0, function(param){ - /*<>*/ return 0; - /*<>*/ }]; + /*<>*/ return 0; + /*<>*/ }]; function do_at_exit(param){ - /*<>*/ /*<>*/ caml_call1 + /*<>*/ /*<>*/ caml_call1 (do_domain_local_at_exit[1], 0); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (caml_atomic_load(exit_function), 0); - /*<>*/ } + /*<>*/ } function exit(retcode){ - /*<>*/ do_at_exit(0); - /*<>*/ return /*<>*/ runtime.caml_sys_exit + /*<>*/ do_at_exit(0); + /*<>*/ return /*<>*/ runtime.caml_sys_exit (retcode); - /*<>*/ } - /*<>*/ /*<>*/ runtime.caml_register_named_value + /*<>*/ } + /*<>*/ /*<>*/ runtime.caml_register_named_value ("Pervasives.do_at_exit", do_at_exit); var Stdlib = @@ -1104,8 +1136,8 @@ caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_wrap_exception = runtime.caml_wrap_exception, global_data = runtime.caml_get_global_data(), - ocaml_version = "5.0.0", - ocaml_release = [0, 5, 0, 0, 0], + ocaml_version = "5.1.0", + ocaml_release = [0, 5, 1, 0, 0], Stdlib = global_data.Stdlib, /*<>*/ executable_name = /*<>*/ runtime.caml_sys_executable_name(0), @@ -1122,22 +1154,22 @@ word_size = 32, int_size = 32; function getenv_opt(s){ - /*<>*/ try{ - /*<>*/ /*<>*/ var - _d_ = [0, /*<>*/ runtime.caml_sys_getenv(s)]; - /*<>*/ return _d_; + /*<>*/ try{ + /*<>*/ /*<>*/ var + _d_ = [0, /*<>*/ runtime.caml_sys_getenv(s)]; + /*<>*/ return _d_; } catch(_e_){ var _c_ = caml_wrap_exception(_e_); - if(_c_ === Stdlib[8]) /*<>*/ return 0; + if(_c_ === Stdlib[8]) /*<>*/ return 0; throw caml_maybe_attach_backtrace(_c_, 0); } - /*<>*/ } - /*<>*/ /*<>*/ var interactive = [0, 0]; - function set_signal(sig_num, sig_beh){ /*<>*/ return 0; - /*<>*/ } - /*<>*/ var - /*<>*/ Break = + /*<>*/ } + /*<>*/ /*<>*/ var interactive = [0, 0]; + function set_signal(sig_num, sig_beh){ /*<>*/ return 0; + /*<>*/ } + /*<>*/ var + /*<>*/ Break = [248, cst_Stdlib_Sys_Break, runtime.caml_fresh_oo_id(0)], sigabrt = -1, sigalrm = -2, @@ -1168,12 +1200,12 @@ sigxcpu = -27, sigxfsz = -28; function catch_break(on){ - /*<>*/ return on ? 0 : 0; - /*<>*/ } + /*<>*/ return on ? 0 : 0; + /*<>*/ } var development_version = 0; - function Make(_b_, _a_){ /*<>*/ return [0, 1];} - /*<>*/ var - /*<>*/ Immediate64 = [0, Make], + function Make(_b_, _a_){ /*<>*/ return [0, 1];} + /*<>*/ var + /*<>*/ Immediate64 = [0, Make], Stdlib_Sys = [0, executable_name, @@ -1233,7 +1265,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Obj -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Sys +//# unitInfo: Requires: Stdlib, Stdlib__Sys (function (globalThis){ "use strict"; @@ -1261,7 +1293,7 @@ cst_Obj_Ephemeron_create = "Obj.Ephemeron.create", cst_Obj_extension_constructor$0 = cst_Obj_extension_constructor$1, cst_Obj_extension_constructor = cst_Obj_extension_constructor$1, - _a_ = [0, "obj.ml", 97, 4]; + _a_ = [0, "obj.ml", 94, 4]; function is_block(a){ /*<>*/ return 1 - (typeof a === "number" ? 1 : 0); /*<>*/ } @@ -1287,98 +1319,98 @@ out_of_heap_tag = 1001, unaligned_tag = 1002; function info(obj){ - /*<>*/ if( /*<>*/ caml_obj_tag(obj) !== 247) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ if( /*<>*/ caml_obj_tag(obj) !== 247) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); - /*<>*/ var - /*<>*/ info = - /*<>*/ runtime.caml_obj_raw_field(obj, 1), + /*<>*/ var + /*<>*/ info = + /*<>*/ runtime.caml_obj_raw_field(obj, 1), arity = 64 === Stdlib_Sys[9] ? info >> 56 : info >> 24, - /*<>*/ start_env = info << 8 >>> 9 | 0; - /*<>*/ return [0, arity, start_env]; - /*<>*/ } + /*<>*/ start_env = info << 8 >>> 9 | 0; + /*<>*/ return [0, arity, start_env]; + /*<>*/ } function of_val(x){ - /*<>*/ a: + /*<>*/ a: { if (is_block(x) - && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break a;} + && /*<>*/ caml_obj_tag(x) !== 248 && 1 <= x.length - 1){var slot = x[1]; break a;} var slot = x; } a: { - if(is_block(slot) && /*<>*/ caml_obj_tag(slot) === 248){var name = slot[1]; break a;} + if(is_block(slot) && /*<>*/ caml_obj_tag(slot) === 248){var name = slot[1]; break a;} var name = - /*<>*/ caml_call1 + /*<>*/ caml_call1 (Stdlib[1], cst_Obj_extension_constructor$0); } - return /*<>*/ caml_obj_tag(name) === 252 + return /*<>*/ caml_obj_tag(name) === 252 ? slot - : /*<>*/ caml_call1 + : /*<>*/ caml_call1 (Stdlib[1], cst_Obj_extension_constructor); - /*<>*/ } + /*<>*/ } function name(slot){ - /*<>*/ return slot[1]; - /*<>*/ } + /*<>*/ return slot[1]; + /*<>*/ } function id(slot){ - /*<>*/ return slot[2]; - /*<>*/ } - /*<>*/ var - /*<>*/ Extension_constructor = [0, of_val, name, id], + /*<>*/ return slot[2]; + /*<>*/ } + /*<>*/ var + /*<>*/ Extension_constructor = [0, of_val, name, id], max_ephe_length = Stdlib_Sys[13] - 2 | 0; function create(l){ - /*<>*/ var + /*<>*/ var _g_ = 0 <= l ? 1 : 0, _h_ = _g_ ? l <= max_ephe_length ? 1 : 0 : _g_; if(1 - _h_) - /*<>*/ /*<>*/ caml_call1 + /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_create); - /*<>*/ return /*<>*/ runtime.caml_ephe_create + /*<>*/ return /*<>*/ runtime.caml_ephe_create (l); - /*<>*/ } + /*<>*/ } function length(x){ - /*<>*/ return x.length - 1 - 2 | 0; - /*<>*/ } + /*<>*/ return x.length - 1 - 2 | 0; + /*<>*/ } function raise_if_invalid_offset(e, o, msg){ - /*<>*/ var + /*<>*/ var _d_ = 0 <= o ? 1 : 0, _e_ = _d_ ? o < length(e) ? 1 : 0 : _d_, _f_ = 1 - _e_; - return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; - /*<>*/ } + return _f_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _f_; + /*<>*/ } function get_key(e, o){ - /*<>*/ raise_if_invalid_offset + /*<>*/ raise_if_invalid_offset (e, o, cst_Obj_Ephemeron_get_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_get_key + /*<>*/ return /*<>*/ runtime.caml_ephe_get_key (e, o); - /*<>*/ } + /*<>*/ } function get_key_copy(e, o){ - /*<>*/ raise_if_invalid_offset + /*<>*/ raise_if_invalid_offset (e, o, cst_Obj_Ephemeron_get_key_copy); - /*<>*/ return /*<>*/ runtime.caml_ephe_get_key_copy + /*<>*/ return /*<>*/ runtime.caml_ephe_get_key_copy (e, o); - /*<>*/ } + /*<>*/ } function set_key(e, o, x){ - /*<>*/ raise_if_invalid_offset + /*<>*/ raise_if_invalid_offset (e, o, cst_Obj_Ephemeron_set_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_set_key + /*<>*/ return /*<>*/ runtime.caml_ephe_set_key (e, o, x); - /*<>*/ } + /*<>*/ } function unset_key(e, o){ - /*<>*/ raise_if_invalid_offset + /*<>*/ raise_if_invalid_offset (e, o, cst_Obj_Ephemeron_unset_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_unset_key + /*<>*/ return /*<>*/ runtime.caml_ephe_unset_key (e, o); - /*<>*/ } + /*<>*/ } function check_key(e, o){ - /*<>*/ raise_if_invalid_offset + /*<>*/ raise_if_invalid_offset (e, o, cst_Obj_Ephemeron_check_key); - /*<>*/ return /*<>*/ runtime.caml_ephe_check_key + /*<>*/ return /*<>*/ runtime.caml_ephe_check_key (e, o); - /*<>*/ } + /*<>*/ } function blit_key(e1, o1, e2, o2, l){ - /*<>*/ if + /*<>*/ if (0 <= l && 0 <= o1 @@ -1387,14 +1419,14 @@ _b_ = 0 !== l ? 1 : 0, _c_ = _b_ - ? /*<>*/ runtime.caml_ephe_blit_key + ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) : _b_; - /*<>*/ return _c_; + /*<>*/ return _c_; } - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Obj_Ephemeron_blit_key); - /*<>*/ } + /*<>*/ } var Stdlib_Obj = [0, @@ -1442,6 +1474,44 @@ /*<>*/ } (globalThis)); +//# unitInfo: Provides: Stdlib__Type +//# unitInfo: Requires: Stdlib__Obj +(function + (globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime; + /*<>*/ function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) == 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib_Obj = global_data.Stdlib__Obj, + _a_ = [0, 0], + cst_Id = "Id"; + function make(param){ + /*<>*/ /*<>*/ var + Id = [248, cst_Id, runtime.caml_fresh_oo_id(0)]; + /*<>*/ return [0, Id]; + /*<>*/ } + function uid(A){ + /*<>*/ /*<>*/ var + _b_ = /*<>*/ caml_call1(Stdlib_Obj[23][1], A[1]); + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Obj[23][3], _b_); + /*<>*/ } + function provably_equal(A, B){ + /*<>*/ return A[1] === B[1] ? _a_ : 0; + /*<>*/ } + /*<>*/ var + /*<>*/ Id = [0, make, uid, provably_equal], + Stdlib_Type = [0, Id]; + runtime.caml_register_global(3, Stdlib_Type, "Stdlib__Type"); + return; + /*<>*/ } + (globalThis)); + //# unitInfo: Provides: Stdlib__Atomic (function(globalThis){ "use strict"; @@ -1661,7 +1731,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Seq -//# unitInfo: Requires: Assert_failure, CamlinternalLazy, Stdlib, Stdlib__Atomic, Stdlib__Lazy +//# unitInfo: Requires: CamlinternalLazy, Stdlib, Stdlib__Atomic, Stdlib__Lazy (function (globalThis){ "use strict"; @@ -1690,7 +1760,7 @@ CamlinternalLazy = global_data.CamlinternalLazy, Stdlib = global_data.Stdlib, Stdlib_Lazy = global_data.Stdlib__Lazy, - _a_ = [0, "seq.ml", 596, 4], + _a_ = [0, "seq.ml", 616, 4], cst_Seq_drop = "Seq.drop", cst_Seq_take = "Seq.take", cst_Seq_init = "Seq.init", @@ -1904,488 +1974,515 @@ var xs$0 = xs$1; } /*<>*/ } + function find_index(p, xs){ + /*<>*/ var i = 0, xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + var xs$1 = match[2], x = match[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, i]; + var i$0 = i + 1 | 0, i = i$0, xs$0 = xs$1; + } + /*<>*/ } function find_map(f, xs){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ result = /*<>*/ caml_call1(f, x); - if(result) /*<>*/ return result; + /*<>*/ result = /*<>*/ caml_call1(f, x); + if(result) /*<>*/ return result; var xs$0 = xs$1; } - /*<>*/ } + /*<>*/ } + function find_mapi(f, xs){ + /*<>*/ var i = 0, xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + xs$1 = match[2], + x = match[1], + /*<>*/ result = + /*<>*/ caml_call2(f, i, x); + if(result) /*<>*/ return result; + var i$0 = i + 1 | 0, i = i$0, xs$0 = xs$1; + } + /*<>*/ } function iter2(f, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return 0; + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return 0; var ys$1 = match$0[2], y = match$0[1]; - /*<>*/ /*<>*/ caml_call2(f, x, y); + /*<>*/ /*<>*/ caml_call2(f, x, y); var xs$0 = xs$1, ys$0 = ys$1; } - /*<>*/ } + /*<>*/ } function fold_left2(f, accu, xs, ys){ - /*<>*/ var accu$0 = accu, xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return accu$0; - /*<>*/ var + /*<>*/ var accu$0 = accu, xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return accu$0; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return accu$0; - /*<>*/ var + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return accu$0; + /*<>*/ var ys$1 = match$0[2], y = match$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call3(f, accu$0, x, y), + /*<>*/ accu$1 = + /*<>*/ caml_call3(f, accu$0, x, y), accu$0 = accu$1, xs$0 = xs$1, ys$0 = ys$1; } - /*<>*/ } + /*<>*/ } function for_all2(f, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 1; - /*<>*/ var + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 1; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return 1; - /*<>*/ var + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return 1; + /*<>*/ var ys$1 = match$0[2], y = match$0[1], - /*<>*/ _az_ = /*<>*/ caml_call2(f, x, y); - /*<>*/ if(! _az_) /*<>*/ return _az_; + /*<>*/ _az_ = /*<>*/ caml_call2(f, x, y); + /*<>*/ if(! _az_) /*<>*/ return _az_; var xs$0 = xs$1, ys$0 = ys$1; } - /*<>*/ } + /*<>*/ } function exists2(f, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); - if(! match$0) /*<>*/ return 0; - /*<>*/ var + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); + if(! match$0) /*<>*/ return 0; + /*<>*/ var ys$1 = match$0[2], y = match$0[1], - /*<>*/ _ay_ = /*<>*/ caml_call2(f, x, y); - /*<>*/ if(_ay_) /*<>*/ return _ay_; + /*<>*/ _ay_ = /*<>*/ caml_call2(f, x, y); + /*<>*/ if(_ay_) /*<>*/ return _ay_; var xs$0 = xs$1, ys$0 = ys$1; } - /*<>*/ } + /*<>*/ } function equal(eq, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); if(match){ if(match$0){ - /*<>*/ var + /*<>*/ var ys$1 = match$0[2], y = match$0[1], xs$1 = match[2], x = match[1], - /*<>*/ _ax_ = - /*<>*/ caml_call2(eq, x, y); - /*<>*/ if(! _ax_) /*<>*/ return _ax_; + /*<>*/ _ax_ = + /*<>*/ caml_call2(eq, x, y); + /*<>*/ if(! _ax_) /*<>*/ return _ax_; var xs$0 = xs$1, ys$0 = ys$1; continue; } } - else if(! match$0) /*<>*/ return 1; - /*<>*/ return 0; + else if(! match$0) /*<>*/ return 1; + /*<>*/ return 0; } - /*<>*/ } + /*<>*/ } function compare(cmp, xs, ys){ - /*<>*/ var xs$0 = xs, ys$0 = ys; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), - /*<>*/ match$0 = - /*<>*/ caml_call1(ys$0, 0); + /*<>*/ var xs$0 = xs, ys$0 = ys; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ match = /*<>*/ caml_call1(xs$0, 0), + /*<>*/ match$0 = + /*<>*/ caml_call1(ys$0, 0); if(! match) return match$0 ? -1 : 0; var xs$1 = match[2], x = match[1]; - if(! match$0) /*<>*/ return 1; - /*<>*/ var + if(! match$0) /*<>*/ return 1; + /*<>*/ var ys$1 = match$0[2], y = match$0[1], - /*<>*/ c = /*<>*/ caml_call2(cmp, x, y); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ c = /*<>*/ caml_call2(cmp, x, y); + /*<>*/ if(0 !== c) /*<>*/ return c; var xs$0 = xs$1, ys$0 = ys$1; } - /*<>*/ } + /*<>*/ } function init_aux(f, i, j, param){ - /*<>*/ if(i >= j) /*<>*/ return 0; + /*<>*/ if(i >= j) /*<>*/ return 0; var _au_ = i + 1 | 0; - /*<>*/ function _av_(_aw_){ + /*<>*/ function _av_(_aw_){ /*<>*/ return init_aux(f, _au_, j, _aw_); } - /*<>*/ return [0, - /*<>*/ caml_call1(f, i), + /*<>*/ return [0, + /*<>*/ caml_call1(f, i), _av_]; - /*<>*/ } + /*<>*/ } function init(n, f){ - /*<>*/ if(0 > n) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(0 > n) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Seq_init); var _as_ = 0; - /*<>*/ return function(_at_){ + /*<>*/ return function(_at_){ /*<>*/ return init_aux(f, _as_, n, _at_);}; - /*<>*/ } + /*<>*/ } function repeat(x, param){ - /*<>*/ return [0, + /*<>*/ return [0, x, function(_ar_){ /*<>*/ return repeat(x, _ar_);}]; - /*<>*/ } + /*<>*/ } function forever(f, param){ - /*<>*/ function _ap_(_aq_){ + /*<>*/ function _ap_(_aq_){ /*<>*/ return forever(f, _aq_); } - /*<>*/ return [0, - /*<>*/ caml_call1(f, 0), + /*<>*/ return [0, + /*<>*/ caml_call1(f, 0), _ap_]; - /*<>*/ } + /*<>*/ } function cycle_nonempty(xs, param){ - /*<>*/ /*<>*/ var _an_ = 0; - /*<>*/ return append + /*<>*/ /*<>*/ var _an_ = 0; + /*<>*/ return append (xs, function(_ao_){ /*<>*/ return cycle_nonempty(xs, _ao_);}, _an_); - /*<>*/ } + /*<>*/ } function cycle(xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; var xs$0 = match[2], x = match[1]; - /*<>*/ function _ak_(_am_){ + /*<>*/ function _ak_(_am_){ /*<>*/ return cycle_nonempty(xs, _am_); } - /*<>*/ return [0, + /*<>*/ return [0, x, function(_al_){ /*<>*/ return append(xs$0, _ak_, _al_);}]; - /*<>*/ } + /*<>*/ } function iterate1(f, x, param){ - /*<>*/ /*<>*/ var - y = /*<>*/ caml_call1(f, x); - /*<>*/ return [0, + /*<>*/ /*<>*/ var + y = /*<>*/ caml_call1(f, x); + /*<>*/ return [0, y, function(_aj_){ /*<>*/ return iterate1(f, y, _aj_);}]; - /*<>*/ } + /*<>*/ } function iterate(f, x){ - /*<>*/ function _ag_(_ai_){ + /*<>*/ function _ag_(_ai_){ /*<>*/ return iterate1(f, x, _ai_); } - /*<>*/ return function(_ah_){ + /*<>*/ return function(_ah_){ /*<>*/ return [0, x, _ag_];}; - /*<>*/ } + /*<>*/ } function mapi_aux(f, i, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$0 = match[2], x = match[1], - /*<>*/ _ad_ = i + 1 | 0; - /*<>*/ function _ae_(_af_){ + /*<>*/ _ad_ = i + 1 | 0; + /*<>*/ function _ae_(_af_){ /*<>*/ return mapi_aux(f, _ad_, xs$0, _af_); } - /*<>*/ return [0, - /*<>*/ caml_call2(f, i, x), + /*<>*/ return [0, + /*<>*/ caml_call2(f, i, x), _ae_]; - /*<>*/ } + /*<>*/ } function mapi(f, xs){ - /*<>*/ var _ab_ = 0; - /*<>*/ return function(_ac_){ + /*<>*/ var _ab_ = 0; + /*<>*/ return function(_ac_){ /*<>*/ return mapi_aux(f, _ab_, xs, _ac_);}; - /*<>*/ } + /*<>*/ } function tail_scan(f, s, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$0 = match[2], x = match[1], - /*<>*/ s$0 = /*<>*/ caml_call2(f, s, x); - /*<>*/ return [0, + /*<>*/ s$0 = /*<>*/ caml_call2(f, s, x); + /*<>*/ return [0, s$0, function(_aa_){ /*<>*/ return tail_scan(f, s$0, xs$0, _aa_);}]; - /*<>*/ } + /*<>*/ } function scan(f, s, xs){ - /*<>*/ function _Z_(_$_){ + /*<>*/ function _Z_(_$_){ /*<>*/ return tail_scan(f, s, xs, _$_); } - /*<>*/ return function(___){ + /*<>*/ return function(___){ /*<>*/ return [0, s, _Z_];}; - /*<>*/ } + /*<>*/ } function take_aux(n, xs){ - /*<>*/ return 0 === n + /*<>*/ return 0 === n ? empty : function (param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, x, take_aux(n - 1 | 0, xs$0)]; - /*<>*/ }; - /*<>*/ } + /*<>*/ return [0, x, take_aux(n - 1 | 0, xs$0)]; + /*<>*/ }; + /*<>*/ } function take(n, xs){ - /*<>*/ if(n < 0) - /*<>*/ /*<>*/ caml_call1 + /*<>*/ if(n < 0) + /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Seq_take); - /*<>*/ return take_aux(n, xs); - /*<>*/ } + /*<>*/ return take_aux(n, xs); + /*<>*/ } function drop(n, xs){ - /*<>*/ return 0 <= n + /*<>*/ return 0 <= n ? 0 === n ? xs : function (param){ - /*<>*/ var n$0 = n, xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var n$0 = n, xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$1 = match[2], - /*<>*/ n$1 = n$0 - 1 | 0; - /*<>*/ if(0 === n$1) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ n$1 = n$0 - 1 | 0; + /*<>*/ if(0 === n$1) + /*<>*/ return /*<>*/ caml_call1 (xs$1, 0); var n$0 = n$1, xs$0 = xs$1; } - /*<>*/ } - : /*<>*/ caml_call1(Stdlib[1], cst_Seq_drop); - /*<>*/ } + /*<>*/ } + : /*<>*/ caml_call1(Stdlib[1], cst_Seq_drop); + /*<>*/ } function take_while(p, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; var xs$0 = match[2], x = match[1]; - /*<>*/ return /*<>*/ caml_call1(p, x) + /*<>*/ return /*<>*/ caml_call1(p, x) ? [0, x, function(_Y_){ /*<>*/ return take_while(p, xs$0, _Y_);}] : 0; - /*<>*/ } + /*<>*/ } function drop_while(p, xs, param){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - node = /*<>*/ caml_call1(xs$0, 0); - if(! node) /*<>*/ return 0; + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + node = /*<>*/ caml_call1(xs$0, 0); + if(! node) /*<>*/ return 0; var xs$1 = node[2], x = node[1]; - /*<>*/ if(! /*<>*/ caml_call1(p, x)) - /*<>*/ return node; + /*<>*/ if(! /*<>*/ caml_call1(p, x)) + /*<>*/ return node; var xs$0 = xs$1; } - /*<>*/ } + /*<>*/ } function group(eq, xs, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$0 = match[2], x = match[1], - /*<>*/ _P_ = /*<>*/ caml_call1(eq, x); - /*<>*/ function _Q_(_X_){ + /*<>*/ _P_ = /*<>*/ caml_call1(eq, x); + /*<>*/ function _Q_(_X_){ /*<>*/ return drop_while(_P_, xs$0, _X_); } - /*<>*/ function _R_(_W_){ + /*<>*/ function _R_(_W_){ /*<>*/ return group(eq, _Q_, _W_); } - /*<>*/ /*<>*/ var - _S_ = /*<>*/ caml_call1(eq, x); - /*<>*/ function _T_(_V_){ + /*<>*/ /*<>*/ var + _S_ = /*<>*/ caml_call1(eq, x); + /*<>*/ function _T_(_V_){ /*<>*/ return take_while(_S_, xs$0, _V_); } - /*<>*/ return [0, + /*<>*/ return [0, function(_U_){ /*<>*/ return [0, x, _T_];}, _R_]; - /*<>*/ } - /*<>*/ var - /*<>*/ Forced_twice = + /*<>*/ } + /*<>*/ var + /*<>*/ Forced_twice = [248, cst_Stdlib_Seq_Forced_twice, runtime.caml_fresh_oo_id(0)], - /*<>*/ to_lazy = Stdlib_Lazy[6]; + /*<>*/ to_lazy = Stdlib_Lazy[6]; function failure(param){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Forced_twice, 1); - /*<>*/ } + /*<>*/ } function memoize(xs){ function s$0(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, x, memoize(xs$0)]; - /*<>*/ } - /*<>*/ /*<>*/ var - s = /*<>*/ caml_call1(to_lazy, s$0); - /*<>*/ return function(_O_){ + /*<>*/ return [0, x, memoize(xs$0)]; + /*<>*/ } + /*<>*/ /*<>*/ var + s = /*<>*/ caml_call1(to_lazy, s$0); + /*<>*/ return function(_O_){ var _N_ = runtime.caml_obj_tag(s); if(250 === _N_) return s[1]; - if(246 !== _N_ && 244 !== _N_) /*<>*/ return s; - /*<>*/ return /*<>*/ caml_call1 + if(246 !== _N_ && 244 !== _N_) /*<>*/ return s; + /*<>*/ return /*<>*/ caml_call1 (CamlinternalLazy[2], s);}; - /*<>*/ } + /*<>*/ } function once(xs){ function f(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, x, once(xs$0)]; - /*<>*/ } - /*<>*/ /*<>*/ var - action = /*<>*/ caml_call1(Stdlib_Atomic[1], f); - /*<>*/ return function(param){ - /*<>*/ /*<>*/ var - f = /*<>*/ caml_call2(Stdlib_Atomic[4], action, failure); - /*<>*/ return /*<>*/ caml_call1(f, 0); /*<>*/ }; - /*<>*/ } + /*<>*/ return [0, x, once(xs$0)]; + /*<>*/ } + /*<>*/ /*<>*/ var + action = /*<>*/ caml_call1(Stdlib_Atomic[1], f); + /*<>*/ return function(param){ + /*<>*/ /*<>*/ var + f = /*<>*/ caml_call2(Stdlib_Atomic[4], action, failure); + /*<>*/ return /*<>*/ caml_call1(f, 0); /*<>*/ }; + /*<>*/ } function zip(xs, ys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$0 = match[2], x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); - if(! match$0) /*<>*/ return 0; + /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); + if(! match$0) /*<>*/ return 0; var ys$0 = match$0[2], y = match$0[1]; - /*<>*/ return [0, + /*<>*/ return [0, [0, x, y], function(_M_){ /*<>*/ return zip(xs$0, ys$0, _M_);}]; - /*<>*/ } + /*<>*/ } function map2(f, xs, ys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$0 = match[2], x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); - if(! match$0) /*<>*/ return 0; + /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); + if(! match$0) /*<>*/ return 0; var ys$0 = match$0[2], y = match$0[1]; - /*<>*/ function _K_(_L_){ + /*<>*/ function _K_(_L_){ /*<>*/ return map2(f, xs$0, ys$0, _L_); } - /*<>*/ return [0, - /*<>*/ caml_call2(f, x, y), + /*<>*/ return [0, + /*<>*/ caml_call2(f, x, y), _K_]; - /*<>*/ } + /*<>*/ } function interleave(xs, ys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); if(! match) - /*<>*/ return /*<>*/ caml_call1(ys, 0); + /*<>*/ return /*<>*/ caml_call1(ys, 0); var xs$0 = match[2], x = match[1]; - /*<>*/ return [0, + /*<>*/ return [0, x, function(_J_){ /*<>*/ return interleave(ys, xs$0, _J_);}]; - /*<>*/ } + /*<>*/ } function sorted_merge1(cmp, x, xs, y, ys){ - /*<>*/ return 0 - < /*<>*/ caml_call2(cmp, x, y) + /*<>*/ return 0 + < /*<>*/ caml_call2(cmp, x, y) ? [0, y, function(_H_){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(ys, 0); - if(! match) /*<>*/ return [0, x, xs]; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(ys, 0); + if(! match) /*<>*/ return [0, x, xs]; var ys$0 = match[2], y = match[1]; - /*<>*/ return sorted_merge1(cmp, x, xs, y, ys$0); + /*<>*/ return sorted_merge1(cmp, x, xs, y, ys$0); }] : [0, x, function(_I_){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs, 0); - if(! match) /*<>*/ return [0, y, ys]; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs, 0); + if(! match) /*<>*/ return [0, y, ys]; var xs$0 = match[2], x = match[1]; - /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys); + /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys); }]; - /*<>*/ } + /*<>*/ } function sorted_merge(cmp, xs, ys, param){ - /*<>*/ var - /*<>*/ match = /*<>*/ caml_call1(xs, 0), - /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); + /*<>*/ var + /*<>*/ match = /*<>*/ caml_call1(xs, 0), + /*<>*/ match$0 = /*<>*/ caml_call1(ys, 0); if(match){ if(match$0){ var ys$0 = match$0[2], y = match$0[1], xs$0 = match[2], x = match[1]; - /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys$0); + /*<>*/ return sorted_merge1(cmp, x, xs$0, y, ys$0); } var c = match; } - else{if(! match$0) /*<>*/ return 0; var c = match$0;} - /*<>*/ return c; - /*<>*/ } + else{if(! match$0) /*<>*/ return 0; var c = match$0;} + /*<>*/ return c; + /*<>*/ } function map_fst(xys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xys, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xys, 0); + if(! match) /*<>*/ return 0; var xys$0 = match[2], x = match[1][1]; - /*<>*/ return [0, + /*<>*/ return [0, x, function(_G_){ /*<>*/ return map_fst(xys$0, _G_);}]; - /*<>*/ } + /*<>*/ } function map_snd(xys, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xys, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xys, 0); + if(! match) /*<>*/ return 0; var xys$0 = match[2], y = match[1][2]; - /*<>*/ return [0, + /*<>*/ return [0, y, function(_F_){ /*<>*/ return map_snd(xys$0, _F_);}]; - /*<>*/ } + /*<>*/ } function unzip(xys){ - /*<>*/ function _C_(_E_){ + /*<>*/ function _C_(_E_){ /*<>*/ return map_snd(xys, _E_); } - /*<>*/ return [0, + /*<>*/ return [0, function(_D_){ /*<>*/ return map_fst(xys, _D_);}, _C_]; - /*<>*/ } + /*<>*/ } function filter_map_find_left_map(f, xs, param){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(f, x); + /*<>*/ match$0 = /*<>*/ caml_call1(f, x); if(0 === match$0[0]){ var y = match$0[1]; - /*<>*/ return [0, + /*<>*/ return [0, y, function(_B_){ /*<>*/ return filter_map_find_left_map(f, xs$1, _B_); @@ -2393,20 +2490,20 @@ } var xs$0 = xs$1; } - /*<>*/ } + /*<>*/ } function filter_map_find_right_map(f, xs, param){ - /*<>*/ var xs$0 = xs; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xs$0, 0); - if(! match) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var xs$0 = xs; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xs$0, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var xs$1 = match[2], x = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(f, x); + /*<>*/ match$0 = /*<>*/ caml_call1(f, x); if(0 !== match$0[0]){ var z = match$0[1]; - /*<>*/ return [0, + /*<>*/ return [0, z, function(_A_){ /*<>*/ return filter_map_find_right_map(f, xs$1, _A_); @@ -2414,127 +2511,127 @@ } var xs$0 = xs$1; } - /*<>*/ } + /*<>*/ } function partition_map(f, xs){ - /*<>*/ function _x_(_z_){ + /*<>*/ function _x_(_z_){ /*<>*/ return filter_map_find_right_map(f, xs, _z_); } - /*<>*/ return [0, + /*<>*/ return [0, function(_y_){ /*<>*/ return filter_map_find_left_map(f, xs, _y_); }, _x_]; - /*<>*/ } + /*<>*/ } function partition(p, xs){ function _t_(x){ - /*<>*/ return 1 - /*<>*/ caml_call1(p, x); - /*<>*/ } - /*<>*/ function _u_(_w_){ + /*<>*/ return 1 - /*<>*/ caml_call1(p, x); + /*<>*/ } + /*<>*/ function _u_(_w_){ /*<>*/ return filter(_t_, xs, _w_); } - /*<>*/ return [0, + /*<>*/ return [0, function(_v_){ /*<>*/ return filter(p, xs, _v_);}, _u_]; - /*<>*/ } + /*<>*/ } function peel(xss){ - /*<>*/ return unzip + /*<>*/ return unzip (function(_s_){ /*<>*/ return filter_map(uncons, xss, _s_);}); - /*<>*/ } + /*<>*/ } function transpose(xss, param){ - /*<>*/ var - /*<>*/ match = peel(xss), + /*<>*/ var + /*<>*/ match = peel(xss), tails = match[2], heads = match[1]; - /*<>*/ if(! is_empty(heads)) - /*<>*/ return [0, + /*<>*/ if(! is_empty(heads)) + /*<>*/ return [0, heads, function(_r_){ /*<>*/ return transpose(tails, _r_);}]; - /*<>*/ if(is_empty(tails)) /*<>*/ return 0; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ if(is_empty(tails)) /*<>*/ return 0; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); - /*<>*/ } + /*<>*/ } function _b_(remainders, xss, param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(xss, 0); - if(! match) /*<>*/ return transpose(remainders, 0); - /*<>*/ var + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(xss, 0); + if(! match) /*<>*/ return transpose(remainders, 0); + /*<>*/ var xss$0 = match[2], xs = match[1], - /*<>*/ match$0 = /*<>*/ caml_call1(xs, 0); + /*<>*/ match$0 = /*<>*/ caml_call1(xs, 0); if(match$0){ - /*<>*/ var + /*<>*/ var xs$0 = match$0[2], x = match$0[1], - /*<>*/ match$1 = peel(remainders), + /*<>*/ match$1 = peel(remainders), tails = match$1[2], heads = match$1[1], - /*<>*/ _l_ = + /*<>*/ _l_ = function(_q_){ /*<>*/ return [0, xs$0, tails];}, - /*<>*/ _m_ = + /*<>*/ _m_ = function(_p_){ /*<>*/ return _b_(_l_, xss$0, _p_);}; - /*<>*/ return [0, + /*<>*/ return [0, function(_o_){ /*<>*/ return [0, x, heads];}, _m_]; } - /*<>*/ var - /*<>*/ match$2 = peel(remainders), + /*<>*/ var + /*<>*/ match$2 = peel(remainders), tails$0 = match$2[2], heads$0 = match$2[1]; - /*<>*/ return [0, + /*<>*/ return [0, heads$0, function(_n_){ /*<>*/ return _b_(tails$0, xss$0, _n_);}]; - /*<>*/ } + /*<>*/ } function map_product(f, xs, ys){ function _f_(x){ function _j_(y){ - /*<>*/ return /*<>*/ caml_call2(f, x, y); - /*<>*/ } - /*<>*/ return function(_k_){ + /*<>*/ return /*<>*/ caml_call2(f, x, y); + /*<>*/ } + /*<>*/ return function(_k_){ /*<>*/ return map(_j_, ys, _k_);}; - /*<>*/ } - /*<>*/ function xss(_i_){ + /*<>*/ } + /*<>*/ function xss(_i_){ /*<>*/ return map(_f_, xs, _i_); } - /*<>*/ function _e_(_h_){ + /*<>*/ function _e_(_h_){ /*<>*/ return _b_(empty, xss, _h_); } - /*<>*/ return function(_g_){ + /*<>*/ return function(_g_){ /*<>*/ return concat(_e_, _g_);}; - /*<>*/ } + /*<>*/ } function product(xs, ys){ - /*<>*/ return map_product + /*<>*/ return map_product (function(x, y){ - /*<>*/ return [0, x, y]; - /*<>*/ }, + /*<>*/ return [0, x, y]; + /*<>*/ }, xs, ys); - /*<>*/ } + /*<>*/ } function of_dispenser(it){ function c(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(it, 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(it, 0); + if(! match) /*<>*/ return 0; var x = match[1]; - /*<>*/ return [0, x, c]; - /*<>*/ } - /*<>*/ return c; - /*<>*/ } + /*<>*/ return [0, x, c]; + /*<>*/ } + /*<>*/ return c; + /*<>*/ } function to_dispenser(xs){ - /*<>*/ /*<>*/ var s = [0, xs]; - /*<>*/ return function(param){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(s[1], 0); - if(! match) /*<>*/ return 0; + /*<>*/ /*<>*/ var s = [0, xs]; + /*<>*/ return function(param){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(s[1], 0); + if(! match) /*<>*/ return 0; var xs = match[2], x = match[1]; s[1] = xs; - /*<>*/ return [0, x]; /*<>*/ }; - /*<>*/ } + /*<>*/ return [0, x]; /*<>*/ }; + /*<>*/ } function ints(i, param){ - /*<>*/ /*<>*/ var _c_ = i + 1 | 0; - /*<>*/ return [0, + /*<>*/ /*<>*/ var _c_ = i + 1 | 0; + /*<>*/ return [0, i, function(_d_){ /*<>*/ return ints(_c_, _d_);}]; - /*<>*/ } + /*<>*/ } var Stdlib_Seq = [0, @@ -2548,7 +2645,9 @@ for_all, exists, find, + find_index, find_map, + find_mapi, iter2, fold_left2, for_all2, @@ -2702,10 +2801,10 @@ /*<>*/ } function to_seq(param){ /*<>*/ if(! param) - /*<>*/ return Stdlib_Seq[18]; + /*<>*/ return Stdlib_Seq[20]; var v = param[1]; /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Seq[19], v); + (Stdlib_Seq[21], v); /*<>*/ } var Stdlib_Option = @@ -2874,10 +2973,10 @@ /*<>*/ } function to_seq(param){ /*<>*/ if(0 !== param[0]) - /*<>*/ return Stdlib_Seq[18]; + /*<>*/ return Stdlib_Seq[20]; var v = param[1]; /*<>*/ return /*<>*/ caml_call1 - (Stdlib_Seq[19], v); + (Stdlib_Seq[21], v); /*<>*/ } var Stdlib_Result = @@ -2911,6 +3010,7 @@ "use strict"; var runtime = globalThis.jsoo_runtime, + caml_hash = runtime.caml_hash, cst_true = "true", cst_false = "false"; function equal(_e_, _d_){ /*<>*/ return _e_ === _d_ ? 1 : 0;} @@ -2921,6 +3021,14 @@ function to_string(param){ /*<>*/ return param ? cst_true : cst_false; /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } function _a_(_c_){ /*<>*/ return _c_;} var Stdlib_Bool = @@ -2930,7 +3038,9 @@ compare, _a_, to_float, - to_string]; + to_string, + seeded_hash, + hash]; runtime.caml_register_global(4, Stdlib_Bool, "Stdlib__Bool"); return; /*<>*/ } @@ -2945,6 +3055,7 @@ runtime = globalThis.jsoo_runtime, caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, caml_create_bytes = runtime.caml_create_bytes, + caml_hash = runtime.caml_hash, caml_string_of_bytes = runtime.caml_string_of_bytes; /*<>*/ function caml_call1(f, a0){ return (f.l >= 0 ? f.l : f.l = f.length) == 1 @@ -3013,16 +3124,32 @@ function equal(c1, c2){ /*<>*/ return 0 === (c1 - c2 | 0) ? 1 : 0; /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } var Stdlib_Char = - [0, chr, escaped, lowercase_ascii, uppercase_ascii, compare, equal]; + [0, + chr, + escaped, + lowercase_ascii, + uppercase_ascii, + compare, + equal, + seeded_hash, + hash]; runtime.caml_register_global(8, Stdlib_Char, "Stdlib__Char"); return; /*<>*/ } (globalThis)); //# unitInfo: Provides: Stdlib__Uchar -//# unitInfo: Requires: Assert_failure, Stdlib +//# unitInfo: Requires: Stdlib (function (globalThis){ "use strict"; @@ -3185,12 +3312,13 @@ (globalThis)); //# unitInfo: Provides: Stdlib__List -//# unitInfo: Requires: Stdlib, Stdlib__Seq, Stdlib__Sys +//# unitInfo: Requires: Stdlib (function (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, + cst_List_map2$1 = "List.map2", cst_List_nth$1 = "List.nth", caml_compare = runtime.caml_compare, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; @@ -3212,15 +3340,14 @@ var global_data = runtime.caml_get_global_data(), Stdlib = global_data.Stdlib, - Stdlib_Seq = global_data.Stdlib__Seq, - Stdlib_Sys = global_data.Stdlib__Sys, - cst_List_map2 = "List.map2", + cst_List_map2 = cst_List_map2$1, + cst_List_map2$0 = cst_List_map2$1, cst_List_iter2 = "List.iter2", cst_List_fold_left2 = "List.fold_left2", cst_List_fold_right2 = "List.fold_right2", cst_List_for_all2 = "List.for_all2", cst_List_exists2 = "List.exists2", - _b_ = [0, 0, 0], + _a_ = [0, 0, 0], cst_List_combine = "List.combine", cst_List_rev_map2 = "List.rev_map2", cst_List_init = "List.init", @@ -3306,285 +3433,424 @@ function rev(l){ /*<>*/ return rev_append(l, 0); /*<>*/ } - function init_aux(i, n, f){ - /*<>*/ if(n <= i) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = /*<>*/ caml_call1(f, i); - /*<>*/ return [0, r, init_aux(i + 1 | 0, n, f)]; - /*<>*/ } - var rev_init_threshold = typeof Stdlib_Sys[5] === "number" ? 10000 : 50; function init(len, f){ - /*<>*/ if(0 > len) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(0 > len) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_init); - if(rev_init_threshold >= len) - /*<>*/ return init_aux(0, len, f); - var acc = 0, i = 0; + var last = len - 1 | 0, i$1 = 0; + if(last < 0) /*<>*/ return 0; + if(0 === last) + /*<>*/ return [0, + /*<>*/ caml_call1(f, i$1), + 0]; + /*<>*/ var + /*<>*/ r1 = /*<>*/ caml_call1(f, i$1), + /*<>*/ r2 = /*<>*/ caml_call1(f, 1), + /*<>*/ block = [0, r2, 24029], + dst = block, + offset = 1, + i = 2; /*<>*/ for(;;){ - if(len <= i) /*<>*/ return rev(acc); - /*<>*/ var - i$0 = i + 1 | 0, - /*<>*/ acc$0 = - [0, /*<>*/ caml_call1(f, i), acc], - acc = acc$0, - i = i$0; + if(last < i) + dst[1 + offset] = 0; + else{ + if(i !== last){ + /*<>*/ var + /*<>*/ r1$0 = /*<>*/ caml_call1(f, i), + /*<>*/ r2$0 = + /*<>*/ caml_call1(f, i + 1 | 0), + /*<>*/ dst$0 = [0, r2$0, 24029]; + dst[1 + offset] = [0, r1$0, dst$0]; + var i$0 = i + 2 | 0, dst = dst$0, offset = 1, i = i$0; + continue; + } + dst[1 + offset] = [0, /*<>*/ caml_call1(f, i), 0]; + } + /*<>*/ return [0, r1, block]; } - /*<>*/ } + /*<>*/ } function flatten(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var r = param[2], l = param[1], - /*<>*/ _J_ = flatten(r); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[37], l, _J_); - /*<>*/ } + /*<>*/ _I_ = flatten(r); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib[37], l, _I_); + /*<>*/ } function map(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - l = param[2], - a = param[1], - /*<>*/ r = /*<>*/ caml_call1(f, a); - /*<>*/ return [0, r, map(f, l)]; - } - function _a_(i, f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var - l = param[2], - a = param[1], - /*<>*/ r = /*<>*/ caml_call2(f, i, a); - /*<>*/ return [0, r, _a_(i + 1 | 0, f, l)]; + /*<>*/ if(! param) /*<>*/ return 0; + var match = param[2], a1 = param[1]; + if(! match){ + /*<>*/ /*<>*/ var + r1$0 = /*<>*/ caml_call1(f, a1); + /*<>*/ return [0, r1$0, 0]; + } + /*<>*/ var + l = match[2], + a2 = match[1], + /*<>*/ r1 = /*<>*/ caml_call1(f, a1), + /*<>*/ r2 = /*<>*/ caml_call1(f, a2), + /*<>*/ block = [0, r2, 24029], + dst = block, + offset = 1, + param$0 = l; + for(;;){ + if(param$0){ + var match$0 = param$0[2], a1$0 = param$0[1]; + if(match$0){ + /*<>*/ var + l$0 = match$0[2], + a2$0 = match$0[1], + /*<>*/ r1$1 = + /*<>*/ caml_call1(f, a1$0), + /*<>*/ r2$0 = + /*<>*/ caml_call1(f, a2$0), + /*<>*/ dst$0 = [0, r2$0, 24029]; + dst[1 + offset] = [0, r1$1, dst$0]; + var dst = dst$0, offset = 1, param$0 = l$0; + continue; + } + /*<>*/ /*<>*/ var + r1$2 = /*<>*/ caml_call1(f, a1$0); + dst[1 + offset] = [0, r1$2, 0]; + } + else + dst[1 + offset] = 0; + /*<>*/ return [0, r1, block]; + } } - function mapi(f, l){ - /*<>*/ return _a_(0, f, l); - /*<>*/ } + function mapi(f, l$1){ + /*<>*/ var i$1 = 0; + if(! l$1) /*<>*/ return 0; + var match = l$1[2], a1 = l$1[1]; + if(! match){ + /*<>*/ /*<>*/ var + r1$0 = /*<>*/ caml_call2(f, i$1, a1); + /*<>*/ return [0, r1$0, 0]; + } + /*<>*/ var + l = match[2], + a2 = match[1], + /*<>*/ r1 = /*<>*/ caml_call2(f, i$1, a1), + /*<>*/ r2 = /*<>*/ caml_call2(f, 1, a2), + /*<>*/ block = [0, r2, 24029], + dst = block, + offset = 1, + i = 2, + param = l; + for(;;){ + if(param){ + var match$0 = param[2], a1$0 = param[1]; + if(match$0){ + /*<>*/ var + l$0 = match$0[2], + a2$0 = match$0[1], + /*<>*/ r1$1 = + /*<>*/ caml_call2(f, i, a1$0), + /*<>*/ r2$0 = + /*<>*/ caml_call2(f, i + 1 | 0, a2$0), + /*<>*/ dst$0 = [0, r2$0, 24029]; + dst[1 + offset] = [0, r1$1, dst$0]; + var i$0 = i + 2 | 0, dst = dst$0, offset = 1, i = i$0, param = l$0; + continue; + } + /*<>*/ /*<>*/ var + r1$2 = /*<>*/ caml_call2(f, i, a1$0); + dst[1 + offset] = [0, r1$2, 0]; + } + else + dst[1 + offset] = 0; + /*<>*/ return [0, r1, block]; + } + /*<>*/ } function rev_map(f, l){ - /*<>*/ var accu = 0, param = l; + /*<>*/ var accu = 0, param = l; for(;;){ - if(! param) /*<>*/ return accu; - /*<>*/ var + if(! param) /*<>*/ return accu; + /*<>*/ var l$0 = param[2], a = param[1], - /*<>*/ accu$0 = - [0, /*<>*/ caml_call1(f, a), accu], + /*<>*/ accu$0 = + [0, /*<>*/ caml_call1(f, a), accu], accu = accu$0, param = l$0; } - /*<>*/ } + /*<>*/ } function iter(f, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], a = param$0[1]; - /*<>*/ /*<>*/ caml_call1(f, a); + /*<>*/ /*<>*/ caml_call1(f, a); var param$0 = l; } } function iteri(f, l$0){ - /*<>*/ var i = 0, param = l$0; + /*<>*/ var i = 0, param = l$0; for(;;){ - if(! param) /*<>*/ return 0; + if(! param) /*<>*/ return 0; var l = param[2], a = param[1]; - /*<>*/ /*<>*/ caml_call2(f, i, a); + /*<>*/ /*<>*/ caml_call2(f, i, a); var i$0 = i + 1 | 0, i = i$0, param = l; } - /*<>*/ } + /*<>*/ } function fold_left(f, accu, l){ - /*<>*/ var accu$0 = accu, l$0 = l; - /*<>*/ for(;;){ - if(! l$0) /*<>*/ return accu$0; - /*<>*/ var + /*<>*/ var accu$0 = accu, l$0 = l; + /*<>*/ for(;;){ + if(! l$0) /*<>*/ return accu$0; + /*<>*/ var l$1 = l$0[2], a = l$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call2(f, accu$0, a), + /*<>*/ accu$1 = + /*<>*/ caml_call2(f, accu$0, a), accu$0 = accu$1, l$0 = l$1; } - /*<>*/ } + /*<>*/ } function fold_right(f, l, accu){ - /*<>*/ if(! l) /*<>*/ return accu; + /*<>*/ if(! l) /*<>*/ return accu; var l$0 = l[2], a = l[1]; - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (f, a, fold_right(f, l$0, accu)); - /*<>*/ } + /*<>*/ } function map2(f, l1, l2){ - /*<>*/ if(l1){ - if(l2){ - /*<>*/ var - l2$0 = l2[2], - a2 = l2[1], - l1$0 = l1[2], - a1 = l1[1], - /*<>*/ r = - /*<>*/ caml_call2(f, a1, a2); - /*<>*/ return [0, r, map2(f, l1$0, l2$0)]; - } - } - else if(! l2) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(l1){ + var _G_ = l1[2], a1 = l1[1]; + if(_G_){ + if(l2){ + var match = l2[2]; + if(match){ + /*<>*/ var + l2$0 = match[2], + b2 = match[1], + b1 = l2[1], + l1$0 = _G_[2], + a2 = _G_[1], + /*<>*/ r1 = + /*<>*/ caml_call2(f, a1, b1), + /*<>*/ r2 = + /*<>*/ caml_call2(f, a2, b2), + /*<>*/ block = [0, r2, 24029], + dst = block, + offset = 1, + l1$1 = l1$0, + l2$1 = l2$0; + /*<>*/ for(;;){ + a: + { + if(l1$1){ + var _H_ = l1$1[2], a1$0 = l1$1[1]; + if(_H_){ + if(l2$1){ + var match$0 = l2$1[2]; + if(match$0){ + /*<>*/ var + l2$2 = match$0[2], + b2$0 = match$0[1], + b1$1 = l2$1[1], + l1$2 = _H_[2], + a2$0 = _H_[1], + /*<>*/ r1$1 = + /*<>*/ caml_call2(f, a1$0, b1$1), + /*<>*/ r2$0 = + /*<>*/ caml_call2(f, a2$0, b2$0), + /*<>*/ dst$0 = [0, r2$0, 24029]; + dst[1 + offset] = [0, r1$1, dst$0]; + var dst = dst$0, offset = 1, l1$1 = l1$2, l2$1 = l2$2; + continue; + } + } + } + else if(l2$1 && ! l2$1[2]){ + /*<>*/ var + b1$2 = l2$1[1], + /*<>*/ r1$2 = + /*<>*/ caml_call2(f, a1$0, b1$2); + dst[1 + offset] = [0, r1$2, 0]; + break a; + } + } + else if(! l2$1){dst[1 + offset] = 0; break a;} + dst[1 + offset] = caml_call1(Stdlib[1], cst_List_map2$0); + } + /*<>*/ return [0, r1, block]; + } + } + } + } + else if(l2 && ! l2[2]){ + /*<>*/ var + b1$0 = l2[1], + /*<>*/ r1$0 = + /*<>*/ caml_call2(f, a1, b1$0); + /*<>*/ return [0, r1$0, 0]; + } + } + else if(! l2) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_map2); - /*<>*/ } + /*<>*/ } function rev_map2(f, l1, l2){ - /*<>*/ var accu = 0, l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var accu = 0, l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(l1$0){ if(l2$0){ - /*<>*/ var + /*<>*/ var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - /*<>*/ accu$0 = - [0, /*<>*/ caml_call2(f, a1, a2), accu], + /*<>*/ accu$0 = + [0, /*<>*/ caml_call2(f, a1, a2), accu], accu = accu$0, l1$0 = l1$1, l2$0 = l2$1; continue; } } - else if(! l2$0) /*<>*/ return accu; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2$0) /*<>*/ return accu; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_rev_map2); } - /*<>*/ } + /*<>*/ } function iter2(f, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(l1$0){ if(l2$0){ var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1]; - /*<>*/ /*<>*/ caml_call2(f, a1, a2); + /*<>*/ /*<>*/ caml_call2(f, a1, a2); var l1$0 = l1$1, l2$0 = l2$1; continue; } } - else if(! l2$0) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2$0) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_iter2); } - /*<>*/ } + /*<>*/ } function fold_left2(f, accu, l1, l2){ - /*<>*/ var accu$0 = accu, l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var accu$0 = accu, l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(l1$0){ if(l2$0){ - /*<>*/ var + /*<>*/ var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call3(f, accu$0, a1, a2), + /*<>*/ accu$1 = + /*<>*/ caml_call3(f, accu$0, a1, a2), accu$0 = accu$1, l1$0 = l1$1, l2$0 = l2$1; continue; } } - else if(! l2$0) /*<>*/ return accu$0; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2$0) /*<>*/ return accu$0; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_fold_left2); } - /*<>*/ } + /*<>*/ } function fold_right2(f, l1, l2, accu){ - /*<>*/ if(l1){ + /*<>*/ if(l1){ if(l2){ var l2$0 = l2[2], a2 = l2[1], l1$0 = l1[2], a1 = l1[1]; - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ return /*<>*/ caml_call3 (f, a1, a2, fold_right2(f, l1$0, l2$0, accu)); } } - else if(! l2) /*<>*/ return accu; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2) /*<>*/ return accu; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_fold_right2); - /*<>*/ } + /*<>*/ } function for_all(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 1; - /*<>*/ var + if(! param$0) /*<>*/ return 1; + /*<>*/ var l = param$0[2], a = param$0[1], - /*<>*/ _I_ = /*<>*/ caml_call1(p, a); - /*<>*/ if(! _I_) /*<>*/ return _I_; + /*<>*/ _F_ = /*<>*/ caml_call1(p, a); + /*<>*/ if(! _F_) /*<>*/ return _F_; var param$0 = l; } } function exists(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var l = param$0[2], a = param$0[1], - /*<>*/ _H_ = /*<>*/ caml_call1(p, a); - /*<>*/ if(_H_) /*<>*/ return _H_; + /*<>*/ _E_ = /*<>*/ caml_call1(p, a); + /*<>*/ if(_E_) /*<>*/ return _E_; var param$0 = l; } } function for_all2(p, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(l1$0){ if(l2$0){ - /*<>*/ var + /*<>*/ var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - /*<>*/ _G_ = - /*<>*/ caml_call2(p, a1, a2); - /*<>*/ if(! _G_) /*<>*/ return _G_; + /*<>*/ _D_ = + /*<>*/ caml_call2(p, a1, a2); + /*<>*/ if(! _D_) /*<>*/ return _D_; var l1$0 = l1$1, l2$0 = l2$1; continue; } } - else if(! l2$0) /*<>*/ return 1; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2$0) /*<>*/ return 1; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_for_all2); } - /*<>*/ } + /*<>*/ } function exists2(p, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(l1$0){ if(l2$0){ - /*<>*/ var + /*<>*/ var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - /*<>*/ _F_ = - /*<>*/ caml_call2(p, a1, a2); - /*<>*/ if(_F_) /*<>*/ return _F_; + /*<>*/ _C_ = + /*<>*/ caml_call2(p, a1, a2); + /*<>*/ if(_C_) /*<>*/ return _C_; var l1$0 = l1$1, l2$0 = l2$1; continue; } } - else if(! l2$0) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2$0) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_exists2); } - /*<>*/ } + /*<>*/ } function mem(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], a = param$0[1], - _E_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; - if(_E_) return _E_; + _B_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; + if(_B_) return _B_; var param$0 = l; } } function memq(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1], _D_ = a === x ? 1 : 0; - if(_D_) return _D_; + if(! param$0) /*<>*/ return 0; + var l = param$0[2], a = param$0[1], _A_ = a === x ? 1 : 0; + if(_A_) return _A_; var param$0 = l; } } @@ -3592,23 +3858,23 @@ var param$0 = param; for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - /*<>*/ if - (0 === /*<>*/ caml_compare(a, x)) - /*<>*/ return b; + /*<>*/ if + (0 === /*<>*/ caml_compare(a, x)) + /*<>*/ return b; var param$0 = l; } } function assoc_opt(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - /*<>*/ if - (0 === /*<>*/ caml_compare(a, x)) - /*<>*/ return [0, b]; + /*<>*/ if + (0 === /*<>*/ caml_compare(a, x)) + /*<>*/ return [0, b]; var param$0 = l; } } @@ -3616,53 +3882,53 @@ var param$0 = param; for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - if(a === x) /*<>*/ return b; + if(a === x) /*<>*/ return b; var param$0 = l; } } function assq_opt(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], match = param$0[1], b = match[2], a = match[1]; - if(a === x) /*<>*/ return [0, b]; + if(a === x) /*<>*/ return [0, b]; var param$0 = l; } } function mem_assoc(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], a = param$0[1][1], - _C_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; - if(_C_) return _C_; + _z_ = 0 === /*<>*/ caml_compare(a, x) ? 1 : 0; + if(_z_) return _z_; var param$0 = l; } } function mem_assq(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - var l = param$0[2], a = param$0[1][1], _B_ = a === x ? 1 : 0; - if(_B_) return _B_; + if(! param$0) /*<>*/ return 0; + var l = param$0[2], a = param$0[1][1], _y_ = a === x ? 1 : 0; + if(_y_) return _y_; var param$0 = l; } } function remove_assoc(x, param){ - /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ if(! param) /*<>*/ return 0; var l = param[2], pair = param[1], a = pair[1]; - /*<>*/ return 0 - === /*<>*/ caml_compare(a, x) + /*<>*/ return 0 + === /*<>*/ caml_compare(a, x) ? l : [0, pair, remove_assoc(x, l)]; } function remove_assq(x, param){ - /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ if(! param) /*<>*/ return 0; var l = param[2], pair = param[1], a = pair[1]; return a === x ? l : [0, pair, remove_assq(x, l)]; } @@ -3670,737 +3936,876 @@ var param$0 = param; for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[2], x = param$0[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return x; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return x; var param$0 = l; } } function find_opt(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], x = param$0[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return [0, x]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, x]; var param$0 = l; } } + function find_index(p){ + /*<>*/ /*<>*/ var i = 0; + /*<>*/ return function(param$0){ + var i$0 = i, param = param$0; + for(;;){ + if(! param) /*<>*/ return 0; + var l = param[2], a = param[1]; + /*<>*/ if( /*<>*/ caml_call1(p, a)) + /*<>*/ return [0, i$0]; + var i$1 = i$0 + 1 | 0, i$0 = i$1, param = l; + }}; + /*<>*/ } function find_map(f, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var l = param$0[2], x = param$0[1], - /*<>*/ result = - /*<>*/ caml_call1(f, x); - if(result) /*<>*/ return result; + /*<>*/ result = + /*<>*/ caml_call1(f, x); + if(result) /*<>*/ return result; var param$0 = l; } } - function find_all(p){ - /*<>*/ /*<>*/ var accu = 0; - /*<>*/ return function(param$0){ - var accu$0 = accu, param = param$0; + function find_mapi(f){ + /*<>*/ /*<>*/ var i = 0; + /*<>*/ return function(param$0){ + var i$0 = i, param = param$0; for(;;){ - if(! param) /*<>*/ return rev(accu$0); - var l = param[2], x = param[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ var - /*<>*/ accu$1 = [0, x, accu$0], - accu$0 = accu$1, - param = l; - else - var param = l; - }}; - /*<>*/ } - function filteri(p, l){ - /*<>*/ var i = 0, acc = 0, param = l; - for(;;){ - if(! param) /*<>*/ return rev(acc); - /*<>*/ var - l$0 = param[2], - x = param[1], - /*<>*/ acc$0 = - /*<>*/ caml_call2(p, i, x) ? [0, x, acc] : acc, - i$0 = i + 1 | 0, - i = i$0, - acc = acc$0, - param = l$0; - } - /*<>*/ } - function filter_map(f){ - /*<>*/ /*<>*/ var accu = 0; - /*<>*/ return function(param$0){ - var accu$0 = accu, param = param$0; - for(;;){ - if(! param) /*<>*/ return rev(accu$0); - /*<>*/ var + if(! param) /*<>*/ return 0; + /*<>*/ var l = param[2], x = param[1], - /*<>*/ match = - /*<>*/ caml_call1(f, x); - if(match) - /*<>*/ var - v = match[1], - /*<>*/ accu$1 = [0, v, accu$0], - accu$0 = accu$1, - param = l; - else - var param = l; + /*<>*/ result = + /*<>*/ caml_call2(f, i$0, x); + if(result) /*<>*/ return result; + var i$1 = i$0 + 1 | 0, i$0 = i$1, param = l; }}; - /*<>*/ } - function concat_map(f, l){ - /*<>*/ var acc = 0, param = l; + /*<>*/ } + function find_all(p, param){ + var param$0 = param; for(;;){ - if(! param) /*<>*/ return rev(acc); - /*<>*/ var - l$0 = param[2], + if(! param$0) /*<>*/ return 0; + var l = param$0[2], x = param$0[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x)){ + /*<>*/ var + /*<>*/ block = [0, x, 24029], + dst = block, + offset = 1, + param$1 = l; + for(;;){ + if(! param$1){ + dst[1 + offset] = 0; + /*<>*/ return block; + } + var l$0 = param$1[2], x$0 = param$1[1]; + /*<>*/ if( /*<>*/ caml_call1(p, x$0)){ + /*<>*/ /*<>*/ var + dst$0 = [0, x$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1, param$1 = l$0; + } + else + var param$1 = l$0; + } + } + else + var param$0 = l; + } + } + function filteri(p, l$1){ + /*<>*/ var i = 0, param = l$1; + for(;;){ + if(! param) /*<>*/ return 0; + /*<>*/ var + l = param[2], x = param[1], - /*<>*/ xs = /*<>*/ caml_call1(f, x), - /*<>*/ acc$0 = rev_append(xs, acc), - acc = acc$0, - param = l$0; + /*<>*/ i$0 = i + 1 | 0; + /*<>*/ if( /*<>*/ caml_call2(p, i, x)){ + /*<>*/ var + /*<>*/ block = [0, x, 24029], + dst = block, + offset = 1, + i$1 = i$0, + param$0 = l; + for(;;){ + if(! param$0){ + dst[1 + offset] = 0; + /*<>*/ return block; + } + /*<>*/ var + l$0 = param$0[2], + x$0 = param$0[1], + /*<>*/ i$2 = i$1 + 1 | 0; + /*<>*/ if + ( /*<>*/ caml_call2(p, i$1, x$0)){ + /*<>*/ /*<>*/ var + dst$0 = [0, x$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1, i$1 = i$2, param$0 = l$0; + } + else + var i$1 = i$2, param$0 = l$0; + } + } + else + var i = i$0, param = l; + } + /*<>*/ } + function filter_map(f, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + l = param$0[2], + x = param$0[1], + /*<>*/ match = /*<>*/ caml_call1(f, x); + if(match){ + /*<>*/ var + v = match[1], + /*<>*/ block = [0, v, 24029], + dst = block, + offset = 1, + param$1 = l; + for(;;){ + if(! param$1){ + dst[1 + offset] = 0; + /*<>*/ return block; + } + /*<>*/ var + l$0 = param$1[2], + x$0 = param$1[1], + /*<>*/ match$0 = + /*<>*/ caml_call1(f, x$0); + if(match$0){ + /*<>*/ var + v$0 = match$0[1], + /*<>*/ dst$0 = [0, v$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1, param$1 = l$0; + } + else + var param$1 = l$0; + } + } + else + var param$0 = l; } - /*<>*/ } + } + function concat_map(f, param){ + var param$0 = param; + for(;;){ + if(! param$0) /*<>*/ return 0; + /*<>*/ var + xs = param$0[2], + x = param$0[1], + /*<>*/ ys = /*<>*/ caml_call1(f, x); + if(ys){ + /*<>*/ var + ys$1 = ys[2], + y = ys[1], + /*<>*/ block = [0, y, 24029], + dst = block, + offset = 1, + ys$2 = ys$1, + xs$1 = xs; + /*<>*/ for(;;) + if(ys$2){ + /*<>*/ var + ys$3 = ys$2[2], + y$0 = ys$2[1], + /*<>*/ dst$0 = [0, y$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1, ys$2 = ys$3; + } + else{ + if(! xs$1){dst[1 + offset] = 0; /*<>*/ return block;} + /*<>*/ var + xs$0 = xs$1[2], + x$0 = xs$1[1], + /*<>*/ ys$0 = + /*<>*/ caml_call1(f, x$0), + ys$2 = ys$0, + xs$1 = xs$0; + } + } + else + var param$0 = xs; + } + } function fold_left_map(f, accu, l){ - /*<>*/ var accu$0 = accu, l_accu = 0, param = l; + /*<>*/ var accu$0 = accu, l_accu = 0, param = l; for(;;){ - if(! param) /*<>*/ return [0, accu$0, rev(l_accu)]; - /*<>*/ var + if(! param) /*<>*/ return [0, accu$0, rev(l_accu)]; + /*<>*/ var l$0 = param[2], x = param[1], - /*<>*/ match = - /*<>*/ caml_call2(f, accu$0, x), + /*<>*/ match = + /*<>*/ caml_call2(f, accu$0, x), x$0 = match[2], accu$1 = match[1], - /*<>*/ l_accu$0 = [0, x$0, l_accu], + /*<>*/ l_accu$0 = [0, x$0, l_accu], accu$0 = accu$1, l_accu = l_accu$0, param = l$0; } - /*<>*/ } + /*<>*/ } function partition(p, l){ - /*<>*/ var yes = 0, no = 0, param = l; + /*<>*/ var yes = 0, no = 0, param = l; for(;;){ if(! param){ - /*<>*/ /*<>*/ var _A_ = rev(no); - /*<>*/ return [0, rev(yes), _A_]; + /*<>*/ /*<>*/ var _x_ = rev(no); + /*<>*/ return [0, rev(yes), _x_]; } var l$0 = param[2], x = param[1]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ var - /*<>*/ yes$0 = [0, x, yes], + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ var + /*<>*/ yes$0 = [0, x, yes], yes = yes$0, param = l$0; else - /*<>*/ var - /*<>*/ no$0 = [0, x, no], + /*<>*/ var + /*<>*/ no$0 = [0, x, no], no = no$0, param = l$0; } - /*<>*/ } + /*<>*/ } function partition_map(p, l){ - /*<>*/ var left = 0, right = 0, param = l; + /*<>*/ var left = 0, right = 0, param = l; for(;;){ if(! param){ - /*<>*/ /*<>*/ var _z_ = rev(right); - /*<>*/ return [0, rev(left), _z_]; + /*<>*/ /*<>*/ var _w_ = rev(right); + /*<>*/ return [0, rev(left), _w_]; } - /*<>*/ var + /*<>*/ var l$0 = param[2], x = param[1], - /*<>*/ match = /*<>*/ caml_call1(p, x); + /*<>*/ match = /*<>*/ caml_call1(p, x); if(0 === match[0]) - /*<>*/ var + /*<>*/ var v = match[1], - /*<>*/ left$0 = [0, v, left], + /*<>*/ left$0 = [0, v, left], left = left$0, param = l$0; else - /*<>*/ var + /*<>*/ var v$0 = match[1], - /*<>*/ right$0 = [0, v$0, right], + /*<>*/ right$0 = [0, v$0, right], right = right$0, param = l$0; } - /*<>*/ } + /*<>*/ } function split(param){ - /*<>*/ if(! param) /*<>*/ return _b_; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ var l = param[2], match = param[1], y = match[2], x = match[1], - /*<>*/ match$0 = split(l), + /*<>*/ match$0 = split(l), ry = match$0[2], rx = match$0[1]; - /*<>*/ return [0, [0, x, rx], [0, y, ry]]; - /*<>*/ } + /*<>*/ return [0, [0, x, rx], [0, y, ry]]; + /*<>*/ } function combine(l1, l2){ - /*<>*/ if(l1){ + /*<>*/ if(l1){ if(l2){ var l2$0 = l2[2], a2 = l2[1], l1$0 = l1[2], a1 = l1[1]; - /*<>*/ return [0, [0, a1, a2], combine(l1$0, l2$0)]; + /*<>*/ return [0, [0, a1, a2], combine(l1$0, l2$0)]; } } - else if(! l2) /*<>*/ return 0; - /*<>*/ return /*<>*/ caml_call1 + else if(! l2) /*<>*/ return 0; + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_List_combine); - /*<>*/ } + /*<>*/ } function merge(cmp, l1, l2){ - /*<>*/ if(! l1) /*<>*/ return l2; - if(! l2) /*<>*/ return l1; + /*<>*/ if(! l1) /*<>*/ return l2; + if(! l2) /*<>*/ return l1; var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; - /*<>*/ return 0 - < /*<>*/ caml_call2(cmp, h1, h2) + /*<>*/ return 0 + < /*<>*/ caml_call2(cmp, h1, h2) ? [0, h2, merge(cmp, l1, t2)] : [0, h1, merge(cmp, t1, l2)]; - /*<>*/ } + /*<>*/ } function stable_sort(cmp, l){ function sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ - /*<>*/ var + /*<>*/ var tl = match[2], x2 = match[1], x1 = l[1], - /*<>*/ s = - 0 < /*<>*/ caml_call2(cmp, x1, x2) + /*<>*/ s = + 0 < /*<>*/ caml_call2(cmp, x1, x2) ? [0, x2, [0, x1, 0]] : [0, x1, [0, x2, 0]]; - /*<>*/ return [0, s, tl]; + /*<>*/ return [0, s, tl]; } } } else if(3 === n && l){ - var _y_ = l[2]; - if(_y_){ - var match$2 = _y_[2]; + var _v_ = l[2]; + if(_v_){ + var match$2 = _v_[2]; if(match$2){ - /*<>*/ var + /*<>*/ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _y_[1], + x2$0 = _v_[1], x1$0 = l[1], - /*<>*/ s$0 = - 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) + /*<>*/ s$0 = + 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) ? 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) + < /*<>*/ caml_call2(cmp, x1$0, x3) ? 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) + < /*<>*/ caml_call2(cmp, x2$0, x3) ? [0, x3, [0, x2$0, [0, x1$0, 0]]] : [0, x2$0, [0, x3, [0, x1$0, 0]]] : [0, x2$0, [0, x1$0, [0, x3, 0]]] : 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) + < /*<>*/ caml_call2(cmp, x2$0, x3) ? 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) + < /*<>*/ caml_call2(cmp, x1$0, x3) ? [0, x3, [0, x1$0, [0, x2$0, 0]]] : [0, x1$0, [0, x3, [0, x2$0, 0]]] : [0, x1$0, [0, x2$0, [0, x3, 0]]]; - /*<>*/ return [0, s$0, tl$1]; + /*<>*/ return [0, s$0, tl$1]; } } } - /*<>*/ var + /*<>*/ var n1 = n >> 1, n2 = n - n1 | 0, - /*<>*/ match$0 = rev_sort(n1, l), + /*<>*/ match$0 = rev_sort(n1, l), l2$0 = match$0[2], s1 = match$0[1], - /*<>*/ match$1 = rev_sort(n2, l2$0), + /*<>*/ match$1 = rev_sort(n2, l2$0), tl$0 = match$1[2], s2 = match$1[1], l1 = s1, l2 = s2, accu = 0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(l1){ if(l2){ var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, h1, h2)){ - /*<>*/ var - /*<>*/ accu$0 = [0, h1, accu], + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, h1, h2)){ + /*<>*/ var + /*<>*/ accu$0 = [0, h1, accu], l1 = t1, accu = accu$0; continue; } - /*<>*/ var - /*<>*/ accu$1 = [0, h2, accu], + /*<>*/ var + /*<>*/ accu$1 = [0, h2, accu], l2 = t2, accu = accu$1; continue; } - var _x_ = rev_append(l1, accu); + var _u_ = rev_append(l1, accu); } else - var _x_ = rev_append(l2, accu); - /*<>*/ return [0, _x_, tl$0]; + var _u_ = rev_append(l2, accu); + /*<>*/ return [0, _u_, tl$0]; } - /*<>*/ } + /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ - /*<>*/ var + /*<>*/ var tl = match[2], x2 = match[1], x1 = l[1], - /*<>*/ s = - 0 < /*<>*/ caml_call2(cmp, x1, x2) + /*<>*/ s = + 0 < /*<>*/ caml_call2(cmp, x1, x2) ? [0, x1, [0, x2, 0]] : [0, x2, [0, x1, 0]]; - /*<>*/ return [0, s, tl]; + /*<>*/ return [0, s, tl]; } } } else if(3 === n && l){ - var _w_ = l[2]; - if(_w_){ - var match$2 = _w_[2]; + var _t_ = l[2]; + if(_t_){ + var match$2 = _t_[2]; if(match$2){ - /*<>*/ var + /*<>*/ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _w_[1], + x2$0 = _t_[1], x1$0 = l[1], - /*<>*/ s$0 = - 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) + /*<>*/ s$0 = + 0 < /*<>*/ caml_call2(cmp, x1$0, x2$0) ? 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) + < /*<>*/ caml_call2(cmp, x2$0, x3) ? [0, x1$0, [0, x2$0, [0, x3, 0]]] : 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) + < /*<>*/ caml_call2(cmp, x1$0, x3) ? [0, x1$0, [0, x3, [0, x2$0, 0]]] : [0, x3, [0, x1$0, [0, x2$0, 0]]] : 0 - < /*<>*/ caml_call2(cmp, x1$0, x3) + < /*<>*/ caml_call2(cmp, x1$0, x3) ? [0, x2$0, [0, x1$0, [0, x3, 0]]] : 0 - < /*<>*/ caml_call2(cmp, x2$0, x3) + < /*<>*/ caml_call2(cmp, x2$0, x3) ? [0, x2$0, [0, x3, [0, x1$0, 0]]] : [0, x3, [0, x2$0, [0, x1$0, 0]]]; - /*<>*/ return [0, s$0, tl$1]; + /*<>*/ return [0, s$0, tl$1]; } } } - /*<>*/ var + /*<>*/ var n1 = n >> 1, n2 = n - n1 | 0, - /*<>*/ match$0 = sort(n1, l), + /*<>*/ match$0 = sort(n1, l), l2$0 = match$0[2], s1 = match$0[1], - /*<>*/ match$1 = sort(n2, l2$0), + /*<>*/ match$1 = sort(n2, l2$0), tl$0 = match$1[2], s2 = match$1[1], l1 = s1, l2 = s2, accu = 0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(l1){ if(l2){ var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1]; - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, h1, h2)){ - /*<>*/ var - /*<>*/ accu$0 = [0, h2, accu], + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, h1, h2)){ + /*<>*/ var + /*<>*/ accu$0 = [0, h2, accu], l2 = t2, accu = accu$0; continue; } - /*<>*/ var - /*<>*/ accu$1 = [0, h1, accu], + /*<>*/ var + /*<>*/ accu$1 = [0, h1, accu], l1 = t1, accu = accu$1; continue; } - var _v_ = rev_append(l1, accu); + var _s_ = rev_append(l1, accu); } else - var _v_ = rev_append(l2, accu); - /*<>*/ return [0, _v_, tl$0]; + var _s_ = rev_append(l2, accu); + /*<>*/ return [0, _s_, tl$0]; } - /*<>*/ } - /*<>*/ /*<>*/ var len = length(l); - /*<>*/ return 2 <= len ? sort(len, l)[1] : l; - /*<>*/ } + /*<>*/ } + /*<>*/ /*<>*/ var len = length(l); + /*<>*/ return 2 <= len ? sort(len, l)[1] : l; + /*<>*/ } function sort_uniq(cmp, l){ function sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ - /*<>*/ var + /*<>*/ var tl = match[2], x2 = match[1], x1 = l[1], - /*<>*/ c$0 = - /*<>*/ caml_call2(cmp, x1, x2), - /*<>*/ s = + /*<>*/ c$0 = + /*<>*/ caml_call2(cmp, x1, x2), + /*<>*/ s = 0 === c$0 ? [0, x1, 0] : 0 <= c$0 ? [0, x2, [0, x1, 0]] : [0, x1, [0, x2, 0]]; - /*<>*/ return [0, s, tl]; + /*<>*/ return [0, s, tl]; } } } else if(3 === n && l){ - var _p_ = l[2]; - if(_p_){ - var match$2 = _p_[2]; + var _m_ = l[2]; + if(_m_){ + var match$2 = _m_[2]; if(match$2){ - /*<>*/ var + /*<>*/ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _p_[1], + x2$0 = _m_[1], x1$0 = l[1], - /*<>*/ c$1 = - /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if(0 === c$1) - /*<>*/ var - /*<>*/ c$2 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _q_ = + /*<>*/ c$1 = + /*<>*/ caml_call2(cmp, x1$0, x2$0); + /*<>*/ if(0 === c$1) + /*<>*/ var + /*<>*/ c$2 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _n_ = 0 === c$2 ? [0, x2$0, 0] : 0 <= c$2 ? [0, x3, [0, x2$0, 0]] : [0, x2$0, [0, x3, 0]], - s$0 = _q_; + s$0 = _n_; else if(0 <= c$1){ - /*<>*/ /*<>*/ var - c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if(0 === c$3) - var _r_ = [0, x2$0, [0, x1$0, 0]]; + /*<>*/ /*<>*/ var + c$3 = /*<>*/ caml_call2(cmp, x1$0, x3); + /*<>*/ if(0 === c$3) + var _o_ = [0, x2$0, [0, x1$0, 0]]; else if(0 <= c$3) - /*<>*/ var - /*<>*/ c$4 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _s_ = + /*<>*/ var + /*<>*/ c$4 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _p_ = 0 === c$4 ? [0, x2$0, [0, x1$0, 0]] : 0 <= c$4 ? [0, x3, [0, x2$0, [0, x1$0, 0]]] : [0, x2$0, [0, x3, [0, x1$0, 0]]], - _r_ = _s_; + _o_ = _p_; else - var _r_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; - var s$0 = _r_; + var _o_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; + var s$0 = _o_; } else{ - /*<>*/ /*<>*/ var - c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if(0 === c$5) - var _t_ = [0, x1$0, [0, x2$0, 0]]; + /*<>*/ /*<>*/ var + c$5 = /*<>*/ caml_call2(cmp, x2$0, x3); + /*<>*/ if(0 === c$5) + var _q_ = [0, x1$0, [0, x2$0, 0]]; else if(0 <= c$5) - /*<>*/ var - /*<>*/ c$6 = - /*<>*/ caml_call2(cmp, x1$0, x3), - /*<>*/ _u_ = + /*<>*/ var + /*<>*/ c$6 = + /*<>*/ caml_call2(cmp, x1$0, x3), + /*<>*/ _r_ = 0 === c$6 ? [0, x1$0, [0, x2$0, 0]] : 0 <= c$6 ? [0, x3, [0, x1$0, [0, x2$0, 0]]] : [0, x1$0, [0, x3, [0, x2$0, 0]]], - _t_ = _u_; + _q_ = _r_; else - var _t_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; - var s$0 = _t_; + var _q_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; + var s$0 = _q_; } - /*<>*/ return [0, s$0, tl$1]; + /*<>*/ return [0, s$0, tl$1]; } } } - /*<>*/ var + /*<>*/ var n1 = n >> 1, n2 = n - n1 | 0, - /*<>*/ match$0 = rev_sort(n1, l), + /*<>*/ match$0 = rev_sort(n1, l), l2$0 = match$0[2], s1 = match$0[1], - /*<>*/ match$1 = rev_sort(n2, l2$0), + /*<>*/ match$1 = rev_sort(n2, l2$0), tl$0 = match$1[2], s2 = match$1[1], l1 = s1, l2 = s2, accu = 0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(l1){ if(l2){ - /*<>*/ var + /*<>*/ var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1], - /*<>*/ c = - /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if(0 === c){ - /*<>*/ var - /*<>*/ accu$0 = [0, h1, accu], + /*<>*/ c = + /*<>*/ caml_call2(cmp, h1, h2); + /*<>*/ if(0 === c){ + /*<>*/ var + /*<>*/ accu$0 = [0, h1, accu], l1 = t1, l2 = t2, accu = accu$0; continue; } if(0 < c){ - /*<>*/ var - /*<>*/ accu$1 = [0, h1, accu], + /*<>*/ var + /*<>*/ accu$1 = [0, h1, accu], l1 = t1, accu = accu$1; continue; } - /*<>*/ var - /*<>*/ accu$2 = [0, h2, accu], + /*<>*/ var + /*<>*/ accu$2 = [0, h2, accu], l2 = t2, accu = accu$2; continue; } - var _o_ = rev_append(l1, accu); + var _l_ = rev_append(l1, accu); } else - var _o_ = rev_append(l2, accu); - /*<>*/ return [0, _o_, tl$0]; + var _l_ = rev_append(l2, accu); + /*<>*/ return [0, _l_, tl$0]; } - /*<>*/ } + /*<>*/ } function rev_sort(n, l){ - /*<>*/ if(2 === n){ + /*<>*/ if(2 === n){ if(l){ var match = l[2]; if(match){ - /*<>*/ var + /*<>*/ var tl = match[2], x2 = match[1], x1 = l[1], - /*<>*/ c$0 = - /*<>*/ caml_call2(cmp, x1, x2), - /*<>*/ s = + /*<>*/ c$0 = + /*<>*/ caml_call2(cmp, x1, x2), + /*<>*/ s = 0 === c$0 ? [0, x1, 0] : 0 < c$0 ? [0, x1, [0, x2, 0]] : [0, x2, [0, x1, 0]]; - /*<>*/ return [0, s, tl]; + /*<>*/ return [0, s, tl]; } } } else if(3 === n && l){ - var _i_ = l[2]; - if(_i_){ - var match$2 = _i_[2]; + var _f_ = l[2]; + if(_f_){ + var match$2 = _f_[2]; if(match$2){ - /*<>*/ var + /*<>*/ var tl$1 = match$2[2], x3 = match$2[1], - x2$0 = _i_[1], + x2$0 = _f_[1], x1$0 = l[1], - /*<>*/ c$1 = - /*<>*/ caml_call2(cmp, x1$0, x2$0); - /*<>*/ if(0 === c$1) - /*<>*/ var - /*<>*/ c$2 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _j_ = + /*<>*/ c$1 = + /*<>*/ caml_call2(cmp, x1$0, x2$0); + /*<>*/ if(0 === c$1) + /*<>*/ var + /*<>*/ c$2 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _g_ = 0 === c$2 ? [0, x2$0, 0] : 0 < c$2 ? [0, x2$0, [0, x3, 0]] : [0, x3, [0, x2$0, 0]], - s$0 = _j_; + s$0 = _g_; else if(0 < c$1){ - /*<>*/ /*<>*/ var - c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); - /*<>*/ if(0 === c$3) - var _k_ = [0, x1$0, [0, x2$0, 0]]; + /*<>*/ /*<>*/ var + c$3 = /*<>*/ caml_call2(cmp, x2$0, x3); + /*<>*/ if(0 === c$3) + var _h_ = [0, x1$0, [0, x2$0, 0]]; else if(0 < c$3) - var _k_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; + var _h_ = [0, x1$0, [0, x2$0, [0, x3, 0]]]; else - /*<>*/ var - /*<>*/ c$4 = - /*<>*/ caml_call2(cmp, x1$0, x3), - /*<>*/ _l_ = + /*<>*/ var + /*<>*/ c$4 = + /*<>*/ caml_call2(cmp, x1$0, x3), + /*<>*/ _i_ = 0 === c$4 ? [0, x1$0, [0, x2$0, 0]] : 0 < c$4 ? [0, x1$0, [0, x3, [0, x2$0, 0]]] : [0, x3, [0, x1$0, [0, x2$0, 0]]], - _k_ = _l_; - var s$0 = _k_; + _h_ = _i_; + var s$0 = _h_; } else{ - /*<>*/ /*<>*/ var - c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); - /*<>*/ if(0 === c$5) - var _m_ = [0, x2$0, [0, x1$0, 0]]; + /*<>*/ /*<>*/ var + c$5 = /*<>*/ caml_call2(cmp, x1$0, x3); + /*<>*/ if(0 === c$5) + var _j_ = [0, x2$0, [0, x1$0, 0]]; else if(0 < c$5) - var _m_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; + var _j_ = [0, x2$0, [0, x1$0, [0, x3, 0]]]; else - /*<>*/ var - /*<>*/ c$6 = - /*<>*/ caml_call2(cmp, x2$0, x3), - /*<>*/ _n_ = + /*<>*/ var + /*<>*/ c$6 = + /*<>*/ caml_call2(cmp, x2$0, x3), + /*<>*/ _k_ = 0 === c$6 ? [0, x2$0, [0, x1$0, 0]] : 0 < c$6 ? [0, x2$0, [0, x3, [0, x1$0, 0]]] : [0, x3, [0, x2$0, [0, x1$0, 0]]], - _m_ = _n_; - var s$0 = _m_; + _j_ = _k_; + var s$0 = _j_; } - /*<>*/ return [0, s$0, tl$1]; + /*<>*/ return [0, s$0, tl$1]; } } } - /*<>*/ var + /*<>*/ var n1 = n >> 1, n2 = n - n1 | 0, - /*<>*/ match$0 = sort(n1, l), + /*<>*/ match$0 = sort(n1, l), l2$0 = match$0[2], s1 = match$0[1], - /*<>*/ match$1 = sort(n2, l2$0), + /*<>*/ match$1 = sort(n2, l2$0), tl$0 = match$1[2], s2 = match$1[1], l1 = s1, l2 = s2, accu = 0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(l1){ if(l2){ - /*<>*/ var + /*<>*/ var t2 = l2[2], h2 = l2[1], t1 = l1[2], h1 = l1[1], - /*<>*/ c = - /*<>*/ caml_call2(cmp, h1, h2); - /*<>*/ if(0 === c){ - /*<>*/ var - /*<>*/ accu$0 = [0, h1, accu], + /*<>*/ c = + /*<>*/ caml_call2(cmp, h1, h2); + /*<>*/ if(0 === c){ + /*<>*/ var + /*<>*/ accu$0 = [0, h1, accu], l1 = t1, l2 = t2, accu = accu$0; continue; } if(0 <= c){ - /*<>*/ var - /*<>*/ accu$1 = [0, h2, accu], + /*<>*/ var + /*<>*/ accu$1 = [0, h2, accu], l2 = t2, accu = accu$1; continue; } - /*<>*/ var - /*<>*/ accu$2 = [0, h1, accu], + /*<>*/ var + /*<>*/ accu$2 = [0, h1, accu], l1 = t1, accu = accu$2; continue; } - var _h_ = rev_append(l1, accu); + var _e_ = rev_append(l1, accu); } else - var _h_ = rev_append(l2, accu); - /*<>*/ return [0, _h_, tl$0]; + var _e_ = rev_append(l2, accu); + /*<>*/ return [0, _e_, tl$0]; } - /*<>*/ } - /*<>*/ /*<>*/ var len = length(l); - /*<>*/ return 2 <= len ? sort(len, l)[1] : l; - /*<>*/ } + /*<>*/ } + /*<>*/ /*<>*/ var len = length(l); + /*<>*/ return 2 <= len ? sort(len, l)[1] : l; + /*<>*/ } function compare_lengths(l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(! l1$0) return l2$0 ? -1 : 0; - if(! l2$0) /*<>*/ return 1; + if(! l2$0) /*<>*/ return 1; var l2$1 = l2$0[2], l1$1 = l1$0[2], l1$0 = l1$1, l2$0 = l2$1; } - /*<>*/ } + /*<>*/ } function compare_length_with(l, n){ - /*<>*/ var l$0 = l, n$0 = n; - /*<>*/ for(;;){ + /*<>*/ var l$0 = l, n$0 = n; + /*<>*/ for(;;){ if(! l$0) return 0 === n$0 ? 0 : 0 < n$0 ? -1 : 1; var l$1 = l$0[2]; - /*<>*/ if(0 >= n$0) /*<>*/ return 1; - /*<>*/ var - /*<>*/ n$1 = n$0 - 1 | 0, + /*<>*/ if(0 >= n$0) /*<>*/ return 1; + /*<>*/ var + /*<>*/ n$1 = n$0 - 1 | 0, l$0 = l$1, n$0 = n$1; } - /*<>*/ } + /*<>*/ } + function is_empty(param){ + /*<>*/ return param ? 0 : 1; + /*<>*/ } function equal(eq, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(l1$0){ if(l2$0){ - /*<>*/ var + /*<>*/ var l2$1 = l2$0[2], a2 = l2$0[1], l1$1 = l1$0[2], a1 = l1$0[1], - /*<>*/ _g_ = - /*<>*/ caml_call2(eq, a1, a2); - /*<>*/ if(! _g_) /*<>*/ return _g_; + /*<>*/ _d_ = + /*<>*/ caml_call2(eq, a1, a2); + /*<>*/ if(! _d_) /*<>*/ return _d_; var l1$0 = l1$1, l2$0 = l2$1; continue; } } - else if(! l2$0) /*<>*/ return 1; - /*<>*/ return 0; + else if(! l2$0) /*<>*/ return 1; + /*<>*/ return 0; } - /*<>*/ } + /*<>*/ } function compare(cmp, l1, l2){ - /*<>*/ var l1$0 = l1, l2$0 = l2; - /*<>*/ for(;;){ + /*<>*/ var l1$0 = l1, l2$0 = l2; + /*<>*/ for(;;){ if(! l1$0) return l2$0 ? -1 : 0; var l1$1 = l1$0[2], a1 = l1$0[1]; - if(! l2$0) /*<>*/ return 1; - /*<>*/ var + if(! l2$0) /*<>*/ return 1; + /*<>*/ var l2$1 = l2$0[2], a2 = l2$0[1], - /*<>*/ c = - /*<>*/ caml_call2(cmp, a1, a2); - /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ c = + /*<>*/ caml_call2(cmp, a1, a2); + /*<>*/ if(0 !== c) /*<>*/ return c; var l1$0 = l1$1, l2$0 = l2$1; } - /*<>*/ } + /*<>*/ } function to_seq(l){ - /*<>*/ function aux(l, param){ - /*<>*/ if(! l) /*<>*/ return 0; + /*<>*/ function aux(l, param){ + /*<>*/ if(! l) /*<>*/ return 0; var tail = l[2], x = l[1]; - /*<>*/ return [0, + /*<>*/ return [0, x, - function(_f_){ /*<>*/ return aux(tail, _f_);}]; - /*<>*/ } - /*<>*/ return function(_e_){ - /*<>*/ return aux(l, _e_);}; - /*<>*/ } + function(_c_){ /*<>*/ return aux(tail, _c_);}]; + /*<>*/ } + /*<>*/ return function(_b_){ + /*<>*/ return aux(l, _b_);}; + /*<>*/ } function of_seq(seq){ - function direct(depth, seq){ - /*<>*/ if(0 === depth){ - var - _c_ = 0, - _d_ = - function(acc, x){ - /*<>*/ return [0, x, acc]; - /*<>*/ }; - /*<>*/ return rev - ( /*<>*/ caml_call3(Stdlib_Seq[5], _d_, _c_, seq)); - } - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var next = match[2], x = match[1]; - /*<>*/ return [0, x, direct(depth - 1 | 0, next)]; - /*<>*/ } - /*<>*/ return direct(500, seq); - /*<>*/ } + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(seq, 0); + if(! match) /*<>*/ return 0; + /*<>*/ var + seq$0 = match[2], + x1 = match[1], + /*<>*/ match$0 = + /*<>*/ caml_call1(seq$0, 0); + if(! match$0) /*<>*/ return [0, x1, 0]; + /*<>*/ var + seq$1 = match$0[2], + x2 = match$0[1], + /*<>*/ block = [0, x2, 24029], + dst = block, + offset = 1, + seq$2 = seq$1; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + match$1 = /*<>*/ caml_call1(seq$2, 0); + if(match$1){ + /*<>*/ var + seq$3 = match$1[2], + x1$0 = match$1[1], + /*<>*/ match$2 = + /*<>*/ caml_call1(seq$3, 0); + if(match$2){ + /*<>*/ var + seq$4 = match$2[2], + x2$0 = match$2[1], + /*<>*/ dst$0 = [0, x2$0, 24029]; + dst[1 + offset] = [0, x1$0, dst$0]; + var dst = dst$0, offset = 1, seq$2 = seq$4; + continue; + } + dst[1 + offset] = [0, x1$0, 0]; + } + else + dst[1 + offset] = 0; + /*<>*/ return [0, x1, block]; + } + /*<>*/ } var Stdlib_List = [0, length, compare_lengths, compare_length_with, + is_empty, cons, hd, tl, @@ -4437,7 +4842,9 @@ memq, find, find_opt, + find_index, find_map, + find_mapi, find_all, find_all, filteri, @@ -4460,7 +4867,7 @@ merge, to_seq, of_seq]; - runtime.caml_register_global(18, Stdlib_List, "Stdlib__List"); + runtime.caml_register_global(17, Stdlib_List, "Stdlib__List"); return; /*<>*/ } (globalThis)); @@ -4468,7 +4875,12 @@ //# unitInfo: Provides: Stdlib__Int (function(globalThis){ "use strict"; - var runtime = globalThis.jsoo_runtime, zero = 0, one = 1, minus_one = -1; + var + runtime = globalThis.jsoo_runtime, + caml_hash = runtime.caml_hash, + zero = 0, + one = 1, + minus_one = -1; function abs(x){ /*<>*/ return 0 <= x ? x : - x | 0; /*<>*/ } @@ -4487,6 +4899,14 @@ function to_string(x){ /*<>*/ return "" + x; /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } var Stdlib_Int = [0, @@ -4501,14 +4921,16 @@ compare, min, max, - to_string]; + to_string, + seeded_hash, + hash]; runtime.caml_register_global(1, Stdlib_Int, "Stdlib__Int"); return; /*<>*/ } (globalThis)); //# unitInfo: Provides: Stdlib__Bytes -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Char, Stdlib__Int, Stdlib__Seq, Stdlib__Sys, Stdlib__Uchar +//# unitInfo: Requires: Stdlib, Stdlib__Char, Stdlib__Int, Stdlib__Seq, Stdlib__Sys, Stdlib__Uchar (function (globalThis){ "use strict"; @@ -6665,6 +7087,7 @@ empty, of_bytes, to_bytes, + blit, concat, cat, caml_string_equal, @@ -6707,7 +7130,6 @@ is_valid_utf_16be, get_utf_16le_uchar, is_valid_utf_16le, - blit, runtime.caml_string_get, get_int8, runtime.caml_string_get16, @@ -6757,6 +7179,7 @@ runtime = globalThis.jsoo_runtime, cst_Marshal_from_bytes$1 = "Marshal.from_bytes", caml_marshal_data_size = runtime.caml_marshal_data_size, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_ml_bytes_length = runtime.caml_ml_bytes_length; /*<>*/ function caml_call1(f, a0){ return (f.l >= 0 ? f.l : f.l = f.length) == 1 @@ -6765,52 +7188,66 @@ } var global_data = runtime.caml_get_global_data(), + Assert_failure = global_data.Assert_failure, Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib = global_data.Stdlib, + _a_ = [0, 3, 0], + _b_ = [0, "marshal.ml", 75, 9], cst_Marshal_from_bytes = cst_Marshal_from_bytes$1, cst_Marshal_from_bytes$0 = cst_Marshal_from_bytes$1, cst_Marshal_data_size = "Marshal.data_size", cst_Marshal_to_buffer_substrin = "Marshal.to_buffer: substring out of bounds"; function to_buffer(buff, ofs, len, v, flags){ - /*<>*/ if + /*<>*/ if (0 <= ofs && 0 <= len && (caml_ml_bytes_length(buff) - len | 0) >= ofs) - /*<>*/ return /*<>*/ runtime.caml_output_value_to_buffer + /*<>*/ return /*<>*/ runtime.caml_output_value_to_buffer (buff, ofs, len, v, flags); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Marshal_to_buffer_substrin); - /*<>*/ } - var header_size = 20; + /*<>*/ } + var header_size = 16; function data_size(buff, ofs){ - /*<>*/ if - (0 <= ofs && (caml_ml_bytes_length(buff) - 20 | 0) >= ofs) - /*<>*/ return /*<>*/ caml_marshal_data_size + /*<>*/ if + (0 <= ofs && (caml_ml_bytes_length(buff) - 16 | 0) >= ofs) + /*<>*/ return /*<>*/ caml_marshal_data_size (buff, ofs); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Marshal_data_size); - /*<>*/ } + /*<>*/ } function total_size(buff, ofs){ - /*<>*/ return 20 + data_size(buff, ofs) | 0; - /*<>*/ } + /*<>*/ return 16 + data_size(buff, ofs) | 0; + /*<>*/ } function from_bytes(buff, ofs){ - /*<>*/ if - (0 <= ofs && (caml_ml_bytes_length(buff) - 20 | 0) >= ofs){ - /*<>*/ /*<>*/ var - len = /*<>*/ caml_marshal_data_size(buff, ofs); - return (caml_ml_bytes_length(buff) - (20 + len | 0) | 0) < ofs - ? /*<>*/ caml_call1 + /*<>*/ if + (0 <= ofs && (caml_ml_bytes_length(buff) - 16 | 0) >= ofs){ + /*<>*/ /*<>*/ var + len = /*<>*/ caml_marshal_data_size(buff, ofs); + return (caml_ml_bytes_length(buff) - (16 + len | 0) | 0) < ofs + ? /*<>*/ caml_call1 (Stdlib[1], cst_Marshal_from_bytes$0) - : /*<>*/ runtime.caml_input_value_from_bytes + : /*<>*/ runtime.caml_input_value_from_bytes (buff, ofs); } - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Marshal_from_bytes); - /*<>*/ } + /*<>*/ } function from_string(buff, ofs){ - /*<>*/ return from_bytes - ( /*<>*/ caml_call1(Stdlib_Bytes[45], buff), + /*<>*/ return from_bytes + ( /*<>*/ caml_call1(Stdlib_Bytes[45], buff), ofs); - /*<>*/ } + /*<>*/ } + function compression_supported(param){ + /*<>*/ var + /*<>*/ s = + /*<>*/ runtime.caml_output_value_to_string(0, _a_), + /*<>*/ match = + /*<>*/ runtime.caml_string_get(s, 3); + if(189 === match) /*<>*/ return 1; + if(190 === match) /*<>*/ return 0; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Assert_failure, _b_], 1); + /*<>*/ } var Stdlib_Marshal = [0, @@ -6821,14 +7258,15 @@ from_string, header_size, data_size, - total_size]; - runtime.caml_register_global(6, Stdlib_Marshal, "Stdlib__Marshal"); + total_size, + compression_supported]; + runtime.caml_register_global(9, Stdlib_Marshal, "Stdlib__Marshal"); return; /*<>*/ } (globalThis)); //# unitInfo: Provides: Stdlib__Array -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Seq +//# unitInfo: Requires: Stdlib, Stdlib__Seq (function (globalThis){ "use strict"; @@ -6860,7 +7298,7 @@ Assert_failure = global_data.Assert_failure, Stdlib = global_data.Stdlib, /*<>*/ Floatarray = [0], - _a_ = [0, "array.ml", 319, 4], + _a_ = [0, "array.ml", 348, 4], cst_Array_combine = "Array.combine", cst_Array_exists2 = "Array.exists2", cst_Array_for_all2 = "Array.for_all2", @@ -6882,16 +7320,16 @@ /*<>*/ res = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, 0)), - /*<>*/ _as_ = l - 1 | 0, - /*<>*/ _ar_ = 1; - if(_as_ >= 1){ - var i = _ar_; + /*<>*/ _ay_ = l - 1 | 0, + /*<>*/ _ax_ = 1; + if(_ay_ >= 1){ + var i = _ax_; for(;;){ /*<>*/ res[1 + i] = /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _at_ = i + 1 | 0; - if(_as_ === i) break; - var i = _at_; + /*<>*/ /*<>*/ var _az_ = i + 1 | 0; + if(_ay_ === i) break; + var i = _az_; } } /*<>*/ return res; @@ -6900,15 +7338,15 @@ /*<>*/ var /*<>*/ res = /*<>*/ caml_make_vect(sx, [0]), - /*<>*/ _ap_ = sx - 1 | 0, - /*<>*/ _ao_ = 0; - if(_ap_ >= 0){ - var x = _ao_; + /*<>*/ _av_ = sx - 1 | 0, + /*<>*/ _au_ = 0; + if(_av_ >= 0){ + var x = _au_; for(;;){ res[1 + x] = /*<>*/ caml_make_vect(sy, init); - /*<>*/ /*<>*/ var _aq_ = x + 1 | 0; - if(_ap_ === x) break; - var x = _aq_; + /*<>*/ /*<>*/ var _aw_ = x + 1 | 0; + if(_av_ === x) break; + var x = _aw_; } } /*<>*/ return res; @@ -6959,15 +7397,15 @@ /*<>*/ } function iter(f, a){ /*<>*/ var - _am_ = a.length - 1 - 1 | 0, - /*<>*/ _al_ = 0; - if(_am_ >= 0){ - var i = _al_; + _as_ = a.length - 1 - 1 | 0, + /*<>*/ _ar_ = 0; + if(_as_ >= 0){ + var i = _ar_; for(;;){ /*<>*/ /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _an_ = i + 1 | 0; - if(_am_ === i) break; - var i = _an_; + /*<>*/ /*<>*/ var _at_ = i + 1 | 0; + if(_as_ === i) break; + var i = _at_; } } return 0; @@ -6977,16 +7415,16 @@ /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_iter2_arrays_must_ha); /*<>*/ var - _aj_ = a.length - 1 - 1 | 0, - /*<>*/ _ai_ = 0; - if(_aj_ >= 0){ - var i = _ai_; + _ap_ = a.length - 1 - 1 | 0, + /*<>*/ _ao_ = 0; + if(_ap_ >= 0){ + var i = _ao_; for(;;){ /*<>*/ /*<>*/ caml_call2 (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; - if(_aj_ === i) break; - var i = _ak_; + /*<>*/ /*<>*/ var _aq_ = i + 1 | 0; + if(_ap_ === i) break; + var i = _aq_; } } return 0; @@ -6998,404 +7436,460 @@ /*<>*/ r = /*<>*/ caml_make_vect (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _ag_ = l - 1 | 0, - /*<>*/ _af_ = 1; - if(_ag_ >= 1){ - var i = _af_; + /*<>*/ _am_ = l - 1 | 0, + /*<>*/ _al_ = 1; + if(_am_ >= 1){ + var i = _al_; for(;;){ /*<>*/ r[1 + i] = /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; - if(_ag_ === i) break; - var i = _ah_; + /*<>*/ /*<>*/ var _an_ = i + 1 | 0; + if(_am_ === i) break; + var i = _an_; } } /*<>*/ return r; /*<>*/ } - function map2(f, a, b){ + function map_inplace(f, a){ /*<>*/ var + _aj_ = a.length - 1 - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; + for(;;){ + /*<>*/ a[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; + } + } + return 0; + /*<>*/ } + function mapi_inplace(f, a){ + /*<>*/ var + _ag_ = a.length - 1 - 1 | 0, + /*<>*/ _af_ = 0; + if(_ag_ >= 0){ + var i = _af_; + for(;;){ + /*<>*/ a[1 + i] = + /*<>*/ caml_call2(f, i, a[1 + i]); + /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ah_; + } + } + return 0; + /*<>*/ } + function map2(f, a, b){ + /*<>*/ var la = a.length - 1, - /*<>*/ lb = b.length - 1; + /*<>*/ lb = b.length - 1; if(la !== lb) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Array_map2_arrays_must_hav); - if(0 === la) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_make_vect - (la, /*<>*/ caml_call2(f, a[1], b[1])), - /*<>*/ _ad_ = la - 1 | 0, - /*<>*/ _ac_ = 1; + if(0 === la) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_make_vect + (la, /*<>*/ caml_call2(f, a[1], b[1])), + /*<>*/ _ad_ = la - 1 | 0, + /*<>*/ _ac_ = 1; if(_ad_ >= 1){ var i = _ac_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; if(_ad_ === i) break; var i = _ae_; } } - /*<>*/ return r; - /*<>*/ } + /*<>*/ return r; + /*<>*/ } function iteri(f, a){ - /*<>*/ var + /*<>*/ var _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; + /*<>*/ _$_ = 0; if(_aa_ >= 0){ var i = _$_; for(;;){ - /*<>*/ /*<>*/ caml_call2 + /*<>*/ /*<>*/ caml_call2 (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; if(_aa_ === i) break; var i = _ab_; } } return 0; - /*<>*/ } + /*<>*/ } function mapi(f, a){ - /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_make_vect - (l, /*<>*/ caml_call2(f, 0, a[1])), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 1; + /*<>*/ var l = a.length - 1; + /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_make_vect + (l, /*<>*/ caml_call2(f, 0, a[1])), + /*<>*/ _Z_ = l - 1 | 0, + /*<>*/ _Y_ = 1; if(_Z_ >= 1){ var i = _Y_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, i, a[1 + i]); + /*<>*/ /*<>*/ var ___ = i + 1 | 0; if(_Z_ === i) break; var i = ___; } } - /*<>*/ return r; - /*<>*/ } + /*<>*/ return r; + /*<>*/ } function to_list(a){ - /*<>*/ var i$1 = a.length - 1 - 1 | 0, i = i$1, res = 0; - /*<>*/ for(;;){ - if(0 > i) /*<>*/ return res; - /*<>*/ var - /*<>*/ res$0 = [0, a[1 + i], res], - /*<>*/ i$0 = i - 1 | 0, + /*<>*/ var i$1 = a.length - 1 - 1 | 0, i = i$1, res = 0; + /*<>*/ for(;;){ + if(0 > i) /*<>*/ return res; + /*<>*/ var + /*<>*/ res$0 = [0, a[1 + i], res], + /*<>*/ i$0 = i - 1 | 0, i = i$0, res = res$0; } - /*<>*/ } + /*<>*/ } function list_length(accu, param){ var accu$0 = accu, param$0 = param; for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var t = param$0[2], - /*<>*/ accu$1 = accu$0 + 1 | 0, + /*<>*/ accu$1 = accu$0 + 1 | 0, accu$0 = accu$1, param$0 = t; } } function of_list(l){ - /*<>*/ if(! l) /*<>*/ return [0]; - /*<>*/ var + /*<>*/ if(! l) /*<>*/ return [0]; + /*<>*/ var tl = l[2], hd = l[1], - /*<>*/ a = - /*<>*/ caml_make_vect(list_length(0, l), hd), + /*<>*/ a = + /*<>*/ caml_make_vect(list_length(0, l), hd), i = 1, param = tl; for(;;){ - if(! param) /*<>*/ return a; + if(! param) /*<>*/ return a; var tl$0 = param[2], hd$0 = param[1]; - /*<>*/ a[1 + i] = hd$0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ a[1 + i] = hd$0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0, param = tl$0; } - /*<>*/ } + /*<>*/ } function fold_left(f, x, a){ - /*<>*/ var - /*<>*/ r = [0, x], + /*<>*/ var + /*<>*/ r = [0, x], _W_ = a.length - 1 - 1 | 0, - /*<>*/ _V_ = 0; + /*<>*/ _V_ = 0; if(_W_ >= 0){ var i = _V_; for(;;){ - r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; if(_W_ === i) break; var i = _X_; } } return r[1]; - /*<>*/ } + /*<>*/ } function fold_left_map(f, acc, input_array){ - /*<>*/ var len = input_array.length - 1; - /*<>*/ if(0 === len) - /*<>*/ return [0, acc, [0]]; - /*<>*/ var - /*<>*/ match = - /*<>*/ caml_call2(f, acc, input_array[1]), + /*<>*/ var len = input_array.length - 1; + /*<>*/ if(0 === len) + /*<>*/ return [0, acc, [0]]; + /*<>*/ var + /*<>*/ match = + /*<>*/ caml_call2(f, acc, input_array[1]), elt = match[2], acc$0 = match[1], - /*<>*/ output_array = - /*<>*/ caml_make_vect(len, elt), - /*<>*/ acc$1 = [0, acc$0], - /*<>*/ _T_ = len - 1 | 0, - /*<>*/ _S_ = 1; + /*<>*/ output_array = + /*<>*/ caml_make_vect(len, elt), + /*<>*/ acc$1 = [0, acc$0], + /*<>*/ _T_ = len - 1 | 0, + /*<>*/ _S_ = 1; if(_T_ >= 1){ var i = _S_; for(;;){ - /*<>*/ var - /*<>*/ match$0 = - /*<>*/ caml_call2(f, acc$1[1], input_array[1 + i]), + /*<>*/ var + /*<>*/ match$0 = + /*<>*/ caml_call2(f, acc$1[1], input_array[1 + i]), elt$0 = match$0[2], acc$2 = match$0[1]; acc$1[1] = acc$2; - /*<>*/ output_array[1 + i] = elt$0; - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + /*<>*/ output_array[1 + i] = elt$0; + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; if(_T_ === i) break; var i = _U_; } } - /*<>*/ return [0, acc$1[1], output_array]; - /*<>*/ } + /*<>*/ return [0, acc$1[1], output_array]; + /*<>*/ } function fold_right(f, a, x){ - /*<>*/ var - /*<>*/ r = [0, x], - /*<>*/ _Q_ = a.length - 1 - 1 | 0; + /*<>*/ var + /*<>*/ r = [0, x], + /*<>*/ _Q_ = a.length - 1 - 1 | 0; if(_Q_ >= 0){ var i = _Q_; for(;;){ - r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _R_ = i - 1 | 0; + r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); + /*<>*/ /*<>*/ var _R_ = i - 1 | 0; if(0 === i) break; var i = _R_; } } return r[1]; - /*<>*/ } + /*<>*/ } function exists(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - ( /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function for_all(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; - /*<>*/ if - (! /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - /*<>*/ } - function for_all2(p, l1, l2){ - /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; - if(n1 !== n2) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Array_for_all2); - var i = 0; + /*<>*/ var n = a.length - 1, i = 0; /*<>*/ for(;;){ - if(i === n1) /*<>*/ return 1; + if(i === n) /*<>*/ return 1; /*<>*/ if - (! /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) + (! /*<>*/ caml_call1(p, a[1 + i])) /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } /*<>*/ } - function exists2(p, l1, l2){ + function for_all2(p, l1, l2){ /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; if(n1 !== n2) /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Array_exists2); + (Stdlib[1], cst_Array_for_all2); var i = 0; /*<>*/ for(;;){ - if(i === n1) /*<>*/ return 0; + if(i === n1) /*<>*/ return 1; /*<>*/ if - ( /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + (! /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } /*<>*/ } + function exists2(p, l1, l2){ + /*<>*/ var n1 = l1.length - 1, n2 = l2.length - 1; + if(n1 !== n2) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Array_exists2); + var i = 0; + /*<>*/ for(;;){ + if(i === n1) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call2(p, l1[1 + i], l2[1 + i])) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } function mem(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + (0 === /*<>*/ runtime.caml_compare(a[1 + i], x)) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function memq(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(x === a[1 + i]) /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + if(x === a[1 + i]) /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function find_opt(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ /*<>*/ var x = a[1 + i]; - /*<>*/ if( /*<>*/ caml_call1(p, x)) - /*<>*/ return [0, x]; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var x = a[1 + i]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, x]; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function find_index(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return [0, i]; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function find_map(f, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ /*<>*/ var - r = /*<>*/ caml_call1(f, a[1 + i]); - if(r) /*<>*/ return r; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_call1(f, a[1 + i]); + if(r) /*<>*/ return r; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } + function find_mapi(f, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_call2(f, i, a[1 + i]); + if(r) /*<>*/ return r; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } function split(x){ - /*<>*/ if - ( /*<>*/ runtime.caml_equal(x, [0])) - /*<>*/ return [0, [0], [0]]; - /*<>*/ var + /*<>*/ if + ( /*<>*/ runtime.caml_equal(x, [0])) + /*<>*/ return [0, [0], [0]]; + /*<>*/ var match = x[1], b0 = match[2], a0 = match[1], - /*<>*/ n = x.length - 1, - /*<>*/ a = - /*<>*/ caml_make_vect(n, a0), - /*<>*/ b = - /*<>*/ caml_make_vect(n, b0), - /*<>*/ _O_ = n - 1 | 0, - /*<>*/ _N_ = 1; + /*<>*/ n = x.length - 1, + /*<>*/ a = + /*<>*/ caml_make_vect(n, a0), + /*<>*/ b = + /*<>*/ caml_make_vect(n, b0), + /*<>*/ _O_ = n - 1 | 0, + /*<>*/ _N_ = 1; if(_O_ >= 1){ var i = _N_; for(;;){ var match$0 = x[1 + i], bi = match$0[2], ai = match$0[1]; - /*<>*/ a[1 + i] = ai; - /*<>*/ b[1 + i] = bi; - /*<>*/ /*<>*/ var _P_ = i + 1 | 0; + /*<>*/ a[1 + i] = ai; + /*<>*/ b[1 + i] = bi; + /*<>*/ /*<>*/ var _P_ = i + 1 | 0; if(_O_ === i) break; var i = _P_; } } - /*<>*/ return [0, a, b]; - /*<>*/ } + /*<>*/ return [0, a, b]; + /*<>*/ } function combine(a, b){ - /*<>*/ var + /*<>*/ var na = a.length - 1, - /*<>*/ nb = b.length - 1; + /*<>*/ nb = b.length - 1; if(na !== nb) - /*<>*/ /*<>*/ caml_call1 + /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Array_combine); - if(0 === na) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ x = - /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), - /*<>*/ _L_ = na - 1 | 0, - /*<>*/ _K_ = 1; + if(0 === na) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ x = + /*<>*/ caml_make_vect(na, [0, a[1], b[1]]), + /*<>*/ _L_ = na - 1 | 0, + /*<>*/ _K_ = 1; if(_L_ >= 1){ var i = _K_; for(;;){ x[1 + i] = [0, a[1 + i], b[1 + i]]; - /*<>*/ /*<>*/ var _M_ = i + 1 | 0; + /*<>*/ /*<>*/ var _M_ = i + 1 | 0; if(_L_ === i) break; var i = _M_; } } - /*<>*/ return x; - /*<>*/ } - /*<>*/ /*<>*/ var + /*<>*/ return x; + /*<>*/ } + /*<>*/ /*<>*/ var Bottom = [248, cst_Stdlib_Array_Bottom, runtime.caml_fresh_oo_id(0)]; function sort(cmp, a){ function maxson(l, i){ - /*<>*/ var + /*<>*/ var i31 = ((i + i | 0) + i | 0) + 1 | 0, - /*<>*/ x = [0, i31]; + /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ - /*<>*/ var - /*<>*/ _D_ = i31 + 1 | 0, - /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; + /*<>*/ var + /*<>*/ _D_ = i31 + 1 | 0, + /*<>*/ _E_ = caml_check_bound(a, _D_)[1 + _D_]; if - ( /*<>*/ caml_call2 + ( /*<>*/ caml_call2 (cmp, caml_check_bound(a, i31)[1 + i31], _E_) < 0) x[1] = i31 + 1 | 0; - /*<>*/ var - /*<>*/ _F_ = i31 + 2 | 0, - /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], + /*<>*/ var + /*<>*/ _F_ = i31 + 2 | 0, + /*<>*/ _G_ = caml_check_bound(a, _F_)[1 + _F_], _H_ = x[1]; if - ( /*<>*/ caml_call2 + ( /*<>*/ caml_call2 (cmp, caml_check_bound(a, _H_)[1 + _H_], _G_) < 0) x[1] = i31 + 2 | 0; return x[1]; } if((i31 + 1 | 0) < l){ - /*<>*/ var + /*<>*/ var _I_ = i31 + 1 | 0, - /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; - /*<>*/ if + /*<>*/ _J_ = caml_check_bound(a, _I_)[1 + _I_]; + /*<>*/ if (0 > - /*<>*/ caml_call2 + /*<>*/ caml_call2 (cmp, caml_check_bound(a, i31)[1 + i31], _J_)) - /*<>*/ return i31 + 1 | 0; + /*<>*/ return i31 + 1 | 0; } - if(i31 < l) /*<>*/ return i31; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + if(i31 < l) /*<>*/ return i31; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); - /*<>*/ } + /*<>*/ } var l = a.length - 1, _x_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; if(_x_ >= 0){ var i$6 = _x_; for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var e$1 = caml_check_bound(a, i$6)[1 + i$6]; - /*<>*/ try{ + /*<>*/ try{ var i = i$6; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var j = maxson(l, i); - /*<>*/ if + /*<>*/ if (0 >= - /*<>*/ caml_call2 + /*<>*/ caml_call2 (cmp, caml_check_bound(a, j)[1 + j], e$1)){ - /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; + /*<>*/ caml_check_bound(a, i)[1 + i] = e$1; break; } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _u_ = caml_check_bound(a, j)[1 + j]; - /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; + /*<>*/ caml_check_bound(a, i)[1 + i] = _u_; var i = j; } } @@ -7403,29 +7897,29 @@ var exn = caml_wrap_exception(exn$0); if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; - /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; + /*<>*/ caml_check_bound(a, i$0)[1 + i$0] = e$1; } - /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _C_ = i$6 - 1 | 0; if(0 === i$6) break; var i$6 = _C_; } } - /*<>*/ /*<>*/ var _y_ = l - 1 | 0; + /*<>*/ /*<>*/ var _y_ = l - 1 | 0; if(_y_ >= 2){ var i$4 = _y_; a: for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var e$0 = caml_check_bound(a, i$4)[1 + i$4]; - /*<>*/ a[1 + i$4] = caml_check_bound(a, 0)[1]; + /*<>*/ a[1 + i$4] = caml_check_bound(a, 0)[1]; var i$5 = 0; - /*<>*/ try{ + /*<>*/ try{ var i$1 = i$5; - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ j$0 = maxson(i$4, i$1), - /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; - /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ j$0 = maxson(i$4, i$1), + /*<>*/ _v_ = caml_check_bound(a, j$0)[1 + j$0]; + /*<>*/ caml_check_bound(a, i$1)[1 + i$1] = _v_; var i$1 = j$0; } } @@ -7433,25 +7927,25 @@ var exn$0 = caml_wrap_exception(exn); if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); var i$2 = exn$0[2], i$3 = i$2; - /*<>*/ for(;;){ + /*<>*/ for(;;){ var father = (i$3 - 1 | 0) / 3 | 0; if(i$3 === father) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); - /*<>*/ if + /*<>*/ if (0 <= - /*<>*/ caml_call2 + /*<>*/ caml_call2 (cmp, caml_check_bound(a, father)[1 + father], e$0)) - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = e$0; else{ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _w_ = caml_check_bound(a, father)[1 + father]; - /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; + /*<>*/ caml_check_bound(a, i$3)[1 + i$3] = _w_; if(0 < father){var i$3 = father; continue;} - /*<>*/ caml_check_bound(a, 0)[1] = e$0; + /*<>*/ caml_check_bound(a, 0)[1] = e$0; } - /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _B_ = i$4 - 1 | 0; if(2 === i$4) break a; var i$4 = _B_; break; @@ -7461,88 +7955,88 @@ } var _z_ = 1 < l ? 1 : 0; if(_z_){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var e = caml_check_bound(a, 1)[2]; - /*<>*/ a[2] = caml_check_bound(a, 0)[1]; - /*<>*/ a[1] = e; + /*<>*/ a[2] = caml_check_bound(a, 0)[1]; + /*<>*/ a[1] = e; var _A_ = 0; } else var _A_ = _z_; - /*<>*/ return _A_; - /*<>*/ } + /*<>*/ return _A_; + /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ - /*<>*/ var + /*<>*/ var src1r = src1ofs + src1len | 0, src2r = src2ofs + src2len | 0, - /*<>*/ s2$1 = + /*<>*/ s2$1 = caml_check_bound(src2, src2ofs)[1 + src2ofs], - /*<>*/ s1$1 = + /*<>*/ s1$1 = caml_check_bound(a, src1ofs)[1 + src1ofs], i1 = src1ofs, s1 = s1$1, i2 = src2ofs, s2 = s2$1, d = dstofs; - /*<>*/ for(;;) - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, s1, s2)){ - /*<>*/ caml_check_bound(dst, d)[1 + d] = s2; - /*<>*/ /*<>*/ var i2$0 = i2 + 1 | 0; + /*<>*/ for(;;) + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, s1, s2)){ + /*<>*/ caml_check_bound(dst, d)[1 + d] = s2; + /*<>*/ /*<>*/ var i2$0 = i2 + 1 | 0; if(i2$0 >= src2r) return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0); - /*<>*/ var - /*<>*/ d$0 = d + 1 | 0, - /*<>*/ s2$0 = caml_check_bound(src2, i2$0)[1 + i2$0], + /*<>*/ var + /*<>*/ d$0 = d + 1 | 0, + /*<>*/ s2$0 = caml_check_bound(src2, i2$0)[1 + i2$0], i2 = i2$0, s2 = s2$0, d = d$0; } else{ - /*<>*/ caml_check_bound(dst, d)[1 + d] = s1; - /*<>*/ /*<>*/ var i1$0 = i1 + 1 | 0; + /*<>*/ caml_check_bound(dst, d)[1 + d] = s1; + /*<>*/ /*<>*/ var i1$0 = i1 + 1 | 0; if(i1$0 >= src1r) return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0); - /*<>*/ var - /*<>*/ d$1 = d + 1 | 0, - /*<>*/ s1$0 = caml_check_bound(a, i1$0)[1 + i1$0], + /*<>*/ var + /*<>*/ d$1 = d + 1 | 0, + /*<>*/ s1$0 = caml_check_bound(a, i1$0)[1 + i1$0], i1 = i1$0, s1 = s1$0, d = d$1; } - /*<>*/ } + /*<>*/ } function isortto(srcofs, dst, dstofs, len){ - /*<>*/ var + /*<>*/ var _m_ = len - 1 | 0, - /*<>*/ _l_ = 0; + /*<>*/ _l_ = 0; if(_m_ >= 0){ var i = _l_; a: for(;;){ - /*<>*/ var + /*<>*/ var _n_ = srcofs + i | 0, - /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], - /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; + /*<>*/ e = caml_check_bound(a, _n_)[1 + _n_], + /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ if(dstofs <= j[1]){ var _o_ = j[1]; - /*<>*/ if + /*<>*/ if (0 < - /*<>*/ caml_call2 + /*<>*/ caml_call2 (cmp, caml_check_bound(dst, _o_)[1 + _o_], e)){ - /*<>*/ var + /*<>*/ var _p_ = j[1], - /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], + /*<>*/ _q_ = caml_check_bound(dst, _p_)[1 + _p_], _r_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; + /*<>*/ caml_check_bound(dst, _r_)[1 + _r_] = _q_; j[1] += -1; continue; } } var _s_ = j[1] + 1 | 0; - /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; - /*<>*/ /*<>*/ var _t_ = i + 1 | 0; + /*<>*/ caml_check_bound(dst, _s_)[1 + _s_] = e; + /*<>*/ /*<>*/ var _t_ = i + 1 | 0; if(_m_ === i) break a; var i = _t_; break; @@ -7550,84 +8044,84 @@ } } return 0; - /*<>*/ } + /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); + /*<>*/ if(len <= 5) + /*<>*/ return isortto(srcofs, dst, dstofs, len); var l1 = len / 2 | 0, l2 = len - l1 | 0; - /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); - /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge + /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); + /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); + /*<>*/ return merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ } + /*<>*/ } var l = a.length - 1; - if(l <= 5) /*<>*/ return isortto(0, a, 0, l); - /*<>*/ var + if(l <= 5) /*<>*/ return isortto(0, a, 0, l); + /*<>*/ var l1 = l / 2 | 0, l2 = l - l1 | 0, - /*<>*/ t = - /*<>*/ caml_make_vect(l2, caml_check_bound(a, 0)[1]); - /*<>*/ sortto(l1, t, 0, l2); - /*<>*/ sortto(0, a, l2, l1); - /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); - /*<>*/ } + /*<>*/ t = + /*<>*/ caml_make_vect(l2, caml_check_bound(a, 0)[1]); + /*<>*/ sortto(l1, t, 0, l2); + /*<>*/ sortto(0, a, l2, l1); + /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); + /*<>*/ } function to_seq(a){ function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _j_ = i + 1 | 0; - /*<>*/ return [0, + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _j_ = i + 1 | 0; + /*<>*/ return [0, x, function(_k_){ /*<>*/ return aux(_j_, _k_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _h_ = 0; - /*<>*/ return function(_i_){ + /*<>*/ } + /*<>*/ /*<>*/ var _h_ = 0; + /*<>*/ return function(_i_){ /*<>*/ return aux(_h_, _i_);}; - /*<>*/ } + /*<>*/ } function to_seqi(a){ function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _f_ = i + 1 | 0; - /*<>*/ return [0, + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _f_ = i + 1 | 0; + /*<>*/ return [0, [0, i, x], function(_g_){ /*<>*/ return aux(_f_, _g_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _d_ = 0; - /*<>*/ return function(_e_){ + /*<>*/ } + /*<>*/ /*<>*/ var _d_ = 0; + /*<>*/ return function(_e_){ /*<>*/ return aux(_d_, _e_);}; - /*<>*/ } + /*<>*/ } function of_seq(i$2){ - /*<>*/ var _b_ = 0; + /*<>*/ var _b_ = 0; function _c_(acc, x){ - /*<>*/ return [0, x, acc]; - /*<>*/ } - /*<>*/ /*<>*/ var - l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); - if(! l) /*<>*/ return [0]; - /*<>*/ var + /*<>*/ return [0, x, acc]; + /*<>*/ } + /*<>*/ /*<>*/ var + l = /*<>*/ caml_call3(Stdlib_Seq[5], _c_, _b_, i$2); + if(! l) /*<>*/ return [0]; + /*<>*/ var tl = l[2], hd = l[1], - /*<>*/ len = list_length(0, l), - /*<>*/ a = - /*<>*/ caml_make_vect(len, hd), - /*<>*/ i$1 = len - 2 | 0, + /*<>*/ len = list_length(0, l), + /*<>*/ a = + /*<>*/ caml_make_vect(len, hd), + /*<>*/ i$1 = len - 2 | 0, i = i$1, param = tl; for(;;){ - if(! param) /*<>*/ return a; + if(! param) /*<>*/ return a; var tl$0 = param[2], hd$0 = param[1]; - /*<>*/ a[1 + i] = hd$0; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, + /*<>*/ a[1 + i] = hd$0; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, i = i$0, param = tl$0; } - /*<>*/ } + /*<>*/ } var Stdlib_Array = [0, @@ -7644,7 +8138,9 @@ iter, iteri, map, + map_inplace, mapi, + mapi_inplace, fold_left, fold_left_map, fold_right, @@ -7657,7 +8153,9 @@ mem, memq, find_opt, + find_index, find_map, + find_mapi, split, combine, sort, @@ -7673,7 +8171,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Float -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Seq +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Seq (function (globalThis){ "use strict"; @@ -7686,6 +8184,7 @@ caml_float_compare = runtime.caml_float_compare, caml_floatarray_blit = runtime.caml_floatarray_blit, caml_floatarray_create = runtime.caml_floatarray_create, + caml_hash = runtime.caml_hash, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_nextafter_float = runtime.caml_nextafter_float, caml_signbit_float = runtime.caml_signbit_float, @@ -7705,7 +8204,7 @@ ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); } - var + /*<>*/ var global_data = runtime.caml_get_global_data(), Stdlib_Seq = global_data.Stdlib__Seq, Stdlib_List = global_data.Stdlib__List, @@ -7714,7 +8213,10 @@ infinity = Stdlib[22], neg_infinity = Stdlib[23], nan = Stdlib[24], - _b_ = [0, cst_float_ml, 395, 6], + /*<>*/ signaling_nan = + /*<>*/ runtime.caml_int64_float_of_bits + (runtime.caml_int64_create_lo_mi_hi(1, 0, 32752)), + _b_ = [0, cst_float_ml, 458, 6], cst_Float_Array_map2_arrays_mu = "Float.Array.map2: arrays must have the same length", cst_Float_Array_iter2_arrays_m = @@ -7723,7 +8225,7 @@ cst_Float_array_blit$0 = cst_Float_array_blit$1, cst_Float_Array_fill = "Float.Array.fill", cst_Float_Array_sub = "Float.Array.sub", - _a_ = [0, cst_float_ml, 222, 14], + _a_ = [0, cst_float_ml, 228, 14], cst_Float_Array_concat = "Float.Array.concat", cst_Float_Array_init = "Float.Array.init", cst_Stdlib_Float_Array_Bottom = "Stdlib.Float.Array.Bottom", @@ -7731,14 +8233,14 @@ one = 1., minus_one = -1.; function is_finite(x){ - /*<>*/ return x - x == 0. ? 1 : 0; - /*<>*/ } + /*<>*/ return x - x == 0. ? 1 : 0; + /*<>*/ } function is_infinite(x){ - /*<>*/ return 1. / x == 0. ? 1 : 0; - /*<>*/ } + /*<>*/ return 1. / x == 0. ? 1 : 0; + /*<>*/ } function is_nan(x){ - /*<>*/ return x != x ? 1 : 0; - /*<>*/ } + /*<>*/ return x != x ? 1 : 0; + /*<>*/ } var max_float = Stdlib[25], min_float = Stdlib[26], @@ -7747,34 +8249,22 @@ to_string = Stdlib[35], pi = 3.141592653589793; function is_integer(x){ - /*<>*/ var - _aq_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; - return _aq_ ? is_finite(x) : _aq_; - /*<>*/ } + /*<>*/ var + _aw_ = x == /*<>*/ runtime.caml_trunc_float(x) ? 1 : 0; + return _aw_ ? is_finite(x) : _aw_; + /*<>*/ } function succ(x){ - /*<>*/ return /*<>*/ caml_nextafter_float + /*<>*/ return /*<>*/ caml_nextafter_float (x, infinity); - /*<>*/ } + /*<>*/ } function pred(x){ - /*<>*/ return /*<>*/ caml_nextafter_float + /*<>*/ return /*<>*/ caml_nextafter_float (x, neg_infinity); - /*<>*/ } + /*<>*/ } function equal(x, y){ - /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; - /*<>*/ } + /*<>*/ return 0 === caml_float_compare(x, y) ? 1 : 0; + /*<>*/ } function min(x, y){ - /*<>*/ a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return x != x ? x : y; - } - /*<>*/ return y != y ? y : x; - /*<>*/ } - function max(x, y){ /*<>*/ a: if(! (x < y)){ /*<>*/ if @@ -7782,38 +8272,38 @@ /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) break a; - /*<>*/ return y != y ? y : x; + /*<>*/ return x != x ? x : y; } - /*<>*/ return x != x ? x : y; + /*<>*/ return y != y ? y : x; /*<>*/ } + function max(x, y){ + /*<>*/ a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return y != y ? y : x; + } + /*<>*/ return x != x ? x : y; + /*<>*/ } function min_max(x, y){ - /*<>*/ if(x == x && y == y){ + /*<>*/ if(x == x && y == y){ a: if(! (x < y)){ - /*<>*/ if + /*<>*/ if (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) break a; - /*<>*/ return [0, y, x]; + /*<>*/ return [0, y, x]; } - /*<>*/ return [0, x, y]; + /*<>*/ return [0, x, y]; } - /*<>*/ return [0, nan, nan]; - /*<>*/ } + /*<>*/ return [0, nan, nan]; + /*<>*/ } function min_num(x, y){ - /*<>*/ a: - if(! (x < y)){ - /*<>*/ if - (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) - break a; - /*<>*/ return y != y ? x : y; - } - /*<>*/ return x != x ? y : x; - /*<>*/ } - function max_num(x, y){ /*<>*/ a: if(! (x < y)){ /*<>*/ if @@ -7821,99 +8311,115 @@ /*<>*/ caml_signbit_float(y) && /*<>*/ caml_signbit_float(x)) break a; - /*<>*/ return x != x ? y : x; + /*<>*/ return y != y ? x : y; } - /*<>*/ return y != y ? x : y; + /*<>*/ return x != x ? y : x; /*<>*/ } + function max_num(x, y){ + /*<>*/ a: + if(! (x < y)){ + /*<>*/ if + (! + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) + break a; + /*<>*/ return x != x ? y : x; + } + /*<>*/ return y != y ? x : y; + /*<>*/ } function min_max_num(x, y){ - /*<>*/ if(x != x) - /*<>*/ return [0, y, y]; - /*<>*/ if(y != y) - /*<>*/ return [0, x, x]; + /*<>*/ if(x != x) + /*<>*/ return [0, y, y]; + /*<>*/ if(y != y) + /*<>*/ return [0, x, x]; a: if(! (x < y)){ - /*<>*/ if + /*<>*/ if (! - /*<>*/ caml_signbit_float(y) - && /*<>*/ caml_signbit_float(x)) + /*<>*/ caml_signbit_float(y) + && /*<>*/ caml_signbit_float(x)) break a; - /*<>*/ return [0, y, x]; + /*<>*/ return [0, y, x]; } - /*<>*/ return [0, x, y]; - /*<>*/ } + /*<>*/ return [0, x, y]; + /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } function hash(x){ - /*<>*/ return /*<>*/ runtime.caml_hash + /*<>*/ return /*<>*/ caml_hash (10, 100, 0, x); - /*<>*/ } + /*<>*/ } function unsafe_fill(a, ofs, len, v){ - /*<>*/ var _ao_ = (ofs + len | 0) - 1 | 0; - if(_ao_ >= ofs){ + /*<>*/ var _au_ = (ofs + len | 0) - 1 | 0; + if(_au_ >= ofs){ var i = ofs; for(;;){ - /*<>*/ a[1 + i] = v; - /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; - if(_ao_ === i) break; - var i = _ap_; + /*<>*/ a[1 + i] = v; + /*<>*/ /*<>*/ var _av_ = i + 1 | 0; + if(_au_ === i) break; + var i = _av_; } } return 0; - /*<>*/ } + /*<>*/ } function check(a, ofs, len, msg){ - /*<>*/ var _ak_ = ofs < 0 ? 1 : 0; - if(_ak_) - var _al_ = _ak_; + /*<>*/ var _aq_ = ofs < 0 ? 1 : 0; + if(_aq_) + var _ar_ = _aq_; else{ - var _am_ = len < 0 ? 1 : 0; - if(_am_) - var _al_ = _am_; + var _as_ = len < 0 ? 1 : 0; + if(_as_) + var _ar_ = _as_; else var - _an_ = (ofs + len | 0) < 0 ? 1 : 0, - _al_ = _an_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); + _at_ = (ofs + len | 0) < 0 ? 1 : 0, + _ar_ = _at_ || (a.length - 1 < (ofs + len | 0) ? 1 : 0); } - return _al_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _al_; - /*<>*/ } + return _ar_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _ar_; + /*<>*/ } function make(n, v){ - /*<>*/ /*<>*/ var - result = /*<>*/ caml_floatarray_create(n); - /*<>*/ unsafe_fill(result, 0, n, v); - /*<>*/ return result; - /*<>*/ } + /*<>*/ /*<>*/ var + result = /*<>*/ caml_floatarray_create(n); + /*<>*/ unsafe_fill(result, 0, n, v); + /*<>*/ return result; + /*<>*/ } function init(l, f){ - /*<>*/ if(0 > l) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(0 > l) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_init); - /*<>*/ var - /*<>*/ res = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _ai_ = l - 1 | 0, - /*<>*/ _ah_ = 0; - if(_ai_ >= 0){ - var i = _ah_; + /*<>*/ var + /*<>*/ res = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _ao_ = l - 1 | 0, + /*<>*/ _an_ = 0; + if(_ao_ >= 0){ + var i = _an_; for(;;){ - /*<>*/ res[1 + i] = - /*<>*/ caml_call1(f, i); - /*<>*/ /*<>*/ var _aj_ = i + 1 | 0; - if(_ai_ === i) break; - var i = _aj_; + /*<>*/ res[1 + i] = + /*<>*/ caml_call1(f, i); + /*<>*/ /*<>*/ var _ap_ = i + 1 | 0; + if(_ao_ === i) break; + var i = _ap_; } } - /*<>*/ return res; - /*<>*/ } + /*<>*/ return res; + /*<>*/ } function append(a1, a2){ - /*<>*/ var + /*<>*/ var l1 = a1.length - 1, - /*<>*/ l2 = a2.length - 1, - /*<>*/ result = - /*<>*/ caml_floatarray_create(l1 + l2 | 0); - /*<>*/ /*<>*/ caml_floatarray_blit + /*<>*/ l2 = a2.length - 1, + /*<>*/ result = + /*<>*/ caml_floatarray_create(l1 + l2 | 0); + /*<>*/ /*<>*/ caml_floatarray_blit (a1, 0, result, 0, l1); - /*<>*/ /*<>*/ caml_floatarray_blit + /*<>*/ /*<>*/ caml_floatarray_blit (a2, 0, result, l1, l2); - /*<>*/ return result; - /*<>*/ } + /*<>*/ return result; + /*<>*/ } function concat(l){ - /*<>*/ var acc = 0, param = l; + /*<>*/ var acc = 0, param = l; for(;;) if(param) var @@ -7923,332 +8429,412 @@ acc$0 = acc <= x ? x - : /*<>*/ caml_call1 + : /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_concat), acc = acc$0, param = tl; else{ - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_floatarray_create(acc), + /*<>*/ var + /*<>*/ result = + /*<>*/ caml_floatarray_create(acc), l$0 = l, i = 0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(! l$0){ - if(i === acc) /*<>*/ return result; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + if(i === acc) /*<>*/ return result; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); } - /*<>*/ var + /*<>*/ var tl$0 = l$0[2], hd$0 = l$0[1], - /*<>*/ hlen = hd$0.length - 1; - /*<>*/ /*<>*/ caml_floatarray_blit + /*<>*/ hlen = hd$0.length - 1; + /*<>*/ /*<>*/ caml_floatarray_blit (hd$0, 0, result, i, hlen); var i$0 = i + hlen | 0, l$0 = tl$0, i = i$0; } } - /*<>*/ } + /*<>*/ } function sub(a, ofs, len){ - /*<>*/ check(a, ofs, len, cst_Float_Array_sub); - /*<>*/ /*<>*/ var - result = /*<>*/ caml_floatarray_create(len); - /*<>*/ /*<>*/ caml_floatarray_blit + /*<>*/ check(a, ofs, len, cst_Float_Array_sub); + /*<>*/ /*<>*/ var + result = /*<>*/ caml_floatarray_create(len); + /*<>*/ /*<>*/ caml_floatarray_blit (a, ofs, result, 0, len); - /*<>*/ return result; - /*<>*/ } + /*<>*/ return result; + /*<>*/ } function copy(a){ - /*<>*/ var + /*<>*/ var l = a.length - 1, - /*<>*/ result = - /*<>*/ caml_floatarray_create(l); - /*<>*/ /*<>*/ caml_floatarray_blit + /*<>*/ result = + /*<>*/ caml_floatarray_create(l); + /*<>*/ /*<>*/ caml_floatarray_blit (a, 0, result, 0, l); - /*<>*/ return result; - /*<>*/ } + /*<>*/ return result; + /*<>*/ } function fill(a, ofs, len, v){ - /*<>*/ check(a, ofs, len, cst_Float_Array_fill); - /*<>*/ return unsafe_fill(a, ofs, len, v); - /*<>*/ } + /*<>*/ check(a, ofs, len, cst_Float_Array_fill); + /*<>*/ return unsafe_fill(a, ofs, len, v); + /*<>*/ } function blit(src, sofs, dst, dofs, len){ - /*<>*/ check(src, sofs, len, cst_Float_array_blit); - /*<>*/ check(dst, dofs, len, cst_Float_array_blit$0); - /*<>*/ return /*<>*/ caml_floatarray_blit + /*<>*/ check(src, sofs, len, cst_Float_array_blit); + /*<>*/ check(dst, dofs, len, cst_Float_array_blit$0); + /*<>*/ return /*<>*/ caml_floatarray_blit (src, sofs, dst, dofs, len); - /*<>*/ } + /*<>*/ } function to_list(a){ - /*<>*/ function _af_(_ag_){ - /*<>*/ return a[1 + _ag_]; + /*<>*/ function _al_(_am_){ + /*<>*/ return a[1 + _am_]; } - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[10], a.length - 1, _af_); - /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[11], a.length - 1, _al_); + /*<>*/ } function of_list(l){ - /*<>*/ var - /*<>*/ result = - /*<>*/ caml_floatarray_create - ( /*<>*/ caml_call1(Stdlib_List[1], l)), + /*<>*/ var + /*<>*/ result = + /*<>*/ caml_floatarray_create + ( /*<>*/ caml_call1(Stdlib_List[1], l)), i = 0, l$0 = l; - /*<>*/ for(;;){ - if(! l$0) /*<>*/ return result; + /*<>*/ for(;;){ + if(! l$0) /*<>*/ return result; var t = l$0[2], h = l$0[1]; - /*<>*/ result[1 + i] = h; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ result[1 + i] = h; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0, l$0 = t; } - /*<>*/ } + /*<>*/ } function iter(f, a){ - /*<>*/ var - _ad_ = a.length - 1 - 1 | 0, - /*<>*/ _ac_ = 0; - if(_ad_ >= 0){ - var i = _ac_; + /*<>*/ var + _aj_ = a.length - 1 - 1 | 0, + /*<>*/ _ai_ = 0; + if(_aj_ >= 0){ + var i = _ai_; for(;;){ - /*<>*/ /*<>*/ caml_call1 + /*<>*/ /*<>*/ caml_call1 (f, a[1 + i]); - /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; - if(_ad_ === i) break; - var i = _ae_; + /*<>*/ /*<>*/ var _ak_ = i + 1 | 0; + if(_aj_ === i) break; + var i = _ak_; } } return 0; - /*<>*/ } + /*<>*/ } function iter2(f, a, b){ - /*<>*/ if(a.length - 1 !== b.length - 1) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(a.length - 1 !== b.length - 1) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Float_Array_iter2_arrays_m); - /*<>*/ var + /*<>*/ var + _ag_ = a.length - 1 - 1 | 0, + /*<>*/ _af_ = 0; + if(_ag_ >= 0){ + var i = _af_; + for(;;){ + /*<>*/ /*<>*/ caml_call2 + (f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var _ah_ = i + 1 | 0; + if(_ag_ === i) break; + var i = _ah_; + } + } + return 0; + /*<>*/ } + function map(f, a){ + /*<>*/ var + l = a.length - 1, + /*<>*/ r = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _ad_ = l - 1 | 0, + /*<>*/ _ac_ = 0; + if(_ad_ >= 0){ + var i = _ac_; + for(;;){ + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _ae_ = i + 1 | 0; + if(_ad_ === i) break; + var i = _ae_; + } + } + /*<>*/ return r; + /*<>*/ } + function map_inplace(f, a){ + /*<>*/ var _aa_ = a.length - 1 - 1 | 0, - /*<>*/ _$_ = 0; + /*<>*/ _$_ = 0; if(_aa_ >= 0){ var i = _$_; for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; + /*<>*/ a[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _ab_ = i + 1 | 0; if(_aa_ === i) break; var i = _ab_; } } return 0; - /*<>*/ } - function map(f, a){ - /*<>*/ var - l = a.length - 1, - /*<>*/ r = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _Z_ = l - 1 | 0, - /*<>*/ _Y_ = 0; + /*<>*/ } + function map2(f, a, b){ + /*<>*/ var + la = a.length - 1, + /*<>*/ lb = b.length - 1; + if(la !== lb) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib[1], cst_Float_Array_map2_arrays_mu); + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_floatarray_create(la), + /*<>*/ _Z_ = la - 1 | 0, + /*<>*/ _Y_ = 0; if(_Z_ >= 0){ var i = _Y_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var ___ = i + 1 | 0; + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); + /*<>*/ /*<>*/ var ___ = i + 1 | 0; if(_Z_ === i) break; var i = ___; } } - /*<>*/ return r; - /*<>*/ } - function map2(f, a, b){ - /*<>*/ var - la = a.length - 1, - /*<>*/ lb = b.length - 1; - if(la !== lb) - /*<>*/ return /*<>*/ caml_call1 - (Stdlib[1], cst_Float_Array_map2_arrays_mu); - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_floatarray_create(la), - /*<>*/ _W_ = la - 1 | 0, - /*<>*/ _V_ = 0; + /*<>*/ return r; + /*<>*/ } + function iteri(f, a){ + /*<>*/ var + _W_ = a.length - 1 - 1 | 0, + /*<>*/ _V_ = 0; if(_W_ >= 0){ var i = _V_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, a[1 + i], b[1 + i]); - /*<>*/ /*<>*/ var _X_ = i + 1 | 0; + /*<>*/ /*<>*/ caml_call2 + (f, i, a[1 + i]); + /*<>*/ /*<>*/ var _X_ = i + 1 | 0; if(_W_ === i) break; var i = _X_; } } - /*<>*/ return r; - /*<>*/ } - function iteri(f, a){ - /*<>*/ var - _T_ = a.length - 1 - 1 | 0, - /*<>*/ _S_ = 0; + return 0; + /*<>*/ } + function mapi(f, a){ + /*<>*/ var + l = a.length - 1, + /*<>*/ r = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _T_ = l - 1 | 0, + /*<>*/ _S_ = 0; if(_T_ >= 0){ var i = _S_; for(;;){ - /*<>*/ /*<>*/ caml_call2 - (f, i, a[1 + i]); - /*<>*/ /*<>*/ var _U_ = i + 1 | 0; + /*<>*/ r[1 + i] = + /*<>*/ caml_call2(f, i, a[1 + i]); + /*<>*/ /*<>*/ var _U_ = i + 1 | 0; if(_T_ === i) break; var i = _U_; } } - return 0; - /*<>*/ } - function mapi(f, a){ - /*<>*/ var - l = a.length - 1, - /*<>*/ r = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _Q_ = l - 1 | 0, - /*<>*/ _P_ = 0; + /*<>*/ return r; + /*<>*/ } + function mapi_inplace(f, a){ + /*<>*/ var + _Q_ = a.length - 1 - 1 | 0, + /*<>*/ _P_ = 0; if(_Q_ >= 0){ var i = _P_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call2(f, i, a[1 + i]); - /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + /*<>*/ a[1 + i] = + /*<>*/ caml_call2(f, i, a[1 + i]); + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; if(_Q_ === i) break; var i = _R_; } } - /*<>*/ return r; - /*<>*/ } + return 0; + /*<>*/ } function fold_left(f, x, a){ - /*<>*/ var - /*<>*/ r = [0, x], + /*<>*/ var + /*<>*/ r = [0, x], _N_ = a.length - 1 - 1 | 0, - /*<>*/ _M_ = 0; + /*<>*/ _M_ = 0; if(_N_ >= 0){ var i = _M_; for(;;){ - r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; + r[1] = /*<>*/ caml_call2(f, r[1], a[1 + i]); + /*<>*/ /*<>*/ var _O_ = i + 1 | 0; if(_N_ === i) break; var i = _O_; } } return r[1]; - /*<>*/ } + /*<>*/ } function fold_right(f, a, x){ - /*<>*/ var - /*<>*/ r = [0, x], - /*<>*/ _K_ = a.length - 1 - 1 | 0; + /*<>*/ var + /*<>*/ r = [0, x], + /*<>*/ _K_ = a.length - 1 - 1 | 0; if(_K_ >= 0){ var i = _K_; for(;;){ - r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); - /*<>*/ /*<>*/ var _L_ = i - 1 | 0; + r[1] = /*<>*/ caml_call2(f, a[1 + i], r[1]); + /*<>*/ /*<>*/ var _L_ = i - 1 | 0; if(0 === i) break; var i = _L_; } } return r[1]; - /*<>*/ } + /*<>*/ } function exists(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - /*<>*/ if - ( /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function for_all(p, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 1; - /*<>*/ if - (! /*<>*/ caml_call1(p, a[1 + i])) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 1; + /*<>*/ if + (! /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function mem(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) - /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + if(0 === /*<>*/ caml_float_compare(a[1 + i], x)) + /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } + /*<>*/ } function mem_ieee(x, a){ - /*<>*/ var n = a.length - 1, i = 0; - /*<>*/ for(;;){ - if(i === n) /*<>*/ return 0; - if(x == a[1 + i]) /*<>*/ return 1; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + if(x == a[1 + i]) /*<>*/ return 1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, i = i$0; } - /*<>*/ } - /*<>*/ /*<>*/ var + /*<>*/ } + function find_opt(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var x = a[1 + i]; + /*<>*/ if( /*<>*/ caml_call1(p, x)) + /*<>*/ return [0, x]; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function find_index(p, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ if + ( /*<>*/ caml_call1(p, a[1 + i])) + /*<>*/ return [0, i]; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function find_map(f, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_call1(f, a[1 + i]); + if(r) /*<>*/ return r; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + function find_mapi(f, a){ + /*<>*/ var n = a.length - 1, i = 0; + /*<>*/ for(;;){ + if(i === n) /*<>*/ return 0; + /*<>*/ /*<>*/ var + r = /*<>*/ caml_call2(f, i, a[1 + i]); + if(r) /*<>*/ return r; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; + } + /*<>*/ } + /*<>*/ /*<>*/ var Bottom = [248, cst_Stdlib_Float_Array_Bottom, runtime.caml_fresh_oo_id(0)]; function sort(cmp, a){ function maxson(l, i){ - /*<>*/ var + /*<>*/ var i31 = ((i + i | 0) + i | 0) + 1 | 0, - /*<>*/ x = [0, i31]; + /*<>*/ x = [0, i31]; if((i31 + 2 | 0) < l){ if - ( /*<>*/ caml_call2 + ( /*<>*/ caml_call2 (cmp, - /*<>*/ caml_array_get(a, i31), - /*<>*/ caml_array_get(a, i31 + 1 | 0)) + /*<>*/ caml_array_get(a, i31), + /*<>*/ caml_array_get(a, i31 + 1 | 0)) < 0) x[1] = i31 + 1 | 0; if - ( /*<>*/ caml_call2 + ( /*<>*/ caml_call2 (cmp, - /*<>*/ caml_array_get(a, x[1]), - /*<>*/ caml_array_get(a, i31 + 2 | 0)) + /*<>*/ caml_array_get(a, x[1]), + /*<>*/ caml_array_get(a, i31 + 2 | 0)) < 0) x[1] = i31 + 2 | 0; return x[1]; } - /*<>*/ if + /*<>*/ if ((i31 + 1 | 0) < l && 0 > - /*<>*/ caml_call2 + /*<>*/ caml_call2 (cmp, - /*<>*/ caml_array_get(a, i31), - /*<>*/ caml_array_get(a, i31 + 1 | 0))) - /*<>*/ return i31 + 1 | 0; - if(i31 < l) /*<>*/ return i31; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ caml_array_get(a, i31), + /*<>*/ caml_array_get(a, i31 + 1 | 0))) + /*<>*/ return i31 + 1 | 0; + if(i31 < l) /*<>*/ return i31; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Bottom, i], 1); - /*<>*/ } + /*<>*/ } var l = a.length - 1, _E_ = ((l + 1 | 0) / 3 | 0) - 1 | 0; if(_E_ >= 0){ var i$6 = _E_; for(;;){ - /*<>*/ /*<>*/ var - e$1 = /*<>*/ caml_array_get(a, i$6); - /*<>*/ try{ + /*<>*/ /*<>*/ var + e$1 = /*<>*/ caml_array_get(a, i$6); + /*<>*/ try{ var i = i$6; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var j = maxson(l, i); - /*<>*/ if + /*<>*/ if (0 >= - /*<>*/ caml_call2 - (cmp, /*<>*/ caml_array_get(a, j), e$1)){ - /*<>*/ /*<>*/ caml_array_set + /*<>*/ caml_call2 + (cmp, /*<>*/ caml_array_get(a, j), e$1)){ + /*<>*/ /*<>*/ caml_array_set (a, i, e$1); break; } - /*<>*/ /*<>*/ caml_array_set - (a, i, /*<>*/ caml_array_get(a, j)); + /*<>*/ /*<>*/ caml_array_set + (a, i, /*<>*/ caml_array_get(a, j)); var i = j; } } @@ -8256,31 +8842,31 @@ var exn = caml_wrap_exception(exn$0); if(exn[1] !== Bottom) throw caml_maybe_attach_backtrace(exn, 0); var i$0 = exn[2]; - /*<>*/ /*<>*/ caml_array_set + /*<>*/ /*<>*/ caml_array_set (a, i$0, e$1); } - /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; + /*<>*/ /*<>*/ var _J_ = i$6 - 1 | 0; if(0 === i$6) break; var i$6 = _J_; } } - /*<>*/ /*<>*/ var _F_ = l - 1 | 0; + /*<>*/ /*<>*/ var _F_ = l - 1 | 0; if(_F_ >= 2){ var i$4 = _F_; a: for(;;){ - /*<>*/ /*<>*/ var - e$0 = /*<>*/ caml_array_get(a, i$4); - /*<>*/ /*<>*/ caml_array_set - (a, i$4, /*<>*/ caml_array_get(a, 0)); + /*<>*/ /*<>*/ var + e$0 = /*<>*/ caml_array_get(a, i$4); + /*<>*/ /*<>*/ caml_array_set + (a, i$4, /*<>*/ caml_array_get(a, 0)); var i$5 = 0; - /*<>*/ try{ + /*<>*/ try{ var i$1 = i$5; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var j$0 = maxson(i$4, i$1); - /*<>*/ /*<>*/ caml_array_set - (a, i$1, /*<>*/ caml_array_get(a, j$0)); + /*<>*/ /*<>*/ caml_array_set + (a, i$1, /*<>*/ caml_array_get(a, j$0)); var i$1 = j$0; } } @@ -8288,26 +8874,26 @@ var exn$0 = caml_wrap_exception(exn); if(exn$0[1] !== Bottom) throw caml_maybe_attach_backtrace(exn$0, 0); var i$2 = exn$0[2], i$3 = i$2; - /*<>*/ for(;;){ + /*<>*/ for(;;){ var father = (i$3 - 1 | 0) / 3 | 0; if(i$3 === father) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); - /*<>*/ if + /*<>*/ if (0 <= - /*<>*/ caml_call2 - (cmp, /*<>*/ caml_array_get(a, father), e$0)) - /*<>*/ /*<>*/ caml_array_set + /*<>*/ caml_call2 + (cmp, /*<>*/ caml_array_get(a, father), e$0)) + /*<>*/ /*<>*/ caml_array_set (a, i$3, e$0); else{ - /*<>*/ /*<>*/ caml_array_set - (a, i$3, /*<>*/ caml_array_get(a, father)); + /*<>*/ /*<>*/ caml_array_set + (a, i$3, /*<>*/ caml_array_get(a, father)); if(0 < father){var i$3 = father; continue;} - /*<>*/ /*<>*/ caml_array_set + /*<>*/ /*<>*/ caml_array_set (a, 0, e$0); } - /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; + /*<>*/ /*<>*/ var _I_ = i$4 - 1 | 0; if(2 === i$4) break a; var i$4 = _I_; break; @@ -8317,92 +8903,92 @@ } var _G_ = 1 < l ? 1 : 0; if(_G_){ - /*<>*/ /*<>*/ var - e = /*<>*/ caml_array_get(a, 1); - /*<>*/ /*<>*/ caml_array_set - (a, 1, /*<>*/ caml_array_get(a, 0)); - var _H_ = /*<>*/ caml_array_set(a, 0, e); + /*<>*/ /*<>*/ var + e = /*<>*/ caml_array_get(a, 1); + /*<>*/ /*<>*/ caml_array_set + (a, 1, /*<>*/ caml_array_get(a, 0)); + var _H_ = /*<>*/ caml_array_set(a, 0, e); } else var _H_ = _G_; - /*<>*/ return _H_; - /*<>*/ } + /*<>*/ return _H_; + /*<>*/ } function stable_sort(cmp, a){ function merge(src1ofs, src1len, src2, src2ofs, src2len, dst, dstofs){ - /*<>*/ var + /*<>*/ var src1r = src1ofs + src1len | 0, src2r = src2ofs + src2len | 0, - /*<>*/ s2$1 = - /*<>*/ caml_array_get(src2, src2ofs), - /*<>*/ s1$1 = - /*<>*/ caml_array_get(a, src1ofs), + /*<>*/ s2$1 = + /*<>*/ caml_array_get(src2, src2ofs), + /*<>*/ s1$1 = + /*<>*/ caml_array_get(a, src1ofs), i1 = src1ofs, s1 = s1$1, i2 = src2ofs, s2 = s2$1, d = dstofs; - /*<>*/ for(;;) - /*<>*/ if - (0 < /*<>*/ caml_call2(cmp, s1, s2)){ - /*<>*/ /*<>*/ caml_array_set + /*<>*/ for(;;) + /*<>*/ if + (0 < /*<>*/ caml_call2(cmp, s1, s2)){ + /*<>*/ /*<>*/ caml_array_set (dst, d, s2); - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var i2$0 = i2 + 1 | 0; if(i2$0 >= src2r) return blit(a, i1, dst, d + 1 | 0, src1r - i1 | 0); - /*<>*/ var - /*<>*/ d$0 = d + 1 | 0, - /*<>*/ s2$0 = - /*<>*/ caml_array_get(src2, i2$0), + /*<>*/ var + /*<>*/ d$0 = d + 1 | 0, + /*<>*/ s2$0 = + /*<>*/ caml_array_get(src2, i2$0), i2 = i2$0, s2 = s2$0, d = d$0; } else{ - /*<>*/ /*<>*/ caml_array_set + /*<>*/ /*<>*/ caml_array_set (dst, d, s1); - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var i1$0 = i1 + 1 | 0; if(i1$0 >= src1r) return blit(src2, i2, dst, d + 1 | 0, src2r - i2 | 0); - /*<>*/ var - /*<>*/ d$1 = d + 1 | 0, - /*<>*/ s1$0 = - /*<>*/ caml_array_get(a, i1$0), + /*<>*/ var + /*<>*/ d$1 = d + 1 | 0, + /*<>*/ s1$0 = + /*<>*/ caml_array_get(a, i1$0), i1 = i1$0, s1 = s1$0, d = d$1; } - /*<>*/ } + /*<>*/ } function isortto(srcofs, dst, dstofs, len){ - /*<>*/ var + /*<>*/ var _C_ = len - 1 | 0, - /*<>*/ _B_ = 0; + /*<>*/ _B_ = 0; if(_C_ >= 0){ var i = _B_; a: for(;;){ - /*<>*/ var - /*<>*/ e = - /*<>*/ caml_array_get(a, srcofs + i | 0), - /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; + /*<>*/ var + /*<>*/ e = + /*<>*/ caml_array_get(a, srcofs + i | 0), + /*<>*/ j = [0, (dstofs + i | 0) - 1 | 0]; for(;;){ - /*<>*/ if + /*<>*/ if (dstofs <= j[1] && 0 < - /*<>*/ caml_call2 - (cmp, /*<>*/ caml_array_get(dst, j[1]), e)){ - /*<>*/ /*<>*/ caml_array_set + /*<>*/ caml_call2 + (cmp, /*<>*/ caml_array_get(dst, j[1]), e)){ + /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, - /*<>*/ caml_array_get(dst, j[1])); + /*<>*/ caml_array_get(dst, j[1])); j[1] += -1; continue; } - /*<>*/ /*<>*/ caml_array_set + /*<>*/ /*<>*/ caml_array_set (dst, j[1] + 1 | 0, e); - /*<>*/ /*<>*/ var _D_ = i + 1 | 0; + /*<>*/ /*<>*/ var _D_ = i + 1 | 0; if(_C_ === i) break a; var i = _D_; break; @@ -8410,122 +8996,122 @@ } } return 0; - /*<>*/ } + /*<>*/ } function sortto(srcofs, dst, dstofs, len){ - /*<>*/ if(len <= 5) - /*<>*/ return isortto(srcofs, dst, dstofs, len); + /*<>*/ if(len <= 5) + /*<>*/ return isortto(srcofs, dst, dstofs, len); var l1 = len / 2 | 0, l2 = len - l1 | 0; - /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); - /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); - /*<>*/ return merge + /*<>*/ sortto(srcofs + l1 | 0, dst, dstofs + l1 | 0, l2); + /*<>*/ sortto(srcofs, a, srcofs + l2 | 0, l1); + /*<>*/ return merge (srcofs + l2 | 0, l1, dst, dstofs + l1 | 0, l2, dst, dstofs); - /*<>*/ } + /*<>*/ } var l = a.length - 1; - if(l <= 5) /*<>*/ return isortto(0, a, 0, l); - /*<>*/ var + if(l <= 5) /*<>*/ return isortto(0, a, 0, l); + /*<>*/ var l1 = l / 2 | 0, l2 = l - l1 | 0, - /*<>*/ t = - /*<>*/ caml_floatarray_create(l2); - /*<>*/ sortto(l1, t, 0, l2); - /*<>*/ sortto(0, a, l2, l1); - /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); - /*<>*/ } + /*<>*/ t = + /*<>*/ caml_floatarray_create(l2); + /*<>*/ sortto(l1, t, 0, l2); + /*<>*/ sortto(0, a, l2, l1); + /*<>*/ return merge(l2, l1, t, 0, l2, a, 0); + /*<>*/ } function to_seq(a){ function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _z_ = i + 1 | 0; - /*<>*/ return [0, + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _z_ = i + 1 | 0; + /*<>*/ return [0, x, function(_A_){ /*<>*/ return aux(_z_, _A_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _x_ = 0; - /*<>*/ return function(_y_){ + /*<>*/ } + /*<>*/ /*<>*/ var _x_ = 0; + /*<>*/ return function(_y_){ /*<>*/ return aux(_x_, _y_);}; - /*<>*/ } + /*<>*/ } function to_seqi(a){ function aux(i, param){ - /*<>*/ if(i >= a.length - 1) - /*<>*/ return 0; - /*<>*/ var - /*<>*/ x = a[1 + i], - /*<>*/ _v_ = i + 1 | 0; - /*<>*/ return [0, + /*<>*/ if(i >= a.length - 1) + /*<>*/ return 0; + /*<>*/ var + /*<>*/ x = a[1 + i], + /*<>*/ _v_ = i + 1 | 0; + /*<>*/ return [0, [0, i, x], function(_w_){ /*<>*/ return aux(_v_, _w_);}]; - /*<>*/ } - /*<>*/ /*<>*/ var _t_ = 0; - /*<>*/ return function(_u_){ + /*<>*/ } + /*<>*/ /*<>*/ var _t_ = 0; + /*<>*/ return function(_u_){ /*<>*/ return aux(_t_, _u_);}; - /*<>*/ } + /*<>*/ } function of_seq(i$2){ - /*<>*/ var _r_ = 0; + /*<>*/ var _r_ = 0; function _s_(acc, x){ - /*<>*/ return [0, x, acc]; - /*<>*/ } - /*<>*/ var - /*<>*/ l = - /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), - /*<>*/ len = - /*<>*/ caml_call1(Stdlib_List[1], l), - /*<>*/ a = - /*<>*/ caml_floatarray_create(len), - /*<>*/ i$1 = len - 1 | 0, + /*<>*/ return [0, x, acc]; + /*<>*/ } + /*<>*/ var + /*<>*/ l = + /*<>*/ caml_call3(Stdlib_Seq[5], _s_, _r_, i$2), + /*<>*/ len = + /*<>*/ caml_call1(Stdlib_List[1], l), + /*<>*/ a = + /*<>*/ caml_floatarray_create(len), + /*<>*/ i$1 = len - 1 | 0, i = i$1, param = l; for(;;){ - if(! param) /*<>*/ return a; + if(! param) /*<>*/ return a; var tl = param[2], hd = param[1]; - /*<>*/ a[1 + i] = hd; - /*<>*/ var - /*<>*/ i$0 = i - 1 | 0, + /*<>*/ a[1 + i] = hd; + /*<>*/ var + /*<>*/ i$0 = i - 1 | 0, i = i$0, param = tl; } - /*<>*/ } + /*<>*/ } function map_to_array(f, a){ - /*<>*/ var l = a.length - 1; - /*<>*/ if(0 === l) /*<>*/ return [0]; - /*<>*/ var - /*<>*/ r = - /*<>*/ runtime.caml_make_vect - (l, /*<>*/ caml_call1(f, a[1])), - /*<>*/ _p_ = l - 1 | 0, - /*<>*/ _o_ = 1; + /*<>*/ var l = a.length - 1; + /*<>*/ if(0 === l) /*<>*/ return [0]; + /*<>*/ var + /*<>*/ r = + /*<>*/ runtime.caml_make_vect + (l, /*<>*/ caml_call1(f, a[1])), + /*<>*/ _p_ = l - 1 | 0, + /*<>*/ _o_ = 1; if(_p_ >= 1){ var i = _o_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _q_ = i + 1 | 0; + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _q_ = i + 1 | 0; if(_p_ === i) break; var i = _q_; } } - /*<>*/ return r; - /*<>*/ } + /*<>*/ return r; + /*<>*/ } function map_from_array(f, a){ - /*<>*/ var + /*<>*/ var l = a.length - 1, - /*<>*/ r = - /*<>*/ caml_floatarray_create(l), - /*<>*/ _m_ = l - 1 | 0, - /*<>*/ _l_ = 0; + /*<>*/ r = + /*<>*/ caml_floatarray_create(l), + /*<>*/ _m_ = l - 1 | 0, + /*<>*/ _l_ = 0; if(_m_ >= 0){ var i = _l_; for(;;){ - /*<>*/ r[1 + i] = - /*<>*/ caml_call1(f, a[1 + i]); - /*<>*/ /*<>*/ var _n_ = i + 1 | 0; + /*<>*/ r[1 + i] = + /*<>*/ caml_call1(f, a[1 + i]); + /*<>*/ /*<>*/ var _n_ = i + 1 | 0; if(_m_ === i) break; var i = _n_; } } - /*<>*/ return r; - /*<>*/ } + /*<>*/ return r; + /*<>*/ } var _c_ = caml_floatarray_create, _d_ = caml_array_set, @@ -8549,7 +9135,9 @@ iter, iteri, map, + map_inplace, mapi, + mapi_inplace, fold_left, fold_right, iter2, @@ -8558,6 +9146,10 @@ exists, mem, mem_ieee, + find_opt, + find_index, + find_map, + find_mapi, sort, stable_sort, stable_sort, @@ -8579,6 +9171,8 @@ infinity, neg_infinity, nan, + signaling_nan, + nan, pi, max_float, min_float, @@ -8597,6 +9191,7 @@ min_num, max_num, min_max_num, + seeded_hash, hash, [0, function(_j_){ /*<>*/ return _j_.length - 1;}, @@ -8616,7 +9211,9 @@ iter, iteri, map, + map_inplace, mapi, + mapi_inplace, fold_left, fold_right, iter2, @@ -8625,6 +9222,10 @@ exists, mem, mem_ieee, + find_opt, + find_index, + find_map, + find_mapi, sort, stable_sort, stable_sort, @@ -8634,19 +9235,20 @@ map_to_array, map_from_array], _f_]; - runtime.caml_register_global(22, Stdlib_Float, "Stdlib__Float"); + runtime.caml_register_global(23, Stdlib_Float, "Stdlib__Float"); return; /*<>*/ } (globalThis)); //# unitInfo: Provides: Stdlib__Int32 -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Sys +//# unitInfo: Requires: Stdlib, Stdlib__Sys (function (globalThis){ "use strict"; var runtime = globalThis.jsoo_runtime, caml_greaterequal = runtime.caml_greaterequal, + caml_hash = runtime.caml_hash, caml_int_compare = runtime.caml_int_compare, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_mul = runtime.caml_mul, @@ -8752,6 +9354,14 @@ - /*<>*/ caml_mul(unsigned_div(n, d), d) | 0; /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } var Stdlib_Int32 = [0, @@ -8773,7 +9383,9 @@ unsigned_compare, equal, min, - max]; + max, + seeded_hash, + hash]; runtime.caml_register_global(14, Stdlib_Int32, "Stdlib__Int32"); return; /*<>*/ } @@ -8787,6 +9399,7 @@ var runtime = globalThis.jsoo_runtime, caml_greaterequal = runtime.caml_greaterequal, + caml_hash = runtime.caml_hash, caml_int64_compare = runtime.caml_int64_compare, caml_int64_mul = runtime.caml_int64_mul, caml_int64_sub = runtime.caml_int64_sub, @@ -8895,6 +9508,14 @@ /*<>*/ return /*<>*/ caml_int64_sub (n, /*<>*/ caml_int64_mul(unsigned_div(n, d), d)); /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } var Stdlib_Int64 = [0, @@ -8916,7 +9537,9 @@ unsigned_compare, equal, min, - max]; + max, + seeded_hash, + hash]; runtime.caml_register_global(11, Stdlib_Int64, "Stdlib__Int64"); return; /*<>*/ } @@ -8930,6 +9553,7 @@ var runtime = globalThis.jsoo_runtime, caml_greaterequal = runtime.caml_greaterequal, + caml_hash = runtime.caml_hash, caml_int_compare = runtime.caml_int_compare, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_mul = runtime.caml_mul, @@ -9026,6 +9650,14 @@ - /*<>*/ caml_mul(unsigned_div(n, d), d) | 0; /*<>*/ } + function seeded_hash(seed, x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, seed, x); + /*<>*/ } + function hash(x){ + /*<>*/ return /*<>*/ caml_hash + (10, 100, 0, x); + /*<>*/ } var Stdlib_Nativeint = [0, @@ -9048,7 +9680,9 @@ unsigned_compare, equal, min, - max]; + max, + seeded_hash, + hash]; runtime.caml_register_global(12, Stdlib_Nativeint, "Stdlib__Nativeint"); return; /*<>*/ } @@ -9640,7 +10274,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Set -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__List, Stdlib__Seq +//# unitInfo: Requires: Stdlib, Stdlib__List, Stdlib__Seq (function (globalThis){ "use strict"; @@ -9672,7 +10306,7 @@ cst_Set_remove_min_elt = "Set.remove_min_elt", _a_ = [0, 0, 0, 0], _b_ = [0, 0, 0], - _c_ = [0, "set.ml", 570, 18], + _c_ = [0, "set.ml", 571, 18], cst_Set_bal = cst_Set_bal$3, cst_Set_bal$0 = cst_Set_bal$3, cst_Set_bal$1 = cst_Set_bal$3, @@ -9681,100 +10315,100 @@ [0, function(Ord){ function height(param){ - /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ if(! param) /*<>*/ return 0; var h = param[4]; - /*<>*/ return h; - /*<>*/ } + /*<>*/ return h; + /*<>*/ } function create(l, v, r){ - /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; - /*<>*/ if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; + /*<>*/ if(r) var h$0 = r[4], hr = h$0; else var hr = 0; var _Z_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, v, r, _Z_]; - /*<>*/ } + /*<>*/ return [0, l, v, r, _Z_]; + /*<>*/ } function bal(l, v, r){ - /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; - /*<>*/ if(r) + /*<>*/ if(l) var h = l[4], hl = h; else var hl = 0; + /*<>*/ if(r) var h$0 = r[4], hr = h$0; else var hr = 0; if((hr + 2 | 0) < hl){ if(! l) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Set_bal$0); - /*<>*/ var + /*<>*/ var lr = l[3], lv = l[2], ll = l[1], - /*<>*/ _U_ = height(lr); + /*<>*/ _U_ = height(lr); if(_U_ <= height(ll)) - /*<>*/ return create(ll, lv, create(lr, v, r)); + /*<>*/ return create(ll, lv, create(lr, v, r)); if(! lr) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Set_bal); - /*<>*/ var + /*<>*/ var lrr = lr[3], lrv = lr[2], lrl = lr[1], - /*<>*/ _V_ = create(lrr, v, r); - /*<>*/ return create(create(ll, lv, lrl), lrv, _V_); + /*<>*/ _V_ = create(lrr, v, r); + /*<>*/ return create(create(ll, lv, lrl), lrv, _V_); } if((hl + 2 | 0) >= hr){ var _Y_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, v, r, _Y_]; + /*<>*/ return [0, l, v, r, _Y_]; } if(! r) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Set_bal$2); - /*<>*/ var + /*<>*/ var rr = r[3], rv = r[2], rl = r[1], - /*<>*/ _W_ = height(rl); + /*<>*/ _W_ = height(rl); if(_W_ <= height(rr)) - /*<>*/ return create(create(l, v, rl), rv, rr); + /*<>*/ return create(create(l, v, rl), rv, rr); if(! rl) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Set_bal$1); - /*<>*/ var + /*<>*/ var rlr = rl[3], rlv = rl[2], rll = rl[1], - /*<>*/ _X_ = create(rlr, rv, rr); - /*<>*/ return create(create(l, v, rll), rlv, _X_); - /*<>*/ } + /*<>*/ _X_ = create(rlr, rv, rr); + /*<>*/ return create(create(l, v, rll), rlv, _X_); + /*<>*/ } function add(x, t){ - /*<>*/ if(! t) /*<>*/ return [0, 0, x, 0, 1]; - /*<>*/ var + /*<>*/ if(! t) /*<>*/ return [0, 0, x, 0, 1]; + /*<>*/ var r = t[3], v = t[2], l = t[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return t; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return t; if(0 <= c){ - /*<>*/ /*<>*/ var rr = add(x, r); + /*<>*/ /*<>*/ var rr = add(x, r); return r === rr ? t : bal(l, v, rr); } - /*<>*/ /*<>*/ var ll = add(x, l); + /*<>*/ /*<>*/ var ll = add(x, l); return l === ll ? t : bal(ll, v, r); } function singleton(x){ - /*<>*/ return [0, 0, x, 0, 1]; - /*<>*/ } + /*<>*/ return [0, 0, x, 0, 1]; + /*<>*/ } function add_min_element(x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(x); + /*<>*/ if(! param) /*<>*/ return singleton(x); var r = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(add_min_element(x, l), v, r); + /*<>*/ return bal(add_min_element(x, l), v, r); } function add_max_element(x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(x); + /*<>*/ if(! param) /*<>*/ return singleton(x); var r = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(l, v, add_max_element(x, r)); + /*<>*/ return bal(l, v, add_max_element(x, r)); } function join(l, v, r){ - /*<>*/ if(! l) - /*<>*/ return add_min_element(v, r); - if(! r) /*<>*/ return add_max_element(v, l); + /*<>*/ if(! l) + /*<>*/ return add_min_element(v, r); + if(! r) /*<>*/ return add_max_element(v, l); var rh = r[4], rr = r[3], @@ -9792,140 +10426,140 @@ < rh ? bal(join(l, v, rl), rv, rr) : create(l, v, r); - /*<>*/ } + /*<>*/ } function min_elt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[1]; - if(! l){var v = param$0[2]; /*<>*/ return v;} + if(! l){var v = param$0[2]; /*<>*/ return v;} var param$0 = l; } - /*<>*/ } + /*<>*/ } function min_elt_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; var l = param$0[1]; - if(! l){var v = param$0[2]; /*<>*/ return [0, v];} + if(! l){var v = param$0[2]; /*<>*/ return [0, v];} var param$0 = l; } - /*<>*/ } + /*<>*/ } function max_elt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); if(! param$0[3]){ var v = param$0[2]; - /*<>*/ return v; + /*<>*/ return v; } var r = param$0[3], param$0 = r; } - /*<>*/ } + /*<>*/ } function max_elt_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; if(! param$0[3]){ var v = param$0[2]; - /*<>*/ return [0, v]; + /*<>*/ return [0, v]; } var r = param$0[3], param$0 = r; } - /*<>*/ } + /*<>*/ } function remove_min_elt(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Set_remove_min_elt); var l = param[1]; if(l){ var r = param[3], v = param[2]; - /*<>*/ return bal(remove_min_elt(l), v, r); + /*<>*/ return bal(remove_min_elt(l), v, r); } var r$0 = param[3]; - /*<>*/ return r$0; - /*<>*/ } + /*<>*/ return r$0; + /*<>*/ } function concat(t1, t2){ - /*<>*/ if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ /*<>*/ var + /*<>*/ if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ /*<>*/ var _T_ = remove_min_elt(t2); - /*<>*/ return join(t1, min_elt(t2), _T_); - /*<>*/ } + /*<>*/ return join(t1, min_elt(t2), _T_); + /*<>*/ } function split(x, param){ - /*<>*/ if(! param) /*<>*/ return _a_; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ var r = param[3], v = param[2], l = param[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, l, 1, r]; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, l, 1, r]; if(0 <= c){ - /*<>*/ var - /*<>*/ match = split(x, r), + /*<>*/ var + /*<>*/ match = split(x, r), rr = match[3], pres = match[2], lr = match[1]; - /*<>*/ return [0, join(l, v, lr), pres, rr]; + /*<>*/ return [0, join(l, v, lr), pres, rr]; } - /*<>*/ var - /*<>*/ match$0 = split(x, l), + /*<>*/ var + /*<>*/ match$0 = split(x, l), rl = match$0[3], pres$0 = match$0[2], ll = match$0[1]; - /*<>*/ return [0, ll, pres$0, join(rl, v, r)]; + /*<>*/ return [0, ll, pres$0, join(rl, v, r)]; } var empty = 0; function is_empty(param){ - /*<>*/ return param ? 0 : 1; - /*<>*/ } + /*<>*/ return param ? 0 : 1; + /*<>*/ } function mem(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var r = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v), + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v), _S_ = 0 === c ? 1 : 0; if(_S_) return _S_; var r$0 = 0 <= c ? r : l, param$0 = r$0; } } function remove(x, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var t2 = t[3], v = t[2], t1 = t[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c){ - if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ /*<>*/ var + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c){ + if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ /*<>*/ var _R_ = remove_min_elt(t2); - /*<>*/ return bal(t1, min_elt(t2), _R_); + /*<>*/ return bal(t1, min_elt(t2), _R_); } if(0 <= c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var rr = remove(x, t2); return t2 === rr ? t : bal(t1, v, rr); } - /*<>*/ /*<>*/ var ll = remove(x, t1); + /*<>*/ /*<>*/ var ll = remove(x, t1); return t1 === ll ? t : bal(ll, v, t2); } function union(s1, s2){ - /*<>*/ if(! s1) /*<>*/ return s2; - if(! s2) /*<>*/ return s1; + /*<>*/ if(! s1) /*<>*/ return s2; + if(! s2) /*<>*/ return s1; var h2 = s2[4], r2 = s2[3], @@ -9936,331 +10570,331 @@ v1 = s1[2], l1 = s1[1]; if(h2 <= h1){ - if(1 === h2) /*<>*/ return add(v2, s1); - /*<>*/ var - /*<>*/ match = split(v1, s2), + if(1 === h2) /*<>*/ return add(v2, s1); + /*<>*/ var + /*<>*/ match = split(v1, s2), r2$0 = match[3], l2$0 = match[1], - /*<>*/ _P_ = union(r1, r2$0); - /*<>*/ return join(union(l1, l2$0), v1, _P_); + /*<>*/ _P_ = union(r1, r2$0); + /*<>*/ return join(union(l1, l2$0), v1, _P_); } - if(1 === h1) /*<>*/ return add(v1, s2); - /*<>*/ var - /*<>*/ match$0 = split(v2, s1), + if(1 === h1) /*<>*/ return add(v1, s2); + /*<>*/ var + /*<>*/ match$0 = split(v2, s1), r1$0 = match$0[3], l1$0 = match$0[1], - /*<>*/ _Q_ = union(r1$0, r2); - /*<>*/ return join(union(l1$0, l2), v2, _Q_); - /*<>*/ } + /*<>*/ _Q_ = union(r1$0, r2); + /*<>*/ return join(union(l1$0, l2), v2, _Q_); + /*<>*/ } function inter(s1, s2){ - /*<>*/ if(! s1) /*<>*/ return 0; - if(! s2) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! s1) /*<>*/ return 0; + if(! s2) /*<>*/ return 0; + /*<>*/ var r1 = s1[3], v1 = s1[2], l1 = s1[1], - /*<>*/ _M_ = split(v1, s2), + /*<>*/ _M_ = split(v1, s2), l2 = _M_[1]; if(_M_[2]){ - /*<>*/ var + /*<>*/ var r2 = _M_[3], - /*<>*/ _N_ = inter(r1, r2); - /*<>*/ return join(inter(l1, l2), v1, _N_); + /*<>*/ _N_ = inter(r1, r2); + /*<>*/ return join(inter(l1, l2), v1, _N_); } - /*<>*/ var + /*<>*/ var r2$0 = _M_[3], - /*<>*/ _O_ = inter(r1, r2$0); - /*<>*/ return concat(inter(l1, l2), _O_); - /*<>*/ } + /*<>*/ _O_ = inter(r1, r2$0); + /*<>*/ return concat(inter(l1, l2), _O_); + /*<>*/ } function split_bis(x, param){ /*<>*/ if(! param) - /*<>*/ return [0, + /*<>*/ return [0, 0, function(param){ - /*<>*/ return 0; - /*<>*/ }]; - /*<>*/ var + /*<>*/ return 0; + /*<>*/ }]; + /*<>*/ var r = param[3], v = param[2], l = param[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return 0; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return 0; if(0 <= c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var match = split_bis(x, r); - if(! match) /*<>*/ return 0; + if(! match) /*<>*/ return 0; var rr = match[2], lr = match[1]; - /*<>*/ return [0, join(l, v, lr), rr]; + /*<>*/ return [0, join(l, v, lr), rr]; } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var match$0 = split_bis(x, l); - if(! match$0) /*<>*/ return 0; + if(! match$0) /*<>*/ return 0; var rl = match$0[2], ll = match$0[1]; - /*<>*/ return [0, + /*<>*/ return [0, ll, function(param){ - /*<>*/ return join(rl(0), v, r); - /*<>*/ }]; + /*<>*/ return join(rl(0), v, r); + /*<>*/ }]; } function disjoint(s1, s2){ - /*<>*/ var s1$0 = s1, s2$0 = s2; - /*<>*/ for(;;){ + /*<>*/ var s1$0 = s1, s2$0 = s2; + /*<>*/ for(;;){ if(s1$0 && s2$0){ var r1 = s1$0[3], v1 = s1$0[2], l1 = s1$0[1]; - if(s1$0 === s2$0) /*<>*/ return 0; - /*<>*/ /*<>*/ var + if(s1$0 === s2$0) /*<>*/ return 0; + /*<>*/ /*<>*/ var match = split_bis(v1, s2$0); - if(! match) /*<>*/ return 0; - /*<>*/ var + if(! match) /*<>*/ return 0; + /*<>*/ var r2 = match[2], l2 = match[1], - /*<>*/ _L_ = disjoint(l1, l2); - /*<>*/ if(! _L_) /*<>*/ return _L_; - /*<>*/ var - /*<>*/ s2$1 = r2(0), + /*<>*/ _L_ = disjoint(l1, l2); + /*<>*/ if(! _L_) /*<>*/ return _L_; + /*<>*/ var + /*<>*/ s2$1 = r2(0), s1$0 = r1, s2$0 = s2$1; continue; } - /*<>*/ return 1; + /*<>*/ return 1; } - /*<>*/ } + /*<>*/ } function diff(s1, s2){ - /*<>*/ if(! s1) /*<>*/ return 0; - if(! s2) /*<>*/ return s1; - /*<>*/ var + /*<>*/ if(! s1) /*<>*/ return 0; + if(! s2) /*<>*/ return s1; + /*<>*/ var r1 = s1[3], v1 = s1[2], l1 = s1[1], - /*<>*/ _I_ = split(v1, s2), + /*<>*/ _I_ = split(v1, s2), l2 = _I_[1]; if(_I_[2]){ - /*<>*/ var + /*<>*/ var r2 = _I_[3], - /*<>*/ _J_ = diff(r1, r2); - /*<>*/ return concat(diff(l1, l2), _J_); + /*<>*/ _J_ = diff(r1, r2); + /*<>*/ return concat(diff(l1, l2), _J_); } - /*<>*/ var + /*<>*/ var r2$0 = _I_[3], - /*<>*/ _K_ = diff(r1, r2$0); - /*<>*/ return join(diff(l1, l2), v1, _K_); - /*<>*/ } + /*<>*/ _K_ = diff(r1, r2$0); + /*<>*/ return join(diff(l1, l2), v1, _K_); + /*<>*/ } function cons_enum(s, e){ - /*<>*/ var s$0 = s, e$0 = e; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return e$0; - /*<>*/ var + /*<>*/ var s$0 = s, e$0 = e; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return e$0; + /*<>*/ var r = s$0[3], v = s$0[2], l = s$0[1], - /*<>*/ e$1 = [0, v, r, e$0], + /*<>*/ e$1 = [0, v, r, e$0], s$0 = l, e$0 = e$1; } - /*<>*/ } + /*<>*/ } function compare(s1, s2){ - /*<>*/ var - /*<>*/ e2$2 = cons_enum(s2, 0), - /*<>*/ e1$2 = cons_enum(s1, 0), + /*<>*/ var + /*<>*/ e2$2 = cons_enum(s2, 0), + /*<>*/ e1$2 = cons_enum(s1, 0), e1 = e1$2, e2 = e2$2; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(! e1) return e2 ? -1 : 0; - if(! e2) /*<>*/ return 1; - /*<>*/ var + if(! e2) /*<>*/ return 1; + /*<>*/ var e2$0 = e2[3], r2 = e2[2], v2 = e2[1], e1$0 = e1[3], r1 = e1[2], v1 = e1[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 !== c) /*<>*/ return c; - /*<>*/ var - /*<>*/ e2$1 = cons_enum(r2, e2$0), - /*<>*/ e1$1 = cons_enum(r1, e1$0), + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], v1, v2); + /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ var + /*<>*/ e2$1 = cons_enum(r2, e2$0), + /*<>*/ e1$1 = cons_enum(r1, e1$0), e1 = e1$1, e2 = e2$1; } - /*<>*/ } + /*<>*/ } function equal(s1, s2){ - /*<>*/ return 0 === compare(s1, s2) ? 1 : 0; - /*<>*/ } + /*<>*/ return 0 === compare(s1, s2) ? 1 : 0; + /*<>*/ } function subset(s1, s2){ - /*<>*/ var s1$0 = s1, s2$0 = s2; - /*<>*/ for(;;){ - if(! s1$0) /*<>*/ return 1; - if(! s2$0) /*<>*/ return 0; - /*<>*/ var + /*<>*/ var s1$0 = s1, s2$0 = s2; + /*<>*/ for(;;){ + if(! s1$0) /*<>*/ return 1; + if(! s2$0) /*<>*/ return 0; + /*<>*/ var r2 = s2$0[3], v2 = s2$0[2], l2 = s2$0[1], r1 = s1$0[3], v1 = s1$0[2], l1 = s1$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 === c){ - /*<>*/ /*<>*/ var + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], v1, v2); + /*<>*/ if(0 === c){ + /*<>*/ /*<>*/ var _F_ = subset(l1, l2); - /*<>*/ if(! _F_) /*<>*/ return _F_; + /*<>*/ if(! _F_) /*<>*/ return _F_; var s1$0 = r1, s2$0 = r2; } else if(0 <= c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _G_ = subset([0, 0, v1, r1, 0], r2); - /*<>*/ if(! _G_) /*<>*/ return _G_; + /*<>*/ if(! _G_) /*<>*/ return _G_; var s1$0 = l1; } else{ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _H_ = subset([0, l1, v1, 0, 0], l2); - /*<>*/ if(! _H_) /*<>*/ return _H_; + /*<>*/ if(! _H_) /*<>*/ return _H_; var s1$0 = r1; } } - /*<>*/ } + /*<>*/ } function iter(f, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var r = param$0[3], v = param$0[2], l = param$0[1]; - /*<>*/ iter(f, l); - /*<>*/ /*<>*/ caml_call1(f, v); + /*<>*/ iter(f, l); + /*<>*/ /*<>*/ caml_call1(f, v); var param$0 = r; } } function fold(f, s, accu){ - /*<>*/ var s$0 = s, accu$0 = accu; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return accu$0; - /*<>*/ var + /*<>*/ var s$0 = s, accu$0 = accu; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return accu$0; + /*<>*/ var r = s$0[3], v = s$0[2], l = s$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call2(f, v, fold(f, l, accu$0)), + /*<>*/ accu$1 = + /*<>*/ caml_call2(f, v, fold(f, l, accu$0)), s$0 = r, accu$0 = accu$1; } - /*<>*/ } + /*<>*/ } function for_all(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 1; - /*<>*/ var + if(! param$0) /*<>*/ return 1; + /*<>*/ var r = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ _C_ = - /*<>*/ caml_call1(p, v); - /*<>*/ if(_C_){ - /*<>*/ /*<>*/ var + /*<>*/ _C_ = + /*<>*/ caml_call1(p, v); + /*<>*/ if(_C_){ + /*<>*/ /*<>*/ var _D_ = for_all(p, l); - /*<>*/ if(_D_){var param$0 = r; continue;} + /*<>*/ if(_D_){var param$0 = r; continue;} var _E_ = _D_; } else var _E_ = _C_; - /*<>*/ return _E_; + /*<>*/ return _E_; } } function exists(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var r = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ _z_ = - /*<>*/ caml_call1(p, v); - /*<>*/ if(_z_) + /*<>*/ _z_ = + /*<>*/ caml_call1(p, v); + /*<>*/ if(_z_) var _A_ = _z_; else{ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _B_ = exists(p, l); - /*<>*/ if(! _B_){var param$0 = r; continue;} + /*<>*/ if(! _B_){var param$0 = r; continue;} var _A_ = _B_; } - /*<>*/ return _A_; + /*<>*/ return _A_; } } function filter(p, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var r = t[3], v = t[2], l = t[1], - /*<>*/ l$0 = filter(p, l), - /*<>*/ pv = /*<>*/ caml_call1(p, v), - /*<>*/ r$0 = filter(p, r); - /*<>*/ if(! pv) - /*<>*/ return concat(l$0, r$0); - if(l === l$0 && r === r$0) /*<>*/ return t; - /*<>*/ return join(l$0, v, r$0); + /*<>*/ l$0 = filter(p, l), + /*<>*/ pv = /*<>*/ caml_call1(p, v), + /*<>*/ r$0 = filter(p, r); + /*<>*/ if(! pv) + /*<>*/ return concat(l$0, r$0); + if(l === l$0 && r === r$0) /*<>*/ return t; + /*<>*/ return join(l$0, v, r$0); } function partition(p, param){ - /*<>*/ if(! param) /*<>*/ return _b_; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return _b_; + /*<>*/ var r = param[3], v = param[2], l = param[1], - /*<>*/ match = partition(p, l), + /*<>*/ match = partition(p, l), lf = match[2], lt = match[1], - /*<>*/ pv = /*<>*/ caml_call1(p, v), - /*<>*/ match$0 = partition(p, r), + /*<>*/ pv = /*<>*/ caml_call1(p, v), + /*<>*/ match$0 = partition(p, r), rf = match$0[2], rt = match$0[1]; - /*<>*/ if(pv){ - /*<>*/ /*<>*/ var + /*<>*/ if(pv){ + /*<>*/ /*<>*/ var _x_ = concat(lf, rf); - /*<>*/ return [0, join(lt, v, rt), _x_]; + /*<>*/ return [0, join(lt, v, rt), _x_]; } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _y_ = join(lf, v, rf); - /*<>*/ return [0, concat(lt, rt), _y_]; + /*<>*/ return [0, concat(lt, rt), _y_]; } function cardinal(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var r = param[3], l = param[1], - /*<>*/ _w_ = cardinal(r); + /*<>*/ _w_ = cardinal(r); return (cardinal(l) + 1 | 0) + _w_ | 0; - /*<>*/ } + /*<>*/ } function elements_aux(accu, param){ var accu$0 = accu, param$0 = param; for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var r = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ accu$1 = [0, v, elements_aux(accu$0, r)], + /*<>*/ accu$1 = [0, v, elements_aux(accu$0, r)], accu$0 = accu$1, param$0 = l; } } function elements(s){ - /*<>*/ return elements_aux(0, s); - /*<>*/ } + /*<>*/ return elements_aux(0, s); + /*<>*/ } function find(x, param){ var param$0 = param; for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - /*<>*/ var + /*<>*/ var r = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return v; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return v; var r$0 = 0 <= c ? r : l, param$0 = r$0; } } @@ -10268,17 +10902,17 @@ var param$1 = param$0; for(;;){ if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, param = l$0; for(;;){ - if(! param) /*<>*/ return v0; + if(! param) /*<>*/ return v0; var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, param = l; else var param = r; @@ -10291,16 +10925,16 @@ function find_first_opt(f, param$0){ var param$1 = param$0; for(;;){ - if(! param$1) /*<>*/ return 0; + if(! param$1) /*<>*/ return 0; var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, param = l$0; for(;;){ - if(! param) /*<>*/ return [0, v0]; + if(! param) /*<>*/ return [0, v0]; var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, param = l; else var param = r; @@ -10314,17 +10948,17 @@ var param$1 = param$0; for(;;){ if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, param = r$0; for(;;){ - if(! param) /*<>*/ return v0; + if(! param) /*<>*/ return v0; var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, param = r; else var param = l; @@ -10337,16 +10971,16 @@ function find_last_opt(f, param$0){ var param$1 = param$0; for(;;){ - if(! param$1) /*<>*/ return 0; + if(! param$1) /*<>*/ return 0; var r$0 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, param = r$0; for(;;){ - if(! param) /*<>*/ return [0, v0]; + if(! param) /*<>*/ return [0, v0]; var r = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, param = r; else var param = l; @@ -10359,98 +10993,98 @@ function find_opt(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var r = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, v]; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, v]; var r$0 = 0 <= c ? r : l, param$0 = r$0; } } function try_join(l, v, r){ - /*<>*/ a: + /*<>*/ a: { if(0 !== l){ - /*<>*/ /*<>*/ var _v_ = max_elt(l); - /*<>*/ if - (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) + /*<>*/ /*<>*/ var _v_ = max_elt(l); + /*<>*/ if + (0 <= /*<>*/ caml_call2(Ord[1], _v_, v)) break a; } if(0 !== r){ - /*<>*/ /*<>*/ var _u_ = min_elt(r); - /*<>*/ if - (0 <= /*<>*/ caml_call2(Ord[1], v, _u_)) + /*<>*/ /*<>*/ var _u_ = min_elt(r); + /*<>*/ if + (0 <= /*<>*/ caml_call2(Ord[1], v, _u_)) break a; } - /*<>*/ return join(l, v, r); + /*<>*/ return join(l, v, r); } - /*<>*/ return union(l, add(v, r)); - /*<>*/ } + /*<>*/ return union(l, add(v, r)); + /*<>*/ } function map(f, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var r = t[3], v = t[2], l = t[1], - /*<>*/ l$0 = map(f, l), - /*<>*/ v$0 = /*<>*/ caml_call1(f, v), - /*<>*/ r$0 = map(f, r); + /*<>*/ l$0 = map(f, l), + /*<>*/ v$0 = /*<>*/ caml_call1(f, v), + /*<>*/ r$0 = map(f, r); if(l === l$0 && v === v$0 && r === r$0) - /*<>*/ return t; - /*<>*/ return try_join(l$0, v$0, r$0); + /*<>*/ return t; + /*<>*/ return try_join(l$0, v$0, r$0); } function filter_map(f, t){ - /*<>*/ if(! t) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! t) /*<>*/ return 0; + /*<>*/ var r = t[3], v = t[2], l = t[1], - /*<>*/ t1 = filter_map(f, l), - /*<>*/ v$0 = /*<>*/ caml_call1(f, v), - /*<>*/ t2 = filter_map(f, r); - /*<>*/ if(v$0){ + /*<>*/ t1 = filter_map(f, l), + /*<>*/ v$0 = /*<>*/ caml_call1(f, v), + /*<>*/ t2 = filter_map(f, r); + /*<>*/ if(v$0){ var v$1 = v$0[1]; if(l === t1 && v === v$1 && r === t2) - /*<>*/ return t; - /*<>*/ return try_join(t1, v$1, t2); + /*<>*/ return t; + /*<>*/ return try_join(t1, v$1, t2); } - if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ /*<>*/ var + if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ /*<>*/ var _t_ = remove_min_elt(t2); - /*<>*/ return try_join(t1, min_elt(t2), _t_); + /*<>*/ return try_join(t1, min_elt(t2), _t_); } function of_list(l){ - /*<>*/ if(! l) return empty; + /*<>*/ if(! l) return empty; var _o_ = l[2], x0 = l[1]; - if(! _o_) /*<>*/ return singleton(x0); + if(! _o_) /*<>*/ return singleton(x0); var _p_ = _o_[2], x1 = _o_[1]; - if(! _p_) /*<>*/ return add(x1, singleton(x0)); + if(! _p_) /*<>*/ return add(x1, singleton(x0)); var _q_ = _p_[2], x2 = _p_[1]; if(! _q_) - /*<>*/ return add(x2, add(x1, singleton(x0))); + /*<>*/ return add(x2, add(x1, singleton(x0))); var _r_ = _q_[2], x3 = _q_[1]; if(! _r_) - /*<>*/ return add + /*<>*/ return add (x3, add(x2, add(x1, singleton(x0)))); if(_r_[2]){ - /*<>*/ var - /*<>*/ l$0 = - /*<>*/ caml_call2(Stdlib_List[59], Ord[1], l), + /*<>*/ var + /*<>*/ l$0 = + /*<>*/ caml_call2(Stdlib_List[62], Ord[1], l), sub = function(n, l){ - /*<>*/ if(3 >= n >>> 0) + /*<>*/ if(3 >= n >>> 0) switch(n){ case 0: - /*<>*/ return [0, 0, l]; + /*<>*/ return [0, 0, l]; case 1: if(l){ var l$3 = l[2], x0 = l[1]; - /*<>*/ return [0, [0, 0, x0, 0, 1], l$3]; + /*<>*/ return [0, [0, 0, x0, 0, 1], l$3]; } break; case 2: @@ -10458,7 +11092,7 @@ var match$1 = l[2]; if(match$1){ var l$4 = match$1[2], x1 = match$1[1], x0$0 = l[1]; - /*<>*/ return [0, + /*<>*/ return [0, [0, [0, 0, x0$0, 0, 1], x1, 0, 2], l$4]; } @@ -10475,109 +11109,109 @@ x2 = match$2[1], x1$0 = _s_[1], x0$1 = l[1]; - /*<>*/ return [0, + /*<>*/ return [0, [0, [0, 0, x0$1, 0, 1], x1$0, [0, 0, x2, 0, 1], 2], l$5]; } } } } - /*<>*/ var + /*<>*/ var nl = n / 2 | 0, - /*<>*/ match = sub(nl, l), + /*<>*/ match = sub(nl, l), l$0 = match[2], left = match[1]; - /*<>*/ if(! l$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ if(! l$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _c_], 1); - /*<>*/ var + /*<>*/ var l$1 = l$0[2], mid = l$0[1], - /*<>*/ match$0 = sub((n - nl | 0) - 1 | 0, l$1), + /*<>*/ match$0 = sub((n - nl | 0) - 1 | 0, l$1), l$2 = match$0[2], right = match$0[1]; - /*<>*/ return [0, create(left, mid, right), l$2]; - /*<>*/ }; - /*<>*/ return sub - ( /*<>*/ caml_call1(Stdlib_List[1], l$0), + /*<>*/ return [0, create(left, mid, right), l$2]; + /*<>*/ }; + /*<>*/ return sub + ( /*<>*/ caml_call1(Stdlib_List[1], l$0), l$0) [1]; } var x4 = _r_[1]; - /*<>*/ return add + /*<>*/ return add (x4, add(x3, add(x2, add(x1, singleton(x0))))); - /*<>*/ } + /*<>*/ } function add_seq(i, m){ function _n_(s, x){ - /*<>*/ return add(x, s); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ return add(x, s); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (Stdlib_Seq[5], _n_, m, i); - /*<>*/ } + /*<>*/ } function of_seq(i){ - /*<>*/ return add_seq(i, empty); - /*<>*/ } + /*<>*/ return add_seq(i, empty); + /*<>*/ } function seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var rest = c[3], t = c[2], x = c[1], - /*<>*/ _l_ = cons_enum(t, rest); - /*<>*/ return [0, + /*<>*/ _l_ = cons_enum(t, rest); + /*<>*/ return [0, x, function(_m_){ /*<>*/ return seq_of_enum(_l_, _m_);}]; - /*<>*/ } + /*<>*/ } function to_seq(c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _j_ = cons_enum(c, 0); - /*<>*/ return function(_k_){ + /*<>*/ return function(_k_){ /*<>*/ return seq_of_enum(_j_, _k_);}; - /*<>*/ } + /*<>*/ } function snoc_enum(s, e){ - /*<>*/ var s$0 = s, e$0 = e; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return e$0; - /*<>*/ var + /*<>*/ var s$0 = s, e$0 = e; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return e$0; + /*<>*/ var r = s$0[3], v = s$0[2], l = s$0[1], - /*<>*/ e$1 = [0, v, l, e$0], + /*<>*/ e$1 = [0, v, l, e$0], s$0 = r, e$0 = e$1; } - /*<>*/ } + /*<>*/ } function rev_seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var rest = c[3], t = c[2], x = c[1], - /*<>*/ _h_ = snoc_enum(t, rest); - /*<>*/ return [0, + /*<>*/ _h_ = snoc_enum(t, rest); + /*<>*/ return [0, x, function(_i_){ /*<>*/ return rev_seq_of_enum(_h_, _i_);}]; - /*<>*/ } + /*<>*/ } function to_rev_seq(c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _f_ = snoc_enum(c, 0); - /*<>*/ return function(_g_){ + /*<>*/ return function(_g_){ /*<>*/ return rev_seq_of_enum(_f_, _g_);}; - /*<>*/ } + /*<>*/ } function to_seq_from(low, s){ - /*<>*/ var s$0 = s, c = 0; - /*<>*/ for(;;){ + /*<>*/ var s$0 = s, c = 0; + /*<>*/ for(;;){ if(s$0){ - /*<>*/ var + /*<>*/ var r = s$0[3], v = s$0[2], l = s$0[1], - /*<>*/ n = - /*<>*/ caml_call2(Ord[1], v, low); + /*<>*/ n = + /*<>*/ caml_call2(Ord[1], v, low); if(0 !== n){ if(0 <= n){ - /*<>*/ var - /*<>*/ c$0 = [0, v, r, c], + /*<>*/ var + /*<>*/ c$0 = [0, v, r, c], s$0 = l, c = c$0; continue; @@ -10589,14 +11223,12 @@ } else var _d_ = c; - /*<>*/ return function(_e_){ + /*<>*/ return function(_e_){ /*<>*/ return seq_of_enum(_d_, _e_);}; } - /*<>*/ } + /*<>*/ } return [0, empty, - is_empty, - mem, add, singleton, remove, @@ -10604,17 +11236,6 @@ inter, disjoint, diff, - compare, - equal, - subset, - iter, - map, - fold, - for_all, - exists, - filter, - filter_map, - partition, cardinal, elements, min_elt, @@ -10623,13 +11244,27 @@ max_elt_opt, min_elt, min_elt_opt, - split, find, find_opt, find_first, find_first_opt, find_last, find_last_opt, + iter, + fold, + map, + filter, + filter_map, + partition, + split, + is_empty, + mem, + equal, + compare, + subset, + for_all, + exists, + elements, of_list, to_seq_from, to_seq, @@ -10643,7 +11278,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Map -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Seq +//# unitInfo: Requires: Stdlib, Stdlib__List, Stdlib__Seq (function (globalThis){ "use strict"; @@ -10671,9 +11306,10 @@ Stdlib = global_data.Stdlib, Assert_failure = global_data.Assert_failure, Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_List = global_data.Stdlib__List, cst_Map_remove_min_elt = "Map.remove_min_elt", _a_ = [0, 0, 0, 0], - _b_ = [0, "map.ml", 400, 10], + _b_ = [0, "map.ml", 408, 10], _c_ = [0, 0, 0], cst_Map_bal = cst_Map_bal$3, cst_Map_bal$0 = cst_Map_bal$3, @@ -10683,99 +11319,99 @@ [0, function(Ord){ function height(param){ - /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ if(! param) /*<>*/ return 0; var h = param[5]; - /*<>*/ return h; - /*<>*/ } + /*<>*/ return h; + /*<>*/ } function create(l, x, d, r){ - /*<>*/ var - /*<>*/ hl = height(l), - /*<>*/ hr = height(r), - _L_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, x, d, r, _L_]; - /*<>*/ } + /*<>*/ var + /*<>*/ hl = height(l), + /*<>*/ hr = height(r), + _M_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + /*<>*/ return [0, l, x, d, r, _M_]; + /*<>*/ } function singleton(x, d){ - /*<>*/ return [0, 0, x, d, 0, 1]; - /*<>*/ } + /*<>*/ return [0, 0, x, d, 0, 1]; + /*<>*/ } function bal(l, x, d, r){ - /*<>*/ if(l) var h = l[5], hl = h; else var hl = 0; - /*<>*/ if(r) var h$0 = r[5], hr = h$0; else var hr = 0; + /*<>*/ if(l) var h = l[5], hl = h; else var hl = 0; + /*<>*/ if(r) var h$0 = r[5], hr = h$0; else var hr = 0; if((hr + 2 | 0) < hl){ if(! l) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Map_bal$0); - /*<>*/ var + /*<>*/ var lr = l[4], ld = l[3], lv = l[2], ll = l[1], - /*<>*/ _G_ = height(lr); - if(_G_ <= height(ll)) - /*<>*/ return create + /*<>*/ _H_ = height(lr); + if(_H_ <= height(ll)) + /*<>*/ return create (ll, lv, ld, create(lr, x, d, r)); if(! lr) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Map_bal); - /*<>*/ var + /*<>*/ var lrr = lr[4], lrd = lr[3], lrv = lr[2], lrl = lr[1], - /*<>*/ _H_ = create(lrr, x, d, r); - /*<>*/ return create - (create(ll, lv, ld, lrl), lrv, lrd, _H_); + /*<>*/ _I_ = create(lrr, x, d, r); + /*<>*/ return create + (create(ll, lv, ld, lrl), lrv, lrd, _I_); } if((hl + 2 | 0) >= hr){ - var _K_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; - /*<>*/ return [0, l, x, d, r, _K_]; + var _L_ = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + /*<>*/ return [0, l, x, d, r, _L_]; } if(! r) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Map_bal$2); - /*<>*/ var + /*<>*/ var rr = r[4], rd = r[3], rv = r[2], rl = r[1], - /*<>*/ _I_ = height(rl); - if(_I_ <= height(rr)) - /*<>*/ return create + /*<>*/ _J_ = height(rl); + if(_J_ <= height(rr)) + /*<>*/ return create (create(l, x, d, rl), rv, rd, rr); if(! rl) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Map_bal$1); - /*<>*/ var + /*<>*/ var rlr = rl[4], rld = rl[3], rlv = rl[2], rll = rl[1], - /*<>*/ _J_ = create(rlr, rv, rd, rr); - /*<>*/ return create - (create(l, x, d, rll), rlv, rld, _J_); - /*<>*/ } + /*<>*/ _K_ = create(rlr, rv, rd, rr); + /*<>*/ return create + (create(l, x, d, rll), rlv, rld, _K_); + /*<>*/ } var empty = 0; function is_empty(param){ - /*<>*/ return param ? 0 : 1; - /*<>*/ } + /*<>*/ return param ? 0 : 1; + /*<>*/ } function add(x, data, m){ /*<>*/ if(! m) - /*<>*/ return [0, 0, x, data, 0, 1]; - /*<>*/ var + /*<>*/ return [0, 0, x, data, 0, 1]; + /*<>*/ var h = m[5], r = m[4], d = m[3], v = m[2], l = m[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) return d === data ? m : [0, l, x, data, r, h]; if(0 <= c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var rr = add(x, data, r); return r === rr ? m : bal(l, v, d, rr); } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var ll = add(x, data, l); return l === ll ? m : bal(ll, v, d, r); } @@ -10783,16 +11419,16 @@ var param$0 = param; for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); - /*<>*/ var + /*<>*/ var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) /*<>*/ return d; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) /*<>*/ return d; var r$0 = 0 <= c ? r : l, param$0 = r$0; } } @@ -10800,21 +11436,21 @@ var param$1 = param$0; for(;;){ if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var r$0 = param$1[4], d0$1 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, d0 = d0$1, param = l$0; for(;;){ - if(! param) /*<>*/ return [0, v0, d0]; + if(! param) /*<>*/ return [0, v0, d0]; var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, d0 = d0$0, param = l; else var param = r; @@ -10827,20 +11463,20 @@ function find_first_opt(f, param$0){ var param$1 = param$0; for(;;){ - if(! param$1) /*<>*/ return 0; + if(! param$1) /*<>*/ return 0; var r$0 = param$1[4], d0$1 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, d0 = d0$1, param = l$0; for(;;){ - if(! param) /*<>*/ return [0, [0, v0, d0]]; + if(! param) /*<>*/ return [0, [0, v0, d0]]; var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, d0 = d0$0, param = l; else var param = r; @@ -10854,21 +11490,21 @@ var param$1 = param$0; for(;;){ if(! param$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var r$0 = param$1[4], d0$1 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, d0 = d0$1, param = r$0; for(;;){ - if(! param) /*<>*/ return [0, v0, d0]; + if(! param) /*<>*/ return [0, v0, d0]; var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, d0 = d0$0, param = r; else var param = l; @@ -10881,20 +11517,20 @@ function find_last_opt(f, param$0){ var param$1 = param$0; for(;;){ - if(! param$1) /*<>*/ return 0; + if(! param$1) /*<>*/ return 0; var r$0 = param$1[4], d0$1 = param$1[3], v0$1 = param$1[2], l$0 = param$1[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$1)){ + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$1)){ var v0 = v0$1, d0 = d0$1, param = r$0; for(;;){ - if(! param) /*<>*/ return [0, [0, v0, d0]]; + if(! param) /*<>*/ return [0, [0, v0, d0]]; var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; - /*<>*/ if - ( /*<>*/ caml_call1(f, v0$0)) + /*<>*/ if + ( /*<>*/ caml_call1(f, v0$0)) var v0 = v0$0, d0 = d0$0, param = r; else var param = l; @@ -10907,265 +11543,274 @@ function find_opt(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, d]; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, d]; var r$0 = 0 <= c ? r : l, param$0 = r$0; } } function mem(x, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var r = param$0[4], v = param$0[2], l = param$0[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v), - _F_ = 0 === c ? 1 : 0; - if(_F_) return _F_; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v), + _G_ = 0 === c ? 1 : 0; + if(_G_) return _G_; var r$0 = 0 <= c ? r : l, param$0 = r$0; } } function min_binding(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var l = param$0[1]; if(! l){ var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, v, d]; + /*<>*/ return [0, v, d]; } var param$0 = l; } - /*<>*/ } + /*<>*/ } function min_binding_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; var l = param$0[1]; if(! l){ var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, [0, v, d]]; + /*<>*/ return [0, [0, v, d]]; } var param$0 = l; } - /*<>*/ } + /*<>*/ } function max_binding(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ if(! param$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); if(! param$0[4]){ var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, v, d]; + /*<>*/ return [0, v, d]; } var r = param$0[4], param$0 = r; } - /*<>*/ } + /*<>*/ } function max_binding_opt(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; + /*<>*/ var param$0 = param; + /*<>*/ for(;;){ + if(! param$0) /*<>*/ return 0; if(! param$0[4]){ var d = param$0[3], v = param$0[2]; - /*<>*/ return [0, [0, v, d]]; + /*<>*/ return [0, [0, v, d]]; } var r = param$0[4], param$0 = r; } - /*<>*/ } + /*<>*/ } function remove_min_binding(param){ - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Map_remove_min_elt); var l = param[1]; if(l){ var r = param[4], d = param[3], v = param[2]; - /*<>*/ return bal(remove_min_binding(l), v, d, r); + /*<>*/ return bal(remove_min_binding(l), v, d, r); } var r$0 = param[4]; - /*<>*/ return r$0; - /*<>*/ } + /*<>*/ return r$0; + /*<>*/ } function _d_(t1, t2){ - /*<>*/ if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ var - /*<>*/ match = min_binding(t2), + /*<>*/ if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ var + /*<>*/ match = min_binding(t2), d = match[2], x = match[1]; - /*<>*/ return bal(t1, x, d, remove_min_binding(t2)); - /*<>*/ } + /*<>*/ return bal(t1, x, d, remove_min_binding(t2)); + /*<>*/ } function remove(x, m){ - /*<>*/ if(! m) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! m) /*<>*/ return 0; + /*<>*/ var r = m[4], d = m[3], v = m[2], l = m[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return _d_(l, r); + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return _d_(l, r); if(0 <= c){ - /*<>*/ /*<>*/ var rr = remove(x, r); + /*<>*/ /*<>*/ var rr = remove(x, r); return r === rr ? m : bal(l, v, d, rr); } - /*<>*/ /*<>*/ var ll = remove(x, l); + /*<>*/ /*<>*/ var ll = remove(x, l); return l === ll ? m : bal(ll, v, d, r); } function update(x, f, m){ /*<>*/ if(! m){ - /*<>*/ /*<>*/ var - match$0 = /*<>*/ caml_call1(f, 0); - if(! match$0) /*<>*/ return 0; + /*<>*/ /*<>*/ var + match$0 = /*<>*/ caml_call1(f, 0); + if(! match$0) /*<>*/ return 0; var data$0 = match$0[1]; - /*<>*/ return [0, 0, x, data$0, 0, 1]; + /*<>*/ return [0, 0, x, data$0, 0, 1]; } - /*<>*/ var + /*<>*/ var h = m[5], r = m[4], d = m[3], v = m[2], l = m[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(f, [0, d]); - if(! match) /*<>*/ return _d_(l, r); + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c){ + /*<>*/ /*<>*/ var + match = /*<>*/ caml_call1(f, [0, d]); + if(! match) /*<>*/ return _d_(l, r); var data = match[1]; return d === data ? m : [0, l, x, data, r, h]; } if(0 <= c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var rr = update(x, f, r); return r === rr ? m : bal(l, v, d, rr); } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var ll = update(x, f, l); return l === ll ? m : bal(ll, v, d, r); } + function add_to_list(x, data, m){ + function add(param){ + /*<>*/ if(! param) + /*<>*/ return [0, [0, data, 0]]; + var l = param[1]; + /*<>*/ return [0, [0, data, l]]; + /*<>*/ } + /*<>*/ return update(x, add, m); + /*<>*/ } function iter(f, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1]; - /*<>*/ iter(f, l); - /*<>*/ /*<>*/ caml_call2(f, v, d); + /*<>*/ iter(f, l); + /*<>*/ /*<>*/ caml_call2(f, v, d); var param$0 = r; } } function map(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var h = param[5], r = param[4], d = param[3], v = param[2], l = param[1], - /*<>*/ l$0 = map(f, l), - /*<>*/ d$0 = /*<>*/ caml_call1(f, d), - /*<>*/ r$0 = map(f, r); - /*<>*/ return [0, l$0, v, d$0, r$0, h]; + /*<>*/ l$0 = map(f, l), + /*<>*/ d$0 = /*<>*/ caml_call1(f, d), + /*<>*/ r$0 = map(f, r); + /*<>*/ return [0, l$0, v, d$0, r$0, h]; } function mapi(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var h = param[5], r = param[4], d = param[3], v = param[2], l = param[1], - /*<>*/ l$0 = mapi(f, l), - /*<>*/ d$0 = - /*<>*/ caml_call2(f, v, d), - /*<>*/ r$0 = mapi(f, r); - /*<>*/ return [0, l$0, v, d$0, r$0, h]; + /*<>*/ l$0 = mapi(f, l), + /*<>*/ d$0 = + /*<>*/ caml_call2(f, v, d), + /*<>*/ r$0 = mapi(f, r); + /*<>*/ return [0, l$0, v, d$0, r$0, h]; } function fold(f, m, accu){ - /*<>*/ var m$0 = m, accu$0 = accu; - /*<>*/ for(;;){ - if(! m$0) /*<>*/ return accu$0; - /*<>*/ var + /*<>*/ var m$0 = m, accu$0 = accu; + /*<>*/ for(;;){ + if(! m$0) /*<>*/ return accu$0; + /*<>*/ var r = m$0[4], d = m$0[3], v = m$0[2], l = m$0[1], - /*<>*/ accu$1 = - /*<>*/ caml_call3(f, v, d, fold(f, l, accu$0)), + /*<>*/ accu$1 = + /*<>*/ caml_call3(f, v, d, fold(f, l, accu$0)), m$0 = r, accu$0 = accu$1; } - /*<>*/ } + /*<>*/ } function for_all(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 1; - /*<>*/ var + if(! param$0) /*<>*/ return 1; + /*<>*/ var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ _C_ = - /*<>*/ caml_call2(p, v, d); - /*<>*/ if(_C_){ - /*<>*/ /*<>*/ var - _D_ = for_all(p, l); - /*<>*/ if(_D_){var param$0 = r; continue;} - var _E_ = _D_; + /*<>*/ _D_ = + /*<>*/ caml_call2(p, v, d); + /*<>*/ if(_D_){ + /*<>*/ /*<>*/ var + _E_ = for_all(p, l); + /*<>*/ if(_E_){var param$0 = r; continue;} + var _F_ = _E_; } else - var _E_ = _C_; - /*<>*/ return _E_; + var _F_ = _D_; + /*<>*/ return _F_; } } function exists(p, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; - /*<>*/ var + if(! param$0) /*<>*/ return 0; + /*<>*/ var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ _z_ = - /*<>*/ caml_call2(p, v, d); - /*<>*/ if(_z_) - var _A_ = _z_; + /*<>*/ _A_ = + /*<>*/ caml_call2(p, v, d); + /*<>*/ if(_A_) + var _B_ = _A_; else{ - /*<>*/ /*<>*/ var - _B_ = exists(p, l); - /*<>*/ if(! _B_){var param$0 = r; continue;} - var _A_ = _B_; + /*<>*/ /*<>*/ var + _C_ = exists(p, l); + /*<>*/ if(! _C_){var param$0 = r; continue;} + var _B_ = _C_; } - /*<>*/ return _A_; + /*<>*/ return _B_; } } function add_min_binding(k, x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(k, x); + /*<>*/ if(! param) /*<>*/ return singleton(k, x); var r = param[4], d = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(add_min_binding(k, x, l), v, d, r); + /*<>*/ return bal(add_min_binding(k, x, l), v, d, r); } function add_max_binding(k, x, param){ - /*<>*/ if(! param) /*<>*/ return singleton(k, x); + /*<>*/ if(! param) /*<>*/ return singleton(k, x); var r = param[4], d = param[3], v = param[2], l = param[1]; - /*<>*/ return bal(l, v, d, add_max_binding(k, x, r)); + /*<>*/ return bal(l, v, d, add_max_binding(k, x, r)); } function join(l, v, d, r){ - /*<>*/ if(! l) - /*<>*/ return add_min_binding(v, d, r); - if(! r) /*<>*/ return add_max_binding(v, d, l); + /*<>*/ if(! l) + /*<>*/ return add_min_binding(v, d, r); + if(! r) /*<>*/ return add_max_binding(v, d, l); var rh = r[5], rr = r[4], @@ -11185,85 +11830,85 @@ < rh ? bal(join(l, v, d, rl), rv, rd, rr) : create(l, v, d, r); - /*<>*/ } + /*<>*/ } function concat(t1, t2){ - /*<>*/ if(! t1) /*<>*/ return t2; - if(! t2) /*<>*/ return t1; - /*<>*/ var - /*<>*/ match = min_binding(t2), + /*<>*/ if(! t1) /*<>*/ return t2; + if(! t2) /*<>*/ return t1; + /*<>*/ var + /*<>*/ match = min_binding(t2), d = match[2], x = match[1]; - /*<>*/ return join(t1, x, d, remove_min_binding(t2)); - /*<>*/ } + /*<>*/ return join(t1, x, d, remove_min_binding(t2)); + /*<>*/ } function concat_or_join(t1, v, d, t2){ - /*<>*/ if(! d) - /*<>*/ return concat(t1, t2); + /*<>*/ if(! d) + /*<>*/ return concat(t1, t2); var d$0 = d[1]; - /*<>*/ return join(t1, v, d$0, t2); - /*<>*/ } + /*<>*/ return join(t1, v, d$0, t2); + /*<>*/ } function split(x, param){ - /*<>*/ if(! param) /*<>*/ return _a_; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return _a_; + /*<>*/ var r = param[4], d = param[3], v = param[2], l = param[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], x, v); - /*<>*/ if(0 === c) - /*<>*/ return [0, l, [0, d], r]; + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], x, v); + /*<>*/ if(0 === c) + /*<>*/ return [0, l, [0, d], r]; if(0 <= c){ - /*<>*/ var - /*<>*/ match = split(x, r), + /*<>*/ var + /*<>*/ match = split(x, r), rr = match[3], pres = match[2], lr = match[1]; - /*<>*/ return [0, join(l, v, d, lr), pres, rr]; + /*<>*/ return [0, join(l, v, d, lr), pres, rr]; } - /*<>*/ var - /*<>*/ match$0 = split(x, l), + /*<>*/ var + /*<>*/ match$0 = split(x, l), rl = match$0[3], pres$0 = match$0[2], ll = match$0[1]; - /*<>*/ return [0, ll, pres$0, join(rl, v, d, r)]; + /*<>*/ return [0, ll, pres$0, join(rl, v, d, r)]; } function merge(f, s1, s2){ - /*<>*/ if(s1){ + /*<>*/ if(s1){ var h1 = s1[5], r1 = s1[4], d1 = s1[3], v1 = s1[2], l1 = s1[1]; if(height(s2) <= h1){ - /*<>*/ var - /*<>*/ match = split(v1, s2), + /*<>*/ var + /*<>*/ match = split(v1, s2), r2 = match[3], d2 = match[2], l2 = match[1], - /*<>*/ _v_ = merge(f, r1, r2), - /*<>*/ _w_ = - /*<>*/ caml_call3(f, v1, [0, d1], d2); - /*<>*/ return concat_or_join - (merge(f, l1, l2), v1, _w_, _v_); + /*<>*/ _w_ = merge(f, r1, r2), + /*<>*/ _x_ = + /*<>*/ caml_call3(f, v1, [0, d1], d2); + /*<>*/ return concat_or_join + (merge(f, l1, l2), v1, _x_, _w_); } } - else if(! s2) /*<>*/ return 0; + else if(! s2) /*<>*/ return 0; if(! s2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); - /*<>*/ var + /*<>*/ var r2$0 = s2[4], d2$0 = s2[3], v2 = s2[2], l2$0 = s2[1], - /*<>*/ match$0 = split(v2, s1), + /*<>*/ match$0 = split(v2, s1), r1$0 = match$0[3], d1$0 = match$0[2], l1$0 = match$0[1], - /*<>*/ _x_ = merge(f, r1$0, r2$0), - /*<>*/ _y_ = - /*<>*/ caml_call3(f, v2, d1$0, [0, d2$0]); - /*<>*/ return concat_or_join - (merge(f, l1$0, l2$0), v2, _y_, _x_); - /*<>*/ } + /*<>*/ _y_ = merge(f, r1$0, r2$0), + /*<>*/ _z_ = + /*<>*/ caml_call3(f, v2, d1$0, [0, d2$0]); + /*<>*/ return concat_or_join + (merge(f, l1$0, l2$0), v2, _z_, _y_); + /*<>*/ } function union(f, s1, s2){ - /*<>*/ if(s1){ + /*<>*/ if(s1){ if(s2){ var h2 = s2[5], @@ -11277,124 +11922,124 @@ v1 = s1[2], l1 = s1[1]; if(h2 <= h1){ - /*<>*/ var - /*<>*/ match = split(v1, s2), + /*<>*/ var + /*<>*/ match = split(v1, s2), r2$0 = match[3], d2$0 = match[2], l2$0 = match[1], - /*<>*/ l = union(f, l1, l2$0), - /*<>*/ r = union(f, r1, r2$0); - /*<>*/ if(! d2$0) - /*<>*/ return join(l, v1, d1, r); + /*<>*/ l = union(f, l1, l2$0), + /*<>*/ r = union(f, r1, r2$0); + /*<>*/ if(! d2$0) + /*<>*/ return join(l, v1, d1, r); var d2$1 = d2$0[1]; - /*<>*/ return concat_or_join + /*<>*/ return concat_or_join (l, v1, - /*<>*/ caml_call3(f, v1, d1, d2$1), + /*<>*/ caml_call3(f, v1, d1, d2$1), r); } - /*<>*/ var - /*<>*/ match$0 = split(v2, s1), + /*<>*/ var + /*<>*/ match$0 = split(v2, s1), r1$0 = match$0[3], d1$0 = match$0[2], l1$0 = match$0[1], - /*<>*/ l$0 = union(f, l1$0, l2), - /*<>*/ r$0 = union(f, r1$0, r2); - /*<>*/ if(! d1$0) - /*<>*/ return join(l$0, v2, d2, r$0); + /*<>*/ l$0 = union(f, l1$0, l2), + /*<>*/ r$0 = union(f, r1$0, r2); + /*<>*/ if(! d1$0) + /*<>*/ return join(l$0, v2, d2, r$0); var d1$1 = d1$0[1]; - /*<>*/ return concat_or_join + /*<>*/ return concat_or_join (l$0, v2, - /*<>*/ caml_call3(f, v2, d1$1, d2), + /*<>*/ caml_call3(f, v2, d1$1, d2), r$0); } var s = s1; } else var s = s2; - /*<>*/ return s; - /*<>*/ } + /*<>*/ return s; + /*<>*/ } function filter(p, m){ - /*<>*/ if(! m) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! m) /*<>*/ return 0; + /*<>*/ var r = m[4], d = m[3], v = m[2], l = m[1], - /*<>*/ l$0 = filter(p, l), - /*<>*/ pvd = - /*<>*/ caml_call2(p, v, d), - /*<>*/ r$0 = filter(p, r); - /*<>*/ if(! pvd) - /*<>*/ return concat(l$0, r$0); - if(l === l$0 && r === r$0) /*<>*/ return m; - /*<>*/ return join(l$0, v, d, r$0); + /*<>*/ l$0 = filter(p, l), + /*<>*/ pvd = + /*<>*/ caml_call2(p, v, d), + /*<>*/ r$0 = filter(p, r); + /*<>*/ if(! pvd) + /*<>*/ return concat(l$0, r$0); + if(l === l$0 && r === r$0) /*<>*/ return m; + /*<>*/ return join(l$0, v, d, r$0); } function filter_map(f, param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var r = param[4], d = param[3], v = param[2], l = param[1], - /*<>*/ l$0 = filter_map(f, l), - /*<>*/ fvd = - /*<>*/ caml_call2(f, v, d), - /*<>*/ r$0 = filter_map(f, r); - /*<>*/ if(! fvd) - /*<>*/ return concat(l$0, r$0); + /*<>*/ l$0 = filter_map(f, l), + /*<>*/ fvd = + /*<>*/ caml_call2(f, v, d), + /*<>*/ r$0 = filter_map(f, r); + /*<>*/ if(! fvd) + /*<>*/ return concat(l$0, r$0); var d$0 = fvd[1]; - /*<>*/ return join(l$0, v, d$0, r$0); + /*<>*/ return join(l$0, v, d$0, r$0); } function partition(p, param){ - /*<>*/ if(! param) /*<>*/ return _c_; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return _c_; + /*<>*/ var r = param[4], d = param[3], v = param[2], l = param[1], - /*<>*/ match = partition(p, l), + /*<>*/ match = partition(p, l), lf = match[2], lt = match[1], - /*<>*/ pvd = - /*<>*/ caml_call2(p, v, d), - /*<>*/ match$0 = partition(p, r), + /*<>*/ pvd = + /*<>*/ caml_call2(p, v, d), + /*<>*/ match$0 = partition(p, r), rf = match$0[2], rt = match$0[1]; - /*<>*/ if(pvd){ - /*<>*/ /*<>*/ var - _t_ = concat(lf, rf); - /*<>*/ return [0, join(lt, v, d, rt), _t_]; + /*<>*/ if(pvd){ + /*<>*/ /*<>*/ var + _u_ = concat(lf, rf); + /*<>*/ return [0, join(lt, v, d, rt), _u_]; } - /*<>*/ /*<>*/ var - _u_ = join(lf, v, d, rf); - /*<>*/ return [0, concat(lt, rt), _u_]; + /*<>*/ /*<>*/ var + _v_ = join(lf, v, d, rf); + /*<>*/ return [0, concat(lt, rt), _v_]; } function cons_enum(m, e){ - /*<>*/ var m$0 = m, e$0 = e; - /*<>*/ for(;;){ - if(! m$0) /*<>*/ return e$0; - /*<>*/ var + /*<>*/ var m$0 = m, e$0 = e; + /*<>*/ for(;;){ + if(! m$0) /*<>*/ return e$0; + /*<>*/ var r = m$0[4], d = m$0[3], v = m$0[2], l = m$0[1], - /*<>*/ e$1 = [0, v, d, r, e$0], + /*<>*/ e$1 = [0, v, d, r, e$0], m$0 = l, e$0 = e$1; } - /*<>*/ } + /*<>*/ } function compare(cmp, m1, m2){ - /*<>*/ var - /*<>*/ e2$2 = cons_enum(m2, 0), - /*<>*/ e1$2 = cons_enum(m1, 0), + /*<>*/ var + /*<>*/ e2$2 = cons_enum(m2, 0), + /*<>*/ e1$2 = cons_enum(m1, 0), e1 = e1$2, e2 = e2$2; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(! e1) return e2 ? -1 : 0; - if(! e2) /*<>*/ return 1; - /*<>*/ var + if(! e2) /*<>*/ return 1; + /*<>*/ var e2$0 = e2[4], r2 = e2[3], d2 = e2[2], @@ -11403,29 +12048,29 @@ r1 = e1[3], d1 = e1[2], v1 = e1[1], - /*<>*/ c = - /*<>*/ caml_call2(Ord[1], v1, v2); - /*<>*/ if(0 !== c) /*<>*/ return c; - /*<>*/ /*<>*/ var - c$0 = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if(0 !== c$0) - /*<>*/ return c$0; - /*<>*/ var - /*<>*/ e2$1 = cons_enum(r2, e2$0), - /*<>*/ e1$1 = cons_enum(r1, e1$0), + /*<>*/ c = + /*<>*/ caml_call2(Ord[1], v1, v2); + /*<>*/ if(0 !== c) /*<>*/ return c; + /*<>*/ /*<>*/ var + c$0 = /*<>*/ caml_call2(cmp, d1, d2); + /*<>*/ if(0 !== c$0) + /*<>*/ return c$0; + /*<>*/ var + /*<>*/ e2$1 = cons_enum(r2, e2$0), + /*<>*/ e1$1 = cons_enum(r1, e1$0), e1 = e1$1, e2 = e2$1; } - /*<>*/ } + /*<>*/ } function equal(cmp, m1, m2){ - /*<>*/ var - /*<>*/ e2$2 = cons_enum(m2, 0), - /*<>*/ e1$2 = cons_enum(m1, 0), + /*<>*/ var + /*<>*/ e2$2 = cons_enum(m2, 0), + /*<>*/ e1$2 = cons_enum(m1, 0), e1 = e1$2, e2 = e2$2; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(! e1) return e2 ? 0 : 1; - if(! e2) /*<>*/ return 0; + if(! e2) /*<>*/ return 0; var e2$0 = e2[4], r2 = e2[3], @@ -11435,128 +12080,136 @@ r1 = e1[3], d1 = e1[2], v1 = e1[1], - _q_ = - 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; - if(_q_){ - /*<>*/ /*<>*/ var - _r_ = /*<>*/ caml_call2(cmp, d1, d2); - /*<>*/ if(_r_){ - /*<>*/ var - /*<>*/ e2$1 = cons_enum(r2, e2$0), - /*<>*/ e1$1 = cons_enum(r1, e1$0), + _r_ = + 0 === /*<>*/ caml_call2(Ord[1], v1, v2) ? 1 : 0; + if(_r_){ + /*<>*/ /*<>*/ var + _s_ = /*<>*/ caml_call2(cmp, d1, d2); + /*<>*/ if(_s_){ + /*<>*/ var + /*<>*/ e2$1 = cons_enum(r2, e2$0), + /*<>*/ e1$1 = cons_enum(r1, e1$0), e1 = e1$1, e2 = e2$1; continue; } - var _s_ = _r_; + var _t_ = _s_; } else - var _s_ = _q_; - /*<>*/ return _s_; + var _t_ = _r_; + /*<>*/ return _t_; } - /*<>*/ } + /*<>*/ } function cardinal(param){ - /*<>*/ if(! param) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! param) /*<>*/ return 0; + /*<>*/ var r = param[4], l = param[1], - /*<>*/ _p_ = cardinal(r); - return (cardinal(l) + 1 | 0) + _p_ | 0; - /*<>*/ } + /*<>*/ _q_ = cardinal(r); + return (cardinal(l) + 1 | 0) + _q_ | 0; + /*<>*/ } function bindings_aux(accu, param){ var accu$0 = accu, param$0 = param; for(;;){ - if(! param$0) /*<>*/ return accu$0; - /*<>*/ var + if(! param$0) /*<>*/ return accu$0; + /*<>*/ var r = param$0[4], d = param$0[3], v = param$0[2], l = param$0[1], - /*<>*/ accu$1 = + /*<>*/ accu$1 = [0, [0, v, d], bindings_aux(accu$0, r)], accu$0 = accu$1, param$0 = l; } } function bindings(s){ - /*<>*/ return bindings_aux(0, s); - /*<>*/ } + /*<>*/ return bindings_aux(0, s); + /*<>*/ } + function of_list(bs){ + function _p_(m, param){ + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(k, v, m); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 + (Stdlib_List[26], _p_, empty, bs); + /*<>*/ } function add_seq(i, m){ function _o_(m, param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(k, v, m); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(k, v, m); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (Stdlib_Seq[5], _o_, m, i); - /*<>*/ } + /*<>*/ } function of_seq(i){ - /*<>*/ return add_seq(i, empty); - /*<>*/ } + /*<>*/ return add_seq(i, empty); + /*<>*/ } function seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var rest = c[4], t = c[3], v = c[2], k = c[1], - /*<>*/ _m_ = cons_enum(t, rest); - /*<>*/ return [0, + /*<>*/ _m_ = cons_enum(t, rest); + /*<>*/ return [0, [0, k, v], function(_n_){ /*<>*/ return seq_of_enum(_m_, _n_);}]; - /*<>*/ } + /*<>*/ } function to_seq(m){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _k_ = cons_enum(m, 0); - /*<>*/ return function(_l_){ + /*<>*/ return function(_l_){ /*<>*/ return seq_of_enum(_k_, _l_);}; - /*<>*/ } + /*<>*/ } function snoc_enum(s, e){ - /*<>*/ var s$0 = s, e$0 = e; - /*<>*/ for(;;){ - if(! s$0) /*<>*/ return e$0; - /*<>*/ var + /*<>*/ var s$0 = s, e$0 = e; + /*<>*/ for(;;){ + if(! s$0) /*<>*/ return e$0; + /*<>*/ var r = s$0[4], d = s$0[3], v = s$0[2], l = s$0[1], - /*<>*/ e$1 = [0, v, d, l, e$0], + /*<>*/ e$1 = [0, v, d, l, e$0], s$0 = r, e$0 = e$1; } - /*<>*/ } + /*<>*/ } function rev_seq_of_enum(c, param){ - /*<>*/ if(! c) /*<>*/ return 0; - /*<>*/ var + /*<>*/ if(! c) /*<>*/ return 0; + /*<>*/ var rest = c[4], t = c[3], v = c[2], k = c[1], - /*<>*/ _i_ = snoc_enum(t, rest); - /*<>*/ return [0, + /*<>*/ _i_ = snoc_enum(t, rest); + /*<>*/ return [0, [0, k, v], function(_j_){ /*<>*/ return rev_seq_of_enum(_i_, _j_);}]; - /*<>*/ } + /*<>*/ } function to_rev_seq(c){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _g_ = snoc_enum(c, 0); - /*<>*/ return function(_h_){ + /*<>*/ return function(_h_){ /*<>*/ return rev_seq_of_enum(_g_, _h_);}; - /*<>*/ } + /*<>*/ } function to_seq_from(low, m){ - /*<>*/ var m$0 = m, c = 0; - /*<>*/ for(;;){ + /*<>*/ var m$0 = m, c = 0; + /*<>*/ for(;;){ if(m$0){ - /*<>*/ var + /*<>*/ var r = m$0[4], d = m$0[3], v = m$0[2], l = m$0[1], - /*<>*/ n = - /*<>*/ caml_call2(Ord[1], v, low); + /*<>*/ n = + /*<>*/ caml_call2(Ord[1], v, low); if(0 !== n){ if(0 <= n){ - /*<>*/ var - /*<>*/ c$0 = [0, v, d, r, c], + /*<>*/ var + /*<>*/ c$0 = [0, v, d, r, c], m$0 = l, c = c$0; continue; @@ -11568,29 +12221,19 @@ } else var _e_ = c; - /*<>*/ return function(_f_){ + /*<>*/ return function(_f_){ /*<>*/ return seq_of_enum(_e_, _f_);}; } - /*<>*/ } + /*<>*/ } return [0, empty, - is_empty, - mem, add, + add_to_list, update, singleton, remove, merge, union, - compare, - equal, - iter, - fold, - for_all, - exists, - filter, - filter_map, - partition, cardinal, bindings, min_binding, @@ -11599,22 +12242,35 @@ max_binding_opt, min_binding, min_binding_opt, - split, find, find_opt, find_first, find_first_opt, find_last, find_last_opt, + iter, + fold, map, mapi, + filter, + filter_map, + partition, + split, + is_empty, + mem, + equal, + compare, + for_all, + exists, + bindings, + of_list, to_seq, to_rev_seq, to_seq_from, add_seq, of_seq]; }]; - runtime.caml_register_global(11, Stdlib_Map, "Stdlib__Map"); + runtime.caml_register_global(12, Stdlib_Map, "Stdlib__Map"); return; /*<>*/ } (globalThis)); @@ -11682,47 +12338,57 @@ s[2] = s[2] - 1 | 0; /*<>*/ return [0, hd]; /*<>*/ } - function top(s){ + function drop(s){ /*<>*/ var match = s[1]; if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Empty, 1); + var tl = match[2]; + s[1] = tl; + s[2] = s[2] - 1 | 0; + return 0; + /*<>*/ } + function top(s){ + /*<>*/ var match = s[1]; + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Empty, 1); var hd = match[1]; - /*<>*/ return hd; - /*<>*/ } + /*<>*/ return hd; + /*<>*/ } function top_opt(s){ - /*<>*/ var match = s[1]; - if(! match) /*<>*/ return 0; + /*<>*/ var match = s[1]; + if(! match) /*<>*/ return 0; var hd = match[1]; - /*<>*/ return [0, hd]; - /*<>*/ } + /*<>*/ return [0, hd]; + /*<>*/ } function is_empty(s){ - /*<>*/ return 0 === s[1] ? 1 : 0; - /*<>*/ } + /*<>*/ return 0 === s[1] ? 1 : 0; + /*<>*/ } function length(s){ - /*<>*/ return s[2]; - /*<>*/ } + /*<>*/ return s[2]; + /*<>*/ } function iter(f, s){ - /*<>*/ return caml_call2(Stdlib_List[17], f, s[1]); - /*<>*/ } + /*<>*/ return caml_call2(Stdlib_List[18], f, s[1]); + /*<>*/ } function fold(f, acc, s){ - /*<>*/ return caml_call3(Stdlib_List[25], f, acc, s[1]); - /*<>*/ } + /*<>*/ return caml_call3(Stdlib_List[26], f, acc, s[1]); + /*<>*/ } function to_seq(s){ - /*<>*/ return caml_call1(Stdlib_List[61], s[1]); - /*<>*/ } + /*<>*/ return caml_call1(Stdlib_List[64], s[1]); + /*<>*/ } function add_seq(q, i){ function _a_(x){ - /*<>*/ return push(x, q); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return push(x, q); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Seq[4], _a_, i); - /*<>*/ } + /*<>*/ } function of_seq(g){ - /*<>*/ /*<>*/ var s = create(0); - /*<>*/ add_seq(s, g); - /*<>*/ return s; - /*<>*/ } + /*<>*/ /*<>*/ var s = create(0); + /*<>*/ add_seq(s, g); + /*<>*/ return s; + /*<>*/ } var Stdlib_Stack = [0, @@ -11731,6 +12397,7 @@ push, pop, pop_opt, + drop, top, top_opt, clear, @@ -11942,7 +12609,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Buffer -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Bytes, Stdlib__Seq, Stdlib__String, Stdlib__Sys +//# unitInfo: Requires: Stdlib, Stdlib__Bytes, Stdlib__Seq, Stdlib__String, Stdlib__Sys (function (globalThis){ "use strict"; @@ -12187,7 +12854,7 @@ /*<>*/ match = b[1], length = match[2], buffer = match[1], - new_position = b[2] + len | 0; + new_position = position + len | 0; if(length < new_position){ /*<>*/ resize(b, len); /*<>*/ /*<>*/ caml_call5 @@ -12315,7 +12982,7 @@ match$0 = [0, /*<>*/ caml_call3 - (Stdlib_String[15], s, start$0, stop$0 - start$0 | 0), + (Stdlib_String[16], s, start$0, stop$0 - start$0 | 0), stop$0]; break a; } @@ -12345,7 +13012,7 @@ match$0 = [0, /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], s, new_start, (stop - start$0 | 0) - 1 | 0), @@ -12586,12 +13253,38 @@ "use strict"; var runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_mutex_lock = runtime.caml_ml_mutex_lock, + caml_ml_mutex_unlock = runtime.caml_ml_mutex_unlock, + caml_wrap_exception = runtime.caml_wrap_exception; + /*<>*/ function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) == 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function protect(m, f){ + /*<>*/ /*<>*/ caml_ml_mutex_lock(m); + /*<>*/ try{ + /*<>*/ /*<>*/ var + x = /*<>*/ caml_call1(f, 0); + } + catch(e$0){ + var e = caml_wrap_exception(e$0); + /*<>*/ /*<>*/ caml_ml_mutex_unlock(m); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + } + /*<>*/ /*<>*/ caml_ml_mutex_unlock(m); + /*<>*/ return x; + /*<>*/ } + var Stdlib_Mutex = [0, runtime.caml_ml_mutex_new, - runtime.caml_ml_mutex_lock, + caml_ml_mutex_lock, runtime.caml_ml_mutex_try_lock, - runtime.caml_ml_mutex_unlock]; + caml_ml_mutex_unlock, + protect]; runtime.caml_register_global(0, Stdlib_Mutex, "Stdlib__Mutex"); return; /*<>*/ } @@ -12940,7 +13633,7 @@ /*<>*/ } /*<>*/ var /*<>*/ pk = - /*<>*/ caml_call2(Stdlib_List[19], _b_, _a_), + /*<>*/ caml_call2(Stdlib_List[20], _b_, _a_), /*<>*/ term_mutex = /*<>*/ caml_call1(Stdlib_Mutex[1], 0), /*<>*/ term_condition = @@ -12962,7 +13655,7 @@ /*<>*/ return 0; /*<>*/ }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_List[17], _c_, pk); + (Stdlib_List[18], _c_, pk); /*<>*/ /*<>*/ var res = /*<>*/ caml_call1(f, 0); } @@ -13042,7 +13735,7 @@ (globalThis)); //# unitInfo: Provides: CamlinternalFormat -//# unitInfo: Requires: Assert_failure, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Char, Stdlib__Int, Stdlib__String, Stdlib__Sys +//# unitInfo: Requires: CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Char, Stdlib__Int, Stdlib__String, Stdlib__Sys (function (globalThis){ "use strict"; @@ -13595,7 +14288,7 @@ str_len = caml_ml_string_length(s); /*<>*/ buffer_check_size(buf, str_len); /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], s, 0, buf[2], buf[1], str_len); + (Stdlib_String[6], s, 0, buf[2], buf[1], str_len); buf[1] = buf[1] + str_len | 0; return 0; /*<>*/ } @@ -13881,11 +14574,10 @@ } /*<>*/ } function int_of_custom_arity(param){ - /*<>*/ if(! param) - /*<>*/ return 0; + /*<>*/ if(! param) /*<>*/ return 0; var x = param[1]; return 1 + int_of_custom_arity(x) | 0; - /*<>*/ } + } function string_of_fmt(fmt){ /*<>*/ /*<>*/ var buf = buffer_create(16); @@ -14319,7 +15011,7 @@ /*<>*/ return buffer_contents(buf); /*<>*/ } function symm(param){ - /*<>*/ if(typeof param === "number") + /*<>*/ if(typeof param === "number") /*<>*/ return 0; switch(param[0]){ case 0: @@ -14368,9 +15060,9 @@ var rest$13 = param[1]; /*<>*/ return [14, symm(rest$13)]; } - /*<>*/ } + } function fmtty_rel_det(param){ - /*<>*/ if(typeof param !== "number") + /*<>*/ if(typeof param !== "number") switch(param[0]){ case 0: /*<>*/ var @@ -14751,7 +15443,7 @@ _dh_, _dg_, _df_]; - /*<>*/ } + } function trans(ty1, ty2){ /*<>*/ a: { @@ -16181,11 +16873,11 @@ /*<>*/ switch(padty$0){ case 0: /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, 0, len); + (Stdlib_String[6], str, 0, res, 0, len); break; case 1: /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); + (Stdlib_String[6], str, 0, res, width$0 - len | 0, len); break; default: a: @@ -16205,7 +16897,7 @@ 0, /*<>*/ caml_string_get(str, 0)); /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], + (Stdlib_String[6], str, 1, res, @@ -16231,7 +16923,7 @@ 1, /*<>*/ caml_string_get(str, 1)); /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], + (Stdlib_String[6], str, 2, res, @@ -16240,7 +16932,7 @@ break; } /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, width$0 - len | 0, len); + (Stdlib_String[6], str, 0, res, width$0 - len | 0, len); } /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], res); @@ -16282,7 +16974,7 @@ 1, /*<>*/ caml_string_get(str, 1)); /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], + (Stdlib_String[6], str, 2, res$1, @@ -16309,7 +17001,7 @@ /*<>*/ /*<>*/ caml_bytes_set (res$0, 0, c); /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], + (Stdlib_String[6], str, 1, res$0, @@ -16326,7 +17018,7 @@ /*<>*/ caml_call2 (Stdlib_Bytes[1], prec$0, 48); /*<>*/ /*<>*/ caml_call5 - (Stdlib_String[48], str, 0, res, prec$0 - len | 0, len); + (Stdlib_String[6], str, 0, res, prec$0 - len | 0, len); /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], res); } @@ -16337,7 +17029,7 @@ /*<>*/ var /*<>*/ str$0 = /*<>*/ caml_call1 - (Stdlib_String[24], str), + (Stdlib_String[25], str), /*<>*/ l = /*<>*/ caml_ml_string_length(str$0), /*<>*/ res = @@ -16622,7 +17314,7 @@ /*<>*/ /*<>*/ var _cV_ = hex(0); /*<>*/ return /*<>*/ caml_call1 - (Stdlib_String[25], _cV_); + (Stdlib_String[26], _cV_); case 8: /*<>*/ return caml_special_val(hex(0)); default: @@ -17684,7 +18376,7 @@ } /*<>*/ } function fn_of_custom_arity$0(counter, k, o, fmt, param){ - /*<>*/ if(param){ + /*<>*/ if(param){ /*<>*/ var arity = param[1], /*<>*/ _bw_ = @@ -17698,7 +18390,7 @@ var counter$0 = counter + 1 | 0; /*<>*/ return make_iprintf$0 (counter$0, k, o, fmt); - /*<>*/ } + } function make_iprintf(k, o, fmt){ /*<>*/ return caml_trampoline(make_iprintf$0(0, k, o, fmt)); } @@ -17946,7 +18638,7 @@ /*<>*/ var /*<>*/ box_name = /*<>*/ caml_call3 - (Stdlib_String[15], str, wstart, wend - wstart | 0), + (Stdlib_String[16], str, wstart, wend - wstart | 0), /*<>*/ nstart = parse_spaces(wend), nend = nstart; /*<>*/ for(;;){ @@ -17976,7 +18668,7 @@ /*<>*/ _bs_ = /*<>*/ runtime.caml_int_of_string ( /*<>*/ caml_call3 - (Stdlib_String[15], str, nstart, nend - nstart | 0)), + (Stdlib_String[16], str, nstart, nend - nstart | 0)), indent = _bs_; } catch(_bt_){ @@ -18071,7 +18763,7 @@ : [0, [11, /*<>*/ caml_call3 - (Stdlib_String[15], str, lit_start, size), + (Stdlib_String[16], str, lit_start, size), fmt]]; /*<>*/ } function parse(lit_start, end_ind){ @@ -18229,7 +18921,7 @@ /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], str, str_ind$3 - 2 | 0, (str_ind_3 - str_ind$3 | 0) + 3 | 0), @@ -18260,7 +18952,7 @@ /*<>*/ var /*<>*/ s$0 = /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], str, str_ind$3 - 2 | 0, (str_ind_5 - str_ind$3 | 0) + 3 | 0), @@ -18322,7 +19014,7 @@ /*<>*/ var /*<>*/ s$1 = /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], str, str_ind$4 - 2 | 0, (str_ind_3$0 - str_ind$4 | 0) + 3 | 0), @@ -19472,14 +20164,14 @@ /*<>*/ /*<>*/ var ind = /*<>*/ caml_call3 - (Stdlib_String[31], str, str_ind + 1 | 0, 62); + (Stdlib_String[32], str, str_ind + 1 | 0, 62); if(end_ind <= ind) /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); /*<>*/ var /*<>*/ sub_str = /*<>*/ caml_call3 - (Stdlib_String[15], str, str_ind, (ind - str_ind | 0) + 1 | 0), + (Stdlib_String[16], str, str_ind, (ind - str_ind | 0) + 1 | 0), fmt_rest$0 = parse(ind + 1 | 0, end_ind)[1], sub_fmt = parse(str_ind, ind + 1 | 0)[1], /*<>*/ sub_format$0 = @@ -19668,7 +20360,7 @@ /*<>*/ /*<>*/ var subfmt = /*<>*/ caml_call3 - (Stdlib_String[15], str, pct_ind, str_ind - pct_ind | 0); + (Stdlib_String[16], str, pct_ind, str_ind - pct_ind | 0); /*<>*/ return /*<>*/ caml_call5 (failwith_message(_Y_), str, pct_ind, option, symb, subfmt); /*<>*/ } @@ -19974,13 +20666,13 @@ "use strict"; var runtime = globalThis.jsoo_runtime, - cst$7 = "", - cst$9 = " ", + cst$8 = "", + cst$10 = " ", cst_Display_this_list_of_optio$1 = " Display this list of options", cst_s = "%s", cst_help$4 = "--help", cst_help$3 = "-help", - cst$8 = ".\n", + cst$9 = ".\n", cst_a_float$1 = "a float", cst_an_integer$1 = "an integer", caml_check_bound = runtime.caml_check_bound, @@ -20024,11 +20716,12 @@ } /*<>*/ var global_data = runtime.caml_get_global_data(), - cst$6 = "\n", - cst$3 = cst$7, - cst$4 = " ", - cst$5 = cst$7, + cst$7 = "\n", + cst$4 = cst$8, + cst$5 = " ", + cst$6 = cst$8, cst$2 = "(?)", + cst$3 = "-", cst = "}", cst$0 = "|", cst$1 = "{", @@ -20072,13 +20765,13 @@ 0, [11, "'; option '", - [2, 0, [11, "' expects ", [2, 0, [11, cst$8, 0]]]]]]]], + [2, 0, [11, "' expects ", [2, 0, [11, cst$9, 0]]]]]]]], "%s: wrong argument '%s'; option '%s' expects %s.\n"], _j_ = [0, [2, 0, [11, ": option '", [2, 0, [11, "' needs an argument.\n", 0]]]], "%s: option '%s' needs an argument.\n"], - _k_ = [0, [2, 0, [11, ": ", [2, 0, [11, cst$8, 0]]]], "%s: %s.\n"], + _k_ = [0, [2, 0, [11, ": ", [2, 0, [11, cst$9, 0]]]], "%s: %s.\n"], _g_ = [0, cst_help$3], _h_ = [0, cst_help$4], _e_ = [0, [2, 0, 0], cst_s], @@ -20090,10 +20783,11 @@ cst_Display_this_list_of_optio$0 = cst_Display_this_list_of_optio$1, cst_help$0 = cst_help$4, _c_ = [0, cst_help$3], - _a_ = [0, [11, cst$9, [2, 0, [12, 32, [2, 0, [12, 10, 0]]]]], " %s %s\n"], + _a_ = + [0, [11, cst$10, [2, 0, [12, 32, [2, 0, [12, 10, 0]]]]], " %s %s\n"], _b_ = [0, - [11, cst$9, [2, 0, [12, 32, [2, 0, [2, 0, [12, 10, 0]]]]]], + [11, cst$10, [2, 0, [12, 32, [2, 0, [2, 0, [12, 10, 0]]]]]], " %s %s%s\n"], cst_none = ""; function assoc3(x, l){ @@ -20122,7 +20816,7 @@ (Stdlib[28], x, _aG_); /*<>*/ } /*<>*/ /*<>*/ var - _aF_ = /*<>*/ caml_call3(Stdlib_List[25], _aE_, _aD_, t); + _aF_ = /*<>*/ caml_call3(Stdlib_List[26], _aE_, _aD_, t); /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], _aF_, suffix); /*<>*/ } @@ -20184,7 +20878,7 @@ (Stdlib_Printf[5], buf, _b_, key, _av_, doc); } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[17], _at_, _as_); + (Stdlib_List[18], _at_, _as_); /*<>*/ } function usage_string(speclist, errmsg){ /*<>*/ /*<>*/ var @@ -20272,276 +20966,271 @@ /*<>*/ caml_call1(Stdlib_Buffer[2], b)]; /*<>*/ } /*<>*/ current[1]++; - for(;;){ - if(current[1] >= argv[1].length - 1) return 0; - /*<>*/ try{ - /*<>*/ var - _Y_ = current[1], - /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; - a: - { - /*<>*/ if - (1 <= /*<>*/ caml_ml_string_length(s) - && 45 === /*<>*/ caml_string_get(s, 0)){ - try{ - /*<>*/ var - follow$1 = 0, - /*<>*/ _aa_ = assoc3(s, speclist[1]), - follow$0 = follow$1, - action = _aa_; - } - catch(_aj_){ - var _Z_ = caml_wrap_exception(_aj_); - if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); - /*<>*/ try{ - /*<>*/ var - /*<>*/ i = - /*<>*/ caml_call2(Stdlib_String[35], s, 61), - /*<>*/ len = - /*<>*/ caml_ml_string_length(s), - /*<>*/ arg = - /*<>*/ caml_call3 - (Stdlib_String[15], s, i + 1 | 0, len - (i + 1 | 0) | 0), - /*<>*/ keyword = - /*<>*/ caml_call3(Stdlib_String[15], s, 0, i), - /*<>*/ follow = [0, arg], - /*<>*/ _$_ = assoc3(keyword, speclist[1]), - follow$0 = follow, - action = _$_; - } - catch(_ak_){ - var ___ = caml_wrap_exception(_ak_); - if(___ === Stdlib[8]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [0, s]], 1); - throw caml_maybe_attach_backtrace(___, 0); - } - } - var - no_arg$0 = - function(s, follow){ - function no_arg(param){ - /*<>*/ if(! follow) - /*<>*/ return 0; - var arg = follow[1]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg, cst_no_argument]], 1); - /*<>*/ } - return no_arg; - }, - no_arg = no_arg$0(s, follow$0), - get_arg$0 = - function(s, follow){ - function get_arg(param){ - /*<>*/ if(follow){ - var arg = follow[1]; - /*<>*/ return arg; - } - if((current[1] + 1 | 0) >= argv[1].length - 1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [2, s]], 1); - var _ai_ = current[1] + 1 | 0; - /*<>*/ return caml_check_bound(argv[1], _ai_) - [1 + _ai_]; - /*<>*/ } - return get_arg; - }, - get_arg = get_arg$0(s, follow$0), - consume_arg$0 = - function(follow){ - function consume_arg(param){ - /*<>*/ return follow ? 0 : (current[1]++, 0); - /*<>*/ } - return consume_arg; - }, - consume_arg = consume_arg$0(follow$0), - treat_action$0 = - function(s, no_arg, get_arg, consume_arg){ - function treat_action(param){ - /*<>*/ switch(param[0]){ - case 0: - var f = param[1]; - /*<>*/ no_arg(0); - /*<>*/ return /*<>*/ caml_call1 - (f, 0); - case 1: - /*<>*/ var - f$0 = param[1], - /*<>*/ arg = get_arg(0); - /*<>*/ try{ - /*<>*/ var - /*<>*/ _ac_ = - [0, /*<>*/ caml_call1(Stdlib[32], arg)], - match = _ac_; - } - catch(_ah_){ - var _ab_ = caml_wrap_exception(_ah_); - if(_ab_[1] !== Stdlib[6]) - throw caml_maybe_attach_backtrace(_ab_, 0); - var match = 0; - } - if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg, cst_a_boolean]], 1); - var s$0 = match[1]; - /*<>*/ /*<>*/ caml_call1 - (f$0, s$0); - /*<>*/ return consume_arg(0); - case 2: - var r = param[1]; - /*<>*/ no_arg(0); - r[1] = 1; - return 0; - case 3: - var r$0 = param[1]; - /*<>*/ no_arg(0); - r$0[1] = 0; - return 0; - case 4: - /*<>*/ var - f$1 = param[1], - /*<>*/ arg$0 = get_arg(0); - /*<>*/ /*<>*/ caml_call1 - (f$1, arg$0); - /*<>*/ return consume_arg(0); - case 5: - var r$1 = param[1]; - r$1[1] = get_arg(0); - /*<>*/ return consume_arg(0); - case 6: - /*<>*/ var - f$2 = param[1], - /*<>*/ arg$1 = get_arg(0), - /*<>*/ match$0 = int_of_string_opt(arg$1); - if(! match$0) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$1, cst_an_integer]], 1); - var x = match$0[1]; - /*<>*/ /*<>*/ caml_call1 - (f$2, x); - /*<>*/ return consume_arg(0); - case 7: - /*<>*/ var - r$2 = param[1], - /*<>*/ arg$2 = get_arg(0), - /*<>*/ match$1 = int_of_string_opt(arg$2); - if(! match$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$2, cst_an_integer$0]], 1); - var x$0 = match$1[1]; - r$2[1] = x$0; - /*<>*/ return consume_arg(0); - case 8: - /*<>*/ var - f$3 = param[1], - /*<>*/ arg$3 = get_arg(0), - /*<>*/ match$2 = float_of_string_opt(arg$3); - if(! match$2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$3, cst_a_float]], 1); - var x$1 = match$2[1]; - /*<>*/ /*<>*/ caml_call1 - (f$3, x$1); - /*<>*/ return consume_arg(0); - case 9: - /*<>*/ var - r$3 = param[1], - /*<>*/ arg$4 = get_arg(0), - /*<>*/ match$3 = float_of_string_opt(arg$4); - if(! match$3) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stop, [1, s, arg$4, cst_a_float$0]], 1); - var x$2 = match$3[1]; - r$3[1] = x$2; - /*<>*/ return consume_arg(0); - case 10: - var specs = param[1]; - /*<>*/ no_arg(0); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[17], treat_action, specs); - case 11: - /*<>*/ var - f$4 = param[2], - symb = param[1], - /*<>*/ arg$5 = get_arg(0); - /*<>*/ if - ( /*<>*/ caml_call2 - (Stdlib_List[36], arg$5, symb)){ - /*<>*/ /*<>*/ caml_call1 - (f$4, arg$5); - /*<>*/ return consume_arg(0); - } - /*<>*/ /*<>*/ var - _ad_ = make_symlist(cst$5, cst$4, cst$3, symb); - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, - Stop, - [1, - s, - arg$5, - /*<>*/ caml_call2 - (Stdlib[28], cst_one_of, _ad_)]], - 1); - case 12: - var f$5 = param[1]; - /*<>*/ no_arg(0); - /*<>*/ for(;;){ - if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; - var _ae_ = current[1] + 1 | 0; - /*<>*/ /*<>*/ caml_call1 - (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); - /*<>*/ consume_arg(0); - } - break; - case 13: - var f$6 = param[1]; - /*<>*/ no_arg(0); - /*<>*/ /*<>*/ var - acc = [0, 0]; - /*<>*/ for(;;){ - if(current[1] >= (argv[1].length - 1 - 1 | 0)) - /*<>*/ return /*<>*/ caml_call1 - (f$6, - /*<>*/ caml_call1(Stdlib_List[9], acc[1])); - var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; - acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; - /*<>*/ consume_arg(0); - } - break; - default: - var f$7 = param[1]; - if(1 - allow_expand) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - ([0, Stdlib[6], cst_Arg_Expand_is_is_only_allo], 1); - /*<>*/ var - /*<>*/ arg$6 = get_arg(0), - /*<>*/ newarg = - /*<>*/ caml_call1(f$7, arg$6); - /*<>*/ consume_arg(0); - /*<>*/ var - /*<>*/ before = - /*<>*/ caml_call3 - (Stdlib_Array[5], argv[1], 0, current[1] + 1 | 0), - /*<>*/ after = - /*<>*/ caml_call3 - (Stdlib_Array[5], - argv[1], - current[1] + 1 | 0, - (argv[1].length - 1 - current[1] | 0) - 1 | 0); - argv[1] = - /*<>*/ caml_call1 - (Stdlib_Array[4], [0, before, [0, newarg, [0, after, 0]]]); - return 0; - } - /*<>*/ } - return treat_action; - }, - treat_action = treat_action$0(s, no_arg, get_arg, consume_arg); - /*<>*/ treat_action(action); - break a; + for(;;){ + if(current[1] >= argv[1].length - 1) return 0; + /*<>*/ try{ + /*<>*/ var + _Y_ = current[1], + /*<>*/ s = caml_check_bound(argv[1], _Y_)[1 + _Y_]; + /*<>*/ if + ( /*<>*/ caml_call2(Stdlib_String[11], cst$3, s)){ + try{ + /*<>*/ var + follow$1 = 0, + /*<>*/ _aa_ = assoc3(s, speclist[1]), + follow$0 = follow$1, + action = _aa_; } - /*<>*/ /*<>*/ caml_call1(anonfun, s); + catch(_aj_){ + var _Z_ = caml_wrap_exception(_aj_); + if(_Z_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Z_, 0); + /*<>*/ try{ + /*<>*/ var + /*<>*/ i = + /*<>*/ caml_call2(Stdlib_String[36], s, 61), + /*<>*/ len = + /*<>*/ caml_ml_string_length(s), + /*<>*/ arg = + /*<>*/ caml_call3 + (Stdlib_String[16], s, i + 1 | 0, len - (i + 1 | 0) | 0), + /*<>*/ keyword = + /*<>*/ caml_call3(Stdlib_String[16], s, 0, i), + /*<>*/ follow = [0, arg], + /*<>*/ _$_ = assoc3(keyword, speclist[1]), + follow$0 = follow, + action = _$_; + } + catch(_ak_){ + var ___ = caml_wrap_exception(_ak_); + if(___ === Stdlib[8]) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [0, s]], 1); + throw caml_maybe_attach_backtrace(___, 0); + } + } + var + no_arg$0 = + function(s, follow){ + function no_arg(param){ + /*<>*/ if(! follow) + /*<>*/ return 0; + var arg = follow[1]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg, cst_no_argument]], 1); + /*<>*/ } + return no_arg; + }, + no_arg = no_arg$0(s, follow$0), + get_arg$0 = + function(s, follow){ + function get_arg(param){ + /*<>*/ if(follow){ + var arg = follow[1]; + /*<>*/ return arg; + } + if((current[1] + 1 | 0) >= argv[1].length - 1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [2, s]], 1); + var _ai_ = current[1] + 1 | 0; + /*<>*/ return caml_check_bound(argv[1], _ai_) + [1 + _ai_]; + /*<>*/ } + return get_arg; + }, + get_arg = get_arg$0(s, follow$0), + consume_arg$0 = + function(follow){ + function consume_arg(param){ + /*<>*/ return follow ? 0 : (current[1]++, 0); + /*<>*/ } + return consume_arg; + }, + consume_arg = consume_arg$0(follow$0), + treat_action$0 = + function(s, no_arg, get_arg, consume_arg){ + function treat_action(param){ + /*<>*/ switch(param[0]){ + case 0: + var f = param[1]; + /*<>*/ no_arg(0); + /*<>*/ return /*<>*/ caml_call1 + (f, 0); + case 1: + /*<>*/ var + f$0 = param[1], + /*<>*/ arg = get_arg(0); + /*<>*/ try{ + /*<>*/ var + /*<>*/ _ac_ = + [0, /*<>*/ caml_call1(Stdlib[32], arg)], + match = _ac_; + } + catch(_ah_){ + var _ab_ = caml_wrap_exception(_ah_); + if(_ab_[1] !== Stdlib[6]) + throw caml_maybe_attach_backtrace(_ab_, 0); + var match = 0; + } + if(! match) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg, cst_a_boolean]], 1); + var s$0 = match[1]; + /*<>*/ /*<>*/ caml_call1 + (f$0, s$0); + /*<>*/ return consume_arg(0); + case 2: + var r = param[1]; + /*<>*/ no_arg(0); + r[1] = 1; + return 0; + case 3: + var r$0 = param[1]; + /*<>*/ no_arg(0); + r$0[1] = 0; + return 0; + case 4: + /*<>*/ var + f$1 = param[1], + /*<>*/ arg$0 = get_arg(0); + /*<>*/ /*<>*/ caml_call1 + (f$1, arg$0); + /*<>*/ return consume_arg(0); + case 5: + var r$1 = param[1]; + r$1[1] = get_arg(0); + /*<>*/ return consume_arg(0); + case 6: + /*<>*/ var + f$2 = param[1], + /*<>*/ arg$1 = get_arg(0), + /*<>*/ match$0 = int_of_string_opt(arg$1); + if(! match$0) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$1, cst_an_integer]], 1); + var x = match$0[1]; + /*<>*/ /*<>*/ caml_call1 + (f$2, x); + /*<>*/ return consume_arg(0); + case 7: + /*<>*/ var + r$2 = param[1], + /*<>*/ arg$2 = get_arg(0), + /*<>*/ match$1 = int_of_string_opt(arg$2); + if(! match$1) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$2, cst_an_integer$0]], 1); + var x$0 = match$1[1]; + r$2[1] = x$0; + /*<>*/ return consume_arg(0); + case 8: + /*<>*/ var + f$3 = param[1], + /*<>*/ arg$3 = get_arg(0), + /*<>*/ match$2 = float_of_string_opt(arg$3); + if(! match$2) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$3, cst_a_float]], 1); + var x$1 = match$2[1]; + /*<>*/ /*<>*/ caml_call1 + (f$3, x$1); + /*<>*/ return consume_arg(0); + case 9: + /*<>*/ var + r$3 = param[1], + /*<>*/ arg$4 = get_arg(0), + /*<>*/ match$3 = float_of_string_opt(arg$4); + if(! match$3) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stop, [1, s, arg$4, cst_a_float$0]], 1); + var x$2 = match$3[1]; + r$3[1] = x$2; + /*<>*/ return consume_arg(0); + case 10: + var specs = param[1]; + /*<>*/ no_arg(0); + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[18], treat_action, specs); + case 11: + /*<>*/ var + f$4 = param[2], + symb = param[1], + /*<>*/ arg$5 = get_arg(0); + /*<>*/ if + ( /*<>*/ caml_call2 + (Stdlib_List[37], arg$5, symb)){ + /*<>*/ /*<>*/ caml_call1 + (f$4, arg$5); + /*<>*/ return consume_arg(0); + } + /*<>*/ /*<>*/ var + _ad_ = make_symlist(cst$6, cst$5, cst$4, symb); + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, + Stop, + [1, + s, + arg$5, + /*<>*/ caml_call2 + (Stdlib[28], cst_one_of, _ad_)]], + 1); + case 12: + var f$5 = param[1]; + /*<>*/ no_arg(0); + /*<>*/ for(;;){ + if(current[1] >= (argv[1].length - 1 - 1 | 0)) return 0; + var _ae_ = current[1] + 1 | 0; + /*<>*/ /*<>*/ caml_call1 + (f$5, caml_check_bound(argv[1], _ae_)[1 + _ae_]); + /*<>*/ consume_arg(0); + } + break; + case 13: + var f$6 = param[1]; + /*<>*/ no_arg(0); + /*<>*/ /*<>*/ var acc = [0, 0]; + /*<>*/ for(;;){ + if(current[1] >= (argv[1].length - 1 - 1 | 0)) + /*<>*/ return /*<>*/ caml_call1 + (f$6, + /*<>*/ caml_call1(Stdlib_List[10], acc[1])); + var _ag_ = current[1] + 1 | 0, _af_ = acc[1]; + acc[1] = [0, caml_check_bound(argv[1], _ag_)[1 + _ag_], _af_]; + /*<>*/ consume_arg(0); + } + break; + default: + var f$7 = param[1]; + if(1 - allow_expand) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + ([0, Stdlib[6], cst_Arg_Expand_is_is_only_allo], 1); + /*<>*/ var + /*<>*/ arg$6 = get_arg(0), + /*<>*/ newarg = + /*<>*/ caml_call1(f$7, arg$6); + /*<>*/ consume_arg(0); + /*<>*/ var + /*<>*/ before = + /*<>*/ caml_call3 + (Stdlib_Array[5], argv[1], 0, current[1] + 1 | 0), + /*<>*/ after = + /*<>*/ caml_call3 + (Stdlib_Array[5], + argv[1], + current[1] + 1 | 0, + (argv[1].length - 1 - current[1] | 0) - 1 | 0); + argv[1] = + /*<>*/ caml_call1 + (Stdlib_Array[4], [0, before, [0, newarg, [0, after, 0]]]); + return 0; + } + /*<>*/ } + return treat_action; + }, + treat_action = treat_action$0(s, no_arg, get_arg, consume_arg); + /*<>*/ treat_action(action); } + else + /*<>*/ /*<>*/ caml_call1(anonfun, s); } catch(exn$0){ var exn = caml_wrap_exception(exn$0); @@ -20668,14 +21357,14 @@ /*<>*/ } /*<>*/ try{ /*<>*/ /*<>*/ var - n$0 = /*<>*/ caml_call2(Stdlib_String[35], s, 9); + n$0 = /*<>*/ caml_call2(Stdlib_String[36], s, 9); } catch(_T_){ var _R_ = caml_wrap_exception(_T_); if(_R_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_R_, 0); /*<>*/ try{ /*<>*/ /*<>*/ var - n = /*<>*/ caml_call2(Stdlib_String[35], s, 32); + n = /*<>*/ caml_call2(Stdlib_String[36], s, 32); } catch(_U_){ var _S_ = caml_wrap_exception(_U_); @@ -20703,7 +21392,7 @@ /*<>*/ return c; /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[17], _P_, s); + (Stdlib_String[18], _P_, s); /*<>*/ } function align(opt, speclist){ /*<>*/ if(opt) @@ -20714,12 +21403,12 @@ /*<>*/ completed = add_help(speclist), /*<>*/ len = /*<>*/ caml_call3 - (Stdlib_List[25], max_arg_len, 0, completed), + (Stdlib_List[26], max_arg_len, 0, completed), /*<>*/ len$0 = /*<>*/ caml_call2(Stdlib_Int[10], len, limit); /*<>*/ function _J_(ksd){ var kwd = ksd[1], spec = ksd[2]; - if(! caml_string_notequal(ksd[3], cst$7)) + if(! caml_string_notequal(ksd[3], cst$8)) /*<>*/ return ksd; if(11 === spec[0]){ /*<>*/ var @@ -20738,7 +21427,7 @@ /*<>*/ return [0, kwd, spec, - /*<>*/ caml_call2(Stdlib[28], cst$6, _O_)]; + /*<>*/ caml_call2(Stdlib[28], cst$7, _O_)]; } /*<>*/ var msg = ksd[3], @@ -20754,10 +21443,10 @@ /*<>*/ caml_call2(Stdlib_String[1], diff, 32), /*<>*/ _K_ = replace_leading_tab(msg), /*<>*/ prefix = - /*<>*/ caml_call3(Stdlib_String[15], _K_, 0, cutcol), + /*<>*/ caml_call3(Stdlib_String[16], _K_, 0, cutcol), /*<>*/ suffix = /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], msg, cutcol, caml_ml_string_length(msg) - cutcol | 0), @@ -20769,7 +21458,7 @@ /*<>*/ caml_call2(Stdlib[28], prefix, _L_)]; } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[19], _J_, completed); + (Stdlib_List[20], _J_, completed); /*<>*/ } function read_aux(trim, sep, file){ /*<>*/ var @@ -20791,7 +21480,7 @@ var _I_ = /*<>*/ caml_call3 - (Stdlib_String[15], word, 0, len - 1 | 0); + (Stdlib_String[16], word, 0, len - 1 | 0); break a; } var _I_ = word; @@ -20822,7 +21511,7 @@ /*<>*/ stash(0); /*<>*/ /*<>*/ caml_call1(Stdlib[93], ic); /*<>*/ /*<>*/ var - _G_ = /*<>*/ caml_call1(Stdlib_List[9], words[1]); + _G_ = /*<>*/ caml_call1(Stdlib_List[10], words[1]); /*<>*/ return /*<>*/ caml_call1 (Stdlib_Array[10], _G_); } @@ -20874,7 +21563,7 @@ read_arg0, write_arg, write_arg0]; - runtime.caml_register_global(54, Stdlib_Arg, "Stdlib__Arg"); + runtime.caml_register_global(55, Stdlib_Arg, "Stdlib__Arg"); return; /*<>*/ } (globalThis)); @@ -21588,7 +22277,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Gc -//# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Printf, Stdlib__Sys +//# unitInfo: Requires: Stdlib, Stdlib__Atomic, Stdlib__Fun, Stdlib__Printf, Stdlib__Sys (function (globalThis){ "use strict"; @@ -21618,7 +22307,9 @@ } var global_data = runtime.caml_get_global_data(), - Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib_Atomic = global_data.Stdlib__Atomic; + global_data.Stdlib__Fun; + var Stdlib = global_data.Stdlib, Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Printf = global_data.Stdlib__Printf, @@ -21800,7 +22491,7 @@ eventlog_pause, eventlog_resume, _z_]; - runtime.caml_register_global(25, Stdlib_Gc, "Stdlib__Gc"); + runtime.caml_register_global(26, Stdlib_Gc, "Stdlib__Gc"); return; /*<>*/ } (globalThis)); @@ -21836,8 +22527,8 @@ Stdlib_Char = global_data.Stdlib__Char, Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_String = global_data.Stdlib__String, - compare = Stdlib_String[9], - equal = Stdlib_String[8], + compare = Stdlib_String[10], + equal = Stdlib_String[9], cst_Digest_from_hex$0 = cst_Digest_from_hex$1, cst_Digest_from_hex = cst_Digest_from_hex$1, cst_Digest_to_hex = "Digest.to_hex", @@ -22035,7 +22726,7 @@ complex64 = 11, char$0 = 12; function kind_size_in_bytes(param){ - /*<>*/ switch(param){ + /*<>*/ switch(param){ case 0: /*<>*/ return 4; case 1: @@ -22062,10 +22753,8 @@ /*<>*/ return 16; default: /*<>*/ return 1; } - /*<>*/ } - /*<>*/ var - /*<>*/ c_layout = 0, - fortran_layout = 1; + } + var c_layout = 0, fortran_layout = 1; function cloop(arr, idx, f, col, max){ /*<>*/ if(col === idx.length - 1) /*<>*/ return /*<>*/ caml_ba_set_generic @@ -22155,7 +22844,7 @@ /*<>*/ _ac_ = dims(arr), /*<>*/ _ad_ = /*<>*/ caml_call3 - (Stdlib_Array[15], caml_mul, 1, _ac_); + (Stdlib_Array[17], caml_mul, 1, _ac_); /*<>*/ return /*<>*/ caml_mul (kind_size_in_bytes( /*<>*/ caml_ba_kind(arr)), _ad_); @@ -22668,7 +23357,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Random -//# unitInfo: Requires: Stdlib, Stdlib__Bigarray, Stdlib__Bytes, Stdlib__Digest, Stdlib__Domain, Stdlib__Int32, Stdlib__Int64, Stdlib__Nativeint, Stdlib__String +//# unitInfo: Requires: Stdlib, Stdlib__Bigarray, Stdlib__Bytes, Stdlib__Digest, Stdlib__Domain, Stdlib__Int32, Stdlib__Int64, Stdlib__Nativeint, Stdlib__String, Stdlib__Sys (function (globalThis){ "use strict"; @@ -22677,6 +23366,7 @@ caml_ba_blit = runtime.caml_ba_blit, caml_ba_set_1 = runtime.caml_ba_set_1, caml_bytes_set = runtime.caml_bytes_set, + caml_create_bytes = runtime.caml_create_bytes, caml_greaterthan = runtime.caml_greaterthan, caml_int64_of_int32 = runtime.caml_int64_of_int32, caml_int64_shift_right_unsigne = runtime.caml_int64_shift_right_unsigned, @@ -22701,9 +23391,15 @@ return (f.l >= 0 ? f.l : f.l = f.length) == 3 ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); + } + /*<>*/ function caml_call5(f, a0, a1, a2, a3, a4){ + return (f.l >= 0 ? f.l : f.l = f.length) == 5 + ? f(a0, a1, a2, a3, a4) + : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); } var global_data = runtime.caml_get_global_data(), + serialization_prefix = "lxm1:", Stdlib_Domain = global_data.Stdlib__Domain, Stdlib = global_data.Stdlib, Stdlib_Int32 = global_data.Stdlib__Int32, @@ -22711,6 +23407,7 @@ Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Digest = global_data.Stdlib__Digest, Stdlib_String = global_data.Stdlib__String, + Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Bigarray = global_data.Stdlib__Bigarray, Stdlib_Nativeint = global_data.Stdlib__Nativeint, _j_ = runtime.caml_int64_create_lo_mi_hi(14371852, 15349651, 22696), @@ -22725,6 +23422,8 @@ cst_Random_int32 = "Random.int32", cst_Random_full_int = "Random.full_int", cst_Random_int = "Random.int", + cst_Random_State_of_binary_str = + "Random.State.of_binary_string: expected a format compatible with OCaml ", _a_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), _b_ = runtime.caml_int64_create_lo_mi_hi(0, 0, 0), _e_ = runtime.caml_int64_create_lo_mi_hi(1, 0, 0), @@ -22751,291 +23450,344 @@ /*<>*/ set(s, i1, i2, i3, i4); /*<>*/ return s; /*<>*/ } + var serialization_prefix_len = 5; + function to_binary_string(s){ + /*<>*/ /*<>*/ var + buf = /*<>*/ caml_create_bytes(37); + /*<>*/ /*<>*/ caml_call5 + (Stdlib_Bytes[12], + serialization_prefix, + 0, + buf, + 0, + serialization_prefix_len); + var i = 0; + for(;;){ + /*<>*/ /*<>*/ var + _y_ = /*<>*/ runtime.caml_ba_get_1(s, i); + /*<>*/ /*<>*/ caml_call3 + (Stdlib_Bytes[86], buf, 5 + (i * 8 | 0) | 0, _y_); + /*<>*/ /*<>*/ var _z_ = i + 1 | 0; + if(3 === i) + /*<>*/ return /*<>*/ caml_call1 + (Stdlib_Bytes[44], buf); + var i = _z_; + } + /*<>*/ } + function of_binary_string(buf){ + /*<>*/ var + _v_ = runtime.caml_ml_string_length(buf) !== 37 ? 1 : 0, + _w_ = + _v_ + || + 1 + - + /*<>*/ caml_call2 + (Stdlib_String[11], serialization_prefix, buf); + if(_w_){ + /*<>*/ /*<>*/ var + _x_ = + /*<>*/ caml_call2 + (Stdlib[28], cst_Random_State_of_binary_str, Stdlib_Sys[46]); + /*<>*/ /*<>*/ caml_call1 + (Stdlib[2], _x_); + } + /*<>*/ var + /*<>*/ i1 = + /*<>*/ caml_call2(Stdlib_String[64], buf, 5), + /*<>*/ i2 = + /*<>*/ caml_call2(Stdlib_String[64], buf, 13), + /*<>*/ i3 = + /*<>*/ caml_call2(Stdlib_String[64], buf, 21), + /*<>*/ i4 = + /*<>*/ caml_call2(Stdlib_String[64], buf, 29); + /*<>*/ return mk(i1, i2, i3, i4); + /*<>*/ } function copy(s){ - /*<>*/ /*<>*/ var s$0 = create(0); - /*<>*/ /*<>*/ caml_ba_blit(s, s$0); - /*<>*/ return s$0; - /*<>*/ } + /*<>*/ /*<>*/ var s$0 = create(0); + /*<>*/ /*<>*/ caml_ba_blit(s, s$0); + /*<>*/ return s$0; + /*<>*/ } function reinit(s, seed){ - /*<>*/ var + /*<>*/ var n = seed.length - 1, - /*<>*/ b = - /*<>*/ runtime.caml_create_bytes((n * 8 | 0) + 1 | 0), - /*<>*/ _p_ = n - 1 | 0, - /*<>*/ _o_ = 0; + /*<>*/ b = + /*<>*/ caml_create_bytes((n * 8 | 0) + 1 | 0), + /*<>*/ _p_ = n - 1 | 0, + /*<>*/ _o_ = 0; if(_p_ >= 0){ var i = _o_; for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _t_ = - /*<>*/ caml_int64_of_int32 + /*<>*/ caml_int64_of_int32 (runtime.caml_check_bound(seed, i)[1 + i]); - /*<>*/ /*<>*/ caml_call3 + /*<>*/ /*<>*/ caml_call3 (Stdlib_Bytes[86], b, i * 8 | 0, _t_); - /*<>*/ /*<>*/ var _u_ = i + 1 | 0; + /*<>*/ /*<>*/ var _u_ = i + 1 | 0; if(_p_ === i) break; var i = _u_; } } - /*<>*/ /*<>*/ caml_bytes_set + /*<>*/ /*<>*/ caml_bytes_set (b, n * 8 | 0, 1); - /*<>*/ /*<>*/ var - d1 = /*<>*/ caml_call1(Stdlib_Digest[4], b); - /*<>*/ /*<>*/ caml_bytes_set + /*<>*/ /*<>*/ var + d1 = /*<>*/ caml_call1(Stdlib_Digest[4], b); + /*<>*/ /*<>*/ caml_bytes_set (b, n * 8 | 0, 2); - /*<>*/ var - /*<>*/ d2 = - /*<>*/ caml_call1(Stdlib_Digest[4], b), - /*<>*/ _q_ = - /*<>*/ caml_call2(Stdlib_String[64], d2, 8), - /*<>*/ _r_ = - /*<>*/ caml_call2(Stdlib_String[64], d2, 0), - /*<>*/ _s_ = - /*<>*/ caml_call2(Stdlib_String[64], d1, 8); - /*<>*/ return set + /*<>*/ var + /*<>*/ d2 = + /*<>*/ caml_call1(Stdlib_Digest[4], b), + /*<>*/ _q_ = + /*<>*/ caml_call2(Stdlib_String[64], d2, 8), + /*<>*/ _r_ = + /*<>*/ caml_call2(Stdlib_String[64], d2, 0), + /*<>*/ _s_ = + /*<>*/ caml_call2(Stdlib_String[64], d1, 8); + /*<>*/ return set (s, - /*<>*/ caml_call2(Stdlib_String[64], d1, 0), + /*<>*/ caml_call2(Stdlib_String[64], d1, 0), _s_, _r_, _q_); - /*<>*/ } + /*<>*/ } function make(seed){ - /*<>*/ /*<>*/ var s = create(0); - /*<>*/ reinit(s, seed); - /*<>*/ return s; - /*<>*/ } + /*<>*/ /*<>*/ var s = create(0); + /*<>*/ reinit(s, seed); + /*<>*/ return s; + /*<>*/ } function make_self_init(param){ - /*<>*/ return make - ( /*<>*/ caml_sys_random_seed(0)); - /*<>*/ } + /*<>*/ return make + ( /*<>*/ caml_sys_random_seed(0)); + /*<>*/ } function bits(s){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)) + /*<>*/ return /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)) & 1073741823; - /*<>*/ } + /*<>*/ } function intaux(s, n){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ r = bits(s), + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ r = bits(s), v = caml_mod(r, n); if(((1073741823 - n | 0) + 1 | 0) >= (r - v | 0)) - /*<>*/ return v; + /*<>*/ return v; } - /*<>*/ } + /*<>*/ } function int$0(s, bound){ - /*<>*/ if(1073741823 >= bound && 0 < bound) - /*<>*/ return intaux(s, bound); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(1073741823 >= bound && 0 < bound) + /*<>*/ return intaux(s, bound); + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Random_int); - /*<>*/ } + /*<>*/ } function full_int(s, bound){ - /*<>*/ if(0 >= bound) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if(0 >= bound) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Random_full_int); - if(1073741823 >= bound) /*<>*/ return intaux(s, bound); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ _n_ = Stdlib[19], + if(1073741823 >= bound) /*<>*/ return intaux(s, bound); + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ _n_ = Stdlib[19], r = - /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)) + /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)) & _n_, v = caml_mod(r, bound); if(((Stdlib[19] - bound | 0) + 1 | 0) >= (r - v | 0)) - /*<>*/ return v; + /*<>*/ return v; } - /*<>*/ } + /*<>*/ } function bits32(s){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)); - /*<>*/ } + /*<>*/ return /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)); + /*<>*/ } function int32(s, bound){ - /*<>*/ if - ( /*<>*/ caml_lessequal(bound, 0)) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if + ( /*<>*/ caml_lessequal(bound, 0)) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Random_int32); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ r = bits32(s) >>> 1 | 0, - /*<>*/ v = - /*<>*/ caml_mod(r, bound); - /*<>*/ if + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ r = bits32(s) >>> 1 | 0, + /*<>*/ v = + /*<>*/ caml_mod(r, bound); + /*<>*/ if (! - /*<>*/ caml_greaterthan + /*<>*/ caml_greaterthan (r - v | 0, (Stdlib_Int32[9] - bound | 0) + 1 | 0)) - /*<>*/ return v; + /*<>*/ return v; } - /*<>*/ } + /*<>*/ } var bits64 = caml_lxm_next; function int64(s, bound){ - /*<>*/ if - ( /*<>*/ caml_lessequal(bound, _g_)) - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ if + ( /*<>*/ caml_lessequal(bound, _g_)) + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Random_int64); - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ r = - /*<>*/ caml_int64_shift_right_unsigne - ( /*<>*/ caml_lxm_next(s), 1), - /*<>*/ v = - /*<>*/ runtime.caml_int64_mod(r, bound); - /*<>*/ if + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ r = + /*<>*/ caml_int64_shift_right_unsigne + ( /*<>*/ caml_lxm_next(s), 1), + /*<>*/ v = + /*<>*/ runtime.caml_int64_mod(r, bound); + /*<>*/ if (! - /*<>*/ caml_greaterthan - ( /*<>*/ caml_int64_sub(r, v), - /*<>*/ runtime.caml_int64_add - ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], bound), + /*<>*/ caml_greaterthan + ( /*<>*/ caml_int64_sub(r, v), + /*<>*/ runtime.caml_int64_add + ( /*<>*/ caml_int64_sub(Stdlib_Int64[9], bound), _f_))) - /*<>*/ return v; + /*<>*/ return v; } - /*<>*/ } + /*<>*/ } var nativebits = 32 === Stdlib_Nativeint[9] ? function (s){ - /*<>*/ return bits32(s); - /*<>*/ } + /*<>*/ return bits32(s); + /*<>*/ } : function (s){ - /*<>*/ return /*<>*/ caml_int64_to_int32 - ( /*<>*/ caml_lxm_next(s)); - /*<>*/ }, + /*<>*/ return /*<>*/ caml_int64_to_int32 + ( /*<>*/ caml_lxm_next(s)); + /*<>*/ }, nativeint = 32 === Stdlib_Nativeint[9] ? function (s, bound){ - /*<>*/ return int32(s, bound); - /*<>*/ } + /*<>*/ return int32(s, bound); + /*<>*/ } : function (s, bound){ - /*<>*/ return /*<>*/ caml_int64_to_int32 + /*<>*/ return /*<>*/ caml_int64_to_int32 (int64 - (s, /*<>*/ caml_int64_of_int32(bound))); - /*<>*/ }; + (s, /*<>*/ caml_int64_of_int32(bound))); + /*<>*/ }; function float$0(s, bound){ - /*<>*/ for(;;){ - /*<>*/ var - /*<>*/ b = /*<>*/ caml_lxm_next(s), - /*<>*/ n = - /*<>*/ caml_int64_shift_right_unsigne(b, 11); - /*<>*/ if - ( /*<>*/ caml_notequal(n, _h_)) - /*<>*/ return /*<>*/ runtime.caml_int64_to_float + /*<>*/ for(;;){ + /*<>*/ var + /*<>*/ b = /*<>*/ caml_lxm_next(s), + /*<>*/ n = + /*<>*/ caml_int64_shift_right_unsigne(b, 11); + /*<>*/ if + ( /*<>*/ caml_notequal(n, _h_)) + /*<>*/ return /*<>*/ runtime.caml_int64_to_float (n) * 1.1102230246251565e-16 * bound; } - /*<>*/ } + /*<>*/ } function bool(s){ - /*<>*/ return /*<>*/ runtime.caml_lessthan - ( /*<>*/ caml_lxm_next(s), _i_); - /*<>*/ } + /*<>*/ return /*<>*/ runtime.caml_lessthan + ( /*<>*/ caml_lxm_next(s), _i_); + /*<>*/ } function split(s){ - /*<>*/ var - /*<>*/ i1 = /*<>*/ caml_lxm_next(s), - /*<>*/ i2 = /*<>*/ caml_lxm_next(s), - /*<>*/ i3 = /*<>*/ caml_lxm_next(s), - /*<>*/ i4 = /*<>*/ caml_lxm_next(s); - /*<>*/ return mk(i1, i2, i3, i4); - /*<>*/ } + /*<>*/ var + /*<>*/ i1 = /*<>*/ caml_lxm_next(s), + /*<>*/ i2 = /*<>*/ caml_lxm_next(s), + /*<>*/ i3 = /*<>*/ caml_lxm_next(s), + /*<>*/ i4 = /*<>*/ caml_lxm_next(s); + /*<>*/ return mk(i1, i2, i3, i4); + /*<>*/ } function mk_default(param){ - /*<>*/ return mk(_m_, _l_, _k_, _j_); - /*<>*/ } - /*<>*/ /*<>*/ var + /*<>*/ return mk(_m_, _l_, _k_, _j_); + /*<>*/ } + /*<>*/ /*<>*/ var random_key = - /*<>*/ caml_call2 + /*<>*/ caml_call2 (Stdlib_Domain[10][1], [0, split], mk_default); function bits$0(param){ - /*<>*/ return bits - ( /*<>*/ caml_call1 + /*<>*/ return bits + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function int$1(bound){ - /*<>*/ return int$0 - ( /*<>*/ caml_call1 + /*<>*/ return int$0 + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), bound); - /*<>*/ } + /*<>*/ } function full_int$0(bound){ - /*<>*/ return full_int - ( /*<>*/ caml_call1 + /*<>*/ return full_int + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), bound); - /*<>*/ } + /*<>*/ } function int32$0(bound){ - /*<>*/ return int32 - ( /*<>*/ caml_call1 + /*<>*/ return int32 + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), bound); - /*<>*/ } + /*<>*/ } function nativeint$0(bound){ - /*<>*/ return nativeint - ( /*<>*/ caml_call1 + /*<>*/ return nativeint + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), bound); - /*<>*/ } + /*<>*/ } function int64$0(bound){ - /*<>*/ return int64 - ( /*<>*/ caml_call1 + /*<>*/ return int64 + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), bound); - /*<>*/ } + /*<>*/ } function float$1(scale){ - /*<>*/ return float$0 - ( /*<>*/ caml_call1 + /*<>*/ return float$0 + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), scale); - /*<>*/ } + /*<>*/ } function bool$0(param){ - /*<>*/ return bool - ( /*<>*/ caml_call1 + /*<>*/ return bool + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function bits32$0(param){ - /*<>*/ return bits32 - ( /*<>*/ caml_call1 + /*<>*/ return bits32 + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function bits64$0(param){ - /*<>*/ return /*<>*/ caml_lxm_next - ( /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_lxm_next + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function nativebits$0(param){ - /*<>*/ return nativebits - ( /*<>*/ caml_call1 + /*<>*/ return nativebits + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function full_init(seed){ - /*<>*/ return reinit - ( /*<>*/ caml_call1 + /*<>*/ return reinit + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key), seed); - /*<>*/ } + /*<>*/ } function init(seed){ - /*<>*/ return full_init([0, seed]); - /*<>*/ } + /*<>*/ return full_init([0, seed]); + /*<>*/ } function self_init(param){ - /*<>*/ return full_init - ( /*<>*/ caml_sys_random_seed(0)); - /*<>*/ } + /*<>*/ return full_init + ( /*<>*/ caml_sys_random_seed(0)); + /*<>*/ } function split$0(param){ - /*<>*/ return split - ( /*<>*/ caml_call1 + /*<>*/ return split + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function get_state(param){ - /*<>*/ return copy - ( /*<>*/ caml_call1 + /*<>*/ return copy + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } function set_state(s){ - /*<>*/ return /*<>*/ caml_ba_blit + /*<>*/ return /*<>*/ caml_ba_blit (s, - /*<>*/ caml_call1 + /*<>*/ caml_call1 (Stdlib_Domain[10][2], random_key)); - /*<>*/ } + /*<>*/ } var Stdlib_Random = [0, @@ -23068,17 +23820,19 @@ bits32, bits64, nativebits, - split], + split, + to_binary_string, + of_binary_string], get_state, set_state, split$0]; - runtime.caml_register_global(29, Stdlib_Random, "Stdlib__Random"); + runtime.caml_register_global(32, Stdlib_Random, "Stdlib__Random"); return; /*<>*/ } (globalThis)); //# unitInfo: Provides: Stdlib__Hashtbl -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Domain, Stdlib__Int, Stdlib__Random, Stdlib__Seq, Stdlib__String, Stdlib__Sys +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__Atomic, Stdlib__Domain, Stdlib__Int, Stdlib__Random, Stdlib__Seq, Stdlib__String, Stdlib__Sys (function (globalThis){ "use strict"; @@ -23161,7 +23915,7 @@ } /*<>*/ var /*<>*/ randomized_default = - /*<>*/ caml_call2(Stdlib_String[14], params, 82), + /*<>*/ caml_call2(Stdlib_String[15], params, 82), /*<>*/ randomized = /*<>*/ caml_call1 (Stdlib_Atomic[1], randomized_default); @@ -23512,7 +24266,7 @@ /*<>*/ } /*<>*/ var /*<>*/ mbl = - /*<>*/ caml_call3(Stdlib_Array[15], _W_, _V_, _U_), + /*<>*/ caml_call3(Stdlib_Array[17], _W_, _V_, _U_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), /*<>*/ _X_ = h[2]; @@ -23555,13 +24309,13 @@ /*<>*/ /*<>*/ var _N_ = to_seq(m); function _O_(_P_){ /*<>*/ return _P_[1];} /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[27], _O_, _N_); + (Stdlib_Seq[29], _O_, _N_); /*<>*/ } function to_seq_values(m){ /*<>*/ /*<>*/ var _K_ = to_seq(m); function _L_(_M_){ /*<>*/ return _M_[2];} /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Seq[27], _L_, _K_); + (Stdlib_Seq[29], _L_, _K_); /*<>*/ } function MakeSeeded(H){ function key_index(h, key){ @@ -23666,21 +24420,39 @@ } /*<>*/ } function find_all(h, key){ - function find_in_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var k = param$0[1], d = param$0[2], next = param$0[3]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], k, key)) - /*<>*/ return [0, d, find_in_bucket(next)]; - var param$0 = next; + /*<>*/ var + /*<>*/ _F_ = key_index(h, key), + param = caml_check_bound(h[2], _F_)[1 + _F_]; + /*<>*/ for(;;){ + if(! param) /*<>*/ return 0; + var k = param[1], d = param[2], next = param[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], k, key)){ + /*<>*/ var + /*<>*/ block = [0, d, 24029], + dst = block, + offset = 1, + param$0 = next; + /*<>*/ for(;;){ + if(! param$0){ + dst[1 + offset] = 0; + /*<>*/ return block; + } + var k$0 = param$0[1], d$0 = param$0[2], next$0 = param$0[3]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], k$0, key)){ + /*<>*/ /*<>*/ var + dst$0 = [0, d$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1, param$0 = next$0; + } + else + var param$0 = next$0; + } } - /*<>*/ } - /*<>*/ /*<>*/ var - _F_ = key_index(h, key); - /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _F_)[1 + _F_]); + else + var param = next; + } /*<>*/ } function replace(h, key, data){ /*<>*/ var @@ -23711,43 +24483,43 @@ } /*<>*/ } function mem(h, key){ - /*<>*/ var - /*<>*/ _B_ = key_index(h, key), + /*<>*/ var + /*<>*/ _B_ = key_index(h, key), param = caml_check_bound(h[2], _B_)[1 + _B_]; - /*<>*/ for(;;){ - if(! param) /*<>*/ return 0; - /*<>*/ var + for(;;){ + if(! param) /*<>*/ return 0; + /*<>*/ var k = param[1], next = param[3], - /*<>*/ _A_ = - /*<>*/ caml_call2(H[1], k, key); - /*<>*/ if(_A_) - /*<>*/ return _A_; + /*<>*/ _A_ = + /*<>*/ caml_call2(H[1], k, key); + /*<>*/ if(_A_) + /*<>*/ return _A_; var param = next; } - /*<>*/ } + /*<>*/ } function add_seq(tbl, i){ function _z_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Seq[4], _z_, i); - /*<>*/ } + /*<>*/ } function replace_seq(tbl, i){ function _y_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return replace(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return replace(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Seq[4], _y_, i); - /*<>*/ } + /*<>*/ } function of_seq(i){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var tbl = create(0, 16); - /*<>*/ replace_seq(tbl, i); - /*<>*/ return tbl; - /*<>*/ } + /*<>*/ replace_seq(tbl, i); + /*<>*/ return tbl; + /*<>*/ } /*<>*/ return [0, create, clear, @@ -23775,9 +24547,9 @@ function Make(H){ var equal = H[1]; function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (H[2], x); - /*<>*/ } + /*<>*/ } var include = MakeSeeded([0, equal, seeded_hash]), clear = include[2], @@ -23802,17 +24574,17 @@ replace_seq = include[21], _x_ = include[1]; function create(sz){ - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (_x_, _d_, sz); - /*<>*/ } + /*<>*/ } function of_seq(i){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var tbl = create(16); - /*<>*/ /*<>*/ caml_call2 + /*<>*/ /*<>*/ caml_call2 (replace_seq, tbl, i); - /*<>*/ return tbl; - /*<>*/ } - /*<>*/ return [0, + /*<>*/ return tbl; + /*<>*/ } + /*<>*/ return [0, create, clear, reset, @@ -23837,46 +24609,46 @@ of_seq]; } function hash(x){ - /*<>*/ return /*<>*/ caml_hash + /*<>*/ return /*<>*/ caml_hash (10, 100, 0, x); - /*<>*/ } + /*<>*/ } function hash_param(n1, n2, x){ - /*<>*/ return /*<>*/ caml_hash + /*<>*/ return /*<>*/ caml_hash (n1, n2, 0, x); - /*<>*/ } + /*<>*/ } function seeded_hash(seed, x){ - /*<>*/ return /*<>*/ caml_hash + /*<>*/ return /*<>*/ caml_hash (10, 100, seed, x); - /*<>*/ } + /*<>*/ } function key_index(h, key){ - /*<>*/ return 4 <= h.length - 1 - ? /*<>*/ caml_hash + /*<>*/ return 4 <= h.length - 1 + ? /*<>*/ caml_hash (10, 100, h[3], key) & (h[2].length - 1 - 1 | 0) - : /*<>*/ caml_call1 + : /*<>*/ caml_call1 (Stdlib[1], cst_Hashtbl_unsupported_hash_t); - /*<>*/ } + /*<>*/ } function add(h, key, data){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ bucket = + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ bucket = [0, key, data, caml_check_bound(h[2], i)[1 + i]]; - /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; + /*<>*/ caml_check_bound(h[2], i)[1 + i] = bucket; h[1] = h[1] + 1 | 0; var _w_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; return _w_ ? resize(key_index, h) : _w_; - /*<>*/ } + /*<>*/ } function remove(h, key){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ c = caml_check_bound(h[2], i)[1 + i], + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ c = caml_check_bound(h[2], i)[1 + i], prec$0 = 0, prec = c; for(;;){ - if(! prec) /*<>*/ return 0; + if(! prec) /*<>*/ return 0; var k = prec[1], next = prec[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(k, key)){ + /*<>*/ if + (0 === /*<>*/ caml_compare(k, key)){ h[1] = h[1] - 1 | 0; return prec$0 ? (prec$0[3] = next, 0) @@ -23884,123 +24656,141 @@ } var prec$0 = prec, prec = next; } - /*<>*/ } + /*<>*/ } function find(h, key){ - /*<>*/ var - /*<>*/ _v_ = key_index(h, key), - /*<>*/ match = caml_check_bound(h[2], _v_)[1 + _v_]; + /*<>*/ var + /*<>*/ _v_ = key_index(h, key), + /*<>*/ match = caml_check_bound(h[2], _v_)[1 + _v_]; if(! match) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k1 = match[1], d1 = match[2], next1 = match[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k1)) - /*<>*/ return d1; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k1)) + /*<>*/ return d1; if(! next1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k2 = next1[1], d2 = next1[2], next2 = next1[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k2)) - /*<>*/ return d2; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k2)) + /*<>*/ return d2; if(! next2) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k3 = next2[1], d3 = next2[2], next3 = next2[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k3)) - /*<>*/ return d3; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k3)) + /*<>*/ return d3; var param = next3; for(;;){ if(! param) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (Stdlib[8], 1); var k = param[1], data = param[2], next = param[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k)) - /*<>*/ return data; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k)) + /*<>*/ return data; var param = next; } - /*<>*/ } + /*<>*/ } function find_opt(h, key){ - /*<>*/ var - /*<>*/ _u_ = key_index(h, key), - /*<>*/ match = caml_check_bound(h[2], _u_)[1 + _u_]; - if(! match) /*<>*/ return 0; + /*<>*/ var + /*<>*/ _u_ = key_index(h, key), + /*<>*/ match = caml_check_bound(h[2], _u_)[1 + _u_]; + if(! match) /*<>*/ return 0; var k1 = match[1], d1 = match[2], next1 = match[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k1)) - /*<>*/ return [0, d1]; - if(! next1) /*<>*/ return 0; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k1)) + /*<>*/ return [0, d1]; + if(! next1) /*<>*/ return 0; var k2 = next1[1], d2 = next1[2], next2 = next1[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k2)) - /*<>*/ return [0, d2]; - if(! next2) /*<>*/ return 0; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k2)) + /*<>*/ return [0, d2]; + if(! next2) /*<>*/ return 0; var k3 = next2[1], d3 = next2[2], next3 = next2[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k3)) - /*<>*/ return [0, d3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k3)) + /*<>*/ return [0, d3]; var param = next3; for(;;){ - if(! param) /*<>*/ return 0; + if(! param) /*<>*/ return 0; var k = param[1], data = param[2], next = param[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(key, k)) - /*<>*/ return [0, data]; + /*<>*/ if + (0 === /*<>*/ caml_compare(key, k)) + /*<>*/ return [0, data]; var param = next; } - /*<>*/ } + /*<>*/ } function find_all(h, key){ - function find_in_bucket(param){ - /*<>*/ var param$0 = param; - /*<>*/ for(;;){ - if(! param$0) /*<>*/ return 0; - var k = param$0[1], data = param$0[2], next = param$0[3]; - /*<>*/ if - (0 === /*<>*/ caml_compare(k, key)) - /*<>*/ return [0, data, find_in_bucket(next)]; - var param$0 = next; - } - /*<>*/ } - /*<>*/ /*<>*/ var - _t_ = key_index(h, key); - /*<>*/ return find_in_bucket - (caml_check_bound(h[2], _t_)[1 + _t_]); - /*<>*/ } + /*<>*/ var + /*<>*/ _t_ = key_index(h, key), + param = caml_check_bound(h[2], _t_)[1 + _t_]; + /*<>*/ for(;;){ + if(! param) /*<>*/ return 0; + var k = param[1], data = param[2], next = param[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(k, key)){ + /*<>*/ var + /*<>*/ block = [0, data, 24029], + dst = block, + offset = 1, + param$0 = next; + /*<>*/ for(;;){ + if(! param$0){ + dst[1 + offset] = 0; + /*<>*/ return block; + } + var k$0 = param$0[1], data$0 = param$0[2], next$0 = param$0[3]; + /*<>*/ if + (0 === /*<>*/ caml_compare(k$0, key)){ + /*<>*/ /*<>*/ var + dst$0 = [0, data$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1, param$0 = next$0; + } + else + var param$0 = next$0; + } + } + else + var param = next; + } + /*<>*/ } function replace(h, key, data){ - /*<>*/ var - /*<>*/ i = key_index(h, key), - /*<>*/ l = caml_check_bound(h[2], i)[1 + i], + /*<>*/ var + /*<>*/ i = key_index(h, key), + /*<>*/ l = caml_check_bound(h[2], i)[1 + i], slot = l; for(;;){ if(slot){ var k = slot[1], next = slot[3]; - /*<>*/ if - (0 !== /*<>*/ caml_compare(k, key)){var slot = next; continue;} + /*<>*/ if + (0 !== /*<>*/ caml_compare(k, key)){var slot = next; continue;} slot[1] = key; slot[2] = data; var _q_ = 0; } else var _q_ = 1; - /*<>*/ if(_q_){ - /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; + /*<>*/ if(_q_){ + /*<>*/ caml_check_bound(h[2], i)[1 + i] = [0, key, data, l]; h[1] = h[1] + 1 | 0; var _r_ = h[2].length - 1 << 1 < h[1] ? 1 : 0; - if(_r_) /*<>*/ return resize(key_index, h); + if(_r_) /*<>*/ return resize(key_index, h); var _s_ = _r_; } else var _s_ = _q_; return _s_; } - /*<>*/ } + /*<>*/ } function mem(h, key){ - /*<>*/ var - /*<>*/ _p_ = key_index(h, key), + /*<>*/ var + /*<>*/ _p_ = key_index(h, key), param = caml_check_bound(h[2], _p_)[1 + _p_]; - /*<>*/ for(;;){ + for(;;){ if(! param) /*<>*/ return 0; var k = param[1], @@ -24009,56 +24799,56 @@ if(_o_) return _o_; var param = next; } - /*<>*/ } + /*<>*/ } function add_seq(tbl, i){ function _n_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return add(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return add(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Seq[4], _n_, i); - /*<>*/ } + /*<>*/ } function replace_seq(tbl, i){ function _m_(param){ - /*<>*/ var v = param[2], k = param[1]; - /*<>*/ return replace(tbl, k, v); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ var v = param[2], k = param[1]; + /*<>*/ return replace(tbl, k, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Seq[4], _m_, i); - /*<>*/ } + /*<>*/ } function of_seq(i){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var tbl = create(0, 16); - /*<>*/ replace_seq(tbl, i); - /*<>*/ return tbl; - /*<>*/ } + /*<>*/ replace_seq(tbl, i); + /*<>*/ return tbl; + /*<>*/ } function rebuild(opt, h){ - /*<>*/ if(opt) + /*<>*/ if(opt) var sth = opt[1], random = sth; else var random = - /*<>*/ caml_call1(Stdlib_Atomic[2], randomized); - /*<>*/ /*<>*/ var + /*<>*/ caml_call1(Stdlib_Atomic[2], randomized); + /*<>*/ /*<>*/ var s = power_2_above(16, h[2].length - 1); - /*<>*/ if(random) - /*<>*/ var - /*<>*/ _g_ = - /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), - seed = /*<>*/ caml_call1(Stdlib_Random[15][4], _g_); + /*<>*/ if(random) + /*<>*/ var + /*<>*/ _g_ = + /*<>*/ caml_call1(Stdlib_Domain[10][2], prng_key), + seed = /*<>*/ caml_call1(Stdlib_Random[15][4], _g_); else var seed = 4 <= h.length - 1 ? h[3] : 0; - /*<>*/ var + /*<>*/ var _h_ = 4 <= h.length - 1 ? h[4] : s, - /*<>*/ h$0 = - [0, h[1], /*<>*/ caml_make_vect(s, 0), seed, _h_], + /*<>*/ h$0 = + [0, h[1], /*<>*/ caml_make_vect(s, 0), seed, _h_], _i_ = h$0[2], _j_ = h[2], _k_ = 0; - /*<>*/ insert_all_buckets + /*<>*/ insert_all_buckets (function(_l_){ /*<>*/ return key_index(h$0, _l_);}, _k_, _j_, _i_); - /*<>*/ return h$0; - /*<>*/ } + /*<>*/ return h$0; + /*<>*/ } var Stdlib_Hashtbl = [0, @@ -24123,6 +24913,11 @@ return (f.l >= 0 ? f.l : f.l = f.length) == 3 ? f(a0, a1, a2) : runtime.caml_call_gen(f, [a0, a1, a2]); + } + /*<>*/ function caml_call4(f, a0, a1, a2, a3){ + return (f.l >= 0 ? f.l : f.l = f.length) == 4 + ? f(a0, a1, a2, a3) + : runtime.caml_call_gen(f, [a0, a1, a2, a3]); } /*<>*/ function caml_call5(f, a0, a1, a2, a3, a4){ return (f.l >= 0 ? f.l : f.l = f.length) == 5 @@ -24146,9 +24941,9 @@ cst_Weak_create = "Weak.create"; function create(l){ /*<>*/ var - _W_ = 0 <= l ? 1 : 0, - _X_ = _W_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _W_; - if(1 - _X_) + _Z_ = 0 <= l ? 1 : 0, + ___ = _Z_ ? l <= Stdlib_Obj[24][15] ? 1 : 0 : _Z_; + if(1 - ___) /*<>*/ /*<>*/ caml_call1 (Stdlib[1], cst_Weak_create); /*<>*/ return /*<>*/ runtime.caml_weak_create @@ -24159,10 +24954,10 @@ /*<>*/ } function raise_if_invalid_offset(e, o, msg){ /*<>*/ var - _T_ = 0 <= o ? 1 : 0, - _U_ = _T_ ? o < length(e) ? 1 : 0 : _T_, - _V_ = 1 - _U_; - return _V_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _V_; + _W_ = 0 <= o ? 1 : 0, + _X_ = _W_ ? o < length(e) ? 1 : 0 : _W_, + _Y_ = 1 - _X_; + return _Y_ ? /*<>*/ caml_call1(Stdlib[1], msg) : _Y_; /*<>*/ } function set(e, o, x){ /*<>*/ raise_if_invalid_offset(e, o, cst_Weak_set); @@ -24195,13 +24990,13 @@ 0 <= o1 && (length(e1) - l | 0) >= o1 && 0 <= o2 && (length(e2) - l | 0) >= o2){ var - _R_ = 0 !== l ? 1 : 0, - _S_ = - _R_ + _U_ = 0 !== l ? 1 : 0, + _V_ = + _U_ ? /*<>*/ runtime.caml_ephe_blit_key (e1, o1, e2, o2, l) - : _R_; - /*<>*/ return _S_; + : _U_; + /*<>*/ return _V_; } /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], cst_Weak_blit); @@ -24209,14 +25004,14 @@ function fill(ar, ofs, len, x){ /*<>*/ if (0 <= ofs && 0 <= len && (length(ar) - len | 0) >= ofs){ - var _P_ = (ofs + len | 0) - 1 | 0; - if(_P_ >= ofs){ + var _S_ = (ofs + len | 0) - 1 | 0; + if(_S_ >= ofs){ var i = ofs; for(;;){ /*<>*/ set(ar, i, x); - /*<>*/ /*<>*/ var _Q_ = i + 1 | 0; - if(_P_ === i) break; - var i = _Q_; + /*<>*/ /*<>*/ var _T_ = i + 1 | 0; + if(_S_ === i) break; + var i = _T_; } } return 0; @@ -24244,16 +25039,16 @@ /*<>*/ } function clear(t){ /*<>*/ var - _N_ = t[1].length - 1 - 1 | 0, - /*<>*/ _M_ = 0; - if(_N_ >= 0){ - var i = _M_; + _Q_ = t[1].length - 1 - 1 | 0, + /*<>*/ _P_ = 0; + if(_Q_ >= 0){ + var i = _P_; for(;;){ /*<>*/ caml_check_bound(t[1], i)[1 + i] = emptybucket; /*<>*/ caml_check_bound(t[2], i)[1 + i] = [0]; - /*<>*/ /*<>*/ var _O_ = i + 1 | 0; - if(_N_ === i) break; - var i = _O_; + /*<>*/ /*<>*/ var _R_ = i + 1 | 0; + if(_Q_ === i) break; + var i = _R_; } } t[3] = limit; @@ -24261,8 +25056,8 @@ return 0; /*<>*/ } function fold(f, t, init){ - /*<>*/ var _K_ = t[1], i = 0; - /*<>*/ function _L_(b, accu$1){ + /*<>*/ var _N_ = t[1], i = 0; + /*<>*/ function _O_(b, accu$1){ var i$0 = i, accu = accu$1; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu; @@ -24281,11 +25076,11 @@ } } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _L_, _K_, init); + (Stdlib_Array[19], _O_, _N_, init); /*<>*/ } function iter(f, t){ - /*<>*/ var _I_ = t[1], i = 0; - /*<>*/ function _J_(b){ + /*<>*/ var _L_ = t[1], i = 0; + /*<>*/ function _M_(b){ var i$0 = i; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return 0; @@ -24301,15 +25096,15 @@ } } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Array[11], _J_, _I_); + (Stdlib_Array[11], _M_, _L_); /*<>*/ } function count_bucket(i, b, accu){ /*<>*/ var i$0 = i, accu$0 = accu; /*<>*/ for(;;){ if(length(b) <= i$0) /*<>*/ return accu$0; /*<>*/ var - /*<>*/ _H_ = check(b, i$0) ? 1 : 0, - accu$1 = accu$0 + _H_ | 0, + /*<>*/ _K_ = check(b, i$0) ? 1 : 0, + accu$1 = accu$0 + _K_ | 0, i$1 = i$0 + 1 | 0, i$0 = i$1, accu$0 = accu$1; @@ -24317,14 +25112,14 @@ /*<>*/ } function count(t){ /*<>*/ var - /*<>*/ _B_ = 0, - _C_ = t[1], - _D_ = 0; - /*<>*/ function _E_(_F_, _G_){ - /*<>*/ return count_bucket(_D_, _F_, _G_); + /*<>*/ _E_ = 0, + _F_ = t[1], + _G_ = 0; + /*<>*/ function _H_(_I_, _J_){ + /*<>*/ return count_bucket(_G_, _I_, _J_); } /*<>*/ return /*<>*/ caml_call3 - (Stdlib_Array[17], _E_, _C_, _B_); + (Stdlib_Array[19], _H_, _F_, _E_); /*<>*/ } function add_aux(t, setter, d, h, index){ /*<>*/ var @@ -24357,18 +25152,18 @@ /*<>*/ caml_check_bound(newhashes, sz)[1 + sz] = h; /*<>*/ caml_check_bound(t[1], index)[1 + index] = newbucket$0; /*<>*/ caml_check_bound(t[2], index)[1 + index] = newhashes; - var _x_ = sz <= t[3] ? 1 : 0, _y_ = _x_ ? t[3] < newsz ? 1 : 0 : _x_; - if(_y_){ + var _A_ = sz <= t[3] ? 1 : 0, _B_ = _A_ ? t[3] < newsz ? 1 : 0 : _A_; + if(_B_){ t[4] = t[4] + 1 | 0; var i$4 = 0; for(;;){ /*<>*/ var - _n_ = t[5], + _q_ = t[5], /*<>*/ bucket = - caml_check_bound(t[1], _n_)[1 + _n_], - /*<>*/ _o_ = t[5], + caml_check_bound(t[1], _q_)[1 + _q_], + /*<>*/ _r_ = t[5], /*<>*/ hbucket = - caml_check_bound(t[2], _o_)[1 + _o_], + caml_check_bound(t[2], _r_)[1 + _r_], /*<>*/ len = length(bucket), prev_len = (((len - 3 | 0) * 2 | 0) + 2 | 0) / 3 | 0, /*<>*/ live = count_bucket(0, bucket, 0); @@ -24380,28 +25175,28 @@ /*<>*/ for(;;){ if(prev_len > j){ if(0 === prev_len){ - var _q_ = t[5]; - /*<>*/ caml_check_bound(t[1], _q_)[1 + _q_] = emptybucket; - var _r_ = t[5]; - /*<>*/ caml_check_bound(t[2], _r_)[1 + _r_] = [0]; + var _t_ = t[5]; + /*<>*/ caml_check_bound(t[1], _t_)[1 + _t_] = emptybucket; + var _u_ = t[5]; + /*<>*/ caml_check_bound(t[2], _u_)[1 + _u_] = [0]; } else{ /*<>*/ /*<>*/ var newbucket = create(prev_len); /*<>*/ blit(bucket, 0, newbucket, 0, prev_len); - var _u_ = t[5]; - /*<>*/ caml_check_bound(t[1], _u_)[1 + _u_] = newbucket; + var _x_ = t[5]; + /*<>*/ caml_check_bound(t[1], _x_)[1 + _x_] = newbucket; /*<>*/ var - /*<>*/ _v_ = + /*<>*/ _y_ = /*<>*/ caml_call3 (Stdlib_Array[5], hbucket, 0, prev_len), - _w_ = t[5]; - /*<>*/ caml_check_bound(t[2], _w_)[1 + _w_] = _v_; + _z_ = t[5]; + /*<>*/ caml_check_bound(t[2], _z_)[1 + _z_] = _y_; } var - _s_ = t[3] < len ? 1 : 0, - _t_ = _s_ ? prev_len <= t[3] ? 1 : 0 : _s_; - if(_t_) t[4] = t[4] - 1 | 0; + _v_ = t[3] < len ? 1 : 0, + _w_ = _v_ ? prev_len <= t[3] ? 1 : 0 : _v_; + if(_w_) t[4] = t[4] - 1 | 0; break; } /*<>*/ if(check(bucket, i$0)) @@ -24409,8 +25204,8 @@ else if(check(bucket, j)){ /*<>*/ blit(bucket, j, bucket, i$0, 1); /*<>*/ /*<>*/ var - _p_ = caml_check_bound(hbucket, j)[1 + j]; - /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _p_; + _s_ = caml_check_bound(hbucket, j)[1 + j]; + /*<>*/ caml_check_bound(hbucket, i$0)[1 + i$0] = _s_; /*<>*/ var /*<>*/ j$0 = j - 1 | 0, i$2 = i$0 + 1 | 0, @@ -24425,13 +25220,13 @@ } t[5] = caml_mod(t[5] + 1 | 0, t[1].length - 1); /*<>*/ /*<>*/ var - _A_ = i$4 + 1 | 0; + _D_ = i$4 + 1 | 0; if(2 === i$4) break; - var i$4 = _A_; + var i$4 = _D_; } } - var _z_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; - if(! _z_) return _z_; + var _C_ = ((t[1].length - 1) / 2 | 0) < t[4] ? 1 : 0; + if(! _C_) return _C_; /*<>*/ var oldlen = t[1].length - 1, /*<>*/ newlen = @@ -24442,9 +25237,9 @@ if(oldlen < newlen){ /*<>*/ var /*<>*/ newt = create$0(newlen), - _l_ = t[1], + _o_ = t[1], i = 0, - /*<>*/ _m_ = + /*<>*/ _p_ = function(j, ob){ var oi = i; /*<>*/ for(;;){ @@ -24470,7 +25265,7 @@ } }; /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[12], _m_, _l_); + (Stdlib_Array[12], _p_, _o_); t[1] = newt[1]; t[2] = newt[2]; t[3] = newt[3]; @@ -24499,217 +25294,155 @@ /*<>*/ return add_aux (t, set, [0, d], h, get_index(t, h)); /*<>*/ } - function find_or(t, d, ifnotfound){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = + function find_aux(t, d, found, notfound){ + /*<>*/ var + /*<>*/ h = /*<>*/ caml_call1(H[2], d), + /*<>*/ index = get_index(t, h), + /*<>*/ bucket = caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = + /*<>*/ hashes = caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), + /*<>*/ sz = length(bucket), i = 0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(sz <= i) - /*<>*/ return /*<>*/ caml_call2 - (ifnotfound, h, index); + /*<>*/ return /*<>*/ caml_call2 + (notfound, h, index); if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)){ - /*<>*/ /*<>*/ var - match$0 = get(bucket, i); - if(match$0){ - var v$0 = match$0[1]; - /*<>*/ return v$0; - } - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - continue; - } + /*<>*/ /*<>*/ var + opt = get(bucket, i); + if(opt){ + var v = opt[1]; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], v, d)) + /*<>*/ return /*<>*/ caml_call4 + (found, bucket, i, opt, v); } - /*<>*/ var - /*<>*/ i$1 = i + 1 | 0, - i = i$1; + /*<>*/ var + /*<>*/ i$0 = i + 1 | 0, + i = i$0; } else - /*<>*/ var - /*<>*/ i$2 = i + 1 | 0, - i = i$2; + /*<>*/ var + /*<>*/ i$1 = i + 1 | 0, + i = i$1; } - /*<>*/ } + /*<>*/ } + function find_opt(t, d){ + /*<>*/ function _n_(h, i){ + /*<>*/ return 0; + /*<>*/ } + /*<>*/ return find_aux + (t, + d, + function(b, i, o, v){ + /*<>*/ return o; + /*<>*/ }, + _n_); + /*<>*/ } function merge(t, d){ - /*<>*/ return find_or + function _m_(h, i){ + /*<>*/ add_aux(t, set, [0, d], h, i); + /*<>*/ return d; + /*<>*/ } + /*<>*/ return find_aux (t, d, - function(h, index){ - /*<>*/ add_aux(t, set, [0, d], h, index); - /*<>*/ return d; - /*<>*/ }); - /*<>*/ } + function(b, i, o, v){ + /*<>*/ return v; + /*<>*/ }, + _m_); + /*<>*/ } function find(t, d){ - /*<>*/ return find_or + /*<>*/ function _l_(h, i){ + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (Stdlib[8], 1); + /*<>*/ } + /*<>*/ return find_aux (t, d, - function(h, index){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace - (Stdlib[8], 1); - /*<>*/ }); - /*<>*/ } - function find_opt(t, d){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), - i = 0; - /*<>*/ for(;;){ - if(sz <= i) /*<>*/ return 0; - if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)){ - /*<>*/ /*<>*/ var - v$0 = get(bucket, i); - if(v$0) /*<>*/ return v$0; - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - continue; - } - } - /*<>*/ var - /*<>*/ i$1 = i + 1 | 0, - i = i$1; - } - else - /*<>*/ var - /*<>*/ i$2 = i + 1 | 0, - i = i$2; - } - /*<>*/ } - function find_shadow(t, d, iffound, ifnotfound){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = - caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = - caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), - i = 0; - /*<>*/ for(;;){ - if(sz <= i) return ifnotfound; - if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); - if(match){ - var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)) - /*<>*/ return /*<>*/ caml_call2 - (iffound, bucket, i); - } - /*<>*/ var - /*<>*/ i$0 = i + 1 | 0, - i = i$0; - } - else - /*<>*/ var - /*<>*/ i$1 = i + 1 | 0, - i = i$1; - } - /*<>*/ } + function(b, i, o, v){ + /*<>*/ return v; + /*<>*/ }, + _l_); + /*<>*/ } function remove(t, d){ - /*<>*/ /*<>*/ var _k_ = 0; - /*<>*/ return find_shadow + /*<>*/ function _k_(h, i){ + /*<>*/ return 0; + /*<>*/ } + /*<>*/ return find_aux (t, d, - function(w, i){ - /*<>*/ return set(w, i, 0); - /*<>*/ }, + function(b, i, o, v){ + /*<>*/ return set(b, i, 0); + /*<>*/ }, _k_); - /*<>*/ } + /*<>*/ } function mem(t, d){ - /*<>*/ /*<>*/ var _j_ = 0; - /*<>*/ return find_shadow + /*<>*/ function _j_(h, i){ + /*<>*/ return 0; + /*<>*/ } + /*<>*/ return find_aux (t, d, - function(w, i){ - /*<>*/ return 1; - /*<>*/ }, + function(b, i, o, v){ + /*<>*/ return 1; + /*<>*/ }, _j_); - /*<>*/ } + /*<>*/ } function find_all(t, d){ - /*<>*/ var - /*<>*/ h = /*<>*/ caml_call1(H[2], d), - /*<>*/ index = get_index(t, h), - /*<>*/ bucket = + /*<>*/ var + /*<>*/ h = /*<>*/ caml_call1(H[2], d), + /*<>*/ index = get_index(t, h), + /*<>*/ bucket = caml_check_bound(t[1], index)[1 + index], - /*<>*/ hashes = + /*<>*/ hashes = caml_check_bound(t[2], index)[1 + index], - /*<>*/ sz = length(bucket), + /*<>*/ sz = length(bucket), i = 0, accu = 0; - /*<>*/ for(;;){ - if(sz <= i) /*<>*/ return accu; + /*<>*/ for(;;){ + if(sz <= i) /*<>*/ return accu; if(h === caml_check_bound(hashes, i)[1 + i]){ - /*<>*/ /*<>*/ var - match = get_copy(bucket, i); + /*<>*/ /*<>*/ var + match = get(bucket, i); if(match){ var v = match[1]; - /*<>*/ if - ( /*<>*/ caml_call2(H[1], v, d)){ - /*<>*/ /*<>*/ var - match$0 = get(bucket, i); - if(match$0){ - /*<>*/ var - v$0 = match$0[1], - /*<>*/ accu$0 = [0, v$0, accu], - /*<>*/ i$0 = i + 1 | 0, - i = i$0, - accu = accu$0; - continue; - } - var i$1 = i + 1 | 0, i = i$1; + /*<>*/ if + ( /*<>*/ caml_call2(H[1], v, d)){ + /*<>*/ var + /*<>*/ accu$0 = [0, v, accu], + /*<>*/ i$0 = i + 1 | 0, + i = i$0, + accu = accu$0; continue; } } - var i$2 = i + 1 | 0, i = i$2; + var i$1 = i + 1 | 0, i = i$1; } else - var i$3 = i + 1 | 0, i = i$3; + var i$2 = i + 1 | 0, i = i$2; } - /*<>*/ } + /*<>*/ } function stats(t){ - /*<>*/ var + /*<>*/ var len = t[1].length - 1, - /*<>*/ lens = - /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); - /*<>*/ /*<>*/ caml_call2 - (Stdlib_Array[30], runtime.caml_int_compare, lens); + /*<>*/ lens = + /*<>*/ caml_call2(Stdlib_Array[13], length, t[1]); + /*<>*/ /*<>*/ caml_call2 + (Stdlib_Array[34], runtime.caml_int_compare, lens); var _a_ = 0; function _b_(_i_, _h_){ /*<>*/ return _i_ + _h_ | 0;} - /*<>*/ var - /*<>*/ totlen = - /*<>*/ caml_call3(Stdlib_Array[15], _b_, _a_, lens), - /*<>*/ _c_ = len - 1 | 0, + /*<>*/ var + /*<>*/ totlen = + /*<>*/ caml_call3(Stdlib_Array[17], _b_, _a_, lens), + /*<>*/ _c_ = len - 1 | 0, _e_ = len / 2 | 0, - /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], - /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], - /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; - /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; - /*<>*/ } + /*<>*/ _d_ = caml_check_bound(lens, _c_)[1 + _c_], + /*<>*/ _f_ = caml_check_bound(lens, _e_)[1 + _e_], + /*<>*/ _g_ = caml_check_bound(lens, 0)[1]; + /*<>*/ return [0, len, count(t), totlen, _g_, _f_, _d_]; + /*<>*/ } /*<>*/ return [0, create$0, clear, @@ -24734,7 +25467,7 @@ (globalThis)); //# unitInfo: Provides: Stdlib__Format -//# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Domain, Stdlib__Int, Stdlib__List, Stdlib__Queue, Stdlib__Stack, Stdlib__String +//# unitInfo: Requires: CamlinternalFormat, Stdlib, Stdlib__Array, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Domain, Stdlib__Int, Stdlib__List, Stdlib__Queue, Stdlib__Seq, Stdlib__Stack, Stdlib__String (function (globalThis){ "use strict"; @@ -24788,6 +25521,8 @@ Stdlib_String = global_data.Stdlib__String, Stdlib_Domain = global_data.Stdlib__Domain, Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_Array = global_data.Stdlib__Array, Stdlib_List = global_data.Stdlib__List, Stdlib_Stack = global_data.Stdlib__Stack, Stdlib_Int = global_data.Stdlib__Int, @@ -24865,7 +25600,7 @@ case 0: /*<>*/ /*<>*/ var match$3 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); + /*<>*/ caml_call1(Stdlib_Stack[8], state[3]); if(! match$3) /*<>*/ return 0; /*<>*/ var tabs = match$3[1][1], @@ -24891,7 +25626,7 @@ case 3: /*<>*/ /*<>*/ var match$4 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); + /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); if(! match$4) /*<>*/ return pp_output_newline(state); var width$0 = match$4[1][2]; @@ -24929,7 +25664,7 @@ /*<>*/ off = breaks[2], before = breaks[1], /*<>*/ match$6 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); + /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); if(! match$6) /*<>*/ return 0; var match$7 = match$6[1], @@ -24973,7 +25708,7 @@ n = param[1], insertion_point = state[6] - state[9] | 0, /*<>*/ match$8 = - /*<>*/ caml_call1(Stdlib_Stack[7], state[3]); + /*<>*/ caml_call1(Stdlib_Stack[8], state[3]); if(! match$8) /*<>*/ return 0; /*<>*/ var tabs$0 = match$8[1][1], @@ -25007,7 +25742,7 @@ if(state[8] < insertion_point$0){ /*<>*/ /*<>*/ var match = - /*<>*/ caml_call1(Stdlib_Stack[7], state[2]); + /*<>*/ caml_call1(Stdlib_Stack[8], state[2]); if(match){ var match$0 = match[1], width = match$0[2], box_type = match$0[1]; if(state[9] < width && 3 >= box_type - 1 >>> 0) @@ -25068,7 +25803,7 @@ /*<>*/ } function initialize_scan_stack(stack){ /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], stack); + (Stdlib_Stack[9], stack); /*<>*/ /*<>*/ var queue_elem = [0, unknown, _b_, 0]; /*<>*/ return /*<>*/ caml_call2 @@ -25076,7 +25811,7 @@ /*<>*/ } function set_size(state, ty){ /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(Stdlib_Stack[7], state[1]); + match = /*<>*/ caml_call1(Stdlib_Stack[8], state[1]); if(! match) /*<>*/ return 0; /*<>*/ var match$0 = match[1], @@ -25221,31 +25956,31 @@ caml_call1(Stdlib_Queue[11], state[28]); /*<>*/ initialize_scan_stack(state[1]); /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[2]); + (Stdlib_Stack[9], state[2]); /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[3]); + (Stdlib_Stack[9], state[3]); /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[4]); + (Stdlib_Stack[9], state[4]); /*<>*/ /*<>*/ caml_call1 - (Stdlib_Stack[8], state[5]); + (Stdlib_Stack[9], state[5]); state[10] = 0; state[14] = 0; state[9] = state[6]; /*<>*/ return pp_open_box_gen(state, 0, 3); /*<>*/ } - function pp_flush_queue(state, b){ + function pp_flush_queue(state, end_with_newline){ /*<>*/ var _bA_ = state[4]; function _bB_(param){ /*<>*/ return pp_close_stag(state, 0); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_Stack[12], _bB_, _bA_); + (Stdlib_Stack[13], _bB_, _bA_); /*<>*/ for(;;){ if(1 >= state[14]){ state[13] = pp_infinity; /*<>*/ advance_left(state); - if(b) /*<>*/ pp_output_newline(state); - /*<>*/ return pp_rinit(state); + if(end_with_newline) /*<>*/ pp_output_newline(state); + /*<>*/ return pp_rinit(state); } /*<>*/ pp_close_box(state, 0); } @@ -25304,12 +26039,12 @@ /*<>*/ pp_flush_queue(state, 1); /*<>*/ return /*<>*/ caml_call1 (state[18], 0); - /*<>*/ } + /*<>*/ } function pp_print_flush(state, param){ /*<>*/ pp_flush_queue(state, 0); /*<>*/ return /*<>*/ caml_call1 (state[18], 0); - /*<>*/ } + /*<>*/ } function pp_force_newline(state, param){ /*<>*/ var _by_ = state[14] < state[15] ? 1 : 0; return _by_ ? enqueue_advance(state, [0, zero, 3, 0]) : _by_; @@ -25856,7 +26591,7 @@ return 0; /*<>*/ } function get_symbolic_output_buffer(sob){ - /*<>*/ return caml_call1(Stdlib_List[9], sob[1]); + /*<>*/ return caml_call1(Stdlib_List[10], sob[1]); /*<>*/ } function flush_symbolic_output_buffer(sob){ /*<>*/ /*<>*/ var @@ -25874,7 +26609,7 @@ (sob, [0, /*<>*/ caml_call3 - (Stdlib_String[15], s, i, n)]); + (Stdlib_String[16], s, i, n)]); } /*<>*/ function g(_al_){ /*<>*/ return add_symbolic_output_item(sob, 0); @@ -26202,170 +26937,165 @@ (Stdlib_Domain[10][2], std_formatter_key), v); /*<>*/ } - function pp_print_list(opt, pp_v, ppf, param){ - var opt$0 = opt, param$0 = param; - for(;;){ - /*<>*/ if(opt$0) - var sth = opt$0[1], pp_sep = sth; + function pp_print_iter(opt, iter, pp_v, ppf, v){ + /*<>*/ if(opt) + var sth = opt[1], pp_sep = sth; + else + var pp_sep = pp_print_cut; + /*<>*/ /*<>*/ var + is_first = [0, 1]; + function pp_v$0(v){ + /*<>*/ if(is_first[1]) + is_first[1] = 0; else - var pp_sep = pp_print_cut; - /*<>*/ if(! param$0) - /*<>*/ return 0; - var v = param$0[1]; - if(! param$0[2]) - /*<>*/ return /*<>*/ caml_call2 - (pp_v, ppf, v); - var vs = param$0[2]; - /*<>*/ /*<>*/ caml_call2 - (pp_v, ppf, v); - /*<>*/ /*<>*/ caml_call2 - (pp_sep, ppf, 0); - /*<>*/ var - /*<>*/ opt$1 = [0, pp_sep], - opt$0 = opt$1, - param$0 = vs; - } - } - function pp_print_seq(opt, pp_v, ppf, seq$1){ - /*<>*/ if(opt) + /*<>*/ /*<>*/ caml_call2 + (pp_sep, ppf, 0); + /*<>*/ return /*<>*/ caml_call2 + (pp_v, ppf, v); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call2 + (iter, pp_v$0, v); + /*<>*/ } + function pp_print_list(opt, pp_v, ppf, v){ + /*<>*/ if(opt) + var sth = opt[1], pp_sep = sth; + else + var pp_sep = pp_print_cut; + /*<>*/ return pp_print_iter + ([0, pp_sep], Stdlib_List[18], pp_v, ppf, v); + /*<>*/ } + function pp_print_array(opt, pp_v, ppf, v){ + /*<>*/ if(opt) + var sth = opt[1], pp_sep = sth; + else + var pp_sep = pp_print_cut; + /*<>*/ return pp_print_iter + ([0, pp_sep], Stdlib_Array[11], pp_v, ppf, v); + /*<>*/ } + function pp_print_seq(opt, pp_v, ppf, seq){ + /*<>*/ if(opt) var sth = opt[1], pp_sep = sth; else var pp_sep = pp_print_cut; - /*<>*/ /*<>*/ var - match$0 = /*<>*/ caml_call1(seq$1, 0); - if(! match$0) /*<>*/ return 0; - var seq$2 = match$0[2], v$0 = match$0[1]; - /*<>*/ /*<>*/ caml_call2 - (pp_v, ppf, v$0); - var seq = seq$2; - /*<>*/ for(;;){ - /*<>*/ /*<>*/ var - match = /*<>*/ caml_call1(seq, 0); - if(! match) /*<>*/ return 0; - var seq$0 = match[2], v = match[1]; - /*<>*/ /*<>*/ caml_call2 - (pp_sep, ppf, 0); - /*<>*/ /*<>*/ caml_call2 - (pp_v, ppf, v); - var seq = seq$0; - } - /*<>*/ } + /*<>*/ return pp_print_iter + ([0, pp_sep], Stdlib_Seq[4], pp_v, ppf, seq); + /*<>*/ } function pp_print_text(ppf, s){ - /*<>*/ var + /*<>*/ var len = caml_ml_string_length(s), - /*<>*/ left = [0, 0], - /*<>*/ right = [0, 0]; + /*<>*/ left = [0, 0], + /*<>*/ right = [0, 0]; function flush(param){ - /*<>*/ pp_print_string + /*<>*/ pp_print_string (ppf, - /*<>*/ caml_call3 - (Stdlib_String[15], s, left[1], right[1] - left[1] | 0)); + /*<>*/ caml_call3 + (Stdlib_String[16], s, left[1], right[1] - left[1] | 0)); right[1]++; left[1] = right[1]; return 0; - /*<>*/ } + /*<>*/ } for(;;){ if(right[1] === len){ var _aj_ = left[1] !== len ? 1 : 0; return _aj_ ? flush(0) : _aj_; } - /*<>*/ /*<>*/ var - match = /*<>*/ runtime.caml_string_get(s, right[1]); + /*<>*/ /*<>*/ var + match = /*<>*/ runtime.caml_string_get(s, right[1]); if(10 === match){ - /*<>*/ flush(0); - /*<>*/ pp_force_newline(ppf, 0); + /*<>*/ flush(0); + /*<>*/ pp_force_newline(ppf, 0); } else if(32 === match){ - /*<>*/ flush(0); - /*<>*/ pp_print_space(ppf, 0); + /*<>*/ flush(0); + /*<>*/ pp_print_space(ppf, 0); } else right[1]++; } - /*<>*/ } + /*<>*/ } function pp_print_option(opt, pp_v, ppf, param){ - /*<>*/ if(opt) + /*<>*/ if(opt) var sth = opt[1], none = sth; else var none = function(param, _ai_){ - /*<>*/ return 0; - /*<>*/ }; - /*<>*/ if(! param) - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return 0; + /*<>*/ }; + /*<>*/ if(! param) + /*<>*/ return /*<>*/ caml_call2 (none, ppf, 0); var v = param[1]; - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (pp_v, ppf, v); } function pp_print_result(ok, error, ppf, param){ /*<>*/ if(0 === param[0]){ var v = param[1]; - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (ok, ppf, v); } var e = param[1]; - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (error, ppf, e); } function pp_print_either(left, right, ppf, param){ /*<>*/ if(0 === param[0]){ var l = param[1]; - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (left, ppf, l); } var r = param[1]; - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (right, ppf, r); } function compute_tag(output, tag_acc){ - /*<>*/ var - /*<>*/ buf = - /*<>*/ caml_call1(Stdlib_Buffer[1], 16), - /*<>*/ ppf = formatter_of_buffer(buf); - /*<>*/ /*<>*/ caml_call2 + /*<>*/ var + /*<>*/ buf = + /*<>*/ caml_call1(Stdlib_Buffer[1], 16), + /*<>*/ ppf = formatter_of_buffer(buf); + /*<>*/ /*<>*/ caml_call2 (output, ppf, tag_acc); - /*<>*/ pp_print_flush(ppf, 0); - /*<>*/ /*<>*/ var - len = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); - /*<>*/ return 2 <= len - ? /*<>*/ caml_call3 + /*<>*/ pp_print_flush(ppf, 0); + /*<>*/ /*<>*/ var + len = /*<>*/ caml_call1(Stdlib_Buffer[7], buf); + /*<>*/ return 2 <= len + ? /*<>*/ caml_call3 (Stdlib_Buffer[4], buf, 1, len - 2 | 0) - : /*<>*/ caml_call1(Stdlib_Buffer[2], buf); - /*<>*/ } + : /*<>*/ caml_call1(Stdlib_Buffer[2], buf); + /*<>*/ } function output_formatting_lit(ppf, fmting_lit){ - /*<>*/ if(typeof fmting_lit === "number") + /*<>*/ if(typeof fmting_lit === "number") switch(fmting_lit){ case 0: - /*<>*/ return pp_close_box(ppf, 0); + /*<>*/ return pp_close_box(ppf, 0); case 1: - /*<>*/ return pp_close_stag(ppf, 0); + /*<>*/ return pp_close_stag(ppf, 0); case 2: - /*<>*/ return pp_print_flush(ppf, 0); + /*<>*/ return pp_print_flush(ppf, 0); case 3: - /*<>*/ return pp_force_newline(ppf, 0); + /*<>*/ return pp_force_newline(ppf, 0); case 4: - /*<>*/ return pp_print_newline(ppf, 0); + /*<>*/ return pp_print_newline(ppf, 0); case 5: - /*<>*/ return pp_print_char(ppf, 64); - default: /*<>*/ return pp_print_char(ppf, 37); + /*<>*/ return pp_print_char(ppf, 64); + default: /*<>*/ return pp_print_char(ppf, 37); } switch(fmting_lit[0]){ case 0: var offset = fmting_lit[3], width = fmting_lit[2]; - /*<>*/ return pp_print_break(ppf, width, offset); + /*<>*/ return pp_print_break(ppf, width, offset); case 1: - /*<>*/ return 0; + /*<>*/ return 0; default: var c = fmting_lit[1]; - /*<>*/ pp_print_char(ppf, 64); - /*<>*/ return pp_print_char(ppf, c); + /*<>*/ pp_print_char(ppf, 64); + /*<>*/ return pp_print_char(ppf, c); } - /*<>*/ } + /*<>*/ } function output_acc(ppf, acc){ - /*<>*/ if(typeof acc === "number") - /*<>*/ return 0; + /*<>*/ if(typeof acc === "number") + /*<>*/ return 0; a: { b: @@ -26375,26 +27105,26 @@ switch(acc[0]){ case 0: var f = acc[2], p = acc[1]; - /*<>*/ output_acc(ppf, p); - /*<>*/ return output_formatting_lit(ppf, f); + /*<>*/ output_acc(ppf, p); + /*<>*/ return output_formatting_lit(ppf, f); case 1: var match = acc[2], p$0 = acc[1]; if(0 === match[0]){ var acc$0 = match[1]; - /*<>*/ output_acc(ppf, p$0); - /*<>*/ return pp_open_stag + /*<>*/ output_acc(ppf, p$0); + /*<>*/ return pp_open_stag (ppf, [0, String_tag, compute_tag(output_acc, acc$0)]); } var acc$1 = match[1]; - /*<>*/ output_acc(ppf, p$0); - /*<>*/ var - /*<>*/ _$_ = compute_tag(output_acc, acc$1), - /*<>*/ match$0 = - /*<>*/ caml_call1 + /*<>*/ output_acc(ppf, p$0); + /*<>*/ var + /*<>*/ _$_ = compute_tag(output_acc, acc$1), + /*<>*/ match$0 = + /*<>*/ caml_call1 (CamlinternalFormat[20], _$_), bty = match$0[2], indent = match$0[1]; - /*<>*/ return pp_open_box_gen(ppf, indent, bty); + /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: var _aa_ = acc[1]; if(typeof _aa_ !== "number" && 0 === _aa_[0]){ @@ -26441,38 +27171,38 @@ break c; case 6: var f$0 = acc[2], p$5 = acc[1]; - /*<>*/ output_acc(ppf, p$5); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ output_acc(ppf, p$5); + /*<>*/ return /*<>*/ caml_call1 (f$0, ppf); case 7: var p$6 = acc[1]; - /*<>*/ output_acc(ppf, p$6); - /*<>*/ return pp_print_flush(ppf, 0); + /*<>*/ output_acc(ppf, p$6); + /*<>*/ return pp_print_flush(ppf, 0); default: var msg = acc[2], p$7 = acc[1]; - /*<>*/ output_acc(ppf, p$7); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ output_acc(ppf, p$7); + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], msg); } - /*<>*/ output_acc(ppf, p$4); - /*<>*/ return pp_print_as_size + /*<>*/ output_acc(ppf, p$4); + /*<>*/ return pp_print_as_size (ppf, size$0, - /*<>*/ caml_call2 + /*<>*/ caml_call2 (Stdlib_String[1], 1, c$0)); } - /*<>*/ output_acc(ppf, p$3); - /*<>*/ return pp_print_char(ppf, c); + /*<>*/ output_acc(ppf, p$3); + /*<>*/ return pp_print_char(ppf, c); } - /*<>*/ output_acc(ppf, p$2); - /*<>*/ return pp_print_as_size(ppf, size, s$0); + /*<>*/ output_acc(ppf, p$2); + /*<>*/ return pp_print_as_size(ppf, size, s$0); } - /*<>*/ output_acc(ppf, p$1); - /*<>*/ return pp_print_string(ppf, s); - /*<>*/ } + /*<>*/ output_acc(ppf, p$1); + /*<>*/ return pp_print_string(ppf, s); + /*<>*/ } function strput_acc(ppf, acc){ - /*<>*/ if(typeof acc === "number") - /*<>*/ return 0; + /*<>*/ if(typeof acc === "number") + /*<>*/ return 0; a: { b: @@ -26482,26 +27212,26 @@ switch(acc[0]){ case 0: var f = acc[2], p = acc[1]; - /*<>*/ strput_acc(ppf, p); - /*<>*/ return output_formatting_lit(ppf, f); + /*<>*/ strput_acc(ppf, p); + /*<>*/ return output_formatting_lit(ppf, f); case 1: var match = acc[2], p$0 = acc[1]; if(0 === match[0]){ var acc$0 = match[1]; - /*<>*/ strput_acc(ppf, p$0); - /*<>*/ return pp_open_stag + /*<>*/ strput_acc(ppf, p$0); + /*<>*/ return pp_open_stag (ppf, [0, String_tag, compute_tag(strput_acc, acc$0)]); } var acc$1 = match[1]; - /*<>*/ strput_acc(ppf, p$0); - /*<>*/ var - /*<>*/ _S_ = compute_tag(strput_acc, acc$1), - /*<>*/ match$0 = - /*<>*/ caml_call1 + /*<>*/ strput_acc(ppf, p$0); + /*<>*/ var + /*<>*/ _S_ = compute_tag(strput_acc, acc$1), + /*<>*/ match$0 = + /*<>*/ caml_call1 (CamlinternalFormat[20], _S_), bty = match$0[2], indent = match$0[1]; - /*<>*/ return pp_open_box_gen(ppf, indent, bty); + /*<>*/ return pp_open_box_gen(ppf, indent, bty); case 2: var _T_ = acc[1]; if(typeof _T_ !== "number" && 0 === _T_[0]){ @@ -26552,174 +27282,174 @@ var match$1 = p$5[2]; if(typeof match$1 !== "number" && 1 === match$1[0]){ var f$1 = acc[2], size$1 = match$1[2], p$6 = p$5[1]; - /*<>*/ strput_acc(ppf, p$6); - /*<>*/ return pp_print_as_size - (ppf, size$1, /*<>*/ caml_call1(f$1, 0)); + /*<>*/ strput_acc(ppf, p$6); + /*<>*/ return pp_print_as_size + (ppf, size$1, /*<>*/ caml_call1(f$1, 0)); } } var f$0 = acc[2]; - /*<>*/ strput_acc(ppf, p$5); - /*<>*/ return pp_print_string - (ppf, /*<>*/ caml_call1(f$0, 0)); + /*<>*/ strput_acc(ppf, p$5); + /*<>*/ return pp_print_string + (ppf, /*<>*/ caml_call1(f$0, 0)); case 7: var p$7 = acc[1]; - /*<>*/ strput_acc(ppf, p$7); - /*<>*/ return pp_print_flush(ppf, 0); + /*<>*/ strput_acc(ppf, p$7); + /*<>*/ return pp_print_flush(ppf, 0); default: var msg = acc[2], p$8 = acc[1]; - /*<>*/ strput_acc(ppf, p$8); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ strput_acc(ppf, p$8); + /*<>*/ return /*<>*/ caml_call1 (Stdlib[1], msg); } - /*<>*/ strput_acc(ppf, p$4); - /*<>*/ return pp_print_as_size + /*<>*/ strput_acc(ppf, p$4); + /*<>*/ return pp_print_as_size (ppf, size$0, - /*<>*/ caml_call2 + /*<>*/ caml_call2 (Stdlib_String[1], 1, c$0)); } - /*<>*/ strput_acc(ppf, p$3); - /*<>*/ return pp_print_char(ppf, c); + /*<>*/ strput_acc(ppf, p$3); + /*<>*/ return pp_print_char(ppf, c); } - /*<>*/ strput_acc(ppf, p$2); - /*<>*/ return pp_print_as_size(ppf, size, s$0); + /*<>*/ strput_acc(ppf, p$2); + /*<>*/ return pp_print_as_size(ppf, size, s$0); } - /*<>*/ strput_acc(ppf, p$1); - /*<>*/ return pp_print_string(ppf, s); - /*<>*/ } + /*<>*/ strput_acc(ppf, p$1); + /*<>*/ return pp_print_string(ppf, s); + /*<>*/ } function kfprintf(k, ppf, param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ _Q_ = 0; + /*<>*/ _Q_ = 0; function _R_(acc){ - /*<>*/ output_acc(ppf, acc); + /*<>*/ output_acc(ppf, acc); return caml_call1(k, ppf); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[7], _R_, _Q_, fmt); } function ikfprintf(k, ppf, param){ var fmt = param[1]; - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[8], k, ppf, fmt); } function ifprintf(ppf, param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ _N_ = 0; + /*<>*/ _N_ = 0; function _O_(_P_){ /*<>*/ return 0;} - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[8], _O_, _N_, fmt); } function fprintf(ppf){ function _K_(_M_){ /*<>*/ return 0;} - /*<>*/ return function(_L_){ + /*<>*/ return function(_L_){ /*<>*/ return kfprintf(_K_, ppf, _L_);}; - /*<>*/ } + /*<>*/ } function printf(param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ _I_ = 0; + /*<>*/ _I_ = 0; function _J_(acc){ - /*<>*/ return output_acc - ( /*<>*/ caml_call1 + /*<>*/ return output_acc + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), acc); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[7], _J_, _I_, fmt); } function eprintf(param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ _G_ = 0; + /*<>*/ _G_ = 0; function _H_(acc){ - /*<>*/ return output_acc - ( /*<>*/ caml_call1 + /*<>*/ return output_acc + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), acc); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[7], _H_, _G_, fmt); } function kdprintf(k, param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ _E_ = 0; + /*<>*/ _E_ = 0; function _F_(acc){ - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (k, function(ppf){ - /*<>*/ return output_acc(ppf, acc); - /*<>*/ }); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ return output_acc(ppf, acc); + /*<>*/ }); + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[7], _F_, _E_, fmt); } function dprintf(fmt){ - /*<>*/ return kdprintf + /*<>*/ return kdprintf (function(i){ - /*<>*/ return i; - /*<>*/ }, + /*<>*/ return i; + /*<>*/ }, fmt); - /*<>*/ } + /*<>*/ } function ksprintf(k, param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ b = pp_make_buffer(0), - /*<>*/ ppf = formatter_of_buffer(b); + /*<>*/ b = pp_make_buffer(0), + /*<>*/ ppf = formatter_of_buffer(b); function k$0(acc){ - /*<>*/ strput_acc(ppf, acc); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ strput_acc(ppf, acc); + /*<>*/ return /*<>*/ caml_call1 (k, flush_buffer_formatter(b, ppf)); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[7], k$0, 0, fmt); } function sprintf(fmt){ - /*<>*/ return ksprintf(id, fmt); - /*<>*/ } + /*<>*/ return ksprintf(id, fmt); + /*<>*/ } function kasprintf(k, param){ - /*<>*/ var + /*<>*/ var fmt = param[1], - /*<>*/ b = pp_make_buffer(0), - /*<>*/ ppf = formatter_of_buffer(b); + /*<>*/ b = pp_make_buffer(0), + /*<>*/ ppf = formatter_of_buffer(b); function k$0(acc){ - /*<>*/ output_acc(ppf, acc); - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ output_acc(ppf, acc); + /*<>*/ return /*<>*/ caml_call1 (k, flush_buffer_formatter(b, ppf)); - /*<>*/ } - /*<>*/ return /*<>*/ caml_call3 + /*<>*/ } + /*<>*/ return /*<>*/ caml_call3 (CamlinternalFormat[7], k$0, 0, fmt); } function asprintf(fmt){ - /*<>*/ return kasprintf(id, fmt); - /*<>*/ } + /*<>*/ return kasprintf(id, fmt); + /*<>*/ } function flush_standard_formatters(param){ - /*<>*/ pp_print_flush - ( /*<>*/ caml_call1 + /*<>*/ pp_print_flush + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], std_formatter_key), 0); - /*<>*/ return pp_print_flush - ( /*<>*/ caml_call1 + /*<>*/ return pp_print_flush + ( /*<>*/ caml_call1 (Stdlib_Domain[10][2], err_formatter_key), 0); - /*<>*/ } - /*<>*/ /*<>*/ caml_call1 + /*<>*/ } + /*<>*/ /*<>*/ caml_call1 (Stdlib[100], flush_standard_formatters); function _l_(param){ - /*<>*/ flush_standard_formatters(0); - /*<>*/ var - /*<>*/ fs = + /*<>*/ flush_standard_formatters(0); + /*<>*/ var + /*<>*/ fs = pp_get_formatter_out_functions(std_formatter, 0), _m_ = fs[5], _n_ = fs[4], _o_ = fs[3], _p_ = Stdlib[39]; - /*<>*/ function _q_(_D_){ + /*<>*/ function _q_(_D_){ /*<>*/ return buffered_out_flush(_p_, std_buf_key, _D_); } - /*<>*/ pp_set_formatter_out_functions + /*<>*/ pp_set_formatter_out_functions (std_formatter, [0, function(_A_, _B_, _C_){ @@ -26729,17 +27459,17 @@ _o_, _n_, _m_]); - /*<>*/ var - /*<>*/ fs$0 = + /*<>*/ var + /*<>*/ fs$0 = pp_get_formatter_out_functions(err_formatter, 0), _r_ = fs$0[5], _s_ = fs$0[4], _t_ = fs$0[3], _u_ = Stdlib[40]; - /*<>*/ function _v_(_z_){ + /*<>*/ function _v_(_z_){ /*<>*/ return buffered_out_flush(_u_, err_buf_key, _z_); } - /*<>*/ return pp_set_formatter_out_functions + /*<>*/ return pp_set_formatter_out_functions (err_formatter, [0, function(_w_, _x_, _y_){ @@ -26750,8 +27480,8 @@ _t_, _s_, _r_]); - /*<>*/ } - /*<>*/ /*<>*/ caml_call1 + /*<>*/ } + /*<>*/ /*<>*/ caml_call1 (Stdlib_Domain[5], _l_); var Stdlib_Format = @@ -26884,7 +27614,9 @@ flush_symbolic_output_buffer, add_symbolic_output_item, formatter_of_symbolic_output_b, + pp_print_iter, pp_print_list, + pp_print_array, pp_print_seq, pp_print_text, pp_print_option, @@ -26902,13 +27634,13 @@ ikfprintf, ksprintf, kasprintf]; - runtime.caml_register_global(35, Stdlib_Format, "Stdlib__Format"); + runtime.caml_register_global(37, Stdlib_Format, "Stdlib__Format"); return; /*<>*/ } (globalThis)); //# unitInfo: Provides: Stdlib__Scanf -//# unitInfo: Requires: Assert_failure, CamlinternalFormat, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Int, Stdlib__Printf, Stdlib__String +//# unitInfo: Requires: CamlinternalFormat, CamlinternalFormatBasics, Stdlib, Stdlib__Buffer, Stdlib__Bytes, Stdlib__Int, Stdlib__Printf, Stdlib__String (function (globalThis){ "use strict"; @@ -27363,7 +28095,7 @@ /*<>*/ if (0 !== l && 43 === /*<>*/ caml_string_get(tok, 0)) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], tok, 1, l - 1 | 0); + (Stdlib_String[16], tok, 1, l - 1 | 0); /*<>*/ return tok; /*<>*/ } function token_float(ib){ @@ -28156,7 +28888,7 @@ /*<>*/ caml_string_get(str, 1), /*<>*/ sub_str = /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], str, 2, /*<>*/ caml_ml_string_length(str) - 2 | 0); @@ -28719,7 +29451,7 @@ /*<>*/ _H_ = function(_S_){ /*<>*/ return check_char(ib, _S_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _H_, str$0); + (Stdlib_String[30], _H_, str$0); var fmt$0 = rest$15; break; case 12: @@ -28815,7 +29547,7 @@ /*<>*/ _P_ = function(_R_){ /*<>*/ return check_char(ib, _R_);}; /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _P_, _O_); + (Stdlib_String[30], _P_, _O_); var fmt$0 = rest$19; break; case 18: @@ -28941,7 +29673,7 @@ /*<>*/ var msg = exc[2], /*<>*/ _C_ = - /*<>*/ caml_call1(Stdlib_String[24], str), + /*<>*/ caml_call1(Stdlib_String[25], str), /*<>*/ _D_ = /*<>*/ caml_call2(Stdlib[28], _C_, cst$0), /*<>*/ _E_ = @@ -29041,7 +29773,7 @@ /*<>*/ } /*<>*/ var /*<>*/ _x_ = - /*<>*/ caml_call1(Stdlib_String[24], s), + /*<>*/ caml_call1(Stdlib_String[25], s), /*<>*/ _y_ = /*<>*/ caml_call2(Stdlib[28], _x_, cst$1); /*<>*/ return sscanf_format @@ -29123,7 +29855,7 @@ (globalThis)); //# unitInfo: Provides: CamlinternalOO -//# unitInfo: Requires: Assert_failure, Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Map, Stdlib__Obj, Stdlib__Sys +//# unitInfo: Requires: Stdlib, Stdlib__Array, Stdlib__List, Stdlib__Map, Stdlib__Obj, Stdlib__Sys (function (globalThis){ "use strict"; @@ -29168,35 +29900,35 @@ Stdlib_Array = global_data.Stdlib__Array, Stdlib_List = global_data.Stdlib__List, Stdlib_Map = global_data.Stdlib__Map, - _g_ = [0, cst_camlinternalOO_ml, 439, 17], - _f_ = [0, cst_camlinternalOO_ml, 421, 13], - _e_ = [0, cst_camlinternalOO_ml, 418, 13], - _d_ = [0, cst_camlinternalOO_ml, 415, 13], - _c_ = [0, cst_camlinternalOO_ml, 412, 13], - _b_ = [0, cst_camlinternalOO_ml, 409, 13], - _a_ = [0, cst_camlinternalOO_ml, 281, 50]; + _g_ = [0, cst_camlinternalOO_ml, 437, 17], + _f_ = [0, cst_camlinternalOO_ml, 419, 13], + _e_ = [0, cst_camlinternalOO_ml, 416, 13], + _d_ = [0, cst_camlinternalOO_ml, 413, 13], + _c_ = [0, cst_camlinternalOO_ml, 410, 13], + _b_ = [0, cst_camlinternalOO_ml, 407, 13], + _a_ = [0, cst_camlinternalOO_ml, 279, 50]; function copy(o){ - /*<>*/ /*<>*/ var - o$0 = /*<>*/ o.slice(); - /*<>*/ return /*<>*/ caml_set_oo_id + /*<>*/ /*<>*/ var + o$0 = /*<>*/ o.slice(); + /*<>*/ return /*<>*/ caml_set_oo_id (o$0); - /*<>*/ } - /*<>*/ var - /*<>*/ params = [0, 1, 1, 1, 3, 16], - /*<>*/ initial_object_size = 2, + /*<>*/ } + /*<>*/ var + /*<>*/ params = [0, 1, 1, 1, 3, 16], + /*<>*/ initial_object_size = 2, dummy_item = 0; function public_method_label(s){ - /*<>*/ var - /*<>*/ accu = [0, 0], + /*<>*/ var + /*<>*/ accu = [0, 0], _aE_ = runtime.caml_ml_string_length(s) - 1 | 0, - /*<>*/ _aD_ = 0; + /*<>*/ _aD_ = 0; if(_aE_ >= 0){ var i = _aD_; for(;;){ - /*<>*/ /*<>*/ var - _aF_ = /*<>*/ runtime.caml_string_get(s, i); + /*<>*/ /*<>*/ var + _aF_ = /*<>*/ runtime.caml_string_get(s, i); accu[1] = (223 * accu[1] | 0) + _aF_ | 0; - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _aG_ = i + 1 | 0; if(_aE_ === i) break; var i = _aG_; @@ -29204,63 +29936,63 @@ } accu[1] = accu[1] & 2147483647; var tag = 1073741823 < accu[1] ? accu[1] + 2147483648 | 0 : accu[1]; - /*<>*/ return tag; - /*<>*/ } - /*<>*/ var + /*<>*/ return tag; + /*<>*/ } + /*<>*/ var compare = caml_string_compare, Vars = caml_call1(Stdlib_Map[1], [0, compare]), compare$0 = caml_string_compare, Meths = caml_call1(Stdlib_Map[1], [0, compare$0]), compare$1 = runtime.caml_int_compare, Labs = caml_call1(Stdlib_Map[1], [0, compare$1]), - /*<>*/ dummy_table = + /*<>*/ dummy_table = [0, 0, [0, dummy_item], Meths[1], Labs[1], 0, 0, Vars[1], 0], - /*<>*/ table_count = [0, 0], - /*<>*/ dummy_met = - /*<>*/ caml_obj_block(0, 0); + /*<>*/ table_count = [0, 0], + /*<>*/ dummy_met = + /*<>*/ caml_obj_block(0, 0); function fit_size(n){ - /*<>*/ return 2 < n + /*<>*/ return 2 < n ? fit_size((n + 1 | 0) / 2 | 0) * 2 | 0 : n; - /*<>*/ } + /*<>*/ } function new_table(pub_labels){ - /*<>*/ table_count[1]++; - /*<>*/ var + /*<>*/ table_count[1]++; + /*<>*/ var len = pub_labels.length - 1, - /*<>*/ methods = - /*<>*/ caml_make_vect + /*<>*/ methods = + /*<>*/ caml_make_vect ((len * 2 | 0) + 2 | 0, dummy_met); - /*<>*/ caml_check_bound(methods, 0)[1] = len; + /*<>*/ caml_check_bound(methods, 0)[1] = len; var _aw_ = Stdlib_Sys[9], _ax_ = - ( /*<>*/ runtime.caml_mul + ( /*<>*/ runtime.caml_mul (fit_size(len), _aw_) / 8 | 0) - 1 | 0; - /*<>*/ caml_check_bound(methods, 1)[2] = _ax_; - /*<>*/ var + /*<>*/ caml_check_bound(methods, 1)[2] = _ax_; + /*<>*/ var _az_ = len - 1 | 0, - /*<>*/ _ay_ = 0; + /*<>*/ _ay_ = 0; if(_az_ >= 0){ var i = _ay_; for(;;){ - /*<>*/ var + /*<>*/ var _aB_ = (i * 2 | 0) + 3 | 0, - /*<>*/ _aA_ = + /*<>*/ _aA_ = caml_check_bound(pub_labels, i)[1 + i]; - /*<>*/ caml_check_bound(methods, _aB_) + /*<>*/ caml_check_bound(methods, _aB_) [1 + _aB_] = _aA_; - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _aC_ = i + 1 | 0; if(_az_ === i) break; var i = _aC_; } } - /*<>*/ return [0, + /*<>*/ return [0, initial_object_size, methods, Meths[1], @@ -29269,16 +30001,16 @@ 0, Vars[1], 0]; - /*<>*/ } + /*<>*/ } function resize(array, new_size){ - /*<>*/ var + /*<>*/ var old_size = array[2].length - 1, _au_ = old_size < new_size ? 1 : 0; if(_au_){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var new_buck = - /*<>*/ caml_make_vect(new_size, dummy_met); - /*<>*/ /*<>*/ caml_call5 + /*<>*/ caml_make_vect(new_size, dummy_met); + /*<>*/ /*<>*/ caml_call5 (Stdlib_Array[8], array[2], 0, new_buck, 0, old_size); array[2] = new_buck; var _av_ = 0; @@ -29286,122 +30018,122 @@ else var _av_ = _au_; return _av_; - /*<>*/ } - /*<>*/ var - /*<>*/ method_count = [0, 0], - /*<>*/ inst_var_count = [0, 0]; + /*<>*/ } + /*<>*/ var + /*<>*/ method_count = [0, 0], + /*<>*/ inst_var_count = [0, 0]; function new_method(table){ - /*<>*/ var index = table[2].length - 1; - /*<>*/ resize(table, index + 1 | 0); - /*<>*/ return index; - /*<>*/ } + /*<>*/ var index = table[2].length - 1; + /*<>*/ resize(table, index + 1 | 0); + /*<>*/ return index; + /*<>*/ } function get_method_label(table, name){ - /*<>*/ try{ - /*<>*/ /*<>*/ var + /*<>*/ try{ + /*<>*/ /*<>*/ var _as_ = - /*<>*/ caml_call2(Meths[28], name, table[3]); - /*<>*/ return _as_; + /*<>*/ caml_call2(Meths[17], name, table[3]); + /*<>*/ return _as_; } catch(_at_){ var _ar_ = caml_wrap_exception(_at_); if(_ar_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_ar_, 0); - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var label = new_method(table); table[3] = - /*<>*/ caml_call3 - (Meths[4], name, label, table[3]); + /*<>*/ caml_call3 + (Meths[2], name, label, table[3]); table[4] = - /*<>*/ caml_call3 - (Labs[4], label, 1, table[4]); - /*<>*/ return label; + /*<>*/ caml_call3 + (Labs[2], label, 1, table[4]); + /*<>*/ return label; } - /*<>*/ } + /*<>*/ } function get_method_labels(table, names){ - /*<>*/ function _ap_(_aq_){ + /*<>*/ function _ap_(_aq_){ /*<>*/ return get_method_label(table, _aq_); } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Array[13], _ap_, names); - /*<>*/ } + /*<>*/ } function set_method(table, label, element){ - /*<>*/ method_count[1]++; - /*<>*/ return /*<>*/ caml_call2 - (Labs[28], label, table[4]) + /*<>*/ method_count[1]++; + /*<>*/ return /*<>*/ caml_call2 + (Labs[17], label, table[4]) ? (resize (table, label + 1 | 0), caml_check_bound(table[2], label)[1 + label] = element, 0) : (table[6] = [0, [0, label, element], table[6]], 0); - /*<>*/ } + /*<>*/ } function get_method(table, label){ - /*<>*/ try{ - /*<>*/ /*<>*/ var + /*<>*/ try{ + /*<>*/ /*<>*/ var _an_ = - /*<>*/ caml_call2 - (Stdlib_List[46], label, table[6]); - /*<>*/ return _an_; + /*<>*/ caml_call2 + (Stdlib_List[49], label, table[6]); + /*<>*/ return _an_; } catch(_ao_){ var _am_ = caml_wrap_exception(_ao_); if(_am_ === Stdlib[8]) - /*<>*/ return caml_check_bound + /*<>*/ return caml_check_bound (table[2], label) [1 + label]; throw caml_maybe_attach_backtrace(_am_, 0); } - /*<>*/ } + /*<>*/ } function to_list(arr){ - /*<>*/ return 0 === arr + /*<>*/ return 0 === arr ? 0 - : /*<>*/ caml_call1 + : /*<>*/ caml_call1 (Stdlib_Array[9], arr); - /*<>*/ } + /*<>*/ } function narrow(table, vars, virt_meths, concr_meths){ - /*<>*/ var - /*<>*/ vars$0 = to_list(vars), - /*<>*/ virt_meths$0 = to_list(virt_meths), - /*<>*/ concr_meths$0 = to_list(concr_meths); - /*<>*/ function _X_(_al_){ + /*<>*/ var + /*<>*/ vars$0 = to_list(vars), + /*<>*/ virt_meths$0 = to_list(virt_meths), + /*<>*/ concr_meths$0 = to_list(concr_meths); + /*<>*/ function _X_(_al_){ /*<>*/ return get_method_label(table, _al_); } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var virt_meth_labs = - /*<>*/ caml_call2 - (Stdlib_List[19], _X_, virt_meths$0); - /*<>*/ function _Y_(_ak_){ + /*<>*/ caml_call2 + (Stdlib_List[20], _X_, virt_meths$0); + /*<>*/ function _Y_(_ak_){ /*<>*/ return get_method_label(table, _ak_); } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var concr_meth_labs = - /*<>*/ caml_call2 - (Stdlib_List[19], _Y_, concr_meths$0); + /*<>*/ caml_call2 + (Stdlib_List[20], _Y_, concr_meths$0); table[5] = [0, [0, table[3], table[4], table[6], table[7], virt_meth_labs, vars$0], table[5]]; var _Z_ = Vars[1], ___ = table[7]; function _$_(lab, info, tvars){ - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[36], lab, vars$0) - ? /*<>*/ caml_call3 - (Vars[4], lab, info, tvars) + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[37], lab, vars$0) + ? /*<>*/ caml_call3 + (Vars[2], lab, info, tvars) : tvars; - /*<>*/ } + /*<>*/ } table[7] = - /*<>*/ caml_call3(Vars[13], _$_, ___, _Z_); - /*<>*/ var - /*<>*/ by_name = [0, Meths[1]], - /*<>*/ by_label = [0, Labs[1]]; + /*<>*/ caml_call3(Vars[24], _$_, ___, _Z_); + /*<>*/ var + /*<>*/ by_name = [0, Meths[1]], + /*<>*/ by_label = [0, Labs[1]]; function _aa_(met, label){ - /*<>*/ by_name[1] = - /*<>*/ caml_call3 - (Meths[4], met, label, by_name[1]); + /*<>*/ by_name[1] = + /*<>*/ caml_call3 + (Meths[2], met, label, by_name[1]); var _af_ = by_label[1]; try{ - /*<>*/ var - /*<>*/ _ai_ = - /*<>*/ caml_call2 - (Labs[28], label, table[4]), + /*<>*/ var + /*<>*/ _ai_ = + /*<>*/ caml_call2 + (Labs[17], label, table[4]), _ah_ = _ai_; } catch(_aj_){ @@ -29410,43 +30142,43 @@ var _ah_ = 1; } by_label[1] = - /*<>*/ caml_call3(Labs[4], label, _ah_, _af_); + /*<>*/ caml_call3(Labs[2], label, _ah_, _af_); return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call3 - (Stdlib_List[27], _aa_, concr_meths$0, concr_meth_labs); + /*<>*/ } + /*<>*/ /*<>*/ caml_call3 + (Stdlib_List[28], _aa_, concr_meths$0, concr_meth_labs); function _ab_(met, label){ - /*<>*/ by_name[1] = - /*<>*/ caml_call3 - (Meths[4], met, label, by_name[1]); + /*<>*/ by_name[1] = + /*<>*/ caml_call3 + (Meths[2], met, label, by_name[1]); by_label[1] = - /*<>*/ caml_call3 - (Labs[4], label, 0, by_label[1]); + /*<>*/ caml_call3 + (Labs[2], label, 0, by_label[1]); return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call3 - (Stdlib_List[27], _ab_, virt_meths$0, virt_meth_labs); + /*<>*/ } + /*<>*/ /*<>*/ caml_call3 + (Stdlib_List[28], _ab_, virt_meths$0, virt_meth_labs); table[3] = by_name[1]; table[4] = by_label[1]; - /*<>*/ var - /*<>*/ _ac_ = 0, + /*<>*/ var + /*<>*/ _ac_ = 0, _ad_ = table[6]; function _ae_(met, hm){ - /*<>*/ var lab = met[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[36], lab, virt_meth_labs) + /*<>*/ var lab = met[1]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[37], lab, virt_meth_labs) ? hm : [0, met, hm]; - /*<>*/ } + /*<>*/ } table[6] = - /*<>*/ caml_call3 - (Stdlib_List[26], _ae_, _ad_, _ac_); + /*<>*/ caml_call3 + (Stdlib_List[27], _ae_, _ad_, _ac_); return 0; - /*<>*/ } + /*<>*/ } function widen(table){ - /*<>*/ var - /*<>*/ match = - /*<>*/ caml_call1(Stdlib_List[5], table[5]), + /*<>*/ var + /*<>*/ match = + /*<>*/ caml_call1(Stdlib_List[6], table[5]), vars = match[6], virt_meths = match[5], saved_vars = match[4], @@ -29454,291 +30186,291 @@ by_label = match[2], by_name = match[1]; table[5] = - /*<>*/ caml_call1(Stdlib_List[6], table[5]); + /*<>*/ caml_call1(Stdlib_List[7], table[5]); function _T_(s, v){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _W_ = - /*<>*/ caml_call2(Vars[28], v, table[7]); - /*<>*/ return /*<>*/ caml_call3 - (Vars[4], v, _W_, s); - /*<>*/ } + /*<>*/ caml_call2(Vars[17], v, table[7]); + /*<>*/ return /*<>*/ caml_call3 + (Vars[2], v, _W_, s); + /*<>*/ } table[7] = - /*<>*/ caml_call3 - (Stdlib_List[25], _T_, saved_vars, vars); + /*<>*/ caml_call3 + (Stdlib_List[26], _T_, saved_vars, vars); table[3] = by_name; table[4] = by_label; var _U_ = table[6]; function _V_(met, hm){ - /*<>*/ var lab = met[1]; - /*<>*/ return /*<>*/ caml_call2 - (Stdlib_List[36], lab, virt_meths) + /*<>*/ var lab = met[1]; + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_List[37], lab, virt_meths) ? hm : [0, met, hm]; - /*<>*/ } + /*<>*/ } table[6] = - /*<>*/ caml_call3 - (Stdlib_List[26], _V_, _U_, saved_hidden_meths); + /*<>*/ caml_call3 + (Stdlib_List[27], _V_, _U_, saved_hidden_meths); return 0; - /*<>*/ } + /*<>*/ } function new_variable(table, name){ - /*<>*/ try{ - /*<>*/ /*<>*/ var + /*<>*/ try{ + /*<>*/ /*<>*/ var _R_ = - /*<>*/ caml_call2(Vars[28], name, table[7]); - /*<>*/ return _R_; + /*<>*/ caml_call2(Vars[17], name, table[7]); + /*<>*/ return _R_; } catch(_S_){ var _Q_ = caml_wrap_exception(_S_); if(_Q_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_Q_, 0); var index = table[1]; table[1] = index + 1 | 0; - /*<>*/ if - ( /*<>*/ runtime.caml_string_notequal(name, "")) + /*<>*/ if + ( /*<>*/ runtime.caml_string_notequal(name, "")) table[7] = - /*<>*/ caml_call3 - (Vars[4], name, index, table[7]); - /*<>*/ return index; + /*<>*/ caml_call3 + (Vars[2], name, index, table[7]); + /*<>*/ return index; } - /*<>*/ } + /*<>*/ } function to_array(arr){ - /*<>*/ return /*<>*/ runtime.caml_equal + /*<>*/ return /*<>*/ runtime.caml_equal (arr, 0) ? [0] : arr; - /*<>*/ } + /*<>*/ } function new_methods_variables(table, meths, vals){ - /*<>*/ var - /*<>*/ meths$0 = to_array(meths), - /*<>*/ nmeths = meths$0.length - 1, + /*<>*/ var + /*<>*/ meths$0 = to_array(meths), + /*<>*/ nmeths = meths$0.length - 1, nvals = vals.length - 1, - /*<>*/ res = - /*<>*/ caml_make_vect(nmeths + nvals | 0, 0), - /*<>*/ _I_ = nmeths - 1 | 0, - /*<>*/ _H_ = 0; + /*<>*/ res = + /*<>*/ caml_make_vect(nmeths + nvals | 0, 0), + /*<>*/ _I_ = nmeths - 1 | 0, + /*<>*/ _H_ = 0; if(_I_ >= 0){ var i$0 = _H_; for(;;){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _O_ = get_method_label(table, caml_check_bound(meths$0, i$0)[1 + i$0]); - /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _O_; - /*<>*/ /*<>*/ var + /*<>*/ caml_check_bound(res, i$0)[1 + i$0] = _O_; + /*<>*/ /*<>*/ var _P_ = i$0 + 1 | 0; if(_I_ === i$0) break; var i$0 = _P_; } } - /*<>*/ var + /*<>*/ var _K_ = nvals - 1 | 0, - /*<>*/ _J_ = 0; + /*<>*/ _J_ = 0; if(_K_ >= 0){ var i = _J_; for(;;){ - /*<>*/ var + /*<>*/ var _M_ = i + nmeths | 0, - /*<>*/ _L_ = + /*<>*/ _L_ = new_variable(table, caml_check_bound(vals, i)[1 + i]); - /*<>*/ caml_check_bound(res, _M_)[1 + _M_] = _L_; - /*<>*/ /*<>*/ var + /*<>*/ caml_check_bound(res, _M_)[1 + _M_] = _L_; + /*<>*/ /*<>*/ var _N_ = i + 1 | 0; if(_K_ === i) break; var i = _N_; } } - /*<>*/ return res; - /*<>*/ } + /*<>*/ return res; + /*<>*/ } function get_variable(table, name){ - /*<>*/ try{ - /*<>*/ /*<>*/ var + /*<>*/ try{ + /*<>*/ /*<>*/ var _F_ = - /*<>*/ caml_call2(Vars[28], name, table[7]); - /*<>*/ return _F_; + /*<>*/ caml_call2(Vars[17], name, table[7]); + /*<>*/ return _F_; } catch(_G_){ var _E_ = caml_wrap_exception(_G_); if(_E_ === Stdlib[8]) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _a_], 1); throw caml_maybe_attach_backtrace(_E_, 0); } - /*<>*/ } + /*<>*/ } function get_variables(table, names){ - /*<>*/ function _C_(_D_){ + /*<>*/ function _C_(_D_){ /*<>*/ return get_variable(table, _D_); } - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (Stdlib_Array[13], _C_, names); - /*<>*/ } + /*<>*/ } function add_initializer(table, f){ - /*<>*/ table[8] = [0, f, table[8]]; + /*<>*/ table[8] = [0, f, table[8]]; return 0; - /*<>*/ } + /*<>*/ } function create_table(public_methods){ - /*<>*/ if(0 === public_methods) - /*<>*/ return new_table([0]); - /*<>*/ var - /*<>*/ tags = - /*<>*/ caml_call2 + /*<>*/ if(0 === public_methods) + /*<>*/ return new_table([0]); + /*<>*/ var + /*<>*/ tags = + /*<>*/ caml_call2 (Stdlib_Array[13], public_method_label, public_methods), - /*<>*/ table = new_table(tags); + /*<>*/ table = new_table(tags); function _B_(i, met){ - /*<>*/ var lab = (i * 2 | 0) + 2 | 0; + /*<>*/ var lab = (i * 2 | 0) + 2 | 0; table[3] = - /*<>*/ caml_call3 - (Meths[4], met, lab, table[3]); + /*<>*/ caml_call3 + (Meths[2], met, lab, table[3]); table[4] = - /*<>*/ caml_call3(Labs[4], lab, 1, table[4]); + /*<>*/ caml_call3(Labs[2], lab, 1, table[4]); return 0; - /*<>*/ } - /*<>*/ /*<>*/ caml_call2 + /*<>*/ } + /*<>*/ /*<>*/ caml_call2 (Stdlib_Array[12], _B_, public_methods); - /*<>*/ return table; - /*<>*/ } + /*<>*/ return table; + /*<>*/ } function init_class(table){ - /*<>*/ inst_var_count[1] = + /*<>*/ inst_var_count[1] = (inst_var_count[1] + table[1] | 0) - 1 | 0; table[8] = - /*<>*/ caml_call1(Stdlib_List[9], table[8]); - /*<>*/ /*<>*/ var + /*<>*/ caml_call1(Stdlib_List[10], table[8]); + /*<>*/ /*<>*/ var _A_ = Stdlib_Sys[9]; return resize (table, 3 + caml_div(caml_check_bound(table[2], 1)[2] * 16 | 0, _A_) | 0); - /*<>*/ } + /*<>*/ } function inherits(cla, vals, virt_meths, concr_meths, param, top){ var env = param[4], super$0 = param[2]; - /*<>*/ narrow + /*<>*/ narrow (cla, vals, virt_meths, concr_meths); var init = top - ? /*<>*/ caml_call2(super$0, cla, env) - : /*<>*/ caml_call1(super$0, cla); - /*<>*/ widen(cla); - /*<>*/ var - /*<>*/ _s_ = 0, - /*<>*/ _t_ = to_array(concr_meths); + ? /*<>*/ caml_call2(super$0, cla, env) + : /*<>*/ caml_call1(super$0, cla); + /*<>*/ widen(cla); + /*<>*/ var + /*<>*/ _s_ = 0, + /*<>*/ _t_ = to_array(concr_meths); function _u_(nm){ - /*<>*/ return get_method + /*<>*/ return get_method (cla, get_method_label(cla, nm)); - /*<>*/ } - /*<>*/ var + /*<>*/ } + /*<>*/ var _v_ = [0, - /*<>*/ caml_call2 + /*<>*/ caml_call2 (Stdlib_Array[13], _u_, _t_), _s_], - /*<>*/ _w_ = to_array(vals); - /*<>*/ function _x_(_z_){ + /*<>*/ _w_ = to_array(vals); + /*<>*/ function _x_(_z_){ /*<>*/ return get_variable(cla, _z_); } - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _y_ = [0, [0, init], [0, - /*<>*/ caml_call2 + /*<>*/ caml_call2 (Stdlib_Array[13], _x_, _w_), _v_]]; - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (Stdlib_Array[4], _y_); } function make_class(pub_meths, class_init){ - /*<>*/ var - /*<>*/ table = create_table(pub_meths), - /*<>*/ env_init = - /*<>*/ caml_call1(class_init, table); - /*<>*/ init_class(table); - /*<>*/ return [0, - /*<>*/ caml_call1(env_init, 0), + /*<>*/ var + /*<>*/ table = create_table(pub_meths), + /*<>*/ env_init = + /*<>*/ caml_call1(class_init, table); + /*<>*/ init_class(table); + /*<>*/ return [0, + /*<>*/ caml_call1(env_init, 0), class_init, env_init, 0]; - /*<>*/ } + /*<>*/ } function make_class_store(pub_meths, class_init, init_table){ - /*<>*/ var - /*<>*/ table = create_table(pub_meths), - /*<>*/ env_init = - /*<>*/ caml_call1(class_init, table); - /*<>*/ init_class(table); + /*<>*/ var + /*<>*/ table = create_table(pub_meths), + /*<>*/ env_init = + /*<>*/ caml_call1(class_init, table); + /*<>*/ init_class(table); init_table[2] = class_init; init_table[1] = env_init; return 0; - /*<>*/ } + /*<>*/ } function dummy_class(loc){ function undef(param){ - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Stdlib[15], loc], 1); - /*<>*/ } - /*<>*/ return [0, undef, undef, undef, 0]; - /*<>*/ } + /*<>*/ } + /*<>*/ return [0, undef, undef, undef, 0]; + /*<>*/ } function create_object(table){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var obj = - /*<>*/ caml_obj_block + /*<>*/ caml_obj_block (Stdlib_Obj[10], table[1]); - /*<>*/ obj[1] = table[2]; - /*<>*/ return /*<>*/ caml_set_oo_id + /*<>*/ obj[1] = table[2]; + /*<>*/ return /*<>*/ caml_set_oo_id (obj); - /*<>*/ } + /*<>*/ } function create_object_opt(obj_0, table){ - /*<>*/ if(obj_0) - /*<>*/ return obj_0; - /*<>*/ /*<>*/ var + /*<>*/ if(obj_0) + /*<>*/ return obj_0; + /*<>*/ /*<>*/ var obj = - /*<>*/ caml_obj_block + /*<>*/ caml_obj_block (Stdlib_Obj[10], table[1]); - /*<>*/ obj[1] = table[2]; - /*<>*/ return /*<>*/ caml_set_oo_id + /*<>*/ obj[1] = table[2]; + /*<>*/ return /*<>*/ caml_set_oo_id (obj); - /*<>*/ } + /*<>*/ } function iter_f(obj, param){ var param$0 = param; for(;;){ - if(! param$0) /*<>*/ return 0; + if(! param$0) /*<>*/ return 0; var l = param$0[2], f = param$0[1]; - /*<>*/ /*<>*/ caml_call1 + /*<>*/ /*<>*/ caml_call1 (f, obj); var param$0 = l; } } function run_initializers(obj, table){ - /*<>*/ var + /*<>*/ var inits = table[8], _r_ = 0 !== inits ? 1 : 0; return _r_ ? iter_f(obj, inits) : _r_; - /*<>*/ } + /*<>*/ } function run_initializers_opt(obj_0, obj, table){ - /*<>*/ if(obj_0) - /*<>*/ return obj; + /*<>*/ if(obj_0) + /*<>*/ return obj; var inits = table[8]; - if(0 !== inits) /*<>*/ iter_f(obj, inits); - /*<>*/ return obj; - /*<>*/ } + if(0 !== inits) /*<>*/ iter_f(obj, inits); + /*<>*/ return obj; + /*<>*/ } function create_object_and_run_initiali(obj_0, table){ - /*<>*/ if(obj_0) - /*<>*/ return obj_0; - /*<>*/ /*<>*/ var + /*<>*/ if(obj_0) + /*<>*/ return obj_0; + /*<>*/ /*<>*/ var obj = create_object(table); - /*<>*/ run_initializers(obj, table); - /*<>*/ return obj; - /*<>*/ } + /*<>*/ run_initializers(obj, table); + /*<>*/ return obj; + /*<>*/ } function get_data(param){ - /*<>*/ if(param) - /*<>*/ return param[2]; - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ if(param) + /*<>*/ return param[2]; + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _e_], 1); - /*<>*/ } + /*<>*/ } function build_path(n, keys, tables){ - /*<>*/ var - /*<>*/ res = [0, 0, 0, 0], - /*<>*/ r = [0, res], - /*<>*/ _o_ = 0; + /*<>*/ var + /*<>*/ res = [0, 0, 0, 0], + /*<>*/ r = [0, res], + /*<>*/ _o_ = 0; if(n >= 0){ var i = _o_; for(;;){ var _p_ = r[1]; r[1] = [0, caml_check_bound(keys, i)[1 + i], _p_, 0]; - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _q_ = i + 1 | 0; if(n === i) break; var i = _q_; @@ -29746,57 +30478,57 @@ } var v = r[1]; if(! tables) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _b_], 1); tables[2] = v; - /*<>*/ return res; - /*<>*/ } + /*<>*/ return res; + /*<>*/ } function lookup_tables(root, keys){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var root_data = get_data(root); if(! root_data) - /*<>*/ return build_path + /*<>*/ return build_path (keys.length - 1 - 1 | 0, keys, root); var i$1 = keys.length - 1 - 1 | 0, i = i$1, tables$0 = root_data; - /*<>*/ for(;;){ - if(0 > i) /*<>*/ return tables$0; - /*<>*/ var - /*<>*/ key = caml_check_bound(keys, i)[1 + i], + /*<>*/ for(;;){ + if(0 > i) /*<>*/ return tables$0; + /*<>*/ var + /*<>*/ key = caml_check_bound(keys, i)[1 + i], tables$1 = tables$0; - /*<>*/ for(;;){ + /*<>*/ for(;;){ if(! tables$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _d_], 1); if(tables$1[1] === key){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var tables_data = get_data(tables$1); if(! tables_data) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _g_], 1); var i$0 = i - 1 | 0, i = i$0, tables$0 = tables_data; break; } if(! tables$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _f_], 1); - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var tables = tables$1[3]; if(! tables){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var next = [0, key, 0, 0]; if(! tables$1) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace ([0, Assert_failure, _c_], 1); tables$1[3] = next; - /*<>*/ return build_path + /*<>*/ return build_path (i - 1 | 0, keys, next); } var tables$1 = tables; } } - /*<>*/ } + /*<>*/ } function new_cache(table){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var n = new_method(table); a: { @@ -29811,360 +30543,360 @@ } var n$0 = n; } - /*<>*/ caml_check_bound(table[2], n$0)[1 + n$0] + /*<>*/ caml_check_bound(table[2], n$0)[1 + n$0] = 0; - /*<>*/ return n$0; - /*<>*/ } + /*<>*/ return n$0; + /*<>*/ } function set_methods(table, methods){ - /*<>*/ var + /*<>*/ var len = methods.length - 1, - /*<>*/ i = [0, 0]; + /*<>*/ i = [0, 0]; for(;;){ if(i[1] >= len) return 0; - /*<>*/ var + /*<>*/ var _h_ = i[1], - /*<>*/ label = + /*<>*/ label = caml_check_bound(methods, _h_)[1 + _h_], next = function(param){ - /*<>*/ i[1]++; + /*<>*/ i[1]++; var _m_ = i[1]; - /*<>*/ return caml_check_bound + /*<>*/ return caml_check_bound (methods, _m_) [1 + _m_]; - /*<>*/ }, - /*<>*/ clo = next(0); + /*<>*/ }, + /*<>*/ clo = next(0); if(typeof clo === "number") switch(clo){ case 0: - /*<>*/ var - /*<>*/ x = next(0), + /*<>*/ var + /*<>*/ x = next(0), clo$0 = function(x){ /*<>*/ return function(obj){ - /*<>*/ return x; /*<>*/ }; + /*<>*/ return x; /*<>*/ }; } (x); break; case 1: - /*<>*/ var - /*<>*/ n = next(0), + /*<>*/ var + /*<>*/ n = next(0), clo$0 = function(n){ /*<>*/ return function(obj){ - /*<>*/ return obj[1 + n]; /*<>*/ }; + /*<>*/ return obj[1 + n]; /*<>*/ }; } (n); break; case 2: - /*<>*/ var - /*<>*/ e = next(0), - /*<>*/ n$0 = next(0), + /*<>*/ var + /*<>*/ e = next(0), + /*<>*/ n$0 = next(0), clo$0 = function(e, n){ /*<>*/ return function(obj){ - /*<>*/ return obj[1 + e][1 + n]; /*<>*/ }; + /*<>*/ return obj[1 + e][1 + n]; /*<>*/ }; } (e, n$0); break; case 3: - /*<>*/ var - /*<>*/ n$1 = next(0), + /*<>*/ var + /*<>*/ n$1 = next(0), clo$0 = function(n){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (obj[1][1 + n], obj); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call1 + (obj[1][1 + n], obj); /*<>*/ }; } (n$1); break; case 4: - /*<>*/ var - /*<>*/ n$2 = next(0), + /*<>*/ var + /*<>*/ n$2 = next(0), clo$0 = function(n){ /*<>*/ return function(obj, x){ - /*<>*/ obj[1 + n] = x; - return 0; /*<>*/ }; + /*<>*/ obj[1 + n] = x; + return 0; /*<>*/ }; } (n$2); break; case 5: - /*<>*/ var - /*<>*/ f = next(0), - /*<>*/ x$0 = next(0), + /*<>*/ var + /*<>*/ f = next(0), + /*<>*/ x$0 = next(0), clo$0 = function(f, x){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (f, x); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call1 + (f, x); /*<>*/ }; } (f, x$0); break; case 6: - /*<>*/ var - /*<>*/ f$0 = next(0), - /*<>*/ n$3 = next(0), + /*<>*/ var + /*<>*/ f$0 = next(0), + /*<>*/ n$3 = next(0), clo$0 = function(f, n){ /*<>*/ return function(obj){ - /*<>*/ return caml_call1 - (f, obj[1 + n]); /*<>*/ }; + /*<>*/ return caml_call1 + (f, obj[1 + n]); /*<>*/ }; } (f$0, n$3); break; case 7: - /*<>*/ var - /*<>*/ f$1 = next(0), - /*<>*/ e$0 = next(0), - /*<>*/ n$4 = next(0), + /*<>*/ var + /*<>*/ f$1 = next(0), + /*<>*/ e$0 = next(0), + /*<>*/ n$4 = next(0), clo$0 = function(f, e, n){ /*<>*/ return function(obj){ - /*<>*/ return caml_call1 - (f, obj[1 + e][1 + n]); /*<>*/ }; + /*<>*/ return caml_call1 + (f, obj[1 + e][1 + n]); /*<>*/ }; } (f$1, e$0, n$4); break; case 8: - /*<>*/ var - /*<>*/ f$2 = next(0), - /*<>*/ n$5 = next(0), + /*<>*/ var + /*<>*/ f$2 = next(0), + /*<>*/ n$5 = next(0), clo$0 = function(f, n){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 + /*<>*/ return /*<>*/ caml_call1 (f, - /*<>*/ caml_call1 - (obj[1][1 + n], obj)); /*<>*/ }; + /*<>*/ caml_call1 + (obj[1][1 + n], obj)); /*<>*/ }; } (f$2, n$5); break; case 9: - /*<>*/ var - /*<>*/ f$3 = next(0), - /*<>*/ x$1 = next(0), - /*<>*/ y = next(0), + /*<>*/ var + /*<>*/ f$3 = next(0), + /*<>*/ x$1 = next(0), + /*<>*/ y = next(0), clo$0 = function(f, x, y){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, x, y); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call2 + (f, x, y); /*<>*/ }; } (f$3, x$1, y); break; case 10: - /*<>*/ var - /*<>*/ f$4 = next(0), - /*<>*/ x$2 = next(0), - /*<>*/ n$6 = next(0), + /*<>*/ var + /*<>*/ f$4 = next(0), + /*<>*/ x$2 = next(0), + /*<>*/ n$6 = next(0), clo$0 = function(f, x, n){ /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (f, x, obj[1 + n]); /*<>*/ }; + /*<>*/ return caml_call2 + (f, x, obj[1 + n]); /*<>*/ }; } (f$4, x$2, n$6); break; case 11: - /*<>*/ var - /*<>*/ f$5 = next(0), - /*<>*/ x$3 = next(0), - /*<>*/ e$1 = next(0), - /*<>*/ n$7 = next(0), + /*<>*/ var + /*<>*/ f$5 = next(0), + /*<>*/ x$3 = next(0), + /*<>*/ e$1 = next(0), + /*<>*/ n$7 = next(0), clo$0 = function(f, x, e, n){ /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (f, x, obj[1 + e][1 + n]); /*<>*/ }; + /*<>*/ return caml_call2 + (f, x, obj[1 + e][1 + n]); /*<>*/ }; } (f$5, x$3, e$1, n$7); break; case 12: - /*<>*/ var - /*<>*/ f$6 = next(0), - /*<>*/ x$4 = next(0), - /*<>*/ n$8 = next(0), + /*<>*/ var + /*<>*/ f$6 = next(0), + /*<>*/ x$4 = next(0), + /*<>*/ n$8 = next(0), clo$0 = function(f, x, n){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (f, x, - /*<>*/ caml_call1 - (obj[1][1 + n], obj)); /*<>*/ }; + /*<>*/ caml_call1 + (obj[1][1 + n], obj)); /*<>*/ }; } (f$6, x$4, n$8); break; case 13: - /*<>*/ var - /*<>*/ f$7 = next(0), - /*<>*/ n$9 = next(0), - /*<>*/ x$5 = next(0), + /*<>*/ var + /*<>*/ f$7 = next(0), + /*<>*/ n$9 = next(0), + /*<>*/ x$5 = next(0), clo$0 = function(f, n, x){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, obj[1 + n], x); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call2 + (f, obj[1 + n], x); /*<>*/ }; } (f$7, n$9, x$5); break; case 14: - /*<>*/ var - /*<>*/ f$8 = next(0), - /*<>*/ e$2 = next(0), - /*<>*/ n$10 = next(0), - /*<>*/ x$6 = next(0), + /*<>*/ var + /*<>*/ f$8 = next(0), + /*<>*/ e$2 = next(0), + /*<>*/ n$10 = next(0), + /*<>*/ x$6 = next(0), clo$0 = function(f, e, n, x){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (f, obj[1 + e][1 + n], x); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call2 + (f, obj[1 + e][1 + n], x); /*<>*/ }; } (f$8, e$2, n$10, x$6); break; case 15: - /*<>*/ var - /*<>*/ f$9 = next(0), - /*<>*/ n$11 = next(0), - /*<>*/ x$7 = next(0), + /*<>*/ var + /*<>*/ f$9 = next(0), + /*<>*/ n$11 = next(0), + /*<>*/ x$7 = next(0), clo$0 = function(f, n, x){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 + /*<>*/ return /*<>*/ caml_call2 (f, - /*<>*/ caml_call1 + /*<>*/ caml_call1 (obj[1][1 + n], obj), - x); /*<>*/ }; + x); /*<>*/ }; } (f$9, n$11, x$7); break; case 16: - /*<>*/ var - /*<>*/ n$12 = next(0), - /*<>*/ x$8 = next(0), + /*<>*/ var + /*<>*/ n$12 = next(0), + /*<>*/ x$8 = next(0), clo$0 = function(n, x){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call2 - (obj[1][1 + n], obj, x); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call2 + (obj[1][1 + n], obj, x); /*<>*/ }; } (n$12, x$8); break; case 17: - /*<>*/ var - /*<>*/ n$13 = next(0), - /*<>*/ m = next(0), + /*<>*/ var + /*<>*/ n$13 = next(0), + /*<>*/ m = next(0), clo$0 = function(n, m){ /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (obj[1][1 + n], obj, obj[1 + m]); /*<>*/ }; + /*<>*/ return caml_call2 + (obj[1][1 + n], obj, obj[1 + m]); /*<>*/ }; } (n$13, m); break; case 18: - /*<>*/ var - /*<>*/ n$14 = next(0), - /*<>*/ e$3 = next(0), - /*<>*/ m$0 = next(0), + /*<>*/ var + /*<>*/ n$14 = next(0), + /*<>*/ e$3 = next(0), + /*<>*/ m$0 = next(0), clo$0 = function(n, e, m){ /*<>*/ return function(obj){ - /*<>*/ return caml_call2 - (obj[1][1 + n], obj, obj[1 + e][1 + m]); /*<>*/ }; + /*<>*/ return caml_call2 + (obj[1][1 + n], obj, obj[1 + e][1 + m]); /*<>*/ }; } (n$14, e$3, m$0); break; case 19: - /*<>*/ var - /*<>*/ n$15 = next(0), - /*<>*/ m$1 = next(0), + /*<>*/ var + /*<>*/ n$15 = next(0), + /*<>*/ m$1 = next(0), clo$0 = function(n, m){ /*<>*/ return function(obj){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _k_ = - /*<>*/ caml_call1 + /*<>*/ caml_call1 (obj[1][1 + m], obj); - /*<>*/ return /*<>*/ caml_call2 - (obj[1][1 + n], obj, _k_); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call2 + (obj[1][1 + n], obj, _k_); /*<>*/ }; } (n$15, m$1); break; case 20: - /*<>*/ var - /*<>*/ m$2 = next(0), - /*<>*/ x$9 = next(0); - /*<>*/ new_cache(table); + /*<>*/ var + /*<>*/ m$2 = next(0), + /*<>*/ x$9 = next(0); + /*<>*/ new_cache(table); var clo$0 = function(m, x){ /*<>*/ return function(obj){ - /*<>*/ return /*<>*/ caml_call1 - (caml_get_public_method(x, m, 0), x); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call1 + (caml_get_public_method(x, m, 0), x); /*<>*/ }; } (m$2, x$9); break; case 21: - /*<>*/ var - /*<>*/ m$3 = next(0), - /*<>*/ n$16 = next(0); - /*<>*/ new_cache(table); + /*<>*/ var + /*<>*/ m$3 = next(0), + /*<>*/ n$16 = next(0); + /*<>*/ new_cache(table); var clo$0 = function(m, n){ /*<>*/ return function(obj){ - /*<>*/ var _j_ = obj[1 + n]; - return caml_call1(caml_get_public_method(_j_, m, 0), _j_); /*<>*/ }; + /*<>*/ var _j_ = obj[1 + n]; + return caml_call1(caml_get_public_method(_j_, m, 0), _j_); /*<>*/ }; } (m$3, n$16); break; case 22: - /*<>*/ var - /*<>*/ m$4 = next(0), - /*<>*/ e$4 = next(0), - /*<>*/ n$17 = next(0); - /*<>*/ new_cache(table); + /*<>*/ var + /*<>*/ m$4 = next(0), + /*<>*/ e$4 = next(0), + /*<>*/ n$17 = next(0); + /*<>*/ new_cache(table); var clo$0 = function(m, e, n){ /*<>*/ return function(obj){ - /*<>*/ var _i_ = obj[1 + e][1 + n]; - return caml_call1(caml_get_public_method(_i_, m, 0), _i_); /*<>*/ }; + /*<>*/ var _i_ = obj[1 + e][1 + n]; + return caml_call1(caml_get_public_method(_i_, m, 0), _i_); /*<>*/ }; } (m$4, e$4, n$17); break; default: - /*<>*/ var - /*<>*/ m$5 = next(0), - /*<>*/ n$18 = next(0); - /*<>*/ new_cache(table); + /*<>*/ var + /*<>*/ m$5 = next(0), + /*<>*/ n$18 = next(0); + /*<>*/ new_cache(table); var clo$0 = function(m, n){ /*<>*/ return function(obj){ - /*<>*/ /*<>*/ var + /*<>*/ /*<>*/ var _l_ = - /*<>*/ caml_call1 + /*<>*/ caml_call1 (obj[1][1 + n], obj); - /*<>*/ return /*<>*/ caml_call1 - (caml_get_public_method(_l_, m, 0), _l_); /*<>*/ }; + /*<>*/ return /*<>*/ caml_call1 + (caml_get_public_method(_l_, m, 0), _l_); /*<>*/ }; } (m$5, n$18); } else var clo$0 = clo; - /*<>*/ set_method(table, label, clo$0); + /*<>*/ set_method(table, label, clo$0); i[1]++; } - /*<>*/ } + /*<>*/ } function stats(param){ - /*<>*/ return [0, + /*<>*/ return [0, table_count[1], method_count[1], inst_var_count[1]]; - /*<>*/ } + /*<>*/ } var CamlinternalOO = [0, @@ -30222,7 +30954,7 @@ (globalThis)); //# unitInfo: Provides: CamlinternalMod -//# unitInfo: Requires: Assert_failure, CamlinternalLazy, CamlinternalOO, Stdlib, Stdlib__Obj +//# unitInfo: Requires: CamlinternalLazy, CamlinternalOO, Stdlib, Stdlib__Obj (function (globalThis){ "use strict"; @@ -30795,7 +31527,7 @@ /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ah_, _ag_, _af_), + (Stdlib_Array[17], _ah_, _ag_, _af_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), /*<>*/ _ai_ = h[2]; @@ -30836,7 +31568,7 @@ /*<>*/ var /*<>*/ mbl = /*<>*/ caml_call3 - (Stdlib_Array[15], _ab_, _aa_, _$_), + (Stdlib_Array[17], _ab_, _aa_, _$_), /*<>*/ histo = /*<>*/ caml_make_vect(mbl + 1 | 0, 0), /*<>*/ _ac_ = h[2]; @@ -31049,7 +31781,7 @@ if(! l) /*<>*/ return 0; var h = l[1], t = l[2]; /*<>*/ if(test_key(k, h)){ - b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); + b[1] = /*<>*/ caml_call2(Stdlib_List[13], acc, t); return 0; } /*<>*/ var @@ -31066,7 +31798,7 @@ } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _V_, _U_); + /*<>*/ caml_call2(Stdlib_List[40], _V_, _U_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data(e); @@ -31276,7 +32008,7 @@ if(! l) /*<>*/ return 0; var h = l[1], t = l[2]; /*<>*/ if(test_keys(k1, k2, h)){ - b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); + b[1] = /*<>*/ caml_call2(Stdlib_List[13], acc, t); return 0; } /*<>*/ var @@ -31293,7 +32025,7 @@ } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _N_, _M_); + /*<>*/ caml_call2(Stdlib_List[40], _N_, _M_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$0(e); @@ -31610,7 +32342,7 @@ if(! l) /*<>*/ return 0; var h = l[1], t = l[2]; /*<>*/ if(test_keys$0(k, h)){ - b[1] = /*<>*/ caml_call2(Stdlib_List[12], acc, t); + b[1] = /*<>*/ caml_call2(Stdlib_List[13], acc, t); return 0; } /*<>*/ var @@ -31627,7 +32359,7 @@ } /*<>*/ /*<>*/ var match = - /*<>*/ caml_call2(Stdlib_List[39], _e_, _d_); + /*<>*/ caml_call2(Stdlib_List[40], _e_, _d_); if(! match) /*<>*/ return 0; var e = match[1]; /*<>*/ return get_data$1(e); @@ -31729,7 +32461,7 @@ cst$12 = cst$20, cst$13 = cst$19, cst$6 = cst$20, - cst$7 = cst$20, + cst$7 = cst$19, cst$4 = cst$19, cst = cst$21, cst$3 = cst$19, @@ -31758,15 +32490,16 @@ Stdlib_List = global_data.Stdlib__List, Stdlib_Buffer = global_data.Stdlib__Buffer, Stdlib_Sys = global_data.Stdlib__Sys, - _i_ = [0, 7, 0], - _h_ = [0, 1, [0, 3, [0, 5, 0]]], - _e_ = [0, [2, 0, [4, 6, [0, 2, 6], 0, [2, 0, 0]]], "%s%06x%s"], + _j_ = [0, 7, 0], + _i_ = [0, 1, [0, 3, [0, 5, 0]]], + _f_ = [0, [2, 0, [4, 6, [0, 2, 6], 0, [2, 0, 0]]], "%s%06x%s"], cst_Filename_chop_extension = "Filename.chop_extension", cst_Filename_chop_suffix = "Filename.chop_suffix", - _c_ = [0, cst$20, 0], + _d_ = [0, cst$20, 0], cst_2_1$0 = cst_2_1$1, cst_2$0 = cst_2$1, cst_Filename_quote_command_bad = "Filename.quote_command: bad file name ", + _c_ = [0, cst$20, 0], cst_2_1 = cst_2_1$1, cst_2 = cst_2$1, cst_tmp = "/tmp"; @@ -31778,7 +32511,7 @@ /*<>*/ for(;;){ if(0 > n) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, 1); + (Stdlib_String[16], name, 0, 1); /*<>*/ if ( /*<>*/ caml_call2(is_dir_sep, name, n)) /*<>*/ var @@ -31791,11 +32524,11 @@ /*<>*/ for(;;){ if(0 > n$1) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, p); + (Stdlib_String[16], name, 0, p); /*<>*/ if ( /*<>*/ caml_call2(is_dir_sep, name, n$1)) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, n$1 + 1 | 0, (p - n$1 | 0) - 1 | 0); + (Stdlib_String[16], name, n$1 + 1 | 0, (p - n$1 | 0) - 1 | 0); var n$2 = n$1 - 1 | 0, n$1 = n$2; } } @@ -31809,7 +32542,7 @@ /*<>*/ for(;;){ if(0 > n) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, 1); + (Stdlib_String[16], name, 0, 1); /*<>*/ if ( /*<>*/ caml_call2(is_dir_sep, name, n)) /*<>*/ var @@ -31825,11 +32558,11 @@ /*<>*/ for(;;){ if(0 > n$3) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, 1); + (Stdlib_String[16], name, 0, 1); /*<>*/ if (! /*<>*/ caml_call2(is_dir_sep, name, n$3)) /*<>*/ return /*<>*/ caml_call3 - (Stdlib_String[15], name, 0, n$3 + 1 | 0); + (Stdlib_String[16], name, 0, n$3 + 1 | 0); /*<>*/ var /*<>*/ n$4 = n$3 - 1 | 0, n$3 = n$4; @@ -31851,43 +32584,43 @@ /*<>*/ } function is_relative(n){ /*<>*/ var - _aK_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _aL_ = - _aK_ + _aM_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aN_ = + _aM_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - return _aL_; + return _aN_; /*<>*/ } function is_implicit(n){ /*<>*/ /*<>*/ var - _aF_ = is_relative(n); - /*<>*/ if(_aF_){ + _aH_ = is_relative(n); + /*<>*/ if(_aH_){ var - _aG_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aH_ = - _aG_ + _aI_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _aJ_ = + _aI_ || /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), + ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2), cst$27); - /*<>*/ if(_aH_) + /*<>*/ if(_aJ_) var - _aI_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _aJ_ = - _aI_ + _aK_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _aL_ = + _aK_ || /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 3), + ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 3), cst$28); else - var _aJ_ = _aH_; + var _aL_ = _aJ_; } else - var _aJ_ = _aF_; - /*<>*/ return _aJ_; + var _aL_ = _aH_; + /*<>*/ return _aL_; /*<>*/ } function check_suffix(name, suff){ /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[11], suff, name); + (Stdlib_String[12], suff, name); /*<>*/ } function chop_suffix_opt(suffix, filename){ /*<>*/ var @@ -31897,22 +32630,22 @@ /*<>*/ /*<>*/ var r = /*<>*/ caml_call3 - (Stdlib_String[15], filename, len_f - len_s | 0, len_s); + (Stdlib_String[16], filename, len_f - len_s | 0, len_s); /*<>*/ return /*<>*/ caml_string_equal (r, suffix) ? [0, /*<>*/ caml_call3 - (Stdlib_String[15], filename, 0, len_f - len_s | 0)] + (Stdlib_String[16], filename, 0, len_f - len_s | 0)] : 0; /*<>*/ } try{ /*<>*/ var - /*<>*/ _k_ = + /*<>*/ _l_ = /*<>*/ caml_sys_getenv("TMPDIR"), - temp_dir_name = _k_; + temp_dir_name = _l_; } - catch(_aE_){ - var _a_ = caml_wrap_exception(_aE_); + catch(_aG_){ + var _a_ = caml_wrap_exception(_aG_); if(_a_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_a_, 0); var temp_dir_name = cst_tmp; } @@ -31924,10 +32657,10 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 39); /*<>*/ var - _aB_ = l - 1 | 0, - /*<>*/ _aA_ = 0; - if(_aB_ >= 0){ - var i = _aA_; + _aD_ = l - 1 | 0, + /*<>*/ _aC_ = 0; + if(_aD_ >= 0){ + var i = _aC_; for(;;){ /*<>*/ if (39 === /*<>*/ caml_string_get(s, i)) @@ -31935,14 +32668,14 @@ (Stdlib_Buffer[16], b, quotequote); else{ /*<>*/ /*<>*/ var - _aD_ = /*<>*/ caml_string_get(s, i); + _aF_ = /*<>*/ caml_string_get(s, i); /*<>*/ /*<>*/ caml_call2 - (Stdlib_Buffer[12], b, _aD_); + (Stdlib_Buffer[12], b, _aF_); } /*<>*/ /*<>*/ var - _aC_ = i + 1 | 0; - if(_aB_ === i) break; - var i = _aC_; + _aE_ = i + 1 | 0; + if(_aD_ === i) break; + var i = _aE_; } } /*<>*/ /*<>*/ caml_call2 @@ -31955,47 +32688,47 @@ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _ap_ = cst_2_1; + var _ar_ = cst_2_1; else /*<>*/ var - /*<>*/ _az_ = quote(f), - _ap_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _az_); - var _aq_ = _ap_; + /*<>*/ _aB_ = quote(f), + _ar_ = /*<>*/ caml_call2(Stdlib[28], cst_2, _aB_); + var _as_ = _ar_; } else - var _aq_ = cst$4; + var _as_ = cst$4; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _ar_ = quote(f$0), - _as_ = /*<>*/ caml_call2(Stdlib[28], cst, _ar_); + /*<>*/ _at_ = quote(f$0), + _au_ = /*<>*/ caml_call2(Stdlib[28], cst, _at_); else - var _as_ = cst$3; + var _au_ = cst$3; /*<>*/ /*<>*/ var - _at_ = /*<>*/ caml_call2(Stdlib[28], _as_, _aq_); + _av_ = /*<>*/ caml_call2(Stdlib[28], _au_, _as_); if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _au_ = quote(f$1), - _av_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _au_); + /*<>*/ _aw_ = quote(f$1), + _ax_ = /*<>*/ caml_call2(Stdlib[28], cst$0, _aw_); else - var _av_ = cst$2; + var _ax_ = cst$2; /*<>*/ var - /*<>*/ _aw_ = - /*<>*/ caml_call2(Stdlib[28], _av_, _at_), - /*<>*/ _ax_ = + /*<>*/ _ay_ = + /*<>*/ caml_call2(Stdlib[28], _ax_, _av_), + /*<>*/ _az_ = /*<>*/ caml_call2 - (Stdlib_List[19], quote, [0, cmd, args]), - /*<>*/ _ay_ = - /*<>*/ caml_call2(Stdlib_String[6], cst$1, _ax_); + (Stdlib_List[20], quote, [0, cmd, args]), + /*<>*/ _aA_ = + /*<>*/ caml_call2(Stdlib_String[7], cst$1, _az_); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], _ay_, _aw_); + (Stdlib[28], _aA_, _ay_); /*<>*/ } - /*<>*/ function basename(_ao_){ - /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _ao_); + /*<>*/ function basename(_aq_){ + /*<>*/ return generic_basename(is_dir_sep, current_dir_name, _aq_); } - /*<>*/ function dirname(_an_){ - /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _an_); + /*<>*/ function dirname(_ap_){ + /*<>*/ return generic_dirname(is_dir_sep, current_dir_name, _ap_); } /*<>*/ /*<>*/ var Unix = @@ -32018,111 +32751,111 @@ /*<>*/ var /*<>*/ c = /*<>*/ caml_string_get(s, i), - _ak_ = 47 === c ? 1 : 0; - if(_ak_) - var _al_ = _ak_; + _am_ = 47 === c ? 1 : 0; + if(_am_) + var _an_ = _am_; else - var _am_ = 92 === c ? 1 : 0, _al_ = _am_ || (58 === c ? 1 : 0); - return _al_; + var _ao_ = 92 === c ? 1 : 0, _an_ = _ao_ || (58 === c ? 1 : 0); + return _an_; /*<>*/ } function is_relative$0(n){ /*<>*/ var - _ae_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _af_ = - _ae_ + _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _ah_ = + _ag_ || (47 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_af_){ + if(_ah_){ var - _ag_ = caml_ml_string_length(n) < 1 ? 1 : 0, - _ah_ = - _ag_ + _ai_ = caml_ml_string_length(n) < 1 ? 1 : 0, + _aj_ = + _ai_ || (92 !== /*<>*/ caml_string_get(n, 0) ? 1 : 0); - if(_ah_) + if(_aj_) var - _ai_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _aj_ = - _ai_ + _ak_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _al_ = + _ak_ || (58 !== /*<>*/ caml_string_get(n, 1) ? 1 : 0); else - var _aj_ = _ah_; + var _al_ = _aj_; } else - var _aj_ = _af_; - return _aj_; + var _al_ = _ah_; + return _al_; /*<>*/ } function is_implicit$0(n){ /*<>*/ /*<>*/ var - _X_ = is_relative$0(n); - /*<>*/ if(_X_){ + _Z_ = is_relative$0(n); + /*<>*/ if(_Z_){ var - _Y_ = caml_ml_string_length(n) < 2 ? 1 : 0, - _Z_ = - _Y_ + ___ = caml_ml_string_length(n) < 2 ? 1 : 0, + _$_ = + ___ || /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), + ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2), cst$27); - /*<>*/ if(_Z_){ + /*<>*/ if(_$_){ var - ___ = caml_ml_string_length(n) < 2 ? 1 : 0, - _$_ = - ___ + _aa_ = caml_ml_string_length(n) < 2 ? 1 : 0, + _ab_ = + _aa_ || /*<>*/ caml_string_notequal - ( /*<>*/ caml_call3(Stdlib_String[15], n, 0, 2), + ( /*<>*/ caml_call3(Stdlib_String[16], n, 0, 2), ".\\"); - /*<>*/ if(_$_){ + /*<>*/ if(_ab_){ var - _aa_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ab_ = - _aa_ + _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _ad_ = + _ac_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 - (Stdlib_String[15], n, 0, 3), + (Stdlib_String[16], n, 0, 3), cst$28); - /*<>*/ if(_ab_) + /*<>*/ if(_ad_) var - _ac_ = caml_ml_string_length(n) < 3 ? 1 : 0, - _ad_ = - _ac_ + _ae_ = caml_ml_string_length(n) < 3 ? 1 : 0, + _af_ = + _ae_ || /*<>*/ caml_string_notequal ( /*<>*/ caml_call3 - (Stdlib_String[15], n, 0, 3), + (Stdlib_String[16], n, 0, 3), "..\\"); else - var _ad_ = _ab_; + var _af_ = _ad_; } else - var _ad_ = _$_; + var _af_ = _ab_; } else - var _ad_ = _Z_; + var _af_ = _$_; } else - var _ad_ = _X_; - /*<>*/ return _ad_; + var _af_ = _Z_; + /*<>*/ return _af_; /*<>*/ } function check_suffix$0(name, suff){ /*<>*/ var - _U_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; - if(_U_) + _W_ = caml_ml_string_length(suff) <= caml_ml_string_length(name) ? 1 : 0; + if(_W_) /*<>*/ var /*<>*/ s = /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], name, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0, caml_ml_string_length(suff)), - /*<>*/ _V_ = - /*<>*/ caml_call1(Stdlib_String[26], suff), - _W_ = + /*<>*/ _X_ = + /*<>*/ caml_call1(Stdlib_String[27], suff), + _Y_ = /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], s), _V_); + ( /*<>*/ caml_call1(Stdlib_String[27], s), _X_); else - var _W_ = _U_; - /*<>*/ return _W_; + var _Y_ = _W_; + /*<>*/ return _Y_; /*<>*/ } function chop_suffix_opt$0(suffix, filename){ /*<>*/ var @@ -32132,25 +32865,25 @@ /*<>*/ var /*<>*/ r = /*<>*/ caml_call3 - (Stdlib_String[15], filename, len_f - len_s | 0, len_s), - /*<>*/ _T_ = - /*<>*/ caml_call1(Stdlib_String[26], suffix); + (Stdlib_String[16], filename, len_f - len_s | 0, len_s), + /*<>*/ _V_ = + /*<>*/ caml_call1(Stdlib_String[27], suffix); /*<>*/ return /*<>*/ caml_string_equal - ( /*<>*/ caml_call1(Stdlib_String[26], r), - _T_) + ( /*<>*/ caml_call1(Stdlib_String[27], r), + _V_) ? [0, /*<>*/ caml_call3 - (Stdlib_String[15], filename, 0, len_f - len_s | 0)] + (Stdlib_String[16], filename, 0, len_f - len_s | 0)] : 0; /*<>*/ } try{ /*<>*/ var - /*<>*/ _j_ = + /*<>*/ _k_ = /*<>*/ caml_sys_getenv("TEMP"), - temp_dir_name$0 = _j_; + temp_dir_name$0 = _k_; } - catch(_S_){ - var _b_ = caml_wrap_exception(_S_); + catch(_U_){ + var _b_ = caml_wrap_exception(_U_); if(_b_ !== Stdlib[8]) throw caml_maybe_attach_backtrace(_b_, 0); var temp_dir_name$0 = cst$5; } @@ -32162,16 +32895,16 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); function add_bs(n){ - /*<>*/ /*<>*/ var _Q_ = 1; + /*<>*/ /*<>*/ var _S_ = 1; if(n >= 1){ - var j = _Q_; + var j = _S_; for(;;){ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 92); /*<>*/ /*<>*/ var - _R_ = j + 1 | 0; + _T_ = j + 1 | 0; if(n === j) break; - var j = _R_; + var j = _T_; } } return 0; @@ -32185,20 +32918,20 @@ /*<>*/ /*<>*/ var c = /*<>*/ caml_string_get(s, i$0); if(34 === c){ - var _O_ = 0; + var _Q_ = 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _O_, i$0]); + (loop_bs, [0, _Q_, i$0]); var counter$1 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$1, _O_, i$0); + /*<>*/ return loop_bs(counter$1, _Q_, i$0); } if(92 === c){ - var _P_ = 0; + var _R_ = 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (loop_bs, [0, _P_, i$0]); + (loop_bs, [0, _R_, i$0]); var counter$0 = counter + 1 | 0; - /*<>*/ return loop_bs(counter$0, _P_, i$0); + /*<>*/ return loop_bs(counter$0, _R_, i$0); } /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, c); @@ -32222,12 +32955,12 @@ /*<>*/ /*<>*/ caml_call2 (Stdlib_Buffer[12], b, 34); /*<>*/ /*<>*/ var - _N_ = i$0 + 1 | 0; + _P_ = i$0 + 1 | 0; /*<>*/ if(counter >= 50) /*<>*/ return /*<>*/ caml_trampoline_return - (loop$0, [0, _N_]); + (loop$0, [0, _P_]); var counter$1 = counter + 1 | 0; - /*<>*/ return loop$0(counter$1, _N_); + /*<>*/ return loop$0(counter$1, _P_); } if(92 !== match){ /*<>*/ add_bs(n$0); @@ -32250,70 +32983,70 @@ (Stdlib_Buffer[2], b); /*<>*/ } function quote_cmd_filename(f){ - /*<>*/ if - (! - /*<>*/ caml_call2(Stdlib_String[14], f, 34) - && ! /*<>*/ caml_call2(Stdlib_String[14], f, 37)){ - /*<>*/ if - (! /*<>*/ caml_call2(Stdlib_String[14], f, 32)) - /*<>*/ return f; - /*<>*/ /*<>*/ var - _M_ = /*<>*/ caml_call2(Stdlib[28], f, cst$6); - /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], cst$7, _M_); - } + function _N_(param){ + /*<>*/ if(34 !== param && 37 !== param) + /*<>*/ return 0; + /*<>*/ return 1; + /*<>*/ } + /*<>*/ if + (! /*<>*/ caml_call2(Stdlib_String[23], _N_, f)) + /*<>*/ return /*<>*/ caml_call2 + (Stdlib_String[15], f, 32) + ? /*<>*/ caml_call2 + (Stdlib_String[7], cst$7, [0, cst$6, [0, f, _c_]]) + : f; /*<>*/ /*<>*/ var - _L_ = + _O_ = /*<>*/ caml_call2 (Stdlib[28], cst_Filename_quote_command_bad, f); /*<>*/ return /*<>*/ caml_call1 - (Stdlib[2], _L_); + (Stdlib[2], _O_); /*<>*/ } function quote_command$0(cmd, stdin, stdout, stderr, args){ /*<>*/ if(stderr){ var f = stderr[1]; /*<>*/ if ( /*<>*/ caml_equal(stderr, stdout)) - var _x_ = cst_2_1$0; + var _z_ = cst_2_1$0; else /*<>*/ var - /*<>*/ _J_ = quote_cmd_filename(f), - _x_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _J_); - var _y_ = _x_; + /*<>*/ _L_ = quote_cmd_filename(f), + _z_ = /*<>*/ caml_call2(Stdlib[28], cst_2$0, _L_); + var _A_ = _z_; } else - var _y_ = cst$16; - var _z_ = [0, _y_, _c_]; + var _A_ = cst$16; + var _B_ = [0, _A_, _d_]; if(stdout) /*<>*/ var f$0 = stdout[1], - /*<>*/ _A_ = quote_cmd_filename(f$0), - _B_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _A_); + /*<>*/ _C_ = quote_cmd_filename(f$0), + _D_ = /*<>*/ caml_call2(Stdlib[28], cst$8, _C_); else - var _B_ = cst$15; - var _C_ = [0, _B_, _z_]; + var _D_ = cst$15; + var _E_ = [0, _D_, _B_]; if(stdin) /*<>*/ var f$1 = stdin[1], - /*<>*/ _D_ = quote_cmd_filename(f$1), - _E_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _D_); + /*<>*/ _F_ = quote_cmd_filename(f$1), + _G_ = /*<>*/ caml_call2(Stdlib[28], cst$9, _F_); else - var _E_ = cst$14; + var _G_ = cst$14; /*<>*/ var - /*<>*/ _G_ = - /*<>*/ caml_call2(Stdlib_List[19], quote$0, args), + /*<>*/ _I_ = + /*<>*/ caml_call2(Stdlib_List[20], quote$0, args), /*<>*/ s = - /*<>*/ caml_call2(Stdlib_String[6], cst$10, _G_), + /*<>*/ caml_call2(Stdlib_String[7], cst$10, _I_), /*<>*/ b = /*<>*/ caml_call1 (Stdlib_Buffer[1], caml_ml_string_length(s) + 20 | 0), - _F_ = [0, _E_, _C_]; - function _w_(c){ + _H_ = [0, _G_, _E_]; + function _y_(c){ /*<>*/ a: { if(62 <= c){ - var _K_ = c - 63 | 0; - if(60 < _K_ >>> 0){if(62 <= _K_) break a;} else if(31 !== _K_) break a; + var _M_ = c - 63 | 0; + if(60 < _M_ >>> 0){if(62 <= _M_) break a;} else if(31 !== _M_) break a; } else if(42 <= c){ @@ -32333,21 +33066,21 @@ (Stdlib_Buffer[12], b, c); /*<>*/ } /*<>*/ /*<>*/ caml_call2 - (Stdlib_String[29], _w_, s); + (Stdlib_String[30], _y_, s); /*<>*/ var - _H_ = + _J_ = [0, cst$11, - [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _F_]], - /*<>*/ _I_ = - [0, cst$12, [0, quote_cmd_filename(cmd), _H_]]; + [0, /*<>*/ caml_call1(Stdlib_Buffer[2], b), _H_]], + /*<>*/ _K_ = + [0, cst$12, [0, quote_cmd_filename(cmd), _J_]]; /*<>*/ return /*<>*/ caml_call2 - (Stdlib_String[6], cst$13, _I_); + (Stdlib_String[7], cst$13, _K_); /*<>*/ } function drive_and_path(s){ /*<>*/ var - _s_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; - if(_s_){ + _u_ = 2 <= /*<>*/ caml_ml_string_length(s) ? 1 : 0; + if(_u_){ /*<>*/ /*<>*/ var param = /*<>*/ caml_string_get(s, 0); a: @@ -32358,28 +33091,28 @@ if(25 < param - 97 >>> 0) break b; } else if(65 > param) break b; - var _t_ = 1; + var _v_ = 1; break a; } - var _t_ = 0; + var _v_ = 0; } /*<>*/ /*<>*/ var - _u_ = - _t_ + _w_ = + _v_ ? 58 === /*<>*/ caml_string_get(s, 1) ? 1 : 0 - : _t_; + : _v_; } else - var _u_ = _s_; - /*<>*/ if(! _u_) + var _w_ = _u_; + /*<>*/ if(! _w_) /*<>*/ return [0, cst$17, s]; /*<>*/ /*<>*/ var - _v_ = + _x_ = /*<>*/ caml_call3 - (Stdlib_String[15], s, 2, caml_ml_string_length(s) - 2 | 0); + (Stdlib_String[16], s, 2, caml_ml_string_length(s) - 2 | 0); /*<>*/ return [0, - /*<>*/ caml_call3(Stdlib_String[15], s, 0, 2), - _v_]; + /*<>*/ caml_call3(Stdlib_String[16], s, 0, 2), + _x_]; /*<>*/ } function dirname$0(s){ /*<>*/ var @@ -32413,11 +33146,11 @@ quote_command$0, basename$0, dirname$0]; - /*<>*/ function basename$1(_r_){ - /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _r_); + /*<>*/ function basename$1(_t_){ + /*<>*/ return generic_basename(is_dir_sep$0, current_dir_name$1, _t_); } - /*<>*/ function dirname$1(_q_){ - /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _q_); + /*<>*/ function dirname$1(_s_){ + /*<>*/ return generic_dirname(is_dir_sep$0, current_dir_name$1, _s_); } /*<>*/ var /*<>*/ Cygwin = @@ -32436,10 +33169,10 @@ quote_command, basename$1, dirname$1], - _d_ = Stdlib_Sys[4], + _e_ = Stdlib_Sys[4], Sysdeps = - caml_string_notequal(_d_, "Cygwin") - ? caml_string_notequal(_d_, "Win32") ? Unix : Win32 + caml_string_notequal(_e_, "Cygwin") + ? caml_string_notequal(_e_, "Win32") ? Unix : Win32 : Cygwin, null$3 = Sysdeps[1], current_dir_name$2 = Sysdeps[2], @@ -32460,11 +33193,11 @@ /*<>*/ if (0 !== l && ! is_dir_sep$1(dirname, l - 1 | 0)){ /*<>*/ /*<>*/ var - _p_ = + _r_ = /*<>*/ caml_call2 (Stdlib[28], dir_sep$2, filename); /*<>*/ return /*<>*/ caml_call2 - (Stdlib[28], dirname, _p_); + (Stdlib[28], dirname, _r_); } /*<>*/ return /*<>*/ caml_call2 (Stdlib[28], dirname, filename); @@ -32472,7 +33205,7 @@ function chop_suffix(name, suff){ /*<>*/ return check_suffix$1(name, suff) ? caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], name, 0, caml_ml_string_length(name) - caml_ml_string_length(suff) | 0) @@ -32517,7 +33250,7 @@ /*<>*/ return 0 === l ? cst$18 : /*<>*/ caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], name, caml_ml_string_length(name) - l | 0, l); @@ -32529,7 +33262,7 @@ ? /*<>*/ caml_call1 (Stdlib[1], cst_Filename_chop_extension) : caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], name, 0, caml_ml_string_length(name) - l | 0); @@ -32540,7 +33273,7 @@ /*<>*/ return 0 === l ? name : caml_call3 - (Stdlib_String[15], + (Stdlib_String[16], name, 0, caml_ml_string_length(name) - l | 0); @@ -32560,16 +33293,16 @@ /*<>*/ return concat (temp_dir, /*<>*/ caml_call4 - (Stdlib_Printf[4], _e_, prefix, rnd, suffix)); + (Stdlib_Printf[4], _f_, prefix, rnd, suffix)); /*<>*/ } - function _f_(param){ + function _g_(param){ /*<>*/ return temp_dir_name$1; /*<>*/ } /*<>*/ var - /*<>*/ _g_ = - [0, function(_o_){ /*<>*/ return _o_;}], + /*<>*/ _h_ = + [0, function(_q_){ /*<>*/ return _q_;}], /*<>*/ current_temp_dir_name = - /*<>*/ caml_call2(Stdlib_Domain[10][1], _g_, _f_); + /*<>*/ caml_call2(Stdlib_Domain[10][1], _h_, _g_); function set_temp_dir_name(s){ /*<>*/ return /*<>*/ caml_call2 (Stdlib_Domain[10][3], current_temp_dir_name, s); @@ -32592,32 +33325,32 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ runtime.caml_sys_close - ( /*<>*/ runtime.caml_sys_open(name, _h_, 384)); + ( /*<>*/ runtime.caml_sys_open(name, _i_, 384)); /*<>*/ return name; } catch(e$0){ var e = caml_wrap_exception(e$0); if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); - if(1000 <= counter) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + if(20 <= counter) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (e, 0); - /*<>*/ var - /*<>*/ counter$0 = counter + 1 | 0, + /*<>*/ var + /*<>*/ counter$0 = counter + 1 | 0, counter = counter$0; } } /*<>*/ } - function open_temp_file(opt, _m_, _l_, prefix, suffix){ + function open_temp_file(opt, _o_, _n_, prefix, suffix){ /*<>*/ if(opt) var sth = opt[1], mode = sth; else - var mode = _i_; - /*<>*/ if(_m_) - var sth$0 = _m_[1], perms = sth$0; + var mode = _j_; + /*<>*/ if(_o_) + var sth$0 = _o_[1], perms = sth$0; else var perms = 384; - /*<>*/ if(_l_) - var sth$1 = _l_[1], temp_dir = sth$1; + /*<>*/ if(_n_) + var sth$1 = _n_[1], temp_dir = sth$1; else var temp_dir = @@ -32629,25 +33362,58 @@ name = temp_file_name(temp_dir, prefix, suffix); /*<>*/ try{ /*<>*/ /*<>*/ var - _n_ = + _p_ = [0, name, /*<>*/ caml_call3 (Stdlib[62], [0, 1, [0, 3, [0, 5, mode]]], perms, name)]; - /*<>*/ return _n_; + /*<>*/ return _p_; } catch(e$0){ var e = caml_wrap_exception(e$0); if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); - if(1000 <= counter) - /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + if(20 <= counter) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace (e, 0); - /*<>*/ var - /*<>*/ counter$0 = counter + 1 | 0, + /*<>*/ var + /*<>*/ counter$0 = counter + 1 | 0, counter = counter$0; } } /*<>*/ } + function temp_dir(opt, _m_, prefix, suffix){ + /*<>*/ if(opt) + var sth = opt[1], temp_dir = sth; + else + var + temp_dir = + /*<>*/ caml_call1 + (Stdlib_Domain[10][2], current_temp_dir_name); + /*<>*/ if(_m_) + var sth$0 = _m_[1], perms = sth$0; + else + var perms = 448; + var counter = 0; + /*<>*/ for(;;){ + /*<>*/ /*<>*/ var + name = temp_file_name(temp_dir, prefix, suffix); + /*<>*/ try{ + /*<>*/ /*<>*/ runtime.caml_sys_mkdir + (name, perms); + /*<>*/ return name; + } + catch(e$0){ + var e = caml_wrap_exception(e$0); + if(e[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(e, 0); + if(20 <= counter) + /*<>*/ throw /*<>*/ caml_maybe_attach_backtrace + (e, 0); + /*<>*/ var + /*<>*/ counter$0 = counter + 1 | 0, + counter = counter$0; + } + } + /*<>*/ } var Stdlib_Filename = [0, @@ -32668,11 +33434,12 @@ null$3, temp_file, open_temp_file, + temp_dir, get_temp_dir_name, set_temp_dir_name, quote$1, quote_command$1]; - runtime.caml_register_global(65, Stdlib_Filename, "Stdlib__Filename"); + runtime.caml_register_global(66, Stdlib_Filename, "Stdlib__Filename"); return; /*<>*/ } (globalThis)); @@ -32833,29 +33600,33 @@ iter = Stdlib_Array[11], iteri = Stdlib_Array[12], map = Stdlib_Array[13], - mapi = Stdlib_Array[14], - fold_left = Stdlib_Array[15], - fold_left_map = Stdlib_Array[16], - fold_right = Stdlib_Array[17], - iter2 = Stdlib_Array[18], - map2 = Stdlib_Array[19], - for_all = Stdlib_Array[20], - exists = Stdlib_Array[21], - for_all2 = Stdlib_Array[22], - exists2 = Stdlib_Array[23], - mem = Stdlib_Array[24], - memq = Stdlib_Array[25], - find_opt = Stdlib_Array[26], - find_map = Stdlib_Array[27], - split = Stdlib_Array[28], - combine = Stdlib_Array[29], - sort = Stdlib_Array[30], - stable_sort = Stdlib_Array[31], - fast_sort = Stdlib_Array[32], - to_seq = Stdlib_Array[33], - to_seqi = Stdlib_Array[34], - of_seq = Stdlib_Array[35], - Floatarray = Stdlib_Array[36], + map_inplace = Stdlib_Array[14], + mapi = Stdlib_Array[15], + mapi_inplace = Stdlib_Array[16], + fold_left = Stdlib_Array[17], + fold_left_map = Stdlib_Array[18], + fold_right = Stdlib_Array[19], + iter2 = Stdlib_Array[20], + map2 = Stdlib_Array[21], + for_all = Stdlib_Array[22], + exists = Stdlib_Array[23], + for_all2 = Stdlib_Array[24], + exists2 = Stdlib_Array[25], + mem = Stdlib_Array[26], + memq = Stdlib_Array[27], + find_opt = Stdlib_Array[28], + find_index = Stdlib_Array[29], + find_map = Stdlib_Array[30], + find_mapi = Stdlib_Array[31], + split = Stdlib_Array[32], + combine = Stdlib_Array[33], + sort = Stdlib_Array[34], + stable_sort = Stdlib_Array[35], + fast_sort = Stdlib_Array[36], + to_seq = Stdlib_Array[37], + to_seqi = Stdlib_Array[38], + of_seq = Stdlib_Array[39], + Floatarray = Stdlib_Array[40], Stdlib_ArrayLabels = [0, init, @@ -32871,7 +33642,9 @@ iter, iteri, map, + map_inplace, mapi, + mapi_inplace, fold_left, fold_left_map, fold_right, @@ -32884,7 +33657,9 @@ mem, memq, find_opt, + find_index, find_map, + find_mapi, split, combine, sort, @@ -32911,70 +33686,74 @@ length = Stdlib_List[1], compare_lengths = Stdlib_List[2], compare_length_with = Stdlib_List[3], - cons = Stdlib_List[4], - hd = Stdlib_List[5], - tl = Stdlib_List[6], - nth = Stdlib_List[7], - nth_opt = Stdlib_List[8], - rev = Stdlib_List[9], - init = Stdlib_List[10], - append = Stdlib_List[11], - rev_append = Stdlib_List[12], - concat = Stdlib_List[13], - flatten = Stdlib_List[14], - equal = Stdlib_List[15], - compare = Stdlib_List[16], - iter = Stdlib_List[17], - iteri = Stdlib_List[18], - map = Stdlib_List[19], - mapi = Stdlib_List[20], - rev_map = Stdlib_List[21], - filter_map = Stdlib_List[22], - concat_map = Stdlib_List[23], - fold_left_map = Stdlib_List[24], - fold_left = Stdlib_List[25], - fold_right = Stdlib_List[26], - iter2 = Stdlib_List[27], - map2 = Stdlib_List[28], - rev_map2 = Stdlib_List[29], - fold_left2 = Stdlib_List[30], - fold_right2 = Stdlib_List[31], - for_all = Stdlib_List[32], - exists = Stdlib_List[33], - for_all2 = Stdlib_List[34], - exists2 = Stdlib_List[35], - mem = Stdlib_List[36], - memq = Stdlib_List[37], - find = Stdlib_List[38], - find_opt = Stdlib_List[39], - find_map = Stdlib_List[40], - filter = Stdlib_List[41], - find_all = Stdlib_List[42], - filteri = Stdlib_List[43], - partition = Stdlib_List[44], - partition_map = Stdlib_List[45], - assoc = Stdlib_List[46], - assoc_opt = Stdlib_List[47], - assq = Stdlib_List[48], - assq_opt = Stdlib_List[49], - mem_assoc = Stdlib_List[50], - mem_assq = Stdlib_List[51], - remove_assoc = Stdlib_List[52], - remove_assq = Stdlib_List[53], - split = Stdlib_List[54], - combine = Stdlib_List[55], - sort = Stdlib_List[56], - stable_sort = Stdlib_List[57], - fast_sort = Stdlib_List[58], - sort_uniq = Stdlib_List[59], - merge = Stdlib_List[60], - to_seq = Stdlib_List[61], - of_seq = Stdlib_List[62], + is_empty = Stdlib_List[4], + cons = Stdlib_List[5], + hd = Stdlib_List[6], + tl = Stdlib_List[7], + nth = Stdlib_List[8], + nth_opt = Stdlib_List[9], + rev = Stdlib_List[10], + init = Stdlib_List[11], + append = Stdlib_List[12], + rev_append = Stdlib_List[13], + concat = Stdlib_List[14], + flatten = Stdlib_List[15], + equal = Stdlib_List[16], + compare = Stdlib_List[17], + iter = Stdlib_List[18], + iteri = Stdlib_List[19], + map = Stdlib_List[20], + mapi = Stdlib_List[21], + rev_map = Stdlib_List[22], + filter_map = Stdlib_List[23], + concat_map = Stdlib_List[24], + fold_left_map = Stdlib_List[25], + fold_left = Stdlib_List[26], + fold_right = Stdlib_List[27], + iter2 = Stdlib_List[28], + map2 = Stdlib_List[29], + rev_map2 = Stdlib_List[30], + fold_left2 = Stdlib_List[31], + fold_right2 = Stdlib_List[32], + for_all = Stdlib_List[33], + exists = Stdlib_List[34], + for_all2 = Stdlib_List[35], + exists2 = Stdlib_List[36], + mem = Stdlib_List[37], + memq = Stdlib_List[38], + find = Stdlib_List[39], + find_opt = Stdlib_List[40], + find_index = Stdlib_List[41], + find_map = Stdlib_List[42], + find_mapi = Stdlib_List[43], + filter = Stdlib_List[44], + find_all = Stdlib_List[45], + filteri = Stdlib_List[46], + partition = Stdlib_List[47], + partition_map = Stdlib_List[48], + assoc = Stdlib_List[49], + assoc_opt = Stdlib_List[50], + assq = Stdlib_List[51], + assq_opt = Stdlib_List[52], + mem_assoc = Stdlib_List[53], + mem_assq = Stdlib_List[54], + remove_assoc = Stdlib_List[55], + remove_assq = Stdlib_List[56], + split = Stdlib_List[57], + combine = Stdlib_List[58], + sort = Stdlib_List[59], + stable_sort = Stdlib_List[60], + fast_sort = Stdlib_List[61], + sort_uniq = Stdlib_List[62], + merge = Stdlib_List[63], + to_seq = Stdlib_List[64], + of_seq = Stdlib_List[65], Stdlib_ListLabels = [0, length, compare_lengths, compare_length_with, + is_empty, cons, hd, tl, @@ -33011,7 +33790,9 @@ memq, find, find_opt, + find_index, find_map, + find_mapi, filter, find_all, filteri, @@ -33243,49 +34024,49 @@ empty = Stdlib_String[3], of_bytes = Stdlib_String[4], to_bytes = Stdlib_String[5], - concat = Stdlib_String[6], - cat = Stdlib_String[7], - equal = Stdlib_String[8], - compare = Stdlib_String[9], - starts_with = Stdlib_String[10], - ends_with = Stdlib_String[11], - contains_from = Stdlib_String[12], - rcontains_from = Stdlib_String[13], - contains = Stdlib_String[14], - sub = Stdlib_String[15], - split_on_char = Stdlib_String[16], - map = Stdlib_String[17], - mapi = Stdlib_String[18], - fold_left = Stdlib_String[19], - fold_right = Stdlib_String[20], - for_all = Stdlib_String[21], - exists = Stdlib_String[22], - trim = Stdlib_String[23], - escaped = Stdlib_String[24], - uppercase_ascii = Stdlib_String[25], - lowercase_ascii = Stdlib_String[26], - capitalize_ascii = Stdlib_String[27], - uncapitalize_ascii = Stdlib_String[28], - iter = Stdlib_String[29], - iteri = Stdlib_String[30], - index_from = Stdlib_String[31], - index_from_opt = Stdlib_String[32], - rindex_from = Stdlib_String[33], - rindex_from_opt = Stdlib_String[34], - index = Stdlib_String[35], - index_opt = Stdlib_String[36], - rindex = Stdlib_String[37], - rindex_opt = Stdlib_String[38], - to_seq = Stdlib_String[39], - to_seqi = Stdlib_String[40], - of_seq = Stdlib_String[41], - get_utf_8_uchar = Stdlib_String[42], - is_valid_utf_8 = Stdlib_String[43], - get_utf_16be_uchar = Stdlib_String[44], - is_valid_utf_16be = Stdlib_String[45], - get_utf_16le_uchar = Stdlib_String[46], - is_valid_utf_16le = Stdlib_String[47], - blit = Stdlib_String[48], + blit = Stdlib_String[6], + concat = Stdlib_String[7], + cat = Stdlib_String[8], + equal = Stdlib_String[9], + compare = Stdlib_String[10], + starts_with = Stdlib_String[11], + ends_with = Stdlib_String[12], + contains_from = Stdlib_String[13], + rcontains_from = Stdlib_String[14], + contains = Stdlib_String[15], + sub = Stdlib_String[16], + split_on_char = Stdlib_String[17], + map = Stdlib_String[18], + mapi = Stdlib_String[19], + fold_left = Stdlib_String[20], + fold_right = Stdlib_String[21], + for_all = Stdlib_String[22], + exists = Stdlib_String[23], + trim = Stdlib_String[24], + escaped = Stdlib_String[25], + uppercase_ascii = Stdlib_String[26], + lowercase_ascii = Stdlib_String[27], + capitalize_ascii = Stdlib_String[28], + uncapitalize_ascii = Stdlib_String[29], + iter = Stdlib_String[30], + iteri = Stdlib_String[31], + index_from = Stdlib_String[32], + index_from_opt = Stdlib_String[33], + rindex_from = Stdlib_String[34], + rindex_from_opt = Stdlib_String[35], + index = Stdlib_String[36], + index_opt = Stdlib_String[37], + rindex = Stdlib_String[38], + rindex_opt = Stdlib_String[39], + to_seq = Stdlib_String[40], + to_seqi = Stdlib_String[41], + of_seq = Stdlib_String[42], + get_utf_8_uchar = Stdlib_String[43], + is_valid_utf_8 = Stdlib_String[44], + get_utf_16be_uchar = Stdlib_String[45], + is_valid_utf_16be = Stdlib_String[46], + get_utf_16le_uchar = Stdlib_String[47], + is_valid_utf_16le = Stdlib_String[48], get_uint8 = Stdlib_String[49], get_int8 = Stdlib_String[50], get_uint16_ne = Stdlib_String[51], @@ -33309,6 +34090,7 @@ empty, of_bytes, to_bytes, + blit, concat, cat, equal, @@ -33351,7 +34133,6 @@ is_valid_utf_16be, get_utf_16le_uchar, is_valid_utf_16le, - blit, get_uint8, get_int8, get_uint16_ne, @@ -33438,8 +34219,8 @@ } var global_data = runtime.caml_get_global_data(), - Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib = global_data.Stdlib, + Stdlib_Bytes = global_data.Stdlib__Bytes, Stdlib_Sys = global_data.Stdlib__Sys, Stdlib_Fun = global_data.Stdlib__Fun, stdin = Stdlib[38], @@ -33452,16 +34233,16 @@ function with_open(openfun, s, f){ /*<>*/ /*<>*/ var ic = /*<>*/ caml_call1(openfun, s); - function _r_(param){ + function _x_(param){ /*<>*/ return /*<>*/ caml_call1 (f, ic); /*<>*/ } - function _s_(param){ + function _y_(param){ /*<>*/ return /*<>*/ caml_call1 (Stdlib[94], ic); /*<>*/ } /*<>*/ return /*<>*/ caml_call2 - (Stdlib_Fun[4], _s_, _r_); + (Stdlib_Fun[4], _y_, _x_); /*<>*/ } function with_open_bin(s, f){ /*<>*/ return with_open(Stdlib[80], s, f); @@ -33486,10 +34267,10 @@ /*<>*/ /*<>*/ var c = /*<>*/ caml_call1(Stdlib[82], ic); } - catch(_q_){ - var _p_ = caml_wrap_exception(_q_); - if(_p_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_p_, 0); + catch(_w_){ + var _v_ = caml_wrap_exception(_w_); + if(_v_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_v_, 0); } /*<>*/ return [0, c]; /*<>*/ } @@ -33498,10 +34279,10 @@ /*<>*/ /*<>*/ var n = /*<>*/ caml_call1(Stdlib[87], ic); } - catch(_o_){ - var _n_ = caml_wrap_exception(_o_); - if(_n_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_n_, 0); + catch(_u_){ + var _t_ = caml_wrap_exception(_u_); + if(_t_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_t_, 0); } /*<>*/ return [0, n]; /*<>*/ } @@ -33510,10 +34291,10 @@ /*<>*/ /*<>*/ var s = /*<>*/ caml_call1(Stdlib[83], ic); } - catch(_m_){ - var _l_ = caml_wrap_exception(_m_); - if(_l_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_l_, 0); + catch(_s_){ + var _r_ = caml_wrap_exception(_s_); + if(_r_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_r_, 0); } /*<>*/ return [0, s]; /*<>*/ } @@ -33524,10 +34305,10 @@ (Stdlib[85], ic, buf, pos, len); /*<>*/ return _a_; } - catch(_k_){ - var _j_ = caml_wrap_exception(_k_); - if(_j_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_j_, 0); + catch(_q_){ + var _p_ = caml_wrap_exception(_q_); + if(_p_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_p_, 0); } /*<>*/ } function really_input_string(ic, len){ @@ -33535,10 +34316,10 @@ /*<>*/ /*<>*/ var s = /*<>*/ caml_call2(Stdlib[86], ic, len); } - catch(_i_){ - var _h_ = caml_wrap_exception(_i_); - if(_h_ === Stdlib[12]) /*<>*/ return 0; - throw caml_maybe_attach_backtrace(_h_, 0); + catch(_o_){ + var _n_ = caml_wrap_exception(_o_); + if(_n_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_n_, 0); } /*<>*/ return [0, s]; /*<>*/ } @@ -33593,15 +34374,15 @@ chunk_size = 65536; /*<>*/ try{ /*<>*/ var - /*<>*/ _d_ = + /*<>*/ _j_ = /*<>*/ caml_call1(Stdlib[91], ic), - /*<>*/ _e_ = - /*<>*/ caml_call1(Stdlib[92], ic) - _d_ | 0, - initial_size = _e_; + /*<>*/ _k_ = + /*<>*/ caml_call1(Stdlib[92], ic) - _j_ | 0, + initial_size = _k_; } - catch(_g_){ - var _b_ = caml_wrap_exception(_g_); - if(_b_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_b_, 0); + catch(_m_){ + var _h_ = caml_wrap_exception(_m_); + if(_h_[1] !== Stdlib[11]) throw caml_maybe_attach_backtrace(_h_, 0); var initial_size = -1; } /*<>*/ var @@ -33620,12 +34401,12 @@ /*<>*/ /*<>*/ var c = /*<>*/ caml_call1(Stdlib[82], ic); } - catch(_f_){ - var _c_ = caml_wrap_exception(_f_); - if(_c_ === Stdlib[12]) + catch(_l_){ + var _i_ = caml_wrap_exception(_l_); + if(_i_ === Stdlib[12]) /*<>*/ return /*<>*/ caml_call1 (Stdlib_Bytes[44], buf); - throw caml_maybe_attach_backtrace(_c_, 0); + throw caml_maybe_attach_backtrace(_i_, 0); } /*<>*/ /*<>*/ var buf$2 = ensure(buf, nread, 65537); @@ -33646,6 +34427,55 @@ var ofs$0 = ofs + rem | 0, buf$0 = buf$1, ofs = ofs$0; } /*<>*/ } + function input_lines(ic){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + line = /*<>*/ caml_call1(Stdlib[83], ic); + } + catch(_g_){ + var _d_ = caml_wrap_exception(_g_); + if(_d_ === Stdlib[12]) /*<>*/ return 0; + throw caml_maybe_attach_backtrace(_d_, 0); + } + /*<>*/ var + /*<>*/ block = [0, line, 24029], + dst = block, + offset = 1; + /*<>*/ for(;;){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + line$0 = /*<>*/ caml_call1(Stdlib[83], ic); + } + catch(_f_){ + var _e_ = caml_wrap_exception(_f_); + if(_e_ !== Stdlib[12]) throw caml_maybe_attach_backtrace(_e_, 0); + dst[1 + offset] = 0; + /*<>*/ return block; + } + /*<>*/ /*<>*/ var + dst$0 = [0, line$0, 24029]; + dst[1 + offset] = dst$0; + var dst = dst$0, offset = 1; + } + /*<>*/ } + function fold_lines(f, accu, ic){ + /*<>*/ var accu$0 = accu; + /*<>*/ for(;;){ + /*<>*/ try{ + /*<>*/ /*<>*/ var + line = /*<>*/ caml_call1(Stdlib[83], ic); + } + catch(_c_){ + var _b_ = caml_wrap_exception(_c_); + if(_b_ === Stdlib[12]) /*<>*/ return accu$0; + throw caml_maybe_attach_backtrace(_b_, 0); + } + /*<>*/ var + /*<>*/ accu$1 = + /*<>*/ caml_call2(f, accu$0, line), + accu$0 = accu$1; + } + /*<>*/ } var set_binary_mode = Stdlib[95], Stdlib_In_channel = @@ -33657,19 +34487,22 @@ with_open_bin, with_open_text, with_open_gen, - seek, - pos, - length, close, close_noerr, input_char, input_byte, input_line, - input, - really_input, really_input_string, input_all, - set_binary_mode]; + input_lines, + input, + really_input, + fold_lines, + seek, + pos, + length, + set_binary_mode, + runtime.caml_sys_isatty]; runtime.caml_register_global(6, Stdlib_In_channel, "Stdlib__In_channel"); return; /*<>*/ } @@ -33751,22 +34584,23 @@ with_open_bin, with_open_text, with_open_gen, - seek, - pos, - length, close, close_noerr, - flush, - flush_all, output_char, output_byte, output_string, output_bytes, output, output_substring, + flush, + flush_all, + seek, + pos, + length, set_binary_mode, runtime.caml_ml_set_buffered, - runtime.caml_ml_is_buffered]; + runtime.caml_ml_is_buffered, + runtime.caml_sys_isatty]; runtime.caml_register_global(2, Stdlib_Out_channel, "Stdlib__Out_channel"); return; /*<>*/ }