Ayaz Hafiz
5f117be306
Improve error message when shadowing builtin type
...
Closes #3109
2022-09-30 13:40:34 -05:00
Ayaz Hafiz
6832d4054f
Better name imported
symbols to apply
or hint
symbols
2022-09-30 13:40:33 -05:00
Ayaz Hafiz
01815ad23f
Ability impls that don't shadow can end up resolving to the member def
2022-09-21 12:29:06 -05:00
Ayaz Hafiz
67d0a3d36f
Symbol resolution of ability members can come from unique defs or unique shadows
2022-09-21 12:29:06 -05:00
Ayaz
211c297230
Merge pull request #4041 from KilianVounckx/opaque-bool
...
Opaque bool
2022-09-21 11:15:41 -05:00
Ayaz Hafiz
e3c91e1d4d
Can tests
2022-09-20 14:42:09 -05:00
Ayaz Hafiz
29244112df
Handle optional record fields in record pattern indexing
2022-09-19 13:51:16 -05:00
Ayaz Hafiz
1799d6ed0e
Construct exhaustiveness branches with condition, not branch, variable
...
Previously we would construct the shapes of unions used in the pattern
tree for exhaustiveness checking using the type of the branch patterns,
rather than the type of the condition variable. Clearly we want to
always use the condition variable, otherwise some branches will be
seen as exhaustive, when they are not!
To do this, we now index into the condition variable while refying the
patterns to build the tree for exhaustiveness checking.
Closes #4068
2022-09-19 13:37:59 -05:00
Ayaz Hafiz
0f0e414272
Improve error message for uninhabited patterns
2022-09-19 10:55:02 -05:00
Ayaz Hafiz
147636f42b
Base reported row numbers on original rows, not reified rows
2022-09-19 10:47:35 -05:00
Ayaz Hafiz
8a42d60ca2
Move inhabited check to subs module
2022-09-19 10:08:18 -05:00
Ayaz Hafiz
ac752adc7c
Check in some more work
2022-09-16 16:09:21 -05:00
Ayaz Hafiz
6adb88beee
Report uninhabited branches as redundant
2022-09-16 15:55:46 -05:00
Ayaz Hafiz
0d98abae7b
Clippy
2022-09-16 15:39:09 -05:00
Ayaz Hafiz
1d7aef8c96
Don't include uninhabited constructors in exhaustiveness checking
2022-09-16 15:36:54 -05:00
dependabot[bot]
0079048944
Bump bumpalo from 3.10.0 to 3.11.0
...
Bumps [bumpalo](https://github.com/fitzgen/bumpalo ) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/fitzgen/bumpalo/releases )
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md )
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.10.0...3.11.0 )
---
updated-dependencies:
- dependency-name: bumpalo
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 21:08:56 +00:00
dependabot[bot]
d1c406812f
Bump pretty_assertions from 1.2.1 to 1.3.0
...
Bumps [pretty_assertions](https://github.com/rust-pretty-assertions/rust-pretty-assertions ) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/rust-pretty-assertions/rust-pretty-assertions/releases )
- [Changelog](https://github.com/rust-pretty-assertions/rust-pretty-assertions/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-pretty-assertions/rust-pretty-assertions/compare/v1.2.1...v1.3.0 )
---
updated-dependencies:
- dependency-name: pretty_assertions
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-09-12 05:28:00 +00:00
Folkert de Vries
51d5aa789a
Merge pull request #3870 from roc-lang/dev-backend-div
...
add int/float division to the dev backend
2022-08-25 09:03:19 +02:00
Folkert
7eb24aa160
fix merge conflict
2022-08-23 16:47:35 +02:00
Folkert
a22e04361c
Merge remote-tracking branch 'origin/main' into expect-fx-codegen
2022-08-23 16:28:21 +02:00
Folkert
2d366acc6e
split out int and frac division into separate lowlevels
2022-08-23 11:07:38 +02:00
Ayaz Hafiz
b30c90b500
Don't suggest removing variable when it's bound in a branch pattern
...
Instead, suggest prefixing it with an underscore, or replacing with an
underscore.
Closes #3820
2022-08-19 22:21:44 -05:00
Richard Feldman
0ba5b3cfc6
Merge pull request #3711 from roc-lang/record-decoding
...
Record decoding and their derivers
2022-08-15 22:06:34 -04:00
Richard Feldman
7e12bcff1d
Rename variant_var to tag_union_var
2022-08-15 11:11:32 -05:00
dependabot[bot]
4c6ad52c47
Bump indoc from 1.0.6 to 1.0.7
...
Bumps [indoc](https://github.com/dtolnay/indoc ) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/dtolnay/indoc/releases )
- [Commits](https://github.com/dtolnay/indoc/compare/1.0.6...1.0.7 )
---
updated-dependencies:
- dependency-name: indoc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 13:18:18 +00:00
Ayaz Hafiz
c0969e5ff8
Reuse allocations in fixing closures
2022-08-13 10:38:53 -07:00
Ayaz Hafiz
d19c9107b2
swap_remove rather than removing in place
2022-08-13 10:30:58 -07:00
Ayaz Hafiz
991b99250c
Clippy
2022-08-13 10:25:18 -07:00
Ayaz Hafiz
6bcd682dde
Support captures between mutually recursive closures
2022-08-13 10:25:18 -07:00
Ayaz Hafiz
e97ce32b88
Fixup transient closure captures during canonicalization
...
Closure captures can be transient, but previously, we did not handle
that correctly. For example, in
```
x = ""
inner = \{} -> x
outer = \{} -> inner {}
```
`outer` captures `inner`, but `inner` captures `x`, and in the body of
`outer`, we would not construct the closure data for `inner` correctly
before calling it.
There are a couple ways around this.
1. Update mono to do something when we are passed the captured
environment of a closure, rather than attempting to construct a
call-by-name's captured environment before callign it.
2. Fix-up closures during canonicalization to remove captured closures
that themselves capture, and replace them with their captures.
This patch does (2), since (1) is much more involved and is not likely
to bring a lot of wins. In general I think it's reasonable to expect
captured environments, even if transient, to be fairly shallow, so I
don't think this will produce very large closure environments.
Closes #2894
2022-08-13 10:25:17 -07:00
Folkert
3aa4ebb02f
get expect-fx to actually run
2022-08-12 23:03:01 +02:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04:00
Folkert
7e6a3ddc15
more boilerplate
2022-08-12 13:50:06 +02:00
Folkert de Vries
0798f787c5
Merge pull request #3736 from rtfeldman/i3687
...
Creation of a record whose type has an optional value is an error
2022-08-11 15:51:41 +02:00
Ayaz Hafiz
b3d4c8f09b
Parse explicit optional field types as rigid optionals
2022-08-10 20:24:19 -07:00
Ayaz Hafiz
fdb79da5a8
Report anonymous functions as "this function" rather than symbol name
...
Closes #2453
Thanks for the assist @chris-packett
2022-08-10 15:26:52 -07:00
Folkert
7c9b1897bb
fully canonicalize expect-fx
2022-08-09 14:50:24 +02:00
Folkert
bcbc8b4d50
basic canonicalization
2022-08-09 13:59:24 +02:00
Folkert
6bf3e80f51
remove some sendmap usage
2022-08-06 20:00:39 +02:00
Anton-4
6a15a7b41b
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-03 11:41:19 +02:00
Folkert de Vries
5061a67534
Merge pull request #3642 from rtfeldman/can-abilities6
...
Syntactic abilities: Part 6 - eager lambda set specialization, and fix ability let-generalization
2022-08-01 23:57:56 +02:00
Ayaz Hafiz
b87f09115c
Report opaques as opaques, not aliases
...
Closes #3313
Closes #3654
2022-08-01 08:02:56 -05:00
Ayaz Hafiz
41eb3ad9a4
Separate ability members and their specializations in reference checking
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
4049eb6780
Remove unused OpportunisticResolve field
2022-07-29 08:43:19 -04:00
Ayaz Hafiz
6b9c1cb690
Check whether opaque implements ability using store
2022-07-26 20:46:35 -04:00
Ayaz Hafiz
28c1a4cb95
Use ImplKey in abilities store public API
2022-07-26 20:46:33 -04:00
Ayaz
6b6f240acb
Merge pull request #3589 from rtfeldman/can-abilities3
...
Canonicalize syntactic abilities: Part 3 - solving
2022-07-25 21:48:14 -05:00
Folkert de Vries
d212dffa1a
Merge pull request #3616 from rtfeldman/i3614
...
Compile branches in the presence of degenerate patterns
2022-07-25 19:45:36 +02:00
Ayaz Hafiz
10db3f8574
Detect ability specializations that overload different opaque types
2022-07-25 11:35:20 -04:00
Ayaz Hafiz
51bce825fb
Properly record all erroring ability implementations
2022-07-25 11:30:03 -04:00