Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update changes #2817

Merged
merged 2 commits into from
May 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# 3.1.0

Features:

- #2809, #2806 Sync up with latest reason
- #2805, allow `x |. Some `
- #2797, #2771 `-bs-g`
- #2793 more bindings to Js.Console
- #2621 add Belt.Result module
- #2760 add Belt.Array.unzip

Perf:

- #2808 better code gen for if then else
- #2804 make HashSet.String size smaller

Fixes:

- #2812, compatibility with Node 10
- #2789, fix Weak.length
- #2790, fix Belt.Set performance issue
- #2786, fix polymorphic compare on nullables
- #2781, improve location info on bs.deriving abstract
- #2776, lift the function limitation on bs.deriving abstract
- #2752, fix binding Buffer.toString
# 3.0.0

Features:
15 changes: 15 additions & 0 deletions docs/api/Belt.Array.html
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@
<body>
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
<li><a href="Belt_Array.html">Belt_Array</a></li>
<li><a href="Belt_Debug.html">Belt_Debug</a></li>
<li><a href="Belt_HashMap.html">Belt_HashMap</a></li>
<li><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></li>
<li><a href="Belt_HashMapString.html">Belt_HashMapString</a></li>
@@ -34,6 +35,7 @@
<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_Result.html">Belt_Result</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
<li><a href="Belt_SetInt.html">Belt_SetInt</a></li>
@@ -401,6 +403,19 @@ <h1>Module <a href="type_Belt.Array.html">Belt.Array</a></h1>
</div>


<pre><span id="VALunzip"><span class="keyword">val</span> unzip</span> : <code class="type">('a * 'b) array -> 'a array * 'b array</code></pre><div class="info ">
<div class="not-examples">
<code class="code">unzip a</code> takes an array of pairs and creates a pair of arrays. The first array contains all the first items of the pairs; the second array contains all the second items.<br>

</div>
<div class="examples">
<pre class="example"> <pre class="codepre"><code class="code"> unzip [|(1,2) ; (3,4)|] = ([|1;3|], [|2;4|]);;
unzip [|(1,2) ; (3,4) ; (5,6) ; (7,8)|] = ([|1;3;5;7|], [|2;4;6;8|]);;
</code></pre> </pre>
</div>
</div>


