diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/depend.ml | 10 | ||||
-rw-r--r-- | tools/ocamlprof.ml | 2 | ||||
-rw-r--r-- | tools/untypeast.ml | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/tools/depend.ml b/tools/depend.ml index 0c15985b8c..2f6d20f088 100644 --- a/tools/depend.ml +++ b/tools/depend.ml @@ -251,6 +251,10 @@ and add_module bv modl = add_module bv modl; add_modtype bv mty | Pmod_unpack(e) -> add_expr bv e + | Pmod_attribute(modl, _) -> + add_module bv modl + | Pmod_extension _ -> + () and add_structure bv item_list = List.fold_left add_struct_item bv item_list @@ -281,16 +285,14 @@ and add_struct_item bv item = bv' | Pstr_modtype(id, mty) -> add_modtype bv mty; bv - | Pstr_open l -> + | Pstr_open (l, _attrs) -> addmodule bv l; bv | Pstr_class cdl -> List.iter (add_class_declaration bv) cdl; bv | Pstr_class_type cdtl -> List.iter (add_class_type_declaration bv) cdtl; bv - | Pstr_include modl -> + | Pstr_include (modl, _attrs) -> add_module bv modl; bv - | Pstr_attribute (e, _) -> add_struct_item bv e - | Pstr_extension _ -> bv and add_use_file bv top_phrs = ignore (List.fold_left add_top_phrase bv top_phrs) diff --git a/tools/ocamlprof.ml b/tools/ocamlprof.ml index 83f4abc74f..155c3269b8 100644 --- a/tools/ocamlprof.ml +++ b/tools/ocamlprof.ml @@ -359,6 +359,8 @@ and rewrite_mod iflag smod = | Pmod_apply(smod1, smod2) -> rewrite_mod iflag smod1; rewrite_mod iflag smod2 | Pmod_constraint(smod, smty) -> rewrite_mod iflag smod | Pmod_unpack(sexp) -> rewrite_exp iflag sexp + | Pmod_attribute (smod, _) -> rewrite_mod iflag smod + | Pmod_extension _ -> () and rewrite_str_item iflag item = match item.pstr_desc with diff --git a/tools/untypeast.ml b/tools/untypeast.ml index 72574ac955..0a0dad3e01 100644 --- a/tools/untypeast.ml +++ b/tools/untypeast.ml @@ -64,7 +64,7 @@ and untype_structure_item item = untype_module_expr mexpr) list) | Tstr_modtype (_id, name, mtype) -> Pstr_modtype (name, untype_module_type mtype) - | Tstr_open (_path, lid) -> Pstr_open (lid) + | Tstr_open (_path, lid) -> Pstr_open (lid, []) | Tstr_class list -> Pstr_class (List.map (fun (ci, _, _) -> { pci_virt = ci.ci_virt; @@ -87,7 +87,7 @@ and untype_structure_item item = } ) list) | Tstr_include (mexpr, _) -> - Pstr_include (untype_module_expr mexpr) + Pstr_include (untype_module_expr mexpr, []) in { pstr_desc = desc; pstr_loc = item.str_loc; } |