Go to file
KtorZ 0682781460
Better errors when using unknown data-type constructor.
## Before

  ```
    × Checking
    ╰─▶ Unknown variable

            Finite

      ╭─[../stdlib/validators/tmp.ak:10:1]
   10 │   let now = when context.transaction.validity_range.lower_bound.bound_type is {
   11 │     Finite { t } -> t
      ·     ────────────
   12 │     NegativeInfinity -> 0
      ╰────
  ```

  ## After

  ```
    × Type-checking
    ╰─▶ Unknown data-type constructor 'Finite'

      ╭─[../stdlib/validators/tmp.ak:10:1]
   10 │   let now = when context.transaction.validity_range.lower_bound.bound_type is {
   11 │     Finite { t } -> t
      ·     ────────────
   12 │     NegativeInfinity -> 0
      ╰────
    help: Did you forget to import it?

          Data-type constructors are not automatically imported, even if their type is
          imported. So, if a module `aiken/pet` defines the following type:

           ┍━ aiken/pet.ak ━━━━━━━━
           │ pub type Pet {
           │   Cat
           │   Dog
           │ }

          You must import its constructors explicitly to use them, or prefix them
          with the module's name.

           ┍━ foo.ak ━━━━━━━━
           │ use aiken/pet.{Pet, Dog}
           │
           │ fn foo(pet : Pet) {
           │   when pet is {
           │     pet.Cat -> // ...
           │     Dog -> // ...
           │   }
           │ }
  ```
2022-12-22 19:34:50 +01:00
.github chore: add ktorz to funding 2022-12-21 17:35:56 -05:00
crates Better errors when using unknown data-type constructor. 2022-12-22 19:34:50 +01:00
examples Rename Unit -> Void 2022-12-22 18:52:28 +01: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
.gitignore feat: start when expressions 2022-12-05 14:18:44 -05:00
CHANGELOG.md chore: clean some links up so they point to the new repo 2022-12-17 11:19:02 -05:00
CONTRIBUTING.md chore: clean some links up so they point to the new repo 2022-12-17 11:19:02 -05:00
Cargo.lock Merge pull request #202 from aiken-lang/tuple-indexes 2022-12-22 09:35:08 +01:00
Cargo.toml fix: include return type in one function def 2022-10-04 16:32:32 -04:00
LICENSE Tweak LICENSE 2022-12-20 05:47:13 +01:00
README.md Recommend installing latest git head from README (instead of latest cargo crate) 2022-12-20 09:23:41 +01:00
bonnie.toml chore: retire mdbook 2022-12-15 14:17:36 -05:00

README.md

Aiken Aiken

Cardano smart contract language and toolchain

Licence Crates.io Rust Build


QuickStart

Prerequisites

For now you'll need rust installed, see rustup.

Getting started

In case you have fresh installation of rustup you might need to do:


rustup install stable

$ cargo install --git https://github.com/aiken-lang/aiken.git

$ aiken --help

How to use

For more information please see the user manual.

Roadmap

Aiken defines its roadmap using Github Milestones. The roadmap isn't set in stone, but gives a high-level overview of where the project is headed for.

Contributing

Want to contribute? See CONTRIBUTING.md to know how.


Note

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