mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
A fast, friendly, functional language.
https://roc-lang.org
The ? operator now desugars expr? to a match expression that unwraps Ok
values and early returns Err values:
match expr {
Ok(#ok) => #ok,
Err(#err) => return Err(#err),
}
Implementation details:
- Use pre-interned identifiers (#ok, #err) for synthetic variables
- Use pre-interned Ok/Err tag names from CommonIdents
- Create applied_tag patterns for Ok and Err
- Build match branches with proper scope isolation
- Mark synthetic patterns as used to avoid unused variable warnings
- Create e_lookup_local, e_tag, and e_return expressions for branch bodies
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
|
||
|---|---|---|
| .cargo | ||
| .devcontainer | ||
| .github | ||
| .reuse | ||
| ci | ||
| crates | ||
| design | ||
| devtools | ||
| docker | ||
| examples | ||
| nix | ||
| src | ||
| test | ||
| .gitattributes | ||
| .gitignore | ||
| .llvmenv | ||
| .rules | ||
| AGENT.md | ||
| authors | ||
| build.zig | ||
| build.zig.zon | ||
| BUILDING_FROM_SOURCE.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| code_of_conduct.md | ||
| CONTRIBUTING.md | ||
| default.nix | ||
| flake.lock | ||
| flake.nix | ||
| Glossary.md | ||
| legal_details | ||
| LICENSE | ||
| mlc_config.json | ||
| README.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
- examples
- faq: frequently asked questions
- group chat for help, questions and discussions
If you'd like to contribute, get started here. Don't hesitate to ask for help on our group chat, we're friendly!
Sponsors
You can 💜 sponsor 💜 Roc on:
We are very grateful for our corporate sponsors Lambda Class, ohne-makler, and Decem:
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 our generous individual sponsors! A special thanks to those sponsoring $25/month or more:
- Peter Marreck
- Barry Moore
- Eric Andresen
- Jackson Lucky
- Agus Zubiaga
- Angelo Ceccato
- Niclas Overby
- Krzysztof G.
- Sam Mohr
- Steven Chen
- Drew Lazzeri
- Alex Binaei
- Jono Mallanyk
- Chris Packett
- James Birtles
- Ivo Balbaert
- Lucas Rosa
- Jonas Schell
- Christopher Dolan
- Nick Gravgaard
- Zeljko Nesic
- Shritesh Bhattarai
- Richard Feldman
- Ayaz Hafiz
- Anthony Bullard
Thank you all so much for helping Roc progress!