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

LambdaBuffers Plutarch Runtime cleanup #643

Open
bladyjoker opened this issue Jan 18, 2024 · 4 comments
Open

LambdaBuffers Plutarch Runtime cleanup #643

bladyjoker opened this issue Jan 18, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@bladyjoker
Copy link
Collaborator

Some items for Plutarch if someone can take a look at that (NOTE: I don't use Data anywhere in naming because everything is Data, and on that note, imo Scott should have been explicitly named not Data which is much more prevalent)

  1. Missing PAssetClass

https://github.com/mlabs-haskell/lambda-buffers/blob/2181c9493ef7a15ca396f4a8bb9ed03dbf7c4c5d/runtimes/haskell/lbr-plutarch/src/LambdaBuffers/Runtime/Plutarch.hs#L60

  1. Missing PEither

https://github.com/mlabs-haskell/lambda-buffers/blob/2181c9493ef7a15ca396f4a8bb9ed03dbf7c4c5d/runtimes/haskell/lbr-plutarch/src/LambdaBuffers/Runtime/Plutarch.hs#L75

  1. Messed up PMaybe

https://github.com/mlabs-haskell/lambda-buffers/blob/2181c9493ef7a15ca396f4a8bb9ed03dbf7c4c5d/runtimes/haskell/lbr-plutarch/src/LambdaBuffers/Runtime/Plutarch.hs#L82

  1. Had to redefined PList as well

https://github.com/mlabs-haskell/lambda-buffers/blob/2181c9493ef7a15ca396f4a8bb9ed03dbf7c4c5d/runtimes/haskell/lbr-plutarch/src/LambdaBuffers/Runtime/Plutarch.hs#L668

  1. A bunch of missing instances throughout this module
@SeungheonOh
Copy link
Collaborator

I don't think we'll add PList here since it is a bit too specific in LB. Other things we will try to add in new, cleaned up prelude/ledger api

@bladyjoker
Copy link
Collaborator Author

I don't think we'll add PList here since it is a bit too specific in LB. Other things we will try to add in new, cleaned up prelude/ledger api

{- | PList because PBuiltinList misses `PAsData` on its constituents which causes type errors when used.
TODO(bladyjoker): Upstream these changes or fix PBuiltinList.
-}

How's that specific to LB? There's a bunch of types that appear to escape the mold for some reason that other types use. For example, some stuff requires PLift which is out of place. We should do a pass on all the types in the refactor and make sure they are aligned properly, and devoid of non-core classes.

@SeungheonOh
Copy link
Collaborator

What LB uses is Data-only list, PBuiltinList can contain things beyond just Data. Ideally we give AsData instance to PBuiltinList instead of adding new list type

@bladyjoker
Copy link
Collaborator Author

What LB uses is Data-only list, PBuiltinList can contain things beyond just Data. Ideally we give AsData instance to PBuiltinList instead of adding new list type

If that works, that would be great! Thank you

@kozross kozross added the bug Something isn't working label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants