Commit graph

1160 commits

Author SHA1 Message Date
Luke Boswell
f3bdb5f321
updating rust package documentation 2022-11-03 20:00:06 +11:00
Ayaz Hafiz
d114d410cb
Compile expect conditions with bool type, not continuation type 2022-11-02 16:02:39 -05:00
Folkert
c9aedff3e8
glue getters in mono 2022-11-02 21:36:32 +01:00
Ayaz Hafiz
fc52e9582e
Fix an off-by-one modelling 2022-11-01 22:42:52 -05:00
Ayaz Hafiz
63abc4096d
Remove stale TODOs 2022-11-01 22:36:52 -05:00
Ayaz Hafiz
2d20c3b339
Allow too many args 2022-11-01 15:42:24 -05:00
Ayaz Hafiz
822aa71a0a
Compute list element stores lazily 2022-11-01 15:37:36 -05:00
Ayaz Hafiz
27b9dd8253
Simplify arity and branching calculation 2022-11-01 15:33:23 -05:00
Ayaz Hafiz
0706615d29
Decision tree compilation of suffixed list patterns 2022-11-01 15:22:31 -05:00
Ayaz Hafiz
45f7cd5ad7
Make sure to update path of matched list 2022-11-01 15:22:31 -05:00
Ayaz Hafiz
ae71c7efe2
Decision tree compilation of list patterns 2022-11-01 15:22:31 -05:00
Ayaz
da1d937277
Merge pull request #4352 from roc-lang/i4349
Support monomorphic captures of body-polymorphic expressions in closures
2022-11-01 15:21:30 -05:00
Ayaz Hafiz
b0a8b85de3
Canonicalization of list patterns 2022-10-31 17:04:47 -05:00
Ayaz Hafiz
0f0678ce73
s/closure_names/symbol_names/g in subs 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
5164994fb5
Do not attempt to lookup functions in expects
Functions are not useful to print in expect results, because they are
only printed opaquely as `<function>`. Moreover, their transformation to
closure sets during mono can be extremely lossy, up to and including the
elision of symbols for function closure symbols. As such, simply do not
attempt to lookup or print functions referenced in expects.

Closes #4389
2022-10-24 10:28:56 -05:00
Ayaz Hafiz
b51816d5ef
Improve documentation and structure of UseDepth 2022-10-23 20:44:04 -05:00
Ayaz Hafiz
ee8e718cc1
Support monomorphic captures of polymorphic expressions in closures
Closes #4349
2022-10-23 20:44:03 -05:00
Richard Feldman
f734cc11c2
Merge pull request #4364 from travisstaloch/str-graphemes
Str graphemes
2022-10-22 22:31:50 -07:00
Prajwal S N
df7e4eea7e
builtin(str): implement Str.graphemes
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2022-10-22 19:29:49 -07:00
Folkert de Vries
be624f8bcb
Merge pull request #4359 from roc-lang/i4313
Disallow typing optional fields when required fields are annotated
2022-10-23 01:20:55 +02:00
Ayaz Hafiz
05e8e6de6f
Disallow typing optional fields when required fields are annotated
Closes #4313
2022-10-18 15:50:20 -05:00
Ayaz Hafiz
d26e9c81e0
Resolve ability specializations looked up in expects 2022-10-17 17:56:48 -05:00
Ayaz Hafiz
8aee32830a
Add symbols' localized type variable to the AST 2022-10-17 17:35:48 -05:00
Ayaz
e471f4b388
Merge pull request #4290 from roc-lang/impl-eq
Add the `Eq` ability
2022-10-13 16:13:51 -05:00
Ayaz Hafiz
729f0a8e27
Remove return on unreachable result 2022-10-12 16:37:50 -05:00
Ayaz Hafiz
bc2f4569aa
Able variables that are never used can become void 2022-10-12 16:37:50 -05:00
Ayaz Hafiz
53514141f6
Layer thunk assignment over def body instead of returning immediately 2022-10-12 10:36:57 -05:00
Ayaz Hafiz
a68c63f1d1
Correctly destructure patterns that are assigned to a thunk'd value
Closes #4309
2022-10-12 09:23:48 -05:00
Ayaz
83b64c4fb3
Merge pull request #4209 from roc-lang/impl-tag-discriminant
Derive `Hash` implementations for tag unions
2022-10-10 22:23:05 -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
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
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
792afe5457
Remove TagDiscriminant low-level 2022-10-05 13:00:45 -05:00
Ayaz Hafiz
251b3865d9
Implement tag union discriminant extraction for byte- and newtype-variants 2022-10-04 18:04:46 -05:00
Ayaz Hafiz
fd54cdfdd1
Low-level to extract discriminant from a tag union 2022-10-04 16:17:05 -05:00
Ayaz Hafiz
f2c30a699c
Remove stray dbg 2022-10-04 14:09:40 -05:00
Ayaz Hafiz
5b833e57b5
Support derivation of Hash for Str and List 2022-10-04 14:09:40 -05:00
Ayaz
211c297230
Merge pull request #4041 from KilianVounckx/opaque-bool
Opaque bool
2022-09-21 11:15:41 -05:00
Ayaz Hafiz
b3167ad49b
Clippy 2022-09-20 14:42:08 -05:00
Ayaz Hafiz
447e1492e1
Work around symbol specializations not getting captured 2022-09-20 14:42:08 -05:00
Ayaz Hafiz
b797e9c0c8
Admit non-trivial holes 2022-09-20 14:42:08 -05:00
Ayaz Hafiz
2f7020aa31
Eliminate voided branches only after resolving their bodies' specializations 2022-09-20 08:35:10 -05:00
Ayaz Hafiz
f41936d5e5
Unwrap layouts containing void layouts as newtypes
Addresses the attempt to do so in https://github.com/roc-lang/roc/pull/3465

Co-authored-by: Folkert <folkert@folkertdev.nl>
2022-09-19 16:50:49 -05:00
Folkert
639c1e5fa3
get rid of UnitWithArguments 2022-09-19 16:49:55 -05:00
Ayaz Hafiz
d2cc1041aa
Unused import 2022-09-16 10:25:31 -05:00
Ayaz Hafiz
a81d4d4be2
Allow any numeric range to become a float
Currently things like `1 / 200` lead to a miscompilation because we type
`200` (and as a result, both `1` and the division result) as a ranged
number with width >= U8. During mono that forces the number to become an
`I64` because our logic was that a ranged number can only become a float
if it's at least as wide as an I8. But this is incorrect; as long as the
type is wrapped in `Frac` constructor and it's a ranged number (and not
a ranged int), it should become a fractional type.

```
» 1 / 200

0.005 : Float *
```

Closes #4047
2022-09-16 10:05:43 -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