<pre><span id="VALconcat"><span class="keyword">val</span> concat</span> : <code class="type">'a array -> 'a array -> 'a array</code></pre><div class="info ">
<div class="not-examples">
<code class="code">concat xs ys</code><br>
115 changes: 115 additions & 0 deletions docs/api/Belt.Debug.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="../api_static/tomorrow-night.css">
<link rel="stylesheet" href="../api_static/style.css" type="text/css">
<script src="../api_static//highlight.pack.js"></script>
<script src="../api_static//script.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<meta charset="utf8">
<link rel="previous" href="Belt.Result.html">
<title> Belt.Debug </title></head>
<body>
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
<li><a href="Belt_Array.html">Belt_Array</a></li>
<li><a href="Belt_Debug.html">Belt_Debug</a></li>
<li><a href="Belt_HashMap.html">Belt_HashMap</a></li>
<li><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></li>
<li><a href="Belt_HashMapString.html">Belt_HashMapString</a></li>
<li><a href="Belt_HashSet.html">Belt_HashSet</a></li>
<li><a href="Belt_HashSetInt.html">Belt_HashSetInt</a></li>
<li><a href="Belt_HashSetString.html">Belt_HashSetString</a></li>
<li><a href="Belt_Id.html">Belt_Id</a></li>
<li><a href="Belt_List.html">Belt_List</a></li>
<li><a href="Belt_Map.html">Belt_Map</a></li>
<li><a href="Belt_MapDict.html">Belt_MapDict</a></li>
<li><a href="Belt_MapInt.html">Belt_MapInt</a></li>
<li><a href="Belt_MapString.html">Belt_MapString</a></li>
<li><a href="Belt_MutableMap.html">Belt_MutableMap</a></li>
<li><a href="Belt_MutableMapInt.html">Belt_MutableMapInt</a></li>
<li><a href="Belt_MutableMapString.html">Belt_MutableMapString</a></li>
<li><a href="Belt_MutableQueue.html">Belt_MutableQueue</a></li>
<li><a href="Belt_MutableSet.html">Belt_MutableSet</a></li>
<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_Result.html">Belt_Result</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
<li><a href="Belt_SetInt.html">Belt_SetInt</a></li>
<li><a href="Belt_SetString.html">Belt_SetString</a></li>
<li><a href="Belt_SortArray.html">Belt_SortArray</a></li>
<li><a href="Belt_SortArrayInt.html">Belt_SortArrayInt</a></li>
<li><a href="Belt_SortArrayString.html">Belt_SortArrayString</a></li>
<li><a href="Belt_internalAVLset.html">Belt_internalAVLset</a></li>
<li><a href="Belt_internalAVLtree.html">Belt_internalAVLtree</a></li>
<li><a href="Belt_internalBuckets.html">Belt_internalBuckets</a></li>
<li><a href="Belt_internalBucketsType.html">Belt_internalBucketsType</a></li>
<li><a href="Belt_internalMapInt.html">Belt_internalMapInt</a></li>
<li><a href="Belt_internalMapString.html">Belt_internalMapString</a></li>
<li><a href="Belt_internalMutableAVLMap.html">Belt_internalMutableAVLMap</a></li>
<li><a href="Belt_internalSetBuckets.html">Belt_internalSetBuckets</a></li>
<li><a href="Belt_internalSetInt.html">Belt_internalSetInt</a></li>
<li><a href="Belt_internalSetString.html">Belt_internalSetString</a></li>
<li><a href="Dom.html">Dom</a></li>
<li><a href="Dom_storage.html">Dom_storage</a></li>
<li><a href="Js.html">Js</a></li>
<li><a href="Js_array.html">Js_array</a></li>
<li><a href="Js_boolean.html">Js_boolean</a></li>
<li><a href="Js_cast.html">Js_cast</a></li>
<li><a href="Js_console.html">Js_console</a></li>
<li><a href="Js_date.html">Js_date</a></li>
<li><a href="Js_dict.html">Js_dict</a></li>
<li><a href="Js_exn.html">Js_exn</a></li>
<li><a href="Js_float.html">Js_float</a></li>
<li><a href="Js_global.html">Js_global</a></li>
<li><a href="Js_int.html">Js_int</a></li>
<li><a href="Js_int64.html">Js_int64</a></li>
<li><a href="Js_internal.html">Js_internal</a></li>
<li><a href="Js_json.html">Js_json</a></li>
<li><a href="Js_list.html">Js_list</a></li>
<li><a href="Js_mapperRt.html">Js_mapperRt</a></li>
<li><a href="Js_math.html">Js_math</a></li>
<li><a href="Js_nativeint.html">Js_nativeint</a></li>
<li><a href="Js_null.html">Js_null</a></li>
<li><a href="Js_null_undefined.html">Js_null_undefined</a></li>
<li><a href="Js_obj.html">Js_obj</a></li>
<li><a href="Js_option.html">Js_option</a></li>
<li><a href="Js_primitive.html">Js_primitive</a></li>
<li><a href="Js_promise.html">Js_promise</a></li>
<li><a href="Js_re.html">Js_re</a></li>
<li><a href="Js_result.html">Js_result</a></li>
<li><a href="Js_string.html">Js_string</a></li>
<li><a href="Js_typed_array.html">Js_typed_array</a></li>
<li><a href="Js_types.html">Js_types</a></li>
<li><a href="Js_undefined.html">Js_undefined</a></li>
<li><a href="Js_unsafe.html">Js_unsafe</a></li>
<li><a href="Js_vector.html">Js_vector</a></li>
<li><a href="Node.html">Node</a></li>
<li><a href="Node_buffer.html">Node_buffer</a></li>
<li><a href="Node_child_process.html">Node_child_process</a></li>
<li><a href="Node_fs.html">Node_fs</a></li>
<li><a href="Node_module.html">Node_module</a></li>
<li><a href="Node_path.html">Node_path</a></li>
<li><a href="Node_process.html">Node_process</a></li></ul></nav>
<div class="navbar"><a class="pre" href="Belt.Result.html" title="Belt.Result">Previous</a>
&nbsp;<a class="up" href="Belt.html" title="Belt">Up</a>
&nbsp;</div>
<h1>Module <a href="type_Belt.Debug.html">Belt.Debug</a></h1>

