Skip to content

Commit

Permalink
Test with noinline pragma.
Browse files Browse the repository at this point in the history
  • Loading branch information
thealmarty committed May 1, 2023
1 parent 2e41ccb commit 640701e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions plutus-tx-plugin/test/Optimization/Spec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ maybeFun = $$(compile
trueOrError :: CompiledCode Bool
trueOrError = $$(compile [|| c True (P.error () :: Bool) ||])
where
{-# NOINLINE c #-}
c x _ = x

trueOrErrorOpaque :: CompiledCode Bool
Expand Down
8 changes: 7 additions & 1 deletion plutus-tx-plugin/test/Optimization/trueOrError.plc.golden
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
(program 1.1.0 (delay (lam case_True_i0 (lam case_False_i0 case_True_i2))))
(program
1.1.0
[
(lam ds_i0 (delay (lam case_True_i0 (lam case_False_i0 case_True_i2))))
(error )
]
)
Original file line number Diff line number Diff line change
@@ -1 +1 @@
(delay (lam case_True_0 (lam case_False_1 case_True_0)))
Failure
4 changes: 4 additions & 0 deletions plutus-tx-plugin/test/Optimization/trueOrErrorPir.plc.golden
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
(vardecl True Bool) (vardecl False Bool)
)
)
(datatypebind
(datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit))
)
(termbind (strict) (vardecl ds Bool) (error Bool))
True
)
)

0 comments on commit 640701e

Please sign in to comment.