Skip to content

Commit 7eb8c46

Browse files
committed
rename bs to belt
1 parent e8d0928 commit 7eb8c46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+236
-193
lines changed

Diff for: jscomp/others/.depend

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ bs_SortArrayInt.cmj : bs_Array.cmj bs_SortArrayInt.cmi
2828
bs_SortArrayString.cmj : bs_Array.cmj bs_SortArrayString.cmi
2929
bs_Range.cmj : bs_Range.cmi
3030
bs_internalBucketsType.cmj : bs_Array.cmj bs_internalBucketsType.cmi
31-
bs_internalSetBuckets.cmj : bs_internalBucketsType.cmj bs_Array.cmj bs.cmj \
31+
bs_internalSetBuckets.cmj : bs_internalBucketsType.cmj bs_Array.cmj \
3232
bs_internalSetBuckets.cmi
3333
bs_internalBuckets.cmj : bs_internalBucketsType.cmj bs_Array.cmj \
3434
bs_internalBuckets.cmi

Diff for: jscomp/others/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include ../Makefile.shared
22

33
COMPILER=../../lib/bsc.exe
44

5-
MAP_FILES= node bs
5+
MAP_FILES= node belt
66

77
SOURCE_LIST= node_path node_fs node_process dict node_module js_array js_string \
88
js_re js_null_undefined node_buffer js_types js_json js_obj \

Diff for: jscomp/others/bs.ml renamed to jscomp/others/belt.ml

+33-33
Original file line numberDiff line numberDiff line change
@@ -70,19 +70,19 @@
7070
{[
7171
type t = int * int
7272
module I0 =
73-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
73+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
7474
match compare a0 b0 with
7575
| 0 -> compare a1 b1
7676
| c -> c
7777
))
78-
let s0 = Bs.Set.make ~id:(module I0)
78+
let s0 = Belt.Set.make ~id:(module I0)
7979
module I1 =
80-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
80+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
8181
match compare a1 b1 with
8282
| 0 -> compare a0 b0
8383
| c -> c
8484
))
85-
let s1 = Bs.Set.make ~id:(module I1)
85+
let s1 = Belt.Set.make ~id:(module I1)
8686
]}
8787
8888
Here the compiler would infer [s0] and [s1] having different type so that
@@ -98,25 +98,25 @@
9898
{b Collection Hierachy}
9999
100100
In general, we provide a generic collection module, but also create specialized
101-
modules for commonly used data type, take {i Bs.Set} for example
101+
modules for commonly used data type, take {i Belt.Set} for example
102102
103103
{[
104-
Bs.Set
105-
Bs.Set.Int
106-
Bs.Set.String
104+
Belt.Set
105+
Belt.Set.Int
106+
Belt.Set.String
107107
]}
108108
109-
The specialized module {i Bs.Set.Int}, {i Bs.Set.String} is in general more
109+
The specialized module {i Belt.Set.Int}, {i Belt.Set.String} is in general more
110110
efficient.
111111
112-
Currently, both {i Bs_Set} and {i Bs.Set} are accessible to users for some
112+
Currently, both {i Bs_Set} and {i Belt.Set} are accessible to users for some
113113
technical rasons,
114-
we {b strongly recommend} users stick to qualified import, {i Bs.Sort}, we may hide
114+
we {b strongly recommend} users stick to qualified import, {i Belt.Sort}, we may hide
115115
the internal, {i i.e}, {i Bs_Set} in the future
116116
117117
*)
118118

