Commit Graph

1024 Commits

Author SHA1 Message Date
KtorZ dbd3d3fd7d
Add new acceptance test scenario 023
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2830:32
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
2022-12-19 18:51:46 +01:00
Kasey White 43ff66cd01 all tests pass besides todo in 13, couple changes
Use more cost efficient recurse
Monomorphize needed to deal with function arg return types
bytearray variant added for variant names
2022-12-19 00:41:27 -05:00
KtorZ b6556e6739 Rework 'new' to not generate needless boilerplate
Instead, prints out a README with useful informations.
2022-12-19 00:41:27 -05:00
Kasey White 421e7148d0 zero arg functions now work: test 15 2022-12-19 00:41:27 -05:00
Kasey White 3a765ddef5 add better todo 2022-12-19 00:41:27 -05:00
KtorZ 529b3e87ff Rename builtin as 'verify_ed25519_signature'
It's best to keep builtin as-close-as possible to their standard name
  because they're hard to document. We can then leverage the prelude and
  the standard lib for convenient names.
2022-12-19 00:41:27 -05:00
KtorZ a51808d549 Add new acceptance test scenario (022)
```
  thread 'main' has overflowed its stack
  fatal runtime error: stack overflo
  ```
2022-12-19 00:41:27 -05:00
KtorZ 44d72c046e Print files / tests as they're processed when --debug
This is because there's no proper way to catch panics in Rust, which
  makes it hard to know _which_ test did cause the panic when this
  happen. The stack trace gives little detail about this, but we can
  print this information before it happens -- making it easier to
  identify the culprit.
2022-12-19 00:41:27 -05:00
Kasey White eb386f4606 feat: Add nil support for test 19 2022-12-19 00:41:27 -05:00
Kasey White 5b908aaeb7 fix: fieldsexpose getting wrong generic id and not replacing type 2022-12-19 00:41:27 -05:00
Kasey White 47fae21af7 minor fix to monomorphize 2022-12-19 00:41:27 -05:00
Kasey White 2bce818110 chore: fix list insertion order, function insertion order,
and Inner function issues with variant
2022-12-19 00:41:27 -05:00
KtorZ 0d0e698d5e Add new acceptance test scenario (021)
```
  Error: aiken::check

    × Checking
    ╰─▶ Unknown type

        VerificationKey

     ╭─[021/lib/test.ak:4:1]
   4 │ pub type PoolId =
   5 │   Hash<VerificationKey>
     ·        ───────────────
   6 │
     ╰────
  ```
2022-12-19 00:41:27 -05:00
KtorZ ed58a1cac7 Add new acceptance test scenario (020)
```
  Error: 020/lib/test.ak

    × map_2 failed
    help: ┍━ left ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┑
          │ Type mismatch expected 'integer' got 'data' │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━━━━━━━┑
          │ (con data #d8799f0fff) │
          ┕━━━━━━━━━━━━━━━━━━━━━━━━┙
  ```
2022-12-19 00:41:27 -05:00
KtorZ e3ea511b79 Add new acceptance test scenario (019)
```
  Error:
    × Main thread panicked.
    ├─▶ at crates/lang/src/uplc.rs:2001:81
    ╰─▶ called `Option::unwrap()` on a `None` value
  ```
2022-12-19 00:41:27 -05:00
KtorZ 287fbf2e3b Add new acceptance test scenario (018)
```
  Error: examples/acceptance_tests/018/lib/test.ak

    × or_else_2 failed
    help: ┍━ left ━━━━━━━━━━━┑
          │ (con data #182a) │
          ┕━━━━━━━━━━━━━━━━━━┙

          should be equal to

          ┍━ right ━━━━━━━━━━┑
          │ (con integer 42) │
          ┕━━━━━━━━━━━━━━━━━━┙
  ```