<pre><span class="keyword">module</span> Debug: <code class="type"><a href="Belt_Debug.html">Belt_Debug</a></code></pre><div class="info module top">
<div class="not-examples">
<a href="Belt.Debug.html"><code class="code">Belt.Debug</code></a>
<p>

Utilities for set up debugging<br>

</div>

</div>

<hr width="100%">

<pre><span id="VALsetupChromeDebugger"><span class="keyword">val</span> setupChromeDebugger</span> : <code class="type">unit -> unit</code></pre></body></html>
65 changes: 33 additions & 32 deletions docs/api/Belt.HashMap.html
Original file line number Diff line number Diff line change
@@ -5,13 +5,14 @@
<link rel="stylesheet" href="../api_static/style.css" type="text/css">
<script src="../api_static//highlight.pack.js"></script>
<script src="../api_static//script.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>hljs.initHighlightingOnLoad();</script>
<meta charset="utf8">
<link rel="previous" href="Belt.HashSet.html"><link rel="next" href="Belt.Option.html">
<title> Belt.HashMap </title></head>
<title> Belt.HashMap </title></head>
<body>
<nav class="module-index"><ul><li><a href="Belt.html">Belt</a></li>
<li><a href="Belt_Array.html">Belt_Array</a></li>
<li><a href="Belt_Debug.html">Belt_Debug</a></li>
<li><a href="Belt_HashMap.html">Belt_HashMap</a></li>
<li><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></li>
<li><a href="Belt_HashMapString.html">Belt_HashMapString</a></li>
@@ -34,6 +35,7 @@
<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_Result.html">Belt_Result</a></li>
<li><a href="Belt_Set.html">Belt_Set</a></li>
<li><a href="Belt_SetDict.html">Belt_SetDict</a></li>
<li><a href="Belt_SetInt.html">Belt_SetInt</a></li>
@@ -108,38 +110,38 @@ <h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>

It also has two specialized inner modules
<code class="code">Belt.HashMap.Int</code> and <code class="code">Belt.HashMap.String</code><br>

</div>

</div>

<hr width="100%">

<pre><span class="keyword">module</span> <a href="Belt_HashMap.Int.html">Int</a>: <code class="type"><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></code></pre> <div class="info">
<pre><span class="keyword">module</span> <a href="Belt_HashMap.Int.html">Int</a>: <code class="type"><a href="Belt_HashMapInt.html">Belt_HashMapInt</a></code></pre> <div class="info">
<div class="not-examples">
Specalized when key type is <code class="code">int</code>, more efficient
than the generic type<br>

</div>

</div>
<pre><span class="keyword">module</span> <a href="Belt_HashMap.String.html">String</a>: <code class="type"><a href="Belt_HashMapString.html">Belt_HashMapString</a></code></pre> <div class="info">
</div>
<pre><span class="keyword">module</span> <a href="Belt_HashMap.String.html">String</a>: <code class="type"><a href="Belt_HashMapString.html">Belt_HashMapString</a></code></pre> <div class="info">
<div class="not-examples">
Specalized when key type is <code class="code">string</code>, more efficient
than the generic type<br>

</div>
</div> <div class="type-declaration">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">('key, 'value, 'id)</code> t</span> </pre>
</div>
<div class="info ">
<div class="not-examples">
The type of hash tables from type <code class="code">'key</code> to type <code class="code">'value</code>.<br>

</div>

</div>


