Commit graph

54 commits

Author SHA1 Message Date
Bryce Miller
0132df9b5a
merge main 2023-06-10 15:04:25 -04:00
Luke Boswell
4bb0f4c2d0
update uitest failure 2023-06-08 19:34:52 +10:00
Bryce Miller
cb08225bf0
| -> where 2023-06-05 20:19:00 -04:00
Bryce Miller
7e8a151604
Merge branch 'main' into abilities-syntax 2023-06-01 12:57:16 -04:00
J.Teeuwissen
93ea086115
Merge branch 'main' into record-update-index-top 2023-05-30 10:47:19 +02:00
Bryce Miller
ffa622e065
Merge branch 'main' into abilities-syntax
Signed-off-by: Bryce Miller <sandprickle@users.noreply.github.com>
2023-05-29 13:42:36 +02:00
J.Teeuwissen
576558b9d0
update test 2023-05-28 09:44:27 +02:00
Bryce Miller
c68807bc5a
has -> implements in roc code 2023-05-26 20:39:01 -04:00
Ayaz
62cdceabd6
Merge pull request #5457 from roc-lang/tuple-aliases
Add test for tuple annotations
2023-05-26 17:28:56 -05:00
Ayaz Hafiz
52a719bc18
Add test for tuple annotations
Closes #5447
2023-05-26 12:14:41 -05:00
Ayaz Hafiz
3585d5bb5b
Implement hash for Dec 2023-05-26 11:38:30 -05:00
Brendan Hansknecht
0c13564ad7
update mono and uitests 2023-05-25 11:01:14 -07:00
Bryce Miller
91e37293a2
abilities syntax has -> implements 2023-05-24 21:29:38 -04:00
Brendan Hansknecht
8ecbd8c071
Merge pull request #5438 from roc-lang/dict-set-hash-eq
add Hash and Eq to Dict and Set
2023-05-25 00:38:20 +00:00
Brendan Hansknecht
b8f0c214c2
update uitest 2023-05-24 12:46:16 -07:00
Ayaz Hafiz
cc47635634
Add open union under tuple test 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
Luke Boswell
89f688b070
fix test reference to Json encoder 2023-05-15 21:38:18 +10:00
Ayaz Hafiz
d4fcd83ba9
Correctly include flex vars in generalization group of rec defs
Rather than resetting the list here, we should append to it!

Closes #5344
2023-05-02 13:18:50 -05:00
Ayaz Hafiz
d13e221678
Print variables if asked to 2023-05-02 13:08:58 -05:00
Ayaz Hafiz
238e64c0b3
Defer resolution of a recursion variable during union unification until merging
While unifying two unions, we may turn one of them into a recursive
union. If we don't recognize the recursiveness before merging, we'll
have lost the recursive value of the union.
2023-05-01 13:14:59 -05:00
Ayaz Hafiz
5ec2715820
Correctly introduce new recursion variables at the correct rank 2023-05-01 13:14:59 -05:00
Ayaz Hafiz
7beee4e1f3
Add a way to print ranks in uitest 2023-05-01 13:14:59 -05:00
Ayaz Hafiz
190990155e
Correctly introduce new openness variables at the union rank 2023-05-01 13:14:58 -05:00
J.Teeuwissen
33b7aadd52
updated another test 2023-04-26 21:37:42 +02:00
Ayaz Hafiz
721d3836cd
Migrate even more tests 2023-04-20 16:18:23 -05:00
Ayaz Hafiz
7c14b78e5d
Migrate more tests 2023-04-20 16:18:23 -05:00
Ayaz Hafiz
9775d4f0ca
Move uitests 2023-04-20 16:18:23 -05: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
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
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
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
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
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
c57aaecad4
Migrate pattern tests 2023-04-02 13:15:36 -05:00
Ayaz Hafiz
67364e1a42
Migrate polymorphic lambda set specialization tests 2023-04-02 13:12:51 -05:00
Ayaz Hafiz
e72e17fc82
Migrate list_of_lambdas 2023-04-02 13:03:18 -05:00
Ayaz Hafiz
88b044a765
Migrate ability resolution tests 2023-04-02 13:02:01 -05:00
Ayaz Hafiz
05af17af43
Migrate even more tests 2023-04-02 12:56:01 -05:00
Ayaz Hafiz
2dcafffb46
Migrate couple more tests 2023-04-02 12:53:06 -05:00