Commit Graph

22179 Commits

Author SHA1 Message Date
Folkert de Vries
5f1ea29573
Merge pull request #4769 from roc-lang/ignore-platform-for-dylib-and-no-link
[simple PR] avoid building platform for link type dylib and no link
2022-12-15 11:49:51 +01:00
Anton-4
29db3bb331
Merge pull request #4762 from roc-lang/fix_macos_nightly_target
fix macos x86_64 build target
2022-12-15 09:30:16 +01:00
Brendan Hansknecht
1164fb4767
ignore fixup chains 2022-12-14 20:31:56 -08:00
Brendan Hansknecht
1b92a24577
avoid building platform for link type dylib and no link
Both of these cases do not tie to a platform. The roc app can be built without considering the platform.
It is often the case that the platform is using one of these options because roc cannot build the platform.
This allows for more flexibility and avoids wasting time compiling the platform.
2022-12-14 17:34:07 -08:00
Folkert de Vries
6f2e14cf18
Merge pull request #4765 from roc-lang/expects-store-layout-in-lookaside
Remove layouts from the mono AST for expects, and add regtest for #4749
2022-12-14 23:22:03 +01:00
Ayaz
9b4e30a903
Merge pull request #4745 from roc-lang/i4712
Ensure that disjoint nested lambda sets force parents to be disjoint
2022-12-14 14:55:25 -06:00
Ayaz Hafiz
cec6da19de
Check in mono test 2022-12-14 14:20:10 -06:00
Ayaz Hafiz
1233317907
Add test that #4749 compiles
Now that mono does not store expect lookup layouts, the layout cache
should be primed only when specializing the condition of an expect, and
so #4749 is resolved.

Closes #4749
2022-12-14 14:16:59 -06:00
Ayaz Hafiz
a5ecded934
Don't collect layouts in mono of expects anymore 2022-12-14 14:12:57 -06:00
Ayaz Hafiz
1962f2045e
Remove layouts from the mono AST for expects
This actually isn't needed, because the backends must lookup the layout
from the environment anyway. So it's enough to lookup the symbol and
find its layout, there is no need to additionally store it.
2022-12-14 14:10:02 -06:00
Ayaz Hafiz
f2ffda6d05
Revert "Add a LayoutBuffer to store layouts aside and thread it through"
This reverts commit 3d73e33b49.
2022-12-14 14:05:56 -06:00
Ayaz Hafiz
897b69b072
Revert "Store layouts in a layout-buffer for expects"
This reverts commit bba6e36a18.
2022-12-14 14:05:46 -06:00
Ayaz Hafiz
bba6e36a18
Store layouts in a layout-buffer for expects 2022-12-14 14:05:28 -06:00
Ayaz Hafiz
3d73e33b49
Add a LayoutBuffer to store layouts aside and thread it through 2022-12-14 13:48:58 -06:00
Anton-4
b8dc75648b
back to cron
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-12-14 19:44:16 +01:00
Anton-4
b142088484
do build after tests 2022-12-14 18:38:55 +01:00
Ayaz
a0af21becc
Merge pull request #4748 from roc-lang/i4713
Make sure byte-sized tag unions are printed as unions in the repl
2022-12-14 07:43:46 -06:00
Ayaz Hafiz
f809bf310b
Do not unwrap number aliases all the way 2022-12-13 09:32:20 -06:00
Ayaz Hafiz
63b0eb49d8
Explicit is_inside_lambda_set not needed 2022-12-13 09:00:46 -06:00
Richard Feldman
3d1cdf1fd4
Merge pull request #4737 from roc-lang/to
Use app module's `to` to determine platform
2022-12-13 06:04:25 -05:00
Anton-4
77e06eca2a
Merge pull request #4744 from roc-lang/rust-example-toolchain
added rust toolchain file to example to prevent people trying to use the wrong version
2022-12-13 10:52:36 +01:00
Ayaz Hafiz
79ee266f66
Snapshot/restore pool if lambda sets are disjoint 2022-12-12 18:06:50 -06:00
Ayaz Hafiz
8bd61d9408
Make sure byte-sized tag unions are printed as unions in the repl
Closes #4713
2022-12-12 18:01:22 -06:00
Richard Feldman
4de0c831bd
Merge pull request #4716 from roc-lang/fuzzing-take-1
Give parser fuzzing some TLC
2022-12-12 18:56:11 -05:00
Ayaz Hafiz
0ef0638862
Remove more dead code 2022-12-12 15:48:30 -06:00
Ayaz Hafiz
22c8719eed
Dead code 2022-12-12 15:47:58 -06:00
Ayaz Hafiz
23932137ef
Avoid exponential unification paths
🤦 when we check whether lambdas can be unified or must be
treated as disjoint we previously had a code path that is actually
exponential in its runtime, regardless of whether it succeeds or fails.
Now, it is linear, though degraded (with a clone) if it fails.
2022-12-12 15:46:05 -06:00
Ayaz Hafiz
1e120653ff
Update derive tests 2022-12-12 15:06:32 -06:00
Ayaz Hafiz
6de816a9fc
Fix test_derive script 2022-12-12 15:04:54 -06:00
Ayaz Hafiz
1262198f7a
Add gen test for #4712 2022-12-12 14:58:41 -06:00
Ayaz Hafiz
cd2b936a59
Ensure that disjoint nested lambda sets force parents to be disjoint
We must be careful to ensure that if unifying nested lambda sets
results in disjoint lambdas, that the parent lambda sets are
ultimately treated disjointly as well.
Consider

