Skip to content

Commit

Permalink
Merge 556fcc8 into 805fcb2
Browse files Browse the repository at this point in the history
  • Loading branch information
bobzhang committed Mar 19, 2018
2 parents 805fcb2 + 556fcc8 commit 397f0cf
Show file tree
Hide file tree
Showing 235 changed files with 3,697 additions and 2,393 deletions.
35 changes: 28 additions & 7 deletions Changes.md
@@ -1,4 +1,25 @@

# 2.2.3

Features:
- #2646,#2622 Adding Belt.Option
- #2342, #2624 (|.) pipe syntax for t first convention
- #2589 Expose Id.MakeComparable functor
- #2587 Added production ready settings for react theme
- * remove refmt syntax version 2

Performances:
- #2438 using concrete predicates for integer comparison
- #2584 better handling of if then else common sub expression
Fixes:
- #2303 defining or using a module named "Block" causes runtime errors
- #2616,#2612,#2554 better error message
- #2352 return value of assignment expression
- #2413 no break generated after return statement in some code branches
- #2633 [@bs.string] in FFI
- #2608 short-circuiting of && fails due to extraction of variable
- #2559 fix Bytes.create semantics

# 2.2.2

Features:
Expand All @@ -12,7 +33,7 @@ Fixes:

# 2.2.0
Features:
- A beta release for the new stdlib called Belt
- A beta release for the new stdlib called Belt
- #2436, #2381, #2377, #2353 bs.deriving abstract support


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

# 1.10.3
Features:
- #2112, introduced a key `suffix`, so that user can
- #2112, introduced a key `suffix`, so that user can
choose `suffix : ".bs.js"`
- #2138, in combination of `.bs.js` suffix and `in-source` build,
bsb is able to remove staled build artifact
Expand All @@ -78,7 +99,7 @@ Features:
it in reason syntax
- #2096, clorized ninja build output

- #2120 better error message in the location of `{json||json}`
- #2120 better error message in the location of `{json||json}`
- #2123 avoid namespace leaking in types
- #2130 make Sys module not break React Native bindings
- #2159, #2165 enhance user expereince of bsb (less verbose, status bar when failed)
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -16,7 +16,7 @@ libs:
$(MAKE) -C jscomp/runtime -j8 all
$(MAKE) -C jscomp/others -j8 all
$(MAKE) -C jscomp/stdlib -j8 all


DEST=lib/ocaml
RUNTIME=jscomp/runtime
Expand All @@ -26,6 +26,8 @@ OTHERS=jscomp/others
# scripts/build_uitil.js
# function install
# scripts/build_util.install

