Commit graph

21308 commits

Author SHA1 Message Date
Ayaz Hafiz
735685dd86
Include error vars in is_recursion_var checks 2022-11-16 14:05:53 -06:00
Ayaz Hafiz
bef9b54124
Avoid parsing doc comments as code 2022-11-16 14:05:53 -06:00
Ayaz Hafiz
f7bc3148ae
Address lints 2022-11-16 14:05:53 -06:00
Ayaz Hafiz
c529505aef
Disable cli/args test for now, but continue testing roc check on it
Args.roc has always been in a broken state, relying on particular
hand-holding of the compiler to operate. With recent changes to type
emplacement, Args.roc now shows off compiler bugs that cannot be papered
over and need to be addressed head-on. These are problems that I do not
think can be directly solved via eliminating type emplacement; I think
they are a combination of constraining and mono bugs, and will be
investigated separately.

For now, turn off attempts to build Args, and instead just test that
`roc check` continues to behave well.
2022-11-16 14:05:52 -06:00
Ayaz Hafiz
08eda910ef
Add gen test for #4077 2022-11-16 14:05:52 -06:00
Ayaz Hafiz
2a5864c19a
Update reporting tests 2022-11-16 14:05:52 -06:00
Ayaz Hafiz
972e531431
Check in solve test
Closes #4077
2022-11-16 14:05:52 -06:00
Ayaz Hafiz
ce5ca4a93c
Mark emplace_variable as must_use 2022-11-16 14:05:52 -06:00
Ayaz Hafiz
33a9c39cfd
Update gen tests that have changed due to emplacement 2022-11-16 14:05:52 -06:00
Ayaz Hafiz
0a9a20a53c
Correct emplace variables in type indices during translation
Prior to this commit, we emplace type variables into `Index<TypeTag>`
only for translated top-level types. However, we need to be careful to
do this emplacement for nested types as well! This patch ensures we do,
but immediately emplacing the destination variable of a type when we
allocate a variable for it.
2022-11-16 14:05:52 -06:00
Ayaz Hafiz
2cba520839
Document fixpoint fixing algorithm 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
8414c8e2de
Remove unneeded comments 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
f0fbf16be6
Remove panicking line in Args.roc 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
27c2bd025d
Remove debug_assertions requirement 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
5a92947326
Use fixpoint-fixing in unification 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
9a7402f40b
Add Subs.dbg 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
3c968b581d
Check in fixpoint-fixing algorithm 2022-11-16 14:05:51 -06:00
Ayaz Hafiz
6d0c42d480
Add retain to VecSet 2022-11-16 14:05:50 -06:00
Ayaz Hafiz
60178f14e4
Remove redundant signature index 2022-11-16 14:05:50 -06:00
Folkert de Vries
0920fb4227
Merge pull request #4508 from roc-lang/windows-final-cli-tests
Windows final cli tests
2022-11-16 18:21:49 +01:00
Anton-4
e6b45c275f
Merge pull request #4531 from roc-lang/guide-sign-unsigned
improve guide on how to sign unsigned commits
2022-11-16 17:41:21 +01:00
Anton-4
9b8dc6a83a
typos
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-11-16 16:15:12 +01:00
Anton-4
a807b5c424
improve wording
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-11-16 16:13:38 +01:00
Anton-4
16d321d5a1
improve sign unsigned commits
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-11-16 16:10:51 +01:00
Anton-4
fba1dc2b80
ignore one more test 2022-11-16 13:58:21 +01:00
Anton-4
87042bc3e1
ignore more tests 2022-11-16 13:58:21 +01:00
Anton-4
37ad8a941a
ignore some tests on windows 2022-11-16 13:58:21 +01:00
Folkert
6938ec62fc
display the command string in a prettier way 2022-11-16 13:58:21 +01:00
Anton-4
0517d8959c
clippy, run subset of cli_run tests 2022-11-16 13:58:21 +01:00
Anton-4
5a447a9fcc
Merge branch 'main' of https://github.com/roc-lang/roc into windows-final-cli-tests 2022-11-16 13:58:17 +01:00
Anton-4
b681949461
clippy+fmt 2022-11-16 13:55:58 +01:00
Anton-4
e9d8d13b02
windows fixes, error improvements 2022-11-16 13:55:58 +01:00
Folkert de Vries
1976174a46
Merge pull request #4530 from roc-lang/fast-occurs-check
Use thread-local buffer for occurs check seen variables
2022-11-16 13:10:12 +01:00
Joshua Warner
be42668202
Merge pull request #4519 from joshuawarner32/fix-fmt
Add fmt test to make sure formatting works for all parser test cases
2022-11-15 19:39:18 -08:00
Ayaz
53a2d683e6
Merge pull request #4526 from roc-lang/reset-reuse-morphic-v2 2022-11-15 19:06:15 -06:00
Joshua Warner
36f0e9d4f5
Add test for multiline tuple with comments 2022-11-15 19:51:02 -05:00
Joshua Warner
d4bf946327
Assert formatting for parse tests 2022-11-15 19:47:28 -05:00
Ayaz Hafiz
2d57aa2170
Use thread-local buffer for occurs check seen variables
This materially improves performance for programs that are
recursion-heavy (as most Roc programs will likely be).

