Skip to content

Commit

Permalink
[Builtins] Make unlifting lazy again
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed Sep 11, 2024
1 parent 1d2ad5a commit 989b32c
Showing 1 changed file with 1 addition and 7 deletions.
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 @@ -282,13 +282,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

0 comments on commit 989b32c

Please sign in to comment.