@grain/stdlib 0.6.6 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -2
  4. package/array.gr +55 -7
  5. package/array.md +606 -560
  6. package/bigint.md +228 -228
  7. package/buffer.gr +85 -53
  8. package/buffer.md +442 -319
  9. package/bytes.gr +112 -35
  10. package/bytes.md +299 -219
  11. package/char.gr +201 -99
  12. package/char.md +447 -120
  13. package/exception.gr +11 -11
  14. package/exception.md +29 -4
  15. package/float32.gr +327 -3
  16. package/float32.md +698 -111
  17. package/float64.gr +320 -3
  18. package/float64.md +698 -111
  19. package/fs.gr +1082 -0
  20. package/fs.md +630 -0
  21. package/hash.gr +142 -88
  22. package/hash.md +105 -17
  23. package/int16.md +178 -178
  24. package/int32.gr +26 -5
  25. package/int32.md +266 -231
  26. package/int64.gr +27 -2
  27. package/int64.md +266 -231
  28. package/int8.md +178 -178
  29. package/json.gr +366 -51
  30. package/json.md +431 -15
  31. package/list.gr +328 -31
  32. package/list.md +759 -336
  33. package/map.gr +20 -12
  34. package/map.md +266 -260
  35. package/marshal.gr +41 -40
  36. package/marshal.md +14 -14
  37. package/number.gr +278 -35
  38. package/number.md +688 -269
  39. package/option.md +162 -162
  40. package/package.json +5 -3
  41. package/path.gr +48 -0
  42. package/path.md +180 -89
  43. package/pervasives.gr +2 -2
  44. package/pervasives.md +275 -275
  45. package/priorityqueue.gr +7 -7
  46. package/priorityqueue.md +131 -131
  47. package/queue.gr +183 -29
  48. package/queue.md +404 -148
  49. package/random.md +43 -43
  50. package/range.gr +4 -4
  51. package/range.md +42 -42
  52. package/rational.md +123 -123
  53. package/regex.gr +52 -51
  54. package/regex.md +102 -102
  55. package/result.md +118 -118
  56. package/runtime/atof/common.md +39 -39
  57. package/runtime/atof/decimal.gr +6 -6
  58. package/runtime/atof/decimal.md +14 -14
  59. package/runtime/atof/lemire.gr +5 -5
  60. package/runtime/atof/lemire.md +1 -1
  61. package/runtime/atof/parse.gr +16 -16
  62. package/runtime/atof/parse.md +2 -2
  63. package/runtime/atof/slow.md +1 -1
  64. package/runtime/atof/table.md +2 -2
  65. package/runtime/atoi/parse.gr +3 -3
  66. package/runtime/atoi/parse.md +1 -1
  67. package/runtime/bigint.gr +15 -47
  68. package/runtime/bigint.md +54 -60
  69. package/runtime/compare.gr +2 -2
  70. package/runtime/compare.md +8 -8
  71. package/runtime/dataStructures.md +211 -211
  72. package/runtime/debugPrint.gr +4 -1
  73. package/runtime/debugPrint.md +9 -9
  74. package/runtime/equal.gr +99 -77
  75. package/runtime/equal.md +8 -8
  76. package/runtime/exception.gr +62 -82
  77. package/runtime/exception.md +62 -11
  78. package/runtime/gc.gr +39 -45
  79. package/runtime/gc.md +4 -4
  80. package/runtime/malloc.gr +7 -7
  81. package/runtime/malloc.md +13 -13
  82. package/runtime/math/kernel/cos.gr +70 -0
  83. package/runtime/math/kernel/cos.md +14 -0
  84. package/runtime/math/kernel/sin.gr +65 -0
  85. package/runtime/math/kernel/sin.md +14 -0
  86. package/runtime/math/kernel/tan.gr +136 -0
  87. package/runtime/math/kernel/tan.md +14 -0
  88. package/runtime/math/rempio2.gr +244 -0
  89. package/runtime/math/rempio2.md +14 -0
  90. package/runtime/math/trig.gr +130 -0
  91. package/runtime/math/trig.md +28 -0
  92. package/runtime/math/umuldi.gr +26 -0
  93. package/runtime/math/umuldi.md +14 -0
  94. package/runtime/numberUtils.gr +29 -29
  95. package/runtime/numberUtils.md +12 -12
  96. package/runtime/numbers.gr +373 -381
  97. package/runtime/numbers.md +348 -342
  98. package/runtime/string.gr +37 -105
  99. package/runtime/string.md +20 -26
  100. package/runtime/unsafe/constants.md +24 -24
  101. package/runtime/unsafe/conv.md +19 -19
  102. package/runtime/unsafe/memory.gr +24 -20
  103. package/runtime/unsafe/memory.md +27 -7
  104. package/runtime/unsafe/offsets.gr +36 -0
  105. package/runtime/unsafe/offsets.md +88 -0
  106. package/runtime/unsafe/panic.gr +28 -0
  107. package/runtime/unsafe/panic.md +14 -0
  108. package/runtime/unsafe/tags.md +32 -32
  109. package/runtime/unsafe/wasmf32.md +28 -28
  110. package/runtime/unsafe/wasmf64.md +28 -28
  111. package/runtime/unsafe/wasmi32.md +47 -47
  112. package/runtime/unsafe/wasmi64.md +50 -50
  113. package/runtime/utf8.gr +189 -0
  114. package/runtime/utf8.md +117 -0
  115. package/runtime/wasi.gr +4 -2
  116. package/runtime/wasi.md +147 -147
  117. package/set.gr +18 -11
  118. package/set.md +253 -247
  119. package/stack.gr +171 -2
  120. package/stack.md +371 -89
  121. package/string.gr +352 -557
  122. package/string.md +298 -255
  123. package/uint16.md +170 -170
  124. package/uint32.gr +25 -4
  125. package/uint32.md +249 -214
  126. package/uint64.gr +25 -5
  127. package/uint64.md +249 -214
  128. package/uint8.md +170 -170
  129. package/uri.gr +57 -53
  130. package/uri.md +88 -89
  131. package/wasi/file.gr +67 -59
  132. package/wasi/file.md +308 -308
  133. package/wasi/process.md +26 -26
  134. package/wasi/random.md +12 -12
  135. package/wasi/time.md +16 -16
  136. package/runtime/utils/printing.gr +0 -60
  137. package/runtime/utils/printing.md +0 -26
