diff options
author | Alain Frisch <alain@frisch.fr> | 2012-10-24 12:03:00 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2012-10-24 12:03:00 +0000 |
commit | 0b37b273568cc9d64816494b882ee71098baf97d (patch) | |
tree | d53fc6cb46d2698193cf09f894d87381159f5f7a /otherlibs/labltk/browser/viewer.ml | |
parent | dc0776f55108a20dad5a9c06188545dc08dbf462 (diff) |
Stop keeping a Path.t to refer to labels and constructors in the Typedtree AST. This is not used internally and it is not a robust way to identify these objects unambiguously anyway
(especially when we will add more powerful disambiguation strategies). The correct way to identify an item is through the pair (type,name), which can be deduced from the
label_description/constructor_description stored in the Typedtree.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13043 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk/browser/viewer.ml')
-rw-r--r-- | otherlibs/labltk/browser/viewer.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/otherlibs/labltk/browser/viewer.ml b/otherlibs/labltk/browser/viewer.ml index 34ccfd7a2..9cd1014d8 100644 --- a/otherlibs/labltk/browser/viewer.ml +++ b/otherlibs/labltk/browser/viewer.ml @@ -63,13 +63,13 @@ let view_symbol ~kind ~env ?path id = let path, vd = lookup_value id env in view_signature_item ~path ~env [Sig_value (Ident.create name, vd)] | Ptype -> view_type_id id ~env - | Plabel -> let _,ld = lookup_label id env in + | Plabel -> let ld = lookup_label id env in begin match ld.lbl_res.desc with Tconstr (path, _, _) -> view_type_decl path ~env | _ -> () end | Pconstructor -> - let _,cd = lookup_constructor id env in + let cd = lookup_constructor id env in begin match cd.cstr_res.desc with Tconstr (cpath, _, _) -> if Path.same cpath Predef.path_exn then |