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
Folkert
6545968c34
import UserApp's provided types into the Package-Config module
2022-01-23 18:33:50 +01:00
Richard Feldman
c1c0ffb25f
Use UppercaseIdent over PlatformRigids
2022-01-23 11:13:23 -05:00
Richard Feldman
6d8277ad8d
Merge pull request #2367 from rtfeldman/remove_Num.minmaxInt
...
Remove `Num.(min/max)Int`
2022-01-20 00:19:44 -05:00
Jan Van Bruggen
8e4b6f0cab
Remove Num.(min/max)Int
...
Replace all uses with `Num.(min/max)I64`,
since all uses expect an `I64`.
2022-01-19 09:55:06 -07:00
Jan Van Bruggen
1e9d2d1239
Remove accidental trailing spaces
2022-01-18 22:25:46 -07:00
ayazhafiz
6ea7d63380
Make sure line offsets are generated properly for external programs
...
Closes #2329
2022-01-13 20:59:03 -05:00
ayazhafiz
880bae55b0
Print u8-sized integers in repl properly
...
Closes #2335
2022-01-10 19:41:07 -05:00
ayazhafiz
605cad1114
Reify commented-out tests
2022-01-08 15:24:17 -05:00
ayazhafiz
fd474528eb
Unroll newtypes that are records
2022-01-08 15:11:27 -05:00
ayazhafiz
85efcbccdd
Support functions in structures
...
Closes #2313
2022-01-06 23:09:47 -06:00
Joshua Warner
8092f31a29
fmt
2022-01-01 18:20:05 -08:00
Joshua Warner
5c1084c453
Introduce SourceError to represent an error + original source
2022-01-01 18:20:05 -08:00
Joshua Warner
8e0b3bbaca
Fix repl_eval line attribution
2022-01-01 18:20:05 -08:00
Joshua Warner
5f7bec3ee8
Use assert_multiline_str_eq in repl_eval tests
2022-01-01 18:20:05 -08:00
Joshua Warner
82d2be0635
Introduce LineColumnRegion and force conversion
2022-01-01 18:20:05 -08:00
Joshua Warner
bd7b1e5013
Make Loc::new take Positions
2022-01-01 18:20:05 -08:00
Folkert
06be340bee
add test for this issue
2021-12-31 21:48:14 +01:00
ayazhafiz
983a9f7e17
Position correct basic block before calling error catcher
...
While building the main function for tests, we may need to generate
additional blocks while marshalling arugments to the error catcher into
the expected calling convention. This pushes the last block in the main
function down, so that the "entry" block may not be last BB in the
function. Instead, look up the last insertion block before generating
the catcher, and then add a call to the catcher at the end of this last
block.
Closes #2300
2021-12-30 20:55:43 -06:00
ayazhafiz
20b1d9acdc
Replace code with stdlib functions
...
max/min_by_key was stabilized in Rust 1.53.0
2021-12-29 17:55:21 -06:00
ayazhafiz
13101101a7
Dereference pointers of pointers with the correct size
2021-12-29 17:55:21 -06:00
ayazhafiz
f46261c8c0
Pull out common code that extracts tag ID, data from recursive pointer
2021-12-29 17:55:21 -06:00
ayazhafiz
d966d8921f
Support nullable wrapped tag union layouts in REPL
2021-12-29 17:55:21 -06:00
ayazhafiz
cdcc31f199
Support nullable unwrapped tag layouts in REPL
2021-12-29 17:55:21 -06:00
ayazhafiz
9c147c8b70
Support non-nullable unwrapped unions in repl
2021-12-29 17:55:21 -06:00
ayazhafiz
337c2901d2
Simplify some nested match expressions
2021-12-29 17:55:21 -06:00
ayazhafiz
e3798dd81f
Remove some unreachable code
...
There's no need to hand recursive union variants for non recursive tag
unions
2021-12-29 17:55:21 -06:00
ayazhafiz
b7c9713232
Support nested non-recursive unions in REPL eval
2021-12-29 17:55:21 -06:00