Sam Mohr
fe1b6d71fc
Update from PR comments
2024-07-07 18:33:20 -07:00
Sam Mohr
f415017c90
Implement new builder syntax alongside old one
2024-07-07 03:28:59 -07:00
Kiryl Dziamura
de9ed734c5
remove EmptyDefsFinal
2024-07-01 18:45:23 +02:00
Kiryl Dziamura
967da48969
Fix typo
2024-06-03 16:58:40 +02:00
Agus Zubiaga
a8a829aadd
Merge branch 'main' into inline-imports
2024-04-28 00:11:29 -03:00
Luke Boswell
74e531b994
remove suffixed from Ident::Access and cleanup
2024-04-28 08:48:08 +10:00
Luke Boswell
2fe03e6c91
remove suffixed from Expr::Var
2024-04-28 08:47:08 +10:00
Joshua Warner
6080c12ca8
Parse !
suffixes as an Expr::TaskAwaitBang instead of using suffix field in ident
2024-04-28 08:47:07 +10:00
Agus Zubiaga
7efc7a4a3e
Canonicalize ingested files directly instead of creating AST nodes
2024-04-23 18:55:41 -03:00
Agus Zubiaga
5112e064e5
Add module_path to can env instead of threading it through
2024-04-21 10:30:34 -03:00
Agus Zubiaga
d5a38a26db
Merge branch 'main' into inline-imports
2024-04-20 12:01:11 -03:00
Luke Boswell
129ca94733
remove unit type from EmptyDefsFinal
2024-04-14 13:45:07 +10:00
Luke Boswell
c32fa5b600
support optional suffied last def
2024-04-14 13:45:06 +10:00
Luke Boswell
8b9e08bd76
WIP try simplification
2024-04-14 13:45:05 +10:00
Luke Boswell
3c3e523b45
add suffixed to Identifer and QualifiedIdentifier
2024-04-14 13:45:00 +10:00
Luke Boswell
e74501981e
fmt and clippy fixes
2024-03-20 12:31:04 +11:00
Luke Boswell
406ffdffab
WIP partial implementation for desugar_defs_node_suffixed
2024-03-19 12:57:30 +11:00
Luke Boswell
8bbbd768ec
add snapshot test for suffixed expr
2024-03-15 14:39:21 +11:00
JRI98
acbbdd0f7b
Improve handling of multi pattern unbound variables
2024-02-23 15:22:23 +00:00
Folkert
21b540751a
force interpolated variables to be of type string
2024-01-30 15:04:56 +01:00
Agus Zubiaga
002493e32c
Load and can ingested file imports
...
Moves handling of ingested file imports from load to can, so that they
can be properly introduced in the scope they appear.
Example:
import "input.txt" as input : Str
image =
import "image.png" as bytes : List U8
# `bytes` is only available under `image`
decodePng bytes
...
2024-01-20 08:43:40 -03:00
Agus Zubiaga
7b3317dbb6
Update unused warnings for inline imports
...
Now that imports can be limited to smaller scopes than the entire module,
unused import warnings need to work like unused def warnings.
This commit moves unused import warnings discovery and reporting from load
to canonicalization where we can track their usage per scope.
This also fixes a longstanding bug where unused exposed names from an import
were not reported if they were only used in a qualified manner.
2024-01-20 08:43:36 -03:00
Richard Feldman
af8e9c7292
Parse deprecated interpolation syntax differently
2024-01-06 21:49:00 -05:00
Brendan Hansknecht
5e8974177c
avoid bloating parse expr size
2023-12-02 21:18:32 -08:00
Brendan Hansknecht
3966d63e2f
add src and location to dbg
2023-12-02 21:18:31 -08:00
Brendan Hansknecht
b7f72eff86
add basic Dbg desugaring and LowLevelDbg
2023-11-29 21:05:48 -08:00
Elias Mulhall
0a48962abe
replace unreachable! with internal_error! in expr canonicalization
...
See https://github.com/roc-lang/roc/issues/2046
2023-11-26 20:26:34 -05:00
Richard Feldman
42fb593471
Desugar inside string interpolation
2023-07-29 18:11:41 -04:00
Richard Feldman
9e0e756d3b
Allow more exprs inside string interpolation
2023-07-29 17:30:48 -04:00
Folkert
557c3987e0
make it work
2023-07-24 21:24:33 +02:00
Folkert
43adf0635e
freshen annotations
2023-07-24 21:24:33 +02:00
Kiryl Dziamura
6031c0cc9f
Fix desugar step for pizza operator
2023-07-04 10:16:20 +02:00
Ajai Nelson
2e5fef5231
Improve error messages involving ignored variables
...
Fix #3987
2023-06-06 19:46:15 -04:00
Agustin Zubiaga
d2a57112fd
Unapplied record builder error
2023-05-08 20:16:38 -03:00
Agustin Zubiaga
6670fbb1ab
Multiple record builder error
2023-05-08 19:26:47 -03:00
Agustin Zubiaga
dfa9c29147
Desugar Record Builder
2023-05-07 20:31:47 -03:00
Jarl André Hübenthal
8bf888a5e6
chore: replace panic! with internal_error
2023-04-24 10:16:50 +02:00
Brendan Hansknecht
c440b2ca05
Switch to PathBuf to avoid Path turning into a fat pointer. Avoids growing Constraints
2023-04-09 21:14:05 -07:00
Brendan Hansknecht
90f4885f4b
use Arc to avoid ever needing to actually copy the underlying bytes
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
6302a8d4b5
switch from type annotation to type variable
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
8f4945f286
make file loading errors that happen late in compilation still fatal
2023-04-09 14:03:33 -07:00
Brendan Hansknecht
7079361841
add ingested file category for error messages
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
d42aa43b41
add ingest file to can ir and start pipelining it through the compiler
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
7c77f7c2a2
get a basic full pipeline working that will load a file as a string
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
56ed985cc9
pass through correct path and type for ingested file
2023-04-09 14:03:32 -07:00
Brendan Hansknecht
f4411afbbc
get basic wiring of a value through the compiler
2023-04-09 14:03:31 -07:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples
2023-02-07 18:54:50 -08:00
Joshua Warner
de828416bf
Initial implementation of tuples in type checking
...
This leaves in place a bunch of TODOs and likely many bugs - notably, I haven't tested codegen/layout at all here.
2023-01-22 12:40:44 -08:00
Joshua Warner
94070e8ba6
Improve parsing of scalar literals
...
* Unify parsing of string literals and scalar literals, to (e.g.) ensure escapes are handled uniformly. Notably, this makes unicode escapes valid in scalar literals.
* Add a variety of custom error messages about specific failure cases of parsing string/scalar literals. For example, if we're expecting a string (e.g. a package name in the header) and the user tried using single quotes, give a clear message about that.
* Fix formatting of unicode escapes (they previously used {}, now correctly use () to match roc strings)
2023-01-07 15:12:52 -08:00
Folkert
13d0b75bc1
Merge remote-tracking branch 'origin/main' into expect-print-values
2022-12-08 23:42:03 +01:00