Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

named-debruijn to name #1

Closed
rvcas opened this issue Jun 13, 2022 · 0 comments · Fixed by #6
Closed

named-debruijn to name #1

rvcas opened this issue Jun 13, 2022 · 0 comments · Fixed by #6
Labels
uplc Relates to Untyped Plutus Core

Comments

@rvcas
Copy link
Member

rvcas commented Jun 13, 2022

in the converter we have some todos that would should get done.

we'll need to define declareBinder like they have in the Haskell code

This was referenced Jun 15, 2022
@rvcas rvcas closed this as completed in #6 Jun 17, 2022
@rvcas rvcas added the uplc Relates to Untyped Plutus Core label Oct 13, 2022
KtorZ added a commit that referenced this issue Dec 3, 2022
  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, #1]))
  ```

  ```
  (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.)_
KtorZ added a commit that referenced this issue Dec 3, 2022
  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, #1]))
  ```

  ```
  (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.)_
rvcas pushed a commit that referenced this issue Dec 3, 2022
  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, #1]))
  ```

  ```
  (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.)_
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
uplc Relates to Untyped Plutus Core
Projects
Status: 🚀 Released
Development

Successfully merging a pull request may close this issue.

1 participant