Commit Graph

13059 Commits

Author SHA1 Message Date
Anton-4
01a3b3fea8
link to "getting started" in tutorial
The tutorial is mentioned before the "getting started" header which can lead to people not knowing how to install stuff :p
2022-02-23 16:04:09 +01:00
Tom Dohrmann
788c8a6af2 reimplement RocList and RocStr 2022-02-23 16:02:13 +01:00
Richard Feldman
90a25efbd8
Store button styles in Button 2022-02-23 08:35:09 -05:00
Richard Feldman
f1b7c7383f
Store rect colors and borders in FillRect 2022-02-23 08:19:39 -05:00
Richard Feldman
e5b4133a8e
Draw Drawables in reverse order 2022-02-23 08:16:44 -05:00
Richard Feldman
380f367530
Introduce Drawables 2022-02-23 08:11:50 -05:00
hafiz
16e568be76
Merge pull request #2552 from rtfeldman/wasm-specializations 2022-02-23 07:50:24 -05:00
Richard Feldman
be3bdae36c
Render a more reasonable-looking button 2022-02-23 00:23:52 -05:00
Richard Feldman
5b92eb87ec
First button ever rendered! 2022-02-22 21:42:15 -05:00
Richard Feldman
4399a6dfee
Pass RocButton all the way to rendering 2022-02-22 21:42:14 -05:00
Richard Feldman
683b505e3a
Get Button and Text working 2022-02-22 21:42:14 -05:00
Brian Carroll
b327418a6a Merge branch 'trunk' of github.com:rtfeldman/roc into wasm-specializations 2022-02-22 23:48:30 +00:00
Brian Carroll
ce6d5b1727 mono: Fix recursive union arg layout for calls to helper functions 2022-02-22 23:42:48 +00:00
Folkert de Vries
7e70f2e9ad
Merge pull request #2559 from rtfeldman/windows-zig-path-fix
windows zig path validation workaround
2022-02-22 21:39:46 +01:00
Anton-4
8fee48c3fa
windows zig path validation workaround
std::fs::canonicalize adds a special windows prefix ?, zig erroneously (ziglang/zig#1509) does not allow ? in windows paths, dunce correctly removes this ? prefix
2022-02-22 16:17:21 +01:00
hafiz
2ff50333ff
Merge pull request #2556 from rtfeldman/2533-review
#2533 review
2022-02-22 00:21:01 -05:00
Richard Feldman
91169a47f5
Merge pull request #2553 from rtfeldman/roc-link-flags
Read ROC_LINK_FLAGS env var to inject more link flags
2022-02-22 00:07:32 -05:00
ayazhafiz
e8867d6355 Add opaques scope-escaping test @rtfeldman suggested 2022-02-21 23:40:00 -05:00
ayazhafiz
e420ebd023 Add TODOs for opaque type comments that will need to be changed later 2022-02-21 23:21:39 -05:00
hafiz
ca9ecbea52
Merge pull request #2533 from rtfeldman/abilities!
[WIP] Spike for abilities and friends
2022-02-21 23:18:40 -05:00
Richard Feldman
7dc92fe6f4
clippy 2022-02-21 22:15:24 -05:00
Richard Feldman
ea4e2a706d
Merge pull request #2554 from rtfeldman/faq-list-patterns
Add FAQ entry about `::` in lists
2022-02-21 22:14:19 -05:00
Richard Feldman
0cfd9742c3
fix typo in FAQ 2022-02-21 21:08:11 -05:00
Richard Feldman
a0615b4388
Add FAQ entry on :: in lists 2022-02-21 20:40:11 -05:00
Richard Feldman
afa8d228ef
cargo fmt 2022-02-21 20:35:29 -05:00
Brian J. Cardiff
b27eee7f6b Read ROC_LINK_FLAGS env var to inject more link flags
Flags should not contain whitespaces since the value is split on them
Update compiler/build/src/link.rs

Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2022-02-21 21:29:58 -03:00
ayazhafiz
075c5b3eee Typo 2022-02-21 18:36:28 -05:00
ayazhafiz
321a970215 Add qualified opaque reference reporting test 2022-02-21 18:32:23 -05:00
ayazhafiz
90de82e295 Validation of opaques during canonicalization 2022-02-21 18:25:19 -05:00
Brian Carroll
3952a7cc7c test_gen: Add comments to some extremely subtle test code 2022-02-21 22:52:50 +00:00
Brian Carroll
89b8926d27 gen_wasm: fix bug choosing the right proc specialization (#2549) 2022-02-21 22:52:45 +00:00
Emi Simpson
b5b26eabc9
Amend ff0c994: 🐛 Search the /lib/<arch> directory 2022-02-21 17:18:11 -05:00
Emi Simpson
97b99e7cfb
Amend ff0c994: 🐛 Re-add support for Rust < 0.58 2022-02-21 15:34:55 -05:00
Folkert de Vries
5fec87dc2a
Merge pull request #2542 from rtfeldman/i/2535
Monomorphize records with same layout, but different field order, correctly
2022-02-21 20:59:44 +01:00
ayazhafiz
2151e715dd Fix rebased compile error 2022-02-21 14:12:49 -05:00
ayazhafiz
dd2b3097e1 Disable WASM test for now 2022-02-21 14:10:46 -05:00
ayazhafiz
395e0a33e0 Make sure unit structs are always units 2022-02-21 14:10:46 -05:00
ayazhafiz
148dbb4efe Unnecessary reference 2022-02-21 14:10:46 -05:00
ayazhafiz
475be2363c Add a gen test for #2535 2022-02-21 14:10:46 -05:00
ayazhafiz
dfc384aa1f Make mono test output prettier 2022-02-21 14:10:45 -05:00
ayazhafiz
e52d427ac8 Hash record field name order in generated layouts
Closes #2535

See the referenced issue for longer discussion - here's the synopsis.
Consider this program

```
app "test" provides [ nums ] to "./platform"

alpha = { a: 1, b: 2 }

nums : List U8
nums =
    [
        alpha.a,
        alpha.b,
    ]
```

Here's its IR:

```
procedure : `#UserApp.alpha` {I64, U8}
procedure = `#UserApp.alpha` ():
    let `#UserApp.5` : Builtin(Int(I64)) = 1i64;
    let `#UserApp.6` : Builtin(Int(U8)) = 2i64;
    let `#UserApp.4` : Struct([Builtin(Int(I64)), Builtin(Int(U8))]) = Struct {`#UserApp.5`, `#UserApp.6`};
    ret `#UserApp.4`;

procedure : `#UserApp.nums` List U8
procedure = `#UserApp.nums` ():
    let `#UserApp.7` : Struct([Builtin(Int(I64)), Builtin(Int(U8))]) = CallByName `#UserApp.alpha`;
    let `#UserApp.1` : Builtin(Int(U8)) = StructAtIndex 1 `#UserApp.7`;
    let `#UserApp.3` : Struct([Builtin(Int(I64)), Builtin(Int(U8))]) = CallByName `#UserApp.alpha`;
    let `#UserApp.2` : Builtin(Int(U8)) = StructAtIndex 1 `#UserApp.3`;
    let `#UserApp.0` : Builtin(List(Builtin(Int(U8)))) = Array [`#UserApp.1`, `#UserApp.2`];
    ret `#UserApp.0`;
```

What's happening is that we need to specialize `alpha` twice - once for the
type of a narrowed to a U8, another time for the type of b narrowed to a U8.

We do the specialization for alpha.b first - record fields are sorted by
layout, so we generate a record of type {i64, u8}. But then we go to
specialize alpha.a, but this has the same layout - {i64, u8} - so we reuse
the existing one! So (at least for records), we need to include record field
order associated with the sorted layout fields, so that we don't reuse
monomorphizations like this incorrectly!
2022-02-21 14:10:45 -05:00
Brendan Hansknecht
74daec84df
Merge pull request #2472 from rtfeldman/add_Int.toInt_builtins
Add `{Int *}.to{Int *}` builtins
2022-02-21 18:03:14 +00:00
ayazhafiz
e22c9d8168 Fix a typo 2022-02-21 10:29:24 -05:00
Emi Simpson
ff0c994668
Improve library lookup in native linker
🐛 Fix bug where /usr/lib isn't checked if /usr/lib/{arch} exists
 Better error messages on missing libraries
 Check /usr/lib64 for libraries
2022-02-21 10:18:23 -05:00
Brian Carroll
e8571de1ae
Merge pull request #2517 from rtfeldman/repl-www
Web REPL initial version
2022-02-21 13:58:23 +00:00
Richard Feldman
2887895720
Merge pull request #2543 from rtfeldman/i/2534
Remove spaces around var in record update
2022-02-21 07:35:26 -05:00
Richard Feldman
43c6bad281
Merge pull request #2544 from rtfeldman/contributing-update
add most common way to test to CONTRIBUTING
2022-02-21 07:34:40 -05:00
Brian Carroll
bfca8ec955 Make wasmer features common across all packages 2022-02-21 08:36:34 +00:00
Anton-4
68618e3d14
add most common way to test 2022-02-21 09:23:17 +01:00
Richard Feldman
a0229d7e42
Merge pull request #2540 from rtfeldman/revise-faq
Revise FAQ
2022-02-20 21:07:09 -05:00