Commit Graph

3325 Commits

Author SHA1 Message Date
Richard Feldman
ba90cbfbd2
Panic in legacy linker if ld returns nonzero
We don't print an error message for this, so it's very
confusing if we don't panic - and legacy linker is
going away eventually anyway, so not worth investing in
better error reporting
2022-11-18 14:16:21 -05:00
Richard Feldman
c331925f3f
Drop obsolete comment 2022-11-18 14:16:12 -05:00
Richard Feldman
b80d92e344
Use legacy_host_filename instead of always host.o 2022-11-18 14:15:48 -05:00
Richard Feldman
e2b6d93096
Use debug_assert_eq! instead of debug_assert! 2022-11-18 14:01:51 -05:00
Ayaz
a74d7e14b7
Merge branch 'main' into i4416
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-11-17 09:07:00 -06:00
Ayaz
2836e0a9e9
Merge pull request #4534 from roc-lang/fix-able-binding-variables-behind-aliases
Ensure ability-bound variables are registered in their generalization pool
2022-11-17 07:45:49 -06:00
Richard Feldman
a8ee5b7cbf
Merge pull request #4537 from roc-lang/output-tweaks
Reporting tweaks
2022-11-17 08:28:57 -05:00
Richard Feldman
6c4e2c8738
Revise wording on unnecessary wildcard warning
My concern with the previous wording is that:
- Beginners will be confused by "these are always open"
- Users advanced enough to understand what that actually means won't benefit from seeing it in this warning message!
2022-11-16 23:18:51 -05:00
Richard Feldman
2f54e46909
Add a blank line after failed inline expectations 2022-11-16 23:11:05 -05:00
Richard Feldman
1e4cf52fd4
Merge pull request #4504 from roc-lang/fix-styles
Fix some web styles
2022-11-16 21:53:05 -05:00
Ayaz Hafiz
b43078440f
Ensure ability-bound variables are registered in their generalization pool
When we attempt to bind a type argument to an ability in an alias/opaque
instantiation, we create a fresh flex var to represent satisfaction of
the ability, and then unify the type argument with that flex var.
Previously, we did not register this fresh var in the appropriate rank
pool.

Usually this is not a problem; however, our generalization algorithm is
such that we skip adjusting the rank of redundant variables. Redundant
variables are those that are in the same unification tree, but are not
the root of the unification trees.

This means that if such a flex able var becomes the root of a
unification tree with the type argument, and the type argument is itself
generalized, we will have missed generalization of the argument.

The fix is simple - make sure to register the flex able var into the
appropriate rank pool.

Closes #4408
2022-11-16 17:09:47 -06:00
Ayaz Hafiz
716c4cb8e4
Print rigid name in debug representation 2022-11-16 17:09:31 -06:00
Ayaz Hafiz
f7e0383058
Drop dead reference 2022-11-16 13:59:11 -06:00
Ayaz Hafiz
9c8a4ec027
Choose hash implementation for ranged number based on default width
Closes #4416
2022-11-16 13:57:03 -06:00
Ayaz Hafiz
3305041316
Add Debug derives in lambda set compaction 2022-11-16 13:55:15 -06:00
Ayaz Hafiz
af81ceae38
Add method to grab default compilation width of a number 2022-11-16 13:54:48 -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
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 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
Ayaz Hafiz
f4fcb9f421
Fix Types types 2022-11-14 15:37:25 -06:00
Ayaz Hafiz
28f4b1ac56
Allow lints 2022-11-14 15:15:21 -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
Anton-4
29230921e6
windows fixes 2022-11-14 19:37:25 +01:00
Joshua Warner
1efd7260de
Add fmt test to make sure formatting works for all parser test cases 2022-11-14 08:20:35 -05:00
Joshua Warner
ca5d084497
Implement tuple pattern parsing
Step 2 of N in implementing #4465
2022-11-13 16:11:57 -05:00
Richard Feldman
5f74e10d32
Merge pull request #4515 from roc-lang/workspace-dependencies
Workspace dependencies
2022-11-13 11:44:29 -08:00