|
51 | 51 | * *) |
52 | 52 | let apiVersion = "3" |
53 | 53 |
|
54 | | -module Js = Jsoo_common.Js |
| 54 | +module Js = Js_of_ocaml.Js |
55 | 55 |
|
56 | 56 | let export (field : string) v = |
57 | 57 | Js.Unsafe.set (Js.Unsafe.global) field v |
|
199 | 199 | (* One time setup for all relevant modules *) |
200 | 200 | let () = |
201 | 201 | Bs_conditional_initial.setup_env (); |
| 202 | + (* From now on the default setting will be uncurried mode *) |
| 203 | + Config.uncurried := Uncurried; |
202 | 204 | Clflags.binary_annotations := false; |
203 | | - Misc.Color.setup (Some Always); |
204 | | - Lazy.force Super_main.setup; |
| 205 | + Clflags.color := Some Always; |
205 | 206 | Lazy.force Res_outcome_printer.setup |
206 | 207 |
|
207 | 208 | let error_of_exn e = |
@@ -329,7 +330,7 @@ module Compile = struct |
329 | 330 | match Warnings.report w with |
330 | 331 | | `Inactive -> () |
331 | 332 | | `Active { Warnings. number; is_error; } -> |
332 | | - Super_location.super_warning_printer loc ppf w; |
| 333 | + !Location.warning_printer loc ppf w; |
333 | 334 | let open LocWarnInfo in |
334 | 335 | let fullMsg = flush_warning_buffer () in |
335 | 336 | let shortMsg = Warnings.message w in |
@@ -458,7 +459,7 @@ module Compile = struct |
458 | 459 | List.iter Iter.iter_structure_item structure.str_items; |
459 | 460 | Js.array (!acc |> Array.of_list) |
460 | 461 |
|
461 | | - let implementation ~(config: BundleConfig.t) ~lang str : Js.Unsafe.obj = |
| 462 | + let implementation ~(config: BundleConfig.t) ~lang str = |
462 | 463 | let {BundleConfig.module_system; warn_flags} = config in |
463 | 464 | try |
464 | 465 | reset_compiler (); |
@@ -677,8 +678,6 @@ module Export = struct |
677 | 678 | end |
678 | 679 |
|
679 | 680 | let () = |
680 | | - (* From now on the default setting will be uncurried mode *) |
681 | | - Config.uncurried := Uncurried; |
682 | 681 | export "rescript_compiler" |
683 | 682 | (Js.Unsafe.(obj |
684 | 683 | [| |
|
0 commit comments