Richard Feldman
84ada96b63
Revise Str parsing primitives
2022-02-27 15:30:27 -05:00
Jan Van Bruggen
1760db2a0c
Add docs for new Int.toInt builtins
2022-02-19 11:28:12 -05:00
Jan Van Bruggen
f47dbb5171
Swap List.mapWithIndex arg1 args order to put the element first
2022-02-11 16:10:29 -07:00
Jan Van Bruggen
92e0f8714f
Swap List.repeat args order to put the list first
2022-02-11 16:10:29 -07:00
Richard Feldman
5b6d457aa3
Fix typo in Num.roc
2022-02-01 11:52:47 -05:00
Richard Feldman
53b1959d9d
Merge pull request #2395 from rtfeldman/JanCVanB-patch-2
...
Add some missing exposures to docs
2022-01-23 22:12:14 -05:00
Jan Van Bruggen
29303c4ba4
Add some missing exposures to docs
2022-01-23 12:38:39 -05:00
Jan Van Bruggen
7b22b42a8f
Fix args order in some docs
...
These changes reflect the builtins as they're currently implemented, but I wish that instead they worked as (previously) described. Should this PR be abandoned in favor of an actual argument swap?
2022-01-23 12:37:36 -05:00
Jan Van Bruggen
9a8a4c6ed7
Add Num.(min/max)(I/U)(8/16)
builtins
2022-01-22 00:19:17 -07:00
Jan Van Bruggen
8e4b6f0cab
Remove Num.(min/max)Int
...
Replace all uses with `Num.(min/max)I64`,
since all uses expect an `I64`.
2022-01-19 09:55:06 -07:00
Jan Van Bruggen
591477e77b
Add most remaining Num.min/max*
builtins
...
This skips `min/maxU128`, as they require a subtle change
to the `I128`-centric implementation of `Int`s.
2022-01-17 15:26:23 -07:00
Jan Van Bruggen
865dcd5507
Expose existing Num.min/max
builtin docs
2022-01-17 13:17:03 -07:00
Jan Van Bruggen
cdf705941e
Improve Num.min/max docstrings
2022-01-17 13:17:03 -07:00
Jan Van Bruggen
79241adf8e
Reorder Num.min/max docs
2022-01-17 13:17:03 -07:00
Jan Van Bruggen
d7e2be306f
WIP: Add Num.minI128
builtin (TODOs remain)
2022-01-15 17:49:15 -07:00
Jan Van Bruggen
d2c2064782
Add missing Num.maxI128
docs
2022-01-15 17:49:02 -07:00
Richard Feldman
f83f50a9a7
Merge pull request #2337 from rtfeldman/i/2331
...
Use unsigned LLVM intrinsic arithmetic for unsigned integers
2022-01-12 08:29:30 -05:00
Jan Van Bruggen
6c4fcb6514
Maybe-fix some maybe-incorrect doc-comments
...
This might affect `roc docs ...` parsing, but probably not.
2022-01-11 20:00:15 -07:00
ayazhafiz
2c41c43aea
Implement saturated add/subtract
2022-01-10 22:37:08 -05:00
Richard Feldman
46d36ed942
Fix tutorial table formatting
2022-01-07 19:48:43 -05:00
Richard Feldman
9cd27b72d7
Fix some links in Num docs
2022-01-07 19:48:43 -05:00
Jan Van Bruggen
8cc5abd219
Fix typos in docs for Num.maxDec
& Num.minDec
2021-12-18 01:21:20 -07:00
j
ec68b1ab38
Alphabetize compiler/builtins/docs/ exposures
2021-12-15 07:37:15 -07:00
Richard Feldman
6056d29df0
Merge pull request #2201 from rtfeldman/builtin_docs
...
Added builtins to docs
2021-12-14 22:04:23 -05:00
Richard Feldman
7a1f3b1c02
Merge pull request #2207 from rtfeldman/JanCVanB-patch-1
...
Remove duplicate `dropLast` & `all` in `List` docs
2021-12-14 22:03:43 -05:00
Richard Feldman
5ac6bf89e4
Merge pull request #2208 from rtfeldman/JanCVanB-patch-2
...
Add missing section headers to `Set` docs
2021-12-14 22:03:27 -05:00
Jan Van Bruggen
ba328aa30f
Add missing section headers to Set
docs
...
This emulates [the section headers in `List` docs](09c1222b28/compiler/builtins/docs/List.roc (L216)
).
2021-12-13 18:48:25 -07:00
Jan Van Bruggen
c783446567
Remove duplicate dropLast
& all
in List
docs
2021-12-13 18:43:24 -07:00
Anton-4
eeb8d7e9f1
Added builtins to docs
2021-12-13 20:27:32 +01:00
Jan Van Bruggen
d03a51c75b
Rename base
package to pf
everywhere, to match tutorial
2021-12-12 05:57:39 -07:00
Anton-4
58f3559c98
consistent result type signatures
2021-12-02 17:49:04 +01:00
Anton-4
e63701c5d1
trying to make Str.toNum work for Ints
2021-12-01 20:37:21 +01:00
rvcas
00bd77bf1d
chore: update builtin docs
2021-11-30 14:55:41 -05:00
Michael Downey
d946b84e63
adding initial List.all
2021-11-16 16:34:36 -05:00
ayazhafiz
f65b174ab5
Implement List.find
...
`List.find : List elem, (elem -> Bool) -> Result elem [ NotFound ]*`
behaves as follows:
```
>>> List.find [1, 2, 3] (\n -> n > 2)
Ok 2
>>> List.find [1, 2, 3] (\n -> n > 4)
Err NotFound
```
We implement this as builtin in two phases. First, we call out to a
pure-llvm-lowlevel `ListFindUnsafe` that returns a record indicating
whether a satisfying element was found, and the value of that element
(the value is all null bytes if the element wasn't found). Then, we lift
that record to a `Result` via a standard construction of the can AST.
Closes #1909
2021-11-08 21:03:14 -05:00
Kevin Sjöberg
0e500ba33c
Document List.any
2021-11-07 20:43:28 +01:00
Kevin Sjöberg
f6d055dc62
Correct minor spelling mistakes
2021-11-06 15:29:08 +01:00
Kevin Sjöberg
f9ed060e49
Implement List.map4
2021-10-31 21:08:41 +01:00
Chelsea Troy
fd83c3b749
Branch the dropLast functionality from dropAt, inserting an index gathered by subtracting 1 from the list length
2021-10-23 00:17:08 -05:00
Richard Feldman
8391c337ab
Merge remote-tracking branch 'origin/trunk' into list-walk-flip
2021-10-05 20:50:50 -04:00
Richard Feldman
894e295b85
Merge pull request #1764 from rtfeldman/list
...
Some List docs changes
2021-10-04 18:08:32 -05:00
Richard Feldman
cfe7d5afbb
Document List.map2 and List.map3
2021-10-04 08:42:52 -04:00
Richard Feldman
e6ec1ded22
Add mapJoin and mapOrDrop to List
2021-10-04 08:26:23 -04:00
Dan Knutson
65821d6a9f
remove giesch/todo tags, add List.drop doc
2021-10-03 13:55:11 -05:00
Dan Knutson
3baff93a97
add first version of List.dropAt
...
* adds an implementation with no uniqueness/mutability
2021-10-03 13:55:11 -05:00
Richard Feldman
b4e4ae2ff3
Update docs for List.walk and friends
2021-08-30 22:45:03 -04:00
Richard Feldman
f263b0dba7
True and False aren't links
2021-08-08 23:31:42 -04:00
Richard Feldman
65eaa5b95a
Fix some U8 auto-links
2021-08-08 23:31:03 -04:00
Richard Feldman
ea5da5d477
Add Native to Endi
2021-08-08 23:23:45 -04:00
Richard Feldman
3de0766fe9
Add Result docs
2021-08-08 20:36:52 -04:00