<div class="type-declaration">
<pre><span id="TYPEid"><span class="keyword">type</span> <code class="type">('a, 'id)</code> id</span> = <code class="type">('a, 'id) <a href="Belt_Id.html#TYPEhashable">Belt_Id.hashable</a></code> </pre>
</div>
@@ -149,48 +151,48 @@ <h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>
<pre><span id="VALclear"><span class="keyword">val</span> clear</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> unit</code></pre><div class="info ">
<div class="not-examples">
Empty a hash table.<br>

</div>

</div>


<pre><span id="VALisEmpty"><span class="keyword">val</span> isEmpty</span> : <code class="type">('a, 'b, 'c) <a href="Belt_HashMap.html#TYPEt">t</a> -> bool</code></pre>
<pre><span id="VALset"><span class="keyword">val</span> set</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> 'key -> 'value -> unit</code></pre><div class="info ">
<div class="not-examples">
<code class="code">set tbl k v</code> if <code class="code">k</code> does not exist,
add the binding <code class="code">k,v</code>, otherwise, update the old value with the new
<code class="code">v</code><br>

</div>

</div>


<pre><span id="VALcopy"><span class="keyword">val</span> copy</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> ('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a></code></pre>
<pre><span id="VALget"><span class="keyword">val</span> get</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> 'key -> 'value option</code></pre>
<pre><span id="VALhas"><span class="keyword">val</span> has</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> 'key -> bool</code></pre><div class="info ">
<div class="not-examples">
<code class="code">has tbl x</code> checks if <code class="code">x</code> is bound in <code class="code">tbl</code>.<br>

</div>

</div>


<pre><span id="VALremove"><span class="keyword">val</span> remove</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> 'key -> unit</code></pre>
<pre><span id="VALforEachU"><span class="keyword">val</span> forEachU</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> ('key -> 'value -> unit [@bs]) -> unit</code></pre>
<pre><span id="VALforEach"><span class="keyword">val</span> forEach</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -> ('key -> 'value -> unit) -> unit</code></pre><div class="info ">
<div class="not-examples">
<code class="code">forEach tbl f</code> applies <code class="code">f</code> to all bindings in table <code class="code">tbl</code>.
<code class="code">f</code> receives the key as first argument, and the associated value
as second argument. Each binding is presented exactly once to <code class="code">f</code>.<br>

</div>

</div>


<pre><span id="VALreduceU"><span class="keyword">val</span> reduceU</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -><br> 'c -> ('c -> 'key -> 'value -> 'c [@bs]) -> 'c</code></pre>
<pre><span id="VALreduce"><span class="keyword">val</span> reduce</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -><br> 'c -> ('c -> 'key -> 'value -> 'c) -> 'c</code></pre><div class="info ">
<div class="not-examples">
@@ -205,29 +207,28 @@ <h1>Module <a href="type_Belt.HashMap.html">Belt.HashMap</a></h1>
However, if the table contains several bindings for the same key,
they are passed to <code class="code">f</code> in reverse order of introduction, that is,
the most recent binding is passed first.<br>

</div>

</div>


<pre><span id="VALkeepMapInPlaceU"><span class="keyword">val</span> keepMapInPlaceU</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -><br> ('key -> 'value -> 'value option [@bs]) -> unit</code></pre>
<pre><span id="VALkeepMapInPlace"><span class="keyword">val</span> keepMapInPlace</span> : <code class="type">('key, 'value, 'id) <a href="Belt_HashMap.html#TYPEt">t</a> -><br> ('key -> 'value -> 'value option) -> unit</code></pre>
<pre><span id="VALsize"><span class="keyword">val</span> size</span> : <code class="type">('a, 'b, 'c) <a href="Belt_HashMap.html#TYPEt">t</a> -> int</code></pre><div class="info ">
<div class="not-examples">
<code class="code">size tbl</code> returns the number of bindings in <code class="code">tbl</code>.
It takes constant time.<br>

</div>

</div>


<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="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>
<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>
<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>
Loading