Commit graph

24 commits

Author SHA1 Message Date
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
Anton-4
2df6f5cb72
Merge remote-tracking branch 'upstream/main' into optional-decoding-works 2024-04-12 16:05:50 +02: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
Richard Feldman
502b0fddf2
Remove Nat from Hash, Inspect, Encode, Decode 2024-01-26 16:17:05 -05:00
Agus Zubiaga
710d62f754
Load and can new top-level imports
Previously, all imports were available in the header, so we could start
processing dependencies as soon as we parsed it. However, the new imports
are treated as defs, so we have to parse the whole module to find them.

This commit essentially moves the dependency resolution from the `LoadHeader`
phase to the `Parse` phase, and it updates canonicalization to introduce
module symbols into scope when a `ValueDef::ModuleImport` is encountered.

NOTE:
- The `imports` header still parses, but it's no longer wired up. I will remove
it in an upcoming commit.
- Ingested files and imports that appear in nested expressions are not
yet supported by load
2024-01-20 08:39:31 -03:00
Becker A
14e04d65cf
Update Decode.roc
fixed typo

Signed-off-by: Becker A. <awqatty.b@gmail.com>
2023-12-02 18:33:17 -07:00
Isaac Van Doren
139d3c6f89
make dropFirst and dropLast drop n elements 2023-10-29 13:23:33 -05:00
Bryce Miller
cb08225bf0
| -> where 2023-06-05 20:19:00 -04:00
Bryce Miller
57c01de792
has [...] -> implements [...] 2023-05-24 10:36:18 -04:00
Bryce Miller
b1d592ec37
has clause -> implements clause 2023-05-20 07:15:30 -04:00
Luke Boswell
4f22b0747f
mono and update Json.fromUtf8 and Json.toUtf8 to Json.json 2023-04-21 10:57:48 +10:00
Luke Boswell
3e562eb359
roc format 2023-04-09 18:34:56 +10:00
Luke Boswell
ed618fbbf4
add docs for Decode 2023-04-09 18:27:11 +10:00
Ayaz Hafiz
92aff265ae
Add doc comment to Decode.record 2023-03-22 12:19:20 -05:00
Ayaz Hafiz
0b3ee77232
Add in Decode.tuple ability member 2023-03-22 12:18:04 -05:00
Ayaz Hafiz
8ff74465b9
Format Decode.roc 2022-10-23 20:48:07 -05:00
Ayaz Hafiz
e08b613047
Add Decode.mapResult 2022-10-23 20:48:06 -05:00
Ayaz Hafiz
5416eb7cbf
List dependencies in the stdlib explicitly rather than hard-coding 2022-10-05 18:53:49 -05:00
Ayaz Hafiz
29793fac32
Begin working on JSON record decoding
And we've hit a borrow panic 😍
2022-08-15 11:11:29 -05:00
Ayaz Hafiz
10ce5d0615
Implement Json fromBytes without let-generalization 2022-08-01 08:09:23 -05:00
Ayaz Hafiz
fc71e3df04
Add Decode to the load graph 2022-08-01 08:09:22 -05:00
Ayaz Hafiz
de1588e760
Add the Decode module 2022-08-01 08:09:22 -05:00