@grain/stdlib 0.5.13 → 0.6.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 (155) hide show
  1. package/CHANGELOG.md +201 -0
  2. package/LICENSE +1 -1
  3. package/README.md +25 -2
  4. package/array.gr +1512 -199
  5. package/array.md +2032 -94
  6. package/bigint.gr +239 -140
  7. package/bigint.md +450 -106
  8. package/buffer.gr +595 -102
  9. package/buffer.md +903 -145
  10. package/bytes.gr +401 -110
  11. package/bytes.md +551 -63
  12. package/char.gr +228 -49
  13. package/char.md +373 -7
  14. package/exception.gr +26 -12
  15. package/exception.md +29 -5
  16. package/float32.gr +130 -109
  17. package/float32.md +185 -57
  18. package/float64.gr +112 -99
  19. package/float64.md +185 -57
  20. package/hash.gr +62 -40
  21. package/hash.md +27 -3
  22. package/int16.gr +430 -0
  23. package/int16.md +618 -0
  24. package/int32.gr +200 -269
  25. package/int32.md +254 -289
  26. package/int64.gr +142 -225
  27. package/int64.md +254 -289
  28. package/int8.gr +511 -0
  29. package/int8.md +786 -0
  30. package/json.gr +2071 -0
  31. package/json.md +646 -0
  32. package/list.gr +120 -68
  33. package/list.md +125 -80
  34. package/map.gr +560 -57
  35. package/map.md +672 -56
  36. package/marshal.gr +239 -227
  37. package/marshal.md +36 -4
  38. package/number.gr +626 -676
  39. package/number.md +738 -153
  40. package/option.gr +33 -35
  41. package/option.md +58 -42
  42. package/package.json +2 -2
  43. package/path.gr +148 -187
  44. package/path.md +47 -96
  45. package/pervasives.gr +75 -416
  46. package/pervasives.md +85 -180
  47. package/priorityqueue.gr +433 -74
  48. package/priorityqueue.md +422 -54
  49. package/queue.gr +362 -80
  50. package/queue.md +433 -38
  51. package/random.gr +67 -75
  52. package/random.md +68 -40
  53. package/range.gr +135 -63
  54. package/range.md +198 -43
  55. package/rational.gr +284 -0
  56. package/rational.md +545 -0
  57. package/regex.gr +933 -1066
  58. package/regex.md +59 -60
  59. package/result.gr +23 -25
  60. package/result.md +54 -39
  61. package/runtime/atof/common.gr +78 -82
  62. package/runtime/atof/common.md +22 -10
  63. package/runtime/atof/decimal.gr +102 -127
  64. package/runtime/atof/decimal.md +28 -7
  65. package/runtime/atof/lemire.gr +56 -71
  66. package/runtime/atof/lemire.md +9 -1
  67. package/runtime/atof/parse.gr +83 -110
  68. package/runtime/atof/parse.md +12 -2
  69. package/runtime/atof/slow.gr +28 -35
  70. package/runtime/atof/slow.md +9 -1
  71. package/runtime/atof/table.gr +19 -18
  72. package/runtime/atof/table.md +10 -2
  73. package/runtime/atoi/parse.gr +153 -136
  74. package/runtime/atoi/parse.md +50 -1
  75. package/runtime/bigint.gr +410 -517
  76. package/runtime/bigint.md +71 -57
  77. package/runtime/compare.gr +176 -85
  78. package/runtime/compare.md +31 -1
  79. package/runtime/dataStructures.gr +144 -32
  80. package/runtime/dataStructures.md +267 -31
  81. package/runtime/debugPrint.gr +34 -15
  82. package/runtime/debugPrint.md +37 -5
  83. package/runtime/equal.gr +53 -52
  84. package/runtime/equal.md +30 -1
  85. package/runtime/exception.gr +38 -47
  86. package/runtime/exception.md +10 -8
  87. package/runtime/gc.gr +23 -152
  88. package/runtime/gc.md +13 -17
  89. package/runtime/malloc.gr +31 -31
  90. package/runtime/malloc.md +11 -3
  91. package/runtime/numberUtils.gr +193 -174
  92. package/runtime/numberUtils.md +29 -9
  93. package/runtime/numbers.gr +1695 -1021
  94. package/runtime/numbers.md +1098 -134
  95. package/runtime/string.gr +543 -245
  96. package/runtime/string.md +76 -6
  97. package/runtime/unsafe/constants.gr +30 -13
  98. package/runtime/unsafe/constants.md +80 -0
  99. package/runtime/unsafe/conv.gr +55 -28
  100. package/runtime/unsafe/conv.md +41 -9
  101. package/runtime/unsafe/memory.gr +10 -30
  102. package/runtime/unsafe/memory.md +15 -19
  103. package/runtime/unsafe/tags.gr +37 -21
  104. package/runtime/unsafe/tags.md +88 -8
  105. package/runtime/unsafe/wasmf32.gr +30 -36
  106. package/runtime/unsafe/wasmf32.md +64 -56
  107. package/runtime/unsafe/wasmf64.gr +30 -36
  108. package/runtime/unsafe/wasmf64.md +64 -56
  109. package/runtime/unsafe/wasmi32.gr +49 -66
  110. package/runtime/unsafe/wasmi32.md +102 -94
  111. package/runtime/unsafe/wasmi64.gr +52 -79
  112. package/runtime/unsafe/wasmi64.md +108 -100
  113. package/runtime/utils/printing.gr +13 -15
  114. package/runtime/utils/printing.md +11 -3
  115. package/runtime/wasi.gr +294 -295
  116. package/runtime/wasi.md +62 -42
  117. package/set.gr +574 -64
  118. package/set.md +634 -54
  119. package/stack.gr +181 -64
  120. package/stack.md +271 -42
  121. package/string.gr +453 -533
  122. package/string.md +241 -151
  123. package/uint16.gr +369 -0
  124. package/uint16.md +585 -0
  125. package/uint32.gr +470 -0
  126. package/uint32.md +737 -0
  127. package/uint64.gr +471 -0
  128. package/uint64.md +737 -0
  129. package/uint8.gr +369 -0
  130. package/uint8.md +585 -0
  131. package/uri.gr +1093 -0
  132. package/uri.md +477 -0
  133. package/{sys → wasi}/file.gr +914 -500
  134. package/{sys → wasi}/file.md +454 -50
  135. package/wasi/process.gr +292 -0
  136. package/{sys → wasi}/process.md +164 -6
  137. package/wasi/random.gr +77 -0
  138. package/wasi/random.md +80 -0
  139. package/{sys → wasi}/time.gr +15 -22
  140. package/{sys → wasi}/time.md +5 -5
  141. package/immutablearray.gr +0 -929
  142. package/immutablearray.md +0 -1038
  143. package/immutablemap.gr +0 -493
  144. package/immutablemap.md +0 -479
  145. package/immutablepriorityqueue.gr +0 -360
  146. package/immutablepriorityqueue.md +0 -291
  147. package/immutableset.gr +0 -498
  148. package/immutableset.md +0 -449
  149. package/runtime/debug.gr +0 -2
  150. package/runtime/debug.md +0 -6
  151. package/runtime/unsafe/errors.gr +0 -36
  152. package/runtime/unsafe/errors.md +0 -204
  153. package/sys/process.gr +0 -254
  154. package/sys/random.gr +0 -79
  155. package/sys/random.md +0 -66
