Commit Graph

21938 Commits

Author SHA1 Message Date
Brendan Hansknecht
4fc0dd9dd9
add a some tests and bug fixes 2022-12-03 13:17:34 -08:00
Brendan Hansknecht
02824e92fe
add Set implementation 2022-12-03 13:17:34 -08:00
Brendan Hansknecht
cb08dca6f1
Add an indexmap like dict to roc 2022-12-03 13:17:34 -08:00
Ayaz
9becbedd22
Merge pull request #4672 from roc-lang/ayazhafiz-patch-1
Revert stray introduction from #4661
2022-12-03 13:43:00 -06:00
Ayaz
9bf23196a8
Revert stray introduction from #4661
Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
2022-12-03 12:32:46 -06:00
Ayaz
c61c42bff7
Merge pull request #4661 from roc-lang/roc-test-dev
`test` has `dev` behavior, and `dev` does not exit if there are warnings
2022-12-03 12:26:00 -06:00
Anton-4
24b888598f
Merge pull request #4640 from kubukoz/fix-nix
Fix nix build
2022-12-03 17:57:56 +01:00
Anton-4
f56386b3f2
update wasm3-rs sha 2022-12-03 15:56:45 +01:00
Anton-4
da830202e8
Merge remote-tracking branch 'upstream/main' into fix-nix 2022-12-03 15:54:33 +01:00
Anton-4
bb7d5b3d27
ditch redundant flake build
Turns out the flake was using the default.nix file, no need to build that twice...

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-12-03 15:50:08 +01:00
Anton-4
8e851b13ad
use cargoLock instead of cargSha256
This prevents needing to update the cargoSha256 every time the cargo lock file changes.
2022-12-03 15:07:35 +01:00
Anton-4
561ebbc659
Merge pull request #4667 from marc136/patch-1
Fix `<code>` tag in tutorial
2022-12-03 14:35:30 +01:00
Folkert de Vries
24e4048cb5
Merge pull request #4660 from roc-lang/linux-stub-lib
Linux stub lib
2022-12-03 10:50:12 +01:00
Marc Walter
7751b2e755
Remove trailing newline
Oops, edited the file on mobile.
Only wanted to make the sinhle change

Signed-off-by: Marc Walter <walter.marc@outlook.com>
2022-12-03 08:24:09 +01:00
Marc Walter
274dc886b2
Fix <code> tag in tutorial
I was following the cool tutorial and noticed this tiny typo.

I saw no PR to fix it, so I created one.

Signed-off-by: Marc Walter <walter.marc@outlook.com>
2022-12-03 08:20:46 +01:00
Ayaz
012810d7e8
Merge pull request #4664 from roc-lang/i2551
Ensure that llvm gen_ wrappers account different recursive pointers
2022-12-02 17:39:26 -06:00
Ayaz Hafiz
7562525e96
Bugfix match 2022-12-02 16:31:47 -06:00
Ayaz Hafiz
304b88cdb2
Fix bug in expect test 2022-12-02 16:20:56 -06:00
Ayaz Hafiz
705ce10085
New problem dropped 2022-12-02 14:14:18 -06:00
Ayaz Hafiz
66419e8f29
The yeah yeah yeahs 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
8e2c2e1809
It's an error to expose values that aren't defined 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
845a2f8c75
Report warnings in roc test 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
37c689841a
dev/test don't exit early for warnings 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
c351be3230
Import in test reporting 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
7e512077e7
Fix imports for repl 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
39f89e3d65
Get severity from type problem variants 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
5414b4b60f
Fix imports 2022-12-02 14:11:58 -06:00
Ayaz Hafiz
e438fbf37c
Enumerate severity on problem variants 2022-12-02 14:11:57 -06:00
Ayaz Hafiz
0a4ec1958b
roc test stops if there are type errors 2022-12-02 14:11:57 -06:00
Ayaz
b5a195eaf0
Merge pull request #4650 from roc-lang/detect-reachable-by-recursion-only
Provide warning for defs that are used only in (mutual) recursion
2022-12-02 13:39:52 -06:00
Ayaz Hafiz
3685ad2ed2
Ensure that llvm gen_ wrappers account different recursive pointers
Closes #2551
2022-12-02 13:38:32 -06:00
Ayaz
0a31f30e92
Merge pull request #4662 from roc-lang/mono-cleanup
Cleanup unneeded IR lowering code after #4648
2022-12-02 13:20:05 -06:00
Anton-4
22dcb0194e
features flag may mess up test
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-12-02 20:03:22 +01:00
Ayaz Hafiz
5cfbc49ebf
Remove needless hole translation 2022-12-02 12:21:44 -06:00
Ayaz Hafiz
52c858dc53
Remove aliases in partial procs
This is no longer needed
2022-12-02 12:19:13 -06:00
Ayaz Hafiz
0f6f34983f
Remove stale comment 2022-12-02 11:50:12 -06:00
Ayaz Hafiz
947808bbb3
Checking if a connected component has a bridge needs to look at all edges
With a graph

