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
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
041b91e031
Add more test cases
2022-09-19 10:45:31 -05:00
Ayaz Hafiz
be853b65c5
Support unification of extension types with uninhabited branches
2022-09-19 10:32:39 -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
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
Ayaz Hafiz
8cd4281173
Complex bitcast recursive tag union pointers when we need them to be opaque
...
Resolves a discussion on Zulip: https://roc.zulipchat.com/#narrow/stream/231635-compiler-development/topic/When.20recursive.20structs.20aren't.20recursive
2022-09-14 20:58:54 -05:00
Folkert de Vries
4b0342ef34
Merge pull request #4039 from roc-lang/fix-expect-oom
...
Copy list values from the correct offset when reporting expects
2022-09-14 22:51:57 +02:00
Ayaz Hafiz
fa700259aa
Clippy
2022-09-14 14:53:00 -05:00
Ayaz Hafiz
c4a3a8bd31
Copy list values from the correct offset when reporting expects
...
Co-authored-by: Folkert de Vries <folkert@folkertdev.nl>
2022-09-14 14:28:56 -05:00
Folkert de Vries
c218543408
Merge pull request #4033 from roc-lang/i4028
...
Span body of last branch in exhaustiveness checking
2022-09-14 21:24:23 +02:00
Ayaz Hafiz
c9e73b6761
Change example to be a calculator
2022-09-14 12:06:35 -05:00
Ayaz Hafiz
e39fccb0fa
Add cli run test
2022-09-14 11:26:52 -05:00
Ayaz Hafiz
6a83babaf3
Don't write extra newline if it's already there
2022-09-14 11:26:52 -05:00
Ayaz Hafiz
44772b8f3d
Don't add to host exposed during roc test
2022-09-14 11:26:50 -05:00
Ayaz Hafiz
0c2b0b1bcc
Unwrap recursion var
2022-09-14 11:26:49 -05:00
Ayaz Hafiz
31b894d027
Remove region when normalizing expects
2022-09-14 11:26:48 -05:00
Ayaz Hafiz
274f40e4e1
Print on unreachable
2022-09-14 11:26:47 -05:00
Ayaz Hafiz
a8282f36c3
Handle values that are functions in expects
2022-09-14 11:26:46 -05:00
Richard Feldman
21f3d4b8bc
Merge pull request #3990 from roc-lang/pass-args-to-cli
...
Pass args from cli platform to app
2022-09-14 08:43:13 -07:00
Anton-4
f1e799c6da
removed debug stuff, legacy linker for args test
2022-09-14 16:25:24 +02:00
Anton-4
412e7efdc8
use legacy linker for cli_run tests
2022-09-14 13:45:16 +02:00
Brian Carroll
6613e9d347
Merge pull request #4029 from roc-lang/disable-web-repl-until-loaded
...
Disable Web REPL input until the compiler .wasm has loaded
2022-09-14 05:36:31 +01:00
Richard Feldman
ac68d75eec
Merge pull request #3989 from roc-lang/fix-glue-segfault
...
Fix glue segfault for newtype wrappers around recursive tag unions
2022-09-13 13:47:51 -07:00
Ayaz Hafiz
42633c1f96
Span body of last branch in exhaustiveness checking
...
Closes #4028
2022-09-13 16:24:59 -04:00
Folkert de Vries
3ee3f23836
Merge pull request #3971 from roc-lang/dependabot/cargo/bumpalo-3.11.0
...
Bump bumpalo from 3.10.0 to 3.11.0
2022-09-13 21:00:00 +02:00
Anton-4
d85090d85b
Merge pull request #4027 from roc-lang/eprintln-comment
...
eprintln comment
2022-09-13 13:28:09 +02:00
Anton-4
6186b0ff11
further clarified log comment
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-09-13 12:37:20 +02:00
Folkert de Vries
bed73f5b2e
Merge pull request #3986 from roc-lang/pe-dynamic-relocations
...
find and decode the dynamic relocations in .exe files
2022-09-13 10:28:54 +02:00
Richard Feldman
ddbfd48ca3
Merge branch 'main' into pass-args-to-cli
2022-09-12 23:53:55 -04:00
Richard Feldman
620a3feb75
Add some tests for Str.replace___ functions
2022-09-12 21:05:50 -06:00
Richard Feldman
4ed63c548b
Fix type mismatches in Str.replace___ functions
...
...and fix/finish the draft `Str.replaceEach` implementation!
Don't be so modest, Richard :)
2022-09-12 21:05:38 -06:00
Richard Feldman
c64874937f
Add entries for Str.replace___ functions to Symbol
2022-09-12 21:03:18 -06:00
Jan Van Bruggen
9ef57f86ac
Add first draft of Str.replaceEach
builtin
2022-09-12 21:03:11 -06:00
Jan Van Bruggen
2b65659a11
Add Str.replaceLast
builtin
2022-09-12 20:37:23 -06:00
Jan Van Bruggen
c5b6aef21a
Add Str.replaceFirst
builtin
2022-09-12 20:37:23 -06:00
Richard Feldman
791340e2ae
Don't have docs print unnecessary parens or spaces
2022-09-12 20:32:46 -04:00
Richard Feldman
0a3a9584c4
Don't put spaces in types in docs
2022-09-12 20:32:46 -04:00
Richard Feldman
75a0eeacc7
Don't hardcode "roc/builtins 1.0.0" in docs
2022-09-12 20:32:45 -04:00
Brian Carroll
2b3e386345
www: Disable Web REPL input until the compiler .wasm has loaded
2022-09-12 23:00:22 +01: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