Commit graph

254 commits

Author SHA1 Message Date
Ayaz Hafiz
191798cfd6
Address clippy 2022-11-08 09:00:25 -06:00
Ayaz Hafiz
b735188542
Life is short, no need to spell it out 2022-11-08 09:00:25 -06:00
Ayaz Hafiz
09ec545995
Fix indent 2022-11-08 09:00:25 -06:00
Ayaz Hafiz
e240b18b27
Recover Erroneous in type 2022-11-08 09:00:25 -06:00
Ayaz Hafiz
58020a55d6
Type to variable through Types SoA 2022-11-08 09:00:24 -06:00
Ayaz Hafiz
dad9a8e537
Pass Types SoA repr in types to Variable translation 2022-11-08 09:00:24 -06:00
Folkert
66a1ba00eb
1.65 clippy fixes 2022-11-03 16:20:37 +01:00
Ayaz Hafiz
3362763e45
Coalesce signature types in value def constraining 2022-11-02 15:05:41 -05:00
Ayaz Hafiz
34cd1fb825
Pattern expectation takes a type index 2022-11-02 15:05:40 -05:00
Ayaz Hafiz
2a4fca7034
First pass at expectations taking a type index 2022-11-02 15:05:22 -05:00
Ayaz Hafiz
6dc6386f77
DefTypes store slices into type indeces 2022-11-02 15:05:01 -05:00
Ayaz Hafiz
99a4e21618
Improve exhaustiveness checking heuristics for list patterns 2022-11-01 12:07:00 -05:00
Ayaz Hafiz
fbdf76e490
Report type errors in list pattern matches 2022-11-01 12:06:59 -05:00
Ayaz Hafiz
5e891a3501
Add comment on when heuristic can be removed 2022-10-31 09:48:25 -05:00
Ayaz Hafiz
9854f5f2ac
Print alias's underlying structures if OIOP vars are material 2022-10-31 09:38:22 -05:00
Ayaz Hafiz
debe6332c5
Support OIOP for type aliases 2022-10-31 09:38:21 -05:00
Ayaz Hafiz
cfe7c8e5ef
Warn on the presence of unnecessary wildcards in output positions 2022-10-31 09:38:20 -05:00
Ayaz Hafiz
bb1f4cd5e8
Fix bug in closing heuristic 2022-10-31 09:37:40 -05:00
Ayaz Hafiz
7b9ce492c3
Better estimate polarity in exhaustiveness checking 2022-10-31 09:37:40 -05:00
Ayaz Hafiz
69114cc820
Apply a heuristic for opening/closing types before exhaustiveness checking 2022-10-31 09:37:40 -05:00
Ayaz Hafiz
f3623b1e47
Close extension types extended wiht uninhabited types after their extension 2022-10-31 09:37:40 -05:00
Ayaz Hafiz
4d48ea7c2f
Materialize extension variable polarity in error type reporting 2022-10-31 09:37:40 -05:00
Ayaz Hafiz
d77080529a
Introduce polarity for extension variable printing 2022-10-31 09:37:39 -05:00
Folkert de Vries
02a76bb8bd
Merge pull request #4399 from roc-lang/no-types-in-constraining-api
Have most constraining APIs take a type index rather than `Type`
2022-10-26 19:45:55 +02:00
Ayaz
316ae7d30b
Merge pull request #4398 from roc-lang/emplace-type-variables
Leave variables behind when converting `Type`s to variables
2022-10-26 12:41:55 -05:00
Ayaz Hafiz
a4d7ee33c1
Apply lints 2022-10-24 18:23:36 -05:00
Ayaz Hafiz
97d47cc05f
includes_tag expects type index 2022-10-24 18:08:45 -05:00
Ayaz Hafiz
1f498b52d5
Better name solve test 2022-10-24 14:02:38 -05:00
Ayaz Hafiz
0642952d05
Remove some resolved todos 2022-10-24 14:00:46 -05:00
Ayaz Hafiz
66e75b8660
Simplify instantiation of bound able variables in non-delayed aliases 2022-10-24 14:00:46 -05:00
Ayaz Hafiz
3f5a86ded3
Update ability bindings 2022-10-24 14:00:46 -05:00
Ayaz Hafiz
0da72df5e9
Add ability slice to eq obligation checker 2022-10-24 14:00:46 -05:00
Ayaz Hafiz
3bd10698cf
Allow rigid able to unify with flex able when rigid bounds are a superset 2022-10-24 14:00:45 -05:00
Ayaz Hafiz
0a96a93a67
Add test for inferring multiple ability bounds 2022-10-24 14:00:44 -05:00
Ayaz Hafiz
9c88534758
Obligation checking layers on extra abilities bound to a variable 2022-10-24 13:59:52 -05:00
Ayaz Hafiz
1e6181d2cb
New data structure for storing sorted abilities bound to a variable 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
229548571b
Represent "able" variables with slices of abilities 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
0f0678ce73
s/closure_names/symbol_names/g in subs 2022-10-24 13:59:51 -05:00
Ayaz Hafiz
6bb97c92b9
Canonicalize multiple abilities bound to a type variable 2022-10-24 13:56:07 -05:00
Ayaz Hafiz
35a4781045
Get rid of redundant references 2022-10-24 13:13:08 -05:00
Ayaz Hafiz
9b24205906
Emplace variables made from types in expectations 2022-10-24 13:11:35 -05:00
Ayaz Hafiz
04a3f1c00e
Use a helper to emplace type cells 2022-10-24 12:07:00 -05:00
Ayaz Hafiz
d3e14550d8
Leave variables behind when converting Types to variables
This is part one of addressing the present issues with emplacing type
directly where type variables should be reused. Now, when an
`Index<Type>` is converted to a variable in solving, we leave the
converted variable in the `Type`'s place. Specifically, we keep an index
to a `Cell<Type>`.

Note that this transformation is only temporary, it will be removed once
we merge this with the `Type` SoA representation, but it is needed in
the meantime as I transform the `Constrain` API to get rid of
type-emplacement.
2022-10-24 11:42:35 -05:00
Ayaz Hafiz
e75f3c3c79
Get rid of MemberImpl::Derived
We don't need this anymore, since derived members become Impls during
canonicalization now!
2022-10-23 20:48:07 -05:00
Ayaz Hafiz
1d885c4ab2
Support deriving Decode for opaques 2022-10-23 20:48:06 -05:00
Ayaz Hafiz
c4f9aa6fe6
Add deriving toEncoder for opaques 2022-10-23 20:47:42 -05:00
Ayaz Hafiz
83813afeaf
Derive Eq for opaques 2022-10-23 20:46:56 -05:00
Ayaz Hafiz
40e05d5a00
Add support for deriving Hash for opaques 2022-10-23 20:46:56 -05: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