mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
A fast, friendly, functional language.
https://roc-lang.org
![]() We have this idea of "rigid optional" fields to annotate record fields that must necessarily be optional. That avoids the admission of programs we cannot faithfully compile, like ``` f : {a: Str, b ? U64} f = {a: "b", b: 1} ``` We want to lose the rigidity restriction when a generalized symbol is used as at a specialized site; for example it should be possible to call `f : {x ? Str} -> {}` with both `{}` and `{x : Str}`, neither of which have a rigidly optional field unless they were to be annotated. Prior to this commit we would loosen the rigidity restriction upon specialization of a generalized type at a use site. However, what we really want to do is apply the loosening during calculation of generalization. The reason is that otherwise, we must make types that would be ground (like `{x ? Str} -> {}`) generalized just for the sake of the optional field annotation. But since the rigidity constraint is irrelevant after an annotated body has been checked, we can loosen the rigidity restriction then, which conveniently happens to coincide with the generalization calculation. Closes #3955 |
||
---|---|---|
.cargo | ||
.github | ||
.reuse | ||
ci | ||
crates | ||
devtools | ||
examples | ||
getting_started | ||
nightly_benches | ||
www | ||
.earthignore | ||
.gitignore | ||
.llvmenv | ||
AUTHORS | ||
BUILDING_FROM_SOURCE.md | ||
Cargo.lock | ||
Cargo.toml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
default.nix | ||
Earthfile | ||
FAQ.md | ||
flake.lock | ||
flake.nix | ||
LEGAL_DETAILS | ||
LICENSE | ||
README.md | ||
roc-for-elm-programmers.md | ||
rust-toolchain.toml | ||
shell.nix | ||
TUTORIAL.md | ||
typos.toml | ||
version.txt |
Work in progress!
Roc is not ready for a 0.1 release yet, but we do have:
- installation guide
- tutorial
- 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 to our sponsors NoRedInk, rwx, and Tweede golf.
If you or your employer would like to sponsor Roc's development, please DM Richard Feldman on Zulip!