@@ -9,619 +9,619 @@ Functions and constants included in the DataStructures module.
9
9
  ### DataStructures.**allocateArray**
10
10
 
11
11
  ```grain
12
- allocateArray : (size: WasmI32) => WasmI32
12
+ allocateArray: (size: WasmI32) => WasmI32
13
13
  ```
14
14
 
15
15
  Allocates a new Grain array.
16
16
 
17
17
  Parameters:
18
18
 
19
- |param|type|description|
20
- |-----|----|-----------|
21
- |`size`|`WasmI32`|The number of elements to be contained in this array|
19
+ | param | type | description |
20
+ | ------ | --------- | ---------------------------------------------------- |
21
+ | `size` | `WasmI32` | The number of elements to be contained in this array |
22
22
 
23
23
  Returns:
24
24
 
25
- |type|description|
26
- |----|-----------|
27
- |`WasmI32`|The pointer to the array|
25
+ | type | description |
26
+ | --------- | ------------------------ |
27
+ | `WasmI32` | The pointer to the array |
28
28
 
29
29
  ### DataStructures.**allocateTuple**
30
30
 
31
31
  ```grain
32
- allocateTuple : (size: WasmI32) => WasmI32
32
+ allocateTuple: (size: WasmI32) => WasmI32
33
33
  ```
34
34
 
35
35
  Allocates a new Grain tuple.
36
36
 
37
37
  Parameters:
38
38
 
39
- |param|type|description|
40
- |-----|----|-----------|
41
- |`size`|`WasmI32`|The number of elements to be contained in this tuple|
39
+ | param | type | description |
40
+ | ------ | --------- | ---------------------------------------------------- |
41
+ | `size` | `WasmI32` | The number of elements to be contained in this tuple |
42
42
 
43
43
  Returns:
44
44
 
45
- |type|description|
46
- |----|-----------|
47
- |`WasmI32`|The pointer to the tuple|
45
+ | type | description |
46
+ | --------- | ------------------------ |
47
+ | `WasmI32` | The pointer to the tuple |
48
48
 
49
49
  ### DataStructures.**allocateBytes**
50
50
 
51
51
  ```grain
52
- allocateBytes : (size: WasmI32) => WasmI32
52
+ allocateBytes: (size: WasmI32) => WasmI32
53
53
  ```
54
54
 
55
55
  Allocates a new Grain bytes.
