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] Unlift both ways #4516

Merged
merged 18 commits into from
Apr 7, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
effectfully committed Apr 1, 2022
commit ba403c3fcb7457ff91706f2e3685d8ccf3a93a48
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ import Test.Tasty.Hedgehog
defaultCekParametersExt
:: MachineParameters CekMachineCosts CekValue DefaultUni (Either DefaultFun ExtensionFun)
defaultCekParametersExt =
mkMachineParameters $ CostModel defaultCekMachineCosts (defaultBuiltinCostModel, ())
mkMachineParameters defaultUnliftingMode $
CostModel defaultCekMachineCosts (defaultBuiltinCostModel, ())

-- | Check that 'Factorial' from the above computes to the same thing as
-- a factorial defined in PLC itself.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Right [
[ (force (builtin ifThenElse)) (con string "11 <= 22") ]
(con string "\172(11 <= 22)")
])
(Left An error has occurred: error:
Could not unlift a builtin:
Type mismatch: expected: bool; actual: string
Caused by: (con string "11 <= 22"))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Right [
[ (force (builtin ifThenElse)) (con string "11 <= 22") ]
(con string "\172(11 <= 22)")
])
(Left An error has occurred: error:
Could not unlift a builtin:
Type mismatch: expected: bool; actual: string
Caused by: (con string "11 <= 22"))
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ test_budget
. testNested "Budget"
$ concat
[ folder Plc.defaultBuiltinsRuntime bunchOfFibs
, folder (toBuiltinsRuntime ()) bunchOfIdNats
, folder (toBuiltinsRuntime Plc.defaultUnliftingMode ()) bunchOfIdNats
, folder Plc.defaultBuiltinsRuntime bunchOfIfThenElseNats
]
where
Expand Down