Commit Graph

21318 Commits

Author SHA1 Message Date
Richard Feldman
674d449bc1
Give a nice error if precompiled host is missing 2022-11-19 00:20:04 -05:00
Richard Feldman
61153ed33b
Don't spawn platform-rebuilding thread if prebuilt 2022-11-19 00:10:37 -05:00
Richard Feldman
062ecce84c
Change preprocessedhost filename 2022-11-18 23:54:21 -05:00
Richard Feldman
7f617c87bf
Change precompiled host filename format 2022-11-18 17:08:10 -05:00
Richard Feldman
fa2e0648ca
Fix wasm32 host filename generation 2022-11-18 16:47:29 -05:00
Richard Feldman
e4e629c4e4
clippy doesn't like Result with () for the error 2022-11-18 14:45:12 -05:00
Richard Feldman
ebc314691c
Fix Swift linking 2022-11-18 14:26:04 -05:00
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
0b2c2ab36c
Fix compiler warnings on examples/cli/echo.roc 2022-11-18 14:01:55 -05:00
Richard Feldman
e2b6d93096
Use debug_assert_eq! instead of debug_assert! 2022-11-18 14:01:51 -05:00
Ayaz
e88c6ea17b
Merge pull request #4533 from roc-lang/i4416
Choose `hash` lambda for ranged numbers based on their default compilation width
2022-11-17 12:30:34 -06: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
Richard Feldman
6afaa98e83
Merge pull request #4536 from roc-lang/favicon
Lighten favicon in dark mode
2022-11-16 21:20:34 -05:00
Richard Feldman
d3f4b60246
Favicon night mode 2022-11-16 20:17:27 -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
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