Commit graph

905 commits

Author SHA1 Message Date
Folkert de Vries
da568965f8
Merge pull request #2520 from rtfeldman/2495-check-format-tests
Add tests for `roc format --check {{file}}`
2022-02-19 01:37:12 +01:00
Ryan Olson
3a970dffa7 Add tests for roc format --check {{file}} 2022-02-18 16:46:07 -07:00
Richard Feldman
9226bafdfa
Merge pull request #2493 from rtfeldman/load-file-async
file.rs refactorings
2022-02-17 22:46:51 -05:00
Ryan Olson
60b5465de2 Add --check flag for format command
Closes #2495
2022-02-16 12:44:30 -07:00
Folkert
957140df64 remove builtin lookup function being passed around 2022-02-14 20:32:31 +01:00
Brendan Hansknecht
7b587dd6ae Print before timing rebuilding of host 2022-02-13 17:56:57 -08:00
Brendan Hansknecht
7106e03d45 Stop printing host rebuilding message with --precompiled-host 2022-02-13 12:20:22 -08:00
Folkert
e656886861 add test for UnknownGeneratesWith 2022-02-06 12:50:50 +01:00
Folkert
2f453cfea2 add test for UnusedImport 2022-02-06 12:34:23 +01:00
Folkert
1e4d2b3372 add test for ExposedButNotDefined 2022-02-06 12:24:19 +01:00
Folkert
6ebdc17165 formatting 2022-02-04 00:06:50 +01:00
Folkert
885500712c remove old Effect module things 2022-02-03 23:55:02 +01:00
Folkert
a98635ed06 update other examples 2022-02-03 22:45:15 +01:00
Brian Carroll
ad4318f1ff Merge branch 'trunk' of github.com:rtfeldman/roc into repl-packages 2022-02-01 11:16:37 +00:00
Brian Carroll
33e6afe83c repl: remove unused dependencies from roc_cli crate 2022-01-31 07:23:39 +00:00
Richard Feldman
fbedc3ba13
Extract common code from both branches 2022-01-30 20:40:49 -05:00
Richard Feldman
c3123de737
format hosted modules 2022-01-30 20:40:49 -05:00
Brian Carroll
c6babb30ba repl: Remove unused import 2022-01-30 16:32:42 +00:00
Brian Carroll
c8c51f0cdc repl: Move tests from roc_cli to roc_repl_cli 2022-01-30 16:20:48 +00:00
Brian Carroll
f098c6cb99 repl: initial working version with new crate structure 2022-01-30 09:12:29 +00:00
Brian Carroll
0f206121bd repl: move files from cli into repl-cli and repl-eval 2022-01-30 07:47:02 +00:00
Brian Carroll
d7f10d80ae repl: Change LLVM macro to use address instead of pointer 2022-01-29 11:24:13 +00:00
Brian Carroll
06079ccde5 repl: inline a helper function 2022-01-29 11:17:20 +00:00
Brian Carroll
929ee7f560 Formatting 2022-01-28 16:50:05 +00:00
Brian Carroll
e43cd8c399 repl: implement AppMemoryExternal::from_str 2022-01-28 13:30:26 +00:00
Brian Carroll
b466857b5e repl: rename module from_memory -> app_memory 2022-01-28 13:12:25 +00:00
Brian Carroll
3e35880513 repl: fix lifetime problem with app_memory in Env 2022-01-28 13:05:06 +00:00
Brian Carroll
382ae948e1 Merge branch 'trunk' of github.com:rtfeldman/roc into repl_from_memory_trait 2022-01-28 12:49:33 +00:00
Brian Carroll
0986d47ec6 repl: Remove some generics and use macros instead 2022-01-28 11:25:30 +00:00
Brian Carroll
46a3035759 repl: try putting the from_memory method on the AppMemory trait instead 2022-01-28 11:01:37 +00:00
Brian Carroll
6a9d31ec04 repl: Fix more type errors, but Rust still can't infer the FromMemory impls 2022-01-28 09:40:24 +00:00
Folkert
3ade77374a Merge remote-tracking branch 'origin/trunk' into add_loop_examples 2022-01-27 16:49:47 +01:00
Brian Carroll
b2fed142e2 repl: use AppMemory trait in eval (attempting to fix compiler errors) 2022-01-27 09:41:40 +00:00
Brian Carroll
4a08fead1a repl: Change lots of pointers to addresses 2022-01-27 09:40:18 +00:00
Jan Van Bruggen
e36b94fc53 Add emoji to form example 2022-01-26 21:08:45 -07:00
Folkert
5b5b9e5eb8 fix cli cli_run test (echo file got moved) 2022-01-26 21:08:45 -07:00
Folkert
afd11e1cb1 move target -> roc_target 2022-01-26 23:33:29 +01:00
Brian Carroll
c27f2a2592 repl: delete redundant casts 2022-01-26 19:22:39 +00:00
Folkert
490bbf3812 ignore 'normal' functions when running i386 tests 2022-01-26 19:59:50 +01:00
Brian Carroll
17b960bae0 repl: Add memory parameter to Env 2022-01-26 18:05:11 +00:00
Brian Carroll
816cbdbe65 repl: Create FromMemory trait 2022-01-26 18:04:40 +00:00
Folkert
c663a35e16 final phase 2022-01-26 15:44:24 +01:00
Folkert
74932a4cab phase 2 2022-01-26 14:30:37 +01:00
Folkert
5580eafb68 Merge remote-tracking branch 'origin/trunk' into tea-example 2022-01-25 09:20:59 +01:00
Folkert
73bc50c952 make the surgical linker aware of custom exported closure names 2022-01-25 00:13:22 +01:00
Folkert de Vries
6dd769aa38
Merge pull request #2393 from rtfeldman/i/2343
Generate unique symbols for shadowing identifiers
2022-01-24 11:49:51 +01:00
Folkert
cbdf3f0378 tweaks 2022-01-23 21:41:54 +01:00
Mats Sigge
71f359fbdc Move macros from roc_reporting to new roc_error_macros module
The `internal_error!` and `user_error!´ macros can't be used everywhere
when they live in `roc_reporting` due to circular dependencies.
2022-01-23 18:40:04 +01:00
ayazhafiz
0eede1cd86 Generate unique symbols for shadowing identifiers
This code has a shadowing error:

```
b = False
f = \b -> b
f b
```

but prior to this commit, the compiler would hit an internal error
during monomorphization and not even get to report the error. The reason
was that when we entered the closure `\b -> b`, we would try to
introduce the identifier `b` to the scope, see that it shadows an
existing identifier, and not insert the identifier. But this meant that
when checking the body of `\b -> b`, we would think that we captured the
value `b` in the outer scope, but that's incorrect!

The present patch fixes the issue by generating new symbols for
shadowing identifiers, so deeper scopes pick up the correct reference.
This also means in the future we may be able to compile and execute code
with shadows, even though it will still be an error.

Closes #2343
2022-01-23 12:35:31 -05:00
ayazhafiz
632d809f2a Don't end repl inputs on lines that have incomplete function bodies 2022-01-23 12:35:31 -05:00