package/int8.md ADDED
@@ -0,0 +1,786 @@
1
+ ---
2
+ title: Int8
3
+ ---
4
+
5
+ Utilities for working with the Int8 type.
6
+
7
+ <details disabled>
8
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
9
+ No other changes yet.
10
+ </details>
11
+
12
+ ```grain
13
+ from "int8" include Int8
14
+ ```
15
+
16
+ ```grain
17
+ 1s
18
+ ```
19
+
20
+ ```grain
21
+ -1s
22
+ ```
23
+
24
+ ## Values
25
+
26
+ Functions and constants included in the Int8 module.
27
+
28
+ ### Int8.**fromNumber**
29
+
30
+ <details disabled>
31
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
32
+ No other changes yet.
33
+ </details>
34
+
35
+ ```grain
36
+ fromNumber : (number: Number) => Int8
37
+ ```
38
+
39
+ Converts a Number to an Int8.
40
+
41
+ Parameters:
42
+
43
+ |param|type|description|
44
+ |-----|----|-----------|
45
+ |`number`|`Number`|The value to convert|
46
+
47
+ Returns:
48
+
49
+ |type|description|
50
+ |----|-----------|
51
+ |`Int8`|The Number represented as an Int8|
52
+
53
+ ### Int8.**toNumber**
54
+
55
+ <details disabled>
56
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
57
+ No other changes yet.
58
+ </details>
59
+
60
+ ```grain
61
+ toNumber : (value: Int8) => Number
62
+ ```
63
+
64
+ Converts an Int8 to a Number.
65
+
66
+ Parameters:
67
+
68
+ |param|type|description|
69
+ |-----|----|-----------|
70
+ |`value`|`Int8`|The value to convert|
71
+
72
+ Returns:
73
+
74
+ |type|description|
75
+ |----|-----------|
76
+ |`Number`|The Int8 represented as a Number|
77
+
78
+ ### Int8.**fromUint8**
79
+
80
+ <details disabled>
81
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
82
+ No other changes yet.
83
+ </details>
84
+
85
+ ```grain
86
+ fromUint8 : (number: Uint8) => Int8
87
+ ```
88
+
89
+ Converts a Uint8 to an Int8.
90
+
91
+ Parameters:
92
+
93
+ |param|type|description|
94
+ |-----|----|-----------|
95
+ |`number`|`Uint8`|The value to convert|
96
+
97
+ Returns:
98
+
99
+ |type|description|
100
+ |----|-----------|
101
+ |`Int8`|The Uint8 represented as an Int8|
102
+
103
+ Examples:
104
+
105
+ ```grain
106
+ Int8.fromUint8(1us) == 1s
107
+ ```
108
+
109
+ ### Int8.**incr**
110
+
111
+ <details disabled>
112
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
113
+ No other changes yet.
114
+ </details>
115
+
116
+ ```grain
117
+ incr : (value: Int8) => Int8
118
+ ```
119
+
120
+ Increments the value by one.
121
+
122
+ Parameters:
123
+
124
+ |param|type|description|
125
+ |-----|----|-----------|
126
+ |`value`|`Int8`|The value to increment|
127
+
128
+ Returns:
129
+
130
+ |type|description|
131
+ |----|-----------|
132
+ |`Int8`|The incremented value|
133
+
134
+ Examples:
135
+
136
+ ```grain
137
+ Int8.incr(1s) == 2s
138
+ ```
139
+
140
+ ```grain
141
+ Int8.incr(-2s) == -1s
142
+ ```
143
+
144
+ ### Int8.**decr**
145
+
146
+ <details disabled>
147
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
148
+ No other changes yet.
149
+ </details>
150
+
151
+ ```grain
152
+ decr : (value: Int8) => Int8
153
+ ```
154
+
155
+ Decrements the value by one.
156
+
157
+ Parameters:
158
+
159
+ |param|type|description|
160
+ |-----|----|-----------|
161
+ |`value`|`Int8`|The value to decrement|
162
+
163
+ Returns:
164
+
165
+ |type|description|
166
+ |----|-----------|
167
+ |`Int8`|The decremented value|
168
+
169
+ Examples:
170
+
171
+ ```grain
172
+ Int8.decr(2s) == 1s
173
+ ```
174
+
175
+ ```grain
176
+ Int8.decr(0s) == -1s
177
+ ```
178
+
179
+ ### Int8.**(+)**
180
+
181
+ <details disabled>
182
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
183
+ No other changes yet.
184
+ </details>
185
+
186
+ ```grain
187
+ (+) : (x: Int8, y: Int8) => Int8
188
+ ```
189
+
190
+ Computes the sum of its operands.
191
+
192
+ Parameters:
193
+
194
+ |param|type|description|
195
+ |-----|----|-----------|
196
+ |`x`|`Int8`|The first operand|
197
+ |`y`|`Int8`|The second operand|
198
+
199
+ Returns:
200
+
201
+ |type|description|
202
+ |----|-----------|
203
+ |`Int8`|The sum of the two operands|
204
+
205
+ Examples:
206
+
207
+ ```grain
208
+ use Int8.{ (+) }
209
+ assert 1s + 1s == 2s
210
+ ```
211
+
212
+ ### Int8.**(-)**
213
+
214
+ <details disabled>
215
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
216
+ No other changes yet.
217
+ </details>
218
+
219
+ ```grain
220
+ (-) : (x: Int8, y: Int8) => Int8
221
+ ```
222
+
223
+ Computes the difference of its operands.
224
+
225
+ Parameters:
226
+
227
+ |param|type|description|
228
+ |-----|----|-----------|
229
+ |`x`|`Int8`|The first operand|
230
+ |`y`|`Int8`|The second operand|
231
+
232
+ Returns:
233
+
234
+ |type|description|
235
+ |----|-----------|
236
+ |`Int8`|The difference of the two operands|
237
+
238
+ Examples:
239
+
240
+ ```grain
241
+ use Int8.{ (-) }
242
+ assert 2s - 1s == 1s
243
+ ```
244
+
245
+ ### Int8.**(*)**
246
+
247
+ <details disabled>
248
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
249
+ No other changes yet.
250
+ </details>
251
+
252
+ ```grain
253
+ (*) : (x: Int8, y: Int8) => Int8
254
+ ```
255
+
256
+ Computes the product of its operands.
257
+
258
+ Parameters:
259
+
260
+ |param|type|description|
261
+ |-----|----|-----------|
262
+ |`x`|`Int8`|The first operand|
263
+ |`y`|`Int8`|The second operand|
264
+
265
+ Returns:
266
+
267
+ |type|description|
268
+ |----|-----------|
269
+ |`Int8`|The product of the two operands|
270
+
271
+ Examples:
272
+
273
+ ```grain
274
+ use Int8.{ (*) }
275
+ assert 2s * 2s == 4s
276
+ ```
277
+
278
+ ### Int8.**(/)**
279
+
280
+ <details disabled>
281
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
282
+ No other changes yet.
283
+ </details>
284
+
285
+ ```grain
286
+ (/) : (x: Int8, y: Int8) => Int8
287
+ ```
288
+
289
+ Computes the quotient of its operands using signed division.
290
+
291
+ Parameters:
292
+
293
+ |param|type|description|
294
+ |-----|----|-----------|
295
+ |`x`|`Int8`|The first operand|
296
+ |`y`|`Int8`|The second operand|
297
+
298
+ Returns:
299
+
300
+ |type|description|
301
+ |----|-----------|
302
+ |`Int8`|The quotient of its operands|
303
+
304
+ Examples:
305
+
306
+ ```grain
307
+ use Int8.{ (/) }
308
+ assert 8s / 2s == 4s
309
+ ```
310
+
311
+ ### Int8.**rem**
312
+
313
+ <details disabled>
314
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
315
+ No other changes yet.
316
+ </details>
317
+
318
+ ```grain
319
+ rem : (x: Int8, y: Int8) => Int8
320
+ ```
321
+
322
+ Computes the remainder of the division of its operands using signed division.
323
+
324
+ Parameters:
325
+
326
+ |param|type|description|
327
+ |-----|----|-----------|
328
+ |`x`|`Int8`|The first operand|
329
+ |`y`|`Int8`|The second operand|
330
+
331
+ Returns:
332
+
333
+ |type|description|
334
+ |----|-----------|
335
+ |`Int8`|The remainder of its operands|
336
+
337
+ Examples:
338
+
339
+ ```grain
340
+ Int8.rem(8s, 3s) == 2s
341
+ ```
342
+
343
+ ### Int8.**(%)**
344
+
345
+ <details disabled>
346
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
347
+ No other changes yet.
348
+ </details>
349
+
350
+ ```grain
351
+ (%) : (x: Int8, y: Int8) => Int8
352
+ ```
353
+
354
+ Computes the remainder of the division of the first operand by the second.
355
+ The result will have the sign of the second operand.
356
+
357
+ Parameters:
358
+
359
+ |param|type|description|
360
+ |-----|----|-----------|
361
+ |`x`|`Int8`|The first operand|
362
+ |`y`|`Int8`|The second operand|
363
+
364
+ Returns:
365
+
366
+ |type|description|
367
+ |----|-----------|
368
+ |`Int8`|The modulus of its operands|
369
+
370
+ Throws:
371
+
372
+ `ModuloByZero`
373
+
374
+ * When `y` is zero
375
+
376
+ Examples:
377
+
378
+ ```grain
379
+ use Int8.{ (%) }
380
+ assert -5s % 3s == 1s
381
+ ```
382
+
383
+ ### Int8.**(<<)**
384
+
385
+ <details disabled>
386
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
387
+ No other changes yet.
388
+ </details>
389
+
390
+ ```grain
391
+ (<<) : (value: Int8, amount: Int8) => Int8
392
+ ```
393
+
394
+ Shifts the bits of the value left by the given number of bits.
395
+
396
+ Parameters:
397
+
398
+ |param|type|description|
399
+ |-----|----|-----------|
400
+ |`value`|`Int8`|The value to shift|
401
+ |`amount`|`Int8`|The number of bits to shift by|
402
+
403
+ Returns:
404
+
405
+ |type|description|
406
+ |----|-----------|
407
+ |`Int8`|The shifted value|
408
+
409
+ Examples:
410
+
411
+ ```grain
412
+ use Int8.{ (<<) }
413
+ assert (5s << 1s) == 10s
414
+ ```
415
+
416
+ ### Int8.**(>>)**
417
+
418
+ <details disabled>
419
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
420
+ No other changes yet.
421
+ </details>
422
+
423
+ ```grain
424
+ (>>) : (value: Int8, amount: Int8) => Int8
425
+ ```
426
+
427
+ Shifts the bits of the value right by the given number of bits, preserving the sign bit.
428
+
429
+ Parameters:
430
+
431
+ |param|type|description|
432
+ |-----|----|-----------|
433
+ |`value`|`Int8`|The value to shift|
434
+ |`amount`|`Int8`|The amount to shift by|
435
+
436
+ Returns:
437
+
438
+ |type|description|
439
+ |----|-----------|
440
+ |`Int8`|The shifted value|
441
+
442
+ Examples:
443
+
444
+ ```grain
445
+ use Int8.{ (>>) }
446
+ assert (5s >> 1s) == 2s
447
+ ```
448
+
449
+ ### Int8.**(==)**
450
+
451
+ <details disabled>
452
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
453
+ No other changes yet.
454
+ </details>
455
+
456
+ ```grain
457
+ (==) : (x: Int8, y: Int8) => Bool
458
+ ```
459
+
460
+ Checks if the first value is equal to the second value.
461
+
462
+ Parameters:
463
+
464
+ |param|type|description|
465
+ |-----|----|-----------|
466
+ |`x`|`Int8`|The first value|
467
+ |`y`|`Int8`|The second value|
468
+
469
+ Returns:
470
+
471
+ |type|description|
472
+ |----|-----------|
473
+ |`Bool`|`true` if the first value is equal to the second value or `false` otherwise|
474
+
475
+ Examples:
476
+
477
+ ```grain
478
+ use Int8.{ (==) }
479
+ assert 1s == 1s
480
+ ```
481
+
482
+ ### Int8.**(!=)**
483
+
484
+ <details disabled>
485
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
486
+ No other changes yet.
487
+ </details>
488
+
489
+ ```grain
490
+ (!=) : (x: Int8, y: Int8) => Bool
491
+ ```
492
+
493
+ Checks if the first value is not equal to the second value.
494
+
495
+ Parameters:
496
+
497
+ |param|type|description|
498
+ |-----|----|-----------|
499
+ |`x`|`Int8`|The first value|
500
+ |`y`|`Int8`|The second value|
501
+
502
+ Returns:
503
+
504
+ |type|description|
505
+ |----|-----------|
506
+ |`Bool`|`true` if the first value is not equal to the second value or `false` otherwise|
507
+
508
+ Examples:
509
+
510
+ ```grain
511
+ use Int8.{ (!=) }
512
+ assert 1s != 2s
513
+ ```
514
+
515
+ ### Int8.**(<)**
516
+
517
+ <details disabled>
518
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
519
+ No other changes yet.
520
+ </details>
521
+
522
+ ```grain
523
+ (<) : (x: Int8, y: Int8) => Bool
524
+ ```
525
+
526
+ Checks if the first value is less than the second value.
527
+
528
+ Parameters:
529
+
530
+ |param|type|description|
531
+ |-----|----|-----------|
532
+ |`x`|`Int8`|The first value|
533
+ |`y`|`Int8`|The second value|
534
+
535
+ Returns:
536
+
537
+ |type|description|
538
+ |----|-----------|
539
+ |`Bool`|`true` if the first value is less than the second value or `false` otherwise|
540
+
541
+ Examples:
542
+
543
+ ```grain
544
+ use Int8.{ (<) }
545
+ assert 1s < 2s
546
+ ```
547
+
548
+ ### Int8.**(>)**
549
+
550
+ <details disabled>
551
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
552
+ No other changes yet.
553
+ </details>
554
+
555
+ ```grain
556
+ (>) : (x: Int8, y: Int8) => Bool
557
+ ```
558
+
559
+ Checks if the first value is greater than the second value.
560
+
561
+ Parameters:
562
+
563
+ |param|type|description|
564
+ |-----|----|-----------|
565
+ |`x`|`Int8`|The first value|
566
+ |`y`|`Int8`|The second value|
567
+
568
+ Returns:
569
+
570
+ |type|description|
571
+ |----|-----------|
572
+ |`Bool`|`true` if the first value is greater than the second value or `false` otherwise|
573
+
574
+ Examples:
575
+
576
+ ```grain
577
+ use Int8.{ (>) }
578
+ assert 2s > 1s
579
+ ```
580
+
581
+ ### Int8.**(<=)**
582
+
583
+ <details disabled>
584
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
585
+ No other changes yet.
586
+ </details>
587
+
588
+ ```grain
589
+ (<=) : (x: Int8, y: Int8) => Bool
590
+ ```
591
+
592
+ Checks if the first value is less than or equal to the second value.
593
+
594
+ Parameters:
595
+
596
+ |param|type|description|
597
+ |-----|----|-----------|
598
+ |`x`|`Int8`|The first value|
599
+ |`y`|`Int8`|The second value|
600
+
601
+ Returns:
602
+
603
+ |type|description|
604
+ |----|-----------|
605
+ |`Bool`|`true` if the first value is less than or equal to the second value or `false` otherwise|
606
+
607
+ Examples:
608
+
609
+ ```grain
610
+ use Int8.{ (<=) }
611
+ assert 1s <= 2s
612
+ ```
613
+
614
+ ```grain
615
+ use Int8.{ (<=) }
616
+ assert 1s <= 1s
617
+ ```
618
+
619
+ ### Int8.**(>=)**
620
+
621
+ <details disabled>
622
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
623
+ No other changes yet.
624
+ </details>
625
+
626
+ ```grain
627
+ (>=) : (x: Int8, y: Int8) => Bool
628
+ ```
629
+
630
+ Checks if the first value is greater than or equal to the second value.
631
+
632
+ Parameters:
633
+
634
+ |param|type|description|
635
+ |-----|----|-----------|
636
+ |`x`|`Int8`|The first value|
637
+ |`y`|`Int8`|The second value|
638
+
639
+ Returns:
640
+
641
+ |type|description|
642
+ |----|-----------|
643
+ |`Bool`|`true` if the first value is greater than or equal to the second value or `false` otherwise|
644
+
645
+ Examples:
646
+
647
+ ```grain
648
+ use Int8.{ (>=) }
649
+ assert 2s >= 1s
650
+ ```
651
+
652
+ ```grain
653
+ use Int8.{ (>=) }
654
+ assert 1s >= 1s
655
+ ```
656
+
657
+ ### Int8.**lnot**
658
+
659
+ <details disabled>
660
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
661
+ No other changes yet.
662
+ </details>
663
+
664
+ ```grain
665
+ lnot : (value: Int8) => Int8
666
+ ```
667
+
668
+ Computes the bitwise NOT of the given value.
669
+
670
+ Parameters:
671
+
672
+ |param|type|description|
673
+ |-----|----|-----------|
674
+ |`value`|`Int8`|The given value|
675
+
676
+ Returns:
677
+
678
+ |type|description|
679
+ |----|-----------|
680
+ |`Int8`|Containing the inverted bits of the given value|
681
+
682
+ Examples:
683
+
684
+ ```grain
685
+ Int.lnot(-5s) == 4s
686
+ ```
687
+
688
+ ### Int8.**(&)**
689
+
690
+ <details disabled>
691
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
692
+ No other changes yet.
693
+ </details>
694
+
695
+ ```grain
696
+ (&) : (x: Int8, y: Int8) => Int8
697
+ ```
698
+
699
+ Computes the bitwise AND (`&`) on the given operands.
700
+
701
+ Parameters:
702
+
703
+ |param|type|description|
704
+ |-----|----|-----------|
705
+ |`x`|`Int8`|The first operand|
706
+ |`y`|`Int8`|The second operand|
707
+
708
+ Returns:
709
+
710
+ |type|description|
711
+ |----|-----------|
712
+ |`Int8`|Containing a `1` in each bit position for which the corresponding bits of both operands are `1`|
713
+
714
+ Examples:
715
+
716
+ ```grain
717
+ use Int8.{ (&) }
718
+ assert (3s & 4s) == 0s
719
+ ```
720
+
721
+ ### Int8.**(|)**
722
+
723
+ <details disabled>
724
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
725
+ No other changes yet.
726
+ </details>
727
+
728
+ ```grain
729
+ (|) : (x: Int8, y: Int8) => Int8
730
+ ```
731
+
732
+ Computes the bitwise OR (`|`) on the given operands.
733
+
734
+ Parameters:
735
+
736
+ |param|type|description|
737
+ |-----|----|-----------|
738
+ |`x`|`Int8`|The first operand|
739
+ |`y`|`Int8`|The second operand|
740
+
741
+ Returns:
742
+
743
+ |type|description|
744
+ |----|-----------|
745
+ |`Int8`|Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1`|
746
+
747
+ Examples:
748
+
749
+ ```grain
750
+ use Int8.{ (|) }
751
+ assert (3s | 4s) == 7s
752
+ ```
753
+
754
+ ### Int8.**(^)**
755
+
756
+ <details disabled>
757
+ <summary tabindex="-1">Added in <code>0.6.0</code></summary>
758
+ No other changes yet.
759
+ </details>
760
+
761
+ ```grain
762
+ (^) : (x: Int8, y: Int8) => Int8
763
+ ```
764
+
765
+ Computes the bitwise XOR (`^`) on the given operands.
766
+
767
+ Parameters:
768
+
769
+ |param|type|description|
770
+ |-----|----|-----------|
771
+ |`x`|`Int8`|The first operand|
772
+ |`y`|`Int8`|The second operand|
773
+
774
+ Returns:
775
+
776
+ |type|description|
777
+ |----|-----------|
778
+ |`Int8`|Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1`|
779
+
780
+ Examples:
781
+
782
+ ```grain
783
+ use Int8.{ (^) }
784
+ assert (3s ^ 5s) == 6s
785
+ ```
786
+