Skip to content

Commit b387bdb

Browse files
committed
Revert "[Docs][Belt] Categorize uncurried helpers into their dedicated section, part 2 (#2630)"
This reverts commit bc63f2b.
1 parent bc63f2b commit b387bdb

24 files changed

+436
-547
lines changed

Diff for: jscomp/others/belt_Array.mli

+73-95
Large diffs are not rendered by default.

Diff for: jscomp/others/belt_HashMapInt.mli

+10-15
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,40 @@ type key = int
33

44

55
# 10 "hashmap.cppo.mli"
6-
type 'b t
6+
type 'b t
77

88

9-
val make: hintSize:int -> 'b t
9+
val make: hintSize:int -> 'b t
1010

1111
val clear: 'b t -> unit
1212

1313
val isEmpty: _ t -> bool
14-
14+
1515
val set: 'a t -> key -> 'a -> unit
1616
(** [setDone tbl k v] if [k] does not exist,
1717
add the binding [k,v], otherwise, update the old value with the new
1818
[v]
1919
*)
20+
2021

21-
22-
val copy: 'a t -> 'a t
22+
val copy: 'a t -> 'a t
2323
val get: 'a t -> key -> 'a option
2424

2525
val has: 'b t -> key -> bool
2626

2727
val remove: 'a t -> key -> unit
2828

29+
val forEachU: 'b t -> (key -> 'b -> unit [@bs]) -> unit
2930
val forEach: 'b t -> (key -> 'b -> unit) -> unit
3031

32+
val reduceU: 'b t -> 'c -> ('c -> key -> 'b -> 'c [@bs]) -> 'c
3133
val reduce: 'b t -> 'c -> ('c -> key -> 'b -> 'c) -> 'c
3234

35+
val keepMapInPlaceU: 'a t -> (key -> 'a -> 'a option [@bs]) -> unit
3336
val keepMapInPlace: 'a t -> (key -> 'a -> 'a option) -> unit
3437

35-
36-
val size: _ t -> int
38+
39+
val size: _ t -> int
3740

3841

3942
val toArray: 'a t -> (key * 'a) array
@@ -46,11 +49,3 @@ val logStats: _ t -> unit
4649

4750
val ofArray: (key * 'a) array -> 'a t
4851
[@@ocaml.deprecated "Use fromArray instead"]
49-
50-
51-
(** {1 Uncurried version} *)
52-
53-
54-
val forEachU: 'b t -> (key -> 'b -> unit [@bs]) -> unit
55-
val reduceU: 'b t -> 'c -> ('c -> key -> 'b -> 'c [@bs]) -> 'c
56-
val keepMapInPlaceU: 'a t -> (key -> 'a -> 'a option [@bs]) -> unit

Diff for: jscomp/others/belt_HashMapString.mli

+10-15
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,40 @@ type key = string
33

44

55
# 10 "hashmap.cppo.mli"
6-
type 'b t
6+
type 'b t
77

88

9-
val make: hintSize:int -> 'b t
9+
val make: hintSize:int -> 'b t
1010

1111
val clear: 'b t -> unit
1212

1313
val isEmpty: _ t -> bool
14-
14+
1515
val set: 'a t -> key -> 'a -> unit
1616
(** [setDone tbl k v] if [k] does not exist,
1717
add the binding [k,v], otherwise, update the old value with the new
1818
[v]
1919
*)
20+
2021

21-
22-
val copy: 'a t -> 'a t
22+
val copy: 'a t -> 'a t
2323
val get: 'a t -> key -> 'a option
2424

2525
val has: 'b t -> key -> bool
2626

2727
val remove: 'a t -> key -> unit
2828

29+
val forEachU: 'b t -> (key -> 'b -> unit [@bs]) -> unit
2930
val forEach: 'b t -> (key -> 'b -> unit) -> unit
3031

