aiken/book/src
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
..
language-tour feat: complete language tour 2022-11-30 15:35:55 -05:00
uplc Add UPLC support for 'ProtoList' & 'ProtoPair' constants 2022-12-03 10:16:16 -05:00
SUMMARY.md feat: complete language tour 2022-11-30 15:35:55 -05:00
comparisons.md chore: some requested changes to comparsisons 2022-11-27 15:25:55 -05:00
getting-started.md fix: vim plugin link 2022-11-22 21:11:24 -05:00
introduction.md feat: complete language tour 2022-11-30 15:35:55 -05:00
language-tour.md docs: add language tour outline 2022-11-22 21:11:25 -05:00
resources.md chore: update readme and book 2022-10-20 14:10:03 -04:00
uplc.md Cleanup book and extended documentation about UPLC 2022-10-29 20:44:54 +02:00