56
56
 
57
57
  Parameters:
58
58
 
59
- |param|type|description|
60
- |-----|----|-----------|
61
- |`size`|`WasmI32`|The number of bytes to be contained in this buffer|
59
+ | param | type | description |
60
+ | ------ | --------- | -------------------------------------------------- |
61
+ | `size` | `WasmI32` | The number of bytes to be contained in this buffer |
62
62
 
63
63
  Returns:
64
64
 
65
- |type|description|
66
- |----|-----------|
67
- |`WasmI32`|The pointer to the bytes|
65
+ | type | description |
66
+ | --------- | ------------------------ |
67
+ | `WasmI32` | The pointer to the bytes |
68
68
 
69
69
  ### DataStructures.**allocateString**
70
70
 
71
71
  ```grain
72
- allocateString : (size: WasmI32) => WasmI32
72
+ allocateString: (size: WasmI32) => WasmI32
73
73
  ```
74
74
 
75
75
  Allocates a new Grain string.
76
76
 
77
77
  Parameters:
78
78
 
79
- |param|type|description|
80
- |-----|----|-----------|
81
- |`size`|`WasmI32`|The size (in bytes) of the string to allocate|
79
+ | param | type | description |
80
+ | ------ | --------- | --------------------------------------------- |
81
+ | `size` | `WasmI32` | The size (in bytes) of the string to allocate |
82
82
 
83
83
  Returns:
84
84
 
85
- |type|description|
86
- |----|-----------|
87
- |`WasmI32`|The pointer to the string|
85
+ | type | description |
86
+ | --------- | ------------------------- |
87
+ | `WasmI32` | The pointer to the string |
88
88
 
89
89
  ### DataStructures.**allocateInt32**
90
90
 
91
91
  ```grain
92
- allocateInt32 : () => WasmI32
92
+ allocateInt32: () => WasmI32
93
93
  ```
94
94
 
95
95
  Allocates a new Int32.
96
96
 
97
97
  Returns:
98
98
 
99
- |type|description|
100
- |----|-----------|
101
- |`WasmI32`|The pointer to the empty Int32|
99
+ | type | description |
100
+ | --------- | ------------------------------ |
101
+ | `WasmI32` | The pointer to the empty Int32 |
102
102
 
103
103
  ### DataStructures.**newInt32**
104
104
 
105
105
  ```grain
106
- newInt32 : (int: WasmI32) => WasmI32
106
+ newInt32: (int: WasmI32) => WasmI32
107
107
  ```
108
108
 
109
109
  Allocates a new Int32 with a prepopulated value
110
110
 
111
111
  Parameters:
112
112
 
113
- |param|type|description|
114
- |-----|----|-----------|
115
- |`int`|`WasmI32`|The value to store|
113
+ | param | type | description |
114
+ | ----- | --------- | ------------------ |
115
+ | `int` | `WasmI32` | The value to store |
116
116
 
117
117
  Returns:
118
118
 
119
- |type|description|
120
- |----|-----------|
121
- |`WasmI32`|The pointer to the Int32|
119
+ | type | description |
120
+ | --------- | ------------------------ |
121
+ | `WasmI32` | The pointer to the Int32 |
122
122
 
123
123
  ### DataStructures.**allocateUint32**
124
124
 
125
125
  ```grain
126
- allocateUint32 : () => WasmI32
126
+ allocateUint32: () => WasmI32
127
127
  ```
128
128
 
129
129
  Allocates a new Uint32.
130
130
 
131
131
  Returns:
132
132
 
133
- |type|description|
134
- |----|-----------|
135
- |`WasmI32`|The pointer to the empty Uint32|
133
+ | type | description |
134
+ | --------- | ------------------------------- |
135
+ | `WasmI32` | The pointer to the empty Uint32 |
136
136
 
137
137
  ### DataStructures.**newUint32**
138
138
 
139
139
  ```grain
140
- newUint32 : (int: WasmI32) => WasmI32
140
+ newUint32: (int: WasmI32) => WasmI32
141
141
  ```
142
142
 
143
143
  Allocates a new Uint32 with a prepopulated value
144
144
 
145
145
  Parameters:
146
146
 
147
- |param|type|description|
148
- |-----|----|-----------|
149
- |`int`|`WasmI32`|The value to store|
147
+ | param | type | description |
148
+ | ----- | --------- | ------------------ |
149
+ | `int` | `WasmI32` | The value to store |
150
150
 
