Commit Graph

195 Commits

Author SHA1 Message Date
Ayaz
c1c339dbdf
Merge pull request #4304 from roc-lang/i4259
Make sure type variables bound to abilities are instantiated in aliases
2022-10-14 16:07:58 -05:00
Ayaz Hafiz
20e4295eea
Make sure type variables bound to abilities are instantiated in aliases
Closes #4259
2022-10-14 13:56:00 -05:00
Ayaz Hafiz
12ecdab4c5
Add listGetUnsafe to Dict.roc rather than exposing from list 2022-10-14 13:43:31 -05:00
Ayaz Hafiz
6149c289fc
Update Eq symbols 2022-10-12 16:38:36 -05:00
Ayaz Hafiz
8d91370836
TODO is resolved 2022-10-12 16:38:36 -05:00
Ayaz Hafiz
b04d7a9471
Bind types passed to isNotEq to Eq 2022-10-12 16:38:36 -05:00
Ayaz Hafiz
a256947a9f
Move Eq to Bool 2022-10-12 16:37:51 -05:00
Ayaz Hafiz
bd5f5ed735
Old implementations can be overwritten before solving 2022-10-12 16:37:51 -05:00
Ayaz Hafiz
c618ced743
Replace Bool.isEq with Eq.isEq 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
3674f6861e
Compile derived structural equality 2022-10-12 16:37:49 -05:00
Ayaz Hafiz
7e79ff55f1
Serialize abilities store and solved implementations with subs 2022-10-11 10:31:21 -05:00
Ayaz Hafiz
46eb427393
Use roc_serialize in serializing abilities store, and add tests 2022-10-11 09:41:47 -05:00
Ayaz Hafiz
9131a55a72
First pass at serializing the abilities store 2022-10-10 19:32:17 -05:00
Ayaz
51c687df54
Merge branch 'main' into i4150
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-10-08 16:08:35 -05:00
Ayaz
9d05bcd9d8
Merge pull request #4237 from snprajwal/str-withcapacity
builtin(str): implement Str.withCapacity
2022-10-08 14:31:30 -05:00
Ayaz
fae90c9fd2
Merge pull request #4187 from roc-lang/ranged-char-literal
Single-quote literals behave like ranged numbers
2022-10-07 15:05:09 -05:00
Prajwal S N
9013e4ce11
builtin(str): implement withCapacity
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-08 00:24:46 +05:30
Ayaz Hafiz
d9207137e8
Implement Num.isZero as a low-level
This will be needed ahead of the `Eq` ability.

Closes #4223
2022-10-05 19:47:29 -05:00
Ayaz Hafiz
619cd2f629
Infer ranged number for chars in patterns 2022-10-05 17:28:01 -05:00
Ayaz Hafiz
178b634266
Treat single quote literals as ranged numbers for inference purposes 2022-10-05 17:28:00 -05:00
Ayaz Hafiz
61cf8e53e6
Have FunctionOrTagUnion include multiple possible tags 2022-10-05 17:24:52 -05:00
Ayaz Hafiz
92b754f292
Illegal self recursion on toplevel defs
Closes #4153
2022-10-03 13:14:56 -05:00
Ayaz Hafiz
f745debc73
Fix scope tests 2022-09-30 13:40:34 -05:00
Ayaz Hafiz
92aa0912ea
Report unused imports in modules 2022-09-30 13:40:34 -05:00
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