Ayaz Hafiz
54cc5e4c29
Unify let-introduction in a single path
...
Remove branches on determining how let-bindings are introduced to the
scope. This is maybe a little more inefficient, but I think it is a huge
simplification.
One additional change this required was changing how fx suffixes are
checked. The current implementation would add additional constraints for
patterns in let bindings conditionally. However, this is unnecessary. I
believe it is sufficient to check the fx suffix by running the checks on
all introduced symbols after the type is well known (i.e. the body is
checked).
2025-01-05 23:54:37 -05:00
Agus Zubiaga
a2f940be4e
Use byte literal instead of cast and ignore too_many_args
2024-11-07 18:54:22 -03:00
Agus Zubiaga
cfc4be5254
Treat untyped suffixed functions as effectful
2024-11-07 18:54:21 -03:00
Agus Zubiaga
af6fc6306f
Treat untyped unsuffixed functions as pure
2024-11-07 18:54:21 -03:00
Agus Zubiaga
e75b1cf7a0
Check suffixes of all pattern identifiers
2024-11-07 18:54:20 -03:00
Richard Feldman
8997c80573
Remove deprecated roc_collections::soa things
2024-10-21 23:17:20 -04:00
Richard Feldman
62b4fe6943
clippy
2024-10-21 22:10:43 -04:00
Richard Feldman
b2ea0b842c
Revert "Do some checked SoA stuff"
...
This reverts commit c79d7745f6eb345fd50a7cb4a2a7dd6fb6f8f1fc.
2024-10-21 22:10:43 -04:00
Richard Feldman
a8d3280b02
Do some checked SoA stuff
2024-10-21 22:10:42 -04:00
JRI98
f4551978ce
Handle multi pattern unbound list rest variables
2024-06-21 17:01:49 +01:00
Ayaz Hafiz
ee2a195525
s/loc_guard/loc_pattern
2023-05-24 13:12:47 -05:00
Ayaz Hafiz
815ae5df9d
Mark named destructures under records as open
2023-05-24 13:12:41 -05:00
Ayaz Hafiz
7fa508b3c8
Refactor headers_from_annotation to match over TypeTag
2023-04-10 15:44:11 -05:00
Joshua Warner
5a6be05ead
implement mono / lowering for tuples
2023-02-07 18:54:50 -08:00
Anton-4
f00a9b1748
Merge branch 'main' into rust1_65
...
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2023-01-17 20:14:44 +01:00
Anton-4
a97c53d7ca
1.65 changes and clippy fixes
2023-01-17 18:09:16 +01:00
Ayaz Hafiz
5fceb9ceb7
Push implicit openness vars through
2023-01-16 10:52:23 -06:00
Folkert
c2ddeb0de0
fix and test as pattern type inference
2023-01-08 16:40:03 +01:00
Folkert
57f2233278
cleanup
2023-01-08 15:47:56 +01:00
Folkert
905341d849
can for normal (no-list) as
2022-12-31 15:46:11 +01:00
Ayaz Hafiz
b30e8fc9b2
Remove Cells from Types
2022-11-15 09:00:16 -06:00
Ayaz Hafiz
a52e9d605d
Remove unneeded type storage in constraining
2022-11-14 15:15:21 -06:00
Ayaz Hafiz
5564796927
SoA Types get variable emplacement (!)
...
We're now reaching the steady state we want to be closert to - when a
type is translated to a variable, emplace the variable we created for it
in the type index, so that types are never converted again!
2022-11-14 15:15:19 -06:00
Ayaz Hafiz
b03a1d3efd
eliminate type
2022-11-11 21:16:27 -06:00
Ayaz Hafiz
689fc10308
Use variable instead of type
2022-11-11 21:16:26 -06:00
Ayaz Hafiz
721c4cb1e6
Use variable instead of type
2022-11-11 21:16:26 -06:00
Ayaz Hafiz
c66a0f53c6
Remove str_type
2022-11-11 21:16:24 -06:00
Ayaz Hafiz
f1180a1549
Byte deletion party
2022-11-11 21:16:23 -06:00
Ayaz Hafiz
6b5f632364
[skip-ci] Fix borrow issues in constraining
2022-11-11 21:16:22 -06:00
Ayaz Hafiz
59d2de5a55
Constrain with Types SoA, sans borrow checker
2022-11-11 21:16:05 -06:00
Ayaz Hafiz
51d813dae2
Index into constraining via trait
2022-11-08 09:00:51 -06:00
Ayaz Hafiz
24b6d4a3a9
constrain_pattern takes an expected index
2022-11-08 09:00:51 -06:00
Ayaz Hafiz
4e2eb67ff1
Surface constrain_expr takes an index
2022-11-08 09:00:50 -06:00
Ayaz Hafiz
a9bdbc968f
Fix constraining
2022-11-02 15:08:10 -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
283f6e8e1e
Give localized region for expected list elem pattern
2022-11-01 12:06:59 -05:00
Ayaz Hafiz
9ab5d0efb8
Constraining of list patterns
2022-10-31 17:05:08 -05:00
Ayaz Hafiz
b0a8b85de3
Canonicalization of list patterns
2022-10-31 17:04:47 -05:00
Ayaz Hafiz
debe6332c5
Support OIOP for type aliases
2022-10-31 09:38:21 -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 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
556222caa1
is_open_type expects type index
2022-10-24 17:51:39 -05:00
Ayaz Hafiz
0f0c02965a
pattern_presence expects type index
2022-10-24 17:49:02 -05:00
Ayaz Hafiz
0990eda0cb
equal_pattern_types takes type index
2022-10-24 17:41:13 -05:00
Ayaz Hafiz
55d7f3f658
Require type and expected indices in equal_types constraints
2022-10-24 14:05:19 -05:00
Ayaz Hafiz
6bb97c92b9
Canonicalize multiple abilities bound to a type variable
2022-10-24 13:56:07 -05:00
Ayaz Hafiz
619cd2f629
Infer ranged number for chars in patterns
2022-10-05 17:28:01 -05:00
Ayaz Hafiz
13b0ce7ca0
Make sure to apply "is-open" constraints at the very end of pattern constraining
...
Closes #3298
2022-07-22 12:57:27 -04:00