Skip to content

Commit 36d4341

Browse files
committed
update changeslog and docs
1 parent 805fcb2 commit 36d4341

File tree

227 files changed

+3619
-2329
lines changed

Some content is hidden

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

227 files changed

+3619
-2329
lines changed

Changes.md

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,25 @@
11

2+
# 2.2.3
3+
4+
Features:
5+
- #2646,#2622 Adding Belt.Option
6+
- #2342, #2624 (|.) pipe syntax for t first convention
7+
- #2589 Expose Id.MakeComparable functor
8+
- #2587 Added production ready settings for react theme
9+
- * remove refmt syntax version 2
10+
11+
Performances:
12+
- #2438 using concrete predicates for integer comparison
13+
- #2584 better handling of if then else common sub expression
14+
Fixes:
15+
- #2303 defining or using a module named "Block" causes runtime errors
16+
- #2616,#2612,#2554 better error message
17+
- #2352 return value of assignment expression
18+
- #2413 no break generated after return statement in some code branches
19+
- #2633 [@bs.string] in FFI
20+
- #2608 short-circuiting of && fails due to extraction of variable
21+
- #2559 fix Bytes.create semantics
22+
223
# 2.2.2
324

425
Features:
@@ -12,7 +33,7 @@ Fixes:
1233

1334
# 2.2.0
1435
Features:
15-
- A beta release for the new stdlib called Belt
36+
- A beta release for the new stdlib called Belt
1637
- #2436, #2381, #2377, #2353 bs.deriving abstract support
1738

1839

@@ -25,7 +46,7 @@ Fixes:
2546
- #2399, turn partial application warnings to error in react template
2647
- #2465 build on FreeBSD
2748
- #2450 ignore bsb.lock
28-
- #2356 ship build-schema.json
49+
- #2356 ship build-schema.json
2950
- #2489, #2464 capitalize names in combination of '/'
3051
- #2459 subdirs:true by default for templates
3152
- #2428, fix trailing space on react-jsx
@@ -35,11 +56,11 @@ Fixes:
3556
Features:
3657
- #2282, #2280,#2272,#2271,#2270,#2262,#2260,#2255,#2253
3758
Automatically derive js converter between ocaml and Js values
38-
see docs: https://bucklescript.github.io/bucklescript/Manual.html#_mapping_between_js_values_and_ocaml_values_since_2_1_0
39-
- #2238, #2225, #2221
59+
see docs: https://bucklescript.github.io/bucklescript/Manual.html#_mapping_between_js_values_and_ocaml_values_since_2_1_0
60+
- #2238, #2225, #2221
4061
Make the compiler relocatable
4162
prebuilt compiler (this release for Mac/Win)
42-
- #2276 update reason syntax@d0d18
63+
- #2276 update reason syntax@d0d18
4364
- #2229 improve error message with regard to `@bs`
4465
- #2266, add Js_global.(encode|decode)URI(Component) bindings
4566
- #2220 make watcher mode in linux accept ninja progress animation
@@ -69,7 +90,7 @@ Features
6990

7091
# 1.10.3
7192
Features:
72-
- #2112, introduced a key `suffix`, so that user can
93+
- #2112, introduced a key `suffix`, so that user can
7394
choose `suffix : ".bs.js"`
7495
- #2138, in combination of `.bs.js` suffix and `in-source` build,
7596
bsb is able to remove staled build artifact
@@ -78,7 +99,7 @@ Features:
7899
it in reason syntax
79100
- #2096, clorized ninja build output
80101

81-
- #2120 better error message in the location of `{json||json}`
102+
- #2120 better error message in the location of `{json||json}`
82103
- #2123 avoid namespace leaking in types
83104
- #2130 make Sys module not break React Native bindings
84105
- #2159, #2165 enhance user expereince of bsb (less verbose, status bar when failed)

