Commit graph

7453 commits

Author SHA1 Message Date
ayazhafiz
2fa55269f1 Sate clippy 2022-01-30 21:42:41 -05:00
ayazhafiz
f28ca65ac5 Error when platform package config cannot be found
This avoid compiler hangs that occurred before

Closes #1822
2022-01-30 21:42:41 -05:00
Richard Feldman
755f4c01f3
cargo fmt 2022-01-30 20:40:51 -05:00
Richard Feldman
099a0b5d41
Add formatting test for hosted modules 2022-01-30 20:40:51 -05:00
Richard Feldman
270374044f
Make Buf derive Debug 2022-01-30 20:40:50 -05:00
Richard Feldman
ea5365d6cc
Make Newlines optimize better to bool 2022-01-30 20:40:50 -05:00
Richard Feldman
5c6d2a909e
Make Collection formattable 2022-01-30 20:40:50 -05:00
Richard Feldman
2eb9243942
Add parse tests for hosted modules 2022-01-30 20:40:50 -05:00
Richard Feldman
c68dfdf61e
Drop some unused variants 2022-01-30 20:40:49 -05:00
Richard Feldman
c3123de737
format hosted modules 2022-01-30 20:40:49 -05:00
Richard Feldman
484ce2fbc9
Parse hosted modules 2022-01-30 20:40:49 -05:00
Richard Feldman
a55ff62e6c
Merge remote-tracking branch 'origin/trunk' into expect-dont-panic 2022-01-30 20:22:26 -05:00
Chelsea Troy
4f8d0776b3 We got a test working for panicking with the appropriate number fo failures. Ultimatly we want:
+ An error maessage that says what the failures were
+ Not panicking (so these are effectively error productions)
2022-01-30 18:55:09 -06:00
Richard Feldman
29caf5d301
Make macOS frameworks link properly 2022-01-30 11:01:31 -05:00
Folkert de Vries
eec0f840bd
Merge pull request #2427 from rtfeldman/assort-parse-fixes
Assorted low-hanging-fruit bug fixes
2022-01-30 13:58:27 +01:00
ayazhafiz
b50bb9a4c7 Centralize closure type 2022-01-30 00:48:01 -05:00
ayazhafiz
e54917a063 Expose type mismatches between recursive types and types that aren't
Closes #2166
2022-01-30 00:21:45 -05:00
ayazhafiz
84f8152514 Remove debug_assert that may legally check a false value
This may be false e.g. in the presence of a multiline string. Since the
parser is in a more stable state than when this was introduced, I think
this is OK to remove.

Closes #2398
2022-01-29 23:58:46 -05:00
ayazhafiz
8ae2d9d407 Parse interfaces with leading newlines
Closes #2420
2022-01-29 23:58:41 -05:00
hafiz
2d8bdfd863
Merge pull request #2417 from rtfeldman/i/2322
Inline polymorphic calls at usage sites
2022-01-29 16:13:43 -06:00
ayazhafiz
47a59c560c Make test use an i64 2022-01-29 15:04:22 -05:00
Brian Carroll
d7f10d80ae repl: Change LLVM macro to use address instead of pointer 2022-01-29 11:24:13 +00:00
ayazhafiz
5943873654 Inline polymorphic calls at usage sites
This is a bit.. ugly, or at least seems suboptimal, but I can't think of
a better way to do it currently aside from demanding a uniform
representation, which we probably don't want to do.

Another option is something like the defunctionalization we perform
today, except also capturing potential uses of nested functions in the
closure tag of an encompassing lambda. So for example,

```
f = \x -> \y -> 1
```

would now record a lambdaset with the data `[Test.f
[TypeOfInnerClos1]]`, where `TypeOfInnerClos1` is e.g.
`[Test.f.innerClos1 I8, Test.f.innerClos1 I16]`, symbolizing that the
inner closure may be specialized to take an I8 or I16. Then at the time
that we create the capture set for `f`, we create a tag noting what
specialization should be used for the inner closure, and apply the
current defunctionalization algorithm. So effectively, the type of the
inner closure becomes a capture.

I'm not sure if this is any better, or if it has more problems.
@folkertdev any thoughts?

Closes #2322
2022-01-28 23:49:19 -05: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
Folkert
684b873453 change name back ?! 2022-01-27 23:20:35 +01:00
Folkert
ee151c8f94 fix function name 2022-01-27 22:26:44 +01:00
Folkert
e31532360b don't remove argument that is not pushed 2022-01-27 21:20:46 +01:00
Folkert
3ade77374a Merge remote-tracking branch 'origin/trunk' into add_loop_examples 2022-01-27 16:49:47 +01:00
Brian Carroll
4a08fead1a repl: Change lots of pointers to addresses 2022-01-27 09:40:18 +00:00
Folkert
7e28d557ec improve how we generate the mainForHost function 2022-01-26 21:08:45 -07:00
Folkert
afd11e1cb1 move target -> roc_target 2022-01-26 23:33:29 +01:00
Folkert
b3d605cade fix failing debug_assert 2022-01-26 20:22:18 +01:00
Folkert
7e38309364 make alignment target-specific 2022-01-26 17:24:52 +01:00
Folkert
fbd26c598e provide target info to number alignment function 2022-01-26 17:19:53 +01:00
Folkert
0298013346 fix logical error 2022-01-26 17:03:49 +01:00
Folkert
b9c318e9fb update the tests 2022-01-26 15:59:21 +01:00
Folkert
c663a35e16 final phase 2022-01-26 15:44:24 +01:00
Folkert
0ed259a80d phase 3 2022-01-26 14:37:32 +01:00
Folkert
74932a4cab phase 2 2022-01-26 14:30:37 +01:00
Folkert
7e90812332 ptr_bytes -> target info, step 1 2022-01-26 14:28:26 +01:00
Folkert
456404ccfe add some helpers 2022-01-26 14:01:53 +01:00
Folkert
2d23adb2a1 add roc_target crate 2022-01-26 13:55:06 +01:00
Richard Feldman
0c5f9ffd2a
Merge pull request #2401 from rtfeldman/tea-example
Our first elm architecture example
2022-01-25 21:26:41 -05:00
Folkert
9ee7198e45 and another 2022-01-25 15:23:53 +01:00
Folkert
3137e14a85 another test fix 2022-01-25 13:37:30 +01:00
Folkert
b72ad31a89 fix more tests 2022-01-25 12:05:13 +01:00
Folkert
97d14f421d Merge remote-tracking branch 'origin/trunk' into fix-lambda-set-debug-instance 2022-01-25 09:25:20 +01:00
Folkert
062846b7ee fix test compilation 2022-01-25 09:23:42 +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