mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
A fast, friendly, functional language. Work in progress!
dd55be6142
Suppose we have a when expression ``` 15 if foo -> <b1> b if bar -> <b2> _ -> <b3> ``` that may have a decision tree like ``` 15? \true => foo? \true => <b1> \false => bar? \true => <b2> \false => <b3> \false => bar? \true => <b2> \false => <b3> ``` In this case, the guard "bar?" appears twice in the compiled decision tree. We need to materialize the guard expression in both locations in the compiled tree, which means we cannot as-is stamp a compiled `bar?` twice in each location. The reason is that - the compiled joinpoint for each `bar?` guard needs to have a unique ID - the guard expression might have call which needs unique call spec IDs, or other joins that need unique joinpoint IDs. So, save the expression as we build up the decision tree and materialize the guard each time we need it. In practice the guards should be quite small, so duplicating should be fine. We could avoid duplication, but it's not clear to me how to do that exactly since the branches after the guard might end up being different. |
||
---|---|---|
.cargo | ||
.github | ||
.reuse | ||
ci | ||
crates | ||
design | ||
devtools | ||
examples | ||
getting_started | ||
nightly_benches | ||
www | ||
.gitattributes | ||
.gitignore | ||
.llvmenv | ||
AUTHORS | ||
BUILDING_FROM_SOURCE.md | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
default.nix | ||
FAQ.md | ||
flake.lock | ||
flake.nix | ||
LEGAL_DETAILS | ||
LICENSE | ||
mlc_config.json | ||
README.md | ||
roc-for-elm-programmers.md | ||
rust-toolchain.toml | ||
shell.nix | ||
typos.toml | ||
version.txt |
Work in progress!
Roc is not ready for a 0.1 release yet, but we do have:
- installation guide
- tutorial
- docs for the standard library
- frequently asked questions
- Zulip chat for help, questions and discussions
If you'd like to get involved in contributing to the language, the Zulip chat is also the best place to get help with good first issues.
Sponsors
We are very grateful for our corporate sponsors Vendr, rwx, and Tweede golf.
If you would like your company to become a corporate sponsor of Roc's development, please DM Richard Feldman on Zulip!
We'd also like to express our gratitude to each and every one of our fantastic GitHub sponsors! A special thanks to those sponsoring $25/month or more:
- Christopher Dolan
- Nick Gravgaard
- Aaron White
- Zeljko Nesic
- Shritesh Bhattarai
- Richard Feldman
- Ayaz Hafiz
Thank you all so much for helping Roc progress!