File tree 7 files changed +144
-23
lines changed
7 files changed +144
-23
lines changed Original file line number Diff line number Diff line change @@ -637,7 +637,7 @@ core/js_main.cmx : super_errors/super_main.cmx core/ocaml_parse.cmx \
637
637
core/js_implementation.cmx common/js_config.cmx ext/ext_string.cmx \
638
638
core/bs_conditional_initial.cmx core/js_main.cmi
639
639
core/cmjdump_main.cmx : ext/string_map.cmx core/lam_arity.cmx \
640
- core/js_cmj_format.cmx
640
+ common/js_config.cmx core/js_cmj_format.cmx
641
641
core/astdump_main.cmx : common/ml_binary.cmx bsb/bsb_depfile_gen.cmx
642
642
ounit/oUnit.cmi :
643
643
ounit/oUnitDiff.cmi :
Original file line number Diff line number Diff line change @@ -25921,7 +25921,8 @@ type packages_info =
25921
25921
| Empty
25922
25922
| NonBrowser of (package_name * package_info list)
25923
25923
25924
-
25924
+ val dump_packages_info :
25925
+ Format.formatter -> packages_info -> unit
25925
25926
25926
25927
val cmj_ext : string
25927
25928
@@ -26099,7 +26100,35 @@ type packages_info =
26099
26100
| NonBrowser of (package_name * package_info list)
26100
26101
(** we don't force people to use package *)
26101
26102
26103
+ let dump_package_info
26104
+ (fmt : Format.formatter)
26105
+ ((ms, name) : package_info)
26106
+ =
26107
+ Format.fprintf
26108
+ fmt
26109
+ "@[%s:@ %s@]"
26110
+ (match ms with
26111
+ | NodeJS -> "NodeJS"
26112
+ | AmdJS -> "AmdJS"
26113
+ | Goog -> "Goog"
26114
+ | Es6 -> "Es6"
26115
+ | Es6_global -> "Es6_global"
26116
+ | AmdJS_global -> "AmdJS_globl"
26117
+ ) name
26102
26118
26119
+
26120
+ let dump_packages_info
26121
+ (fmt : Format.formatter)
26122
+ (p : packages_info) =
26123
+ match p with
26124
+ | Empty -> Format.pp_print_string fmt "<Empty>"
26125
+ | NonBrowser (name, ls) ->
26126
+ Format.fprintf fmt "@[%s;@ @[%a@]@]"
26127
+ name
26128
+ (Format.pp_print_list
26129
+ ~pp_sep:(fun fmt () -> Format.pp_print_space fmt ())
26130
+ dump_package_info
26131
+ ) ls
26103
26132
26104
26133
let cmj_ext = ".cmj"
26105
26134
Original file line number Diff line number Diff line change @@ -7869,7 +7869,8 @@ type packages_info =
7869
7869
| Empty
7870
7870
| NonBrowser of (package_name * package_info list)
7871
7871
7872
-
7872
+ val dump_packages_info :
7873
+ Format.formatter -> packages_info -> unit
7873
7874
7874
7875
val cmj_ext : string
7875
7876
@@ -8047,7 +8048,35 @@ type packages_info =
8047
8048
| NonBrowser of (package_name * package_info list)
8048
8049
(** we don't force people to use package *)
8049
8050
8051
+ let dump_package_info
8052
+ (fmt : Format.formatter)
8053
+ ((ms, name) : package_info)
8054
+ =
8055
+ Format.fprintf
8056
+ fmt
8057
+ "@[%s:@ %s@]"
8058
+ (match ms with
8059
+ | NodeJS -> "NodeJS"
8060
+ | AmdJS -> "AmdJS"
8061
+ | Goog -> "Goog"
8062
+ | Es6 -> "Es6"
8063
+ | Es6_global -> "Es6_global"
8064
+ | AmdJS_global -> "AmdJS_globl"
8065
+ ) name
8050
8066
8067
+
8068
+ let dump_packages_info
8069
+ (fmt : Format.formatter)
8070
+ (p : packages_info) =
8071
+ match p with
8072
+ | Empty -> Format.pp_print_string fmt "<Empty>"
8073
+ | NonBrowser (name, ls) ->
8074
+ Format.fprintf fmt "@[%s;@ @[%a@]@]"
8075
+ name
8076
+ (Format.pp_print_list
8077
+ ~pp_sep:(fun fmt () -> Format.pp_print_space fmt ())
8078
+ dump_package_info
8079
+ ) ls
8051
8080
8052
8081
let cmj_ext = ".cmj"
8053
8082
Original file line number Diff line number Diff line change @@ -22386,7 +22386,8 @@ type packages_info =
22386
22386
| Empty
22387
22387
| NonBrowser of (package_name * package_info list)
22388
22388
22389
-
22389
+ val dump_packages_info :
22390
+ Format.formatter -> packages_info -> unit
22390
22391
22391
22392
val cmj_ext : string
22392
22393
@@ -22564,7 +22565,35 @@ type packages_info =
22564
22565
| NonBrowser of (package_name * package_info list)
22565
22566
(** we don't force people to use package *)
22566
22567
22568
+ let dump_package_info
22569
+ (fmt : Format.formatter)
22570
+ ((ms, name) : package_info)
22571
+ =
22572
+ Format.fprintf
22573
+ fmt
22574
+ "@[%s:@ %s@]"
22575
+ (match ms with
22576
+ | NodeJS -> "NodeJS"
22577
+ | AmdJS -> "AmdJS"
22578
+ | Goog -> "Goog"
22579
+ | Es6 -> "Es6"
22580
+ | Es6_global -> "Es6_global"
22581
+ | AmdJS_global -> "AmdJS_globl"
22582
+ ) name
22567
22583
22584
+
22585
+ let dump_packages_info
22586
+ (fmt : Format.formatter)
22587
+ (p : packages_info) =
22588
+ match p with
22589
+ | Empty -> Format.pp_print_string fmt "<Empty>"
22590
+ | NonBrowser (name, ls) ->
22591
+ Format.fprintf fmt "@[%s;@ @[%a@]@]"
22592
+ name
22593
+ (Format.pp_print_list
22594
+ ~pp_sep:(fun fmt () -> Format.pp_print_space fmt ())
22595
+ dump_package_info
22596
+ ) ls
22568
22597
22569
22598
let cmj_ext = ".cmj"
22570
22599
Original file line number Diff line number Diff line change @@ -42,7 +42,35 @@ type packages_info =
42
42
| NonBrowser of (package_name * package_info list )
43
43
(* * we don't force people to use package *)
44
44
45
-
45
+ let dump_package_info
46
+ (fmt : Format.formatter )
47
+ ((ms , name ) : package_info )
48
+ =
49
+ Format. fprintf
50
+ fmt
51
+ " @[%s:@ %s@]"
52
+ (match ms with
53
+ | NodeJS -> " NodeJS"
54
+ | AmdJS -> " AmdJS"
55
+ | Goog -> " Goog"
56
+ | Es6 -> " Es6"
57
+ | Es6_global -> " Es6_global"
58
+ | AmdJS_global -> " AmdJS_globl"
59
+ ) name
60
+
61
+
62
+ let dump_packages_info
63
+ (fmt : Format.formatter )
64
+ (p : packages_info ) =
65
+ match p with
66
+ | Empty -> Format. pp_print_string fmt " <Empty>"
67
+ | NonBrowser (name , ls ) ->
68
+ Format. fprintf fmt " @[%s;@ @[%a@]@]"
69
+ name
70
+ (Format. pp_print_list
71
+ ~pp_sep: (fun fmt () -> Format. pp_print_space fmt () )
72
+ dump_package_info
73
+ ) ls
46
74
47
75
let cmj_ext = " .cmj"
48
76
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ type packages_info =
39
39
| Empty
40
40
| NonBrowser of (package_name * package_info list )
41
41
42
-
42
+ val dump_packages_info :
43
+ Format .formatter -> packages_info -> unit
43
44
44
45
val cmj_ext : string
45
46
Original file line number Diff line number Diff line change 24
24
25
25
let p = Format. fprintf
26
26
27
- let pp_cmj fmt ({ values ; effect; } :Js_cmj_format.t ) =
27
+ let pp_cmj fmt
28
+ ({ values ; effect; npm_package_path } :Js_cmj_format.t ) =
29
+ p fmt " @[package info: %a@]@."
30
+ Js_config. dump_packages_info
31
+ npm_package_path
32
+ ;
28
33
p fmt " @[effect: %a@]@."
29
- (fun fmt o ->
30
- match o with None -> ()
31
- | Some s -> p fmt " None pure due to %s" s
32
- ) effect ;
33
- p fmt " @[%a @]@."
34
- (fun fmt m ->
35
- m |> String_map. iter (fun k (v : Js_cmj_format.cmj_value ) ->
36
- match v.arity with
37
- | Single arity ->
38
- p fmt " @[%s:@ @[%a@]@]@." k Lam_arity. print arity
39
- | Submodule xs ->
40
- p fmt " @[<h 1>@[%s:@ @[<hov 2>%a@]@]@]" k
41
- (fun fmt xs ->
42
- Array. iter (fun arity -> p fmt " @[%a@]@ ;" Lam_arity. print arity )
43
- xs) xs
34
+ (fun fmt o ->
35
+ match o with None -> ()
36
+ | Some s -> p fmt " None pure due to %s" s
37
+ ) effect ;
38
+ p fmt " @[arities: @[%a@] @]@."
39
+ (fun fmt m ->
40
+ m |> String_map. iter (fun k (v : Js_cmj_format.cmj_value ) ->
41
+ match v.arity with
42
+ | Single arity ->
43
+ p fmt " @[%s:@ @[%a@]@]@." k Lam_arity. print arity
44
+ | Submodule xs ->
45
+ p fmt " @[<h 1>@[%s:@ @[<hov 2>%a@]@]@]" k
46
+ (fun fmt xs ->
47
+ Array. iter (fun arity -> p fmt " @[%a@]@ ;" Lam_arity. print arity )
48
+ xs) xs
44
49
45
- )) values
50
+ )) values
46
51
47
52
48
53
You can’t perform that action at this time.
0 commit comments