151
151
  Returns:
152
152
 
153
- |type|description|
154
- |----|-----------|
155
- |`WasmI32`|The pointer to the Uint32|
153
+ | type | description |
154
+ | --------- | ------------------------- |
155
+ | `WasmI32` | The pointer to the Uint32 |
156
156
 
157
157
  ### DataStructures.**allocateInt64**
158
158
 
159
159
  ```grain
160
- allocateInt64 : () => WasmI32
160
+ allocateInt64: () => WasmI32
161
161
  ```
162
162
 
163
163
  Allocates a new Int64.
164
164
 
165
165
  Returns:
166
166
 
167
- |type|description|
168
- |----|-----------|
169
- |`WasmI32`|The pointer to the empty Int64|
167
+ | type | description |
168
+ | --------- | ------------------------------ |
169
+ | `WasmI32` | The pointer to the empty Int64 |
170
170
 
171
171
  ### DataStructures.**newInt64**
172
172
 
173
173
  ```grain
174
- newInt64 : (int: WasmI64) => WasmI32
174
+ newInt64: (int: WasmI64) => WasmI32
175
175
  ```
176
176
 
177
177
  Allocates a new Int64 with a prepopulated value
178
178
 
179
179
  Parameters:
180
180
 
181
- |param|type|description|
182
- |-----|----|-----------|
183
- |`int`|`WasmI64`|The value to store|
181
+ | param | type | description |
182
+ | ----- | --------- | ------------------ |
183
+ | `int` | `WasmI64` | The value to store |
184
184
 
185
185
  Returns:
186
186
 
187
- |type|description|
188
- |----|-----------|
189
- |`WasmI32`|The pointer to the Int64|
187
+ | type | description |
188
+ | --------- | ------------------------ |
189
+ | `WasmI32` | The pointer to the Int64 |
190
190
 
191
191
  ### DataStructures.**allocateUint64**
192
192
 
193
193
  ```grain
194
- allocateUint64 : () => WasmI32
194
+ allocateUint64: () => WasmI32
195
195
  ```
196
196
 
197
197
  Allocates a new Uint64.
198
198
 
199
199
  Returns:
200
200
 
201
- |type|description|
202
- |----|-----------|
203
- |`WasmI32`|The pointer to the empty Uint64|
201
+ | type | description |
202
+ | --------- | ------------------------------- |
203
+ | `WasmI32` | The pointer to the empty Uint64 |
204
204
 
205
205
  ### DataStructures.**newUint64**
206
206
 
207
207
  ```grain
208
- newUint64 : (int: WasmI64) => WasmI32
208
+ newUint64: (int: WasmI64) => WasmI32
209
209
  ```
210
210
 
211
211
  Allocates a new Uint64 with a prepopulated value
212
212
 
213
213
  Parameters:
214
214
 
215
- |param|type|description|
216
- |-----|----|-----------|
217
- |`int`|`WasmI64`|The value to store|
215
+ | param | type | description |
216
+ | ----- | --------- | ------------------ |
217
+ | `int` | `WasmI64` | The value to store |
218
218
 
219
219
  Returns:
220
220
 
221
- |type|description|
222
- |----|-----------|
223
- |`WasmI32`|The pointer to the Uint64|
221
+ | type | description |
222
+ | --------- | ------------------------- |
223
+ | `WasmI32` | The pointer to the Uint64 |
224
224
 
225
225
  ### DataStructures.**allocateFloat32**
226
226
 
227
227
  ```grain
228
- allocateFloat32 : () => WasmI32
228
+ allocateFloat32: () => WasmI32
229
229
  ```
230
230
 
231
231
  Allocates a new Float32.
232
232
 
233
233
  Returns:
234
234
 
235
- |type|description|
236
- |----|-----------|
237
- |`WasmI32`|The pointer to the empty Float32|
235
+ | type | description |
236
+ | --------- | -------------------------------- |
237
+ | `WasmI32` | The pointer to the empty Float32 |
238
238
 
239
239
  ### DataStructures.**newFloat32**
240
240
 
241
241
  ```grain
242
- newFloat32 : (float: WasmF32) => WasmI32
242
+ newFloat32: (float: WasmF32) => WasmI32
243
243
  ```
244
244
 
245
245
  Allocates a new Float32 with a prepopulated value
246
246
 
247
247
  Parameters:
248
248
 