A -> B

if we visit the order B, A to collect SCCs, we won't see that B has
pre-order edges until we look at A.
2022-12-02 11:50:12 -06:00
Ayaz Hafiz
0a807dc43e
Provide warning for defs that are used only in (mutual) recursion
This patch provides errors for defs that are used only in
possibly-mutual recursion, and are not reachable outside of their
recursive closures. For example:

```
test_report!(
    mutual_recursion_not_reached_nested,
    indoc!(
        r#"
        app "test" provides [main] to "./platform"

        main =
            f = \{} -> if Bool.true then "" else g {}
            g = \{} -> if Bool.true then "" else f {}
            ""
        "#
    ),
@r###"
── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─

These 2 definitions are only used in mutual recursion with themselves:

4│>      f = \{} -> if Bool.true then "" else g {}
5│>      g = \{} -> if Bool.true then "" else f {}

If you don't intend to use or export any of them, they should all be
removed!
"###
);
```
2022-12-02 11:50:12 -06:00
Ayaz
1beb00f490
Merge pull request #4645 from roc-lang/i4606
Do not bind accessors in toplevel thunks to their thunks' names
2022-12-02 11:46:00 -06:00
Anton-4
a91a2b138b
CI tests for building default.nix and flake.nix
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-12-02 16:17:43 +01:00
Anton-4
975116895d
ditch --workspace
Apparently this was not running the tests I expected it to run, I suspect it is the `--workspace` flag

Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-12-02 16:13:52 +01:00
Ayaz Hafiz
34328ddf0c
Unused import 2022-12-02 08:50:04 -06:00
Ayaz Hafiz
078f0147ee
Do not bind accessors in toplevel thunks to their thunks' names
In #3352 an optimization to transform `ra = .field` into

```
ra = \#rcd -[ra]-> #rcd.field
```

rather than

```
__ra1 = \#rcd -[__ra1] -> #rcd.field

ra = LambdaSet { __ra1 }
```

was introduced. However, this optimization is not correct when `ra =
.field` is defined as a toplevel thunk, for in such situations we
indeed want the thunk `ra` to return the lambda set it resolves to,
rather than repointing at itself.

Besides reverting this change, another option would be to convert
accessors into closures before translation of Can to IR. However, this
complicates the translation algorithm more than it already is, and I'd
like to avoid additional special-cases.

Closes #4606
2022-12-02 08:50:03 -06:00
Ayaz Hafiz
22a84c8b21
Add comment for is_function 2022-12-02 08:49:14 -06:00
Anton-4
59da272711
add CI test for platform dylib
Signed-off-by: Anton-4 <17049058+Anton-4@users.noreply.github.com>
2022-12-02 15:23:01 +01:00
Folkert
ac1fce1a17
put in more section headers and make sure the .dynamic section is in the right segments 2022-12-02 15:19:15 +01:00
Folkert
2d8ba79034
turns out the symtab/strtab are important 2022-12-02 15:19:15 +01:00
Richard Feldman
0e74cc14cc
Merge pull request #4653 from roc-lang/fix-mv
Fallback to deep copy if `rename` fails when unpacking package tarball
2022-12-02 07:19:57 -05:00
Folkert de Vries
b67ffde678
Merge pull request #4657 from roc-lang/take_examples_fix
fix take examples
2022-12-02 12:46:26 +01:00
Folkert de Vries
0cb26bf50c
Merge pull request #4656 from roc-lang/wasm_interp_test_reorg
Wasm interp test reorg
2022-12-02 11:08:31 +01:00