@@ -102,23 +102,15 @@ let implementation ~use_super_errors impl str : Js.Unsafe.obj =
102
102
let compile ~use_super_errors impl =
103
103
implementation ~use_super_errors impl
104
104
105
- (* let load_module cmi_path cmi_content cmj_name cmj_content =
106
- Js.create_file cmi_path cmi_content;
107
- Js_cmj_datasets.data_sets :=
108
- Map_string.add !Js_cmj_datasets.data_sets
109
- cmj_name (lazy (Js_cmj_format.from_string cmj_content)) *)
110
-
111
105
let export (field : string ) v =
112
106
Js.Unsafe. set (Js.Unsafe. global) field v
113
107
;;
114
108
115
109
(* To add a directory to the load path *)
116
- (*
117
110
let dir_directory d =
118
111
Config. load_path := d :: ! Config. load_path
119
-
120
112
let () =
121
- dir_directory "/static/cmis" *)
113
+ dir_directory " /static"
122
114
123
115
module Converter = Refmt_api.Migrate_parsetree. Convert (Refmt_api.Migrate_parsetree. OCaml_404 )(Refmt_api.Migrate_parsetree. OCaml_406 )
124
116
@@ -139,15 +131,6 @@ let make_compiler ~name impl=
139
131
(fun _ code ->
140
132
(compile impl ~use_super_errors: true (Js. to_string code)));
141
133
" version" , Js.Unsafe. inject (Js. string (match name with | "reason" -> Refmt_api. version | _ -> Bs_version. version));
142
- (* "load_module",
143
- inject @@
144
- Js.wrap_meth_callback
145
- (fun _ cmi_path cmi_content cmj_name cmj_content ->
146
- let cmj_bytestring = Js.to_bytestring cmj_content in
147
- (* HACK: force string tag to ASCII (9) to avoid
148
- * UTF-8 encoding *)
149
- Js.Unsafe.set cmj_bytestring "t" 9;
150
- load_module cmi_path cmi_content (Js.to_string cmj_name) cmj_bytestring); *)
151
134
|]))
152
135
153
136
let () = make_compiler ~name: " ocaml" Parse. implementation
0 commit comments