Commit graph

1012 commits

Author SHA1 Message Date
Brendan Hansknecht
675e0693a4
clarify function name 2024-07-13 10:39:57 -07:00
Brendan Hansknecht
c734a27b59
move List.map* into roc 2024-07-13 10:39:56 -07:00
Brendan Hansknecht
94cb4fb8ff
remove inc functions from list.map*, the closure will inc in necessary 2024-07-13 10:39:56 -07:00
Brendan Hansknecht
266fe4bdc8
fix zig tests 2024-07-13 10:39:56 -07:00
Brendan Hansknecht
175255cf86
remove accidental .zig-cache 2024-07-13 10:39:54 -07:00
Brendan Hansknecht
6b761f6f81
fix zig builtin compilation and warnings 2024-07-13 10:39:53 -07:00
Brendan Hansknecht
48eb9c31a9
update list generated refcounting functions for dev and wasm 2024-07-13 10:39:53 -07:00
Brendan Hansknecht
0d0a4a8806
Update refcounting of list builtins to the new system. 2024-07-13 10:39:53 -07:00
Brendan Hansknecht
44cd1ee9c4
Avoid accessing unallocated bytes in list.incref 2024-07-13 10:39:52 -07:00
Brendan Hansknecht
a1d08702a4
Update roc_std List to handle size on the heap
This increased the number of failing tests for some reason (more segfaults).
That said, I think it is correct.

Probably just exposing errors from elsewher that haven't been addressed (maybe causing a double free).
2024-07-13 10:39:51 -07:00
Brendan Hansknecht
3c842196fa
Update LLVM to properly increment and decrement lists 2024-07-13 10:39:51 -07:00
Brendan Hansknecht
255cc31ad9
change zig bitcode refcounting to require whether or not an element is refcounted
This also requires zig bitcode to have access to the dec functions for elements.
This is needed so that zig will be able to free elements in lists.
2024-07-13 10:39:51 -07:00
shua
d90da3af52
rm TotallyNotJson
TotallyNotJson.roc now lives on the farm in virtual-dom-wip as Json.roc.
Any reference in stdlib or builtins has been removed, as well as the
last places it was used (in python/ruby-interop examples).
2024-07-01 20:37:23 +02:00
shua
f7bec802c0
PR: rename to List.concatUtf8 2024-06-08 13:36:20 +02:00
shua
33e8a7a439
implement Str.concatUtf8 2024-06-07 19:05:52 +02:00
Andy Ferris
a0c4bb571f Add NaN and Infinity floating-point values to Num 2024-05-03 19:19:19 +10:00
Agus Zubiaga
e3b600c282
New package header syntax
Implements the new package header syntax as discussed in Zulip [1].

package [Csv] {
    parser: "../parser/main.roc"
}

Old headers still parse and are automatically upgraded to the new
syntax by the formatter.

[1] 418444862
2024-05-01 10:49:03 -03:00
Agus Zubiaga
057a18573a
New module header
Implements the new `module` header syntax as described in "module and package changes" [1]:

```
module [Request, Response, req]
```

The old syntax should still work fine, and is automatically upgraded to the new one
when running `roc format`.

[1] https://docs.google.com/document/d/1E_77fO-44BtoBtXoVeWyGh1xN2KRTWTu8q6i25RNNx0/edit
2024-05-01 10:39:12 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports 2024-04-20 12:01:11 -03:00
Nathaniel Knight
02689de797 Minor fix to the docstring of Num.shiftLeftBy 2024-04-17 20:50:17 -07:00
Anton-4
2df6f5cb72
Merge remote-tracking branch 'upstream/main' into optional-decoding-works 2024-04-12 16:05:50 +02:00
Anton-4
f085b96f78
removed unused deps, added CI test 2024-04-09 19:47:31 +02:00
faldor20
f330e9aa29
roc format 2024-04-02 10:00:25 +10:00
Fabian Schmalzried
546cb17fb9
cut high bits for to large fraction an exponent 2024-04-01 21:08:14 +02:00
Anton-4
35a26eb39f
fix typos, WIP on NumF32ToParts 2024-04-01 21:08:12 +02:00
Fabian Schmalzried
4269608ebf
remove i128OfDec 2024-04-01 21:08:12 +02:00
Fabian Schmalzried
8f217aa51a
Better docs 2024-04-01 21:08:11 +02:00
Fabian Schmalzried
21d6848176
format 2024-04-01 21:08:10 +02:00
Fabian Schmalzried
11998b9cc8
f32FromParts and f64FromParts for repl 2024-04-01 21:08:10 +02:00
Fabian Schmalzried
473b8ef2d3
f32/f64toParts in repl only 2024-04-01 21:08:09 +02:00
Fabian Schmalzried
64e9899cad
Add Num.withDecimalPoint 2024-04-01 21:08:09 +02:00
Fabian Schmalzried
9c664172dd
Add Num.withoutDecimalPoint 2024-04-01 21:08:09 +02:00
Brendan Hansknecht
d66ce24dc3
Fix format change caused by doc changes
Introduces by anton's recent PR, just an extra space being removed.
2024-03-31 11:04:59 -07:00
Brendan Hansknecht
6dc5bfb1b7
Use roc_target over target_lexicon
Tailors a target class for our needs.
Replaces tons of uses across the entire compiler.
This is a base for later adding new targets like thumb.
2024-03-31 10:50:26 -07:00
Anton-4
2b40aa90d4
forgot about 32 bit targets
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-03-30 17:46:27 +01:00
Anton-4
315fbeb75c
list len docs correction 2024-03-30 14:47:56 +01:00
faldor20
e77759eb1c
Allow encoding records,lists and tuples with None fields 2024-03-20 21:10:37 +10:00
faldor20
2565580db5
working initial implementation 2024-03-15 13:31:11 +10:00
faldor20
23dd23c337
update builtin comments 2024-03-12 00:39:49 +10:00
faldor20
d95da9dd5b
completions working 2024-03-11 11:10:35 +10:00
Folkert
a2d1a1ddb0
simplify the string splitting code (by using std.mem.split) 2024-03-05 16:51:30 +01:00
Anton-4
9a6eefdbcf
fix sortAsc sortDesc docs
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-03-02 19:33:39 +01:00
Brendan Hansknecht
26e21addee
Merge pull request #6545 from roc-lang/approx-eq-update
Update Num.isApproxEq
2024-03-01 18:06:04 -08:00
Brendan Hansknecht
f79e93cfdc
Update Num.isApproxEq
The function is now symmetric and using max instead of sum to separate the absolute and relative tolerance.

Reason for change here: 419553929
2024-02-29 11:30:01 -08:00
Anton-4
b74653db8e
Merge pull request #6533 from lukewilliamboswell/encode-docs
Docs for `Encode` builtin
2024-02-23 15:50:52 +01:00
Anton-4
67cfe7ece0
List.concat -> List.append
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-02-23 14:21:43 +01:00
Anton-4
af389a9792
minor improvement
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-02-23 14:08:39 +01:00
Anton-4
df58a4ff07
fix expects
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2024-02-23 13:56:34 +01:00
Luke Boswell
a671c4cdc9
clean up 2024-02-22 19:15:01 +11:00
Luke Boswell
921c90a460
roc-gpt attempt 2024-02-22 19:04:18 +11:00