Richard Feldman
2da41be29f
Merge remote-tracking branch 'origin/main' into abilities-syntax
2023-08-10 20:36:01 -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
Folkert
ef39bad7c6
auto clippy fixes
2023-07-10 18:27:08 +02:00
Kiryl Dziamura
3ccb6114b2
Unwrap expr in loop
2023-07-04 10:16:21 +02:00
Kiryl Dziamura
29592ddb9b
Drop parens during body canonicalization
2023-07-04 10:16:21 +02:00
Bryce Miller
cb08225bf0
|
-> where
2023-06-05 20:19:00 -04:00
Bryce Miller
d3f6277ea3
has -> implements in comments
2023-05-26 22:59:11 -04:00
Bryce Miller
33c2b9dfdd
has -> implements in comments
2023-05-26 20:37:02 -04:00
Bryce Miller
dbc0204532
abilities syntax has
-> implements
2023-05-24 21:30:16 -04:00
Bryce Miller
17c733ec81
has -> implements in roc_problem::can::Problem
2023-05-20 21:12:26 -04:00
Bryce Miller
46cb45f717
loc_has -> loc_implements
2023-05-20 19:24:08 -04:00
Bryce Miller
4b90948fcf
ast::HasAbilities -> ast::ImplementsAbilities
2023-05-20 19:13:01 -04:00
Bryce Miller
9eb2180a0f
ast::HasAbility -> ast::ImplementsAbility
2023-05-20 08:27:42 -04:00
Anton-4
9748e4a4dc
many clippy fixes
2023-04-24 16:21:46 +02:00
Anton-4
c6cf0b4ebe
merge fixes
2023-04-22 18:15:06 +02:00
Anton-4
937722c462
Merge branch 'main' of github.com:roc-lang/roc into rust_version_upgrade
2023-04-22 17:14:01 +02:00
Anton-4
e784baccce
rust update, nix update, clippy fixes
2023-04-22 14:51:01 +02:00
Folkert
394495d307
Revert "update size asserts"
...
This reverts commit 9973d4b8d2
.
2023-04-21 13:22:23 +02:00
Folkert
4cd8f0a056
clippy --fix fixes
2023-04-21 12:05:51 +02:00
Ayaz Hafiz
f33651bf6a
Correctly instantiate recursion variables under nested aliases
...
Like we instantiate nested lambda set variables and nested OIOP
variables for aliases, we need to do the same for recursion variables.
2023-04-12 13:59:24 -05:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples
2023-02-07 18:54:50 -08:00
Folkert
3417a0e059
fix silent merge request wrt record accessors
2023-01-25 00:02:19 +01:00
Ayaz Hafiz
6b491c617e
Store def name on accessor functions
2023-01-21 12:37:09 -06:00
Folkert
905341d849
can for normal (no-list) as
2022-12-31 15:46:11 +01:00
Folkert
13d0b75bc1
Merge remote-tracking branch 'origin/main' into expect-print-values
2022-12-08 23:42:03 +01:00
Folkert
7c6cc97cd4
Merge remote-tracking branch 'origin/main' into expect-print-values
2022-12-02 20:28:04 +01:00
Ayaz Hafiz
0a807dc43e
Provide warning for defs that are used only in (mutual) recursion
...
This patch provides errors for defs that are used only in
possibly-mutual recursion, and are not reachable outside of their
recursive closures. For example:
```
test_report!(
mutual_recursion_not_reached_nested,
indoc!(
r#"
app "test" provides [main] to "./platform"
main =
f = \{} -> if Bool.true then "" else g {}
g = \{} -> if Bool.true then "" else f {}
""
"#
),
@r###"
── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─
These 2 definitions are only used in mutual recursion with themselves:
4│> f = \{} -> if Bool.true then "" else g {}
5│> g = \{} -> if Bool.true then "" else f {}
If you don't intend to use or export any of them, they should all be
removed!
"###
);
```
2022-12-02 11:50:12 -06:00
Ayaz Hafiz
34328ddf0c
Unused import
2022-12-02 08:50:04 -06:00
Ayaz Hafiz
078f0147ee
Do not bind accessors in toplevel thunks to their thunks' names
...
In #3352 an optimization to transform `ra = .field` into
```
ra = \#rcd -[ra]-> #rcd.field
```
rather than
```
__ra1 = \#rcd -[__ra1] -> #rcd.field
ra = LambdaSet { __ra1 }
```
was introduced. However, this optimization is not correct when `ra =
.field` is defined as a toplevel thunk, for in such situations we
indeed want the thunk `ra` to return the lambda set it resolves to,
rather than repointing at itself.
Besides reverting this change, another option would be to convert
accessors into closures before translation of Can to IR. However, this
complicates the translation algorithm more than it already is, and I'd
like to avoid additional special-cases.
Closes #4606
2022-12-02 08:50:03 -06:00
Folkert
1e41aac0f2
lookup symbols when coming from Defs
2022-12-02 15:43:48 +01:00
Folkert
1875176319
improve formatting
2022-11-23 23:16:37 +01:00
Folkert
dcb530d3af
Revert "toplevel debug"
...
This reverts commit 5ea8d96f3e
.
2022-11-23 20:29:55 +01:00
Folkert
5ea8d96f3e
toplevel debug
2022-11-23 20:29:45 +01:00
Richard Feldman
928495072c
Add dbg to sort_can_defs
2022-11-22 21:37:39 -05:00
Richard Feldman
49f8768271
Parse and format dbg
2022-11-22 21:08:26 -05:00
Joshua Warner
f4ce4bf983
Implement parsing for tuple accessor functions (.1, .2, etc)
...
Step 2 of N toward implementing #4465
2022-11-12 09:56:29 -05:00
Ayaz Hafiz
1b38cd0504
s/Type::Erroneous/Type::Error
2022-11-08 14:11:26 -06:00
Ayaz Hafiz
fd80f5b70e
Remove problem in alias instantiation
2022-11-08 14:11:24 -06:00
Ayaz Hafiz
c9953129cb
Remove problem storage in Type::Erroneous
2022-11-08 14:11:24 -06:00
Folkert
0b3492752f
fix expect not being canonicalized in certain positions
2022-11-05 21:13:50 +01:00
Folkert
66a1ba00eb
1.65 clippy fixes
2022-11-03 16:20:37 +01:00
Ayaz Hafiz
b0a8b85de3
Canonicalization of list patterns
2022-10-31 17:04:47 -05:00
Ayaz Hafiz
debe6332c5
Support OIOP for type aliases
2022-10-31 09:38:21 -05:00
Ayaz Hafiz
91dd47c5e4
Store OIOP variables in a unique buffer
2022-10-31 09:38:21 -05:00
Ayaz Hafiz
8d5678151d
Implement open-in-output-position for non-alias type annotations
2022-10-31 09:37:41 -05:00
Ayaz Hafiz
1e6181d2cb
New data structure for storing sorted abilities bound to a variable
2022-10-24 13:59:51 -05:00
Ayaz Hafiz
6bb97c92b9
Canonicalize multiple abilities bound to a type variable
2022-10-24 13:56:07 -05:00
Ayaz Hafiz
3f09de7052
Remove unused var
2022-10-23 20:47:43 -05:00
Ayaz Hafiz
59dfc4ab99
Move can-derived bodies to their own module
2022-10-23 20:47:43 -05:00