diff --git a/jscomp/core/js_exp_make.ml b/jscomp/core/js_exp_make.ml index 039fc15120..0a4de5223a 100644 --- a/jscomp/core/js_exp_make.ml +++ b/jscomp/core/js_exp_make.ml @@ -1319,7 +1319,7 @@ let not_implemented ?comment (s : string) : t = runtime_call Js_runtime_modules.missing_polyfill "not_implemented" - [str (s ^ " not implemented by bucklescript yet\n")] + [str s] diff --git a/jscomp/runtime/.depend b/jscomp/runtime/.depend index 9a3d86250b..e885df0260 100644 --- a/jscomp/runtime/.depend +++ b/jscomp/runtime/.depend @@ -27,7 +27,7 @@ caml_oo.cmj : bs_obj.cmj caml_oo.cmi curry.cmj : caml_array.cmj caml_oo_curry.cmj : curry.cmj caml_oo.cmj caml_module.cmj : -caml_missing_polyfill.cmj : caml_missing_polyfill.cmi +caml_missing_polyfill.cmj : js_exn.cmj caml_missing_polyfill.cmi bs_string.cmj : js_float.cmj : js_exn.cmj : caml_exceptions.cmj js_exn.cmi diff --git a/jscomp/runtime/caml_missing_polyfill.ml b/jscomp/runtime/caml_missing_polyfill.ml index a0e7a5666d..d987f0df6a 100644 --- a/jscomp/runtime/caml_missing_polyfill.ml +++ b/jscomp/runtime/caml_missing_polyfill.ml @@ -22,5 +22,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -let not_implemented : string -> 'a [@bs] = - [%raw{|function (s){ throw new Error(s)}|}] +let not_implemented s = + Js_exn.raiseError (s ^ " not implemented by BuckleScript yet\n") + diff --git a/jscomp/runtime/caml_missing_polyfill.mli b/jscomp/runtime/caml_missing_polyfill.mli index 2632f3a5af..a6ab4ffae6 100644 --- a/jscomp/runtime/caml_missing_polyfill.mli +++ b/jscomp/runtime/caml_missing_polyfill.mli @@ -23,4 +23,4 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *) -val not_implemented : string -> 'a [@bs] +val not_implemented : string -> 'a diff --git a/jscomp/test/bigarray_test.js b/jscomp/test/bigarray_test.js index 91cde57d28..716a87718e 100644 --- a/jscomp/test/bigarray_test.js +++ b/jscomp/test/bigarray_test.js @@ -6,14 +6,14 @@ var Caml_missing_polyfill = require("../../lib/js/caml_missing_polyfill.js"); function sum() { var result = 0; - for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1 not implemented by bucklescript yet\n") - 1 | 0; i <= i_finish; ++i){ - result = result + Caml_missing_polyfill.not_implemented("caml_ba_get_1 not implemented by bucklescript yet\n") | 0; + for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1") - 1 | 0; i <= i_finish; ++i){ + result = result + Caml_missing_polyfill.not_implemented("caml_ba_get_1") | 0; } return /* () */0; } function init(v) { - for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1 not implemented by bucklescript yet\n") - 1 | 0; i <= i_finish; ++i){ + for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1") - 1 | 0; i <= i_finish; ++i){ v[i] = /* array */[ Caml_int32.imul(i, i), Caml_int32.imul(Caml_int32.imul(i, i), i) @@ -23,15 +23,15 @@ function init(v) { } function init2(v) { - for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1 not implemented by bucklescript yet\n") - 1 | 0; i <= i_finish; ++i){ + for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1") - 1 | 0; i <= i_finish; ++i){ v[i] = i; } return /* () */0; } function init3() { - for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1 not implemented by bucklescript yet\n") - 1 | 0; i <= i_finish; ++i){ - Caml_missing_polyfill.not_implemented("caml_ba_set_1 not implemented by bucklescript yet\n"); + for(var i = 0 ,i_finish = Caml_missing_polyfill.not_implemented("caml_ba_dim_1") - 1 | 0; i <= i_finish; ++i){ + Caml_missing_polyfill.not_implemented("caml_ba_set_1"); } return /* () */0; } diff --git a/jscomp/test/ext_filename_test.js b/jscomp/test/ext_filename_test.js index d099bd751a..ef2cdd089b 100644 --- a/jscomp/test/ext_filename_test.js +++ b/jscomp/test/ext_filename_test.js @@ -211,7 +211,7 @@ function node_relative_path(node_modules_shorten, file1, dep_file) { function find_root_filename(_cwd, filename) { while(true) { var cwd = _cwd; - if (Caml_missing_polyfill.not_implemented("caml_sys_file_exists not implemented by bucklescript yet\n")) { + if (Caml_missing_polyfill.not_implemented("caml_sys_file_exists")) { return cwd; } else { var cwd$prime = Curry._1(Filename.dirname, cwd); diff --git a/jscomp/test/ocaml_parsetree_test.js b/jscomp/test/ocaml_parsetree_test.js index 06a5448a5a..5ab0d1ce7f 100644 --- a/jscomp/test/ocaml_parsetree_test.js +++ b/jscomp/test/ocaml_parsetree_test.js @@ -1216,7 +1216,7 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { throw Pervasives.Exit; } Caml_io.caml_ml_flush(Pervasives.stdout); - Caml_missing_polyfill.not_implemented("caml_terminfo_backup not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_backup"); var bol = false; Pervasives.print_string("# "); for(var pos = 0 ,pos_finish = (lb[/* lex_buffer_len */2] - pos0 | 0) - 1 | 0; pos <= pos_finish; ++pos){ @@ -1229,21 +1229,21 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { return pos === loc[/* loc_start */0][/* pos_cnum */3]; } }(pos)), locs)) { - Caml_missing_polyfill.not_implemented("caml_terminfo_standout not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_standout"); } if (List.exists((function(pos){ return function (loc) { return pos === loc[/* loc_end */1][/* pos_cnum */3]; } }(pos)), locs)) { - Caml_missing_polyfill.not_implemented("caml_terminfo_standout not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_standout"); } var c = Caml_bytes.get(lb[/* lex_buffer */1], pos + pos0 | 0); Pervasives.print_char(c); bol = c === /* "\n" */10; } - Caml_missing_polyfill.not_implemented("caml_terminfo_standout not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("caml_terminfo_resume not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_standout"); + Caml_missing_polyfill.not_implemented("caml_terminfo_resume"); return Caml_io.caml_ml_flush(Pervasives.stdout); } @@ -1397,7 +1397,7 @@ function highlight_locations(ppf, locs) { return false; } } else { - status[0] = Caml_missing_polyfill.not_implemented("caml_terminfo_setup not implemented by bucklescript yet\n"); + status[0] = Caml_missing_polyfill.not_implemented("caml_terminfo_setup"); continue ; } } else { diff --git a/jscomp/test/ocaml_typedtree_test.js b/jscomp/test/ocaml_typedtree_test.js index 8874878eb3..3dc25f7058 100644 --- a/jscomp/test/ocaml_typedtree_test.js +++ b/jscomp/test/ocaml_typedtree_test.js @@ -224,9 +224,9 @@ function find_in_path_uncap(path, name) { var dir = param[0]; var fullname = Filename.concat(dir, name); var ufullname = Filename.concat(dir, uname); - if (Caml_missing_polyfill.not_implemented("caml_sys_file_exists not implemented by bucklescript yet\n")) { + if (Caml_missing_polyfill.not_implemented("caml_sys_file_exists")) { return ufullname; - } else if (Caml_missing_polyfill.not_implemented("caml_sys_file_exists not implemented by bucklescript yet\n")) { + } else if (Caml_missing_polyfill.not_implemented("caml_sys_file_exists")) { return fullname; } else { _param = param[1]; @@ -240,7 +240,7 @@ function find_in_path_uncap(path, name) { function remove_file() { try { - return Caml_missing_polyfill.not_implemented("caml_sys_remove not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_sys_remove"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -1460,7 +1460,7 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { throw Pervasives.Exit; } Caml_io.caml_ml_flush(Pervasives.stdout); - Caml_missing_polyfill.not_implemented("caml_terminfo_backup not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_backup"); var bol = false; Pervasives.print_string("# "); for(var pos = 0 ,pos_finish = (lb[/* lex_buffer_len */2] - pos0 | 0) - 1 | 0; pos <= pos_finish; ++pos){ @@ -1473,21 +1473,21 @@ function highlight_terminfo(ppf, num_lines, lb, locs) { return pos === loc[/* loc_start */0][/* pos_cnum */3]; } }(pos)), locs)) { - Caml_missing_polyfill.not_implemented("caml_terminfo_standout not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_standout"); } if (List.exists((function(pos){ return function (loc) { return pos === loc[/* loc_end */1][/* pos_cnum */3]; } }(pos)), locs)) { - Caml_missing_polyfill.not_implemented("caml_terminfo_standout not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_standout"); } var c = Caml_bytes.get(lb[/* lex_buffer */1], pos + pos0 | 0); Pervasives.print_char(c); bol = c === /* "\n" */10; } - Caml_missing_polyfill.not_implemented("caml_terminfo_standout not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("caml_terminfo_resume not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_terminfo_standout"); + Caml_missing_polyfill.not_implemented("caml_terminfo_resume"); return Caml_io.caml_ml_flush(Pervasives.stdout); } @@ -1641,7 +1641,7 @@ function highlight_locations(ppf, locs) { return false; } } else { - status[0] = Caml_missing_polyfill.not_implemented("caml_terminfo_setup not implemented by bucklescript yet\n"); + status[0] = Caml_missing_polyfill.not_implemented("caml_terminfo_setup"); continue ; } } else { @@ -5343,9 +5343,9 @@ function backtrack(param) { var $$Error$1 = Caml_exceptions.create("Ocaml_typedtree_test.Cmi_format.Error"); function input_cmi() { - var match = Caml_missing_polyfill.not_implemented("caml_input_value not implemented by bucklescript yet\n"); - var crcs = Caml_missing_polyfill.not_implemented("caml_input_value not implemented by bucklescript yet\n"); - var flags = Caml_missing_polyfill.not_implemented("caml_input_value not implemented by bucklescript yet\n"); + var match = Caml_missing_polyfill.not_implemented("caml_input_value"); + var crcs = Caml_missing_polyfill.not_implemented("caml_input_value"); + var flags = Caml_missing_polyfill.not_implemented("caml_input_value"); return /* record */[ /* cmi_name */match[0], /* cmi_sign */match[1], @@ -5359,7 +5359,7 @@ function read_cmi(filename) { try { var buffer = Pervasives.really_input_string(ic, cmi_magic_number.length); if (buffer !== cmi_magic_number) { - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); var pre_len = cmi_magic_number.length - 3 | 0; if ($$String.sub(buffer, 0, pre_len) === $$String.sub(cmi_magic_number, 0, pre_len)) { var msg = buffer < cmi_magic_number ? "an older" : "a newer"; @@ -5378,25 +5378,25 @@ function read_cmi(filename) { } } var cmi = input_cmi(ic); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return cmi; } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); if (exn === Caml_builtin_exceptions.end_of_file) { - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); throw [ $$Error$1, /* Corrupted_interface */Block.__(2, [filename]) ]; } else if (exn[0] === Caml_builtin_exceptions.failure) { - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); throw [ $$Error$1, /* Corrupted_interface */Block.__(2, [filename]) ]; } else if (exn[0] === $$Error$1) { - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); throw [ $$Error$1, exn[1] @@ -5409,11 +5409,11 @@ function read_cmi(filename) { function output_cmi(filename, oc, _) { Pervasives.output_string(oc, cmi_magic_number); - Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_output_value"); Caml_io.caml_ml_flush(oc); var crc = Digest.file(filename); - Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_output_value"); + Caml_missing_polyfill.not_implemented("caml_output_value"); return crc; } @@ -12446,7 +12446,7 @@ function save_signature(sg, modname, filename) { ]; var crc = output_cmi(filename$1, oc, cmi); Caml_io.caml_ml_flush(oc); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); var comps = components_of_module(empty, identity, /* Pident */Block.__(0, [/* record */[ /* stamp */0, /* name */modname$1, @@ -12472,7 +12472,7 @@ function save_signature(sg, modname, filename) { } catch (exn){ Caml_io.caml_ml_flush(oc); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); remove_file(filename$1); throw exn; } @@ -23564,7 +23564,7 @@ function clear_env(binary_annots) { function output_cmt(oc, _) { Pervasives.output_string(oc, "Caml2012T004"); - return Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value"); } var saved_types = [/* [] */0]; @@ -23646,7 +23646,7 @@ function save_cmt(filename, modname, binary_annots, sourcefile, initial_env, sg) ]; output_cmt(oc, cmt); Caml_io.caml_ml_flush(oc); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } return clear(/* () */0); } @@ -75808,7 +75808,7 @@ function type_implementation_more(sourcefile, outputprefix, modulename, initial_ } else { var sourceintf = chop_extension_if_any(sourcefile) + interface_suffix[0]; var mli_status = assume_no_mli[0]; - if (mli_status === /* Mli_na */0 && Caml_missing_polyfill.not_implemented("caml_sys_file_exists not implemented by bucklescript yet\n") || mli_status === /* Mli_exists */1) { + if (mli_status === /* Mli_na */0 && Caml_missing_polyfill.not_implemented("caml_sys_file_exists") || mli_status === /* Mli_exists */1) { var intf_file; try { intf_file = find_in_path_uncap(load_path[0], modulename + ".cmi"); diff --git a/jscomp/test/qcc.js b/jscomp/test/qcc.js index 2606c18fcc..60568a769d 100644 --- a/jscomp/test/qcc.js +++ b/jscomp/test/qcc.js @@ -1858,7 +1858,7 @@ function main() { top(/* () */0); elfgen(oc); Caml_io.caml_ml_flush(oc); - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } } diff --git a/jscomp/test/scanf_io.js b/jscomp/test/scanf_io.js index 4d5cd405c2..a2d1c76c57 100644 --- a/jscomp/test/scanf_io.js +++ b/jscomp/test/scanf_io.js @@ -54,7 +54,7 @@ function write_tscanf_data_file(fname, lines) { create_tscanf_data(ob, lines); $$Buffer.output_buffer(oc, ob); Caml_io.caml_ml_flush(oc); - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } function get_lines(fname) { diff --git a/jscomp/test/sexpm.js b/jscomp/test/sexpm.js index e97b6fa368..fbb04a7929 100644 --- a/jscomp/test/sexpm.js +++ b/jscomp/test/sexpm.js @@ -25,12 +25,12 @@ function _with_in(filename, f) { var ic = Pervasives.open_in_bin(filename); try { var x = Curry._1(f, ic); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return x; } catch (raw_e){ var e = Js_exn.internalToOCamlException(raw_e); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return /* `Error */[ 106380200, Printexc.to_string(e) @@ -318,12 +318,12 @@ function to_file_seq(filename, seq) { try { var x = Curry._1(f, oc); Caml_io.caml_ml_flush(oc); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return x; } catch (e){ Caml_io.caml_ml_flush(oc); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); throw e; } } diff --git a/jscomp/test/test_per.js b/jscomp/test/test_per.js index 2c5db9936a..900e09542b 100644 --- a/jscomp/test/test_per.js +++ b/jscomp/test/test_per.js @@ -182,7 +182,7 @@ var stdout = Caml_io.caml_ml_open_descriptor_out(1); var stderr = Caml_io.caml_ml_open_descriptor_out(2); function open_out_gen(_, _$1, _$2) { - return Caml_io.caml_ml_open_descriptor_out(Caml_missing_polyfill.not_implemented("caml_sys_open not implemented by bucklescript yet\n")); + return Caml_io.caml_ml_open_descriptor_out(Caml_missing_polyfill.not_implemented("caml_sys_open")); } function open_out(name) { @@ -267,12 +267,12 @@ function output_substring(oc, s, ofs, len) { } function output_value(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value"); } function close_out(oc) { Caml_io.caml_ml_flush(oc); - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } function close_out_noerr(oc) { @@ -283,7 +283,7 @@ function close_out_noerr(oc) { } try { - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } catch (exn$1){ return /* () */0; @@ -291,7 +291,7 @@ function close_out_noerr(oc) { } function open_in_gen(_, _$1, _$2) { - return Caml_io.caml_ml_open_descriptor_in(Caml_missing_polyfill.not_implemented("caml_sys_open not implemented by bucklescript yet\n")); + return Caml_io.caml_ml_open_descriptor_in(Caml_missing_polyfill.not_implemented("caml_sys_open")); } function open_in(name) { @@ -321,7 +321,7 @@ function input(_, s, ofs, len) { "input" ]; } else { - return Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_input"); } } @@ -332,7 +332,7 @@ function unsafe_really_input(_, _$1, _ofs, _len) { if (len <= 0) { return /* () */0; } else { - var r = Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + var r = Caml_missing_polyfill.not_implemented("caml_ml_input"); if (r === 0) { throw Caml_builtin_exceptions.end_of_file; } else { @@ -383,7 +383,7 @@ function input_line(chan) { while(true) { var len = _len; var accu = _accu; - var n = Caml_missing_polyfill.not_implemented("caml_ml_input_scan_line not implemented by bucklescript yet\n"); + var n = Caml_missing_polyfill.not_implemented("caml_ml_input_scan_line"); if (n === 0) { if (accu) { return build_result(Caml_string.caml_create_string(len), len, accu); @@ -392,7 +392,7 @@ function input_line(chan) { } } else if (n > 0) { var res = Caml_string.caml_create_string(n - 1 | 0); - Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_input"); Caml_io.caml_ml_input_char(chan); if (accu) { var len$1 = (len + n | 0) - 1 | 0; @@ -405,7 +405,7 @@ function input_line(chan) { } } else { var beg = Caml_string.caml_create_string(-n | 0); - Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_input"); _len = len - n | 0; _accu = /* :: */[ beg, @@ -418,7 +418,7 @@ function input_line(chan) { function close_in_noerr() { try { - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } catch (exn){ return /* () */0; diff --git a/jscomp/test/test_unsupported_primitive.js b/jscomp/test/test_unsupported_primitive.js index 3a06cb7ce8..5d438d49e6 100644 --- a/jscomp/test/test_unsupported_primitive.js +++ b/jscomp/test/test_unsupported_primitive.js @@ -10,7 +10,7 @@ function to_buffer(buff, ofs, len, _, _$1) { "Marshal.to_buffer: substring out of bounds" ]; } else { - return Caml_missing_polyfill.not_implemented("caml_output_value_to_buffer not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value_to_buffer"); } } diff --git a/lib/js/bigarray.js b/lib/js/bigarray.js index d2c3fd8b6b..7be3dad014 100644 --- a/lib/js/bigarray.js +++ b/lib/js/bigarray.js @@ -5,10 +5,10 @@ var Caml_missing_polyfill = require("./caml_missing_polyfill.js"); var Caml_builtin_exceptions = require("./caml_builtin_exceptions.js"); function dims() { - var n = Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n"); + var n = Caml_missing_polyfill.not_implemented("caml_ba_num_dims"); var d = Caml_array.caml_make_vect(n, 0); for(var i = 0 ,i_finish = n - 1 | 0; i <= i_finish; ++i){ - Caml_array.caml_array_set(d, i, Caml_missing_polyfill.not_implemented("caml_ba_dim not implemented by bucklescript yet\n")); + Caml_array.caml_array_set(d, i, Caml_missing_polyfill.not_implemented("caml_ba_dim")); } return d; } @@ -18,7 +18,7 @@ function map_file(_, $staropt$star, _$1, _$2, _$3, _$4) { /* hi */0, /* lo */0 ]; - return Caml_missing_polyfill.not_implemented("caml_ba_map_file_bytecode not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_map_file_bytecode"); } var Genarray = /* module */[ @@ -27,14 +27,14 @@ var Genarray = /* module */[ ]; function create(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("caml_ba_create not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_create"); } function of_array(kind, layout, data) { var ba = create(kind, layout, data.length); layout ? 1 : 0; for(var i = 0 ,i_finish = data.length - 1 | 0; i <= i_finish; ++i){ - Caml_missing_polyfill.not_implemented("caml_ba_set_1 not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ba_set_1"); } return ba; } @@ -50,15 +50,15 @@ var Array1 = /* module */[ ]; function create$1(_, _$1, _$2, _$3) { - return Caml_missing_polyfill.not_implemented("caml_ba_create not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_create"); } function slice_left(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_slice"); } function slice_right(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_slice"); } function of_array$1(kind, layout, data) { @@ -75,7 +75,7 @@ function of_array$1(kind, layout, data) { ]; } for(var j = 0 ,j_finish = dim2 - 1 | 0; j <= j_finish; ++j){ - Caml_missing_polyfill.not_implemented("caml_ba_set_2 not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ba_set_2"); } } return ba; @@ -97,23 +97,23 @@ var Array2 = /* module */[ ]; function create$2(_, _$1, _$2, _$3, _$4) { - return Caml_missing_polyfill.not_implemented("caml_ba_create not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_create"); } function slice_left_1(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_slice"); } function slice_right_1(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_slice"); } function slice_left_2(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_slice"); } function slice_right_2(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ba_slice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_slice"); } function of_array$2(kind, layout, data) { @@ -139,7 +139,7 @@ function of_array$2(kind, layout, data) { ]; } for(var k = 0 ,k_finish = dim3 - 1 | 0; k <= k_finish; ++k){ - Caml_missing_polyfill.not_implemented("caml_ba_set_3 not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ba_set_3"); } } } @@ -165,7 +165,7 @@ var Array3 = /* module */[ ]; function array1_of_genarray(a) { - if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n") === 1) { + if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims") === 1) { return a; } else { throw [ @@ -176,7 +176,7 @@ function array1_of_genarray(a) { } function array2_of_genarray(a) { - if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n") === 2) { + if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims") === 2) { return a; } else { throw [ @@ -187,7 +187,7 @@ function array2_of_genarray(a) { } function array3_of_genarray(a) { - if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims not implemented by bucklescript yet\n") === 3) { + if (Caml_missing_polyfill.not_implemented("caml_ba_num_dims") === 3) { return a; } else { throw [ @@ -198,15 +198,15 @@ function array3_of_genarray(a) { } function reshape_1(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_reshape"); } function reshape_2(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_reshape"); } function reshape_3(_, _$1, _$2, _$3) { - return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_reshape"); } var float32 = /* Float32 */0; @@ -240,7 +240,7 @@ var c_layout = /* C_layout */0; var fortran_layout = /* Fortran_layout */1; function reshape(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ba_reshape not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ba_reshape"); } exports.float32 = float32; diff --git a/lib/js/caml_missing_polyfill.js b/lib/js/caml_missing_polyfill.js index 1de30744b2..001518bb43 100644 --- a/lib/js/caml_missing_polyfill.js +++ b/lib/js/caml_missing_polyfill.js @@ -1,7 +1,10 @@ 'use strict'; -var not_implemented = (function (s){ throw new Error(s)}); +function not_implemented(s) { + var str = s + " not implemented by BuckleScript yet\n"; + throw new Error(str); +} exports.not_implemented = not_implemented; -/* not_implemented Not a pure module */ +/* No side effect */ diff --git a/lib/js/digest.js b/lib/js/digest.js index b3c1cd2ded..033a0aafc7 100644 --- a/lib/js/digest.js +++ b/lib/js/digest.js @@ -36,15 +36,15 @@ function file(filename) { var exit = 0; var d; try { - d = Caml_missing_polyfill.not_implemented("caml_md5_chan not implemented by bucklescript yet\n"); + d = Caml_missing_polyfill.not_implemented("caml_md5_chan"); exit = 1; } catch (e){ - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); throw e; } if (exit === 1) { - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return d; } diff --git a/lib/js/filename.js b/lib/js/filename.js index 6ce6e42d31..7fde1ec3fc 100644 --- a/lib/js/filename.js +++ b/lib/js/filename.js @@ -263,7 +263,7 @@ function temp_file($staropt$star, prefix, suffix) { var counter = _counter; var name = temp_file_name(temp_dir, prefix, suffix); try { - Caml_missing_polyfill.not_implemented("caml_sys_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_sys_close"); return name; } catch (raw_e){ diff --git a/lib/js/hashtbl.js b/lib/js/hashtbl.js index 378b5e19f1..17bfb8b9f8 100644 --- a/lib/js/hashtbl.js +++ b/lib/js/hashtbl.js @@ -134,7 +134,7 @@ function key_index(h, key) { if (h.length >= 3) { return Caml_hash.caml_hash(10, 100, h[/* seed */2], key) & (h[/* data */1].length - 1 | 0); } else { - return Caml_missing_polyfill.not_implemented("caml_hash_univ_param not implemented by bucklescript yet\n") % h[/* data */1].length; + return Caml_missing_polyfill.not_implemented("caml_hash_univ_param") % h[/* data */1].length; } } diff --git a/lib/js/marshal.js b/lib/js/marshal.js index da18e41e62..d840e01ce3 100644 --- a/lib/js/marshal.js +++ b/lib/js/marshal.js @@ -11,7 +11,7 @@ function to_buffer(buff, ofs, len, _, _$1) { "Marshal.to_buffer: substring out of bounds" ]; } else { - return Caml_missing_polyfill.not_implemented("caml_output_value_to_buffer not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value_to_buffer"); } } @@ -22,7 +22,7 @@ function data_size(buff, ofs) { "Marshal.data_size" ]; } else { - return Caml_missing_polyfill.not_implemented("caml_marshal_data_size not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_marshal_data_size"); } } @@ -37,14 +37,14 @@ function from_bytes(buff, ofs) { "Marshal.from_bytes" ]; } else { - var len = Caml_missing_polyfill.not_implemented("caml_marshal_data_size not implemented by bucklescript yet\n"); + var len = Caml_missing_polyfill.not_implemented("caml_marshal_data_size"); if (ofs > (buff.length - (20 + len | 0) | 0)) { throw [ Caml_builtin_exceptions.invalid_argument, "Marshal.from_bytes" ]; } else { - return Caml_missing_polyfill.not_implemented("caml_input_value_from_string not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_input_value_from_string"); } } } @@ -54,11 +54,11 @@ function from_string(buff, ofs) { } function to_channel(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value"); } function from_channel() { - return Caml_missing_polyfill.not_implemented("caml_input_value not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_input_value"); } var header_size = 20; diff --git a/lib/js/obj.js b/lib/js/obj.js index bfa0910e2d..3f00381c10 100644 --- a/lib/js/obj.js +++ b/lib/js/obj.js @@ -10,7 +10,7 @@ var double_field = Caml_array.caml_array_get; var set_double_field = Caml_array.caml_array_set; function marshal() { - return Caml_missing_polyfill.not_implemented("caml_output_value_to_string not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value_to_string"); } function unmarshal(str, pos) { diff --git a/lib/js/pervasives.js b/lib/js/pervasives.js index 37e3f7c96a..97d698af93 100644 --- a/lib/js/pervasives.js +++ b/lib/js/pervasives.js @@ -121,7 +121,7 @@ var stdout = Caml_io.stdout; var stderr = Caml_io.stderr; function open_out_gen(_, _$1, _$2) { - return Caml_io.caml_ml_open_descriptor_out(Caml_missing_polyfill.not_implemented("caml_sys_open not implemented by bucklescript yet\n")); + return Caml_io.caml_ml_open_descriptor_out(Caml_missing_polyfill.not_implemented("caml_sys_open")); } function open_out(name) { @@ -206,12 +206,12 @@ function output_substring(oc, s, ofs, len) { } function output_value(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_output_value not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_output_value"); } function close_out(oc) { Caml_io.caml_ml_flush(oc); - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } function close_out_noerr(oc) { @@ -222,7 +222,7 @@ function close_out_noerr(oc) { } try { - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } catch (exn$1){ return /* () */0; @@ -230,7 +230,7 @@ function close_out_noerr(oc) { } function open_in_gen(_, _$1, _$2) { - return Caml_io.caml_ml_open_descriptor_in(Caml_missing_polyfill.not_implemented("caml_sys_open not implemented by bucklescript yet\n")); + return Caml_io.caml_ml_open_descriptor_in(Caml_missing_polyfill.not_implemented("caml_sys_open")); } function open_in(name) { @@ -260,7 +260,7 @@ function input(_, s, ofs, len) { "input" ]; } else { - return Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_input"); } } @@ -271,7 +271,7 @@ function unsafe_really_input(_, _$1, _ofs, _len) { if (len <= 0) { return /* () */0; } else { - var r = Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + var r = Caml_missing_polyfill.not_implemented("caml_ml_input"); if (r === 0) { throw Caml_builtin_exceptions.end_of_file; } else { @@ -321,7 +321,7 @@ function input_line(chan) { while(true) { var len = _len; var accu = _accu; - var n = Caml_missing_polyfill.not_implemented("caml_ml_input_scan_line not implemented by bucklescript yet\n"); + var n = Caml_missing_polyfill.not_implemented("caml_ml_input_scan_line"); if (n === 0) { if (accu) { return build_result(Caml_string.caml_create_string(len), len, accu); @@ -330,7 +330,7 @@ function input_line(chan) { } } else if (n > 0) { var res = Caml_string.caml_create_string(n - 1 | 0); - Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_input"); Caml_io.caml_ml_input_char(chan); if (accu) { var len$1 = (len + n | 0) - 1 | 0; @@ -343,7 +343,7 @@ function input_line(chan) { } } else { var beg = Caml_string.caml_create_string(-n | 0); - Caml_missing_polyfill.not_implemented("caml_ml_input not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_input"); _len = len - n | 0; _accu = /* :: */[ beg, @@ -358,7 +358,7 @@ function input_line(chan) { function close_in_noerr() { try { - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } catch (exn){ return /* () */0; @@ -470,23 +470,23 @@ var output_char = Caml_io.caml_ml_output_char; var output_byte = Caml_io.caml_ml_output_char; function output_binary_int(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_output_int not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_output_int"); } function seek_out(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_seek_out not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_seek_out"); } function pos_out() { - return Caml_missing_polyfill.not_implemented("caml_ml_pos_out not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_pos_out"); } function out_channel_length() { - return Caml_missing_polyfill.not_implemented("caml_ml_channel_size not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_channel_size"); } function set_binary_mode_out(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_set_binary_mode not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_set_binary_mode"); } var input_char = Caml_io.caml_ml_input_char; @@ -494,55 +494,55 @@ var input_char = Caml_io.caml_ml_input_char; var input_byte = Caml_io.caml_ml_input_char; function input_binary_int() { - return Caml_missing_polyfill.not_implemented("caml_ml_input_int not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_input_int"); } function input_value() { - return Caml_missing_polyfill.not_implemented("caml_input_value not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_input_value"); } function seek_in(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_seek_in not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_seek_in"); } function pos_in() { - return Caml_missing_polyfill.not_implemented("caml_ml_pos_in not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_pos_in"); } function in_channel_length() { - return Caml_missing_polyfill.not_implemented("caml_ml_channel_size not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_channel_size"); } function close_in() { - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } function set_binary_mode_in(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_set_binary_mode not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_set_binary_mode"); } function LargeFile_000(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_seek_out_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_seek_out_64"); } function LargeFile_001() { - return Caml_missing_polyfill.not_implemented("caml_ml_pos_out_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_pos_out_64"); } function LargeFile_002() { - return Caml_missing_polyfill.not_implemented("caml_ml_channel_size_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_channel_size_64"); } function LargeFile_003(_, _$1) { - return Caml_missing_polyfill.not_implemented("caml_ml_seek_in_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_seek_in_64"); } function LargeFile_004() { - return Caml_missing_polyfill.not_implemented("caml_ml_pos_in_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_pos_in_64"); } function LargeFile_005() { - return Caml_missing_polyfill.not_implemented("caml_ml_channel_size_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_channel_size_64"); } var LargeFile = [ diff --git a/lib/js/scanf.js b/lib/js/scanf.js index 5dc758efc6..2ae24bbc40 100644 --- a/lib/js/scanf.js +++ b/lib/js/scanf.js @@ -145,7 +145,7 @@ function from_function(param) { var file_buffer_size = [1024]; function scan_close_at_end() { - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); throw Caml_builtin_exceptions.end_of_file; } @@ -241,7 +241,7 @@ function close_in(ib) { if (typeof match === "number") { return /* () */0; } else { - return Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } } diff --git a/lib/js/unix.js b/lib/js/unix.js index 383cddd2cc..aeb9c78e86 100644 --- a/lib/js/unix.js +++ b/lib/js/unix.js @@ -303,7 +303,7 @@ function handle_unix_error(f, arg) { Pervasives.prerr_string("\""); } Pervasives.prerr_string(": "); - console.error(Caml_missing_polyfill.not_implemented("unix_error_message not implemented by bucklescript yet\n")); + console.error(Caml_missing_polyfill.not_implemented("unix_error_message")); return Pervasives.exit(2); } else { throw exn; @@ -318,7 +318,7 @@ function read(_, buf, ofs, len) { "Unix.read" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_read not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_read"); } } @@ -329,7 +329,7 @@ function write(_, buf, ofs, len) { "Unix.write" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_write not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_write"); } } @@ -340,7 +340,7 @@ function single_write(_, buf, ofs, len) { "Unix.single_write" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_single_write not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_single_write"); } } @@ -354,7 +354,7 @@ function single_write_substring(fd, buf, ofs, len) { function try_set_close_on_exec() { try { - Caml_missing_polyfill.not_implemented("unix_set_close_on_exec not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_set_close_on_exec"); return true; } catch (raw_exn){ @@ -368,17 +368,17 @@ function try_set_close_on_exec() { } function pause() { - return Caml_missing_polyfill.not_implemented("unix_sigsuspend not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_sigsuspend"); } -var inet_addr_any = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string not implemented by bucklescript yet\n"); +var inet_addr_any = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string"); -var inet_addr_loopback = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string not implemented by bucklescript yet\n"); +var inet_addr_loopback = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string"); var inet6_addr_any; try { - inet6_addr_any = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string not implemented by bucklescript yet\n"); + inet6_addr_any = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -392,7 +392,7 @@ catch (raw_exn){ var inet6_addr_loopback; try { - inet6_addr_loopback = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string not implemented by bucklescript yet\n"); + inet6_addr_loopback = Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string"); } catch (raw_exn$1){ var exn$1 = Js_exn.internalToOCamlException(raw_exn$1); @@ -422,7 +422,7 @@ function recv(_, buf, ofs, len, _$1) { "Unix.recv" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_recv not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_recv"); } } @@ -433,7 +433,7 @@ function recvfrom(_, buf, ofs, len, _$1) { "Unix.recvfrom" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_recvfrom not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_recvfrom"); } } @@ -444,7 +444,7 @@ function send(_, buf, ofs, len, _$1) { "Unix.send" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_send not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_send"); } } @@ -455,7 +455,7 @@ function sendto(_, buf, ofs, len, _$1, _$2) { "Unix.sendto" ]; } else { - return Caml_missing_polyfill.not_implemented("unix_sendto not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_sendto"); } } @@ -468,11 +468,11 @@ function sendto_substring(fd, buf, ofs, len, flags, addr) { } function SO_005(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_getsockopt not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getsockopt"); } function SO_006(_, _$1, _$2, _$3) { - return Caml_missing_polyfill.not_implemented("unix_setsockopt not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_setsockopt"); } function getsockopt(fd, opt) { @@ -513,7 +513,7 @@ function getsockopt_error(fd) { function getaddrinfo(node, service, opts) { try { - return List.rev(Caml_missing_polyfill.not_implemented("unix_getaddrinfo not implemented by bucklescript yet\n")); + return List.rev(Caml_missing_polyfill.not_implemented("unix_getaddrinfo")); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -571,7 +571,7 @@ function getaddrinfo(node, service, opts) { return /* :: */[ /* tuple */[ ty, - Caml_missing_polyfill.not_implemented("unix_getservbyname not implemented by bucklescript yet\n")[/* s_port */2] + Caml_missing_polyfill.not_implemented("unix_getservbyname")[/* s_port */2] ], /* [] */0 ]; @@ -626,7 +626,7 @@ function getaddrinfo(node, service, opts) { try { addresses = /* :: */[ /* tuple */[ - Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string not implemented by bucklescript yet\n"), + Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string"), node$1 ], /* [] */0 @@ -636,7 +636,7 @@ function getaddrinfo(node, service, opts) { var exn$1 = Js_exn.internalToOCamlException(raw_exn$1); if (exn$1[0] === Caml_builtin_exceptions.failure) { try { - var he = Caml_missing_polyfill.not_implemented("unix_gethostbyname not implemented by bucklescript yet\n"); + var he = Caml_missing_polyfill.not_implemented("unix_gethostbyname"); addresses = List.map((function (a) { return /* tuple */[ a, @@ -680,7 +680,7 @@ function getaddrinfo(node, service, opts) { function getnameinfo(addr, opts) { try { - return Caml_missing_polyfill.not_implemented("unix_getnameinfo not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getnameinfo"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -694,14 +694,14 @@ function getnameinfo(addr, opts) { if (List.mem(/* NI_NUMERICHOST */1, opts$1)) { throw Caml_builtin_exceptions.not_found; } - hostname = Caml_missing_polyfill.not_implemented("unix_gethostbyaddr not implemented by bucklescript yet\n")[/* h_name */0]; + hostname = Caml_missing_polyfill.not_implemented("unix_gethostbyaddr")[/* h_name */0]; } catch (exn$1){ if (exn$1 === Caml_builtin_exceptions.not_found) { if (List.mem(/* NI_NAMEREQD */2, opts$1)) { throw Caml_builtin_exceptions.not_found; } - hostname = Caml_missing_polyfill.not_implemented("unix_string_of_inet_addr not implemented by bucklescript yet\n"); + hostname = Caml_missing_polyfill.not_implemented("unix_string_of_inet_addr"); } else { throw exn$1; } @@ -712,7 +712,7 @@ function getnameinfo(addr, opts) { throw Caml_builtin_exceptions.not_found; } List.mem(/* NI_DGRAM */4, opts$1) ? "udp" : "tcp"; - service = Caml_missing_polyfill.not_implemented("unix_getservbyport not implemented by bucklescript yet\n")[/* s_name */0]; + service = Caml_missing_polyfill.not_implemented("unix_getservbyport")[/* s_name */0]; } catch (exn$2){ if (exn$2 === Caml_builtin_exceptions.not_found) { @@ -740,7 +740,7 @@ function getnameinfo(addr, opts) { function waitpid_non_intr() { while(true) { try { - return Caml_missing_polyfill.not_implemented("unix_waitpid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_waitpid"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -763,12 +763,12 @@ function waitpid_non_intr() { } function system() { - var id = Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + var id = Caml_missing_polyfill.not_implemented("unix_fork"); if (id !== 0) { return waitpid_non_intr(id)[1]; } else { try { - return Caml_missing_polyfill.not_implemented("unix_execv not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execv"); } catch (exn){ return Pervasives.exit(127); @@ -777,19 +777,19 @@ function system() { } function safe_dup(fd) { - var new_fd = Caml_missing_polyfill.not_implemented("unix_dup not implemented by bucklescript yet\n"); + var new_fd = Caml_missing_polyfill.not_implemented("unix_dup"); if (new_fd >= 3) { return new_fd; } else { var res = safe_dup(fd); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); return res; } } function safe_close() { try { - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_close"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -808,22 +808,22 @@ function perform_redirections(new_stdin, new_stdout, new_stderr) { safe_close(new_stdin); safe_close(new_stdout); safe_close(new_stderr); - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + return Caml_missing_polyfill.not_implemented("unix_close"); } function create_process(_, _$1, new_stdin, new_stdout, new_stderr) { - var id = Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + var id = Caml_missing_polyfill.not_implemented("unix_fork"); if (id !== 0) { return id; } else { try { perform_redirections(new_stdin, new_stdout, new_stderr); - return Caml_missing_polyfill.not_implemented("unix_execvp not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execvp"); } catch (exn){ return Pervasives.exit(127); @@ -832,13 +832,13 @@ function create_process(_, _$1, new_stdin, new_stdout, new_stderr) { } function create_process_env(_, _$1, _$2, new_stdin, new_stdout, new_stderr) { - var id = Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + var id = Caml_missing_polyfill.not_implemented("unix_fork"); if (id !== 0) { return id; } else { try { perform_redirections(new_stdin, new_stdout, new_stderr); - return Caml_missing_polyfill.not_implemented("unix_execvpe not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execvpe"); } catch (exn){ return Pervasives.exit(127); @@ -850,25 +850,25 @@ var popen_processes = Hashtbl.create(/* None */0, 7); function open_proc(_, proc, input, output, toclose) { var cloexec = List.for_all(try_set_close_on_exec, toclose); - var id = Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + var id = Caml_missing_polyfill.not_implemented("unix_fork"); if (id !== 0) { return Hashtbl.add(popen_processes, proc, id); } else { if (input !== 0) { - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); } if (output !== 1) { - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); } if (!cloexec) { List.iter((function () { - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_close"); }), toclose); } try { - return Caml_missing_polyfill.not_implemented("unix_execv not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execv"); } catch (exn){ return Pervasives.exit(127); @@ -877,7 +877,7 @@ function open_proc(_, proc, input, output, toclose) { } function open_process_in(cmd) { - var match = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match = Caml_missing_polyfill.not_implemented("unix_pipe"); var in_write = match[1]; var in_read = match[0]; var inchan = Caml_io.caml_ml_open_descriptor_in(in_read); @@ -888,16 +888,16 @@ function open_process_in(cmd) { ]); } catch (e){ - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); + Caml_missing_polyfill.not_implemented("unix_close"); throw e; } - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); return inchan; } function open_process_out(cmd) { - var match = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match = Caml_missing_polyfill.not_implemented("unix_pipe"); var out_write = match[1]; var out_read = match[0]; var outchan = Caml_io.caml_ml_open_descriptor_out(out_write); @@ -909,16 +909,16 @@ function open_process_out(cmd) { } catch (e){ Caml_io.caml_ml_flush(outchan); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); + Caml_missing_polyfill.not_implemented("unix_close"); throw e; } - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); return outchan; } function open_process(cmd) { - var match = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match = Caml_missing_polyfill.not_implemented("unix_pipe"); var in_write = match[1]; var in_read = match[0]; var fds_to_close = /* :: */[ @@ -929,7 +929,7 @@ function open_process(cmd) { ] ]; try { - var match$1 = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match$1 = Caml_missing_polyfill.not_implemented("unix_pipe"); var out_write = match$1[1]; var out_read = match$1[0]; fds_to_close = /* :: */[ @@ -957,8 +957,8 @@ function open_process(cmd) { /* [] */0 ] ]); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_close"); return /* tuple */[ inchan, outchan @@ -966,7 +966,7 @@ function open_process(cmd) { } catch (e){ List.iter((function () { - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_close"); }), fds_to_close); throw e; } @@ -974,23 +974,23 @@ function open_process(cmd) { function open_proc_full(_, _$1, proc, _$2, _$3, _$4, toclose) { var cloexec = List.for_all(try_set_close_on_exec, toclose); - var id = Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + var id = Caml_missing_polyfill.not_implemented("unix_fork"); if (id !== 0) { return Hashtbl.add(popen_processes, proc, id); } else { - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_dup2"); + Caml_missing_polyfill.not_implemented("unix_close"); if (!cloexec) { List.iter((function () { - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_close"); }), toclose); } try { - return Caml_missing_polyfill.not_implemented("unix_execve not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execve"); } catch (exn){ return Pervasives.exit(127); @@ -999,7 +999,7 @@ function open_proc_full(_, _$1, proc, _$2, _$3, _$4, toclose) { } function open_process_full(cmd, env) { - var match = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match = Caml_missing_polyfill.not_implemented("unix_pipe"); var in_write = match[1]; var in_read = match[0]; var fds_to_close = /* :: */[ @@ -1010,7 +1010,7 @@ function open_process_full(cmd, env) { ] ]; try { - var match$1 = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match$1 = Caml_missing_polyfill.not_implemented("unix_pipe"); var out_write = match$1[1]; var out_read = match$1[0]; fds_to_close = /* :: */[ @@ -1020,7 +1020,7 @@ function open_process_full(cmd, env) { fds_to_close ] ]; - var match$2 = Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + var match$2 = Caml_missing_polyfill.not_implemented("unix_pipe"); var err_write = match$2[1]; var err_read = match$2[0]; fds_to_close = /* :: */[ @@ -1047,9 +1047,9 @@ function open_process_full(cmd, env) { ] ] ]); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_close"); + Caml_missing_polyfill.not_implemented("unix_close"); return /* tuple */[ inchan, outchan, @@ -1058,7 +1058,7 @@ function open_process_full(cmd, env) { } catch (e){ List.iter((function () { - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_close"); }), fds_to_close); throw e; } @@ -1086,14 +1086,14 @@ function find_proc_id(fun_name, proc) { function close_process_in(inchan) { var pid = find_proc_id("close_process_in", /* Process_in */Block.__(1, [inchan])); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return waitpid_non_intr(pid)[1]; } function close_process_out(outchan) { var pid = find_proc_id("close_process_out", /* Process_out */Block.__(2, [outchan])); Caml_io.caml_ml_flush(outchan); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return waitpid_non_intr(pid)[1]; } @@ -1104,10 +1104,10 @@ function close_process(param) { inchan, outchan ])); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); try { Caml_io.caml_ml_flush(outchan); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -1128,10 +1128,10 @@ function close_process_full(param) { outchan, errchan ])); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); try { Caml_io.caml_ml_flush(outchan); - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -1140,14 +1140,14 @@ function close_process_full(param) { } } - Caml_missing_polyfill.not_implemented("caml_ml_close_channel not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("caml_ml_close_channel"); return waitpid_non_intr(pid)[1]; } function open_connection() { - var sock = Caml_missing_polyfill.not_implemented("unix_socket not implemented by bucklescript yet\n"); + var sock = Caml_missing_polyfill.not_implemented("unix_socket"); try { - Caml_missing_polyfill.not_implemented("unix_connect not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_connect"); try_set_close_on_exec(sock); return /* tuple */[ Caml_io.caml_ml_open_descriptor_in(sock), @@ -1155,19 +1155,19 @@ function open_connection() { ]; } catch (exn){ - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); throw exn; } } function shutdown_connection() { - return Caml_missing_polyfill.not_implemented("unix_shutdown not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_shutdown"); } function accept_non_intr() { while(true) { try { - return Caml_missing_polyfill.not_implemented("unix_accept not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_accept"); } catch (raw_exn){ var exn = Js_exn.internalToOCamlException(raw_exn); @@ -1190,22 +1190,22 @@ function accept_non_intr() { } function establish_server(server_fun, _) { - var sock = Caml_missing_polyfill.not_implemented("unix_socket not implemented by bucklescript yet\n"); + var sock = Caml_missing_polyfill.not_implemented("unix_socket"); setsockopt(sock, /* SO_REUSEADDR */2, true); - Caml_missing_polyfill.not_implemented("unix_bind not implemented by bucklescript yet\n"); - Caml_missing_polyfill.not_implemented("unix_listen not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_bind"); + Caml_missing_polyfill.not_implemented("unix_listen"); while(true) { var match = accept_non_intr(sock); var s = match[0]; - var id = Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + var id = Caml_missing_polyfill.not_implemented("unix_fork"); if (id !== 0) { - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); waitpid_non_intr(id); } else { - if (Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n") !== 0) { + if (Caml_missing_polyfill.not_implemented("unix_fork") !== 0) { Pervasives.exit(0); } - Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + Caml_missing_polyfill.not_implemented("unix_close"); try_set_close_on_exec(s); var inchan = Caml_io.caml_ml_open_descriptor_in(s); var outchan = Caml_io.caml_ml_open_descriptor_out(s); @@ -1217,57 +1217,57 @@ function establish_server(server_fun, _) { } function error_message() { - return Caml_missing_polyfill.not_implemented("unix_error_message not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_error_message"); } function environment() { - return Caml_missing_polyfill.not_implemented("unix_environment not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_environment"); } var getenv = Caml_sys.caml_sys_getenv; function putenv(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_putenv not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_putenv"); } function execv(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_execv not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execv"); } function execve(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_execve not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execve"); } function execvp(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_execvp not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execvp"); } function execvpe(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_execvpe not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_execvpe"); } function fork() { - return Caml_missing_polyfill.not_implemented("unix_fork not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_fork"); } function wait() { - return Caml_missing_polyfill.not_implemented("unix_wait not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_wait"); } function waitpid(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_waitpid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_waitpid"); } function getpid() { - return Caml_missing_polyfill.not_implemented("unix_getpid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getpid"); } function getppid() { - return Caml_missing_polyfill.not_implemented("unix_getppid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getppid"); } function nice() { - return Caml_missing_polyfill.not_implemented("unix_nice not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_nice"); } var stdin = 0; @@ -1277,11 +1277,11 @@ var stdout = 1; var stderr = 2; function openfile(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_open not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_open"); } function close() { - return Caml_missing_polyfill.not_implemented("unix_close not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_close"); } var in_channel_of_descr = Caml_io.caml_ml_open_descriptor_in; @@ -1289,63 +1289,63 @@ var in_channel_of_descr = Caml_io.caml_ml_open_descriptor_in; var out_channel_of_descr = Caml_io.caml_ml_open_descriptor_out; function descr_of_in_channel() { - return Caml_missing_polyfill.not_implemented("caml_channel_descriptor not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_channel_descriptor"); } function descr_of_out_channel() { - return Caml_missing_polyfill.not_implemented("caml_channel_descriptor not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("caml_channel_descriptor"); } function lseek(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_lseek not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_lseek"); } function truncate(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_truncate not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_truncate"); } function ftruncate(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_ftruncate not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_ftruncate"); } function stat() { - return Caml_missing_polyfill.not_implemented("unix_stat not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_stat"); } function lstat() { - return Caml_missing_polyfill.not_implemented("unix_lstat not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_lstat"); } function fstat() { - return Caml_missing_polyfill.not_implemented("unix_fstat not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_fstat"); } function isatty() { - return Caml_missing_polyfill.not_implemented("unix_isatty not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_isatty"); } function LargeFile_000(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_lseek_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_lseek_64"); } function LargeFile_001(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_truncate_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_truncate_64"); } function LargeFile_002(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_ftruncate_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_ftruncate_64"); } function LargeFile_003() { - return Caml_missing_polyfill.not_implemented("unix_stat_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_stat_64"); } function LargeFile_004() { - return Caml_missing_polyfill.not_implemented("unix_lstat_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_lstat_64"); } function LargeFile_005() { - return Caml_missing_polyfill.not_implemented("unix_fstat_64 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_fstat_64"); } var LargeFile = [ @@ -1358,339 +1358,339 @@ var LargeFile = [ ]; function unlink() { - return Caml_missing_polyfill.not_implemented("unix_unlink not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_unlink"); } function rename(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_rename not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_rename"); } function link(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_link not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_link"); } function chmod(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_chmod not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_chmod"); } function fchmod(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_fchmod not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_fchmod"); } function chown(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_chown not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_chown"); } function fchown(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_fchown not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_fchown"); } function umask() { - return Caml_missing_polyfill.not_implemented("unix_umask not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_umask"); } function access(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_access not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_access"); } function dup() { - return Caml_missing_polyfill.not_implemented("unix_dup not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_dup"); } function dup2(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_dup2 not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_dup2"); } function set_nonblock() { - return Caml_missing_polyfill.not_implemented("unix_set_nonblock not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_set_nonblock"); } function clear_nonblock() { - return Caml_missing_polyfill.not_implemented("unix_clear_nonblock not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_clear_nonblock"); } function set_close_on_exec() { - return Caml_missing_polyfill.not_implemented("unix_set_close_on_exec not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_set_close_on_exec"); } function clear_close_on_exec() { - return Caml_missing_polyfill.not_implemented("unix_clear_close_on_exec not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_clear_close_on_exec"); } function mkdir(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_mkdir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_mkdir"); } function rmdir() { - return Caml_missing_polyfill.not_implemented("unix_rmdir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_rmdir"); } function chdir() { - return Caml_missing_polyfill.not_implemented("unix_chdir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_chdir"); } function getcwd() { - return Caml_missing_polyfill.not_implemented("unix_getcwd not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getcwd"); } function chroot() { - return Caml_missing_polyfill.not_implemented("unix_chroot not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_chroot"); } function opendir() { - return Caml_missing_polyfill.not_implemented("unix_opendir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_opendir"); } function readdir() { - return Caml_missing_polyfill.not_implemented("unix_readdir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_readdir"); } function rewinddir() { - return Caml_missing_polyfill.not_implemented("unix_rewinddir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_rewinddir"); } function closedir() { - return Caml_missing_polyfill.not_implemented("unix_closedir not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_closedir"); } function pipe() { - return Caml_missing_polyfill.not_implemented("unix_pipe not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_pipe"); } function mkfifo(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_mkfifo not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_mkfifo"); } function symlink(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_symlink not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_symlink"); } function readlink() { - return Caml_missing_polyfill.not_implemented("unix_readlink not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_readlink"); } function select(_, _$1, _$2, _$3) { - return Caml_missing_polyfill.not_implemented("unix_select not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_select"); } function lockf(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_lockf not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_lockf"); } function kill(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_kill not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_kill"); } function sigprocmask(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_sigprocmask not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_sigprocmask"); } function sigpending() { - return Caml_missing_polyfill.not_implemented("unix_sigpending not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_sigpending"); } function sigsuspend() { - return Caml_missing_polyfill.not_implemented("unix_sigsuspend not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_sigsuspend"); } function time() { - return Caml_missing_polyfill.not_implemented("unix_time not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_time"); } function gettimeofday() { - return Caml_missing_polyfill.not_implemented("unix_gettimeofday not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_gettimeofday"); } function gmtime() { - return Caml_missing_polyfill.not_implemented("unix_gmtime not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_gmtime"); } function localtime() { - return Caml_missing_polyfill.not_implemented("unix_localtime not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_localtime"); } function mktime() { - return Caml_missing_polyfill.not_implemented("unix_mktime not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_mktime"); } function alarm() { - return Caml_missing_polyfill.not_implemented("unix_alarm not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_alarm"); } function sleep() { - return Caml_missing_polyfill.not_implemented("unix_sleep not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_sleep"); } function times() { - return Caml_missing_polyfill.not_implemented("unix_times not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_times"); } function utimes(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_utimes not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_utimes"); } function getitimer() { - return Caml_missing_polyfill.not_implemented("unix_getitimer not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getitimer"); } function setitimer(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_setitimer not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_setitimer"); } function getuid() { - return Caml_missing_polyfill.not_implemented("unix_getuid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getuid"); } function geteuid() { - return Caml_missing_polyfill.not_implemented("unix_geteuid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_geteuid"); } function setuid() { - return Caml_missing_polyfill.not_implemented("unix_setuid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_setuid"); } function getgid() { - return Caml_missing_polyfill.not_implemented("unix_getgid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getgid"); } function getegid() { - return Caml_missing_polyfill.not_implemented("unix_getegid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getegid"); } function setgid() { - return Caml_missing_polyfill.not_implemented("unix_setgid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_setgid"); } function getgroups() { - return Caml_missing_polyfill.not_implemented("unix_getgroups not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getgroups"); } function setgroups() { - return Caml_missing_polyfill.not_implemented("unix_setgroups not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_setgroups"); } function initgroups(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_initgroups not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_initgroups"); } function getlogin() { - return Caml_missing_polyfill.not_implemented("unix_getlogin not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getlogin"); } function getpwnam() { - return Caml_missing_polyfill.not_implemented("unix_getpwnam not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getpwnam"); } function getgrnam() { - return Caml_missing_polyfill.not_implemented("unix_getgrnam not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getgrnam"); } function getpwuid() { - return Caml_missing_polyfill.not_implemented("unix_getpwuid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getpwuid"); } function getgrgid() { - return Caml_missing_polyfill.not_implemented("unix_getgrgid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getgrgid"); } function inet_addr_of_string() { - return Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_inet_addr_of_string"); } function string_of_inet_addr() { - return Caml_missing_polyfill.not_implemented("unix_string_of_inet_addr not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_string_of_inet_addr"); } function socket(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_socket not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_socket"); } function socketpair(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_socketpair not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_socketpair"); } function accept() { - return Caml_missing_polyfill.not_implemented("unix_accept not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_accept"); } function bind(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_bind not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_bind"); } function connect(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_connect not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_connect"); } function listen(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_listen not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_listen"); } function shutdown(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_shutdown not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_shutdown"); } function getsockname() { - return Caml_missing_polyfill.not_implemented("unix_getsockname not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getsockname"); } function getpeername() { - return Caml_missing_polyfill.not_implemented("unix_getpeername not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getpeername"); } function gethostname() { - return Caml_missing_polyfill.not_implemented("unix_gethostname not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_gethostname"); } function gethostbyname() { - return Caml_missing_polyfill.not_implemented("unix_gethostbyname not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_gethostbyname"); } function gethostbyaddr() { - return Caml_missing_polyfill.not_implemented("unix_gethostbyaddr not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_gethostbyaddr"); } function getprotobyname() { - return Caml_missing_polyfill.not_implemented("unix_getprotobyname not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getprotobyname"); } function getprotobynumber() { - return Caml_missing_polyfill.not_implemented("unix_getprotobynumber not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getprotobynumber"); } function getservbyname(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_getservbyname not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getservbyname"); } function getservbyport(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_getservbyport not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_getservbyport"); } function tcgetattr() { - return Caml_missing_polyfill.not_implemented("unix_tcgetattr not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_tcgetattr"); } function tcsetattr(_, _$1, _$2) { - return Caml_missing_polyfill.not_implemented("unix_tcsetattr not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_tcsetattr"); } function tcsendbreak(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_tcsendbreak not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_tcsendbreak"); } function tcdrain() { - return Caml_missing_polyfill.not_implemented("unix_tcdrain not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_tcdrain"); } function tcflush(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_tcflush not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_tcflush"); } function tcflow(_, _$1) { - return Caml_missing_polyfill.not_implemented("unix_tcflow not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_tcflow"); } function setsid() { - return Caml_missing_polyfill.not_implemented("unix_setsid not implemented by bucklescript yet\n"); + return Caml_missing_polyfill.not_implemented("unix_setsid"); } exports.Unix_error = Unix_error; diff --git a/lib/whole_compiler.ml b/lib/whole_compiler.ml index e034ff265b..ea1d40da01 100644 --- a/lib/whole_compiler.ml +++ b/lib/whole_compiler.ml @@ -72490,7 +72490,7 @@ let not_implemented ?comment (s : string) : t = runtime_call Js_runtime_modules.missing_polyfill "not_implemented" - [str (s ^ " not implemented by bucklescript yet\n")] + [str s]