32+
val reduceU: 'b t -> 'c -> ('c -> key -> 'b -> 'c [@bs]) -> 'c
3133
val reduce: 'b t -> 'c -> ('c -> key -> 'b -> 'c) -> 'c
3234

35+
val keepMapInPlaceU: 'a t -> (key -> 'a -> 'a option [@bs]) -> unit
3336
val keepMapInPlace: 'a t -> (key -> 'a -> 'a option) -> unit
3437

35-
36-
val size: _ t -> int
38+
39+
val size: _ t -> int
3740

3841

3942
val toArray: 'a t -> (key * 'a) array
@@ -46,11 +49,3 @@ val logStats: _ t -> unit
4649

4750
val ofArray: (key * 'a) array -> 'a t
4851
[@@ocaml.deprecated "Use fromArray instead"]
49-
50-
51-
(** {1 Uncurried version} *)
52-
53-
54-
val forEachU: 'b t -> (key -> 'b -> unit [@bs]) -> unit
55-
val reduceU: 'b t -> 'c -> ('c -> key -> 'b -> 'c [@bs]) -> 'c
56-
val keepMapInPlaceU: 'a t -> (key -> 'a -> 'a option [@bs]) -> unit

Diff for: jscomp/others/belt_HashSetInt.mli

+14-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# 2 "hashset.cppo.mli"
33
(* Copyright (C) 2017 Authors of BuckleScript
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
@@ -19,7 +19,7 @@
1919
* but WITHOUT ANY WARRANTY; without even the implied warranty of
2020
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2121
* GNU Lesser General Public License for more details.
22-
*
22+
*
2323
* You should have received a copy of the GNU Lesser General Public License
2424
* along with this program; if not, write to the Free Software
2525
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
@@ -40,43 +40,37 @@ type key = int
4040
# 44 "hashset.cppo.mli"
4141
type t
4242

43-
val make: hintSize:int -> t
43+
val make: hintSize:int -> t
4444

4545
val clear: t -> unit
4646

4747
val isEmpty: t -> bool
48-
48+
4949
val add: t -> key -> unit
5050

5151
val copy: t -> t
52-
52+
5353
val has: t -> key -> bool
54-
54+
5555
val remove: t -> key -> unit
5656

57+
val forEachU: t -> (key -> unit [@bs]) -> unit
5758
val forEach: t -> (key -> unit) -> unit
58-
59+
60+
val reduceU: t -> 'c -> ( 'c -> key -> 'c [@bs]) -> 'c
5961
val reduce: t -> 'c -> ( 'c -> key -> 'c) -> 'c
60-
61-
val size: t -> int
62+
63+
val size: t -> int
6264

6365
val logStats: t -> unit
6466

65-
val toArray: t -> key array
67+
val toArray: t -> key array
6668

67-
val ofArray: key array -> t
69+
val ofArray: key array -> t
6870
[@@ocaml.deprecated "Use fromArray instead"]
6971

70-
val fromArray: key array -> t
72+
val fromArray: key array -> t
7173

7274
val mergeMany: t -> key array -> unit
7375

7476
val getBucketHistogram: t -> int array
75-
76-
77-
(** {1 Uncurried version} *)
78-
79-
80-
val forEachU: t -> (key -> unit [@bs]) -> unit
81-
82-
val reduceU: t -> 'c -> ( 'c -> key -> 'c [@bs]) -> 'c

Diff for: jscomp/others/belt_HashSetString.mli

+14-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
# 2 "hashset.cppo.mli"
33
(* Copyright (C) 2017 Authors of BuckleScript
4-
*
4+
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU Lesser General Public License as published by
77
* the Free Software Foundation, either version 3 of the License, or
@@ -19,7 +19,7 @@
1919
* but WITHOUT ANY WARRANTY; without even the implied warranty of
2020
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2121
* GNU Lesser General Public License for more details.
22-
*
22+
*
2323
* You should have received a copy of the GNU Lesser General Public License
2424
* along with this program; if not, write to the Free Software
2525
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
@@ -40,43 +40,37 @@ type key = string
4040
# 44 "hashset.cppo.mli"
4141
type t
4242

43-
val make: hintSize:int -> t
43+
val make: hintSize:int -> t
4444

4545
val clear: t -> unit
4646

4747
val isEmpty: t -> bool
48-
48+
4949
val add: t -> key -> unit
5050

5151
val copy: t -> t
52-
52+
5353
val has: t -> key -> bool
54-
54+
5555
val remove: t -> key -> unit
5656

57+
val forEachU: t -> (key -> unit [@bs]) -> unit
5758
val forEach: t -> (key -> unit) -> unit
58-
59+
60+
val reduceU: t -> 'c -> ( 'c -> key -> 'c [@bs]) -> 'c
5961
val reduce: t -> 'c -> ( 'c -> key -> 'c) -> 'c
60-
61-
val size: t -> int
62+
63+
val size: t -> int
6264

6365
val logStats: t -> unit
6466

65-
val toArray: t -> key array
67+
val toArray: t -> key array
6668

67-
val ofArray: key array -> t
69+
val ofArray: key array -> t
6870
[@@ocaml.deprecated "Use fromArray instead"]
6971

70-
val fromArray: key array -> t
72+
val fromArray: key array -> t
7173

7274
val mergeMany: t -> key array -> unit
7375

7476
val getBucketHistogram: t -> int array
75-
76-
77-
(** {1 Uncurried version} *)
78-
79-
80-
val forEachU: t -> (key -> unit [@bs]) -> unit
81-
82-
val reduceU: t -> 'c -> ( 'c -> key -> 'c [@bs]) -> 'c

0 commit comments

Comments
 (0)