summaryrefslogtreecommitdiffstats
path: root/otherlibs/labltk
diff options
context:
space:
mode:
authorJacques Le Normand <rathereasy@gmail.com>2010-09-13 05:28:30 +0000
committerJacques Le Normand <rathereasy@gmail.com>2010-09-13 05:28:30 +0000
commit6de25fef2f6db569e0499e5eb492e31caf784a6c (patch)
tree77d092980193ac6cd27f64c780b6a10881101797 /otherlibs/labltk
parent4fd6cd82750051e930451963b5f9a67831cac5dc (diff)
first commit
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gadts@10679 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'otherlibs/labltk')
-rw-r--r--otherlibs/labltk/browser/searchid.ml2
-rw-r--r--otherlibs/labltk/browser/searchpos.ml2
2 files changed, 3 insertions, 1 deletions
diff --git a/otherlibs/labltk/browser/searchid.ml b/otherlibs/labltk/browser/searchid.ml
index 284814390..3c09b90b6 100644
--- a/otherlibs/labltk/browser/searchid.ml
+++ b/otherlibs/labltk/browser/searchid.ml
@@ -230,6 +230,8 @@ let rec search_type_in_signature t ~sign ~prefix ~mode =
Type_abstract -> false
| Type_variant l ->
List.exists l ~f:(fun (_, l) -> List.exists l ~f:matches)
+ | Type_generalized_variant l -> (* pretty sure this is wrong *)
+ List.exists l ~f:(fun (_, l, r) -> List.exists l ~f:matches || (match r with None -> false | Some x -> matches x))
| Type_record(l, rep) ->
List.exists l ~f:(fun (_, _, t) -> matches t)
end
diff --git a/otherlibs/labltk/browser/searchpos.ml b/otherlibs/labltk/browser/searchpos.ml
index 8cae99593..5b0fe71fd 100644
--- a/otherlibs/labltk/browser/searchpos.ml
+++ b/otherlibs/labltk/browser/searchpos.ml
@@ -170,7 +170,7 @@ let search_pos_type_decl td ~pos ~env =
Ptype_abstract -> ()
| Ptype_variant dl ->
List.iter dl
- ~f:(fun (_, tl, _) -> List.iter tl ~f:(search_pos_type ~pos ~env))
+ ~f:(fun (_, tl, _, _) -> List.iter tl ~f:(search_pos_type ~pos ~env)) (* might be false *)
| Ptype_record dl ->
List.iter dl ~f:(fun (_, _, t, _) -> search_pos_type t ~pos ~env) in
search_tkind td.ptype_kind;