Commit graph

3861 commits

Author SHA1 Message Date
J.Teeuwissen
03149dfd89
match 2023-04-18 07:22:47 +02:00
J.Teeuwissen
363e2e1074
Merge branch 'main' into Frame-Limited 2023-04-18 07:19:54 +02:00
Folkert de Vries
2f42a74af3
Merge pull request #5297 from JTeeuwissen/default-branch-tag-id-unwrapped
Default branch nullable tag id
2023-04-17 14:30:36 +02:00
J.Teeuwissen
67b4efc951
special NullableId check 2023-04-17 14:27:11 +02:00
Folkert
c848a85eb4
fix index bug in recursive decrements 2023-04-17 14:22:27 +02:00
Folkert
e0b5a76a04
correct alignment calculation in RC code 2023-04-17 13:53:54 +02:00
J.Teeuwissen
c8ec17f782
drop dead join 2023-04-17 12:38:41 +02:00
J.Teeuwissen
ca45e3c9f9
replaced most iter::once 2023-04-16 19:58:28 +02:00
J.Teeuwissen
10de47db50
SymbolRcTypes two sets 2023-04-16 19:40:45 +02:00
J.Teeuwissen
f0a1842697
Resolving nitpicky ;) comments 2023-04-16 19:34:07 +02:00
J.Teeuwissen
36e83fca1c
updated tests 2023-04-16 16:34:41 +02:00
J.Teeuwissen
a4ca864fe3
fixed test 2023-04-16 13:35:35 +02:00
J.Teeuwissen
9d4c3bcfb9
undid inlining 2023-04-15 17:41:10 +02:00
J.Teeuwissen
3c5a978bbe
fixed borrow/owned 2023-04-15 14:55:40 +02:00
Richard Feldman
412e199939
Merge pull request #5266 from lukewilliamboswell/docs
Add documentation for `Decode` builtin
2023-04-14 16:46:35 -04:00
J.Teeuwissen
6ece065504
implementing feedback 2023-04-13 15:54:30 +02:00
J.Teeuwissen
5f7f9b766b
inline lowlevel in rc 2023-04-13 12:26:05 +02:00
Ayaz
77cf60b866
Merge pull request #5286 from roc-lang/i5264
Freshly instantiate nested recursion variables under aliases and opaques
2023-04-12 18:27:37 -05:00
Ayaz
8739099bdc
Merge pull request #5288 from roc-lang/i4725
Do not replace already-recursive lambda sets in occurs checks
2023-04-12 17:08:34 -05:00
Ayaz Hafiz
87a36e62bf
Do not replace already-recursive lambda sets in occurs checks
If a lambda set appears in an occurs chain but it is itself already
recursive, then it is should not be eligibil for modification in the
occurs chain.