249
- |param|type|description|
250
- |-----|----|-----------|
251
- |`float`|`WasmF32`|The value to store|
249
+ | param | type | description |
250
+ | ------- | --------- | ------------------ |
251
+ | `float` | `WasmF32` | The value to store |
252
252
 
253
253
  Returns:
254
254
 
255
- |type|description|
256
- |----|-----------|
257
- |`WasmI32`|the pointer to the Float32|
255
+ | type | description |
256
+ | --------- | -------------------------- |
257
+ | `WasmI32` | the pointer to the Float32 |
258
258
 
259
259
  ### DataStructures.**allocateFloat64**
260
260
 
261
261
  ```grain
262
- allocateFloat64 : () => WasmI32
262
+ allocateFloat64: () => WasmI32
263
263
  ```
264
264
 
265
265
  Allocates a new Float64.
266
266
 
267
267
  Returns:
268
268
 
269
- |type|description|
270
- |----|-----------|
271
- |`WasmI32`|The pointer to the empty Float64|
269
+ | type | description |
270
+ | --------- | -------------------------------- |
271
+ | `WasmI32` | The pointer to the empty Float64 |
272
272
 
273
273
  ### DataStructures.**newFloat64**
274
274
 
275
275
  ```grain
276
- newFloat64 : (float: WasmF64) => WasmI32
276
+ newFloat64: (float: WasmF64) => WasmI32
277
277
  ```
278
278
 
279
279
  Allocates a new Float64 with a prepopulated value
280
280
 
281
281
  Parameters:
282
282
 
283
- |param|type|description|
284
- |-----|----|-----------|
285
- |`float`|`WasmF64`|The value to store|
283
+ | param | type | description |
284
+ | ------- | --------- | ------------------ |
285
+ | `float` | `WasmF64` | The value to store |
286
286
 
287
287
  Returns:
288
288
 
289
- |type|description|
290
- |----|-----------|
291
- |`WasmI32`|The pointer to the Float64|
289
+ | type | description |
290
+ | --------- | -------------------------- |
291
+ | `WasmI32` | The pointer to the Float64 |
292
292
 
293
293
  ### DataStructures.**allocateRational**
294
294
 
295
295
  ```grain
296
- allocateRational : () => WasmI32
296
+ allocateRational: () => WasmI32
297
297
  ```
298
298
 
299
299
  Allocates a new Rational.
300
300
 
301
301
  Returns:
302
302
 
303
- |type|description|
304
- |----|-----------|
305
- |`WasmI32`|The pointer to the empty Rational|
303
+ | type | description |
304
+ | --------- | --------------------------------- |
305
+ | `WasmI32` | The pointer to the empty Rational |
306
306
 
307
307
  ### DataStructures.**newRational**
308
308
 
309
309
  ```grain
310
- newRational : (numerator: WasmI32, denominator: WasmI32) => WasmI32
310
+ newRational: (numerator: WasmI32, denominator: WasmI32) => WasmI32
311
311
  ```
312
312
 
313
313
  Allocates a new Rational with a prepopulated value
314
314
 
315
315
  Parameters:
316
316
 
317
- |param|type|description|
318
- |-----|----|-----------|
319
- |`numerator`|`WasmI32`|The numerator value to store|
320
- |`denominator`|`WasmI32`|The denominator value to store|
317
+ | param | type | description |
318
+ | ------------- | --------- | ------------------------------ |
319
+ | `numerator` | `WasmI32` | The numerator value to store |
320
+ | `denominator` | `WasmI32` | The denominator value to store |
321
321
 
322
322
  Returns:
323
323
 
324
- |type|description|
325
- |----|-----------|
326
- |`WasmI32`|The pointer to the Rational|
324
+ | type | description |
325
+ | --------- | --------------------------- |
326
+ | `WasmI32` | The pointer to the Rational |
327
327
 
328
328
  ### DataStructures.**loadAdtVariant**
329
329
 
330
330
  ```grain
331
- loadAdtVariant : (ptr: WasmI32) => WasmI32
331
+ loadAdtVariant: (ptr: WasmI32) => WasmI32
332
332
  ```
333
333
 
334
334
  Load the (tagged) variant of an ADT.
335
335
 
336
336
  Parameters:
337
337
 
338
- |param|type|description|
339
- |-----|----|-----------|
340
- |`ptr`|`WasmI32`|Untagged pointer to the ADT|
338
+ | param | type | description |
339
+ | ----- | --------- | --------------------------- |
340
+ | `ptr` | `WasmI32` | Untagged pointer to the ADT |
341
341
 
