diff --git a/pact/Pact/Core/Evaluate.hs b/pact/Pact/Core/Evaluate.hs index 7f79324b..e055f298 100644 --- a/pact/Pact/Core/Evaluate.hs +++ b/pact/Pact/Core/Evaluate.hs @@ -261,11 +261,11 @@ evalGasPayerCap -> Set ExecutionFlag -> NamespacePolicy -> PublicData -> MsgData -> CapState QualifiedName PactValue - -> Lisp.Expr Info -> IO (Either (PactError Info) EvalResult) + -> Lisp.Expr SpanInfo -> IO (Either (PactError Info) EvalResult) evalGasPayerCap capToken db spv gasModel flags nsp publicData msgData capState body = do evalEnv <- setupEvalEnv db Transactional msgData Nothing gasModel nsp spv publicData flags let evalState = def & esCaps .~ capState - interpretGasPayerTerm evalEnv evalState capToken body + interpretGasPayerTerm evalEnv evalState capToken (def <$ body) interpret diff --git a/pact/Pact/Core/Serialise/LegacyPact.hs b/pact/Pact/Core/Serialise/LegacyPact.hs index fdcde464..3e597ff4 100644 --- a/pact/Pact/Core/Serialise/LegacyPact.hs +++ b/pact/Pact/Core/Serialise/LegacyPact.hs @@ -705,9 +705,9 @@ fromLegacyTerm mh = \case BuiltinForm CAnd{} _ -> traverse (fromLegacyTerm mh) args >>= \case [b1, b2] -> pure (BuiltinForm (CAnd b1 b2) ()) [b1] -> mkOneArgLam $ \x -> BuiltinForm (CAnd b1 x) () - [] -> mkTwoArgLam $ \x y -> BuiltinForm (CAnd x y) () - args' -> - pure $ App fn' args' () + args' -> do + lam <- mkTwoArgLam $ \x y -> BuiltinForm (CAnd x y) () + pure $ App lam args' () BuiltinForm COr{} _ -> traverse (fromLegacyTerm mh) args >>= \case [b1, b2] -> pure (BuiltinForm (COr b1 b2) ())