diff options
author | Leo White <leo@lpw25.net> | 2018-02-08 17:51:47 +0000 |
---|---|---|
committer | Leo White <leo@lpw25.net> | 2018-11-21 03:39:34 -0500 |
commit | 111d4e18276dd1fe1605f0b9760d598a201ceb45 (patch) | |
tree | c4932dadceb152872c6979a47b0ee13d7e8b4ae7 /toplevel/topdirs.ml | |
parent | 5daea807289deace6d53f10992ba3541e0e86bb8 (diff) | |
download | ocaml-111d4e18276dd1fe1605f0b9760d598a201ceb45.tar.gz |
Remove positions from paths
Diffstat (limited to 'toplevel/topdirs.ml')
-rw-r--r-- | toplevel/topdirs.ml | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/toplevel/topdirs.ml b/toplevel/topdirs.ml index 69fb6d5391..b400a0400c 100644 --- a/toplevel/topdirs.ml +++ b/toplevel/topdirs.ml @@ -348,7 +348,7 @@ let dir_install_printer ppf lid = try let ((ty_arg, ty), path, is_old_style) = find_printer_type ppf lid in - let v = eval_path !toplevel_env path in + let v = eval_value_path !toplevel_env path in match ty with | None -> let print_function = @@ -413,7 +413,7 @@ let dir_trace ppf lid = fprintf ppf "%a is an external function and cannot be traced.@." Printtyp.longident lid | _ -> - let clos = eval_path !toplevel_env path in + let clos = eval_value_path !toplevel_env path in (* Nothing to do if it's not a closure *) if Obj.is_block clos && (Obj.tag clos = Obj.closure_tag || Obj.tag clos = Obj.infix_tag) @@ -478,14 +478,14 @@ let trim_signature = function Mty_signature (List.map (function - Sig_module (id, md, rs) -> + Sig_module (id, pres, md, rs) -> let attribute = Ast_helper.Attr.mk (Location.mknoloc "...") (Parsetree.PStr []) in - Sig_module (id, {md with md_attributes = - attribute :: md.md_attributes}, + Sig_module (id, pres, {md with md_attributes = + attribute :: md.md_attributes}, rs) (*| Sig_modtype (id, Modtype_manifest mty) -> Sig_modtype (id, Modtype_manifest (trim_modtype mty))*) @@ -571,10 +571,11 @@ let () = let rec accum_aliases path acc = let md = Env.find_module path env in let acc = - Sig_module (id, {md with md_type = trim_signature md.md_type}, + Sig_module (id, Mp_present, + {md with md_type = trim_signature md.md_type}, Trec_not) :: acc in match md.md_type with - | Mty_alias(_, path) -> accum_aliases path acc + | Mty_alias path -> accum_aliases path acc | Mty_ident _ | Mty_signature _ | Mty_functor _ -> List.rev acc in |