```
  v1: {} -[ foo ({} -[ bar Str ]-> {}) ]-> {}
~ v2: {} -[ foo ({} -[ bar U64 ]-> {}) ]-> {}
```

When considering unification of the nested sets

```
  [ bar Str ]
~ [ bar U64 ]
```

we should not unify these sets, even disjointly, because that would
ultimately lead us to unifying

```
v1 ~ v2
=> {} -[ foo ({} -[ bar Str, bar U64 ]-> {}) ] -> {}
```

which is quite wrong - we do not have a lambda `foo` that captures
either `bar captures: Str` or `bar captures: U64`, we have two
different lambdas `foo` that capture different `bars`. The target
unification is

```
v1 ~ v2
=> {} -[ foo ({} -[ bar Str ]-> {}),
         foo ({} -[ bar U64 ]-> {}) ] -> {}
```

Closes #4712
2022-12-12 14:51:18 -06:00
Ayaz Hafiz
6b2497f342
Update cargo lock 2022-12-12 14:50:53 -06:00
Ayaz Hafiz
f178a86f99
Support pretty-printing can decls in solve tests 2022-12-12 14:50:14 -06:00
Ayaz Hafiz
27dfe974df
Only print lambda ident names in types if they are ambiguous 2022-12-12 14:48:09 -06:00
Ayaz Hafiz
50992d35aa
Support printing lambda names in print decls 2022-12-12 14:13:32 -06:00
Ayaz Hafiz
00ff6dcad7
Print similar-layout procs when borrow fails to find one 2022-12-12 14:13:07 -06:00
Ayaz Hafiz
4cdb8c0cd7
Remove unused unification mismatches 2022-12-12 13:17:43 -06:00
Brendan Hansknecht
662eb5895e
Merge pull request #4741 from roc-lang/ignore-dlclose-errors
remove explicit closing of dylib when testing
2022-12-12 19:14:41 +00:00
Anton-4
a5678f8906
added toolchain file to example 2022-12-12 19:57:56 +01:00
Folkert de Vries
c5df39daf4
Merge pull request #4735 from nfreesto/fmt-fix
Fix for #4585
2022-12-12 19:34:21 +01:00
Brendan Hansknecht
dbca7e0f2b
remove explicit closing of dylib when testing 2022-12-12 08:44:56 -08:00
Ayaz Hafiz
04e1e0cd6e
Support better printing of symbols 2022-12-12 10:38:53 -06:00
Ayaz Hafiz
3a2cd2f7c8
Pretty-print canonicalized declarations 2022-12-12 10:28:23 -06:00
Ayaz Hafiz
7135df6d2f
Move can AST pretty-printing into roc_can::debug 2022-12-12 10:09:32 -06:00
Richard Feldman
8a9e152a5b
Rename PackageName to PackagePath 2022-12-12 00:41:55 -05:00
Richard Feldman
16ce22d455
Use app module's to to determine platform 2022-12-12 00:17:43 -05:00
Nathan Freestone
04c9454c20
changed expected output for tests to reflect new behavior 2022-12-11 18:39:14 -07:00
Nathan Freestone
83f4cdfaeb
fix for format behavior for multi-line strings 2022-12-11 18:38:47 -07:00
Richard Feldman
fa58838f97
Merge pull request #4703 from roc-lang/refactor-platform-info
Refactor out PlatformHeaderInfo
2022-12-11 14:07:28 -05:00
Joshua Warner
e83cd8f191
Re-improve perf of skipping spaces and comments
On my M1 mac this shows as ~25% faster at parsing Num.roc than the old implementation, probably because nobody wrote any NEON code.

Even on my x86_64 linux box (Ryzen 2700x), this shows as 10% faster than the current SSE implementation (running with RUSTFLAGS="-C target-cpu=native").
2022-12-11 08:43:22 -08:00