2022-12-19 00:41:27 -05:00
Kasey White e6c59dca2c cleanup if then else a bit 2022-12-19 00:41:27 -05:00
Kasey White eddd202253 tests 1 through 10 pass now, add negate 2022-12-19 00:41:27 -05:00
KtorZ 6e46e7562e Add new acceptance test scenario (017)
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:596:22
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(6) })
  ```
2022-12-19 00:41:27 -05:00
KtorZ 00b800c456 Add new acceptance test scenario (016)
```
  Error:
    × Main thread panicked.
    ├─▶ at /Users/ktorz/Documents/Projects/aiken-lang/aiken/crates/project/src/lib.rs:616:36
    ╰─▶ called `Result::unwrap()` on an `Err` value: FreeUnique(Name { text: "test_slice", unique:
        Unique(7) })
  ```
2022-12-19 00:41:27 -05:00
rvcas febe6345eb chore: retire assets folder in favor of new repo 2022-12-17 11:19:02 -05:00
rvcas 841babae5c chore: clean some links up so they point to the new repo 2022-12-17 11:19:02 -05:00
KtorZ 1055e342b1
Tweak syntax-highlighting for better output. 2022-12-17 17:09:13 +01:00
Matthias Benkort 53eab4b3fd
Merge pull request #185 from aiken-lang/aiken-docs
Aiken docs
2022-12-17 13:14:11 +01:00
KtorZ 202678e21e
Improve rendering of type-signatures in docs
- [x] Display function arguments using a newline-multiline strategy
    when the signature gets too long. For example:

    ```
    union_with
      ( left left: AssocList<key, value>
      , right right: AssocList<key, value>
      , with with: fn(key, value, value) -> value
      ) -> AssocList<key, value>
    ```

  - [x] Show type-aliases as type-aliases in signatures; provided
    they've been specified as type annotations. Otherwise, fallback to
    the inferred type.

  - [x] Do not show argument names in signatures, but show labels when
    they're present. This reflects more the original intent behind
    labels (which are meant as public-facing documentation).
2022-12-17 13:07:28 +01:00
KtorZ 579030db36
Highlight current module in the sidebar. 2022-12-17 12:13:51 +01:00
KtorZ a34d7d4dbb
Revert 71e71ff
Redundant with the `kind: ModuleKind` field already.
2022-12-17 11:54:39 +01:00
KtorZ 1178fa3f01
Add source repository to config & docs. 2022-12-17 04:11:54 +01:00
KtorZ a83900409b
Adjust docs theme to catppuccin
- light-mode uses catpuccin-latte
  - dark-mode uses catpuccin-mocha
2022-12-17 04:11:54 +01:00
KtorZ 5c0920d6bb
Factor out common module prefix when all modules are under a same namespace. 2022-12-17 02:38:04 +01:00
KtorZ 600c7747da
Do not show link to source.
This require slightly more work and has little benefits at this stage given that the sources are literally inlined in the docs.
2022-12-17 01:02:21 +01:00
KtorZ e7f729c61b
Define HighlightJS definition for Aiken. 2022-12-17 01:02:21 +01:00
KtorZ e1065e892a
Support module constants in docs. 2022-12-17 01:02:21 +01:00
KtorZ ac0d180c5c
Apply suggestions from clippy. 2022-12-17 01:02:21 +01:00
KtorZ 873bd85d8b
Implement modules' extra, to get function & module comments in docs. 2022-12-17 01:02:21 +01:00
KtorZ 536c9457b3
Refactor project source parsing
There was already a 'parse_sources' function, and 'parse' was actually more about typechecking than parsing.
2022-12-17 01:02:21 +01:00
KtorZ b323c95241
Fix type-parameter pretty printing (use chevrons) 2022-12-17 01:02:20 +01:00
KtorZ d2c6d27545
Support data-types in documentation. 2022-12-17 01:02:20 +01:00
KtorZ 1f3f769b53
Add command 'docs' for generating project documentation. 2022-12-16 18:34:05 +01:00
KtorZ 6da53fd875
Add a 'docs' method to projects, using the newly introduced docs::generate_all 2022-12-16 18:33:36 +01:00
KtorZ 16b0a9fbe4
Introduce 'docs' for generating documentation for aiken libraries. 2022-12-16 18:33:04 +01:00
KtorZ 71e71fffe8
Define 'is_library' for 'CheckedModule'
So that we can separate libraries from executable modules if necessary.
2022-12-16 15:33:27 +01:00
rvcas 1edbf57943 fix: this badge no longer exists 2022-12-15 18:26:28 -05:00
jmhrpr 775e90d782 chore: remove unnecessary Option wrapper on type 2022-12-15 18:22:31 -05:00
jmhrpr 325a7b7b45 fix: correct V1 to_plutus_data() for txout with no datum hash 2022-12-15 18:22:31 -05:00
rvcas 34d76bc280 chore: retire mdbook 2022-12-15 14:17:36 -05:00
rvcas cbe7ad65f7 chore: update link to docs in the readme 2022-12-15 14:07:21 -05:00
rvcas 0188003323 refactor: move helper option builder to lang 2022-12-15 13:28:30 -05:00
rvcas 42f8a694f4 tests: missing token broke a test 2022-12-15 11:12:35 -05:00
rvcas 53bc9aa56f fix: properly capture empty lines 2022-12-15 11:12:35 -05:00