Skip to content

Commit

Permalink
Use List.sort_uniq that will work in 4.02
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Apr 3, 2019
1 parent ac1e29b commit 8b70d74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/stdune/caml/dune_caml.ml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ module Lexing = Lexing
module Digest = Digest
module StringLabels = StringLabels
module ListLabels = ListLabels
module List = List

type ('a, 'error) result = ('a, 'error) Result.t =
| Ok of 'a
Expand Down
2 changes: 1 addition & 1 deletion src/stdune/list.ml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ let stable_sort t ~compare =
stable_sort t ~cmp:(fun a b -> Ordering.to_int (compare a b))

let sort_uniq t ~compare =
sort_uniq t ~cmp:(fun a b -> Ordering.to_int (compare a b))
Dune_caml.List.sort_uniq (fun a b -> Ordering.to_int (compare a b)) t

let rec compare a b ~compare:f : Ordering.t =
match a, b with
Expand Down

0 comments on commit 8b70d74

Please sign in to comment.