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

Remove immediate unlifting from the spec if possible #6118

Closed
ana-pantilie opened this issue May 24, 2024 · 2 comments
Closed

Remove immediate unlifting from the spec if possible #6118

ana-pantilie opened this issue May 24, 2024 · 2 comments
Labels

Comments

@ana-pantilie
Copy link
Contributor

Just delete it, so long as we’re able to.

@kwxm
Copy link
Contributor

kwxm commented May 27, 2024

I think we did this a long time ago. It used to be the case that an ill-typed partial application of a monomorphic builtin (like [(builtin addInteger) (con string "abc")]) would fail immediately at runtime but for a polymorphic builtin there wouldn't be an error until it was fully applied (because you couldn't tell if all of the types agreed until you had all of the arguments). Specifying this behaviour was quite complicated. This got fixed in the implementation in #4879 and in the specification in #4960. The behaviour is now that the arguments of a builtin application don't get converted into Haskell values (with a possible error because something is of the wrong type) until the builtin becomes fully applied. This means that [(builtin addInteger) (con string "abc")] is now actually a legal UPLC term which a script can use without error as long as it never gets applied to a second argument.

@ana-pantilie
Copy link
Contributor Author

This was from a pretty old Jira issue, and it had no other details so I had no idea what it's about. Your explanations make sense, thank you @kwxm !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants