Commit Graph

107 Commits

Author SHA1 Message Date
rvcas
f250d3df84 feat: eval should take initial budget 2022-12-08 19:24:20 -05:00
Kasey White
3f47a1f4b8 fix: constr issue
- also fixed constant parsing
- added new cbor flag to eval

Co-authored-by: rvcas <x@rvcas.dev>
2022-12-05 22:55:57 -05:00
vh-zuka
269cf8c13f fix: update aiken new 2022-11-26 10:30:41 -05:00
rvcas
67d160230b feat: new build command flag
- `uplc` to optionally dump raw uplc
2022-11-24 18:17:03 -05:00
jacfra
0069c1f68a correct typo 2022-11-19 15:35:07 -05:00
vh-zuka
2736df5466 Validate project name on aiken new 2022-11-14 14:15:02 -05:00
vh-zuka
bdf91d287b Add a few more files 2022-11-10 01:45:32 -05:00
vh-zuka
9d6f9fd013 Use indoc for better raw text 2022-11-10 01:45:32 -05:00
vh-zuka
3faed5c980 Add new project template 2022-11-10 01:45:32 -05:00
rvcas
e90a210537 feat: add a basic lsp 2022-11-10 01:27:18 -05:00
rvcas
9d14acbe0a fix: when formatting and add some methods to Project::Error 2022-11-05 16:23:46 -04:00
rvcas
cba7a6f46e feat: bring over the formatter from gleam 2022-11-05 15:35:11 -04:00
rvcas
09462bbb42 chore: rename project to aiken-project 2022-10-31 13:25:19 -04:00
KtorZ
4316d5c382 Factor out common project-logic between build and check. 2022-10-28 17:20:41 +02:00
KtorZ
8d45b2a2f5 Enforce ordering of commands/sub-commands according to source
By default, clap orders command alphabetically, which can be quite
    confusing when listing commands with `--help`:

    ```
    SUBCOMMANDS:
        eval      Evaluate an Untyped Plutus Core program
        flat      Encode textual Untyped Plutus Core to flat bytes
        fmt       Format an Untyped Plutus Core program
        help      Print this message or the help of the given subcommand(s)
        unflat    Decode flat bytes to textual Untyped Plutus Cor
    ```

    It is possible to instrument clap to order commands in the same way
    they are declared in the source, giving us back the freedom to order
    and group them in a manner that makes sense, e.g.:

    ```
    SUBCOMMANDS:
        fmt       Format an Untyped Plutus Core program
        eval      Evaluate an Untyped Plutus Core program
        flat      Encode textual Untyped Plutus Core to flat bytes
        unflat    Decode flat bytes to textual Untyped Plutus Cor
        help      Print this message or the help of the given subcommand(s)
    ```
2022-10-28 17:20:41 +02:00
KtorZ
9c608ad9f1 Refactor cli's crate; split code into a hierarchy of modules.
This follows a simple convention:

    - `main.rs` contains as little as possible and delegates both
      data-types definitions and command executions to sub-modules.

    - modules are named after their respective commands. For
      sub-commands,

    - Each command module can be in one of two forms:

      - Either it is a leaf command, and it then contains an `Args`
	struct that defines the command arguments; and a function
	`exec` when outlines the execution logic.

      - Or, it is a group command with multiple sub-commands. In which
	case the module defines a `Cmd` struct encapsulating all
	sub-commands; and also an `exec` function which simply
	dispatches the logic to sub-functions.

    ---

    This commit also removes the `dev` command which is currently
    unused. The rationale being: if it's not there, it's not there.
2022-10-28 17:20:39 +02:00
KtorZ
6d0d938fb9 Extra project utilities in their own crate.
This was currently in the 'cli' crates, but this code is pretty standalone and need not to be mixed with the rest of the cli logic.
  Ideally, we want the cli crate to be only a thin wrapper over functionality available from the rest of the lib crates.
2022-10-28 13:48:40 +02:00
rvcas
819256df99 feat: wrap up adding uplc builtins for now 2022-10-25 18:52:27 -04:00
rvcas
d5d2ba9cd7 feat: start creating aiken/builtin module 2022-10-25 18:52:27 -04:00
rvcas
a41d05f7b6 feat: change project structure 2022-10-24 00:09:00 -04:00
rvcas
825783ca61 feat: typecheck If expressions 2022-10-24 00:09:00 -04:00
rvcas
5244e58c9f feat: typechecking is working 2022-10-24 00:09:00 -04:00
rvcas
cabc653167 feat: start expr inference 2022-10-24 00:09:00 -04:00
rvcas
81c87ab4da feat: register import, types, and values in environment 2022-10-24 00:09:00 -04:00
rvcas
d0287d418b feat: add prelude 2022-10-24 00:09:00 -04:00
rvcas
4df3de0a03 feat: some boilerplate for typechecking 2022-10-24 00:09:00 -04:00
rvcas
ed2ef4fa9b feat: sort modules and detect cycles 2022-10-24 00:09:00 -04:00
alessandrokonrad
a14dae5863 changed slot_length to u32 2022-10-17 08:35:45 -04:00
rvcas
6e7ea45e11 fix: flip the cbor_hex if condition 2022-10-13 10:56:04 -04:00
rvcas
da89e9902c feat: starting to get pretty error messages 2022-10-11 14:34:27 -04:00
rvcas
59d7b54473 feat: start integrating miette 2022-10-11 14:34:27 -04:00
rvcas
57dc50e3aa chore: temp allow dead code 2022-10-09 15:39:28 -04:00
rvcas
03d4a6f1e1 chore: rename 2022-10-09 15:39:28 -04:00
rvcas
ff26db2245 feat: start project building 2022-10-09 15:39:28 -04:00
rvcas
6de41e64be feat: add simple check command 2022-10-04 17:09:43 -04:00
rvcas
4f26957806 feat: some expr with precendence parsing 2022-09-26 11:14:42 -04:00
rvcas
c08f6a8454 Merge branch 'main' into lang 2022-09-25 17:44:20 -04:00
rvcas
08596588a7 feat: output total budget spent from cli 2022-09-24 20:23:51 -04:00
rvcas
8620332b75 feat: move input from json to helper method 2022-09-24 19:40:07 -04:00
alessandrokonrad
35d09c642b fixed time conversion 2022-09-24 23:59:58 +02:00
rvcas
f10e3836ad feat: new error for bad term 2022-09-19 11:04:21 -04:00
rvcas
6c34c9be19 feat: even more errors work 2022-09-19 01:05:33 -04:00
rvcas
9e280f9cb5 feat: rename transaction eval and add error enum 2022-09-18 15:35:10 -04:00
rvcas
68fc0f643e feat: add some v1 methods so that cost_mdls can be optional 2022-09-18 15:16:41 -04:00
Kasey White
472cea6c41 parameratize cost model 2022-09-17 21:12:48 -04:00
Kasey White
02a8a34fe8 expose tx simulation with simulate cli command 2022-09-16 04:35:20 -04:00
Kasey White
3f27bd9f13 move utils to uplc and break up 2022-09-16 04:00:29 -04:00
rvcas
26deb6df10 fix: it compiles again 2022-09-15 11:27:33 -04:00
rvcas
348ed3b719 fix: changes from pallas bump
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-09-14 22:00:52 -04:00
alessandrokonrad
806d98e5fc added error messages to execution purpose 2022-09-14 18:52:05 -04:00