aiken/crates/uplc
KtorZ 375499930a Add UPLC support for 'ProtoList' & 'ProtoPair' constants
Supersedes #35.

  The syntax for these elements isn't "set in stone"; in the sense that it is unspecified in [input-output-hk/plutus](https://github.com/input-output-hk/plutus). There's no visible plan from IOG to extend the Haskell parser to support this syntax, though there are samples of imagined syntax in the code. Thus, we can lead the way and simply choose a suitable syntax and let the Haskell implementation align to it later.

  This syntax is thus inspired from input-output-hk/plutus' samples, with only a small change: we use `<` and `>` for encapsulating type declaration instead of `(`, `)`. There are already enough parentheses in the UPLC syntax, adding more reduces visibility.

  Doing this, I've also added a lot more test cases for the UPLC parser. There could be more, but this is a good start.

  Here are some example programs (taken from test cases) utilizing this syntax:

  ```
  (program 0.0.0 (con list<bytestring> [#00, #01]))
  ```

  ```
  (program 0.0.0
      (con pair
        <integer, integer>
        [14, 42]
      )
  )
  ```

  ```
  (program 0.0.0
      (con pair<string, list<integer>> ["foo", [14, 42]])
  )
  ```

  _(Note that this was mainly done as an exercise to get more familiar with Rust and parts of Aiken.)_
2022-12-03 10:16:16 -05:00
..
examples Expand builder (#20) 2022-07-01 20:50:58 -07:00
proptest-regressions/program_builder Expand builder (#20) 2022-07-01 20:50:58 -07:00
src Add UPLC support for 'ProtoList' & 'ProtoPair' constants 2022-12-03 10:16:16 -05:00
test_data Sanitize fibonacci program to make round-trip tests happy, isolate unsanitary code 2022-06-26 19:03:17 -04:00
tests Move program builder to uplc crate 2022-06-29 14:02:57 -04:00
Cargo.toml Release 0.0.25 2022-11-14 18:04:19 -05:00
README.md chore: readmes in uplc and cli 2022-06-18 23:15:05 -04:00

README.md

Untyped Plutus Core

A crate for working with untyped plutus core. It handles parsing, conversion between various forms, and flat encoding/decoding.