```
$ hyperfine '/tmp/roc-old check examples/cli/cli-platform/Arg.roc' '/tmp/roc-new check examples/cli/cli-platform/Arg.roc' --warmup 10
Benchmark 1: /tmp/roc-old check examples/cli/cli-platform/Arg.roc
  Time (mean ± σ):      53.8 ms ±   1.3 ms    [User: 87.3 ms, System: 10.8 ms]
  Range (min … max):    52.2 ms …  60.4 ms    51 runs

Benchmark 2: /tmp/roc-new check examples/cli/cli-platform/Arg.roc
  Time (mean ± σ):      45.0 ms ±   1.6 ms    [User: 59.4 ms, System: 11.3 ms]
  Range (min … max):    42.6 ms …  49.8 ms    60 runs

Summary
  '/tmp/roc-new check examples/cli/cli-platform/Arg.roc' ran
    1.20 ± 0.05 times faster than '/tmp/roc-old check examples/cli/cli-platform/Arg.roc'
```

The time spent in `occurs` during checking for `Arg` drops from 50% to 23%.
2022-11-15 17:52:12 -06:00
Ayaz
c5afc5e237
Merge pull request #4529 from roc-lang/i4368 2022-11-15 17:41:34 -06:00
Ayaz Hafiz
ce160f28a2
Chase under aliases during occurs checking
Closes #4368
2022-11-15 16:22:01 -06:00
Folkert
5aa29c4e8b
morphic + reset/reuse 2022-11-15 22:06:09 +01:00
Ayaz
2cc9c32c37
Merge pull request #4523 from roc-lang/fix-alias-analysis-bugs
Collect deeply nested type names in alias analysis
2022-11-15 14:46:55 -06:00
Folkert de Vries
8a494d11b4
Merge pull request #4524 from roc-lang/fix-expects-macos
Fix inline expects on macos
2022-11-15 19:48:35 +01:00
Folkert
98b88fef16
fix a weird merge conflict 2022-11-15 19:46:36 +01:00
Folkert de Vries
5e5218fc7e
Merge pull request #4501 from roc-lang/types-soa-variable-opt
Emplace variables after converting SoA types, and remove types from constraining
2022-11-15 18:35:56 +01:00
Ayaz Hafiz
b6f53f22c3
Fix inline expects on macos
MacOS SIGUSR1 is signal 30, not 10 as it is on Linux.
At least on MacOS clang, we need the added headers to the c platform's
host to compile correctly.
2022-11-15 09:30:28 -06:00
Ayaz Hafiz
3723071c15
Collect deeply nested type names in alias analysis
Previously we only collected type names that appeared on the surface of
a type during alias analysis, but certain types that need to be named
(i.e. recursive types) may be observed only when we actually convert the IR
to the morphic IR. Make sure we collect those appropriately.

This is a cherry pick of the relevant changes in #4121.
2022-11-15 09:23:28 -06:00
Ayaz Hafiz
b30e8fc9b2
Remove Cells from Types 2022-11-15 09:00:16 -06:00
Folkert de Vries
de472015f6
Merge pull request #4505 from roc-lang/fix-web-repl-palette
Fix web REPL error formatting by routing the active Palette everywhere
2022-11-15 15:49:37 +01:00
Folkert
18574560d3
clippy 2022-11-15 10:02:57 +01:00