342
342
  Returns:
343
343
 
344
- |type|description|
345
- |----|-----------|
346
- |`WasmI32`|The (tagged) ADT variant id|
344
+ | type | description |
345
+ | --------- | --------------------------- |
346
+ | `WasmI32` | The (tagged) ADT variant id |
347
347
 
348
348
  ### DataStructures.**stringSize**
349
349
 
350
350
  ```grain
351
- stringSize : (ptr: WasmI32) => WasmI32
351
+ stringSize: (ptr: WasmI32) => WasmI32
352
352
  ```
353
353
 
354
354
  Load an untagged string's size.
355
355
 
356
356
  Parameters:
357
357
 
358
- |param|type|description|
359
- |-----|----|-----------|
360
- |`ptr`|`WasmI32`|Untagged pointer to the string|
358
+ | param | type | description |
359
+ | ----- | --------- | ------------------------------ |
360
+ | `ptr` | `WasmI32` | Untagged pointer to the string |
361
361
 
362
362
  Returns:
363
363
 
364
- |type|description|
365
- |----|-----------|
366
- |`WasmI32`|The string size (in bytes)|
364
+ | type | description |
365
+ | --------- | -------------------------- |
366
+ | `WasmI32` | The string size (in bytes) |
367
367
 
368
368
  ### DataStructures.**bytesSize**
369
369
 
370
370
  ```grain
371
- bytesSize : (ptr: WasmI32) => WasmI32
371
+ bytesSize: (ptr: WasmI32) => WasmI32
372
372
  ```
373
373
 
374
374
  Load an untagged Bytes' size.
375
375
 
376
376
  Parameters:
377
377
 
378
- |param|type|description|
379
- |-----|----|-----------|
380
- |`ptr`|`WasmI32`|Untagged pointer to the Bytes|
378
+ | param | type | description |
379
+ | ----- | --------- | ----------------------------- |
380
+ | `ptr` | `WasmI32` | Untagged pointer to the Bytes |
381
381
 
382
382
  Returns:
383
383
 
384
- |type|description|
385
- |----|-----------|
386
- |`WasmI32`|The Bytes size (in bytes)|
384
+ | type | description |
385
+ | --------- | ------------------------- |
386
+ | `WasmI32` | The Bytes size (in bytes) |
387
387
 
388
388
  ### DataStructures.**tagSimpleNumber**
389
389
 
390
390
  ```grain
391
- tagSimpleNumber : (num: WasmI32) => Number
391
+ tagSimpleNumber: (num: WasmI32) => Number
392
392
  ```
393
393
 
394
394
  Tag a simple number.
395
395
 
396
396
  Parameters:
397
397
 
398
- |param|type|description|
399
- |-----|----|-----------|
400
- |`num`|`WasmI32`|The number to tag|
398
+ | param | type | description |
399
+ | ----- | --------- | ----------------- |
400
+ | `num` | `WasmI32` | The number to tag |
401
401
 
402
402
  Returns:
403
403
 
404
- |type|description|
405
- |----|-----------|
406
- |`Number`|The tagged number|
404
+ | type | description |
405
+ | -------- | ----------------- |
406
+ | `Number` | The tagged number |
407
407
 
408
408
  ### DataStructures.**untagSimpleNumber**
409
409
 
410
410
  ```grain
411
- untagSimpleNumber : (num: Number) => WasmI32
411
+ untagSimpleNumber: (num: Number) => WasmI32
412
412
  ```
413
413
 
414
414
  Untag a simple number.
415
415
 
416
416
  Parameters:
417
417
 
418
- |param|type|description|
419
- |-----|----|-----------|
420
- |`num`|`Number`|The number to untag|
418
+ | param | type | description |
419
+ | ----- | -------- | ------------------- |
420
+ | `num` | `Number` | The number to untag |
421
421
 
422
422
  Returns:
423
423
 
424
- |type|description|
425
- |----|-----------|
426
- |`WasmI32`|The untagged number|
424
+ | type | description |
425
+ | --------- | ------------------- |
426
+ | `WasmI32` | The untagged number |
427
427
 
428
428
  ### DataStructures.**tagChar**
429
429
 
430
430
  ```grain
431
- tagChar : (char: WasmI32) => Char
431
+ tagChar: (char: WasmI32) => Char
432
432
  ```
