When using Marshal.to_string the following warning occurs:
82 | let marshal (d : declaration) = Marshal.to_string d []
^^^^^^^^^^^^^^^^^^^^^^
Warning 106 [bucklescript-unimplemented-primitive]: Unimplemented primitive used:caml_output_value_to_string
and gets compiled to
import * as Caml_external_polyfill from "melange/lib/es6/caml_external_polyfill.js";
function marshal(d) {
return Caml_external_polyfill.resolve("caml_output_value_to_string")(d, /* [] */0);
}
Marshal.from_string seems to not generate the warning and compiles to
import * as Marshal from "melange/lib/es6/marshal.js";
function unmarshal(s) {
return Marshal.from_string(s, 0);
}
When using
Marshal.to_stringthe following warning occurs:and gets compiled to
Marshal.from_stringseems to not generate the warning and compiles to