@@ -32,26 +32,7 @@ let pp = Format.fprintf
3232
3333(* let meaningless_names = ["*opt*"; "param";] *)
3434
35- let rec dump_ident fmt (id : Ident.t ) (arity : Lam_arity.t ) =
36- pp fmt " @[<2>export var %s:@ %a@ ;@]" (Ext_ident. convert id.name ) dump_arity arity
37-
38- and dump_arity fmt (arity : Lam_arity.t ) =
39- match arity with
40- | NA -> pp fmt " any"
41- | Determin (_ , [] , _ ) -> pp fmt " any"
42- | Determin (_ , (n ,args )::xs , _ ) ->
43- let args = match args with
44- | Some args -> args
45- | None -> Ext_list. init n (fun _ -> Ident. create " param" ) in
46- pp fmt " @[(%a)@ =>@ any@]"
47- (Format. pp_print_list
48- ~pp_sep: (fun fmt _ ->
49- Format. pp_print_string fmt " ," ;
50- Format. pp_print_space fmt () ;
51- )
52- (fun fmt ident -> pp fmt " @[%s@ :@ any@]"
53- (Ext_ident. convert @@ Ident. name ident))
54- ) args
35+
5536
5637let single_na = Js_cmj_format. single_na
5738
@@ -134,14 +115,7 @@ let get_effect (meta : Lam_stats.t) maybe_pure external_ids =
134115 ) external_ids) (fun x -> Lam_module_ident. name x)
135116 | Some _ -> maybe_pure
136117
137- let rec dump meta fmt ids =
138- (* TODO: also use {[Ext_pp]} module instead *)
139- match ids with
140- | [] -> ()
141- | x ::xs ->
142- dump_ident fmt x (Lam_stats_util. get_arity meta (Lam. var x)) ;
143- Format. pp_print_space fmt () ;
144- dump meta fmt xs
118+
145119
146120(* Note that
147121 [lambda_exports] is
@@ -162,12 +136,6 @@ let export_to_cmj
162136 cmj_case
163137 : Js_cmj_format.t =
164138 let values = values_of_export meta export_map in
165- let () =
166- if ! Js_config. default_gen_tds && not ( Ext_string. is_empty meta.filename) then
167- Ext_pervasives. with_file_as_pp
168- (Ext_path. chop_extension ~loc: __LOC__ meta.filename ^ " .d.ts" )
169- @@ fun fmt ->
170- pp fmt " @[<v>%a@]@." (dump meta) meta.exports in
171139 let effect = get_effect meta maybe_pure external_ids in
172140 {values;
173141 effect ;
0 commit comments