433
433
 
434
434
  Tag a char.
435
435
 
436
436
  Parameters:
437
437
 
438
- |param|type|description|
439
- |-----|----|-----------|
440
- |`char`|`WasmI32`|The usv to tag|
438
+ | param | type | description |
439
+ | ------ | --------- | -------------- |
440
+ | `char` | `WasmI32` | The usv to tag |
441
441
 
442
442
  Returns:
443
443
 
444
- |type|description|
445
- |----|-----------|
446
- |`Char`|The tagged char|
444
+ | type | description |
445
+ | ------ | --------------- |
446
+ | `Char` | The tagged char |
447
447
 
448
448
  ### DataStructures.**untagChar**
449
449
 
450
450
  ```grain
451
- untagChar : (char: Char) => WasmI32
451
+ untagChar: (char: Char) => WasmI32
452
452
  ```
453
453
 
454
454
  Untag a char.
455
455
 
456
456
  Parameters:
457
457
 
458
- |param|type|description|
459
- |-----|----|-----------|
460
- |`char`|`Char`|The char to untag|
458
+ | param | type | description |
459
+ | ------ | ------ | ----------------- |
460
+ | `char` | `Char` | The char to untag |
461
461
 
462
462
  Returns:
463
463
 
464
- |type|description|
465
- |----|-----------|
466
- |`WasmI32`|The untagged usv|
464
+ | type | description |
465
+ | --------- | ---------------- |
466
+ | `WasmI32` | The untagged usv |
467
467
 
468
468
  ### DataStructures.**tagInt8**
469
469
 
470
470
  ```grain
471
- tagInt8 : (int: WasmI32) => Int8
471
+ tagInt8: (int: WasmI32) => Int8
472
472
  ```
473
473
 
474
474
  Tag an int8.
475
475
 
476
476
  Parameters:
477
477
 
478
- |param|type|description|
479
- |-----|----|-----------|
480
- |`int`|`WasmI32`|The int8 to tag|
478
+ | param | type | description |
479
+ | ----- | --------- | --------------- |
480
+ | `int` | `WasmI32` | The int8 to tag |
481
481
 
482
482
  Returns:
483
483
 
484
- |type|description|
485
- |----|-----------|
486
- |`Int8`|The tagged int8|
484
+ | type | description |
485
+ | ------ | --------------- |
486
+ | `Int8` | The tagged int8 |
487
487
 
488
488
  ### DataStructures.**untagInt8**
489
489
 
490
490
  ```grain
491
- untagInt8 : (int: Int8) => WasmI32
491
+ untagInt8: (int: Int8) => WasmI32
492
492
  ```
493
493
 
494
494
  Untag an int8.
495
495
 
496
496
  Parameters:
497
497
 
498
- |param|type|description|
499
- |-----|----|-----------|
500
- |`int`|`Int8`|The int8 to untag|
498
+ | param | type | description |
499
+ | ----- | ------ | ----------------- |
500
+ | `int` | `Int8` | The int8 to untag |
501
501
 
502
502
  Returns:
503
503
 
504
- |type|description|
505
- |----|-----------|
506
- |`WasmI32`|The untagged int8|
504
+ | type | description |
505
+ | --------- | ----------------- |
506
+ | `WasmI32` | The untagged int8 |
507
507
 
508
508
  ### DataStructures.**tagInt16**
509
509
 
510
510
  ```grain
511
- tagInt16 : (int: WasmI32) => Int16
511
+ tagInt16: (int: WasmI32) => Int16
512
512
  ```
513
513
 
514
514
  Tag an int16.
515
515
 
516
516
  Parameters:
517
517
 
518
- |param|type|description|
519
- |-----|----|-----------|
520
- |`int`|`WasmI32`|The int16 to tag|
518
+ | param | type | description |
519
+ | ----- | --------- | ---------------- |
520
+ | `int` | `WasmI32` | The int16 to tag |
521
521
 
522
522
  Returns:
523
523
 
524
- |type|description|
525
- |----|-----------|
526
- |`Int16`|The tagged int16|
524
+ | type | description |
525
+ | ------- | ---------------- |
526
+ | `Int16` | The tagged int16 |
527
527
 
528
528
  ### DataStructures.**untagInt16**
529
529
 
530
530
  ```grain
531
- untagInt16 : (int: Int16) => WasmI32
531
+ untagInt16: (int: Int16) => WasmI32
532
532
  ```