# ATTENTION: syncup build_util.install for windows
install:
@echo "Installation"
cp $(RUNTIME)/*.cmt* $(RUNTIME)/*.cmj* $(RUNTIME)/js.ml $(RUNTIME)/js.cmi \
Expand Down
3 changes: 2 additions & 1 deletion docs/api/Belt.Array.html
Expand Up @@ -32,6 +32,7 @@
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
<li><a href="Belt_Option.html">Belt_Option</a></li>
<li><a href="Belt_Range.html">Belt_Range</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
Expand Down Expand Up @@ -102,7 +103,7 @@ <h1>Module <a href="type_Belt.Array.html">Belt.Array</a></h1>
<a href="Belt.Array.html"><code class="code">Belt.Array</code></a>
<p>

<b>mutable array</b>: Utililites functions<br>
<b>mutable array</b>: Utilities functions<br>

</div>

Expand Down
13 changes: 8 additions & 5 deletions docs/api/Belt.HashMap.html
Expand Up @@ -7,7 +7,7 @@
<script src="../api_static//script.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<meta charset="utf8">
<link rel="previous" href="Belt.HashSet.html">
<link rel="previous" href="Belt.HashSet.html"><link rel="next" href="Belt.Option.html">
<title> Belt.HashMap </title></head>
<body>
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
Expand All @@ -32,6 +32,7 @@
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
<li><a href="Belt_Option.html">Belt_Option</a></li>
<li><a href="Belt_Range.html">Belt_Range</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
Expand Down Expand Up @@ -93,15 +94,16 @@
<li><a href="Node_process.html">Node_process</a></li></ul></nav>
<div class="navbar"><a class="pre" href="Belt.HashSet.html" title="Belt.HashSet">Previous</a>
&nbsp;<a class="up" href="Belt.html" title="Belt">Up</a>
&nbsp;</div>
&nbsp;<a class="post" href="Belt.Option.html" title="Belt.Option">Next</a>
</div>
<h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>

<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">
<div class="not-examples">
<a href="Belt.HashMap.html"><code class="code">Belt.HashMap</code></a>
<p>

The toplevel provides generic <b>mutable</b> hash map operations.
The top level provides generic <b>mutable</b> hash map operations.
<p>

It also has two specialized inner modules
Expand Down Expand Up @@ -224,7 +226,8 @@ <h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
4 changes: 3 additions & 1 deletion docs/api/Belt.HashSet.html
Expand Up @@ -32,6 +32,7 @@
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
<li><a href="Belt_Option.html">Belt_Option</a></li>
<li><a href="Belt_Range.html">Belt_Range</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
Expand Down Expand Up @@ -102,7 +103,7 @@ <h1>Module <a href="type_Belt.HashSet.html">Belt.HashSet</a></h1>
<a href="Belt.HashSet.html"><code class="code">Belt.HashSet</code></a>
<p>

The toplevel provides generic <b>mutable</b> hash set operations.
The top level provides generic <b>mutable</b> hash set operations.
<p>

It also has two specialized inner modules
Expand Down Expand Up @@ -167,5 +168,6 @@ <h1>Module <a href="type_Belt.HashSet.html">Belt.HashSet</a></h1>
<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>
<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>
<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>
<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>
<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>
<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>
67 changes: 55 additions & 12 deletions docs/api/Belt.Id.html
Expand Up @@ -32,6 +32,7 @@
<li><a href="Belt_MutableSetInt.html">Belt_MutableSetInt</a></li>
<li><a href="Belt_MutableSetString.html">Belt_MutableSetString</a></li>
<li><a href="Belt_MutableStack.html">Belt_MutableStack</a></li>
<li><a href="Belt_Option.html">Belt_Option</a></li>
<li><a href="Belt_Range.html">Belt_Range</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
Expand Down Expand Up @@ -101,12 +102,12 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
<a href="Belt.Id.html"><code class="code">Belt.Id</code></a>
<p>

Provide utiliites to create identified comparators or hashes for
data structures used below.
Provide utilities to create identified comparators or hashes for
data structures used below.
<p>

It create a unique identifer per module of
functions so that different data structures with slightly different
It create a unique identifier per module of
functions so that different data structures with slightly different
comparison functions won't mix<br>

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

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

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

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

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

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

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

Unlike normal functions, when created, it comes with a unique identity (guaranteed
by the type system).
by the type system).
<p>

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>.
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>.
<p>

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

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



<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">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
</div>


<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">
<div class="not-examples">

</div>
</div>
<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">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
</div>


<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">
<div class="not-examples">

</div>
</div>
<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>
<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>
<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">
Expand All @@ -206,13 +227,13 @@ <h1>Module <a href="type_Belt.Id.html">Belt.Id</a></h1>
<p>

Unlike normal functions, when created, it comes with a unique identity (guaranteed
by the type system).
by the type system).
<p>

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>.
<p>

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

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



<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">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
</div>


<pre><span id="VALhash"><span class="keyword">val</span> hash</span> : <code class="type">(t -> int [@bs])</code></pre>
<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">
<div class="not-examples">

</div>
</div>
<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">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type"></code>t</span> </pre>
</div>


<pre><span id="VALhash"><span class="keyword">val</span> hash</span> : <code class="type">t -> int</code></pre>
<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">
<div class="not-examples">

</div>
</div>
<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>
<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 comments on commit 397f0cf

Please sign in to comment.