Skip to content

Commit e4ea9c4

Browse files
authored
Merge pull request #688 from bloomberg/fix_docs
docs fix
2 parents b6f6ef3 + 13f9896 commit e4ea9c4

File tree

2 files changed

+20
-31
lines changed

2 files changed

+20
-31
lines changed

docs/Manual.html

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -600,11 +600,7 @@ <h1><a href="https://github.com/bloomberg/bucklescript">BuckleScript</a> User Ma
600600
<li><a href="#_physical_in_equality">Physical (in)equality</a></li>
601601
<li><a href="#_string_char_range">String char range</a></li>
602602
<li><a href="#_weak_map">Weak map</a></li>
603-
<li><a href="#_integers">Integers</a>
604-
<ul class="sectlevel3">
605-
<li><a href="#__code_int_code"><code>int</code></a></li>
606-
</ul>
607-
</li>
603+
<li><a href="#_integers">Integers</a></li>
608604
<li><a href="#_printf_printf">Printf.printf</a></li>
609605
<li><a href="#_hashtbl_hash_algorithm">Hashtbl hash algorithm</a></li>
610606
<li><a href="#_marshall">Marshall</a></li>
@@ -3141,17 +3137,11 @@ <h3 id="_weak_map"><a class="anchor" href="#_weak_map"></a>Weak map</h3>
31413137
<div class="sect2">
31423138
<h3 id="_integers"><a class="anchor" href="#_integers"></a>Integers</h3>
31433139
<div class="paragraph">
3144-
<p>OCaml has <code>int</code>, <code>int32</code>, <code>nativeint</code> and <code>int64</code> types. Both <code>int32</code>
3145-
and <code>int64</code> have the exact same semantic.</p>
3146-
</div>
3147-
<div class="sect3">
3148-
<h4 id="__code_int_code"><a class="anchor" href="#__code_int_code"></a><code>int</code></h4>
3149-
<div class="paragraph">
3150-
<p><code>int</code> in BuckleScript is the same as <code>int32</code> where it&#8217;s platform
3151-
dependent.
3152-
<mark>#</mark># <code>nativeint</code>
3153-
Treated as JavaScript float, except for division. For example,
3154-
<code>Nativeint.div a b</code> will be translated into <code>a /b | 0</code>.</p>
3140+
<p>OCaml has <code>int</code>, <code>int32</code>, <code>nativeint</code> and <code>int64</code> types.
3141+
- Both <code>int32</code> and <code>int64</code> in BuckleScript have the exact same semantics as OCaml.
3142+
- <code>int</code> in BuckleScript is the same as <code>int32</code> while in OCaml it&#8217;s platform dependent.
3143+
- <code>nativeint</code> is treated as JavaScript float, except for division.
3144+
For example, <code>Nativeint.div a b</code> will be translated into <code>a /b | 0</code>.</p>
31553145
</div>
31563146
<div class="admonitionblock warning">
31573147
<table>
@@ -3160,16 +3150,17 @@ <h4 id="__code_int_code"><a class="anchor" href="#__code_int_code"></a><code>int
31603150
<div class="title">Warning</div>
31613151
</td>
31623152
<td class="content">
3163-
<code>Nativeint.shift_right_logical x 0</code> is different from
3153+
<div class="paragraph">
3154+
<p><code>Nativeint.shift_right_logical x 0</code> is different from
31643155
<code>Int32.shift_right_local x 0</code>. The former is literally translated into
31653156
<code>x &gt;&gt;&gt; 0</code> (translated into an unsigned int), while the latter is
3166-
<code>x | 0</code>.
3157+
<code>x | 0</code>.</p>
3158+
</div>
31673159
</td>
31683160
</tr>
31693161
</table>
31703162
</div>
31713163
</div>
3172-
</div>
31733164
<div class="sect2">
31743165
<h3 id="_printf_printf"><a class="anchor" href="#_printf_printf"></a>Printf.printf</h3>
31753166
<div class="paragraph">

site/docsource/Semantic-differences-from-other-backends.adoc

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,19 @@ replaced by a strict pointer.
3535

3636
### Integers
3737

38-
OCaml has `int`, `int32`, `nativeint` and `int64` types. Both `int32`
39-
and `int64` have the exact same semantic.
40-
41-
#### `int`
42-
`int` in BuckleScript is the same as `int32` where it's platform
43-
dependent.
44-
#### `nativeint`
45-
Treated as JavaScript float, except for division. For example,
46-
`Nativeint.div a b` will be translated into `a /b | 0`.
47-
48-
WARNING: `Nativeint.shift_right_logical x 0` is different from
38+
OCaml has `int`, `int32`, `nativeint` and `int64` types.
39+
- Both `int32` and `int64` in BuckleScript have the exact same semantics as OCaml.
40+
- `int` in BuckleScript is the same as `int32` while in OCaml it's platform dependent.
41+
- `nativeint` is treated as JavaScript float, except for division.
42+
For example, `Nativeint.div a b` will be translated into `a /b | 0`.
43+
44+
[WARNING]
45+
=======
46+
`Nativeint.shift_right_logical x 0` is different from
4947
`Int32.shift_right_local x 0`. The former is literally translated into
5048
`x >>> 0` (translated into an unsigned int), while the latter is
5149
`x | 0`.
52-
50+
=======
5351

5452
### Printf.printf
5553

0 commit comments

Comments
 (0)