Jan Van Bruggen
431455dd1b
Rephrase web/terminal-related "platform" to "environment"
2022-09-11 10:25:02 -06:00
Ayaz Hafiz
c2452ff751
Lose rigidity of annotated optional fields before generalization
...
We have this idea of "rigid optional" fields to annotate record fields
that must necessarily be optional. That avoids the admission of programs
we cannot faithfully compile, like
```
f : {a: Str, b ? U64}
f = {a: "b", b: 1}
```
We want to lose the rigidity restriction when a generalized symbol is
used as at a specialized site; for example it should be possible to call
`f : {x ? Str} -> {}` with both `{}` and `{x : Str}`, neither of which
have a rigidly optional field unless they were to be annotated.
Prior to this commit we would loosen the rigidity restriction upon
specialization of a generalized type at a use site. However, what we
really want to do is apply the loosening during calculation of
generalization. The reason is that otherwise, we must make types that
would be ground (like `{x ? Str} -> {}`) generalized just for the sake
of the optional field annotation. But since the rigidity constraint is
irrelevant after an annotated body has been checked, we can loosen the
rigidity restriction then, which conveniently happens to coincide with
the generalization calculation.
Closes #3955
2022-09-06 17:44:04 -05:00
Folkert de Vries
3dbf6cc99b
Merge pull request #3859 from roc-lang/dependabot/cargo/insta-1.19.0
...
Bump insta from 1.18.2 to 1.19.0
2022-08-30 12:14:24 +02:00
Ayaz Hafiz
d016d5eeb9
Refine message
2022-08-23 10:39:51 -05:00
Ayaz Hafiz
92ce0c0662
Fix opaque typo
2022-08-23 10:39:51 -05:00
Ayaz Hafiz
cfc46c05ae
Turn on reporting test that works now
2022-08-23 10:39:51 -05:00
Ayaz Hafiz
e77e53f37b
Enable optional record field underivable error
2022-08-23 10:39:51 -05:00
Ayaz Hafiz
55fe1df995
Add more context to derivability errors when they happen
2022-08-23 10:39:50 -05:00
Ayaz Hafiz
d2b9cc056f
Record with optionally-typed fields cannot be derived for decoding
2022-08-23 10:38:30 -05:00
Ayaz Hafiz
958f64c8fc
Turn on reporting test for underivable record
2022-08-23 10:38:02 -05:00
Ayaz Hafiz
4ba132f7d0
Make sure inferring decode into nested function type is an error
2022-08-22 17:06:22 -05:00
dependabot[bot]
0f31f0f07a
Bump insta from 1.18.2 to 1.19.0
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.18.2 to 1.19.0.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.18.2...1.19.0 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-22 05:22:53 +00: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
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
dependabot[bot]
7ab742dd1a
Bump insta from 1.15.0 to 1.18.2
...
Bumps [insta](https://github.com/mitsuhiko/insta ) from 1.15.0 to 1.18.2.
- [Release notes](https://github.com/mitsuhiko/insta/releases )
- [Changelog](https://github.com/mitsuhiko/insta/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mitsuhiko/insta/compare/1.15.0...1.18.2 )
---
updated-dependencies:
- dependency-name: insta
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-13 16:49:28 +00:00
Richard Feldman
97e2900bf5
s/rtfeldman/roc-lang/g in links to GitHub repos
2022-08-12 15:24:09 -04: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
Folkert
5b10ebeeb7
Merge remote-tracking branch 'origin/trunk' into i2453
2022-08-11 10:44:26 +02:00
Folkert de Vries
ae0e90c8f3
Merge pull request #3738 from rtfeldman/i3444
...
Layout generation for recursive lambda sets
2022-08-11 10:22:07 +02:00
Ayaz Hafiz
6dc16521d3
Add illegal case of conditionally creating optional field
...
Closes #3687
2022-08-10 20:24:20 -07:00
Ayaz Hafiz
0bfbeed843
Use Str instead of U64
2022-08-10 20:24:20 -07:00
Ayaz Hafiz
8ccbceaa48
Update reporting tests
2022-08-10 20:24:20 -07:00
Ayaz Hafiz
af19df1a0a
Include optional/required mismatch for rigid optionals
2022-08-10 20:24:19 -07:00
Ayaz Hafiz
81bb889e93
Add RigidOptional record field variant
2022-08-10 20:24:18 -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
Ayaz Hafiz
5ebb85481c
Update reporting tests
2022-08-09 17:23:27 -07:00
Ayaz Hafiz
d22bd274fd
Check for infinite types of introduced variables before bodies
2022-08-09 14:09:51 -07:00
Ayaz Hafiz
d2015d51f2
Print all argument in tags when their argument lengths mismatch
...
Closes #3553
2022-08-09 12:46:53 -07:00
Ayaz Hafiz
8c87ae50c9
Wrap applied types in parens as appropriate
2022-08-09 12:31:01 -07:00
Ayaz Hafiz
3db07a5697
Reproduce #3553
2022-08-09 12:22:31 -07:00
Richard Feldman
26ee1a01bc
Merge pull request #3691 from rtfeldman/cargo_verson_change
...
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-05 09:13:04 -04:00
Richard Feldman
e685eba42b
fix tests
2022-08-03 19:50:17 -04:00
Anton-4
6a15a7b41b
changed Cargo versions from 0.1.0 to 0.0.1
2022-08-03 11:41:19 +02:00
Ayaz Hafiz
5d1198ae1f
Add more underivable decoding tests
2022-08-02 14:31:17 -05:00
Ayaz Hafiz
36969f0720
Print all derivable abilities
2022-08-02 14:31:17 -05:00
Ayaz Hafiz
4bbc6b74fc
Add derivability obligation checking for Decode
2022-08-02 14:31:16 -05:00
Ayaz
fa14146054
Merge pull request #3531 from rtfeldman/decode
...
Very basic Decode.roc in the standard library
2022-08-02 14:26:28 -05:00
Folkert de Vries
86a1a0f401
Merge pull request #3643 from rtfeldman/disjoint-able-variable-specialization
...
Disjoint able variable specialization algorithm
2022-08-02 20:31:47 +02:00
Ayaz Hafiz
e2f1417224
Update reporting test
2022-08-01 11:40:16 -05:00
Ayaz Hafiz
b87f09115c
Report opaques as opaques, not aliases
...
Closes #3313
Closes #3654
2022-08-01 08:02:56 -05:00
Ayaz Hafiz
2aa69cb3f1
Update test
2022-07-31 19:43:18 -05:00
Ayaz Hafiz
985c43b15b
Don't panic when weird things get into a record
...
Closes #3648
2022-07-31 19:43:18 -05:00
Ayaz Hafiz
4657a957f7
When storing variables, merge them directly with the target rather than unifying
...
When we unify two variables that end up merged, the rank of the
resulting content is the lower of the two variables being merged. But
during storage, we really do mean, take the target descriptor of the
type we're merging against, and don't try to lower to a
possibly-generalized rank! This fixes a couple bugs I didn't even
realize were present!
2022-07-29 14:53:14 -04:00
Ayaz Hafiz
0989b2cb82
Move solve problems to their own crate
2022-07-28 08:57:32 -04:00
Folkert de Vries
01eb161ffe
Merge pull request #3637 from rtfeldman/can-abilities4
...
Syntactic abilities: Part 4 - simplify obligation solving procedure
2022-07-28 11:32:11 +02:00
Folkert de Vries
21fe0ca559
Merge pull request #3639 from rtfeldman/expect-lists
...
Tests for expect output
2022-07-28 08:53:58 +02:00
Richard Feldman
c2865e39ff
Fix stack overflow in reporting
2022-07-27 15:22:36 -04:00
Folkert
e19b272a9e
test expect reporting
2022-07-27 13:51:12 +02:00
Richard Feldman
fa5bd442f8
Merge pull request #3635 from rtfeldman/joshuawarner32/multiline
...
Strip indents and the first/last newline from multiline strings
2022-07-26 22:09:58 -04:00
Ayaz Hafiz
bb14b649a2
Don't re-report obligations that we know were seen elsewhere
2022-07-26 20:46:35 -04:00