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

Fix pto for PDataRecord xs #392

Closed
L-as opened this issue Mar 21, 2022 · 1 comment
Closed

Fix pto for PDataRecord xs #392

L-as opened this issue Mar 21, 2022 · 1 comment

Comments

@L-as
Copy link
Member

L-as commented Mar 21, 2022

Currently it doesn't work because there is no catch-all PlutusType (PDataRecord xs) instance

@TotallyNotChase
Copy link
Collaborator

is it even possible to safely define a pmatch' for PDataRecord xs?

pmatch' :: Term s (PBuiltinList PData) -> (PDataRecord xs s -> Term s b) -> Term s b
pmatch' l f = pelimList
  (\x xs ->
    let
        dl :: ???
        dl = PDCons (punsafeCoerce x) (punsafeCoerce xs)
      in f dl -- type mismatch
  )
  (f PDNil)  -- type mismatch
  l

@TotallyNotChase TotallyNotChase linked a pull request Apr 8, 2022 that will close this issue
@L-as L-as removed a link to a pull request Apr 19, 2022
@L-as L-as closed this as completed Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants