Commit graph

19511 commits

Author SHA1 Message Date
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
Folkert de Vries
52f0dfbaf4
Merge pull request #4051 from roc-lang/i4047
Allow any numeric range to become a float
2022-09-16 18:54:11 +02: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
Anton-4
57681be542
Merge pull request #4036 from roc-lang/debug-upload
remove upload for debugging
2022-09-16 13:34:26 +02:00
Folkert de Vries
525cde8c48
Merge pull request #4040 from roc-lang/bitcast-recursive-ptr
Complex bitcast recursive tag union pointers when we need them to be opaque
2022-09-15 20:07:25 +02: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
Richard Feldman
166be98ac8
Merge pull request #3752 from roc-lang/arg-parser
Arg parsing for the CLI platform
2022-09-14 11:47:51 -07:00
Ayaz Hafiz
c9e73b6761
Change example to be a calculator 2022-09-14 12:06:35 -05:00
Ayaz Hafiz
faeb3358eb
Add an I64 parser 2022-09-14 11:46:25 -05:00
Ayaz Hafiz
a91a9b7e79
Use empty strings to represent missing values 2022-09-14 11:41:48 -05:00
Anton-4
1a73af844f
remove upload for debugging
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-09-14 18:35:08 +02:00
Anton-4
2e5fa030ab
Merge pull request #4034 from roc-lang/macos-nightly-time-limit
increase macos x86 nightly timelimit
2022-09-14 18:28:17 +02:00
Ayaz Hafiz
e7b216fa30
Fix docs link 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
93f0a0eeb9
Add documentation 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
ed78848737
Reset file/err.roc 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
d460fc76d3
Lift commands 2022-09-14 11:26:53 -05:00
Ayaz Hafiz
e39fccb0fa
Add cli run test 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
89e70fea4b
Format 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
1bbe56248c
Simplify subparser mapping 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
d9a94a36c5
Flip subCommand order 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
24885e99bc
Format 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
664bcdff33
Improve error message 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
40f5cad578
Add help to named program 2022-09-14 11:26:52 -05:00
Ayaz Hafiz
4b7c11cb2d
Format command help with headings 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
d448083e7a
Use named parser in example 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
812081eefe
named function to create NamedParser 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
990c912abd
Chain named 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
4999e391ee
Flip name order 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
5ea56beae1
Name parsers 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
bf204dcce8
Have parse take program name 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
487ecee143
Expand arg cli example 2022-09-14 11:26:51 -05:00
Ayaz Hafiz
0672a591b6
Expose subCommand, choice 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
7d2249364f
Rename apply to withParser 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
dd88af75c9
Error handling for subcommands 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
391c87b50b
Initial support for subcommands 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
6d1a903841
Remove Default for now 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
2e1d99299f
Use parseFormatted 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
04fd4412fd
Expose apply 2022-09-14 11:26:50 -05:00
Ayaz Hafiz
44772b8f3d
Don't add to host exposed during roc test 2022-09-14 11:26:50 -05:00