Skip to content

Commit ce87ea9

Browse files
authored
1 parent 4b521c8 commit ce87ea9

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

jscomp/others/belt_Set.ml

+6-6
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,17 @@ module Dict = Belt_SetDict
2929
module A = Belt_Array
3030

3131

32-
type ('key, 'id) id = ('key, 'id) Belt_Id.comparable
33-
type ('key, 'id ) cmp = ('key, 'id) Belt_Id.cmp
32+
type ('value, 'id) id = ('value, 'id) Belt_Id.comparable
33+
type ('value, 'id ) cmp = ('value, 'id) Belt_Id.cmp
3434

3535
module S = struct
36-
type ('k,'id) t = {
37-
cmp: ('k, 'id) cmp;
38-
data: ('k, 'id) Dict.t;
36+
type ('value, 'id) t = {
37+
cmp: ('value, 'id) cmp;
38+
data: ('value, 'id) Dict.t;
3939
} [@@bs.deriving abstract]
4040
end
4141

42-
type ('k, 'id) t = ('k, 'id) S.t
42+
type ('value, 'id) t = ('value, 'id) S.t
4343

4444
let ofArray (type value) (type identity) data ~(id : (value,identity) id) =
4545
let module M = (val id ) in

jscomp/others/belt_Set.mli

+10-10
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@
7373
The [union s0 s3] will result in a type error, since their identity mismatch
7474
*)
7575

76-
(** Specalized when key type is [int], more efficient
76+
(** Specalized when value type is [int], more efficient
7777
than the gerneic type, its compare behavior is fixed using the built-in comparison
7878
*)
7979
module Int = Belt_SetInt
8080

81-
(** Specalized when key type is [string], more efficient
81+
(** Specalized when value type is [string], more efficient
8282
than the gerneic type, its compare behavior is fixed using the built-in comparison
8383
*)
8484
module String = Belt_SetString
@@ -91,16 +91,16 @@ module String = Belt_SetString
9191
module Dict = Belt_SetDict
9292

9393

94-
type ('key,'identity) t
95-
(** [('key, 'identity) t]
94+
type ('value, 'identity) t
95+
(** [('value, 'identity) t]
9696
97-
['key] is the element type
97+
['value] is the element type
9898
9999
['identity] the identity of the collection
100100
*)
101101

102102

103-
type ('key, 'id) id = ('key, 'id) Belt_Id.comparable
103+
type ('value, 'id) id = ('value, 'id) Belt_Id.comparable
104104
(** The identity needed for making a set from scratch
105105
*)
106106

@@ -115,7 +115,7 @@ val make: id:('value, 'id) id -> ('value, 'id) t
115115
*)
116116

117117

118-
val ofArray: 'k array -> id:('k, 'id) id -> ('k, 'id) t
118+
val ofArray: 'value array -> id:('value, 'id) id -> ('value, 'id) t
119119
(** [ofArray xs ~id]
120120
121121
@example{[
@@ -435,7 +435,7 @@ val checkInvariantInternal: _ t -> unit
435435
More API will be exposed by needs
436436
*)
437437

438-
val getData: ('k,'id) t -> ('k,'id) Belt_SetDict.t
438+
val getData: ('value, 'id) t -> ('value, 'id) Belt_SetDict.t
439439
(** [getData s0]
440440
441441
{b Advanced usage only}
@@ -445,15 +445,15 @@ val getData: ('k,'id) t -> ('k,'id) Belt_SetDict.t
445445
without boxing
446446
*)
447447

448-
val getId: ('k,'id) t -> ('k,'id) id
448+
val getId: ('value, 'id) t -> ('value, 'id) id
449449
(** [getId s0]
450450
451451
{b Advanced usage only}
452452
453453
@return the identity of [s0]
454454
*)
455455

456-
val packIdData: id:('k, 'id) id -> data:('k, 'id) Belt_SetDict.t -> ('k, 'id) t
456+
val packIdData: id:('value, 'id) id -> data:('value, 'id) Belt_SetDict.t -> ('value, 'id) t
457457
(** [packIdData ~id ~data]
458458
459459
{b Advanced usage only}

jscomp/others/belt_SetInt.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* along with this program; if not, write to the Free Software
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2525

26-
(** This module is {!Belt.Set} specialized with key type to be a primitive type.
27-
It is more efficient in general, the API is the same with {!Belt_Set} except its key type is fixed,
26+
(** This module is {!Belt.Set} specialized with value type to be a primitive type.
27+
It is more efficient in general, the API is the same with {!Belt_Set} except its value type is fixed,
2828
and identity is not needed(using the built-in one)
2929
3030
{b See} {!Belt.Set}

jscomp/others/belt_SetString.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* along with this program; if not, write to the Free Software
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2525

26-
(** This module is {!Belt.Set} specialized with key type to be a primitive type.
27-
It is more efficient in general, the API is the same with {!Belt_Set} except its key type is fixed,
26+
(** This module is {!Belt.Set} specialized with value type to be a primitive type.
27+
It is more efficient in general, the API is the same with {!Belt_Set} except its value type is fixed,
2828
and identity is not needed(using the built-in one)
2929
3030
{b See} {!Belt.Set}

jscomp/others/set.cppo.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2424

25-
(** This module is {!Belt.Set} specialized with key type to be a primitive type.
26-
It is more efficient in general, the API is the same with {!Belt_Set} except its key type is fixed,
25+
(** This module is {!Belt.Set} specialized with value type to be a primitive type.
26+
It is more efficient in general, the API is the same with {!Belt_Set} except its value type is fixed,
2727
and identity is not needed(using the built-in one)
2828
2929
{b See} {!Belt.Set}

0 commit comments

Comments
 (0)