119-
(** {!Bs.Id}
119+
(** {!Belt.Id}
120120
121121
Provide utiliites to create identified comparators or hashes for
122122
data structures used below.
@@ -127,106 +127,106 @@
127127
*)
128128
module Id = Bs_Id
129129

130-
(** {!Bs.Array}
130+
(** {!Belt.Array}
131131
132132
{b mutable array}: Utililites functions
133133
*)
134134
module Array = Bs_Array
135135

136-
(** {!Bs.SortArray}
136+
(** {!Belt.SortArray}
137137
138138
The toplevel provides some generic sort related utililties.
139139
140140
It also has two specialized inner modules
141-
{!Bs.SortArray.Int} and {!Bs.SortArray.String}
141+
{!Belt.SortArray.Int} and {!Belt.SortArray.String}
142142
*)
143143
module SortArray = Bs_SortArray
144144

145-
(** {!Bs.MutableQueue}
145+
(** {!Belt.MutableQueue}
146146
147147
An FIFO(first in first out) queue data structure
148148
*)
149149
module MutableQueue = Bs_MutableQueue
150150

151-
(** {!Bs.MutableStack}
151+
(** {!Belt.MutableStack}
152152
153153
An FILO(first in last out) stack data structure
154154
*)
155155
module MutableStack = Bs_MutableStack
156156

157-
(** {!Bs.List}
157+
(** {!Belt.List}
158158
159159
Utilities for List data type
160160
*)
161161
module List = Bs_List
162162

163-
(** {!Bs.Range}
163+
(** {!Belt.Range}
164164
165165
Utilities for a closed range [(from, start)]
166166
*)
167167
module Range = Bs_Range
168168

169-
(** {!Bs.Set}
169+
(** {!Belt.Set}
170170
171171
The toplevel provides generic {b immutable} set operations.
172172
173173
It also has three specialized inner modules
174-
{!Bs.Set.Int} and {!Bs.Set.String}
175-
{!Bs.Set.Dict}: This module separate date from function
174+
{!Belt.Set.Int} and {!Belt.Set.String}
175+
{!Belt.Set.Dict}: This module separate date from function
176176
which is more verbbose but slightly more efficient
177177
178178
*)
179179
module Set = Bs_Set
180180

181181

182-
(** {!Bs.Map},
182+
(** {!Belt.Map},
183183
184184
The toplevel provides generic {b immutable} map operations.
185185
186186
It also has three specialized inner modules
187-
{!Bs.Map.Int} and {!Bs.Map.String}
188-
{!Bs.Map.Dict}: This module separate date from function
187+
{!Belt.Map.Int} and {!Belt.Map.String}
188+
{!Belt.Map.Dict}: This module separate date from function
189189
which is more verbbose but slightly more efficient
190190
*)
191191
module Map = Bs_Map
192192

193193

194-
(** {!Bs.MutableSet}
194+
(** {!Belt.MutableSet}
195195
196196
The toplevel provides generic {b mutable} set operations.
197197
198198
It also has two specialized inner modules
199-
{!Bs.MutableSet.Int} and {!Bs.MutableSet.String}
199+
{!Belt.MutableSet.Int} and {!Belt.MutableSet.String}
200200
*)
201201
module MutableSet = Bs_MutableSet
202202

203-
(** {!Bs.MutableMap}
203+
(** {!Belt.MutableMap}
204204
205205
The toplevel provides generic {b mutable} map operations.
206206
207207
It also has two specialized inner modules
208-
{!Bs.MutableMap.Int} and {!Bs.MutableMap.String}
208+
{!Belt.MutableMap.Int} and {!Belt.MutableMap.String}
209209
210210
*)
211211
module MutableMap = Bs_MutableMap
212212

213213

214-
(** {!Bs.HashSet}
214+
(** {!Belt.HashSet}
215215
216216
The toplevel provides generic {b mutable} hash set operations.
217217
218218
It also has two specialized inner modules
219-
{!Bs.HashSet.Int} and {!Bs.HashSet.String}
219+
{!Belt.HashSet.Int} and {!Belt.HashSet.String}
220220
*)
221221
module HashSet = Bs_HashSet
222222

223223

224-
(** {!Bs.HashMap}
224+
(** {!Belt.HashMap}
225225
226226
The toplevel provides generic {b mutable} hash map operations.
227227
228228
It also has two specialized inner modules
229-
{!Bs.HashMap.Int} and {!Bs.HashMap.String}
229+
{!Belt.HashMap.Int} and {!Belt.HashMap.String}
230230
*)
231231
module HashMap = Bs_HashMap
232232

Diff for: jscomp/others/bs_Array.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
(* Adapted significantly by Authors of BuckleScript *)
1414

1515

16-
(** {!Bs.Array}
16+
(** {!Belt.Array}
1717
Utililites for Array functions
1818
*)
1919

Diff for: jscomp/others/bs_HashMap.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
{[
3333
type t = int
3434
module I0 =
35-
(val Bs.Id.hashableU
35+
(val Belt.Id.hashableU
3636
~hash:(fun[\@bs] (a : t) -> a & 0xff_ff)
3737
~eq:(fun[\@bs] a b -> a = b)
3838
)
3939
let s0 : (_, string,_) t = make ~hintSize:40 ~id:(module I0)
4040
module I1 =
41-
(val Bs.Id.hashableU
41+
(val Belt.Id.hashableU
4242
~hash:(fun[\@bs] (a : t) -> a & 0xff)
4343
~eq:(fun[\@bs] a b -> a = b)
4444
)

Diff for: jscomp/others/bs_HashSet.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
{[
3333
type t = int
3434
module I0 =
35-
(val Bs.Id.hashableU
35+
(val Belt.Id.hashableU
3636
~hash:(fun[\@bs] (a : t) -> a & 0xff_ff)
3737
~eq:(fun[\@bs] a b -> a = b)
3838
)
3939
let s0 = make ~id:(module I0) ~hintSize:40
4040
module I1 =
41-
(val Bs.Id.hashableU
41+
(val Belt.Id.hashableU
4242
~hash:(fun[\@bs] (a : t) -> a & 0xff)
4343
~eq:(fun[\@bs] a b -> a = b)
4444
)

Diff for: jscomp/others/bs_HashSetInt.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
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. *)
2626

27-
(** This module is {!Bs.HashSet} specialized with key type to be a primitive type.
27+
(** This module is {!Belt.HashSet} specialized with key type to be a primitive type.
2828
29-
It is more efficient in general, the API is the same with {!Bs.HashSet} except its key type is fixed,
29+
It is more efficient in general, the API is the same with {!Belt.HashSet} except its key type is fixed,
3030
and identity is not needed(using the built-in one)
3131
32-
{b See} {!Bs.HashSet}
32+
{b See} {!Belt.HashSet}
3333
*)
3434

3535

Diff for: jscomp/others/bs_HashSetString.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
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. *)
2626

27-
(** This module is {!Bs.HashSet} specialized with key type to be a primitive type.
27+
(** This module is {!Belt.HashSet} specialized with key type to be a primitive type.
2828
29-
It is more efficient in general, the API is the same with {!Bs.HashSet} except its key type is fixed,
29+
It is more efficient in general, the API is the same with {!Belt.HashSet} except its key type is fixed,
3030
and identity is not needed(using the built-in one)
3131
32-
{b See} {!Bs.HashSet}
32+
{b See} {!Belt.HashSet}
3333
*)
3434

3535

Diff for: jscomp/others/bs_Id.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
2525

2626

27-
(** {!Bs.Id}
27+
(** {!Belt.Id}
2828
2929
Provide utiliites to create identified comparators or hashes for
3030
data structures used below.

Diff for: jscomp/others/bs_List.mli

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
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-
(** {!Bs.List}
25+
(** {!Belt.List}
2626
2727
Utilities for List data type
2828
*)

Diff for: jscomp/others/bs_Map.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@
2525
{[
2626
type t = int * int
2727
module I0 =
28-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
28+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
2929
match Pervasives.compare a0 b0 with
3030
| 0 -> Pervasives.compare a1 b1
3131
| c -> c
3232
))
3333
let s0 : (_, string, _) t = make ~id:(module I0) (* value is of type string *)
3434
module I1 =
35-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
35+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
3636
match compare a1 b1 with
3737
| 0 -> compare a0 b0
3838
| c -> c

Diff for: jscomp/others/bs_MutableMap.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
{[
3737
type t = int * int
3838
module I0 =
39-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
39+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
4040
match Pervasives.compare a0 b0 with
4141
| 0 -> Pervasives.compare a1 b1
4242
| c -> c
4343
))
4444
let s0 : (_, string,_) t = make ~id:(module I0)
4545
module I1 =
46-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
46+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
4747
match compare a1 b1 with
4848
| 0 -> compare a0 b0
4949
| c -> c

Diff for: jscomp/others/bs_MutableQueue.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ let peekUndefined q =
7171

7272
let peekExn q =
7373
match Js.nullToOption (first q ) with
74-
| None -> [%assert "Bs.Queue.Empty"]
74+
| None -> [%assert "Belt.Queue.Empty"]
7575
| Some v -> content v
7676

7777
let pop q =
@@ -92,7 +92,7 @@ let pop q =
9292

9393
let popExn q =
9494
match Js.nullToOption (first q ) with
95-
| None -> [%assert "Bs.Queue.Empty"]
95+
| None -> [%assert "Empty"]
9696
| Some x ->
9797
let next = next x in
9898
if Js.Null.test next then

Diff for: jscomp/others/bs_MutableSet.mli

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@
3636
{[
3737
type t = int * int
3838
module I0 =
39-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
39+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
4040
match Pervasives.compare a0 b0 with
4141
| 0 -> Pervasives.compare a1 b1
4242
| c -> c
4343
))
4444
let s0 = make ~id:(module I0)
4545
module I1 =
46-
(val Bs.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
46+
(val Belt.Id.comparableU ~cmp:(fun[\@bs] ((a0,a1) : t) ((b0,b1) : t) ->
4747
match compare a1 b1 with
4848
| 0 -> compare a0 b0
4949
| c -> c

Diff for: jscomp/others/bs_MutableSetInt.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
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 {!Bs.MutableSet} specialized with key type to be a primitive type.
26+
(** This module is {!Belt.MutableSet} specialized with key type to be a primitive type.
2727
It is more efficient in general, the API is the same with {!Bs_MutableSet} except its key type is fixed,
2828
and identity is not needed(using the built-in one)
2929
*)

Diff for: jscomp/others/bs_MutableSetInt.mli

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
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 {!Bs.MutableSet} specialized with key type to be a primitive type.
26+
(** This module is {!Belt.MutableSet} specialized with key type to be a primitive type.
2727
28-
It is more efficient in general, the API is the same with {!Bs.MutableSet} except its key type is fixed,
28+
It is more efficient in general, the API is the same with {!Belt.MutableSet} except its key type is fixed,
2929
and identity is not needed(using the built-in one)
3030
31-
{b See} {!Bs.MutableSet}
31+
{b See} {!Belt.MutableSet}
3232
*)
3333

3434

Diff for: jscomp/others/bs_MutableSetString.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
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 {!Bs.MutableSet} specialized with key type to be a primitive type.
26+
(** This module is {!Belt.MutableSet} specialized with key type to be a primitive type.
2727
It is more efficient in general, the API is the same with {!Bs_MutableSet} except its key type is fixed,
2828
and identity is not needed(using the built-in one)
2929
*)

0 commit comments

Comments
 (0)