Commit Graph

59 Commits

Author SHA1 Message Date
KtorZ 1f3f769b53
Add command 'docs' for generating project documentation. 2022-12-16 18:34:05 +01:00
rvcas e90a210537 feat: add a basic lsp 2022-11-10 01:27:18 -05:00
rvcas cba7a6f46e
feat: bring over the formatter from gleam 2022-11-05 15:35:11 -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 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 81c87ab4da feat: register import, types, and values in environment 2022-10-24 00:09:00 -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 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 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
alessandrokonrad 6e4ff1e282
added plutusV1 2022-09-14 18:52:04 -04:00
alessandrokonrad 8b894f7351
added functions to get script context 2022-09-14 18:52:03 -04:00
rvcas bc983d694a
feat: some cbor hex flags for flat and unflat 2022-09-14 18:51:38 -04:00
rvcas 564cd41626
chore: clean up tx in info 2022-09-14 18:51:37 -04:00
Kasey White d5f8b749ae
add txininfo plutus data to main 2022-09-14 18:51:36 -04:00
rvcas cf27c0c755
feat: apply redeemers and datum to script 2022-09-14 18:51:08 -04:00
rvcas c9072deb09
feat: print some info 2022-09-14 18:50:11 -04:00
rvcas 055ca5c66b
feat: add a new subcommand for tx simulation 2022-09-14 18:50:05 -04:00
Lucas 6d6f671f4f
eval with inputs (#56) 2022-09-08 18:20:52 -04:00
rvcas 1d6809661c
feat: lexer 2022-09-07 17:52:49 -04:00
rvcas 4d742b5b47
chore: fix formatting 2022-09-06 15:45:08 -04:00
Niels Mündler 9b491b3777 Print machine logs (debug trace)
This may be made optional with a --verbose flag, but usually the user wants to see all invocations of the Trace command
2022-09-06 15:44:23 -04:00
Kasey White f3ace55355 Implement more builtins for bytestring and integer
Co-authored-by: rvcas <x@rvcas.dev>
2022-08-10 12:23:34 -04:00
rvcas f332dfeb38 feat: 3 new error cases and more generic pretty printing 2022-07-24 19:51:57 -04:00
rvcas 22f90bf07f feat: impl ifThenElse kinda
Co-authored-by: Kasey White <kwhitemsg@gmail.com>
2022-07-24 19:51:57 -04:00
Kasey White 0e2214a908 Implement apply evaluate
Co-authored-by: rvcas <x@rvcas.dev>
2022-07-24 19:51:57 -04:00
rvcas 6aae184848 feat: new fmt command and pretty printing works 2022-06-18 22:54:26 -04:00
rvcas 5a6ba40557 feat: start pretty printing 2022-06-18 22:54:26 -04:00
rvcas b8c5c268d4
feat: add conversion to tests 2022-06-16 16:54:34 -04:00
rvcas dc4246244d
chore: document somethings 2022-06-14 17:27:27 -04:00
rvcas 984c253f31
feat: rename to aiken and add e2e tests for uplc 2022-06-11 23:22:24 -04:00
rvcas b05f0846a8
fix: moving to a parser that can handle left recursion 2022-06-10 01:55:28 -04:00
rvcas 1c8f3a736b
feat: new uplc parser 2022-06-08 21:51:04 -04:00