Skip to content

Commit 1c27b71

Browse files
authored
[Belt] Make comparable label-less (#2565)
It's a single arg, so reduces the burden of using that pattern a little. I'll update the docs after this
1 parent 712b87d commit 1c27b71

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

jscomp/others/belt_Id.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555

5656
let comparableU
5757
(type key)
58-
~cmp
58+
cmp
5959
=
6060
let module N = MakeComparable(struct
6161
type t = key
@@ -64,8 +64,8 @@ let comparableU
6464
(module N : Comparable with type t = key)
6565

6666

67-
let comparable ~cmp =
68-
comparableU ~cmp:(fun[@bs] a b -> cmp a b)
67+
let comparable cmp =
68+
comparableU (fun[@bs] a b -> cmp a b)
6969

7070
module type Hashable = sig
7171
type identity

jscomp/others/belt_Id.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ type ('key, 'id) comparable =
7676
*)
7777

7878
val comparableU:
79-
cmp:('a -> 'a -> int [@bs]) ->
79+
('a -> 'a -> int [@bs]) ->
8080
(module Comparable with type t = 'a)
8181

8282
val comparable:
83-
cmp:('a -> 'a -> int) ->
83+
('a -> 'a -> int) ->
8484
(module Comparable with type t = 'a)
8585

8686
module type Hashable = sig

0 commit comments

Comments
 (0)