A partial "spiritual port" of Jane Street's Core to js_of_ocaml