Skip to content

Commit

Permalink
unique requires double rev
Browse files Browse the repository at this point in the history
  • Loading branch information
camlspotter committed Feb 15, 2013
1 parent cb77948 commit 7570f54
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions search.ml
Expand Up @@ -166,12 +166,11 @@ let to_result (id, kind) =

let raw_search s modules paths =
init modules paths;
sure (Searchid.search_string_type ~mode:`Exact) s
List.rev @@ ExtList.List.unique @@ List.rev (* unique removes first appearances *)
@@ sure (Searchid.search_string_type ~mode:`Exact) s
@ sure (Searchid.search_string_type ~mode:`Included) s
@ sure Searchid.search_pattern_symbol s

let search s modules paths =
List.rev
@@ ExtList.List.unique
@@ List.rev_map ~f:to_result
List.map ~f:to_result
@@ raw_search s modules paths

0 comments on commit 7570f54

Please sign in to comment.