Commit graph

5432 commits

Author SHA1 Message Date
Brian Carroll
0cf42231d6
Fix WASI fd_write in the Wasm interpreter 2023-04-17 22:24:52 +01:00
Folkert
2480dbbf1f
implement fd_fdstat_get 2023-04-15 16:05:50 +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
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
526cd25611
Merge pull request #5284 from roc-lang/i5131
Handle record updates of imported module thunks
2023-04-12 17:08:01 -05:00
Ayaz
728db00466
Merge pull request #5280 from roc-lang/i5094
Improve error message when opaque wrapping a function is applied directly
2023-04-12 16:57:53 -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
Ayaz Hafiz
65ba472646
Add reproducer for bug that's fixed now
Closes #5140
2023-04-12 10:10:22 -05:00
Ayaz Hafiz
3b885ccf66
Improve error message when opaque wrapping a function is applied directly
Closes #5094
2023-04-12 10:06:27 -05:00
Anton-4
191d8a7408
Merge pull request #5271 from lukewilliamboswell/static-site
Support highlighting other languages using static-site platform
2023-04-12 11:01:27 +02:00
Folkert
2ef0c33177
add extra valgrind tests 2023-04-11 22:27:19 +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
Folkert
9c07eae680
make the list_map benchmark compile again 2023-04-11 16:45:20 +02:00
Anton-4
49b4d9318d
fixed serial deadlock
Some tests used to require multiple locks and one test acquired lock A but failed to acquire lock B, another test was holding lock B and required lock A. That way you get stuck! I've turned those multiple locks into a bigger shared one, deadlock proof.
2023-04-11 12:11:04 +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
19c0ebc10f
Fix reporting tests 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
Brendan Hansknecht
4f48873178
Merge pull request #5209 from roc-lang/ingest-file
Directly import files as `Str` or `List U8`
2023-04-10 13:59:52 +00:00
Brendan Hansknecht
8ed134607b
use indoc for formatting 2023-04-09 21:20:38 -07:00
Brendan Hansknecht
c440b2ca05
Switch to PathBuf to avoid Path turning into a fat pointer. Avoids growing Constraints 2023-04-09 21:14:05 -07:00
Brendan Hansknecht
9a87675368
fix typo 2023-04-09 21:13:21 -07:00
Luke Boswell
ac07ddcbaf
add highlighting for other languages 2023-04-10 13:21:24 +10:00
Brendan Hansknecht
a282995fa8
Merge pull request #5114 from Aurelius333/more-dev-aarch64-instructions
Add more gen_dev aarch64 instructions
2023-04-09 21:23:04 +00:00
Brendan Hansknecht
df9f5a946e
add test case for ingesting as bytes with type hole 2023-04-09 14:03:34 -07:00
Brendan Hansknecht
165ffcf38d
properly unify ingested file type variable 2023-04-09 14:03:34 -07:00
Brendan Hansknecht
fdf8bc6094
fix formatting 2023-04-09 14:03:34 -07:00
Brendan Hansknecht
8dd9a5e3c7
correct wrong early return 2023-04-09 14:03:34 -07:00
Brendan Hansknecht
030597c59a
add example use with cli_run test 2023-04-09 14:03:34 -07:00