docs/api/Belt.Array.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
3333
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
3434
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
35+
<li><a href="Belt_Option.html">Belt_Option</a></li>
3536
<li><a href="Belt_Range.html">Belt_Range</a></li>
3637
<li><a href="Belt_Set.html">Belt_Set</a></li>
3738
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
@@ -102,7 +103,7 @@ <h1>Module <a href="type_Belt.Array.html">Belt.Array</a></h1>
102103
<a href="Belt.Array.html"><code class="code">Belt.Array</code></a>
103104
<p>
104105

105-
<b>mutable array</b>: Utililites functions<br>
106+
<b>mutable array</b>: Utilities functions<br>
106107

107108
</div>
108109

docs/api/Belt.HashMap.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<script src="../api_static//script.js"></script>
88
<script>hljs.initHighlightingOnLoad();</script>
99
<meta charset="utf8">
10-
<link rel="previous" href="Belt.HashSet.html">
10+
<link rel="previous" href="Belt.HashSet.html"><link rel="next" href="Belt.Option.html">
1111
<title> Belt.HashMap </title></head>
1212
<body>
1313
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
@@ -32,6 +32,7 @@
3232
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
3333
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
3434
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
35+
<li><a href="Belt_Option.html">Belt_Option</a></li>
3536
<li><a href="Belt_Range.html">Belt_Range</a></li>
3637
<li><a href="Belt_Set.html">Belt_Set</a></li>
3738
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
@@ -93,15 +94,16 @@
9394
<li><a href="Node_process.html">Node_process</a></li></ul></nav>
9495
<div class="navbar"><a class="pre" href="Belt.HashSet.html" title="Belt.HashSet">Previous</a>
9596
&nbsp;<a class="up" href="Belt.html" title="Belt">Up</a>
96-
&nbsp;</div>
97+
&nbsp;<a class="post" href="Belt.Option.html" title="Belt.Option">Next</a>
98+
</div>
9799
<h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>
98100

99101
<pre><span class="keyword">module</span> HashMap: <code class="type"><a href="Belt_HashMap.html">Belt_HashMap</a></code></pre><div class="info module top">
100102
<div class="not-examples">
101103
<a href="Belt.HashMap.html"><code class="code">Belt.HashMap</code></a>
102104
<p>
103105

104-
The toplevel provides generic <b>mutable</b> hash map operations.
106+
The top level provides generic <b>mutable</b> hash map operations.
105107
<p>
106108

