Go to file
KtorZ e8d97028ad
Prevent constant evaluating to generic/unbound functions
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.
2024-10-01 18:37:40 +02:00
.github Tweak cargo-dist config to produce static binaries for linux. 2024-09-23 12:22:06 +02:00
benchmarks (re)format aiken sources in the repository. 2024-09-07 18:25:21 +02:00
crates Prevent constant evaluating to generic/unbound functions 2024-10-01 18:37:40 +02:00
examples Add test for flat error when encoding bls constant 2024-09-20 13:41:58 -04:00
.editorconfig rename examples/tests/{a,b,c,d,e,f} into examples/acceptance_tests/00{1,2,3,4,5,6} 2022-12-14 09:45:24 +01:00
.gitattributes Tweak .gitattributes to exclude insta snapshots from stats (and provide better diffing). 2024-08-13 17:17:41 +02:00
.gitignore chore: commit an ignore we can all use without accidentally commiting test files/folders 2024-03-12 08:10:33 -04:00
CHANGELOG.md Prevent constant evaluating to generic/unbound functions 2024-10-01 18:37:40 +02:00
CONTRIBUTING.md chore: add release instructions in contributing.md 2023-08-24 15:43:26 -06:00
Cargo.lock Try to bundle openssl with the Aiken binary to avoid core dumps on Linux 2024-09-22 18:12:26 +02:00
Cargo.toml Tweak cargo-dist config to produce static binaries for linux. 2024-09-23 12:22:06 +02:00
LICENSE chore: update license 2024-05-01 22:10:47 -04:00
README.md refresh README. 2024-05-31 09:48:14 +02:00
flake.lock bump flake 2024-09-03 16:20:50 +00:00
flake.nix bump flake 2024-09-03 16:20:50 +00:00

README.md

Aiken

A modern smart contract platform for Cardano

Licence Tests Twitter/X

Crates.io NPM


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

Alt

[!NOTE]

The name comes from Howard Aiken, an American physicist and a pioneer in computing.