533
533
 
534
534
  Untag an int16.
535
535
 
536
536
  Parameters:
537
537
 
538
- |param|type|description|
539
- |-----|----|-----------|
540
- |`int`|`Int16`|The int16 to untag|
538
+ | param | type | description |
539
+ | ----- | ------- | ------------------ |
540
+ | `int` | `Int16` | The int16 to untag |
541
541
 
542
542
  Returns:
543
543
 
544
- |type|description|
545
- |----|-----------|
546
- |`WasmI32`|The untagged int16|
544
+ | type | description |
545
+ | --------- | ------------------ |
546
+ | `WasmI32` | The untagged int16 |
547
547
 
548
548
  ### DataStructures.**tagUint8**
549
549
 
550
550
  ```grain
551
- tagUint8 : (int: WasmI32) => Uint8
551
+ tagUint8: (int: WasmI32) => Uint8
552
552
  ```
553
553
 
554
554
  Tag a uint8.
555
555
 
556
556
  Parameters:
557
557
 
558
- |param|type|description|
559
- |-----|----|-----------|
560
- |`int`|`WasmI32`|The uint8 to tag|
558
+ | param | type | description |
559
+ | ----- | --------- | ---------------- |
560
+ | `int` | `WasmI32` | The uint8 to tag |
561
561
 
562
562
  Returns:
563
563
 
564
- |type|description|
565
- |----|-----------|
566
- |`Uint8`|The tagged uint8|
564
+ | type | description |
565
+ | ------- | ---------------- |
566
+ | `Uint8` | The tagged uint8 |
567
567
 
568
568
  ### DataStructures.**untagUint8**
569
569
 
570
570
  ```grain
571
- untagUint8 : (int: Uint8) => WasmI32
571
+ untagUint8: (int: Uint8) => WasmI32
572
572
  ```
573
573
 
574
574
  Untag a uint8.
575
575
 
576
576
  Parameters:
577
577
 
578
- |param|type|description|
579
- |-----|----|-----------|
580
- |`int`|`Uint8`|The uint8 to untag|
578
+ | param | type | description |
579
+ | ----- | ------- | ------------------ |
580
+ | `int` | `Uint8` | The uint8 to untag |
581
581
 
582
582
  Returns:
583
583
 
584
- |type|description|
585
- |----|-----------|
586
- |`WasmI32`|The untagged uint8|
584
+ | type | description |
585
+ | --------- | ------------------ |
586
+ | `WasmI32` | The untagged uint8 |
587
587
 
588
588
  ### DataStructures.**tagUint16**
589
589
 
590
590
  ```grain
591
- tagUint16 : (int: WasmI32) => Uint16
591
+ tagUint16: (int: WasmI32) => Uint16
592
592
  ```
593
593
 
594
594
  Tag a uint16.
595
595
 
596
596
  Parameters:
597
597
 
598
- |param|type|description|
599
- |-----|----|-----------|
600
- |`int`|`WasmI32`|The uint16 to tag|
598
+ | param | type | description |
599
+ | ----- | --------- | ----------------- |
600
+ | `int` | `WasmI32` | The uint16 to tag |
601
601
 
602
602
  Returns:
603
603
 
604
- |type|description|
605
- |----|-----------|
606
- |`Uint16`|The tagged uint16|
604
+ | type | description |
605
+ | -------- | ----------------- |
606
+ | `Uint16` | The tagged uint16 |
607
607
 
608
608
  ### DataStructures.**untagUint16**
609
609
 
610
610
  ```grain
611
- untagUint16 : (int: Uint16) => WasmI32
611
+ untagUint16: (int: Uint16) => WasmI32
612
612
  ```
613
613
 
614
614
  Untag a uint16.
615
615
 
616
616
  Parameters:
617
617
 
618
- |param|type|description|
619
- |-----|----|-----------|
620
- |`int`|`Uint16`|The uint16 to untag|
618
+ | param | type | description |
619
+ | ----- | -------- | ------------------- |
620
+ | `int` | `Uint16` | The uint16 to untag |
621
621
 
622
622
  Returns:
623
623
 
624
- |type|description|
625
- |----|-----------|
626
- |`WasmI32`|The untagged uint16|
624
+ | type | description |
625
+ | --------- | ------------------- |
626
+ | `WasmI32` | The untagged uint16 |
627
627