aiken/crates
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
..
aiken Try to bundle openssl with the Aiken binary to avoid core dumps on Linux 2024-09-22 18:12:26 +02:00
aiken-lang Prevent constant evaluating to generic/unbound functions 2024-10-01 18:37:40 +02:00
aiken-lsp Build LSP projects with verbose tracing level 2024-10-01 16:12:41 +02:00
aiken-project Fix compiler crash around dangling expect/let in traces 2024-10-01 12:24:31 +02:00
uplc Cost model fixes with tests (#1030) 2024-09-29 22:55:18 -04:00