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

[Builtins] Make unlifting lazy again #6434

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions plutus-core/plutus-core/src/PlutusCore/Builtin/Meaning.hs
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,7 @@ instance
-- See Note [One-shotting runtime denotations].
-- Grow the builtin application within the received action and recurse on the result.
toMonoF getBoth = BuiltinExpectArgument . oneShot $ \arg ->
-- Ironically computing the unlifted value strictly is the best way of doing deferred
-- unlifting. This means that while the resulting 'ReadKnownM' is only handled upon full
-- saturation and any evaluation failure is only registered when the whole builtin
-- application is evaluated, a Haskell exception will occur immediately.
-- It shouldn't matter though, because a builtin is not supposed to throw an
-- exception at any stage, that would be a bug regardless.
toMonoF @val @args @res $! do
oneShot (toMonoF @val @args @res) $ do
(f, exF) <- getBoth
x <- readKnown arg
-- See Note [Strict application in runtime denotations].
Expand Down
Loading