@grain/stdlib 0.7.0 → 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.
- package/CHANGELOG.md +10 -0
- package/array.md +491 -491
- package/bigint.md +198 -198
- package/buffer.gr +66 -1
- package/buffer.md +395 -272
- package/bytes.gr +1 -0
- package/bytes.md +200 -199
- package/char.md +125 -125
- package/exception.md +9 -9
- package/float32.md +195 -195
- package/float64.md +195 -195
- package/fs.md +115 -115
- package/hash.md +16 -16
- package/int16.md +155 -155
- package/int32.gr +1 -1
- package/int32.md +207 -207
- package/int64.gr +1 -1
- package/int64.md +207 -207
- package/int8.md +155 -155
- package/json.md +59 -59
- package/list.md +347 -347
- package/map.md +222 -222
- package/marshal.md +12 -12
- package/number.gr +119 -5
- package/number.md +503 -261
- package/option.md +141 -141
- package/package.json +1 -1
- package/path.md +90 -90
- package/pervasives.md +238 -238
- package/priorityqueue.md +112 -112
- package/queue.md +117 -117
- package/random.md +37 -37
- package/range.md +36 -36
- package/rational.md +107 -107
- package/regex.md +91 -91
- package/result.md +102 -102
- package/runtime/atof/decimal.md +6 -6
- package/runtime/compare.md +7 -7
- package/runtime/dataStructures.md +178 -178
- package/runtime/equal.md +7 -7
- package/runtime/exception.md +15 -15
- package/runtime/malloc.md +9 -9
- package/runtime/numbers.md +269 -269
- package/runtime/string.md +17 -17
- package/runtime/unsafe/conv.md +6 -6
- package/runtime/unsafe/memory.md +10 -10
- package/runtime/utf8.md +31 -31
- package/runtime/wasi.md +9 -9
- package/set.md +211 -211
- package/stack.md +122 -122
- package/string.md +228 -228
- package/uint16.md +148 -148
- package/uint32.md +192 -192
- package/uint64.md +192 -192
- package/uint8.md +148 -148
- package/uri.md +77 -77
- package/wasi/file.md +269 -269
- package/wasi/process.md +21 -21
- package/wasi/random.md +9 -9
- package/wasi/time.md +12 -12
package/runtime/exception.md
CHANGED
|
@@ -22,9 +22,9 @@ registered, the base printer is used to convert an exception to a string.
|
|
|
22
22
|
|
|
23
23
|
Parameters:
|
|
24
24
|
|
|
25
|
-
|param|type|description|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
| param | type | description |
|
|
26
|
+
| --------- | --------------------- | -------------------------------------- |
|
|
27
|
+
| `printer` | `Exception => String` | The base exception printer to register |
|
|
28
28
|
|
|
29
29
|
### Exception.**registerPrinter**
|
|
30
30
|
|
|
@@ -44,9 +44,9 @@ used as the exception's string value.
|
|
|
44
44
|
|
|
45
45
|
Parameters:
|
|
46
46
|
|
|
47
|
-
|param|type|description|
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
| param | type | description |
|
|
48
|
+
| --------- | ----------------------------- | --------------------------------- |
|
|
49
|
+
| `printer` | `Exception => Option<String>` | The exception printer to register |
|
|
50
50
|
|
|
51
51
|
### Exception.**toString**
|
|
52
52
|
|
|
@@ -63,15 +63,15 @@ Gets the string representation of the given exception.
|
|
|
63
63
|
|
|
64
64
|
Parameters:
|
|
65
65
|
|
|
66
|
-
|param|type|description|
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
| param | type | description |
|
|
67
|
+
| ----- | ----------- | -------------------------- |
|
|
68
|
+
| `e` | `Exception` | The exception to stringify |
|
|
69
69
|
|
|
70
70
|
Returns:
|
|
71
71
|
|
|
72
|
-
|type|description|
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
| type | description |
|
|
73
|
+
| -------- | ------------------------------------------ |
|
|
74
|
+
| `String` | The string representation of the exception |
|
|
75
75
|
|
|
76
76
|
### Exception.**panicWithException**
|
|
77
77
|
|
|
@@ -83,7 +83,7 @@ Throws an uncatchable exception and traps.
|
|
|
83
83
|
|
|
84
84
|
Parameters:
|
|
85
85
|
|
|
86
|
-
|param|type|description|
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
| param | type | description |
|
|
87
|
+
| ----- | ----------- | ---------------------- |
|
|
88
|
+
| `e` | `Exception` | The exception to throw |
|
|
89
89
|
|
package/runtime/malloc.md
CHANGED
|
@@ -22,9 +22,9 @@ Frees the given allocated pointer.
|
|
|
22
22
|
|
|
23
23
|
Parameters:
|
|
24
24
|
|
|
25
|
-
|param|type|description|
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
| param | type | description |
|
|
26
|
+
| ----- | --------- | ------------------- |
|
|
27
|
+
| `ap` | `WasmI32` | The pointer to free |
|
|
28
28
|
|
|
29
29
|
### Malloc.**malloc**
|
|
30
30
|
|
|
@@ -36,15 +36,15 @@ Allocates the requested number of bytes, returning a pointer.
|
|
|
36
36
|
|
|
37
37
|
Parameters:
|
|
38
38
|
|
|
39
|
-
|param|type|description|
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
| param | type | description |
|
|
40
|
+
| -------- | --------- | ------------------------------- |
|
|
41
|
+
| `nbytes` | `WasmI32` | The number of bytes to allocate |
|
|
42
42
|
|
|
43
43
|
Returns:
|
|
44
44
|
|
|
45
|
-
|type|description|
|
|
46
|
-
|
|
47
|
-
|
|
45
|
+
| type | description |
|
|
46
|
+
| --------- | ----------------------------------------------------------------------------------- |
|
|
47
|
+
| `WasmI32` | The pointer to the allocated region (8-byte aligned) or -1 if the allocation failed |
|
|
48
48
|
|
|
49
49
|
### Malloc.**leakAll**
|
|
50
50
|
|