Closes #4725
2023-04-12 16:13:30 -05:00
Ayaz Hafiz
4894587a14
Inline singly-used function 2023-04-12 14:39:50 -05:00
Ayaz Hafiz
d3ab9ab926
Freshly instantiate nested recursion variables under an opaque type 2023-04-12 14:31:19 -05:00
Ayaz Hafiz
3d6353dbd2
Add reproduction of recursion var instantiation under opaque that's failing 2023-04-12 14:14:11 -05:00
Ayaz Hafiz
40fc920b5e
Drop recursion var instantiation in the wrong spot 2023-04-12 14:12:36 -05:00
Ayaz Hafiz
677d19d825
Allow type error config in uitest 2023-04-12 14:04:51 -05:00
Ayaz Hafiz
f33651bf6a
Correctly instantiate recursion variables under nested aliases
Like we instantiate nested lambda set variables and nested OIOP
variables for aliases, we need to do the same for recursion variables.
2023-04-12 13:59:24 -05:00
Ayaz Hafiz
f2e12724d3
Add erroring reproduction of #5264 2023-04-12 13:58:13 -05:00
Ayaz Hafiz
b33393ca39
Allow configuring whether can errors are acceptable in tests 2023-04-12 13:54:26 -05:00
Ayaz Hafiz
73e5a9ed46
Remove unused branch in alias instantiation 2023-04-12 13:17:42 -05:00
Ayaz Hafiz
65911f88b1
Handle record updates of imported module thunks
Closes #5131
2023-04-12 11:39:14 -05:00
Ayaz Hafiz
bbd09fed3c
Remove redundant references 2023-04-12 11:36:06 -05:00
Ayaz Hafiz
014ec8c092
Support multiple modules in uitest 2023-04-12 11:35:33 -05:00
Ayaz Hafiz
0ec0568ef9
Drop unused function 2023-04-12 11:16:20 -05:00
Ayaz Hafiz
1afae9affd
Update emit headers 2023-04-12 10:55:56 -05:00
Ayaz Hafiz
53af6ed4eb
Offer a way to print mono IR in uitest 2023-04-12 10:52:39 -05:00
J.Teeuwissen
bcb494ca6a
dec_borrow higher order 2023-04-12 15:55:26 +02:00
J.Teeuwissen
1586628bb0
removed last must_own_arguments 2023-04-12 14:04:43 +02:00
J.Teeuwissen
584024f230
check can_reuse on reuse 2023-04-12 10:05:02 +02:00
J.Teeuwissen
a3cea59bb6
Merge remote-tracking branch 'origin/main' into Frame-Limited 2023-04-12 09:08:40 +02:00
Folkert de Vries
32b480d12e
Merge pull request #5273 from roc-lang/i5256
Introduce annotation in first step of recursive solving independently
2023-04-11 21:28:17 +02:00
J.Teeuwissen
ed844292b3
#[allow(unused_mut)] 2023-04-11 17:59:58 +02:00
Folkert
9c07eae680
make the list_map benchmark compile again 2023-04-11 16:45:20 +02:00
Ayaz Hafiz
e5b619780c
Unnecessary return 2023-04-10 16:36:45 -05:00
Ayaz Hafiz
8e093abaf5
Reduce loop to while 2023-04-10 16:36:18 -05:00
Ayaz Hafiz
32d4b45557
Add a uitest for pseudo-polymorphic specializations 2023-04-10 16:31:00 -05:00
Ayaz Hafiz
b9ab93fd98
Introduce annotation in first step of recursive solving independently
The algorithm for solving recursive definitions proceeds in several
steps. There are three main phases: introduction of what's known,
solving what's not known, and then checking our work of what was
inferred against what the programmer claimed. Concretely:

1. All explicitly-annotated signatures in the mutually recursive set are
   introduced and let-generalized.
2. Then, inference type variables (`_`) and unannotated def signatures are
   introduced to the cycle, without generalization. The bodies of these
   defs, that are either unannotated or have inference variables, are
   solved.
3. The defs from step (2) are now let-generalized, since we now know
   that their types are consistent. At this point, all the defs in the
   cycle have their types introduced and let-generalized, but we still
   haven't checked the bodies of the defs froom step (1).
4. Check the bodies of explicitly-annotated defs in recursive set. This
   might materially affect the actual types in the signature, for
   example do to fixpoint-fixing or alias expansion.
5. As a result of (4) possibly changing the structure of the annotated
   type, and because the previous annotated types in (1) were introduced
   at a lower rank, we now re-introduce and re-generalize the solved def
   types, in the same we did in step (3).
5. The rest of the program is solved.

Now, a very important thing here is that the annotation signature
introduced for (1) consists of different type variables than the
annotation signature introduced in (5). The reason is that they live at
different ranks. Prior to this patch we were not explicilty doing so;
this commit ensures that we do.
2023-04-10 16:31:00 -05:00
Ayaz Hafiz
352345d1d9
Refactor expr constraining to align with top-level constraining 2023-04-10 15:46:15 -05:00
Ayaz Hafiz
7fa508b3c8
Refactor headers_from_annotation to match over TypeTag 2023-04-10 15:44:11 -05:00
Ayaz Hafiz
c8de1e5a27
Function to get index from SoA slice 2023-04-10 15:43:30 -05:00
Ayaz Hafiz
f0b017b807
Correct what destructures are exhaustive 2023-04-10 15:43:02 -05:00