107109
It also has two specialized inner modules
@@ -224,7 +226,8 @@ <h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>
224226
<pre><span id="VALtoArray"><span class="keyword">val</span> toArray</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> ('key * 'value) array</code></pre>
225227
<pre><span id="VALkeysToArray"><span class="keyword">val</span> keysToArray</span> : <code class="type">('key, 'a, 'b) <a href="Belt_HashMap.html#TYPEt">t</a> -> 'key array</code></pre>
226228
<pre><span id="VALvaluesToArray"><span class="keyword">val</span> valuesToArray</span> : <code class="type">('a, 'value, 'b) <a href="Belt_HashMap.html#TYPEt">t</a> -> 'value array</code></pre>
227-
<pre><span id="VALofArray"><span class="keyword">val</span> ofArray</span> : <code class="type">('key * 'value) array -><br> id:('key, 'id) <a href="Belt_HashMap.html#TYPEid">id</a> -> ('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a></code></pre>
229+
<pre><span id="VALfromArray"><span class="keyword">val</span> fromArray</span> : <code class="type">('key * 'value) array -><br> id:('key, 'id) <a href="Belt_HashMap.html#TYPEid">id</a> -> ('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a></code></pre>
228230
<pre><span id="VALmergeMany"><span class="keyword">val</span> mergeMany</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> ('key * 'value) array -> unit</code></pre>
229231
<pre><span id="VALgetBucketHistogram"><span class="keyword">val</span> getBucketHistogram</span> : <code class="type">('a, 'b, 'c) <a href="Belt_HashMap.html#TYPEt">t</a> -> int array</code></pre>
230-
<pre><span id="VALlogStats"><span class="keyword">val</span> logStats</span> : <code class="type">('a, 'b, 'c) <a href="Belt_HashMap.html#TYPEt">t</a> -> unit</code></pre></body></html>
232+
<pre><span id="VALlogStats"><span class="keyword">val</span> logStats</span> : <code class="type">('a, 'b, 'c) <a href="Belt_HashMap.html#TYPEt">t</a> -> unit</code></pre>
233+
<pre><span id="VALofArray"><span class="keyword">val</span> ofArray</span> : <code class="type">('key * 'value) array -><br> id:('key, 'id) <a href="Belt_HashMap.html#TYPEid">id</a> -> ('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a></code></pre></body></html>

docs/api/Belt.HashSet.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
3333
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
3434
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
35+
<li><a href="Belt_Option.html">Belt_Option</a></li>
3536
<li><a href="Belt_Range.html">Belt_Range</a></li>
3637
<li><a href="Belt_Set.html">Belt_Set</a></li>
3738
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
@@ -102,7 +103,7 @@ <h1>Module <a href="type_Belt.HashSet.html">Belt.HashSet</a></h1>
102103
<a href="Belt.HashSet.html"><code class="code">Belt.HashSet</code></a>
103104
<p>
104105

105-
The toplevel provides generic <b>mutable</b> hash set operations.
106+
The top level provides generic <b>mutable</b> hash set operations.
106107
<p>
107108

108109
It also has two specialized inner modules
@@ -167,5 +168,6 @@ <h1>Module <a href="type_Belt.HashSet.html">Belt.HashSet</a></h1>
167168
<pre><span id="VALlogStats"><span class="keyword">val</span> logStats</span> : <code class="type">('a, 'b) <a href="Belt_HashSet.html#TYPEt">t</a> -> unit</code></pre>
168169
<pre><span id="VALtoArray"><span class="keyword">val</span> toArray</span> : <code class="type">('a, 'id) <a href="Belt_HashSet.html#TYPEt">t</a> -> 'a array</code></pre>
169170
<pre><span id="VALofArray"><span class="keyword">val</span> ofArray</span> : <code class="type">'a array -> id:('a, 'id) <a href="Belt_HashSet.html#TYPEid">id</a> -> ('a, 'id) <a href="Belt_HashSet.html#TYPEt">t</a></code></pre>
171+
<pre><span id="VALfromArray"><span class="keyword">val</span> fromArray</span> : <code class="type">'a array -> id:('a, 'id) <a href="Belt_HashSet.html#TYPEid">id</a> -> ('a, 'id) <a href="Belt_HashSet.html#TYPEt">t</a></code></pre>
170172
<pre><span id="VALmergeMany"><span class="keyword">val</span> mergeMany</span> : <code class="type">('a, 'id) <a href="Belt_HashSet.html#TYPEt">t</a> -> 'a array -> unit</code></pre>
171173
<pre><span id="VALgetBucketHistogram"><span class="keyword">val</span> getBucketHistogram</span> : <code class="type">('a, 'b) <a href="Belt_HashSet.html#TYPEt">t</a> -> int array</code></pre></body></html>

docs/api/Belt.Id.html

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
3333
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
3434
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
35+
<li><a href="Belt_Option.html">Belt_Option</a></li>
3536
<li><a href="Belt_Range.html">Belt_Range</a></li>
3637
<li><a href="Belt_Set.html">Belt_Set</a></li>
3738
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
@@ -101,12 +102,12 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
101102
<a href="Belt.Id.html"><code class="code">Belt.Id</code></a>
102103
<p>
103104

104-
Provide utiliites to create identified comparators or hashes for
105-
data structures used below.
105+
Provide utilities to create identified comparators or hashes for
106+
data structures used below.
106107
<p>
107108

108-
It create a unique identifer per module of
109-
functions so that different data structures with slightly different
109+
It create a unique identifier per module of
110+
functions so that different data structures with slightly different
110111
comparison functions won't mix<br>
111112

112113
</div>
@@ -122,7 +123,7 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
122123
<code class="code">('a, 'id) hash</code>
123124
<p>
124125

125-
Its runtime represenation is a <code class="code">hash</code> function, but signed with a
126+
Its runtime represenation is a <code class="code">hash</code> function, but signed with a
126127
type parameter, so that different hash functions type mismatch<br>
127128

128129
</div>
@@ -138,7 +139,7 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
138139
<code class="code">('a, 'id) eq</code>
139140
<p>
140141

141-
Its runtime represenation is an <code class="code">eq</code> function, but signed with a
142+
Its runtime represenation is an <code class="code">eq</code> function, but signed with a
142143
type parameter, so that different hash functions type mismatch<br>
143144

144145
</div>
@@ -154,7 +155,7 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
154155
<code class="code">('a,'id) cmp</code>
155156
<p>
156157

157-
Its runtime representation is a <code class="code">cmp</code> function, but signed with a
158+
Its runtime representation is a <code class="code">cmp</code> function, but signed with a
158159
type parameter, so that different hash functions type mismatch<br>
159160

160161
</div>
@@ -176,13 +177,13 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
176177
<p>
177178

178179
Unlike normal functions, when created, it comes with a unique identity (guaranteed
179-
by the type system).
180+
by the type system).
180181
<p>
181182

182-
It can be created using function <a href="Belt_Id.html#VALcomparableU"><code class="code">Belt_Id.comparableU</code></a> or<a href="Belt_Id.html#VALcomparable"><code class="code">Belt_Id.comparable</code></a>.
183+
It can be created using function <a href="Belt_Id.html#VALcomparableU"><code class="code">Belt_Id.comparableU</code></a> or<a href="Belt_Id.html#VALcomparable"><code class="code">Belt_Id.comparable</code></a>.
183184
<p>
184185

185-
The idea of a unique identity when created is that it makes sure two sets would type
186+
The idea of a unique identity when created is that it makes sure two sets would type
186187
mismatch if they use different comparison function<br>
187188

188189
</div>
@@ -191,6 +192,26 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
191192

192193

193194

195+
<pre><span class="keyword">module</span> <a href="Belt_Id.MakeComparableU.html">MakeComparableU</a>: <div class="sig_block"><code class="code">functor (</code><code class="code">M</code><code class="code"> : </code><code class="code">sig</code><div class="sig_block"><div class="type-declaration">
196+
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
197+
</div>
198+
199+
200+
<pre><span id="VALcmp"><span class="keyword">val</span> cmp</span> : <code class="type">(t -> t -> int [@bs])</code></pre></div><code class="code">end</code><code class="code">) -&gt; </code><code class="type"><a href="Belt_Id.Comparable.html">Comparable</a></code><code class="type"> with type t = M.t</code></div></pre> <div class="info">
201+
<div class="not-examples">
202+
203+
</div>
204+
</div>
205+
<pre><span class="keyword">module</span> <a href="Belt_Id.MakeComparable.html">MakeComparable</a>: <div class="sig_block"><code class="code">functor (</code><code class="code">M</code><code class="code"> : </code><code class="code">sig</code><div class="sig_block"><div class="type-declaration">
206+
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
207+
</div>
208+
209+
210+
<pre><span id="VALcmp"><span class="keyword">val</span> cmp</span> : <code class="type">t -> t -> int</code></pre></div><code class="code">end</code><code class="code">) -&gt; </code><code class="type"><a href="Belt_Id.Comparable.html">Comparable</a></code><code class="type"> with type t = M.t</code></div></pre> <div class="info">
211+
<div class="not-examples">
212+
213+
</div>
214+
</div>
194215
<pre><span id="VALcomparableU"><span class="keyword">val</span> comparableU</span> : <code class="type">cmp:('a -> 'a -> int [@bs]) -> (module Belt_Id.Comparable with type t = 'a)</code></pre>
195216
<pre><span id="VALcomparable"><span class="keyword">val</span> comparable</span> : <code class="type">cmp:('a -> 'a -> int) -> (module Belt_Id.Comparable with type t = 'a)</code></pre>
196217
<pre><span class="keyword">module type</span> <a href="Belt_Id.Hashable.html">Hashable</a> = <code class="code">sig</code> <a href="Belt_Id.Hashable.html">..</a> <code class="code">end</code></pre> <div class="info">
@@ -206,13 +227,13 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
206227
<p>
207228

208229
Unlike normal functions, when created, it comes with a unique identity (guaranteed
209-
by the type system).
230+
by the type system).
210231
<p>
211232

212233
It can be created using function <a href="Belt_Id.html#VALhashableU"><code class="code">Belt_Id.hashableU</code></a> or <a href="Belt_Id.html#VALhashable"><code class="code">Belt_Id.hashable</code></a>.
213234
<p>
214235

215-
The idea of a unique identity when created is that it makes sure two hash sets would type
236+
The idea of a unique identity when created is that it makes sure two hash sets would type
216237
mismatch if they use different comparison function<br>
217238

218239
</div>
@@ -221,5 +242,27 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
221242

222243

223244

245+
<pre><span class="keyword">module</span> <a href="Belt_Id.MakeHashableU.html">MakeHashableU</a>: <div class="sig_block"><code class="code">functor (</code><code class="code">M</code><code class="code"> : </code><code class="code">sig</code><div class="sig_block"><div class="type-declaration">
246+
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
247+
</div>
248+
249+
250+
<pre><span id="VALhash"><span class="keyword">val</span> hash</span> : <code class="type">(t -> int [@bs])</code></pre>
251+
<pre><span id="VALeq"><span class="keyword">val</span> eq</span> : <code class="type">(t -> t -> bool [@bs])</code></pre></div><code class="code">end</code><code class="code">) -&gt; </code><code class="type"><a href="Belt_Id.Hashable.html">Hashable</a></code><code class="type"> with type t = M.t</code></div></pre> <div class="info">
252+
<div class="not-examples">
253+
254+
</div>
255+
</div>
256+
<pre><span class="keyword">module</span> <a href="Belt_Id.MakeHashable.html">MakeHashable</a>: <div class="sig_block"><code class="code">functor (</code><code class="code">M</code><code class="code"> : </code><code class="code">sig</code><div class="sig_block"><div class="type-declaration">
257+
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
258+
</div>
259+
260+
261+
<pre><span id="VALhash"><span class="keyword">val</span> hash</span> : <code class="type">t -> int</code></pre>
262+
<pre><span id="VALeq"><span class="keyword">val</span> eq</span> : <code class="type">t -> t -> bool</code></pre></div><code class="code">end</code><code class="code">) -&gt; </code><code class="type"><a href="Belt_Id.Hashable.html">Hashable</a></code><code class="type"> with type t = M.t</code></div></pre> <div class="info">
263+
<div class="not-examples">
264+
265+
</div>
266+
</div>
224267
<pre><span id="VALhashableU"><span class="keyword">val</span> hashableU</span> : <code class="type">hash:('a -> int [@bs]) -><br> eq:('a -> 'a -> bool [@bs]) -> (module Belt_Id.Hashable with type t = 'a)</code></pre>
225268
<pre><span id="VALhashable"><span class="keyword">val</span> hashable</span> : <code class="type">hash:('a -> int) -><br> eq:('a -> 'a -> bool) -> (module Belt_Id.Hashable with type t = 'a)</code></pre></body></html>

0 commit comments

Comments
 (0)