![]() Constants are like tiny programs, so they are bound by the same rules as validators and other programs. In fact, functions are slightly more flexible in that they allow generic constant expressions like `List<a>`. Yet, there is no way to contain such generic structure that contain inhabitants in a way that satisfies the type-checker. In the example of `List<a>`, the only inhabitant of that type that we can construct is the empty list. Anything else would require holding onto some generic value. In addition, we can't force literal values into generic annotation, as something like: ``` const foo: List<a> = [1, 2, 3] ``` wouldn't type-check either since the right-side would unify to `List<Int>`. And again, the only right-hand side that can type-check is the empty list without any inhabitant. The added restriction on generic function is necessary because while we allow constants to return lambda, we cannot (easily) generate UPLC that is generic in its argument. By the time we generate UPLC, the underlying types have to be known. |
||
---|---|---|
.github | ||
benchmarks | ||
crates | ||
examples | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE | ||
README.md | ||
flake.lock | ||
flake.nix |
README.md
Getting Started
Hello, World!
Wanna get started right-away? Complete the Hello, World! tutorial!
Contributing
Want to contribute? See CONTRIBUTING.md to know how.
Changelog
Be on top of any updates using the CHANGELOG and the Project Tracking.
Stats
[!NOTE]
The name comes from Howard Aiken, an American physicist and a pioneer in computing.