From 5217a70a07d94c68cf4e3014ba0fe80aa5091ede Mon Sep 17 00:00:00 2001 From: Yura Lazaryev Date: Wed, 29 May 2024 10:29:54 +0200 Subject: [PATCH] Updated golden files --- .../plutus-core/test/scopes/apply.plc.golden | 2 +- .../plutus-core/test/scopes/lambda.plc.golden | 2 +- .../test/scopes/lambda2.plc.golden | 2 +- .../test/scopes/negation.plc.golden | 20 +- .../Compiler/Datatype/dataEscape.golden | 2 +- .../PlutusIR/Compiler/Datatype/idleAll.golden | 2 +- .../Compiler/Datatype/listMatch.golden | 250 +- .../Compiler/Datatype/listMatchEval.golden | 2 +- .../PlutusIR/Compiler/Datatype/maybe.golden | 92 +- .../Compiler/Datatype/scott/listMatch.golden | 365 +-- .../Compiler/Datatype/scott/maybe.golden | 135 +- .../PlutusIR/Compiler/Datatype/some.golden | 2 +- .../Compiler/Error/recursiveTypeBind.golden | 4 +- .../test/PlutusIR/Compiler/Let/letDep.golden | 2 +- .../PlutusIR/Compiler/Let/letInLet.golden | 2 +- .../PlutusIR/Compiler/Recursion/even3.golden | 757 +----- .../Compiler/Recursion/even3Eval.golden | 2 +- .../Compiler/Recursion/factorial.golden | 45 +- .../Recursion/mutuallyRecursiveValues.golden | 517 +--- .../Compiler/Recursion/stupidZero.golden | 245 +- .../PlutusIR/Core/prettyprinting/basic.golden | 2 +- .../PlutusIR/Core/prettyprinting/maybe.golden | 18 +- .../Core/prettyprintingReadable/basic.golden | 2 +- .../errorBinding.golden | 4 +- .../Core/prettyprintingReadable/even3.golden | 26 +- .../prettyprintingReadable/idleAll.golden | 10 +- .../Core/prettyprintingReadable/letDep.golden | 6 +- .../prettyprintingReadable/letInLet.golden | 8 +- .../prettyprintingReadable/listMatch.golden | 19 +- .../Core/prettyprintingReadable/maybe.golden | 8 +- .../mutuallyRecursiveValues.golden | 6 +- .../recursiveTypeBind.golden | 6 +- .../Core/prettyprintingReadable/some.golden | 6 +- .../prettyprintingReadable/stupidZero.golden | 19 +- .../Core/serialization/serializeBasic.golden | 2 +- .../serialization/serializeEvenOdd.golden | 65 +- .../serialization/serializeListMatch.golden | 41 +- .../serializeMaybePirTerm.golden | 18 +- .../Purity/builtinAppSaturated.golden | 2 +- .../Purity/builtinAppUnsaturated.golden | 2 +- .../test/PlutusIR/Purity/letFun.golden | 6 +- .../test/PlutusIR/Purity/nestedLets1.golden | 10 +- .../test/PlutusIR/Purity/pureLet.golden | 6 +- .../PlutusIR/Transform/Beta/absapp.golden | 5 +- .../PlutusIR/Transform/Beta/lamapp.golden | 5 +- .../PlutusIR/Transform/Beta/lamapp2.golden | 15 +- .../PlutusIR/Transform/Beta/multiapp.golden | 17 +- .../PlutusIR/Transform/Beta/multilet.golden | 27 +- .../Transform/CaseOfCase/basic.golden | 55 +- .../Transform/CaseOfCase/builtinBool.golden | 50 +- .../Transform/CaseOfCase/exponential.golden | 154 +- .../Transform/CaseOfCase/largeExpr.golden | 64 +- .../Transform/CaseOfCase/twoTyArgs.golden | 55 +- .../Transform/DeadCode/builtinBinding.golden | 2 +- .../Transform/DeadCode/datatypeDead.golden | 2 +- .../DeadCode/datatypeLiveConstr.golden | 18 +- .../DeadCode/datatypeLiveDestr.golden | 18 +- .../DeadCode/datatypeLiveType.golden | 12 +- .../DeadCode/etaBuiltinBinding.golden | 2 +- .../Transform/DeadCode/nestedBindings.golden | 13 +- .../DeadCode/nestedBindingsIndirect.golden | 24 +- .../Transform/DeadCode/nonstrictLet.golden | 13 +- .../Transform/DeadCode/pruneDatatype.golden | 16 +- .../DeadCode/recBindingComplex.golden | 13 +- .../DeadCode/recBindingSimple.golden | 2 +- .../Transform/DeadCode/singleBinding.golden | 13 +- .../Transform/DeadCode/strictLet.golden | 25 +- .../Transform/DeadCode/termLet.golden | 2 +- .../Transform/DeadCode/typeLet.golden | 2 +- .../EvaluateBuiltins/addInteger.golden | 2 +- .../EvaluateBuiltins/failingBuiltin.golden | 2 +- .../EvaluateBuiltins/ifThenElse.golden | 2 +- .../EvaluateBuiltins/nonConstantArg.golden | 9 +- .../EvaluateBuiltins/overApplication.golden | 2 +- .../EvaluateBuiltins/traceConservative.golden | 2 +- .../traceNonConservative.golden | 2 +- ...ncompressAndEqualBlsNonConservative.golden | 24 +- .../uncompressBlsConservative.golden | 9 +- .../uncompressBlsNonConservative.golden | 9 +- .../EvaluateBuiltins/underApplication.golden | 2 +- .../PlutusIR/Transform/Inline/builtin.golden | 2 +- .../Inline/callsite-non-trivial-body.golden | 85 +- .../PlutusIR/Transform/Inline/constant.golden | 2 +- .../Inline/effectfulBuiltinArg.golden | 33 +- .../Inline/firstEffectfulTerm1.golden | 2 +- .../Inline/firstEffectfulTerm2.golden | 13 +- .../Transform/Inline/immediateApp.golden | 2 +- .../Transform/Inline/immediateVar.golden | 2 +- .../Inline/inlineConstantsOff.golden | 9 +- .../Transform/Inline/inlineConstantsOn.golden | 5 +- .../PlutusIR/Transform/Inline/letApp.golden | 2 +- .../Inline/letAppMultiNotAcceptable.golden | 13 +- .../Transform/Inline/letFunConstBool.golden | 18 +- .../Transform/Inline/letFunConstInt.golden | 5 +- .../Transform/Inline/letFunConstMulti.golden | 14 +- .../Transform/Inline/letFunInFun.golden | 2 +- .../Transform/Inline/letFunInFunMulti.golden | 13 +- .../Transform/Inline/letNonPure.golden | 15 +- .../Transform/Inline/letNonPureMulti.golden | 22 +- .../Inline/letNonPureMultiStrict.golden | 15 +- .../Transform/Inline/letOverApp.golden | 5 +- .../Transform/Inline/letOverAppMulti.golden | 30 +- .../Transform/Inline/letOverAppType.golden | 11 +- .../Transform/Inline/letTypeApp.golden | 2 +- .../Transform/Inline/letTypeApp2.golden | 15 +- .../Transform/Inline/letTypeAppMulti.golden | 11 +- .../Inline/letTypeAppMultiNotSat.golden | 11 +- .../Inline/letTypeAppMultiSat.golden | 13 +- .../PlutusIR/Transform/Inline/multilet.golden | 35 +- .../Transform/Inline/nameCapture.golden | 19 +- .../Transform/Inline/partiallyApp.golden | 30 +- .../Transform/Inline/rhs-modified.golden | 17 +- .../PlutusIR/Transform/Inline/single.golden | 24 +- .../Transform/Inline/transitive.golden | 2 +- .../PlutusIR/Transform/Inline/tyvar.golden | 2 +- .../test/PlutusIR/Transform/Inline/var.golden | 2 +- .../Transform/KnownCon/applicative.golden | 157 +- .../PlutusIR/Transform/KnownCon/bool.golden | 18 +- .../PlutusIR/Transform/KnownCon/list.golden | 39 +- .../KnownCon/maybe-just-unsaturated.golden | 34 +- .../Transform/KnownCon/maybe-just.golden | 28 +- .../Transform/KnownCon/maybe-nothing.golden | 18 +- .../PlutusIR/Transform/KnownCon/pair.golden | 35 +- .../avoid-floating-into-lam.golden | 25 +- .../avoid-floating-into-tyabs.golden | 21 +- .../relaxed/avoid-floating-into-RHS.golden | 17 +- ...oid-moving-strict-nonvalue-bindings.golden | 17 +- .../relaxed/cannot-float-into-app.golden | 19 +- .../LetFloatIn/relaxed/datatype1.golden | 26 +- .../LetFloatIn/relaxed/datatype2.golden | 33 +- .../LetFloatIn/relaxed/float-into-RHS.golden | 29 +- .../relaxed/float-into-case-arg.golden | 21 +- .../relaxed/float-into-case-branch.golden | 21 +- .../relaxed/float-into-constr.golden | 17 +- .../relaxed/float-into-fun-and-arg-1.golden | 33 +- .../relaxed/float-into-fun-and-arg-2.golden | 36 +- .../LetFloatIn/relaxed/float-into-lam1.golden | 18 +- .../LetFloatIn/relaxed/float-into-lam2.golden | 30 +- .../relaxed/float-into-tyabs1.golden | 52 +- .../relaxed/float-into-tyabs2.golden | 25 +- .../Transform/LetFloatIn/relaxed/type.golden | 36 +- .../Transform/LetFloatOut/even3Eval.golden | 64 +- .../Transform/LetFloatOut/ifError.golden | 38 +- .../Transform/LetFloatOut/inLam.golden | 14 +- .../Transform/LetFloatOut/letInLet.golden | 15 +- .../Transform/LetFloatOut/listMatch.golden | 56 +- .../Transform/LetFloatOut/maybe.golden | 34 +- .../LetFloatOut/mutuallyRecursiveTypes.golden | 29 +- .../mutuallyRecursiveValues.golden | 15 +- .../Transform/LetFloatOut/nonrec1.golden | 17 +- .../Transform/LetFloatOut/nonrec2.golden | 38 +- .../Transform/LetFloatOut/nonrec3.golden | 18 +- .../Transform/LetFloatOut/nonrec4.golden | 24 +- .../Transform/LetFloatOut/nonrec6.golden | 26 +- .../Transform/LetFloatOut/nonrec7.golden | 29 +- .../Transform/LetFloatOut/nonrec8.golden | 39 +- .../Transform/LetFloatOut/nonrec9.golden | 15 +- .../LetFloatOut/nonrecToNonrec.golden | 13 +- .../Transform/LetFloatOut/nonrecToRec.golden | 15 +- .../Transform/LetFloatOut/oldFloatBug.golden | 15 +- .../Transform/LetFloatOut/oldLength.golden | 25 +- .../Transform/LetFloatOut/outLam.golden | 9 +- .../Transform/LetFloatOut/outRhs.golden | 19 +- .../Transform/LetFloatOut/rec1.golden | 40 +- .../Transform/LetFloatOut/rec2.golden | 56 +- .../Transform/LetFloatOut/rec3.golden | 24 +- .../Transform/LetFloatOut/rec4.golden | 13 +- .../LetFloatOut/rhsSqueezeVsNest.golden | 38 +- .../LetFloatOut/strictNonValue.golden | 17 +- .../LetFloatOut/strictNonValue2.golden | 11 +- .../LetFloatOut/strictNonValue3.golden | 30 +- .../LetFloatOut/strictNonValueDeep.golden | 26 +- .../Transform/LetFloatOut/strictValue.golden | 19 +- .../LetFloatOut/strictValueNonValue.golden | 24 +- .../LetFloatOut/strictValueValue.golden | 19 +- .../Transform/NonStrict/nonStrict1.golden | 13 +- .../PlutusIR/Transform/RecSplit/big.golden | 70 +- .../RecSplit/mutuallyRecursiveTypes.golden | 38 +- .../RecSplit/mutuallyRecursiveValues.golden | 15 +- .../Transform/RecSplit/selfrecursive.golden | 36 +- .../PlutusIR/Transform/RecSplit/small.golden | 28 +- .../Transform/RecSplit/truenonrec.golden | 35 +- .../Rename/allShadowedDataNonRec.golden | 17 +- .../Rename/allShadowedDataRec.golden | 17 +- .../Rename/paramShadowedDataNonRec.golden | 17 +- .../Rename/paramShadowedDataRec.golden | 17 +- .../RewriteRules/divideInt.pir.golden | 8 +- .../RewriteRules/equalsInt.pir.golden | 5 +- .../Transform/RewriteRules/let.pir.golden | 12 +- .../RewriteRules/multiplyInt.pir.golden | 5 +- .../unConstrConstrDataFst.pir.golden | 54 +- .../unConstrConstrDataSnd.pir.golden | 22 +- .../StrictLetRec/strictLetRec.golden | 4 +- .../Transform/StrictifyBindings/conapp.golden | 30 +- .../StrictifyBindings/impure1.golden | 15 +- .../Transform/StrictifyBindings/pure1.golden | 5 +- .../Transform/StrictifyBindings/unused.golden | 9 +- .../ThunkRecursions/errorBinding.golden | 14 +- .../Transform/ThunkRecursions/listFold.golden | 96 +- .../ThunkRecursions/listFoldTrace.golden | 102 +- .../Transform/ThunkRecursions/monoMap.golden | 66 +- .../mutuallyRecursiveValues.golden | 24 +- .../preserveEffectOrder.golden | 34 +- .../ThunkRecursions/preserveStrictness.golden | 20 +- .../Transform/Unwrap/unwrapWrap.golden | 44 +- .../test/PlutusIR/TypeCheck/even3Eval.golden | 2 +- .../test/PlutusIR/TypeCheck/ifError.golden | 2 +- .../test/PlutusIR/TypeCheck/letInLet.golden | 2 +- .../test/PlutusIR/TypeCheck/listMatch.golden | 2 +- .../test/PlutusIR/TypeCheck/maybe.golden | 2 +- .../TypeCheck/mutuallyRecursiveTypes.golden | 2 +- .../TypeCheck/mutuallyRecursiveValues.golden | 2 +- .../TypeCheck/nonSelfRecursive.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec1.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec2.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec3.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec4.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec6.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec7.golden | 2 +- .../test/PlutusIR/TypeCheck/nonrec8.golden | 2 +- .../PlutusIR/TypeCheck/nonrecToNonrec.golden | 2 +- .../PlutusIR/TypeCheck/nonrecToRec.golden | 2 +- .../test/PlutusIR/TypeCheck/oldLength.golden | 2 +- .../test/PlutusIR/TypeCheck/rec1.golden | 2 +- .../test/PlutusIR/TypeCheck/rec2.golden | 2 +- .../test/PlutusIR/TypeCheck/rec3.golden | 2 +- .../test/PlutusIR/TypeCheck/rec4.golden | 2 +- .../TypeCheck/sameNameDifferentEnv.golden | 2 +- .../PlutusIR/TypeCheck/strictNonValue.golden | 2 +- .../PlutusIR/TypeCheck/strictNonValue2.golden | 2 +- .../PlutusIR/TypeCheck/strictNonValue3.golden | 2 +- .../TypeCheck/strictNonValueDeep.golden | 2 +- .../PlutusIR/TypeCheck/strictValue.golden | 2 +- .../TypeCheck/strictValueNonValue.golden | 2 +- .../TypeCheck/strictValueValue.golden | 2 +- .../test/PlutusIR/TypeCheck/typeLet.golden | 2 +- .../test/PlutusIR/TypeCheck/typeLetRec.golden | 2 +- .../PlutusIR/TypeCheck/typeLetWrong.golden | 2 +- .../wrongDataConstrReturnType.golden | 2 +- .../test/Analysis/evalOrder/letFun.golden | 10 +- .../test/Analysis/evalOrder/letImpure.golden | 6 +- .../Golden/Default/okConst.uplc.golden | 4 +- .../Golden/Default/okDeep0.uplc.golden | 11 +- .../Golden/Default/okDeep99.uplc.golden | 11 +- .../DeBruijn/Golden/Default/okId0.uplc.golden | 2 +- .../Golden/Default/okId99.uplc.golden | 2 +- .../Golden/Default/okMix1.uplc.golden | 38 +- .../Golden/Default/okMix2.uplc.golden | 38 +- .../Golden/Graceful/graceConst.uplc.golden | 4 +- .../Golden/Graceful/graceDeep.uplc.golden | 2 +- .../Graceful/graceElaborate.uplc.golden | 4 +- .../Golden/Graceful/graceTop.uplc.golden | 2 +- .../test/Evaluation/Golden/closure.plc.golden | 2 +- .../Evaluation/Golden/closure.uplc.golden | 2 +- .../test/Evaluation/Golden/ite.type.golden | 2 +- .../Golden/iteAtHigherKind.type.golden | 2 +- .../iteAtHigherKindFullyApplied.type.golden | 2 +- .../iteAtHigherKindWithCond.type.golden | 2 +- .../iteUninstantiatedFullyApplied.type.golden | 2 +- .../iteUninstantiatedWithCond.type.golden | 2 +- .../Evaluation/Golden/polyError.type.golden | 2 +- .../Machines/Budget/IdNat/0.uplc.golden | 88 +- .../Machines/Budget/IdNat/3.uplc.golden | 88 +- .../Machines/Budget/IdNat/6.uplc.golden | 88 +- .../Machines/Budget/IdNat/9.uplc.golden | 88 +- .../Machines/Budget/IfThenElse/0.uplc.golden | 88 +- .../Machines/Budget/IfThenElse/1.uplc.golden | 88 +- .../Machines/Budget/IfThenElse/2.uplc.golden | 88 +- .../Machines/Budget/IfThenElse/3.uplc.golden | 88 +- .../Machines/Budget/IfThenElse/4.uplc.golden | 88 +- .../Machines/Budget/IfThenElse/5.uplc.golden | 88 +- .../test/Transform/CaseOfCase/1.uplc.golden | 2 +- .../test/Transform/CaseOfCase/2.uplc.golden | 2 +- .../test/Transform/CaseOfCase/3.uplc.golden | 6 +- .../test/Transform/callsiteInline.uplc.golden | 2 +- .../test/Transform/cse1.uplc.golden | 24 +- .../test/Transform/cse2.uplc.golden | 12 +- .../test/Transform/cse3.uplc.golden | 10 +- .../test/Transform/cseExpensive.uplc.golden | 2340 ++++++++--------- .../test/Transform/extraDelays.uplc.golden | 2 +- .../test/Transform/floatDelay1.uplc.golden | 2 +- .../test/Transform/floatDelay2.uplc.golden | 2 +- .../test/Transform/floatDelay3.uplc.golden | 2 +- .../Transform/forceDelayComplex.uplc.golden | 2 +- .../forceDelayMultiApply.uplc.golden | 2 +- .../test/Transform/inlineImpure1.uplc.golden | 2 +- .../test/Transform/inlineImpure2.uplc.golden | 2 +- .../test/Transform/inlineImpure3.uplc.golden | 2 +- .../test/Transform/inlineImpure4.uplc.golden | 2 +- .../test/Transform/inlinePure1.uplc.golden | 2 +- .../test/Transform/inlinePure2.uplc.golden | 2 +- .../test/Transform/inlinePure3.uplc.golden | 2 +- .../test/Transform/inlinePure4.uplc.golden | 2 +- .../Transform/interveningLambda.uplc.golden | 2 +- .../test/Transform/multiApp.uplc.golden | 2 +- .../Budget/9.6/onlyUseFirstField.uplc.golden | 50 +- .../Budget/9.6/patternMatching.uplc.golden | 116 +- .../9.6/recordFields-manual.uplc.golden | 142 +- .../Budget/9.6/recordFields.uplc.golden | 112 +- .../test/Budget/9.6/allCheap.uplc.golden | 76 +- .../test/Budget/9.6/allEmptyList.uplc.golden | 32 +- .../test/Budget/9.6/allExpensive.uplc.golden | 76 +- .../test/Budget/9.6/andCheap.uplc.golden | 70 +- .../test/Budget/9.6/andExpensive.uplc.golden | 70 +- .../Budget/9.6/andWithGHCOpts.uplc.golden | 28 +- .../test/Budget/9.6/andWithLocal.uplc.golden | 30 +- .../Budget/9.6/andWithoutGHCOpts.uplc.golden | 28 +- .../test/Budget/9.6/anyCheap.uplc.golden | 76 +- .../test/Budget/9.6/anyEmptyList.uplc.golden | 32 +- .../test/Budget/9.6/anyExpensive.uplc.golden | 76 +- .../test/Budget/9.6/applicative.uplc.golden | 2 +- .../9.6/builtinListIndexing.uplc.golden | 40 +- .../test/Budget/9.6/constAccL.uplc.golden | 34 +- .../test/Budget/9.6/constAccR.uplc.golden | 28 +- .../test/Budget/9.6/constElL.uplc.golden | 34 +- .../test/Budget/9.6/constElR.uplc.golden | 30 +- .../test/Budget/9.6/elemCheap.uplc.golden | 76 +- .../test/Budget/9.6/elemExpensive.uplc.golden | 76 +- .../test/Budget/9.6/filter.uplc.golden | 80 +- .../test/Budget/9.6/findCheap.uplc.golden | 76 +- .../test/Budget/9.6/findEmptyList.uplc.golden | 32 +- .../test/Budget/9.6/findExpensive.uplc.golden | 76 +- .../Budget/9.6/findIndexCheap.uplc.golden | 78 +- .../Budget/9.6/findIndexEmptyList.uplc.golden | 34 +- .../Budget/9.6/findIndexExpensive.uplc.golden | 78 +- .../test/Budget/9.6/gte0.uplc.golden | 50 +- .../test/Budget/9.6/ifThenElse1.uplc.golden | 2 +- .../test/Budget/9.6/ifThenElse2.uplc.golden | 2 +- .../test/Budget/9.6/listIndexing.uplc.golden | 38 +- .../test/Budget/9.6/lte0.uplc.golden | 50 +- .../test/Budget/9.6/map1.uplc.golden | 822 +++--- .../test/Budget/9.6/map2.uplc.golden | 537 ++-- .../test/Budget/9.6/map3.uplc.golden | 537 ++-- .../test/Budget/9.6/monadicDo.uplc.golden | 20 +- .../test/Budget/9.6/not-not.uplc.golden | 24 +- .../test/Budget/9.6/notElemCheap.uplc.golden | 76 +- .../Budget/9.6/notElemExpensive.uplc.golden | 76 +- .../test/Budget/9.6/null.uplc.golden | 2 +- .../test/Budget/9.6/orCheap.uplc.golden | 70 +- .../test/Budget/9.6/orExpensive.uplc.golden | 70 +- .../test/Budget/9.6/patternMatch.uplc.golden | 2 +- .../test/Budget/9.6/recursiveGte0.uplc.golden | 85 +- .../test/Budget/9.6/recursiveLte0.uplc.golden | 85 +- .../test/Budget/9.6/show.uplc.golden | 845 +++--- .../test/Budget/9.6/sum.uplc.golden | 70 +- .../test/Budget/9.6/sumL.uplc.golden | 54 +- .../test/Budget/9.6/sumR.uplc.golden | 38 +- .../test/Budget/9.6/toFromData.uplc.golden | 344 +-- ...erals-NoStrict-NegativeLiterals.pir.golden | 53 +- ...als-NoStrict-NoNegativeLiterals.pir.golden | 53 +- ...iterals-Strict-NegativeLiterals.pir.golden | 53 +- ...erals-Strict-NoNegativeLiterals.pir.golden | 53 +- .../test/IsData/9.6/bytestring.eval.golden | 2 +- .../test/IsData/9.6/int.eval.golden | 2 +- .../test/IsData/9.6/list.eval.golden | 2 +- .../test/IsData/9.6/matchAsDataE.eval.golden | 2 +- .../test/IsData/9.6/mono.eval.golden | 2 +- .../test/IsData/9.6/nested.eval.golden | 2 +- .../test/IsData/9.6/poly.eval.golden | 2 +- .../test/IsData/9.6/record.eval.golden | 2 +- .../test/IsData/9.6/tuple.eval.golden | 2 +- .../test/IsData/9.6/tupleInterop.eval.golden | 2 +- .../test/IsData/9.6/unit.eval.golden | 2 +- .../test/IsData/9.6/unitInterop.eval.golden | 2 +- .../IsData/9.6/unsafeTupleInterop.eval.golden | 2 +- .../test/Lift/9.6/boolInterop.eval.golden | 2 +- .../test/Lift/9.6/bytestring.uplc.golden | 37 +- .../test/Lift/9.6/int.uplc.golden | 2 +- .../test/Lift/9.6/list.uplc.golden | 53 +- .../test/Lift/9.6/listInterop.eval.golden | 2 +- .../test/Lift/9.6/mono.uplc.golden | 75 +- .../test/Lift/9.6/monoInterop.eval.golden | 2 +- .../test/Lift/9.6/nested.uplc.golden | 143 +- .../test/Lift/9.6/newtypeInt.uplc.golden | 2 +- .../test/Lift/9.6/newtypeInt2.uplc.golden | 2 +- .../test/Lift/9.6/newtypeInt3.uplc.golden | 2 +- .../test/Lift/9.6/poly.uplc.golden | 77 +- .../test/Lift/9.6/polyInterop.eval.golden | 2 +- .../test/Lift/9.6/record.uplc.golden | 46 +- .../test/Lift/9.6/syn.uplc.golden | 64 +- .../test/Lift/9.6/tuple.uplc.golden | 57 +- .../Optimization/9.6/maybeFun.uplc.golden | 42 +- .../9.6/defaultCaseDuplication.pir.golden | 47 +- .../defaultCaseDuplicationNested.pir.golden | 86 +- .../test/Plugin/Basic/9.6/ifOpt.pir.golden | 112 +- .../Plugin/Basic/9.6/ifOptEval.eval.golden | 2 +- .../test/Plugin/Basic/9.6/letFun.pir.golden | 86 +- .../Plugin/Basic/9.6/monadicDo.pir.golden | 174 +- .../test/Plugin/Basic/9.6/monoId.pir.golden | 2 +- .../test/Plugin/Basic/9.6/monoK.pir.golden | 13 +- .../Plugin/Basic/9.6/nonstrictLet.pir.golden | 69 +- .../Basic/9.6/patternMatchDo.pir.golden | 214 +- .../Plugin/Basic/9.6/strictLet.pir.golden | 69 +- .../Plugin/Basic/9.6/strictLetRec.pir.golden | 87 +- .../Basic/9.6/strictMultiLet.pir.golden | 71 +- .../Coverage/9.6/coverageCode.pir.golden | 701 ++--- .../Data/9.6/families/associated.pir.golden | 2 +- .../9.6/families/associatedParam.pir.golden | 49 +- .../Data/9.6/families/basicClosed.pir.golden | 2 +- .../Data/9.6/families/basicData.pir.golden | 33 +- .../Data/9.6/families/basicOpen.pir.golden | 2 +- .../Data/9.6/monomorphic/atPattern.pir.golden | 62 +- .../9.6/monomorphic/defaultCase.pir.golden | 52 +- .../Data/9.6/monomorphic/enum.pir.golden | 19 +- .../monomorphic/irrefutableMatch.pir.golden | 71 +- .../Data/9.6/monomorphic/monoCase.pir.golden | 46 +- .../9.6/monomorphic/monoCaseStrict.pir.golden | 46 +- .../9.6/monomorphic/monoConstDest.eval.golden | 2 +- .../monoConstDestDefault.eval.golden | 2 +- .../monomorphic/monoConstructed.pir.golden | 37 +- .../monomorphic/monoConstructor.pir.golden | 53 +- .../9.6/monomorphic/monoDataType.pir.golden | 52 +- .../9.6/monomorphic/monoRecord.pir.golden | 28 +- .../9.6/monomorphic/nonValueCase.pir.golden | 62 +- .../9.6/monomorphic/recordNewtype.pir.golden | 25 +- .../recordWithStrictField.pir.golden | 56 +- .../monomorphic/strictDataMatch.pir.golden | 54 +- .../Data/9.6/monomorphic/synonym.pir.golden | 2 +- .../9.6/monomorphic/unusedWrapper.pir.golden | 64 +- .../Data/9.6/newtypes/basicNewtype.pir.golden | 2 +- .../newtypes/nestedNewtypeMatch.pir.golden | 2 +- .../9.6/newtypes/newtypeCreatDest.eval.golden | 2 +- .../9.6/newtypes/newtypeCreate.pir.golden | 2 +- .../9.6/newtypes/newtypeCreate2.pir.golden | 2 +- .../Data/9.6/newtypes/newtypeId.pir.golden | 2 +- .../Data/9.6/newtypes/newtypeMatch.pir.golden | 2 +- .../Data/9.6/newtypes/paramNewtype.pir.golden | 37 +- .../polymorphic/defaultCasePoly.pir.golden | 49 +- .../polymorphic/polyConstructed.pir.golden | 66 +- .../9.6/polymorphic/polyDataType.pir.golden | 49 +- .../recursive/interListConstruct.tplc.golden | 316 +-- .../9.6/recursive/listConstDest.eval.golden | 2 +- .../9.6/recursive/listConstDest2.eval.golden | 2 +- .../9.6/recursive/listConstruct.pir.golden | 22 +- .../9.6/recursive/listConstruct2.pir.golden | 68 +- .../9.6/recursive/listConstruct3.pir.golden | 28 +- .../Data/9.6/recursive/listMatch.pir.golden | 43 +- .../9.6/recursive/polyRecEval.eval.golden | 2 +- .../processInterListEval.eval.golden | 2 +- .../9.6/recursive/ptreeConstDest.eval.golden | 2 +- .../9.6/recursive/ptreeConstruct.pir.golden | 129 +- .../9.6/recursive/ptreeFirstEval.eval.golden | 2 +- .../Data/9.6/recursive/ptreeMatch.pir.golden | 57 +- .../9.6/recursive/sameEmptyRose.uplc.golden | 793 ++---- .../recursive/sameEmptyRoseEval.eval.golden | 7 +- .../test/Plugin/Debug/9.6/fib.pir.golden | 156 +- .../test/Plugin/Debug/9.6/letFun.pir.golden | 72 +- .../Errors/9.6/literalAppendBs.uplc.golden | 34 +- .../Functions/9.6/recursive/even.pir.golden | 183 +- .../Functions/9.6/recursive/even3.eval.golden | 2 +- .../Functions/9.6/recursive/even4.eval.golden | 2 +- .../Functions/9.6/recursive/fib.pir.golden | 212 +- .../Functions/9.6/recursive/fib4.eval.golden | 2 +- .../9.6/recursive/lazyLength.pir.golden | 146 +- .../9.6/recursive/strictLength.pir.golden | 146 +- .../Functions/9.6/recursive/sum.pir.golden | 94 +- .../9.6/recursive/sumList.eval.golden | 2 +- .../9.6/unfoldings/allDirect.pir.golden | 329 +-- .../9.6/unfoldings/andDirect.pir.golden | 116 +- .../9.6/unfoldings/andExternal.pir.golden | 64 +- .../unfoldings/applicationFunction.pir.golden | 89 +- .../mutualRecursionUnfoldings.pir.golden | 136 +- .../9.6/unfoldings/nandDirect.pir.golden | 83 +- .../9.6/unfoldings/polyMap.pir.golden | 202 +- .../9.6/unfoldings/recordSelector.pir.golden | 39 +- .../recordSelectorExternal.pir.golden | 41 +- .../9.6/unfoldings/unboxedTuples2.pir.golden | 89 +- .../unboxedTuples2Tuples.pir.golden | 386 +-- .../9.6/unfoldings/unboxedTuples3.pir.golden | 118 +- .../unboxedTuples3Tuples.pir.golden | 486 +--- .../9.6/unfoldings/unboxedTuples4.pir.golden | 156 +- .../9.6/unfoldings/unboxedTuples5.pir.golden | 201 +- .../Plugin/Laziness/9.6/joinError.pir.golden | 96 +- .../Laziness/9.6/joinErrorEval.eval.golden | 2 +- .../Laziness/9.6/lazyDepUnit.pir.golden | 28 +- .../Optimization/9.6/alwaysFails.uplc.golden | 2 +- .../9.6/alwaysSucceeds.uplc.golden | 2 +- .../test/Plugin/Primitives/9.6/and.pir.golden | 57 +- .../Primitives/9.6/andApply.eval.golden | 2 +- .../Plugin/Primitives/9.6/bool.pir.golden | 19 +- .../Primitives/9.6/bytestring.pir.golden | 2 +- .../9.6/bytestringApply.eval.golden | 2 +- .../Primitives/9.6/consByteString.eval.golden | 2 +- .../Primitives/9.6/constructData1.eval.golden | 2 +- .../Primitives/9.6/decodeUtf8.eval.golden | 2 +- .../9.6/deconstructData1.eval.golden | 2 +- .../9.6/deconstructData2.eval.golden | 6 +- .../9.6/deconstructData3.eval.golden | 2 +- .../9.6/deconstructorData1.pir.golden | 37 +- .../9.6/deconstructorData2.pir.golden | 607 +---- .../Primitives/9.6/emptyByteString.pir.golden | 2 +- .../9.6/emptyByteStringApply.eval.golden | 2 +- .../Primitives/9.6/encodeUtf8.pir.golden | 20 +- .../9.6/equalsByteString.eval.golden | 2 +- .../Primitives/9.6/equalsString.eval.golden | 2 +- .../Plugin/Primitives/9.6/error.pir.golden | 24 +- .../Primitives/9.6/ifThenElse.pir.golden | 107 +- .../9.6/ifThenElseApply.eval.golden | 2 +- .../9.6/indexByteString.eval.golden | 2 +- .../test/Plugin/Primitives/9.6/int.pir.golden | 2 +- .../Plugin/Primitives/9.6/int2.pir.golden | 2 +- .../Primitives/9.6/intCompare.pir.golden | 88 +- .../Plugin/Primitives/9.6/intDiv.pir.golden | 65 +- .../Plugin/Primitives/9.6/intEq.pir.golden | 86 +- .../Primitives/9.6/intEqApply.eval.golden | 2 +- .../Plugin/Primitives/9.6/intPlus.pir.golden | 61 +- .../Primitives/9.6/intPlusApply.eval.golden | 2 +- .../9.6/lengthOfByteString.eval.golden | 2 +- .../Primitives/9.6/ltByteString.eval.golden | 2 +- .../Primitives/9.6/matchData1.eval.golden | 2 +- .../Primitives/9.6/serialiseData.pir.golden | 20 +- .../9.6/serialiseDataApply.eval.golden | 2 +- .../Primitives/9.6/sha2_256.eval.golden | 4 +- .../Plugin/Primitives/9.6/string.pir.golden | 2 +- .../Primitives/9.6/stringLiteral.pir.golden | 2 +- .../Plugin/Primitives/9.6/trace.pir.golden | 33 +- .../Primitives/9.6/traceComplex.pir.golden | 94 +- .../Plugin/Primitives/9.6/tuple.pir.golden | 21 +- .../Primitives/9.6/tupleConstDest.eval.golden | 2 +- .../Primitives/9.6/tupleMatch.pir.golden | 31 +- .../Plugin/Primitives/9.6/verify.pir.golden | 130 +- .../Plugin/Primitives/9.6/void.pir.golden | 131 +- .../Plugin/Profiling/9.6/addInt.pir.golden | 115 +- .../Plugin/Profiling/9.6/addInt3.eval.golden | 2 +- .../Profiling/9.6/argMismatch1.eval.golden | 12 +- .../Profiling/9.6/argMismatch2.eval.golden | 2 +- .../Plugin/Profiling/9.6/fact4.eval.golden | 72 +- .../test/Plugin/Profiling/9.6/fib.pir.golden | 343 +-- .../Plugin/Profiling/9.6/fib4.eval.golden | 148 +- .../test/Plugin/Profiling/9.6/id.eval.golden | 2 +- .../Plugin/Profiling/9.6/idCode.pir.golden | 42 +- .../Plugin/Profiling/9.6/letInFun.eval.golden | 20 +- .../Profiling/9.6/letInFunMoreArg.eval.golden | 24 +- .../Profiling/9.6/letRecInFun.eval.golden | 56 +- .../Plugin/Profiling/9.6/swap.eval.golden | 2 +- .../Profiling/9.6/typeclass.eval.golden | 24 +- .../Typeclasses/9.6/compareTest.pir.golden | 650 ++--- .../Typeclasses/9.6/concatTest.pir.golden | 451 +--- .../Typeclasses/9.6/defaultMethods.pir.golden | 138 +- .../9.6/fmapDefaultTest.pir.golden | 1075 ++------ .../Typeclasses/9.6/multiFunction.pir.golden | 294 +-- .../9.6/partialApplication.pir.golden | 144 +- .../Typeclasses/9.6/sequenceTest.pir.golden | 1151 ++------ .../Typeclasses/9.6/sizedBasic.pir.golden | 48 +- .../Typeclasses/9.6/sizedPair.pir.golden | 207 +- .../Plugin/Typeclasses/9.6/sumTest.pir.golden | 410 +-- .../test/StdLib/9.6/errorTrace.pir.golden | 53 +- .../test/StdLib/9.6/ratioInterop.eval.golden | 1 - .../Strictness/9.6/lambda-default.uplc.golden | 2 +- .../9.6/lambda-nonstrict.uplc.golden | 2 +- .../Strictness/9.6/lambda-strict.uplc.golden | 2 +- .../Strictness/9.6/let-default.uplc.golden | 16 +- .../Strictness/9.6/let-nonstrict.uplc.golden | 16 +- .../Strictness/9.6/let-strict.uplc.golden | 16 +- 554 files changed, 10332 insertions(+), 21419 deletions(-) delete mode 100644 plutus-tx-plugin/test/StdLib/9.6/ratioInterop.eval.golden diff --git a/plutus-core/plutus-core/test/scopes/apply.plc.golden b/plutus-core/plutus-core/test/scopes/apply.plc.golden index 8f21ffcbf75..f80658652d5 100644 --- a/plutus-core/plutus-core/test/scopes/apply.plc.golden +++ b/plutus-core/plutus-core/test/scopes/apply.plc.golden @@ -1,3 +1,3 @@ (program - 0.1.0 (lam x_4 y_1 (lam x_5 z_2 [ [ [ f_3 x_5 ] (lam x_6 y_1 x_6) ] x_5 ])) + 0.1.0 (lam x-4 y-1 (lam x-5 z-2 [ [ [ f-3 x-5 ] (lam x-6 y-1 x-6) ] x-5 ])) ) \ No newline at end of file diff --git a/plutus-core/plutus-core/test/scopes/lambda.plc.golden b/plutus-core/plutus-core/test/scopes/lambda.plc.golden index 2bb8ba7a306..26cb6ba44ef 100644 --- a/plutus-core/plutus-core/test/scopes/lambda.plc.golden +++ b/plutus-core/plutus-core/test/scopes/lambda.plc.golden @@ -1 +1 @@ -(program 0.1.0 (lam x_3 y_1 (lam x_4 z_2 [ [ (builtin addInteger) x_4 ] x_4 ]))) \ No newline at end of file +(program 0.1.0 (lam x-3 y-1 (lam x-4 z-2 [ [ (builtin addInteger) x-4 ] x-4 ]))) \ No newline at end of file diff --git a/plutus-core/plutus-core/test/scopes/lambda2.plc.golden b/plutus-core/plutus-core/test/scopes/lambda2.plc.golden index 14ed9deb223..02be190b111 100644 --- a/plutus-core/plutus-core/test/scopes/lambda2.plc.golden +++ b/plutus-core/plutus-core/test/scopes/lambda2.plc.golden @@ -1 +1 @@ -(program 0.1.0 (lam x_6 y_1 (lam x_7 z_2 [ (lam f_8 t_4 j_5) x_7 ]))) \ No newline at end of file +(program 0.1.0 (lam x-6 y-1 (lam x-7 z-2 [ (lam f-8 t-4 j-5) x-7 ]))) \ No newline at end of file diff --git a/plutus-core/plutus-core/test/scopes/negation.plc.golden b/plutus-core/plutus-core/test/scopes/negation.plc.golden index 33814065d0d..38725e552b2 100644 --- a/plutus-core/plutus-core/test/scopes/negation.plc.golden +++ b/plutus-core/plutus-core/test/scopes/negation.plc.golden @@ -1,28 +1,28 @@ (program 0.1.0 (lam - x_6 - (all a_7 (type) (fun a_7 (fun a_7 a_7))) + x-6 + (all a-7 (type) (fun a-7 (fun a-7 a-7))) [ [ [ { (abs - b_8 + b-8 (type) (lam - x_9 - (all a_10 (type) (fun a_10 (fun a_10 a_10))) - (lam t_11 b_8 (lam f_12 b_8 [ [ { x_9 b_8 } t_11 ] f_12 ])) + x-9 + (all a-10 (type) (fun a-10 (fun a-10 a-10))) + (lam t-11 b-8 (lam f-12 b-8 [ [ { x-9 b-8 } t-11 ] f-12 ])) ) ) - (all a_13 (type) (fun a_13 (fun a_13 a_13))) + (all a-13 (type) (fun a-13 (fun a-13 a-13))) } - x_6 + x-6 ] - (abs a_14 (type) (lam x_15 a_14 (lam y_16 a_14 y_16))) + (abs a-14 (type) (lam x-15 a-14 (lam y-16 a-14 y-16))) ] - (abs a_17 (type) (lam t_18 a_17 (lam f_19 a_17 t_18))) + (abs a-17 (type) (lam t-18 a-17 (lam f-19 a-17 t-18))) ] ) ) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/dataEscape.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/dataEscape.golden index 14a08a29a46..9297141283f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/dataEscape.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/dataEscape.golden @@ -1 +1 @@ -(all a_16 (type) (fun a_16 [ Maybe_5 a_16 ])) \ No newline at end of file +all a-16. a-16 -> Maybe-5 a-16 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/idleAll.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/idleAll.golden index 6f1e7b741fe..63e48a22071 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/idleAll.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/idleAll.golden @@ -1,3 +1,3 @@ Error during PIR typechecking: The result-type of a dataconstructor is malformed at location idleAll:12:5-17:5 -The expected result-type is: [ D2 a ] \ No newline at end of file +The expected result-type is: [ D2-12 a-15 ] \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatch.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatch.golden index 1c8b64aad9f..6f1c382ac7a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatch.golden @@ -1,206 +1,50 @@ -(program +program 1.1.0 - [ - [ - [ - { - (abs - List_i0 - (fun (type) (type)) - (lam - Nil_i0 - (all a_i0 (type) [ List_i3 a_i1 ]) - (lam - Cons_i0 - (all - a_i0 (type) (fun a_i1 (fun [ List_i4 a_i1 ] [ List_i4 a_i1 ])) - ) - (lam - match_List_i0 - (all - a_i0 - (type) - (fun - [ List_i5 a_i1 ] - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i6 a_i2 ] out_List_i1)) - out_List_i1 - ) - ) - ) - ) - ) - (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) - ) - ) - ) - ) - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - ) - ) - } - (abs - a_i0 - (type) - (iwrap - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - (constr - (sop + ((/\(List :: * -> *) -> + \(Nil : all a. List a) + (Cons : all a. a -> List a -> List a) + (match_List : + all a. + List a -> + (all out_List. + out_List -> (a -> List a -> out_List) -> out_List)) -> + /\a -> \(x : a) -> x) + {\a -> ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a} + (/\a -> + iwrap + (\(List :: * -> *) a -> sop [] [a, (List a)]) + a + (constr + (sop [] - [a_i1 - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - ) - ) - a_i1 - ]] - ) - 0 - ) - ) - ) - ] - (abs - a_i0 - (type) - (lam - arg_0_i0 - a_i2 - (lam - arg_1_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - ) - ) - a_i3 - ] - (iwrap - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i3 - (constr - (sop + [ a + , ((\a -> ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) + a) ]) + 0 + [])) + (/\a -> + \(arg_0 : a) + (arg_1 : + (\a -> ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) a) -> + iwrap + (\(List :: * -> *) a -> sop [] [a, (List a)]) + a + (constr + (sop [] - [a_i3 - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - ) - ) - a_i3 - ]] - ) - 1 - arg_0_i2 - arg_1_i1 - ) - ) - ) - ) - ) - ] - (abs - a_i0 - (type) - (lam - x_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - ) - ) - a_i2 - ] - (abs - out_List_i0 - (type) - (lam - case_Nil_i0 - out_List_i2 - (lam - case_Cons_i0 - (fun - a_i5 - (fun - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam a_i0 (type) (sop [] [a_i1 [ List_i2 a_i1 ]])) - ) - a_i1 - ) - ) - a_i5 - ] - out_List_i3 - ) - ) - (case out_List_i3 (unwrap x_i4) case_Nil_i2 case_Cons_i1) - ) - ) - ) - ) - ) - ] -) \ No newline at end of file + [ a + , ((\a -> + ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) + a) ]) + 1 + [arg_0, arg_1])) + (/\a -> + \(x : (\a -> ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) a) -> + /\out_List -> + \(case_Nil : out_List) + (case_Cons : + a -> + (\a -> ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) + a -> + out_List) -> + case out_List (unwrap x) [case_Nil, case_Cons])) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatchEval.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatchEval.golden index 5d050430f86..52e9437ecf6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatchEval.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/listMatchEval.golden @@ -1 +1 @@ -(delay (lam x_0 x_0)) \ No newline at end of file +delay (\x -> x) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/maybe.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/maybe.golden index fe70eba596c..ea9bfb24453 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/maybe.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/maybe.golden @@ -1,74 +1,20 @@ -(program +program 1.1.0 - [ - { - [ - [ - [ - { - (abs - Maybe_i0 - (fun (type) (type)) - (lam - Nothing_i0 - (all a_i0 (type) [ Maybe_i3 a_i1 ]) - (lam - Just_i0 - (all a_i0 (type) (fun a_i1 [ Maybe_i4 a_i1 ])) - (lam - match_Maybe_i0 - (all - a_i0 - (type) - (fun - [ Maybe_i5 a_i1 ] - (all - out_Maybe_i0 - (type) - (fun - out_Maybe_i1 - (fun (fun a_i2 out_Maybe_i1) out_Maybe_i1) - ) - ) - ) - ) - Just_i2 - ) - ) - ) - ) - (lam a_i0 (type) (sop [] [a_i1])) - } - (abs a_i0 (type) (constr (sop [] [a_i1]) 0)) - ] - (abs - a_i0 (type) (lam arg_0_i0 a_i2 (constr (sop [] [a_i2]) 1 arg_0_i1)) - ) - ] - (abs - a_i0 - (type) - (lam - x_i0 - [ (lam a_i0 (type) (sop [] [a_i1])) a_i2 ] - (abs - out_Maybe_i0 - (type) - (lam - case_Nothing_i0 - out_Maybe_i2 - (lam - case_Just_i0 - (fun a_i5 out_Maybe_i3) - (case out_Maybe_i3 x_i4 case_Nothing_i2 case_Just_i1) - ) - ) - ) - ) - ) - ] - (all a_i0 (type) (fun a_i1 a_i1)) - } - (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) - ] -) \ No newline at end of file + ((/\(Maybe :: * -> *) -> + \(Nothing : all a. Maybe a) + (Just : all a. a -> Maybe a) + (match_Maybe : + all a. + Maybe a -> + (all out_Maybe. out_Maybe -> (a -> out_Maybe) -> out_Maybe)) -> + Just) + {\a -> sop [] [a]} + (/\a -> constr (sop [] [a]) 0 []) + (/\a -> \(arg_0 : a) -> constr (sop [] [a]) 1 [arg_0]) + (/\a -> + \(x : (\a -> sop [] [a]) a) -> + /\out_Maybe -> + \(case_Nothing : out_Maybe) (case_Just : a -> out_Maybe) -> + case out_Maybe x [case_Nothing, case_Just]) + {all a. a -> a} + (/\a -> \(x : a) -> x)) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/listMatch.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/listMatch.golden index 2d3828573fc..84182c73f8f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/listMatch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/listMatch.golden @@ -1,296 +1,71 @@ -(program +program 1.1.0 - [ - [ - [ - { - (abs - List_i0 - (fun (type) (type)) - (lam - Nil_i0 - (all a_i0 (type) [ List_i3 a_i1 ]) - (lam - Cons_i0 - (all - a_i0 (type) (fun a_i1 (fun [ List_i4 a_i1 ] [ List_i4 a_i1 ])) - ) - (lam - match_List_i0 - (all - a_i0 - (type) - (fun - [ List_i5 a_i1 ] - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i6 a_i2 ] out_List_i1)) - out_List_i1 - ) - ) - ) - ) - ) - (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) - ) - ) - ) - ) - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i3 a_i2 ] out_List_i1)) - out_List_i1 - ) - ) - ) - ) - ) - a_i1 - ) - ) - } - (abs - a_i0 - (type) - (iwrap - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i3 a_i2 ] out_List_i1)) out_List_i1 - ) - ) - ) - ) - ) - a_i1 - (abs - out_List_i0 - (type) - (lam - case_Nil_i0 - out_List_i2 - (lam - case_Cons_i0 - (fun - a_i4 - (fun - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun - a_i2 (fun [ List_i3 a_i2 ] out_List_i1) - ) - out_List_i1 - ) - ) - ) - ) - ) - a_i1 - ) - ) - a_i4 - ] - out_List_i3 - ) - ) - case_Nil_i2 - ) - ) - ) - ) - ) - ] - (abs - a_i0 - (type) - (lam - arg_0_i0 - a_i2 - (lam - arg_1_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i3 a_i2 ] out_List_i1)) - out_List_i1 - ) - ) - ) - ) - ) - a_i1 - ) - ) - a_i3 - ] - (iwrap - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i3 a_i2 ] out_List_i1)) - out_List_i1 - ) - ) - ) - ) - ) - a_i3 - (abs - out_List_i0 - (type) - (lam - case_Nil_i0 - out_List_i2 - (lam - case_Cons_i0 - (fun - a_i6 - (fun - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun - a_i2 - (fun [ List_i3 a_i2 ] out_List_i1) - ) - out_List_i1 - ) - ) - ) - ) - ) - a_i1 - ) - ) - a_i6 - ] - out_List_i3 - ) - ) - [ [ case_Cons_i1 arg_0_i5 ] arg_1_i4 ] - ) - ) - ) - ) - ) - ) - ) - ] - (abs - a_i0 - (type) - (lam - x_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - List_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (all - out_List_i0 - (type) - (fun - out_List_i1 - (fun - (fun a_i2 (fun [ List_i3 a_i2 ] out_List_i1)) - out_List_i1 - ) - ) - ) - ) - ) - a_i1 - ) - ) - a_i2 - ] - (unwrap x_i1) - ) - ) - ] -) \ No newline at end of file + ((/\(List :: * -> *) -> + \(Nil : all a. List a) + (Cons : all a. a -> List a -> List a) + (match_List : + all a. + List a -> + (all out_List. + out_List -> (a -> List a -> out_List) -> out_List)) -> + /\a -> \(x : a) -> x) + {\a -> + ifix + (\(List :: * -> *) a -> + all out_List. out_List -> (a -> List a -> out_List) -> out_List) + a} + (/\a -> + iwrap + (\(List :: * -> *) a -> + all out_List. out_List -> (a -> List a -> out_List) -> out_List) + a + (/\out_List -> + \(case_Nil : out_List) + (case_Cons : + a -> + (\a -> + ifix + (\(List :: * -> *) a -> + all out_List. + out_List -> (a -> List a -> out_List) -> out_List) + a) + a -> + out_List) -> + case_Nil)) + (/\a -> + \(arg_0 : a) + (arg_1 : + (\a -> + ifix + (\(List :: * -> *) a -> + all out_List. + out_List -> (a -> List a -> out_List) -> out_List) + a) + a) -> + iwrap + (\(List :: * -> *) a -> + all out_List. out_List -> (a -> List a -> out_List) -> out_List) + a + (/\out_List -> + \(case_Nil : out_List) + (case_Cons : + a -> + (\a -> + ifix + (\(List :: * -> *) a -> + all out_List. + out_List -> (a -> List a -> out_List) -> out_List) + a) + a -> + out_List) -> + case_Cons arg_0 arg_1)) + (/\a -> + \(x : + (\a -> + ifix + (\(List :: * -> *) a -> + all out_List. + out_List -> (a -> List a -> out_List) -> out_List) + a) + a) -> + unwrap x)) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/maybe.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/maybe.golden index 6bf072fa224..1c9ca6d10a2 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/maybe.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/scott/maybe.golden @@ -1,111 +1,26 @@ -(program +program 1.1.0 - [ - { - [ - [ - [ - { - (abs - Maybe_i0 - (fun (type) (type)) - (lam - Nothing_i0 - (all a_i0 (type) [ Maybe_i3 a_i1 ]) - (lam - Just_i0 - (all a_i0 (type) (fun a_i1 [ Maybe_i4 a_i1 ])) - (lam - match_Maybe_i0 - (all - a_i0 - (type) - (fun - [ Maybe_i5 a_i1 ] - (all - out_Maybe_i0 - (type) - (fun - out_Maybe_i1 - (fun (fun a_i2 out_Maybe_i1) out_Maybe_i1) - ) - ) - ) - ) - Just_i2 - ) - ) - ) - ) - (lam - a_i0 - (type) - (all - out_Maybe_i0 - (type) - (fun out_Maybe_i1 (fun (fun a_i2 out_Maybe_i1) out_Maybe_i1)) - ) - ) - } - (abs - a_i0 - (type) - (abs - out_Maybe_i0 - (type) - (lam - case_Nothing_i0 - out_Maybe_i2 - (lam case_Just_i0 (fun a_i4 out_Maybe_i3) case_Nothing_i2) - ) - ) - ) - ] - (abs - a_i0 - (type) - (lam - arg_0_i0 - a_i2 - (abs - out_Maybe_i0 - (type) - (lam - case_Nothing_i0 - out_Maybe_i2 - (lam - case_Just_i0 - (fun a_i5 out_Maybe_i3) - [ case_Just_i1 arg_0_i4 ] - ) - ) - ) - ) - ) - ] - (abs - a_i0 - (type) - (lam - x_i0 - [ - (lam - a_i0 - (type) - (all - out_Maybe_i0 - (type) - (fun out_Maybe_i1 (fun (fun a_i2 out_Maybe_i1) out_Maybe_i1)) - ) - ) - a_i2 - ] - x_i1 - ) - ) - ] - (all a_i0 (type) (fun a_i1 a_i1)) - } - (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) - ] -) \ No newline at end of file + ((/\(Maybe :: * -> *) -> + \(Nothing : all a. Maybe a) + (Just : all a. a -> Maybe a) + (match_Maybe : + all a. + Maybe a -> + (all out_Maybe. out_Maybe -> (a -> out_Maybe) -> out_Maybe)) -> + Just) + {\a -> all out_Maybe. out_Maybe -> (a -> out_Maybe) -> out_Maybe} + (/\a out_Maybe -> + \(case_Nothing : out_Maybe) (case_Just : a -> out_Maybe) -> + case_Nothing) + (/\a -> + \(arg_0 : a) -> + /\out_Maybe -> + \(case_Nothing : out_Maybe) (case_Just : a -> out_Maybe) -> + case_Just arg_0) + (/\a -> + \(x : + (\a -> all out_Maybe. out_Maybe -> (a -> out_Maybe) -> out_Maybe) + a) -> + x) + {all a. a -> a} + (/\a -> \(x : a) -> x)) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/some.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/some.golden index 9b263e9029b..c77d8e258cd 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/some.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Datatype/some.golden @@ -1,3 +1,3 @@ Error during PIR typechecking: The result-type of a dataconstructor is malformed at location some:4:5-9:5 -The expected result-type is: [ Some f ] \ No newline at end of file +The expected result-type is: [ Some-6 f-9 ] \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Error/recursiveTypeBind.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Error/recursiveTypeBind.golden index e76c28f6843..49b04c9ac58 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Error/recursiveTypeBind.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Error/recursiveTypeBind.golden @@ -1,2 +1,4 @@ Error during compilation: Type bindings cannot appear in recursive let, use datatypebind insteadThe type binding is - (typebind (tyvardecl unit (type)) (all a (type) (fun unit unit)))((recursive) let binding; from recursiveTypeBind:1:1-11:1) \ No newline at end of file + (typebind + (tyvardecl unit-210 (type)) (all a-211 (type) (fun unit-210 unit-210)) +)((recursive) let binding; from recursiveTypeBind:1:1-11:1) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letDep.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letDep.golden index 0b14f2e0e8f..666b9536146 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letDep.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letDep.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 3)) \ No newline at end of file +program 1.1.0 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letInLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letInLet.golden index e388e692288..0bc71713483 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letInLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Let/letInLet.golden @@ -1 +1 @@ -(program 1.1.0 (abs a_i0 (type) (lam x_i0 a_i2 x_i1))) \ No newline at end of file +program 1.1.0 (/\a -> \(x : a) -> x) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3.golden index 3a0b1ae9696..1d6982b4a9f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3.golden @@ -1,636 +1,123 @@ -(program +program 1.1.0 - [ - [ - [ - { - (abs - Bool_i0 - (type) - (lam - True_i0 - Bool_i2 - (lam - False_i0 - Bool_i3 - (lam - match_Bool_i0 - (fun - Bool_i4 - (all - out_Bool_i0 - (type) - (fun out_Bool_i1 (fun out_Bool_i1 out_Bool_i1)) - ) - ) - [ - [ - [ - { - (abs - Nat_i0 - (type) - (lam - Zero_i0 - Nat_i2 - (lam - Suc_i0 - (fun Nat_i3 Nat_i3) - (lam - match_Nat_i0 - (fun - Nat_i4 - (all - out_Nat_i0 - (type) - (fun - out_Nat_i1 - (fun (fun Nat_i5 out_Nat_i1) out_Nat_i1) - ) - ) - ) - [ - (lam - tup_i0 - (all - r_i0 - (type) - (fun - (fun - (fun Nat_i6 Bool_i10) - (fun (fun Nat_i6 Bool_i10) r_i1) - ) - r_i1 - ) - ) - [ - (lam - even_i0 - (fun Nat_i6 Bool_i10) - [ - (lam - odd_i0 - (fun Nat_i7 Bool_i11) - [ - even_i2 - [ - Suc_i5 - [ Suc_i5 [ Suc_i5 Zero_i6 ] ] - ] - ] - ) - [ - { tup_i2 (fun Nat_i6 Bool_i10) } - (lam - arg_0_i0 - (fun Nat_i7 Bool_i11) - (lam - arg_1_i0 - (fun Nat_i8 Bool_i12) - arg_1_i1 - ) - ) - ] - ] - ) - [ - { tup_i1 (fun Nat_i5 Bool_i9) } - (lam - arg_0_i0 - (fun Nat_i6 Bool_i10) - (lam - arg_1_i0 - (fun Nat_i7 Bool_i11) - arg_0_i2 - ) - ) - ] - ] - ) - [ - [ - { - (abs - F_i0 - (fun (type) (type)) - (lam - by_i0 - (fun - (all - Q_i0 - (type) - (fun [ F_i3 Q_i1 ] Q_i1) - ) - (all - Q_i0 - (type) - (fun [ F_i3 Q_i1 ] Q_i1) - ) - ) - [ - { - { - (abs - a_i0 - (type) - (abs - b_i0 - (type) - (lam - f_i0 - (fun - (fun a_i3 b_i2) - (fun a_i3 b_i2) - ) - [ - (lam - s_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - self_i0 - (fun - (type) - (type) - ) - (lam - a_i0 - (type) - (fun - [ - self_i2 - a_i1 - ] - a_i1 - ) - ) - ) - a_i1 - ) - ) - (fun a_i4 b_i3) - ] - [ - (unwrap s_i1) - s_i1 - ] - ) - (iwrap - (lam - self_i0 - (fun - (type) (type) - ) - (lam - a_i0 - (type) - (fun - [ - self_i2 - a_i1 - ] - a_i1 - ) - ) - ) - (fun a_i3 b_i2) - (lam - s_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - self_i0 - (fun - (type) - (type) - ) - (lam - a_i0 - (type) - (fun - [ - self_i2 - a_i1 - ] - a_i1 - ) - ) - ) - a_i1 - ) - ) - (fun - a_i4 b_i3 - ) - ] - [ - f_i2 - (lam - x_i0 - a_i5 - [ - [ - (unwrap - s_i2 - ) - s_i2 - ] - x_i1 - ] - ) - ] - ) - ) - ] - ) - ) - ) - (all - Q_i0 - (type) - (fun - [ F_i3 Q_i1 ] - [ F_i3 Q_i1 ] - ) - ) - } - (all - Q_i0 - (type) - (fun [ F_i3 Q_i1 ] Q_i1) - ) - } - (lam - rec_i0 - (fun - (all - Q_i0 - (type) - (fun - [ F_i4 Q_i1 ] - [ F_i4 Q_i1 ] - ) - ) - (all - Q_i0 - (type) - (fun [ F_i4 Q_i1 ] Q_i1) - ) - ) - (lam - h_i0 - (all - Q_i0 - (type) - (fun - [ F_i5 Q_i1 ] - [ F_i5 Q_i1 ] - ) - ) - (abs - R_i0 - (type) - (lam - fr_i0 - [ F_i6 R_i2 ] - [ - { - [ - by_i5 - (abs - Q_i0 - (type) - (lam - fq_i0 - [ F_i8 Q_i2 ] - [ - { - [ - rec_i6 - h_i5 - ] - Q_i2 - } - [ - { - h_i5 - Q_i2 - } - fq_i1 - ] - ] - ) - ) - ] - R_i2 - } - fr_i1 - ] - ) - ) - ) - ) - ] - ) - ) - (lam - X_i0 - (type) - (fun - (fun Nat_i5 Bool_i9) - (fun (fun Nat_i5 Bool_i9) X_i1) - ) - ) - } - (lam - k_i0 - (all - Q_i0 - (type) - (fun - (fun - (fun Nat_i6 Bool_i10) - (fun (fun Nat_i6 Bool_i10) Q_i1) - ) - Q_i1 - ) - ) - (abs - S_i0 - (type) - (lam - h_i0 - (fun - (fun Nat_i7 Bool_i11) - (fun (fun Nat_i7 Bool_i11) S_i2) - ) - [ - [ - h_i1 - (lam - x_i0 - Nat_i8 - [ - { k_i4 Bool_i12 } - (lam - f_0_i0 - (fun Nat_i9 Bool_i13) - (lam - f_1_i0 - (fun Nat_i10 Bool_i14) - [ f_0_i2 x_i3 ] - ) - ) - ] - ) - ] - (lam - x_i0 - Nat_i8 - [ - { k_i4 Bool_i12 } - (lam - f_0_i0 - (fun Nat_i9 Bool_i13) - (lam - f_1_i0 - (fun Nat_i10 Bool_i14) - [ f_1_i1 x_i3 ] - ) - ) - ] - ) - ] - ) - ) - ) - ] - (abs - Q_i0 - (type) - (lam - choose_i0 - (fun - (fun Nat_i6 Bool_i10) - (fun (fun Nat_i6 Bool_i10) Q_i2) - ) - (lam - even_i0 - (fun Nat_i7 Bool_i11) - (lam - odd_i0 - (fun Nat_i8 Bool_i12) - [ - [ - choose_i3 - (lam - n_i0 - Nat_i9 - [ - [ - { - [ match_Nat_i6 n_i1 ] - Bool_i13 - } - True_i12 - ] - (lam - p_i0 - Nat_i10 - [ odd_i3 p_i1 ] - ) - ] - ) - ] - (lam - n_i0 - Nat_i9 - [ - [ - { - [ match_Nat_i6 n_i1 ] - Bool_i13 - } - False_i11 - ] - (lam - p_i0 - Nat_i10 - [ even_i4 p_i1 ] - ) - ] - ) - ] - ) - ) - ) - ) - ] - ] - ) - ) - ) - ) - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 - (fun (type) (type)) - [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - } - (iwrap - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - (constr - (sop - [] - [(ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 - (fun (type) (type)) - [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - )] - ) - 0 - ) - ) - ] - (lam - arg_0_i0 - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - (iwrap - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - (constr - (sop - [] - [(ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 - (fun (type) (type)) - [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - )] - ) - 1 - arg_0_i1 - ) - ) - ) - ] - (lam - x_i0 - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - (abs - out_Nat_i0 - (type) - (lam - case_Zero_i0 - out_Nat_i2 - (lam - case_Suc_i0 - (fun - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam - f_i0 - (fun (type) (type)) - [ f_i1 [ rec_i2 f_i1 ] ] - ) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - out_Nat_i3 - ) - (case - out_Nat_i3 (unwrap x_i4) case_Zero_i2 case_Suc_i1 - ) - ) - ) - ) - ) - ] - ) - ) - ) - ) - (sop [] []) - } - (constr (sop [] []) 0) - ] - (constr (sop [] []) 1) - ] - (lam - x_i0 - (sop [] []) - (abs - out_Bool_i0 - (type) - (lam - case_True_i0 - out_Bool_i2 - (lam - case_False_i0 - out_Bool_i3 - (case out_Bool_i3 x_i4 case_True_i2 case_False_i1) - ) - ) - ) - ) - ] -) \ No newline at end of file + ((/\Bool -> + \(True : Bool) + (False : Bool) + (match_Bool : + Bool -> (all out_Bool. out_Bool -> out_Bool -> out_Bool)) -> + (/\Nat -> + \(Zero : Nat) + (Suc : Nat -> Nat) + (match_Nat : + Nat -> (all out_Nat. out_Nat -> (Nat -> out_Nat) -> out_Nat)) -> + (\(tup : all r. ((Nat -> Bool) -> (Nat -> Bool) -> r) -> r) -> + (\(even : Nat -> Bool) -> + (\(odd : Nat -> Bool) -> even (Suc (Suc (Suc Zero)))) + (tup + {Nat -> Bool} + (\(arg_0 : Nat -> Bool) (arg_1 : Nat -> Bool) -> + arg_1))) + (tup + {Nat -> Bool} + (\(arg_0 : Nat -> Bool) (arg_1 : Nat -> Bool) -> arg_0))) + ((/\(F :: * -> *) -> + \(by : (all Q. F Q -> Q) -> (all Q. F Q -> Q)) -> + (/\a b -> + \(f : (a -> b) -> a -> b) -> + (\(s : + (\a -> + ifix (\(self :: * -> *) a -> self a -> a) a) + (a -> b)) -> + unwrap s s) + (iwrap + (\(self :: * -> *) a -> self a -> a) + (a -> b) + (\(s : + (\a -> + ifix + (\(self :: * -> *) a -> self a -> a) + a) + (a -> b)) -> + f (\(x : a) -> unwrap s s x)))) + {all Q. F Q -> F Q} + {all Q. F Q -> Q} + (\(rec : (all Q. F Q -> F Q) -> (all Q. F Q -> Q)) + (h : all Q. F Q -> F Q) -> + /\R -> + \(fr : F R) -> + by + (/\Q -> \(fq : F Q) -> rec h {Q} (h {Q} fq)) + {R} + fr)) + {\X -> (Nat -> Bool) -> (Nat -> Bool) -> X} + (\(k : all Q. ((Nat -> Bool) -> (Nat -> Bool) -> Q) -> Q) -> + /\S -> + \(h : (Nat -> Bool) -> (Nat -> Bool) -> S) -> + h + (\(x : Nat) -> + k + {Bool} + (\(f_0 : Nat -> Bool) (f_1 : Nat -> Bool) -> + f_0 x)) + (\(x : Nat) -> + k + {Bool} + (\(f_0 : Nat -> Bool) (f_1 : Nat -> Bool) -> + f_1 x))) + (/\Q -> + \(choose : (Nat -> Bool) -> (Nat -> Bool) -> Q) + (even : Nat -> Bool) + (odd : Nat -> Bool) -> + choose + (\(n : Nat) -> + match_Nat n {Bool} True (\(p : Nat) -> odd p)) + (\(n : Nat) -> + match_Nat n {Bool} False (\(p : Nat) -> even p))))) + {ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])} + (iwrap + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat]) + (constr + (sop + [] + [ (ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) ]) + 0 + [])) + (\(arg_0 : + ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) -> + iwrap + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat]) + (constr + (sop + [] + [ (ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) ]) + 1 + [arg_0])) + (\(x : + ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) -> + /\out_Nat -> + \(case_Zero : out_Nat) + (case_Suc : + ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat]) -> + out_Nat) -> + case out_Nat (unwrap x) [case_Zero, case_Suc])) + {sop [] []} + (constr (sop [] []) 0 []) + (constr (sop [] []) 1 []) + (\(x : sop [] []) -> + /\out_Bool -> + \(case_True : out_Bool) (case_False : out_Bool) -> + case out_Bool x [case_True, case_False])) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3Eval.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3Eval.golden index f217693e82c..3a05a39aa43 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3Eval.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/even3Eval.golden @@ -1 +1 @@ -(constr 1) \ No newline at end of file +constr 1 [] \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/factorial.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/factorial.golden index 0cd169bc9ba..b6c93df7bb7 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/factorial.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/factorial.golden @@ -1,37 +1,10 @@ -(program +program 1.1.0 - [ - [ - (lam s_1609 [ s_1609 s_1609 ]) - (lam - s_1610 - (lam - i_1611 - [ - [ - [ - [ - (force (builtin ifThenElse)) - [ [ (builtin equalsInteger) (con integer 0) ] i_1611 ] - ] - (lam u_1612 (con integer 1)) - ] - (lam - u_1613 - [ - [ (builtin multiplyInteger) i_1611 ] - [ - (lam x_1614 [ [ s_1610 s_1610 ] x_1614 ]) - [ [ (builtin subtractInteger) i_1611 ] (con integer 1) ] - ] - ] - ) - ] - (con unit ()) - ] - ) - ) - ] - (con integer 5) - ] -) \ No newline at end of file + ((\s -> s s) + (\s i -> + force ifThenElse + (equalsInteger 0 i) + (\u -> 1) + (\u -> multiplyInteger i ((\x -> s s x) (subtractInteger i 1))) + ()) + 5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/mutuallyRecursiveValues.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/mutuallyRecursiveValues.golden index 0818ff6bb40..bb0ec557725 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/mutuallyRecursiveValues.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/mutuallyRecursiveValues.golden @@ -1,442 +1,77 @@ -(program +program 1.1.0 - [ - (lam - tup_i0 - (all - r_i0 - (type) - (fun - (fun - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - (fun - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - r_i1 - ) - ) - r_i1 - ) - ) - [ - (lam - x_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) (all a_i0 (type) (fun a_i1 a_i1)) - ) - [ - (lam - y_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - [ - (lam - x_i0 - (all a_i0 (type) (fun a_i1 a_i1)) - [ - (lam y_i0 (all a_i0 (type) (fun a_i1 a_i1)) x_i2) - [ y_i2 (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) ] - ] - ) - [ x_i2 (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) ] - ] - ) - [ - { - tup_i2 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - } - (lam - arg_0_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - (lam - arg_1_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - arg_1_i1 - ) - ) - ] - ] - ) - [ - { - tup_i1 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - } - (lam - arg_0_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - (lam - arg_1_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - arg_0_i2 - ) - ) - ] - ] - ) - [ - { - { - { - { - (abs - a_i0 - (type) - (abs - b_i0 - (type) - (abs - a_i0 - (type) - (abs - b_i0 - (type) - (lam - f_i0 - (all - Q_i0 - (type) - (fun - (fun (fun a_i6 b_i5) (fun (fun a_i4 b_i3) Q_i1)) - (fun (fun a_i6 b_i5) (fun (fun a_i4 b_i3) Q_i1)) - ) - ) - [ - [ - { - (abs - F_i0 - (fun (type) (type)) - (lam - by_i0 - (fun - (all Q_i0 (type) (fun [ F_i3 Q_i1 ] Q_i1)) - (all Q_i0 (type) (fun [ F_i3 Q_i1 ] Q_i1)) - ) - [ - { - { - (abs - a_i0 - (type) - (abs - b_i0 - (type) - (lam - f_i0 - (fun - (fun a_i3 b_i2) (fun a_i3 b_i2) - ) - [ - (lam - s_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - self_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (fun - [ self_i2 a_i1 ] - a_i1 - ) - ) - ) - a_i1 - ) - ) - (fun a_i4 b_i3) - ] - [ (unwrap s_i1) s_i1 ] - ) - (iwrap - (lam - self_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (fun - [ self_i2 a_i1 ] a_i1 - ) - ) - ) - (fun a_i3 b_i2) - (lam - s_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - self_i0 - (fun (type) (type)) - (lam - a_i0 - (type) - (fun - [ self_i2 a_i1 ] - a_i1 - ) - ) - ) - a_i1 - ) - ) - (fun a_i4 b_i3) - ] - [ - f_i2 - (lam - x_i0 - a_i5 - [ - [ (unwrap s_i2) s_i2 ] - x_i1 - ] - ) - ] - ) - ) - ] - ) - ) - ) - (all - Q_i0 - (type) - (fun [ F_i3 Q_i1 ] [ F_i3 Q_i1 ]) - ) - } - (all Q_i0 (type) (fun [ F_i3 Q_i1 ] Q_i1)) - } - (lam - rec_i0 - (fun - (all - Q_i0 - (type) - (fun [ F_i4 Q_i1 ] [ F_i4 Q_i1 ]) - ) - (all - Q_i0 (type) (fun [ F_i4 Q_i1 ] Q_i1) - ) - ) - (lam - h_i0 - (all - Q_i0 - (type) - (fun [ F_i5 Q_i1 ] [ F_i5 Q_i1 ]) - ) - (abs - R_i0 - (type) - (lam - fr_i0 - [ F_i6 R_i2 ] - [ - { - [ - by_i5 - (abs - Q_i0 - (type) - (lam - fq_i0 - [ F_i8 Q_i2 ] - [ - { [ rec_i6 h_i5 ] Q_i2 } - [ { h_i5 Q_i2 } fq_i1 ] - ] - ) - ) - ] - R_i2 - } - fr_i1 - ] - ) - ) - ) - ) - ] - ) - ) - (lam - X_i0 - (type) - (fun (fun a_i6 b_i5) (fun (fun a_i4 b_i3) X_i1)) - ) - } - (lam - k_i0 - (all - Q_i0 - (type) - (fun - (fun - (fun a_i7 b_i6) (fun (fun a_i5 b_i4) Q_i1) - ) - Q_i1 - ) - ) - (abs - S_i0 - (type) - (lam - h_i0 - (fun - (fun a_i8 b_i7) (fun (fun a_i6 b_i5) S_i2) - ) - [ - [ - h_i1 - (lam - x_i0 - a_i9 - [ - { k_i4 b_i8 } - (lam - f_0_i0 - (fun a_i10 b_i9) - (lam - f_1_i0 - (fun a_i9 b_i8) - [ f_0_i2 x_i3 ] - ) - ) - ] - ) - ] - (lam - x_i0 - a_i7 - [ - { k_i4 b_i6 } - (lam - f_0_i0 - (fun a_i10 b_i9) - (lam - f_1_i0 - (fun a_i9 b_i8) - [ f_1_i1 x_i3 ] - ) - ) - ] - ) - ] - ) - ) - ) - ] - f_i1 - ] - ) - ) - ) - ) - ) - (all a_i0 (type) (fun a_i1 a_i1)) - } - (all a_i0 (type) (fun a_i1 a_i1)) - } - (all a_i0 (type) (fun a_i1 a_i1)) - } - (all a_i0 (type) (fun a_i1 a_i1)) - } - (abs - Q_i0 - (type) - (lam - choose_i0 - (fun - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - (fun - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - Q_i2 - ) - ) - (lam - x_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - (lam - y_i0 - (fun - (all a_i0 (type) (fun a_i1 a_i1)) - (all a_i0 (type) (fun a_i1 a_i1)) - ) - [ - [ - choose_i3 - (lam - arg_i0 - (all a_i0 (type) (fun a_i1 a_i1)) - [ y_i2 (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) ] - ) - ] - (lam - arg_i0 - (all a_i0 (type) (fun a_i1 a_i1)) - (abs - a_i0 - (type) - (lam - z_i0 - a_i2 - [ - { [ x_i5 (abs a_i0 (type) (lam x_i0 a_i2 x_i1)) ] a_i2 } - z_i1 - ] - ) - ) - ) - ] - ) - ) - ) - ) - ] - ] -) \ No newline at end of file + ((\(tup : + all r. + (((all a. a -> a) -> (all a. a -> a)) -> + ((all a. a -> a) -> (all a. a -> a)) -> + r) -> + r) -> + (\(x : (all a. a -> a) -> (all a. a -> a)) -> + (\(y : (all a. a -> a) -> (all a. a -> a)) -> + (\(x : all a. a -> a) -> + (\(y : all a. a -> a) -> x) (y (/\a -> \(x : a) -> x))) + (x (/\a -> \(x : a) -> x))) + (tup + {(all a. a -> a) -> (all a. a -> a)} + (\(arg_0 : (all a. a -> a) -> (all a. a -> a)) + (arg_1 : (all a. a -> a) -> (all a. a -> a)) -> + arg_1))) + (tup + {(all a. a -> a) -> (all a. a -> a)} + (\(arg_0 : (all a. a -> a) -> (all a. a -> a)) + (arg_1 : (all a. a -> a) -> (all a. a -> a)) -> + arg_0))) + ((/\a b a b -> + \(f : + all Q. ((a -> b) -> (a -> b) -> Q) -> (a -> b) -> (a -> b) -> Q) -> + (/\(F :: * -> *) -> + \(by : (all Q. F Q -> Q) -> (all Q. F Q -> Q)) -> + (/\a b -> + \(f : (a -> b) -> a -> b) -> + (\(s : + (\a -> ifix (\(self :: * -> *) a -> self a -> a) a) + (a -> b)) -> + unwrap s s) + (iwrap + (\(self :: * -> *) a -> self a -> a) + (a -> b) + (\(s : + (\a -> + ifix (\(self :: * -> *) a -> self a -> a) a) + (a -> b)) -> + f (\(x : a) -> unwrap s s x)))) + {all Q. F Q -> F Q} + {all Q. F Q -> Q} + (\(rec : (all Q. F Q -> F Q) -> (all Q. F Q -> Q)) + (h : all Q. F Q -> F Q) -> + /\R -> + \(fr : F R) -> + by + (/\Q -> \(fq : F Q) -> rec h {Q} (h {Q} fq)) + {R} + fr)) + {\X -> (a -> b) -> (a -> b) -> X} + (\(k : all Q. ((a -> b) -> (a -> b) -> Q) -> Q) -> + /\S -> + \(h : (a -> b) -> (a -> b) -> S) -> + h + (\(x : a) -> + k {b} (\(f_0 : a -> b) (f_1 : a -> b) -> f_0 x)) + (\(x : a) -> + k {b} (\(f_0 : a -> b) (f_1 : a -> b) -> f_1 x))) + f) + {all a. a -> a} + {all a. a -> a} + {all a. a -> a} + {all a. a -> a} + (/\Q -> + \(choose : + ((all a. a -> a) -> (all a. a -> a)) -> + ((all a. a -> a) -> (all a. a -> a)) -> + Q) + (x : (all a. a -> a) -> (all a. a -> a)) + (y : (all a. a -> a) -> (all a. a -> a)) -> + choose + (\(arg : all a. a -> a) -> y (/\a -> \(x : a) -> x)) + (\(arg : all a. a -> a) -> + /\a -> \(z : a) -> x (/\a -> \(x : a) -> x) {a} z)))) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/stupidZero.golden b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/stupidZero.golden index aa0f65a3e63..b1da6f1fe6a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/stupidZero.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Compiler/Recursion/stupidZero.golden @@ -1,190 +1,61 @@ -(program +program 1.1.0 - [ - [ - [ - { - (abs - Nat_i0 - (type) - (lam - Zero_i0 - Nat_i2 - (lam - Suc_i0 - (fun Nat_i3 Nat_i3) - (lam - match_Nat_i0 - (fun - Nat_i4 - (all - out_Nat_i0 - (type) - (fun out_Nat_i1 (fun (fun Nat_i5 out_Nat_i1) out_Nat_i1)) - ) - ) - [ - [ - (lam - s_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - self_i0 - (fun (type) (type)) - (lam a_i0 (type) (fun [ self_i2 a_i1 ] a_i1)) - ) - a_i1 - ) - ) - (fun Nat_i5 Nat_i5) - ] - [ (unwrap s_i1) s_i1 ] - ) - (iwrap - (lam - self_i0 - (fun (type) (type)) - (lam a_i0 (type) (fun [ self_i2 a_i1 ] a_i1)) - ) - (fun Nat_i4 Nat_i4) - (lam - s_i0 - [ - (lam - a_i0 - (type) - (ifix - (lam - self_i0 - (fun (type) (type)) - (lam a_i0 (type) (fun [ self_i2 a_i1 ] a_i1)) - ) - a_i1 - ) - ) - (fun Nat_i5 Nat_i5) - ] - (lam - n_i0 - Nat_i6 - [ - [ { [ match_Nat_i3 n_i1 ] Nat_i6 } Zero_i5 ] - (lam p_i0 Nat_i7 [ [ (unwrap s_i3) s_i3 ] p_i1 ]) - ] - ) - ) - ) - ] - [ Suc_i2 [ Suc_i2 [ Suc_i2 Zero_i3 ] ] ] - ] - ) - ) - ) - ) - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - } - (iwrap - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - (constr - (sop + ((/\Nat -> + \(Zero : Nat) + (Suc : Nat -> Nat) + (match_Nat : + Nat -> (all out_Nat. out_Nat -> (Nat -> out_Nat) -> out_Nat)) -> + (\(s : + (\a -> ifix (\(self :: * -> *) a -> self a -> a) a) + (Nat -> Nat)) -> + unwrap s s) + (iwrap + (\(self :: * -> *) a -> self a -> a) + (Nat -> Nat) + (\(s : + (\a -> ifix (\(self :: * -> *) a -> self a -> a) a) + (Nat -> Nat)) + (n : Nat) -> + match_Nat n {Nat} Zero (\(p : Nat) -> unwrap s s p))) + (Suc (Suc (Suc Zero)))) + {ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])} + (iwrap + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat]) + (constr + (sop [] - [(ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - )] - ) - 0 - ) - ) - ] - (lam - arg_0_i0 - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - (iwrap - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) + [ (ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) ]) + 0 + [])) + (\(arg_0 : + ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) -> + iwrap + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat]) (constr - (sop - [] - [(ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - )] - ) - 1 - arg_0_i1 - ) - ) - ) - ] - (lam - x_i0 - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - (abs - out_Nat_i0 - (type) - (lam - case_Zero_i0 - out_Nat_i2 - (lam - case_Suc_i0 - (fun - (ifix - (lam - rec_i0 - (fun (fun (type) (type)) (type)) - (lam f_i0 (fun (type) (type)) [ f_i1 [ rec_i2 f_i1 ] ]) - ) - (lam Nat_i0 (type) (sop [] [Nat_i1])) - ) - out_Nat_i3 - ) - (case out_Nat_i3 (unwrap x_i4) case_Zero_i2 case_Suc_i1) - ) - ) - ) - ) - ] -) \ No newline at end of file + (sop + [] + [ (ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) ]) + 1 + [arg_0])) + (\(x : + ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) -> + /\out_Nat -> + \(case_Zero : out_Nat) + (case_Suc : + ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat]) -> + out_Nat) -> + case out_Nat (unwrap x) [case_Zero, case_Suc])) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/basic.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/basic.golden index 3d6340fb9a9..479204c5821 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/basic.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/basic.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-0 -> \(x-1 : a-0) -> x-1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/maybe.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/maybe.golden index 8ec9701158c..c61d914c82c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/maybe.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprinting/maybe.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - [ { Just (all a (type) (fun a a)) } (abs a (type) (lam x a x)) ] -) \ No newline at end of file +let + data (Maybe-0 :: * -> *) a-1 | match_Maybe-2 where + Nothing-3 : Maybe-0 a-1 + Just-4 : a-1 -> Maybe-0 a-1 +in +Just-4 {all a-1. a-1 -> a-1} (/\a-1 -> \(x-5 : a-1) -> x-5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/basic.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/basic.golden index 5f9b4260a33..e9659c2c4ef 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/basic.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/basic.golden @@ -1 +1 @@ -/\a_0 -> \(x_1 : a_0) -> x_1 \ No newline at end of file +/\a -> \(x : a) -> x \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/errorBinding.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/errorBinding.golden index 1f137848b16..0e299cbab88 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/errorBinding.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/errorBinding.golden @@ -1,5 +1,5 @@ letrec - !x_0 : integer = error {integer} - ~y_1 : integer = x_0 + !x : integer = error {integer} + ~y : integer = x in 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/even3.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/even3.golden index dc7be50d683..76693e26deb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/even3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/even3.golden @@ -1,20 +1,18 @@ letrec - data Nat_0 | match_Nat_1 where - Zero_2 : Nat_0 - Suc_3 : Nat_0 -> Nat_0 + data Nat | match_Nat where + Zero : Nat + Suc : Nat -> Nat in let - data Bool_4 | match_Bool_5 where - True_6 : Bool_4 - False_7 : Bool_4 - !three_8 : Nat_0 = Suc_3 (Suc_3 (Suc_3 Zero_2)) + data Bool | match_Bool where + True : Bool + False : Bool + !three : Nat = Suc (Suc (Suc Zero)) in letrec - !even_9 : Nat_0 -> Bool_4 - = \(n_10 : Nat_0) -> - match_Nat_1 n_10 {Bool_4} True_6 (\(pred_11 : Nat_0) -> odd_12 pred_11) - !odd_12 : Nat_0 -> Bool_4 - = \(n_10 : Nat_0) -> - match_Nat_1 n_10 {Bool_4} False_7 (\(pred_11 : Nat_0) -> even_9 pred_11) + !even : Nat -> Bool + = \(n : Nat) -> match_Nat n {Bool} True (\(pred : Nat) -> odd pred) + !odd : Nat -> Bool + = \(n : Nat) -> match_Nat n {Bool} False (\(pred : Nat) -> even pred) in -even_9 three_8 \ No newline at end of file +even three \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/idleAll.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/idleAll.golden index d9ef48b7461..a71a1dc068a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/idleAll.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/idleAll.golden @@ -1,7 +1,7 @@ let - data (D1_0 :: * -> *) a_1 | match_D1_2 where - C1_3 : D1_0 a_1 - data (D2_4 :: * -> *) a_1 | match_D2_5 where - C2_6 : all a_1. D2_4 a_1 + data (D1 :: * -> *) a | match_D1 where + C1 : D1 a + data (D2 :: * -> *) a | match_D2 where + C2 : all a. D2 a in -/\a_1 -> \(x_7 : a_1) -> x_7 \ No newline at end of file +/\a -> \(x : a) -> x \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letDep.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letDep.golden index 8c0283f141b..f37ce8f3365 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letDep.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letDep.golden @@ -1,5 +1,5 @@ let - !i_0 : integer = 3 - !j_1 : integer = i_0 + !i : integer = 3 + !j : integer = i in -j_1 \ No newline at end of file +j \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letInLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letInLet.golden index 471517a6d1f..c991386c1b4 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letInLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/letInLet.golden @@ -1,8 +1,8 @@ let - !unitval2_0 : all a_1. a_1 -> a_1 + !unitval2 : all a. a -> a = let - !unitval_2 : all a_1. a_1 -> a_1 = /\a_1 -> \(x_3 : a_1) -> x_3 + !unitval : all a. a -> a = /\a -> \(x : a) -> x in - unitval_2 + unitval in -unitval2_0 \ No newline at end of file +unitval2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/listMatch.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/listMatch.golden index 3a0ea343852..9d45a2ee620 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/listMatch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/listMatch.golden @@ -1,12 +1,11 @@ letrec - data (List_0 :: * -> *) a_1 | match_List_2 where - Nil_3 : List_0 a_1 - Cons_4 : a_1 -> List_0 a_1 -> List_0 a_1 + data (List :: * -> *) a | match_List where + Nil : List a + Cons : a -> List a -> List a in -match_List_2 - {all a_1. a_1 -> a_1} - (Nil_3 {all a_1. a_1 -> a_1}) - {all a_1. a_1 -> a_1} - (/\a_1 -> \(x_5 : a_1) -> x_5) - (\(head_6 : all a_1. a_1 -> a_1) (tail_7 : List_0 (all a_1. a_1 -> a_1)) -> - head_6) \ No newline at end of file +match_List + {all a. a -> a} + (Nil {all a. a -> a}) + {all a. a -> a} + (/\a -> \(x : a) -> x) + (\(head : all a. a -> a) (tail : List (all a. a -> a)) -> head) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/maybe.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/maybe.golden index 767b52869cb..c4a8b8e4eb5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/maybe.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/maybe.golden @@ -1,6 +1,6 @@ let - data (Maybe_0 :: * -> *) a_1 | match_Maybe_2 where - Nothing_3 : Maybe_0 a_1 - Just_4 : a_1 -> Maybe_0 a_1 + data (Maybe :: * -> *) a | match_Maybe where + Nothing : Maybe a + Just : a -> Maybe a in -Just_4 {all a_1. a_1 -> a_1} (/\a_1 -> \(x_5 : a_1) -> x_5) \ No newline at end of file +Just {all a. a -> a} (/\a -> \(x : a) -> x) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/mutuallyRecursiveValues.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/mutuallyRecursiveValues.golden index 8b230f93cc1..cd10561b364 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/mutuallyRecursiveValues.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/mutuallyRecursiveValues.golden @@ -1,5 +1,5 @@ letrec - !x_0 : all a_1. a_1 -> a_1 = y_2 - !y_2 : all a_1. a_1 -> a_1 = /\a_1 -> \(z_3 : a_1) -> x_0 {a_1} z_3 + !x : all a. a -> a = y + !y : all a. a -> a = /\a -> \(z : a) -> x {a} z in -x_0 \ No newline at end of file +x \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/recursiveTypeBind.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/recursiveTypeBind.golden index 3a575550666..d06ae6e3427 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/recursiveTypeBind.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/recursiveTypeBind.golden @@ -1,7 +1,7 @@ letrec - unit_0 = all a_1. unit_0 -> unit_0 + unit = all a. unit -> unit in let - !lazyVal_2 : unit_0 -> integer = \(x_3 : unit_0) -> 3 + !lazyVal : unit -> integer = \(x : unit) -> 3 in -lazyVal_2 \ No newline at end of file +lazyVal \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/some.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/some.golden index 749e270d9e4..7371b96b918 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/some.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/some.golden @@ -1,5 +1,5 @@ let - data (Some_0 :: (* -> *) -> *) (f_1 :: * -> *) | match_Some_2 where - MkSome_3 : all a_4. f_1 a_4 -> Some_0 f_1 + data (Some :: (* -> *) -> *) (f :: * -> *) | match_Some where + MkSome : all a. f a -> Some f in -/\a_4 -> \(x_5 : a_4) -> x_5 \ No newline at end of file +/\a -> \(x : a) -> x \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/stupidZero.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/stupidZero.golden index 68241cf5f71..716b4ae0082 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/stupidZero.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/prettyprintingReadable/stupidZero.golden @@ -1,18 +1,13 @@ letrec - data Nat_0 | match_Nat_1 where - Zero_2 : Nat_0 - Suc_3 : Nat_0 -> Nat_0 + data Nat | match_Nat where + Zero : Nat + Suc : Nat -> Nat in let - !three_4 : Nat_0 = Suc_3 (Suc_3 (Suc_3 Zero_2)) + !three : Nat = Suc (Suc (Suc Zero)) in letrec - !stupidZero_5 : Nat_0 -> Nat_0 - = \(n_6 : Nat_0) -> - match_Nat_1 - n_6 - {Nat_0} - Zero_2 - (\(pred_7 : Nat_0) -> stupidZero_5 pred_7) + !stupidZero : Nat -> Nat + = \(n : Nat) -> match_Nat n {Nat} Zero (\(pred : Nat) -> stupidZero pred) in -stupidZero_5 three_4 \ No newline at end of file +stupidZero three \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeBasic.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeBasic.golden index 3d6340fb9a9..479204c5821 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeBasic.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeBasic.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-0 -> \(x-1 : a-0) -> x-1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeEvenOdd.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeEvenOdd.golden index ac499378b6e..6df79de1667 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeEvenOdd.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeEvenOdd.golden @@ -1,45 +1,20 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl Nat (type)) - - match_Nat - (vardecl Zero Nat) (vardecl Suc (fun Nat Nat)) - ) - ) - (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind (strict) (vardecl three Nat) [ Suc [ Suc [ Suc Zero ] ] ]) - (let - (rec) - (termbind - (strict) - (vardecl even (fun Nat Bool)) - (lam - n - Nat - [ [ { [ match_Nat n ] Bool } True ] (lam pred Nat [ odd pred ]) ] - ) - ) - (termbind - (strict) - (vardecl odd (fun Nat Bool)) - (lam - n - Nat - [ [ { [ match_Nat n ] Bool } False ] (lam pred Nat [ even pred ]) ] - ) - ) - [ even three ] - ) - ) -) \ No newline at end of file +letrec + data Nat-0 | match_Nat-1 where + Zero-2 : Nat-0 + Suc-3 : Nat-0 -> Nat-0 +in +let + data Bool-4 | match_Bool-5 where + True-6 : Bool-4 + False-7 : Bool-4 + !three-8 : Nat-0 = Suc-3 (Suc-3 (Suc-3 Zero-2)) +in +letrec + !even-9 : Nat-0 -> Bool-4 + = \(n-10 : Nat-0) -> + match_Nat-1 n-10 {Bool-4} True-6 (\(pred-11 : Nat-0) -> odd-12 pred-11) + !odd-12 : Nat-0 -> Bool-4 + = \(n-10 : Nat-0) -> + match_Nat-1 n-10 {Bool-4} False-7 (\(pred-11 : Nat-0) -> even-9 pred-11) +in +even-9 three-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeListMatch.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeListMatch.golden index f5098ea706b..9a4097d78a0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeListMatch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeListMatch.golden @@ -1,29 +1,12 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - match_List - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - [ - [ - { - [ - { match_List (all a (type) (fun a a)) } - { Nil (all a (type) (fun a a)) } - ] - (all a (type) (fun a a)) - } - (abs a (type) (lam x a x)) - ] - (lam - head - (all a (type) (fun a a)) - (lam tail [ List (all a (type) (fun a a)) ] head) - ) - ] -) \ No newline at end of file +letrec + data (List-0 :: * -> *) a-1 | match_List-2 where + Nil-3 : List-0 a-1 + Cons-4 : a-1 -> List-0 a-1 -> List-0 a-1 +in +match_List-2 + {all a-1. a-1 -> a-1} + (Nil-3 {all a-1. a-1 -> a-1}) + {all a-1. a-1 -> a-1} + (/\a-1 -> \(x-5 : a-1) -> x-5) + (\(head-6 : all a-1. a-1 -> a-1) (tail-7 : List-0 (all a-1. a-1 -> a-1)) -> + head-6) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeMaybePirTerm.golden b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeMaybePirTerm.golden index 8ec9701158c..c61d914c82c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeMaybePirTerm.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Core/serialization/serializeMaybePirTerm.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - [ { Just (all a (type) (fun a a)) } (abs a (type) (lam x a x)) ] -) \ No newline at end of file +let + data (Maybe-0 :: * -> *) a-1 | match_Maybe-2 where + Nothing-3 : Maybe-0 a-1 + Just-4 : a-1 -> Maybe-0 a-1 +in +Just-4 {all a-1. a-1 -> a-1} (/\a-1 -> \(x-5 : a-1) -> x-5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppSaturated.golden b/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppSaturated.golden index 7ff3cb02d39..f263e96caa4 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppSaturated.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppSaturated.golden @@ -1,3 +1,3 @@ pure work-free: 1 pure work-free: 2 -impure? maybe work?: (addInteger 1 2) \ No newline at end of file +impure? maybe work?: addInteger 1 2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppUnsaturated.golden b/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppUnsaturated.golden index 2b3f8f62141..9d43689b1fb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppUnsaturated.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Purity/builtinAppUnsaturated.golden @@ -1,2 +1,2 @@ pure work-free: 1 -pure work-free: (addInteger 1) \ No newline at end of file +pure work-free: addInteger 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Purity/letFun.golden b/plutus-core/plutus-ir/test/PlutusIR/Purity/letFun.golden index a38098993a5..b691cad5a98 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Purity/letFun.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Purity/letFun.golden @@ -1,5 +1,5 @@ -pure work-free: (addInteger) -pure maybe work?: f +pure work-free: addInteger +pure maybe work?: f-0 pure work-free: 1 -pure maybe work?: (f 1) +pure maybe work?: f-0 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Purity/nestedLets1.golden b/plutus-core/plutus-ir/test/PlutusIR/Purity/nestedLets1.golden index 192577a539d..703b62ebc52 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Purity/nestedLets1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Purity/nestedLets1.golden @@ -1,6 +1,6 @@ -pure work-free: (\(x : integer) -> x) -pure work-free: (\(y : integer) -> y) -pure maybe work?: a -pure maybe work?: b -pure maybe work?: (a b) +pure work-free: \(x-1 : integer) -> x-1 +pure work-free: \(y-3 : integer) -> y-3 +pure maybe work?: a-0 +pure maybe work?: b-2 +pure maybe work?: a-0 b-2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Purity/pureLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Purity/pureLet.golden index ed499ec0868..c7b95998dfe 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Purity/pureLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Purity/pureLet.golden @@ -1,6 +1,6 @@ pure work-free: 2 pure work-free: 1 -pure maybe work?: (let - !x : integer = 2 +pure maybe work?: let + !x-0 : integer = 2 in -1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/absapp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/absapp.golden index eb1ac12f117..37bddfa714b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/absapp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/absapp.golden @@ -1 +1,4 @@ -(let (nonrec) (typebind (tyvardecl a (type)) (con integer)) (lam x a x)) \ No newline at end of file +let + a-2 = integer +in +\(x-3 : a-2) -> x-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp.golden index cace21c7aca..eba571da257 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp.golden @@ -1 +1,4 @@ -(let (nonrec) (termbind (strict) (vardecl y (con integer)) (con integer 1)) y) \ No newline at end of file +let + !y-1 : integer = 1 +in +y-1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp2.golden index fc209688f51..e1262c89563 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/lamapp2.golden @@ -1,11 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl x (con integer)) - (let - (nonrec) (termbind (strict) (vardecl y (con integer)) (con integer 1)) y - ) - ) - x -) \ No newline at end of file +let + !x-2 : integer = let !y-3 : integer = 1 in y-3 +in +x-2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multiapp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multiapp.golden index 34381f2c541..9e9d741c77e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multiapp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multiapp.golden @@ -1,11 +1,6 @@ -(let - (nonrec) - (termbind (strict) (vardecl x (con integer)) (con integer 1)) - (termbind - (strict) - (vardecl y (fun (con integer) (fun (con integer) (con integer)))) - (lam a (con integer) (lam b (con integer) (con integer 2))) - ) - (termbind (strict) (vardecl z (con integer)) (con integer 3)) - [ [ y x ] z ] -) \ No newline at end of file +let + !x-5 : integer = 1 + !y-6 : integer -> integer -> integer = \(a-8 : integer) (b-9 : integer) -> 2 + !z-7 : integer = 3 +in +y-6 x-5 z-7 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multilet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multilet.golden index 02230c95548..fb4a9c0cc39 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multilet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Beta/multilet.golden @@ -1,17 +1,10 @@ -(let - (nonrec) - (termbind (strict) (vardecl x (con integer)) (con integer 1)) - (let - (nonrec) - (termbind - (strict) - (vardecl y (fun (con integer) (fun (con integer) (con integer)))) - (lam a (con integer) (lam b (con integer) (con integer 2))) - ) - (let - (nonrec) - (termbind (strict) (vardecl z (con integer)) (con integer 3)) - [ [ y x ] z ] - ) - ) -) \ No newline at end of file +let + !x-5 : integer = 1 +in +let + !y-6 : integer -> integer -> integer = \(a-8 : integer) (b-9 : integer) -> 2 +in +let + !z-7 : integer = 3 +in +y-6 x-5 z-7 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/basic.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/basic.golden index dc2d764ab4f..963665de7e0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/basic.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/basic.golden @@ -1,40 +1,15 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - (lam - x - [ Maybe (con integer) ] - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ - [ { [ match_Bool False ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ] - (lam - i - (con integer) - [ - [ { [ match_Bool True ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ) - ] - ) -) \ No newline at end of file +let + data Bool-11 | match_Bool-14 where + True-12 : Bool-11 + False-13 : Bool-11 + data (Maybe-15 :: * -> *) a-19 | match_Maybe-18 where + Nothing-16 : Maybe-15 a-19 + Just-17 : a-19 -> Maybe-15 a-19 +in +\(x-20 : Maybe-15 integer) -> + match_Maybe-18 + {integer} + x-20 + {integer} + (match_Bool-14 False-13 {integer} 1 0) + (\(i-21 : integer) -> match_Bool-14 True-12 {integer} 1 0) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/builtinBool.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/builtinBool.golden index 12f9fadd368..cf78eb5b67c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/builtinBool.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/builtinBool.golden @@ -1,36 +1,14 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - (lam - x - (con bool) - [ - [ - [ { (builtin ifThenElse) (con integer) } x ] - [ - [ { [ match_Bool False ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ] - [ - [ { [ match_Bool True ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ] - ) -) \ No newline at end of file +let + data Bool-10 | match_Bool-13 where + True-11 : Bool-10 + False-12 : Bool-10 + data (Maybe-14 :: * -> *) a-18 | match_Maybe-17 where + Nothing-15 : Maybe-14 a-18 + Just-16 : a-18 -> Maybe-14 a-18 +in +\(x-19 : bool) -> + ifThenElse + {integer} + x-19 + (match_Bool-13 False-12 {integer} 1 0) + (match_Bool-13 True-11 {integer} 1 0) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/exponential.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/exponential.golden index 4305c3882e4..5ebe3bfef4c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/exponential.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/exponential.golden @@ -1,110 +1,44 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - (lam - x - [ Maybe (con integer) ] - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ - [ - { [ match_Bool False ] (con integer) } - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ - [ { [ match_Bool False ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ] - (lam - j - (con integer) - [ - [ { [ match_Bool True ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ) - ] - ] - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ - [ { [ match_Bool False ] (con integer) } (con integer 3) ] - (con integer 2) - ] - ] - (lam - k - (con integer) - [ - [ { [ match_Bool True ] (con integer) } (con integer 3) ] - (con integer 2) - ] - ) - ] - ] - ] - (lam - i - (con integer) - [ - [ - { [ match_Bool True ] (con integer) } - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ - [ { [ match_Bool False ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ] - (lam - j - (con integer) - [ - [ { [ match_Bool True ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ) - ] - ] - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ - [ { [ match_Bool False ] (con integer) } (con integer 3) ] - (con integer 2) - ] - ] - (lam - k - (con integer) - [ - [ { [ match_Bool True ] (con integer) } (con integer 3) ] - (con integer 2) - ] - ) - ] - ] - ) - ] - ) -) \ No newline at end of file +let + data Bool-13 | match_Bool-16 where + True-14 : Bool-13 + False-15 : Bool-13 + data (Maybe-17 :: * -> *) a-21 | match_Maybe-20 where + Nothing-18 : Maybe-17 a-21 + Just-19 : a-21 -> Maybe-17 a-21 +in +\(x-22 : Maybe-17 integer) -> + match_Maybe-20 + {integer} + x-22 + {integer} + (match_Bool-16 + False-15 + {integer} + (match_Maybe-20 + {integer} + x-22 + {integer} + (match_Bool-16 False-15 {integer} 1 0) + (\(j-24 : integer) -> match_Bool-16 True-14 {integer} 1 0)) + (match_Maybe-20 + {integer} + x-22 + {integer} + (match_Bool-16 False-15 {integer} 3 2) + (\(k-25 : integer) -> match_Bool-16 True-14 {integer} 3 2))) + (\(i-23 : integer) -> + match_Bool-16 + True-14 + {integer} + (match_Maybe-20 + {integer} + x-22 + {integer} + (match_Bool-16 False-15 {integer} 1 0) + (\(j-24 : integer) -> match_Bool-16 True-14 {integer} 1 0)) + (match_Maybe-20 + {integer} + x-22 + {integer} + (match_Bool-16 False-15 {integer} 3 2) + (\(k-25 : integer) -> match_Bool-16 True-14 {integer} 3 2))) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/largeExpr.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/largeExpr.golden index 832e50aa1d8..b7f3d566277 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/largeExpr.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/largeExpr.golden @@ -1,45 +1,19 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - (lam - x - [ Maybe (con integer) ] - (let - (nonrec) - (termbind - (strict) - (vardecl k_caseOfCase (fun Bool (con integer))) - (lam - scrutinee - Bool - [ - [ { [ match_Bool scrutinee ] (con integer) } (con integer 1) ] - (con integer 0) - ] - ) - ) - [ - [ - { [ { match_Maybe (con integer) } x ] (con integer) } - [ k_caseOfCase [ (lam b Bool b) False ] ] - ] - (lam i (con integer) [ k_caseOfCase True ]) - ] - ) - ) -) \ No newline at end of file +let + data Bool-12 | match_Bool-15 where + True-13 : Bool-12 + False-14 : Bool-12 + data (Maybe-16 :: * -> *) a-20 | match_Maybe-19 where + Nothing-17 : Maybe-16 a-20 + Just-18 : a-20 -> Maybe-16 a-20 +in +\(x-21 : Maybe-16 integer) -> + let + !k_caseOfCase-24 : Bool-12 -> integer + = \(scrutinee-25 : Bool-12) -> match_Bool-15 scrutinee-25 {integer} 1 0 + in + match_Maybe-19 + {integer} + x-21 + {integer} + (k_caseOfCase-24 ((\(b-22 : Bool-12) -> b-22) False-14)) + (\(i-23 : integer) -> k_caseOfCase-24 True-13) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/twoTyArgs.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/twoTyArgs.golden index b721532b7e4..c750c71c753 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/twoTyArgs.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/CaseOfCase/twoTyArgs.golden @@ -1,40 +1,15 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl d12 (fun (fun (type) (type)) (fun (type) (type)))) - (tyvardecl a3 (fun (type) (type))) (tyvardecl a10 (type)) - m11 - (vardecl c6 (fun (con unit) [ [ d12 a3 ] a10 ])) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl k_caseOfCase (fun [ [ d12 (con list) ] (con unit) ] (con unit))) - (lam - scrutinee - [ [ d12 (con list) ] (con unit) ] - [ - { [ { { m11 (con list) } (con unit) } scrutinee ] (con unit) } - (error (fun (con unit) (con unit))) - ] - ) - ) - [ - { - [ - { { m11 (con list) } (con unit) } - (error [ [ d12 (con list) ] (con unit) ]) - ] - (con unit) - } - (lam - x23 - (con unit) - [ k_caseOfCase (error [ [ d12 (con list) ] (con unit) ]) ] - ) - ] - ) -) \ No newline at end of file +let + data (d12-6 :: (* -> *) -> * -> *) (a3-9 :: * -> *) a10-10 | m11-8 where + c6-7 : unit -> d12-6 a3-9 a10-10 +in +let + !k_caseOfCase-12 : d12-6 list unit -> unit + = \(scrutinee-13 : d12-6 list unit) -> + m11-8 {list} {unit} scrutinee-13 {unit} (error {unit -> unit}) +in +m11-8 + {list} + {unit} + (error {d12-6 list unit}) + {unit} + (\(x23-11 : unit) -> k_caseOfCase-12 (error {d12-6 list unit})) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/builtinBinding.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/builtinBinding.golden index 3d6340fb9a9..4731552cea6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/builtinBinding.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/builtinBinding.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-4 -> \(x-5 : a-4) -> x-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeDead.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeDead.golden index 3d6340fb9a9..66afca686db 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeDead.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeDead.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-11 -> \(x-12 : a-11) -> x-12 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveConstr.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveConstr.golden index a74cea2f108..df1135edb03 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveConstr.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveConstr.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - Nothing -) \ No newline at end of file +let + data (Maybe-5 :: * -> *) a-9 | match_Maybe-8 where + Nothing-6 : Maybe-5 a-9 + Just-7 : a-9 -> Maybe-5 a-9 +in +Nothing-6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveDestr.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveDestr.golden index d956fbe272b..6e5852be965 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveDestr.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveDestr.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - match_Maybe -) \ No newline at end of file +let + data (Maybe-5 :: * -> *) a-9 | match_Maybe-8 where + Nothing-6 : Maybe-5 a-9 + Just-7 : a-9 -> Maybe-5 a-9 +in +match_Maybe-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveType.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveType.golden index 81089321b1e..afd3b456333 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveType.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/datatypeLiveType.golden @@ -1,8 +1,4 @@ -(let - (nonrec) - (typebind - (tyvardecl Maybe (fun (type) (type))) - (lam a (type) (all a (type) (fun a a))) - ) - (error [ Maybe (con integer) ]) -) \ No newline at end of file +let + Maybe-5 :: * -> * = \a-10 -> all a-0. a-0 -> a-0 +in +error {Maybe-5 integer} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/etaBuiltinBinding.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/etaBuiltinBinding.golden index 3d6340fb9a9..4367d67415d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/etaBuiltinBinding.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/etaBuiltinBinding.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-8 -> \(x-9 : a-8) -> x-9 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindings.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindings.golden index f5b4e1bb4ed..b3c310a6bc3 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindings.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindings.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl unitval (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - unitval -) \ No newline at end of file +let + !unitval-8 : all a-9. a-9 -> a-9 = /\a-6 -> \(x-7 : a-6) -> x-7 +in +unitval-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindingsIndirect.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindingsIndirect.golden index 4cf3c3efc2f..b9083f66b5d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindingsIndirect.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nestedBindingsIndirect.golden @@ -1,16 +1,8 @@ -(let - (nonrec) - (typebind (tyvardecl unit (type)) (all a (type) (fun a a))) - (let - (nonrec) - (datatypebind - (datatype - (tyvardecl SomeType (type)) - - match_SomeType - (vardecl Constr (fun unit SomeType)) - ) - ) - [ Constr (error unit) ] - ) -) \ No newline at end of file +let + unit-6 = all a-5. a-5 -> a-5 +in +let + data SomeType-7 | match_SomeType-9 where + Constr-8 : unit-6 -> SomeType-7 +in +Constr-8 (error {unit-6}) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nonstrictLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nonstrictLet.golden index f5b4e1bb4ed..2e19ba76283 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nonstrictLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/nonstrictLet.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl unitval (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - unitval -) \ No newline at end of file +let + !unitval-6 : all a-7. a-7 -> a-7 = /\a-4 -> \(x-5 : a-4) -> x-5 +in +unitval-6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/pruneDatatype.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/pruneDatatype.golden index 27168716a04..2b787a4e09e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/pruneDatatype.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/pruneDatatype.golden @@ -1,9 +1,7 @@ -(let - (nonrec) - (typebind (tyvardecl unit (type)) (all a (type) (fun a a))) - (let - (nonrec) - (typebind (tyvardecl SomeType (type)) (all a (type) (fun a a))) - (lam arg SomeType (error unit)) - ) -) \ No newline at end of file +let + unit-7 = all a-6. a-6 -> a-6 +in +let + SomeType-8 = all a-0. a-0 -> a-0 +in +\(arg-11 : SomeType-8) -> error {unit-7} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingComplex.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingComplex.golden index 04ea9ba236f..e283a984694 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingComplex.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingComplex.golden @@ -1,9 +1,4 @@ -(let - (rec) - (termbind - (strict) - (vardecl unitval (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - unitval -) \ No newline at end of file +letrec + !unitval-5 : all a-7. a-7 -> a-7 = /\a-8 -> \(x-9 : a-8) -> x-9 +in +unitval-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingSimple.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingSimple.golden index 3d6340fb9a9..120fc3086e3 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingSimple.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/recBindingSimple.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-7 -> \(x-8 : a-7) -> x-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/singleBinding.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/singleBinding.golden index f5b4e1bb4ed..b3c310a6bc3 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/singleBinding.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/singleBinding.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl unitval (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - unitval -) \ No newline at end of file +let + !unitval-8 : all a-9. a-9 -> a-9 = /\a-6 -> \(x-7 : a-6) -> x-7 +in +unitval-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/strictLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/strictLet.golden index a0db8319f02..c1266a04106 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/strictLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/strictLet.golden @@ -1,17 +1,8 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl unitval (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl unitunit (all a (type) (fun a a))) - [ { unitval (all a (type) (fun a a)) } unitval ] - ) - unitval - ) -) \ No newline at end of file +let + !unitval-6 : all a-7. a-7 -> a-7 = /\a-4 -> \(x-5 : a-4) -> x-5 +in +let + !unitunit-9 : all a-10. a-10 -> a-10 + = unitval-6 {all a-8. a-8 -> a-8} unitval-6 +in +unitval-6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/termLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/termLet.golden index 3d6340fb9a9..120fc3086e3 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/termLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/termLet.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-7 -> \(x-8 : a-7) -> x-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/typeLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/typeLet.golden index 3d6340fb9a9..25023dcba03 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/typeLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/DeadCode/typeLet.golden @@ -1 +1 @@ -(abs a (type) (lam x a x)) \ No newline at end of file +/\a-5 -> \(x-6 : a-5) -> x-6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/addInteger.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/addInteger.golden index 7ce41fb5eca..e440e5c8425 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/addInteger.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/addInteger.golden @@ -1 +1 @@ -(con integer 3) \ No newline at end of file +3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/failingBuiltin.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/failingBuiltin.golden index 39e5fae3c53..1f11dc4236f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/failingBuiltin.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/failingBuiltin.golden @@ -1 +1 @@ -[ [ (builtin divideInteger) (con integer 1) ] (con integer 0) ] \ No newline at end of file +divideInteger 1 0 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/ifThenElse.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/ifThenElse.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/ifThenElse.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/ifThenElse.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/nonConstantArg.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/nonConstantArg.golden index 6c939148178..17a7f84bd02 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/nonConstantArg.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/nonConstantArg.golden @@ -1,5 +1,4 @@ -(let - (nonrec) - (termbind (strict) (vardecl x (con integer)) (con integer 1)) - [ [ (builtin addInteger) x ] (con integer 2) ] -) \ No newline at end of file +let + !x-0 : integer = 1 +in +addInteger x-0 2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/overApplication.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/overApplication.golden index bffb2f00dde..f35668e5880 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/overApplication.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/overApplication.golden @@ -1 +1 @@ -[ (lam x (con integer) (con integer 1)) (con integer 3) ] \ No newline at end of file +(\(x-0 : integer) -> 1) 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceConservative.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceConservative.golden index bb0268e2db2..19419c43a8f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceConservative.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceConservative.golden @@ -1 +1 @@ -[ [ { (builtin trace) (con integer) } (con string "hello") ] (con integer 1) ] \ No newline at end of file +trace {integer} "hello" 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceNonConservative.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceNonConservative.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceNonConservative.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/traceNonConservative.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressAndEqualBlsNonConservative.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressAndEqualBlsNonConservative.golden index ba9e9f50707..f742d389cdb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressAndEqualBlsNonConservative.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressAndEqualBlsNonConservative.golden @@ -1,19 +1,5 @@ -[ - [ - (builtin bls12_381_G1_equal) - [ - (builtin bls12_381_G1_uncompress) - (con - bytestring - #97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb - ) - ] - ] - [ - (builtin bls12_381_G1_uncompress) - (con - bytestring - #97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb - ) - ] -] \ No newline at end of file +bls12_381_G1_equal + (bls12_381_G1_uncompress + #97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb) + (bls12_381_G1_uncompress + #97f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsConservative.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsConservative.golden index 1238bc334e3..6b006da298a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsConservative.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsConservative.golden @@ -1,7 +1,2 @@ -[ - (builtin bls12_381_G2_uncompress) - (con - bytestring - #c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - ) -] \ No newline at end of file +bls12_381_G2_uncompress + #c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsNonConservative.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsNonConservative.golden index 1238bc334e3..6b006da298a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsNonConservative.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/uncompressBlsNonConservative.golden @@ -1,7 +1,2 @@ -[ - (builtin bls12_381_G2_uncompress) - (con - bytestring - #c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 - ) -] \ No newline at end of file +bls12_381_G2_uncompress + #c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/underApplication.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/underApplication.golden index 6d483bdcb2a..51e72e82dd1 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/underApplication.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/EvaluateBuiltins/underApplication.golden @@ -1 +1 @@ -[ (builtin addInteger) (con integer 1) ] \ No newline at end of file +addInteger 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/builtin.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/builtin.golden index c72b7968660..e883a50d5f5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/builtin.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/builtin.golden @@ -1 +1 @@ -(builtin addInteger) \ No newline at end of file +addInteger \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/callsite-non-trivial-body.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/callsite-non-trivial-body.golden index 0c14cc2c40a..4895d54cd84 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/callsite-non-trivial-body.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/callsite-non-trivial-body.golden @@ -1,71 +1,14 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl - f - (fun - (fun (con integer) (con integer)) - (fun - (fun (con integer) (fun (con integer) (con integer))) - (fun (con integer) (con integer)) - ) - ) - ) - (lam - unused - (fun (con integer) (con integer)) - (lam - a - (fun (con integer) (fun (con integer) (con integer))) - (lam - b - (con integer) - [ - [ a b ] - [ - [ - (builtin addInteger) - [ - [ - (builtin addInteger) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ] - (con integer 3) - ] - ] - (con integer 4) - ] - ] - ) - ) - ) - ) - [ - [ - (builtin addInteger) - [ - [ - [ f (lam unused (con integer) (con integer 5)) ] (builtin addInteger) - ] - (con integer 6) - ] - ] - [ - [ (builtin addInteger) (con integer 11) ] - [ - [ - (builtin addInteger) - [ - [ - (builtin addInteger) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ] - (con integer 3) - ] - ] - (con integer 4) - ] - ] - ] -) \ No newline at end of file +let + !f-7 : + (integer -> integer) -> + (integer -> integer -> integer) -> + integer -> + integer + = \(unused-4 : integer -> integer) + (a-5 : integer -> integer -> integer) + (b-6 : integer) -> + a-5 b-6 (addInteger (addInteger (addInteger 1 2) 3) 4) +in +addInteger + (f-7 (\(unused-8 : integer) -> 5) addInteger 6) + (addInteger 11 (addInteger (addInteger (addInteger 1 2) 3) 4)) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/constant.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/constant.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/constant.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/constant.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/effectfulBuiltinArg.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/effectfulBuiltinArg.golden index 7b56bf75458..05f832f67a0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/effectfulBuiltinArg.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/effectfulBuiltinArg.golden @@ -1,29 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl x (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "msg2") ] (con integer 1) - ] - ) - [ - [ - [ - { (builtin ifThenElse) (con integer) } - [ - [ - (builtin equalsInteger) - [ - [ { (builtin trace) (con integer) } (con string "msg1") ] - (con integer 0) - ] - ] - x - ] - ] - (con integer 9) - ] - (con integer 10) - ] -) \ No newline at end of file +let + !x-1 : integer = trace {integer} "msg2" 1 +in +ifThenElse {integer} (equalsInteger (trace {integer} "msg1" 0) x-1) 9 10 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm1.golden index 0ff66b05e7f..8704358ed8e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm1.golden @@ -1 +1 @@ -[ (lam x (con integer) x) (error (con integer)) ] \ No newline at end of file +(\(x-3 : integer) -> x-3) (error {integer}) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm2.golden index 3243f358548..5ce3a0a803a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/firstEffectfulTerm2.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl a (fun (con integer) (con integer))) - (error (fun (con integer) (con integer))) - ) - [ a [ (lam x (con integer) x) (error (con integer)) ] ] -) \ No newline at end of file +let + !a-3 : integer -> integer = error {integer -> integer} +in +a-3 ((\(x-6 : integer) -> x-6) (error {integer})) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateApp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateApp.golden index 36e97458623..82ffcf38413 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateApp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateApp.golden @@ -1 +1 @@ -[ (error (fun (con integer) (con integer))) (con integer 1) ] \ No newline at end of file +error {integer -> integer} 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateVar.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateVar.golden index 3888d41dbbb..66d5392804d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateVar.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/immediateVar.golden @@ -1 +1 @@ -(error (con integer)) \ No newline at end of file +error {integer} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOff.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOff.golden index 3069793dd8d..a424e287d3e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOff.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOff.golden @@ -1,5 +1,4 @@ -(let - (nonrec) - (termbind (strict) (vardecl x (con integer)) (con integer 3)) - [ [ (builtin addInteger) x ] [ [ (builtin addInteger) x ] (con integer 5) ] ] -) \ No newline at end of file +let + !x-2 : integer = 3 +in +addInteger x-2 (addInteger x-2 5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOn.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOn.golden index 89dbd9e691c..4a6e6aba8c3 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOn.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/inlineConstantsOn.golden @@ -1,4 +1 @@ -[ - [ (builtin addInteger) (con integer 3) ] - [ [ (builtin addInteger) (con integer 3) ] (con integer 5) ] -] \ No newline at end of file +addInteger 3 (addInteger 3 5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letApp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letApp.golden index 041217b9881..5b896ef99c4 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letApp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letApp.golden @@ -1 +1 @@ -[ [ (builtin addInteger) (con integer 4) ] (con integer 5) ] \ No newline at end of file +addInteger 4 5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letAppMultiNotAcceptable.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letAppMultiNotAcceptable.golden index d17eb5b9a73..3581eee639b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letAppMultiNotAcceptable.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letAppMultiNotAcceptable.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl funApp (fun (con integer) (con integer))) - (lam x (con integer) [ [ (builtin addInteger) (con integer 4) ] x ]) - ) - [ funApp (con integer 4) ] -) \ No newline at end of file +let + !funApp-6 : integer -> integer = \(x-5 : integer) -> addInteger 4 x-5 +in +funApp-6 4 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstBool.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstBool.golden index a3d50a9046c..2a69f978175 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstBool.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstBool.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - [ [ (lam x (con integer) (lam y Bool x)) (con integer 3) ] False ] -) \ No newline at end of file +let + data Bool-7 | Bool_match-10 where + True-8 : Bool-7 + False-9 : Bool-7 +in +(\(x-14 : integer) (y-15 : Bool-7) -> x-14) 3 False-9 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstInt.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstInt.golden index a366d3a4da7..c6767e204cd 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstInt.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstInt.golden @@ -1,4 +1 @@ -[ - [ (lam x (con integer) (lam y (con integer) x)) (con integer 3) ] - (con integer 4) -] \ No newline at end of file +(\(x-6 : integer) (y-7 : integer) -> x-6) 3 4 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstMulti.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstMulti.golden index b648c0e4151..bf375b0f55d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstMulti.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunConstMulti.golden @@ -1,9 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl constFun (fun (con integer) (fun (con integer) (con integer)))) - (lam x (con integer) (lam y (con integer) x)) - ) - (lam y (con integer) (con integer 3)) -) \ No newline at end of file +let + !constFun-5 : integer -> integer -> integer + = \(x-3 : integer) (y-4 : integer) -> x-3 +in +\(y-9 : integer) -> 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFun.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFun.golden index 97b75d43eae..732e7b44d9f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFun.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFun.golden @@ -1 +1 @@ -[ (lam y (con integer) (lam x (con integer) x)) (con integer 3) ] \ No newline at end of file +(\(y-9 : integer) (x-10 : integer) -> x-10) 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFunMulti.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFunMulti.golden index 100f62f5844..fb3c9ff899a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFunMulti.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letFunInFunMulti.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl idFun (fun (con integer) (con integer))) - (lam x (con integer) x) - ) - [ (lam y (fun (con integer) (con integer)) idFun) idFun ] -) \ No newline at end of file +let + !idFun-5 : integer -> integer = \(x-4 : integer) -> x-4 +in +(\(y-8 : integer -> integer) -> idFun-5) idFun-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPure.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPure.golden index 1755afde328..e63dbc99d1e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPure.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPure.golden @@ -1,11 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl x (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "hello") ] (con integer 1) - ] - ) - [ [ (builtin addInteger) x ] x ] -) \ No newline at end of file +let + !x-3 : integer = trace {integer} "hello" 1 +in +addInteger x-3 x-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMulti.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMulti.golden index 7668057a126..4a758616a0c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMulti.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMulti.golden @@ -1,15 +1,7 @@ -(let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "hello") ] (con integer 1) - ] - ) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) y) - [ [ (builtin addInteger) y ] [ [ (builtin addInteger) x ] x ] ] - ) -) \ No newline at end of file +let + ~y-3 : integer = trace {integer} "hello" 1 +in +let + !x-5 : integer = y-3 +in +addInteger y-3 (addInteger x-5 x-5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMultiStrict.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMultiStrict.golden index 3c39cc4336b..bc91693f1ed 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMultiStrict.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letNonPureMultiStrict.golden @@ -1,11 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl y (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "hello") ] (con integer 1) - ] - ) - [ [ (builtin addInteger) y ] [ [ (builtin addInteger) y ] y ] ] -) \ No newline at end of file +let + !y-3 : integer = trace {integer} "hello" 1 +in +addInteger y-3 (addInteger y-3 y-3) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverApp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverApp.golden index 6c902fc3d01..1d1578e779c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverApp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverApp.golden @@ -1,4 +1 @@ -[ - [ (lam x (con integer) (lam y (con integer) y)) (con integer 5) ] - (con integer 6) -] \ No newline at end of file +(\(x-9 : integer) (y-10 : integer) -> y-10) 5 6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppMulti.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppMulti.golden index c9becf00ff5..a011f9af7af 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppMulti.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppMulti.golden @@ -1,22 +1,8 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl idFun (fun (con integer) (con integer))) - (lam y (con integer) y) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl - k - (fun - (fun (con integer) (con integer)) (fun (con integer) (con integer)) - ) - ) - (lam x (fun (con integer) (con integer)) idFun) - ) - [ idFun (con integer 6) ] - ) -) \ No newline at end of file +let + !idFun-6 : integer -> integer = \(y-5 : integer) -> y-5 +in +let + !k-9 : (integer -> integer) -> integer -> integer + = \(x-10 : integer -> integer) -> idFun-6 +in +idFun-6 6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppType.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppType.golden index 2be13821dc3..60568158e75 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppType.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letOverAppType.golden @@ -1,7 +1,4 @@ -(let - (nonrec) - (termbind - (strict) (vardecl idFun (all a (type) (fun a a))) (abs a (type) (lam x a x)) - ) - (con integer 3) -) \ No newline at end of file +let + !idFun-7 : all a-8. a-8 -> a-8 = /\a-5 -> \(x-6 : a-5) -> x-6 +in +3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp.golden index 397607c5d7a..0370ad8f23c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp.golden @@ -1 +1 @@ -[ { (abs a (type) (lam x a x)) (con integer) } (con integer 3) ] \ No newline at end of file +(/\a-7 -> \(x-8 : a-7) -> x-8) {integer} 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp2.golden index 9b49cbafca9..f05af74e0df 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeApp2.golden @@ -1,10 +1,5 @@ -(let - (nonrec) - (termbind - (strict) (vardecl idFun (all a (type) (fun a a))) (abs a (type) (lam x a x)) - ) - [ - (lam x (con integer) x) - [ (lam x (con integer) x) [ (lam x (con integer) x) (con integer 3) ] ] - ] -) \ No newline at end of file +let + !idFun-7 : all a-8. a-8 -> a-8 = /\a-5 -> \(x-6 : a-5) -> x-6 +in +(\(x-18 : integer) -> x-18) + ((\(x-16 : integer) -> x-16) ((\(x-14 : integer) -> x-14) 3)) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMulti.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMulti.golden index 0accbc167a4..cf6ac408e3d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMulti.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMulti.golden @@ -1,7 +1,4 @@ -(let - (nonrec) - (termbind - (strict) (vardecl idFun (all a (type) (fun a a))) (abs a (type) (lam x a x)) - ) - [ [ (builtin addInteger) (con integer 3) ] (con integer 3) ] -) \ No newline at end of file +let + !idFun-5 : all a-6. a-6 -> a-6 = /\a-3 -> \(x-4 : a-3) -> x-4 +in +addInteger 3 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiNotSat.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiNotSat.golden index fa4b115419e..c31225468d5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiNotSat.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiNotSat.golden @@ -1,7 +1,4 @@ -(let - (nonrec) - (termbind - (strict) (vardecl idFun (all a (type) (fun a a))) (abs a (type) (lam x a x)) - ) - (lam x (con integer) x) -) \ No newline at end of file +let + !idFun-5 : all a-6. a-6 -> a-6 = /\a-3 -> \(x-4 : a-3) -> x-4 +in +\(x-11 : integer) -> x-11 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiSat.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiSat.golden index 2796be03a18..6c079985050 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiSat.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/letTypeAppMultiSat.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl idFun (fun (con integer) (con integer))) - (lam x (con integer) x) - ) - [ [ (lam y (fun (con integer) (con integer)) idFun) idFun ] (con integer 1) ] -) \ No newline at end of file +let + !idFun-5 : integer -> integer = \(x-4 : integer) -> x-4 +in +(\(y-8 : integer -> integer) -> idFun-5) idFun-5 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/multilet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/multilet.golden index 2e82f313700..9524df033f6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/multilet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/multilet.golden @@ -1,27 +1,8 @@ -(lam - n - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl x (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "effect_x") ] - [ [ (builtin addInteger) (con integer 1) ] n ] - ] - ) - (let - (nonrec) - (termbind - (strict) - (vardecl y (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "effect_y") ] - [ [ (builtin addInteger) (con integer 2) ] n ] - ] - ) - [ [ (builtin addInteger) x ] [ [ (builtin addInteger) y ] y ] ] - ) - ) -) \ No newline at end of file +\(n-3 : integer) -> + let + !x-4 : integer = trace {integer} "effect_x" (addInteger 1 n-3) + in + let + !y-5 : integer = trace {integer} "effect_y" (addInteger 2 n-3) + in + addInteger x-4 (addInteger y-5 y-5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/nameCapture.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/nameCapture.golden index cd3e98f3de2..55316801b94 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/nameCapture.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/nameCapture.golden @@ -1,15 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl c (con integer)) - [ [ (builtin addInteger) (con integer 10) ] (con integer 10) ] - ) - [ - [ - (builtin addInteger) - [ [ (builtin addInteger) (con integer 10) ] (con integer 7) ] - ] - (con integer 7) - ] -) \ No newline at end of file +let + !c-6 : integer = addInteger 10 10 +in +addInteger (addInteger 10 7) 7 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/partiallyApp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/partiallyApp.golden index be3e5be4c62..ef8a4fee6e8 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/partiallyApp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/partiallyApp.golden @@ -1,25 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl - f - (fun - (con integer) - (fun - (con integer) (fun (con integer) (fun (con integer) (con integer))) - ) - ) - ) - (lam - a - (con integer) - (lam - b - (con integer) - (lam c (con integer) (lam d (con integer) (con integer 5))) - ) - ) - ) - (lam d (con integer) (con integer 5)) -) \ No newline at end of file +let + !f-10 : integer -> integer -> integer -> integer -> integer + = \(a-6 : integer) (b-7 : integer) (c-8 : integer) (d-9 : integer) -> 5 +in +\(d-19 : integer) -> 5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/rhs-modified.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/rhs-modified.golden index 48d13734d31..a929c113eeb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/rhs-modified.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/rhs-modified.golden @@ -1,13 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl f (fun (con integer) (con integer))) - (lam - x - (con integer) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - ) - [ [ (builtin addInteger) [ f (con integer 3) ] ] [ f (con integer 4) ] ] -) \ No newline at end of file +let + !f-5 : integer -> integer = \(x-4 : integer) -> addInteger 1 2 +in +addInteger (f-5 3) (f-5 4) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/single.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/single.golden index c302b6f7eae..9c139f68cec 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/single.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/single.golden @@ -1,17 +1,7 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl simple (con integer)) - [ (lam y (con integer) y) (con integer 1) ] - ) - (let - (nonrec) - (termbind - (strict) - (vardecl variableCapture (con integer)) - [ (lam y (con integer) (con integer 42)) (con integer 24) ] - ) - (con integer 42) - ) -) \ No newline at end of file +let + !simple-10 : integer = (\(y-22 : integer) -> y-22) 1 +in +let + !variableCapture-21 : integer = (\(y-26 : integer) -> 42) 24 +in +42 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/transitive.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/transitive.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/transitive.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/transitive.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/tyvar.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/tyvar.golden index e0d12f496dd..e7389fa0e53 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/tyvar.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/tyvar.golden @@ -1 +1 @@ -(lam p (con integer) (lam z (con integer) [ (lam x (con integer) x) p ])) \ No newline at end of file +\(p-7 : integer) (z-8 : integer) -> (\(x-9 : integer) -> x-9) p-7 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/var.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/var.golden index f3f6b9174bd..b7ddf27938b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/var.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Inline/var.golden @@ -1 +1 @@ -(lam y (con integer) y) \ No newline at end of file +\(y-2 : integer) -> y-2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/applicative.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/applicative.golden index b8937235fce..9c5889bffa4 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/applicative.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/applicative.golden @@ -1,118 +1,39 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - (termbind - (strict) - (vardecl x [ Maybe (con integer) ]) - [ { Just (con integer) } (con integer 1) ] - ) - (termbind - (strict) - (vardecl ds1 [ Maybe (fun (con integer) (con integer)) ]) - [ - [ - [ - (let - (nonrec) - (typebind (tyvardecl b (type)) (fun (con integer) (con integer))) - (lam - dFunctor - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - Maybe - ] - (lam - f - (fun (con integer) b) - (lam - fa - [ Maybe (con integer) ] - [ [ { { dFunctor (con integer) } b } f ] fa ] - ) - ) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (lam - ds2 - [ Maybe a ] - { - [ - [ - { - [ { Maybe_match a } ds2 ] - (all dead (type) [ Maybe b ]) - } - (lam a a (abs dead (type) [ { Just b } [ f a ] ])) - ] - (abs dead (type) { Nothing b }) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ] - (lam - p (con integer) (lam q (con integer) [ [ (builtin addInteger) p ] q ]) - ) - ] - x - ] - ) - { - [ - [ - { - [ { Maybe_match (fun (con integer) (con integer)) } ds1 ] - (all dead (type) [ Maybe (con integer) ]) - } - (lam - g - (fun (con integer) (con integer)) - (abs - dead - (type) - { - [ - (lam - v - (con integer) - (abs dead (type) [ { Just (con integer) } [ g v ] ]) - ) - (con integer 2) - ] - (all dead (type) dead) - } - ) - ) - ] - (abs dead (type) { Nothing (con integer) }) - ] - (all dead (type) dead) - } -) \ No newline at end of file +let + data (Maybe-17 :: * -> *) a-21 | Maybe_match-20 where + Just-18 : a-21 -> Maybe-17 a-21 + Nothing-19 : Maybe-17 a-21 + !x-22 : Maybe-17 integer = Just-18 {integer} 1 + !ds1-41 : Maybe-17 (integer -> integer) + = (let + b-23 = integer -> integer + in + \(dFunctor-24 : + (\(f-25 :: * -> *) -> + all a-26 b-27. (a-26 -> b-27) -> f-25 a-26 -> f-25 b-27) + Maybe-17) + (f-28 : integer -> b-23) + (fa-29 : Maybe-17 integer) -> + dFunctor-24 {integer} {b-23} f-28 fa-29) + (/\a-30 b-31 -> + \(f-32 : a-30 -> b-31) (ds2-33 : Maybe-17 a-30) -> + Maybe_match-20 + {a-30} + ds2-33 + {all dead-34. Maybe-17 b-31} + (\(a-35 : a-30) -> /\dead-36 -> Just-18 {b-31} (f-32 a-35)) + (/\dead-37 -> Nothing-19 {b-31}) + {all dead-38. dead-38}) + (\(p-39 : integer) (q-40 : integer) -> addInteger p-39 q-40) + x-22 +in +Maybe_match-20 + {integer -> integer} + ds1-41 + {all dead-42. Maybe-17 integer} + (\(g-43 : integer -> integer) -> + /\dead-44 -> + (\(v-46 : integer) -> /\dead-47 -> Just-18 {integer} (g-43 v-46)) + 2 + {all dead-49. dead-49}) + (/\dead-50 -> Nothing-19 {integer}) + {all dead-51. dead-51} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/bool.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/bool.golden index 7daa7229a94..8828218a573 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/bool.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/bool.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - { (abs dead (type) (con integer 1)) (all dead (type) dead) } -) \ No newline at end of file +let + data Bool-5 | Bool_match-8 where + True-6 : Bool-5 + False-7 : Bool-5 +in +(/\dead-10 -> 1) {all dead-12. dead-12} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/list.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/list.golden index a80a6de4fd2..42b8dbee25e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/list.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/list.golden @@ -1,30 +1,9 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - { - [ - [ - (lam - a - (con integer) - (lam - as - [ List (con integer) ] - (abs dead (type) [ [ (builtin addInteger) (con integer 2) ] a ]) - ) - ) - (con integer 1) - ] - { Nil (con integer) } - ] - (all dead (type) dead) - } -) \ No newline at end of file +letrec + data (List-7 :: * -> *) a-11 | List_match-10 where + Nil-8 : List-7 a-11 + Cons-9 : a-11 -> List-7 a-11 -> List-7 a-11 +in +(\(a-14 : integer) (as-15 : List-7 integer) -> /\dead-16 -> addInteger 2 a-14) + 1 + (Nil-8 {integer}) + {all dead-17. dead-17} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just-unsaturated.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just-unsaturated.golden index 1985d01dc07..74a8b8e6bbf 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just-unsaturated.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just-unsaturated.golden @@ -1,24 +1,10 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - [ - { - [ - { Maybe_match (con integer) } [ { Just (con integer) } (con integer 1) ] - ] - (all dead (type) (con integer)) - } - (lam - a - (con integer) - (abs dead (type) [ [ (builtin addInteger) (con integer 2) ] a ]) - ) - ] -) \ No newline at end of file +let + data (Maybe-6 :: * -> *) a-10 | Maybe_match-9 where + Just-7 : a-10 -> Maybe-6 a-10 + Nothing-8 : Maybe-6 a-10 +in +Maybe_match-9 + {integer} + (Just-7 {integer} 1) + {all dead-11. integer} + (\(a-12 : integer) -> /\dead-13 -> addInteger 2 a-12) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just.golden index 294f1efefe7..816b2138e4b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-just.golden @@ -1,22 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - { - [ - (lam - a - (con integer) - (abs dead (type) [ [ (builtin addInteger) (con integer 2) ] a ]) - ) - (con integer 1) - ] - (all dead (type) dead) - } -) \ No newline at end of file +let + data (Maybe-6 :: * -> *) a-10 | Maybe_match-9 where + Just-7 : a-10 -> Maybe-6 a-10 + Nothing-8 : Maybe-6 a-10 +in +(\(a-12 : integer) -> /\dead-13 -> addInteger 2 a-12) 1 {all dead-15. dead-15} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-nothing.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-nothing.golden index 937de0bc4d0..48af5b26a79 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-nothing.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/maybe-nothing.golden @@ -1,12 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - { (abs dead (type) (con integer 42)) (all dead (type) dead) } -) \ No newline at end of file +let + data (Maybe-6 :: * -> *) a-10 | Maybe_match-9 where + Just-7 : a-10 -> Maybe-6 a-10 + Nothing-8 : Maybe-6 a-10 +in +(/\dead-14 -> 42) {all dead-15. dead-15} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/pair.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/pair.golden index 5f7c3241214..b95bda3a001 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/pair.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/KnownCon/pair.golden @@ -1,27 +1,8 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - { - [ - [ - (lam - a - (con integer) - (lam - b (con integer) (abs dead (type) [ [ (builtin addInteger) a ] b ]) - ) - ) - (con integer 1) - ] - (con integer 2) - ] - (all dead (type) dead) - } -) \ No newline at end of file +let + data (Tuple2-5 :: * -> * -> *) a-8 b-9 | Tuple2_match-7 where + Tuple2-6 : a-8 -> b-9 -> Tuple2-5 a-8 b-9 +in +(\(a-11 : integer) (b-12 : integer) -> /\dead-13 -> addInteger a-11 b-12) + 1 + 2 + {all dead-14. dead-14} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-lam.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-lam.golden index 9c981eb3753..c85def0bdc9 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-lam.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-lam.golden @@ -1,17 +1,8 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl f (fun (con integer) (con integer))) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - (lam y (con integer) [ [ (builtin addInteger) y ] x ]) - ) - ) - [ [ (builtin addInteger) [ f (con integer 1) ] ] [ f (con integer 2) ] ] -) \ No newline at end of file +let + !f-5 : integer -> integer + = let + ~x-3 : integer = addInteger 1 2 + in + \(y-4 : integer) -> addInteger y-4 x-3 +in +addInteger (f-5 1) (f-5 2) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-tyabs.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-tyabs.golden index 570d62ff4c2..450acd465f1 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-tyabs.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/conservative/avoid-floating-into-tyabs.golden @@ -1,17 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl f (all t (type) (con integer))) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - (abs t (type) x) - ) - ) - [ [ (builtin addInteger) { f (con integer) } ] { f (con integer) } ] -) \ No newline at end of file +let + !f-5 : all t-6. integer = let ~x-3 : integer = addInteger 1 2 in /\t-4 -> x-3 +in +addInteger (f-5 {integer}) (f-5 {integer}) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-floating-into-RHS.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-floating-into-RHS.golden index 13e57053e85..a61d8345c1f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-floating-into-RHS.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-floating-into-RHS.golden @@ -1,12 +1,5 @@ -(let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - (termbind - (nonstrict) (vardecl y (con integer)) [ [ (builtin addInteger) x ] x ] - ) - [ [ (builtin addInteger) y ] y ] -) \ No newline at end of file +let + ~x-2 : integer = addInteger 1 2 + ~y-3 : integer = addInteger x-2 x-2 +in +addInteger y-3 y-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-moving-strict-nonvalue-bindings.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-moving-strict-nonvalue-bindings.golden index b019d172db8..3733ad8ae53 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-moving-strict-nonvalue-bindings.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/avoid-moving-strict-nonvalue-bindings.golden @@ -1,13 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - (lam - x - (con integer) - [ [ (builtin addInteger) [ [ (builtin addInteger) y ] x ] ] y ] - ) -) \ No newline at end of file +let + !y-2 : integer = addInteger 1 2 +in +\(x-3 : integer) -> addInteger (addInteger y-2 x-3) y-2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/cannot-float-into-app.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/cannot-float-into-app.golden index 3006d50483d..7d59db691b8 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/cannot-float-into-app.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/cannot-float-into-app.golden @@ -1,14 +1,5 @@ -(let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - (termbind - (strict) - (vardecl f (fun (con integer) (con integer))) - (lam y (con integer) [ [ (builtin addInteger) y ] (con integer 3) ]) - ) - [ [ (builtin addInteger) [ f x ] ] [ f x ] ] -) \ No newline at end of file +let + ~x-5 : integer = addInteger 1 2 + !f-4 : integer -> integer = \(y-3 : integer) -> addInteger y-3 3 +in +addInteger (f-4 x-5) (f-4 x-5) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype1.golden index dc01d627469..a050abbb702 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype1.golden @@ -1,18 +1,8 @@ -[ - { - (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - Just - ) - (all a (type) (fun a a)) - } - (abs a (type) (lam x a x)) -] \ No newline at end of file +(let + data (Maybe-6 :: * -> *) a-10 | match_Maybe-9 where + Nothing-7 : Maybe-6 a-10 + Just-8 : a-10 -> Maybe-6 a-10 + in + Just-8) + {all a-11. a-11 -> a-11} + (/\a-12 -> \(x-13 : a-12) -> x-13) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype2.golden index c502ba6c029..1a4d6ee1607 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/datatype2.golden @@ -1,26 +1,7 @@ -(lam - x - (con integer) - (lam - y - (con integer) - (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - [ - [ - [ { (builtin ifThenElse) Bool } [ [ (builtin equalsInteger) x ] y ] ] - True - ] - False - ] - ) - ) -) \ No newline at end of file +\(x-10 : integer) (y-11 : integer) -> + let + data Bool-6 | Bool_match-9 where + True-7 : Bool-6 + False-8 : Bool-6 + in + ifThenElse {Bool-6} (equalsInteger x-10 y-11) True-7 False-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-RHS.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-RHS.golden index a419b389378..0b521ab811b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-RHS.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-RHS.golden @@ -1,23 +1,6 @@ -[ - [ - (builtin addInteger) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - [ [ (builtin addInteger) x ] x ] - ) - ) - y - ) - ] - (con integer 3) -] \ No newline at end of file +addInteger + (let + ~y-3 : integer = let ~x-2 : integer = addInteger 1 2 in addInteger x-2 x-2 + in + y-3) + 3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-arg.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-arg.golden index 9dc39f06f3d..db5c9cece86 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-arg.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-arg.golden @@ -1,17 +1,4 @@ -(case - (con integer) - (constr - (sop [(con integer)]) - 0 - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - y - ) - ) - (lam x (con integer) (con integer 1)) -) \ No newline at end of file +case + integer + (constr (sop [integer]) 0 [(let ~y-2 : integer = addInteger 1 2 in y-2)]) + [(\(x-3 : integer) -> 1)] \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-branch.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-branch.golden index f5f6a7f6ea8..c0a3c146df6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-branch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-case-branch.golden @@ -1,17 +1,4 @@ -(case - (con integer) - (constr (sop [(con integer)]) 0 (con integer 1)) - (lam - x - (con integer) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - y - ) - ) -) \ No newline at end of file +case + integer + (constr (sop [integer]) 0 [1]) + [(\(x-3 : integer) -> let ~y-2 : integer = addInteger 1 2 in y-2)] \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-constr.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-constr.golden index 0801f984091..6f9fc8a44d4 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-constr.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-constr.golden @@ -1,15 +1,4 @@ -(constr - (sop [(con integer) (con integer) (con integer)]) +constr + (sop [integer, integer, integer]) 0 - (con integer 1) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - y - ) - (con integer 2) -) \ No newline at end of file + [1, (let ~y-1 : integer = addInteger 1 2 in y-1), 2] \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-1.golden index cdf029df0ba..84544ce6655 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-1.golden @@ -1,23 +1,10 @@ -[ - [ (builtin addInteger) (con integer 1) ] - [ - (let - (nonrec) - (termbind - (strict) - (vardecl f (fun (con integer) (con integer))) - (lam y (con integer) [ [ (builtin addInteger) y ] (con integer 3) ]) - ) - f - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - x - ) - ] -] \ No newline at end of file +addInteger + 1 + ((let + !f-4 : integer -> integer = \(y-3 : integer) -> addInteger y-3 3 + in + f-4) + (let + ~x-5 : integer = addInteger 1 2 + in + x-5)) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-2.golden index 61b7fab69ee..e7e9257ca0a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-fun-and-arg-2.golden @@ -1,26 +1,10 @@ -[ - [ - (builtin addInteger) - [ - (let - (nonrec) - (termbind - (strict) - (vardecl f (fun (con integer) (con integer))) - (lam y (con integer) [ [ (builtin addInteger) y ] (con integer 3) ]) - ) - f - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - x - ) - ] - ] - (con integer 1) -] \ No newline at end of file +addInteger + ((let + !f-4 : integer -> integer = \(y-3 : integer) -> addInteger y-3 3 + in + f-4) + (let + ~x-5 : integer = addInteger 1 2 + in + x-5)) + 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam1.golden index 421def84081..c07f111fc5c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam1.golden @@ -1,13 +1,5 @@ -(lam - x - (con integer) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - [ [ (builtin addInteger) [ [ (builtin addInteger) y ] x ] ] y ] - ) -) \ No newline at end of file +\(x-3 : integer) -> + let + ~y-2 : integer = addInteger 1 2 + in + addInteger (addInteger y-2 x-3) y-2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam2.golden index 925aba24a0d..752431bfc5e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-lam2.golden @@ -1,24 +1,6 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl f (fun (con integer) (con integer))) - (lam - y - (con integer) - [ - [ (builtin addInteger) y ] - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - x - ) - ] - ) - ) - [ [ (builtin addInteger) [ f (con integer 1) ] ] [ f (con integer 2) ] ] -) \ No newline at end of file +let + !f-5 : integer -> integer + = \(y-4 : integer) -> + addInteger y-4 (let ~x-3 : integer = addInteger 1 2 in x-3) +in +addInteger (f-5 1) (f-5 2) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs1.golden index cb317973d00..30655fba91d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs1.golden @@ -1,40 +1,14 @@ -(abs - a - (type) - (lam - a - a - [ - [ - { - { - (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - Tuple2 - ) - a - } - (con integer) - } - a - ] +/\a-11 -> + \(a-12 : a-11) -> + (let + data (Tuple2-5 :: * -> * -> *) a-8 b-9 | Tuple2_match-7 where + Tuple2-6 : a-8 -> b-9 -> Tuple2-5 a-8 b-9 + in + Tuple2-6) + {a-11} + {integer} + a-12 (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - [ [ (builtin addInteger) y ] y ] - ) - ] - ) -) \ No newline at end of file + ~y-10 : integer = addInteger 1 2 + in + addInteger y-10 y-10) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs2.golden index b0caba0080d..3e38f87c563 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/float-into-tyabs2.golden @@ -1,21 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl f (all t (type) (con integer))) - (abs - t - (type) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 2) ] - ) - x - ) - ) - ) - [ [ (builtin addInteger) { f (con integer) } ] { f (con integer) } ] -) \ No newline at end of file +let + !f-5 : all t-6. integer = /\t-4 -> let ~x-3 : integer = addInteger 1 2 in x-3 +in +addInteger (f-5 {integer}) (f-5 {integer}) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/type.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/type.golden index 9844b611adf..3aaa03f274e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/type.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatIn/relaxed/type.golden @@ -1,26 +1,12 @@ -(lam - n - (con integer) - [ +\(n-15 : integer) -> + (let + int-14 = integer + in (let - (nonrec) - (typebind (tyvardecl int (type)) (con integer)) - { - { - (let - (nonrec) - (termbind - (strict) - (vardecl const (all a (type) (all b (type) (fun a (fun b a))))) - (abs a (type) (abs b (type) (lam x a (lam y b x)))) - ) - const - ) - (con integer) - } - int - } - ) - (con integer 1) - ] -) \ No newline at end of file + !const-11 : all a-12 b-13. a-12 -> b-13 -> a-12 + = /\a-7 b-8 -> \(x-9 : a-7) (y-10 : b-8) -> x-9 + in + const-11) + {integer} + {int-14}) + 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/even3Eval.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/even3Eval.golden index 383d5389454..b01ca532ade 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/even3Eval.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/even3Eval.golden @@ -1,42 +1,22 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl Nat (type)) - - match_Nat - (vardecl Zero Nat) (vardecl Suc (fun Nat Nat)) - ) - ) - (let - (rec) - (termbind - (strict) - (vardecl even (fun Nat Bool)) - (lam n Nat [ [ { [ match_Nat n ] Bool } True ] (lam p Nat [ odd p ]) ]) - ) - (termbind - (strict) - (vardecl odd (fun Nat Bool)) - (lam - n Nat [ [ { [ match_Nat n ] Bool } False ] (lam p Nat [ even p ]) ] - ) - ) - (let - (nonrec) - (termbind (strict) (vardecl three Nat) [ Suc [ Suc [ Suc Zero ] ] ]) - [ even three ] - ) - ) - ) -) \ No newline at end of file +let + data Bool-17 | match_Bool-20 where + True-18 : Bool-17 + False-19 : Bool-17 +in +letrec + data Nat-13 | match_Nat-16 where + Zero-14 : Nat-13 + Suc-15 : Nat-13 -> Nat-13 +in +letrec + !even-22 : Nat-13 -> Bool-17 + = \(n-24 : Nat-13) -> + match_Nat-16 n-24 {Bool-17} True-18 (\(p-25 : Nat-13) -> odd-23 p-25) + !odd-23 : Nat-13 -> Bool-17 + = \(n-26 : Nat-13) -> + match_Nat-16 n-26 {Bool-17} False-19 (\(p-27 : Nat-13) -> even-22 p-27) +in +let + !three-21 : Nat-13 = Suc-15 (Suc-15 (Suc-15 Zero-14)) +in +even-22 three-21 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/ifError.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/ifError.golden index 901ad65bba6..34387bda178 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/ifError.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/ifError.golden @@ -1,32 +1,6 @@ -[ - (lam - b - (all a (type) (fun (fun (con integer) a) (fun (fun (con integer) a) a))) - [ - [ - { b (con integer) } - (lam - z - (con integer) - (let - (nonrec) - (termbind - (strict) (vardecl err (con integer)) (error (con integer)) - ) - err - ) - ) - ] - (lam z (con integer) (con integer 1)) - ] - ) - (abs - a - (type) - (lam - x - (fun (con integer) a) - (lam y (fun (con integer) a) [ y (con integer 0) ]) - ) - ) -] \ No newline at end of file +(\(b-6 : all a-7. (integer -> a-7) -> (integer -> a-7) -> a-7) -> + b-6 + {integer} + (\(z-8 : integer) -> let !err-9 : integer = error {integer} in err-9) + (\(z-10 : integer) -> 1)) + (/\a-11 -> \(x-12 : integer -> a-11) (y-13 : integer -> a-11) -> y-13 0) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/inLam.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/inLam.golden index 304c202e503..aab648f75ac 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/inLam.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/inLam.golden @@ -1,13 +1 @@ -(lam - x - (con integer) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ [ (builtin addInteger) (con integer 3) ] x ] - ) - [ [ (builtin addInteger) x ] y ] - ) -) \ No newline at end of file +\(x-2 : integer) -> let ~y-3 : integer = addInteger 3 x-2 in addInteger x-2 y-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/letInLet.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/letInLet.golden index 7cd8e69577f..910b94b8a3a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/letInLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/letInLet.golden @@ -1,10 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl unitval (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - (termbind (strict) (vardecl unitval2 (all a (type) (fun a a))) unitval) - unitval2 -) \ No newline at end of file +let + !unitval-6 : all a-7. a-7 -> a-7 = /\a-4 -> \(x-5 : a-4) -> x-5 + !unitval2-8 : all a-9. a-9 -> a-9 = unitval-6 +in +unitval2-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/listMatch.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/listMatch.golden index 4b83ce8f9c8..032d7d5a9c9 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/listMatch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/listMatch.golden @@ -1,39 +1,17 @@ -(lam - x - (con integer) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - match_List - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 3) ] x ] - ) - [ - [ - { - [ - { match_List (all a (type) (fun a a)) } - { Nil (all a (type) (fun a a)) } - ] - (all a (type) (fun a a)) - } - (abs a (type) (lam x a x)) - ] - (lam - h (all a (type) (fun a a)) (lam t [ List (all a (type) (fun a a)) ] h) - ) - ] - ) - ) -) \ No newline at end of file +\(x-9 : integer) -> + letrec + data (List-11 :: * -> *) a-15 | match_List-14 where + Nil-12 : List-11 a-15 + Cons-13 : a-15 -> List-11 a-15 -> List-11 a-15 + in + let + !j-10 : integer = addInteger 3 x-9 + in + match_List-14 + {all a-16. a-16 -> a-16} + (Nil-12 {all a-17. a-17 -> a-17}) + {all a-18. a-18 -> a-18} + (/\a-19 -> \(x-20 : a-19) -> x-20) + (\(h-21 : all a-22. a-22 -> a-22) + (t-23 : List-11 (all a-24. a-24 -> a-24)) -> + h-21) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/maybe.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/maybe.golden index 37de78acc03..ddaa616a1a6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/maybe.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/maybe.golden @@ -1,24 +1,10 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - match_Maybe - (vardecl Nothing [ Maybe a ]) (vardecl Just (fun a [ Maybe a ])) - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 3) ] x ] - ) - [ { Just (all a (type) (fun a a)) } (abs a (type) (lam x a x)) ] - ) - ) -) \ No newline at end of file +let + data (Maybe-9 :: * -> *) a-13 | match_Maybe-12 where + Nothing-10 : Maybe-9 a-13 + Just-11 : a-13 -> Maybe-9 a-13 +in +\(x-7 : integer) -> + let + !j-8 : integer = addInteger 3 x-7 + in + Just-11 {all a-14. a-14 -> a-14} (/\a-15 -> \(x-16 : a-15) -> x-16) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveTypes.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveTypes.golden index 40b4312cf50..7aef0cb86ff 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveTypes.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveTypes.golden @@ -1,21 +1,8 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl Tree (fun (type) (type))) - (tyvardecl a (type)) - match_Tree - (vardecl Node (fun a (fun [ Forest a ] [ Tree a ]))) - ) - ) - (datatypebind - (datatype - (tyvardecl Forest (fun (type) (type))) - (tyvardecl a (type)) - match_Forest - (vardecl Nil [ Forest a ]) - (vardecl Cons (fun [ Tree a ] (fun [ Forest a ] [ Forest a ]))) - ) - ) - { Nil (all a (type) (fun a a)) } -) \ No newline at end of file +letrec + data (Tree-8 :: * -> *) a-15 | match_Tree-10 where + Node-9 : a-15 -> Forest-11 a-15 -> Tree-8 a-15 + data (Forest-11 :: * -> *) a-16 | match_Forest-14 where + Nil-12 : Forest-11 a-16 + Cons-13 : Tree-8 a-16 -> Forest-11 a-16 -> Forest-11 a-16 +in +Nil-12 {all a-17. a-17 -> a-17} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveValues.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveValues.golden index 3e0614c749b..2cf51fd023e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveValues.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/mutuallyRecursiveValues.golden @@ -1,10 +1,5 @@ -(let - (rec) - (termbind (strict) (vardecl x (all a (type) (fun a a))) y) - (termbind - (strict) - (vardecl y (all a (type) (fun a a))) - (abs a (type) (lam z a [ { x a } z ])) - ) - x -) \ No newline at end of file +letrec + !x-4 : all a-6. a-6 -> a-6 = y-5 + !y-5 : all a-7. a-7 -> a-7 = /\a-8 -> \(z-9 : a-8) -> x-4 {a-8} z-9 +in +x-4 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec1.golden index 544d21ca23a..4abc8a9b76f 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec1.golden @@ -1,11 +1,6 @@ -(let - (nonrec) - (termbind (strict) (vardecl j (con integer)) (con integer 3)) - (termbind (strict) (vardecl i2 (con integer)) (con integer 3)) - (termbind - (strict) - (vardecl i1 (con integer)) - [ [ (builtin addInteger) i2 ] (con integer 3) ] - ) - [ [ (builtin addInteger) (con integer 5) ] [ [ (builtin addInteger) j ] i2 ] ] -) \ No newline at end of file +let + !j-4 : integer = 3 + !i2-3 : integer = 3 + !i1-5 : integer = addInteger i2-3 3 +in +addInteger 5 (addInteger j-4 i2-3) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec2.golden index 55a5b79ca3b..3ad8b88bcd2 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec2.golden @@ -1,27 +1,11 @@ -(let - (nonrec) - (termbind (strict) (vardecl j1 (con integer)) (con integer 0)) - (termbind (strict) (vardecl j (con integer)) (con integer 0)) - (termbind (strict) (vardecl i2 (con integer)) (con integer 2)) - (lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl i1 (con integer)) - [ [ (builtin addInteger) i2 ] (con integer 1) ] - ) - (termbind - (strict) - (vardecl i (con integer)) - [ - [ (builtin addInteger) i1 ] - [ [ (builtin addInteger) x ] [ [ (builtin addInteger) i2 ] j ] ] - ] - ) - [ [ (builtin addInteger) i ] j1 ] - ) - ) -) \ No newline at end of file +let + !j1-11 : integer = 0 + !j-9 : integer = 0 + !i2-7 : integer = 2 +in +\(x-6 : integer) -> + let + !i1-8 : integer = addInteger i2-7 1 + !i-10 : integer = addInteger i1-8 (addInteger x-6 (addInteger i2-7 j-9)) + in + addInteger i-10 j1-11 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec3.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec3.golden index 0f85be80534..d1564bae7c7 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec3.golden @@ -1,13 +1,5 @@ -(lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl i (con integer)) - [ (lam y (con integer) [ [ (builtin addInteger) y ] x ]) (con integer 1) ] - ) - i - ) -) \ No newline at end of file +\(x-3 : integer) -> + let + !i-5 : integer = (\(y-4 : integer) -> addInteger y-4 x-3) 1 + in + i-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec4.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec4.golden index c0cf917e3cd..66f022341f6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec4.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec4.golden @@ -1,20 +1,4 @@ -(let - (nonrec) - (termbind (strict) (vardecl i (con integer)) (con integer 3)) - [ - (lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) i ] (con integer 1) ] - ) - j - ) - ) - (con integer 4) - ] -) \ No newline at end of file +let + !i-3 : integer = 3 +in +(\(x-4 : integer) -> let !j-5 : integer = addInteger i-3 1 in j-5) 4 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec6.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec6.golden index d1f3bc8e794..354542491a5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec6.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec6.golden @@ -1,21 +1,5 @@ -(lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl i (con integer)) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 1) ] x ] - ) - j - ) - ) - i - ) -) \ No newline at end of file +\(x-3 : integer) -> + let + !i-5 : integer = let !j-4 : integer = addInteger 1 x-3 in j-4 + in + i-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec7.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec7.golden index 9b2a77b01f5..88a3867b9be 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec7.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec7.golden @@ -1,24 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl i (con integer)) - [ - (lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 1) ] x ] - ) - j - ) - ) - (con integer 1) - ] - ) - i -) \ No newline at end of file +let + !i-5 : integer + = (\(x-3 : integer) -> let !j-4 : integer = addInteger 1 x-3 in j-4) 1 +in +i-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec8.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec8.golden index f8afbc051a1..fe8bb8aa1ad 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec8.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec8.golden @@ -1,28 +1,11 @@ -(let - (nonrec) - (termbind (strict) (vardecl k (con integer)) (con integer 1)) - (termbind - (strict) - (vardecl i (con integer)) - [ - (lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ - [ (builtin addInteger) k ] - [ [ (builtin addInteger) (con integer 1) ] x ] - ] - ) - j - ) - ) - (con integer 1) - ] - ) - i -) \ No newline at end of file +let + !k-5 : integer = 1 + !i-7 : integer + = (\(x-4 : integer) -> + let + !j-6 : integer = addInteger k-5 (addInteger 1 x-4) + in + j-6) + 1 +in +i-7 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec9.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec9.golden index 0ba0042f55d..d2fbd570cb0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec9.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrec9.golden @@ -1,10 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl a (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 1) ] - ) - (termbind (nonstrict) (vardecl b (con integer)) a) - b -) \ No newline at end of file +let + !a-2 : integer = addInteger 1 1 + ~b-3 : integer = a-2 +in +b-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToNonrec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToNonrec.golden index 09e4f0a1379..d5c8073c84a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToNonrec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToNonrec.golden @@ -1,7 +1,6 @@ -(let - (rec) - (termbind (strict) (vardecl r (con integer)) i) - (termbind (strict) (vardecl j (con integer)) r) - (termbind (strict) (vardecl i (con integer)) j) - (con integer 3) -) \ No newline at end of file +letrec + !r-3 : integer = i-5 + !j-4 : integer = r-3 + !i-5 : integer = j-4 +in +3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToRec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToRec.golden index 2f82c7c950a..6c0b32a6a43 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/nonrecToRec.golden @@ -1,10 +1,5 @@ -(let - (rec) - (termbind (nonstrict) (vardecl r (con integer)) i) - (termbind - (nonstrict) - (vardecl i (con integer)) - (let (nonrec) (termbind (strict) (vardecl j (con integer)) r) j) - ) - (con integer 3) -) \ No newline at end of file +letrec + ~r-3 : integer = i-5 + ~i-5 : integer = let !j-4 : integer = r-3 in j-4 +in +3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldFloatBug.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldFloatBug.golden index 0ba0042f55d..d2fbd570cb0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldFloatBug.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldFloatBug.golden @@ -1,10 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl a (con integer)) - [ [ (builtin addInteger) (con integer 1) ] (con integer 1) ] - ) - (termbind (nonstrict) (vardecl b (con integer)) a) - b -) \ No newline at end of file +let + !a-2 : integer = addInteger 1 1 + ~b-3 : integer = a-2 +in +b-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldLength.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldLength.golden index 8aeb454b94f..494d78f44c2 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldLength.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/oldLength.golden @@ -1,20 +1,5 @@ -(lam - x - (all a (type) (fun a (fun a a))) - (let - (nonrec) - (termbind - (strict) - (vardecl i (con integer)) - [ - (lam - y - (con integer) - (let (nonrec) (termbind (strict) (vardecl j (con integer)) y) y) - ) - (con integer 5) - ] - ) - i - ) -) \ No newline at end of file +\(x-5 : all a-6. a-6 -> a-6 -> a-6) -> + let + !i-9 : integer = (\(y-7 : integer) -> let !j-8 : integer = y-7 in y-7) 5 + in + i-9 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outLam.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outLam.golden index cfefc2dfb9c..f8e5db334dd 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outLam.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outLam.golden @@ -1,5 +1,4 @@ -(let - (nonrec) - (termbind (nonstrict) (vardecl y (con integer)) (con integer 3)) - (lam x (con integer) [ [ (builtin addInteger) x ] y ]) -) \ No newline at end of file +let + ~y-3 : integer = 3 +in +\(x-2 : integer) -> addInteger x-2 y-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outRhs.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outRhs.golden index 7d321cde6cd..d068bab67fa 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outRhs.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/outRhs.golden @@ -1,14 +1,5 @@ -(let - (rec) - (termbind - (strict) - (vardecl x (con integer)) - (let (nonrec) (termbind (strict) (vardecl y (con integer)) z) y) - ) - (termbind - (nonstrict) - (vardecl z (con integer)) - [ [ (builtin addInteger) x ] (con integer 1) ] - ) - x -) \ No newline at end of file +letrec + !x-3 : integer = let !y-5 : integer = z-4 in y-5 + ~z-4 : integer = addInteger x-3 1 +in +x-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec1.golden index f5ceb8d2628..bae633a3208 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec1.golden @@ -1,29 +1,11 @@ -(let - (nonrec) - (termbind (strict) (vardecl i2 (con integer)) (con integer 3)) - (let - (rec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 3) ] k ] - ) - (termbind - (strict) - (vardecl k (con integer)) - [ [ (builtin addInteger) (con integer 3) ] j ] - ) - (let - (nonrec) - (termbind - (strict) - (vardecl i1 (con integer)) - [ [ (builtin addInteger) k ] (con integer 3) ] - ) - [ - [ (builtin addInteger) (con integer 5) ] - [ [ (builtin addInteger) j ] i2 ] - ] - ) - ) -) \ No newline at end of file +let + !i2-4 : integer = 3 +in +letrec + !j-5 : integer = addInteger 3 k-6 + !k-6 : integer = addInteger 3 j-5 +in +let + !i1-7 : integer = addInteger k-6 3 +in +addInteger 5 (addInteger j-5 i2-4) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec2.golden index 84aab17a0d1..2799881ad68 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec2.golden @@ -1,41 +1,15 @@ -(let - (nonrec) - (termbind (strict) (vardecl i2 (con integer)) (con integer 3)) - (lam - x - (con integer) - [ - (lam - y - (con integer) - (let - (rec) - (termbind - (strict) (vardecl j (con integer)) [ [ (builtin addInteger) x ] k ] - ) - (termbind - (strict) (vardecl k (con integer)) [ [ (builtin addInteger) y ] j ] - ) - (let - (nonrec) - (termbind - (strict) - (vardecl c (con integer)) - [ [ (builtin addInteger) (con integer 1) ] i2 ] - ) - (termbind - (strict) - (vardecl i1 (con integer)) - [ [ (builtin addInteger) k ] (con integer 3) ] - ) - [ - [ (builtin addInteger) (con integer 5) ] - [ [ (builtin addInteger) j ] i2 ] - ] - ) - ) - ) - (con integer 1) - ] - ) -) \ No newline at end of file +let + !i2-9 : integer = 3 +in +\(x-7 : integer) -> + (\(y-8 : integer) -> + letrec + !j-10 : integer = addInteger x-7 k-11 + !k-11 : integer = addInteger y-8 j-10 + in + let + !c-12 : integer = addInteger 1 i2-9 + !i1-13 : integer = addInteger k-11 3 + in + addInteger 5 (addInteger j-10 i2-9)) + 1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec3.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec3.golden index 03b00bbb1be..da44c7fd555 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec3.golden @@ -1,17 +1,7 @@ -(let - (rec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 3) ] j ] - ) - (let - (nonrec) - (termbind - (strict) - (vardecl k (con integer)) - [ [ (builtin addInteger) (con integer 3) ] j ] - ) - [ [ (builtin addInteger) (con integer 5) ] j ] - ) -) \ No newline at end of file +letrec + !j-2 : integer = addInteger 3 j-2 +in +let + !k-3 : integer = addInteger 3 j-2 +in +addInteger 5 j-2 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec4.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec4.golden index 74e6dcdfbaf..a86d4a5adb6 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec4.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rec4.golden @@ -1,9 +1,4 @@ -(let - (rec) - (termbind - (strict) - (vardecl j (con integer)) - [ [ (builtin addInteger) (con integer 3) ] j ] - ) - (con integer 1) -) \ No newline at end of file +letrec + !j-1 : integer = addInteger 3 j-1 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rhsSqueezeVsNest.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rhsSqueezeVsNest.golden index e5bdee40c82..2ccf50caa76 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rhsSqueezeVsNest.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/rhsSqueezeVsNest.golden @@ -1,29 +1,9 @@ -(let - (rec) - (termbind (strict) (vardecl x (con integer)) x') - (termbind (nonstrict) (vardecl x' (con integer)) x) - (let - (rec) - (termbind - (strict) - (vardecl y (con integer)) - [ - (lam - k - (con integer) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl y' (con integer)) - [ [ (builtin addInteger) k ] y ] - ) - y' - ) - ) - y - ] - ) - x - ) -) \ No newline at end of file +letrec + !x-5 : integer = x'-7 + ~x'-7 : integer = x-5 +in +letrec + !y-6 : integer + = (\(k-8 : integer) -> let ~y'-9 : integer = addInteger k-8 y-6 in y'-9) y-6 +in +x-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue.golden index 2037f1c6a83..e4235005693 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue.golden @@ -1,13 +1,4 @@ -(let - (nonrec) - (termbind - (nonstrict) - (vardecl x (con integer)) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) (error (con integer))) - y - ) - ) - (con integer 1) -) \ No newline at end of file +let + ~x-3 : integer = let !y-2 : integer = error {integer} in y-2 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue2.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue2.golden index cd85c70b700..76f799a27b3 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue2.golden @@ -1,6 +1,5 @@ -(let - (nonrec) - (termbind (nonstrict) (vardecl y (con integer)) (con integer 1)) - (termbind (strict) (vardecl x (con integer)) [ (lam z (con integer) z) y ]) - (con integer 1) -) \ No newline at end of file +let + ~y-4 : integer = 1 + !x-5 : integer = (\(z-3 : integer) -> z-3) y-4 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue3.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue3.golden index 07797ca6973..1ad16fa2011 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValue3.golden @@ -1,21 +1,9 @@ -(lam - x - (con integer) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl i (con integer)) - (let - (nonrec) - (termbind - (strict) - (vardecl j (con integer)) - [ (lam x (con integer) x) (con integer 1) ] - ) - [ [ (builtin addInteger) j ] x ] - ) - ) - i - ) -) \ No newline at end of file +\(x-3 : integer) -> + let + ~i-6 : integer + = let + !j-5 : integer = (\(x-4 : integer) -> x-4) 1 + in + addInteger j-5 x-3 + in + i-6 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValueDeep.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValueDeep.golden index b1a1bfeb647..346c71bfe22 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValueDeep.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictNonValueDeep.golden @@ -1,18 +1,8 @@ -(let - (rec) - (termbind - (nonstrict) - (vardecl y (con integer)) - [ (lam h (con integer) [ [ (builtin addInteger) z ] h ]) (con integer 4) ] - ) - (termbind (nonstrict) (vardecl z (con integer)) y) - (let - (nonrec) - (termbind - (strict) - (vardecl x (con integer)) - [ (lam k (con integer) [ [ (builtin addInteger) y ] k ]) (con integer 3) ] - ) - x - ) -) \ No newline at end of file +letrec + ~y-7 : integer = (\(h-8 : integer) -> addInteger z-9 h-8) 4 + ~z-9 : integer = y-7 +in +let + !x-5 : integer = (\(k-6 : integer) -> addInteger y-7 k-6) 3 +in +x-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValue.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValue.golden index 89cd41246e2..3ec1ac2e2d5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValue.golden @@ -1,15 +1,4 @@ -(let - (nonrec) - (termbind (strict) (vardecl j (con integer)) (con integer 1)) - (lam - x - (con integer) - (let - (nonrec) - (termbind - (nonstrict) (vardecl i (con integer)) [ [ (builtin addInteger) j ] x ] - ) - i - ) - ) -) \ No newline at end of file +let + !j-4 : integer = 1 +in +\(x-3 : integer) -> let ~i-5 : integer = addInteger j-4 x-3 in i-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueNonValue.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueNonValue.golden index 90605db67a9..46a3b46e558 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueNonValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueNonValue.golden @@ -1,19 +1,5 @@ -(let - (rec) - (termbind - (strict) - (vardecl value (fun (con integer) (con integer))) - (lam - x - (con integer) - (let - (nonrec) - (termbind - (strict) (vardecl nonvalue (con integer)) [ value (con integer 3) ] - ) - x - ) - ) - ) - (con integer 3) -) \ No newline at end of file +letrec + !value-3 : integer -> integer + = \(x-4 : integer) -> let !nonvalue-5 : integer = value-3 3 in x-4 +in +3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueValue.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueValue.golden index 5f2387f7dff..053bed3933e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/LetFloatOut/strictValueValue.golden @@ -1,14 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl value1 (fun (con integer) (con integer))) - (lam x (con integer) x) - ) - (termbind - (strict) - (vardecl value2 (fun (con integer) (con integer))) - (lam y (con integer) [ value1 y ]) - ) - (con integer 3) -) \ No newline at end of file +let + !value1-4 : integer -> integer = \(x-5 : integer) -> x-5 + !value2-6 : integer -> integer = \(y-7 : integer) -> value1-4 y-7 +in +3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/NonStrict/nonStrict1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/NonStrict/nonStrict1.golden index c3cafa4d29c..1c63a7aac80 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/NonStrict/nonStrict1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/NonStrict/nonStrict1.golden @@ -1,9 +1,4 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl unitval (all dead (type) (all a (type) (fun a a)))) - (abs dead (type) (abs a (type) (lam x a x))) - ) - { unitval (all dead (type) dead) } -) \ No newline at end of file +let + !unitval-5 : all dead-7 a-6. a-6 -> a-6 = /\dead-7 a-3 -> \(x-4 : a-3) -> x-4 +in +unitval-5 {all dead-7. dead-7} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/big.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/big.golden index 568ecdd2eab..c64ce1dbfcd 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/big.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/big.golden @@ -1,48 +1,22 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl Nat (type)) - - match_Nat - (vardecl Zero Nat) (vardecl Suc (fun Nat Nat)) - ) - ) - (let - (rec) - (termbind - (strict) - (vardecl even (fun Nat Bool)) - (lam - n - Nat - [ [ { [ match_Nat n ] Bool } True ] (lam pred Nat [ odd pred ]) ] - ) - ) - (termbind - (strict) - (vardecl odd (fun Nat Bool)) - (lam - n - Nat - [ [ { [ match_Nat n ] Bool } False ] (lam pred Nat [ even pred ]) ] - ) - ) - (let - (nonrec) - (termbind (strict) (vardecl three Nat) [ Suc [ Suc [ Suc Zero ] ] ]) - [ even three ] - ) - ) - ) -) \ No newline at end of file +let + data Bool-4 | match_Bool-5 where + True-6 : Bool-4 + False-7 : Bool-4 +in +letrec + data Nat-0 | match_Nat-1 where + Zero-2 : Nat-0 + Suc-3 : Nat-0 -> Nat-0 +in +letrec + !even-8 : Nat-0 -> Bool-4 + = \(n-9 : Nat-0) -> + match_Nat-1 n-9 {Bool-4} True-6 (\(pred-10 : Nat-0) -> odd-11 pred-10) + !odd-11 : Nat-0 -> Bool-4 + = \(n-9 : Nat-0) -> + match_Nat-1 n-9 {Bool-4} False-7 (\(pred-10 : Nat-0) -> even-8 pred-10) +in +let + !three-12 : Nat-0 = Suc-3 (Suc-3 (Suc-3 Zero-2)) +in +even-8 three-12 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveTypes.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveTypes.golden index 67d3b17d7b8..8382446da8b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveTypes.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveTypes.golden @@ -1,26 +1,12 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl Tree (fun (type) (type))) - (tyvardecl a (type)) - match_Tree - (vardecl Node (fun a (fun [ Forest a ] [ Tree a ]))) - ) - ) - (datatypebind - (datatype - (tyvardecl Forest (fun (type) (type))) - (tyvardecl a (type)) - match_Forest - (vardecl Nil [ Forest a ]) - (vardecl Cons (fun [ Tree a ] (fun [ Forest a ] [ Forest a ]))) - ) - ) - (let - (rec) - (typebind (tyvardecl unit (type)) unit_) - (typebind (tyvardecl unit_ (type)) unit) - { Nil (all a (type) (fun a a)) } - ) -) \ No newline at end of file +letrec + data (Tree-2 :: * -> *) a-3 | match_Tree-4 where + Node-5 : a-3 -> Forest-6 a-3 -> Tree-2 a-3 + data (Forest-6 :: * -> *) a-3 | match_Forest-7 where + Nil-8 : Forest-6 a-3 + Cons-9 : Tree-2 a-3 -> Forest-6 a-3 -> Forest-6 a-3 +in +letrec + unit-0 = unit_-1 + unit_-1 = unit-0 +in +Nil-8 {all a-3. a-3 -> a-3} \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveValues.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveValues.golden index 3e0614c749b..048f4a517e9 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveValues.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/mutuallyRecursiveValues.golden @@ -1,10 +1,5 @@ -(let - (rec) - (termbind (strict) (vardecl x (all a (type) (fun a a))) y) - (termbind - (strict) - (vardecl y (all a (type) (fun a a))) - (abs a (type) (lam z a [ { x a } z ])) - ) - x -) \ No newline at end of file +letrec + !x-0 : all a-1. a-1 -> a-1 = y-2 + !y-2 : all a-1. a-1 -> a-1 = /\a-1 -> \(z-3 : a-1) -> x-0 {a-1} z-3 +in +x-0 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/selfrecursive.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/selfrecursive.golden index 2f0fe764e4b..d029c10a774 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/selfrecursive.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/selfrecursive.golden @@ -1,24 +1,12 @@ -(let - (rec) - (typebind (tyvardecl unit (type)) (all a (type) (fun unit unit))) - (let - (rec) - (datatypebind - (datatype - (tyvardecl Nat (type)) - - match_Nat - (vardecl Zero Nat) (vardecl Suc (fun Nat Nat)) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl r (con integer)) - [ [ (builtin addInteger) r ] (con integer 3) ] - ) - r - ) - ) -) \ No newline at end of file +letrec + unit-5 = all a-6. unit-5 -> unit-5 +in +letrec + data Nat-1 | match_Nat-2 where + Zero-3 : Nat-1 + Suc-4 : Nat-1 -> Nat-1 +in +letrec + ~r-0 : integer = addInteger r-0 3 +in +r-0 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/small.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/small.golden index 75b4f5911b1..3670d4516d0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/small.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/small.golden @@ -1,16 +1,12 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (let - (nonrec) - (termbind (strict) (vardecl false Bool) False) - (let (nonrec) (termbind (strict) (vardecl anotherFalse Bool) false) false) - ) -) \ No newline at end of file +let + data Bool-0 | match_Bool-1 where + True-2 : Bool-0 + False-3 : Bool-0 +in +let + !false-4 : Bool-0 = False-3 +in +let + !anotherFalse-5 : Bool-0 = false-4 +in +false-4 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/truenonrec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/truenonrec.golden index ed8d108f66e..ee5cd18e2eb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/truenonrec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RecSplit/truenonrec.golden @@ -1,20 +1,15 @@ -(let - (nonrec) - (typebind (tyvardecl unit (type)) (all a (type) (fun a a))) - (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - match_Bool - (vardecl True Bool) (vardecl False Bool) - ) - ) - (let - (nonrec) - (termbind (strict) (vardecl true Bool) True) - (let (nonrec) (termbind (strict) (vardecl false Bool) False) false) - ) - ) -) \ No newline at end of file +let + unit-6 = all a-7. a-7 -> a-7 +in +let + data Bool-0 | match_Bool-1 where + True-2 : Bool-0 + False-3 : Bool-0 +in +let + !true-5 : Bool-0 = True-2 +in +let + !false-4 : Bool-0 = False-3 +in +false-4 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataNonRec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataNonRec.golden index ba417512f99..0d27c1ad7c2 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataNonRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataNonRec.golden @@ -1,12 +1,5 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl D_5 (type)) - - match_D_7 - (vardecl C_6 (all D_8 (type) (fun D_8 D_5))) - ) - ) - (abs a_9 (type) (lam x_10 a_9 x_10)) -) \ No newline at end of file +let + data D-5 | match_D-7 where + C-6 : all D-8. D-8 -> D-5 +in +/\a-9 -> \(x-10 : a-9) -> x-10 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataRec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataRec.golden index 7371cf08d6a..e0994568f03 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/allShadowedDataRec.golden @@ -1,12 +1,5 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl D_5 (type)) - - match_D_7 - (vardecl C_6 (all D_8 (type) (fun D_8 D_5))) - ) - ) - (abs a_9 (type) (lam x_10 a_9 x_10)) -) \ No newline at end of file +letrec + data D-5 | match_D-7 where + C-6 : all D-8. D-8 -> D-5 +in +/\a-9 -> \(x-10 : a-9) -> x-10 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataNonRec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataNonRec.golden index 7a4cba7bcb8..13dfc28243d 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataNonRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataNonRec.golden @@ -1,12 +1,5 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl D_5 (fun (type) (type))) - (tyvardecl D_8 (type)) - match_D_7 - (vardecl C_6 [ D_5 D_8 ]) - ) - ) - (abs a_9 (type) (lam x_10 a_9 x_10)) -) \ No newline at end of file +let + data (D-5 :: * -> *) D-8 | match_D-7 where + C-6 : D-5 D-8 +in +/\a-9 -> \(x-10 : a-9) -> x-10 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataRec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataRec.golden index 89a7f4874f4..c6d70198444 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Rename/paramShadowedDataRec.golden @@ -1,12 +1,5 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl D_5 (fun (type) (type))) - (tyvardecl D_8 (type)) - match_D_7 - (vardecl C_6 [ D_5 D_8 ]) - ) - ) - (abs a_9 (type) (lam x_10 a_9 x_10)) -) \ No newline at end of file +letrec + data (D-5 :: * -> *) D-8 | match_D-7 where + C-6 : D-5 D-8 +in +/\a-9 -> \(x-10 : a-9) -> x-10 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/divideInt.pir.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/divideInt.pir.golden index ce5d787e5e6..770ef03caeb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/divideInt.pir.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/divideInt.pir.golden @@ -1,7 +1 @@ -[ - [ - (builtin divideInteger) - [ [ (builtin addInteger) (con integer 10) ] (con integer 2) ] - ] - (con integer 5) -] \ No newline at end of file +divideInteger (addInteger 10 2) 5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/equalsInt.pir.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/equalsInt.pir.golden index 87dbfd22e67..4913562233b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/equalsInt.pir.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/equalsInt.pir.golden @@ -1,4 +1 @@ -[ - [ (builtin equalsInteger) (con integer 5) ] - [ [ (builtin addInteger) (con integer 10) ] (con integer 2) ] -] \ No newline at end of file +equalsInteger 5 (addInteger 10 2) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/let.pir.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/let.pir.golden index b5baf093451..3a38972be12 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/let.pir.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/let.pir.golden @@ -1,8 +1,4 @@ -(let - (nonrec) - (termbind (strict) (vardecl x (con integer)) (error (con integer))) - [ - [ (builtin equalsInteger) (con integer 5) ] - [ [ (builtin addInteger) (con integer 10) ] x ] - ] -) \ No newline at end of file +let + !x-1 : integer = error {integer} +in +equalsInteger 5 (addInteger 10 x-1) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/multiplyInt.pir.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/multiplyInt.pir.golden index f28c8c1fe87..ce059876100 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/multiplyInt.pir.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/multiplyInt.pir.golden @@ -1,4 +1 @@ -[ - [ (builtin multiplyInteger) (con integer 5) ] - [ [ (builtin addInteger) (con integer 10) ] (con integer 2) ] -] \ No newline at end of file +multiplyInteger 5 (addInteger 10 2) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataFst.pir.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataFst.pir.golden index 7dad83c70a4..3294dc50348 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataFst.pir.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataFst.pir.golden @@ -1,41 +1,13 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyD_1099 (type)) - - MyD_match_1102 - (vardecl MyD_1100 (fun (con integer) MyD_1099)) - (vardecl MyD_1101 (fun (con bytestring) MyD_1099)) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl generated (con integer)) - [ - [ { (builtin trace) (con integer) } (con string "BEFORE") ] - (con integer 0) - ] - ) - (let - (nonrec) - (termbind - (strict) - (vardecl generated [ (con list) (con data) ]) - [ - [ { (builtin trace) [ (con list) (con data) ] } (con string "AFTER") ] - [ - [ - { (builtin mkCons) (con data) } - [ (builtin iData) (con integer 1) ] - ] - [ (builtin mkNilData) (con unit ()) ] - ] - ] - ) - generated - ) - ) -) \ No newline at end of file +let + data MyD_1099-4 | MyD_match_1102-7 where + MyD_1100-5 : integer -> MyD_1099-4 + MyD_1101-6 : bytestring -> MyD_1099-4 +in +let + !generated-8 : integer = trace {integer} "BEFORE" 0 +in +let + !generated-9 : list data + = trace {list data} "AFTER" (mkCons {data} (iData 1) (mkNilData ())) +in +generated-8 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataSnd.pir.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataSnd.pir.golden index a9d8728185b..2a3bb9ae705 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataSnd.pir.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/RewriteRules/unConstrConstrDataSnd.pir.golden @@ -1,16 +1,6 @@ -(let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyD_1099 (type)) - - MyD_match_1102 - (vardecl MyD_1100 (fun (con integer) MyD_1099)) - (vardecl MyD_1101 (fun (con bytestring) MyD_1099)) - ) - ) - [ - [ { (builtin mkCons) (con data) } [ (builtin iData) (con integer 1) ] ] - [ (builtin mkNilData) (con unit ()) ] - ] -) \ No newline at end of file +let + data MyD_1099-4 | MyD_match_1102-7 where + MyD_1100-5 : integer -> MyD_1099-4 + MyD_1101-6 : bytestring -> MyD_1099-4 +in +mkCons {data} (iData 1) (mkNilData ()) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictLetRec/strictLetRec.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictLetRec/strictLetRec.golden index 7d06755f761..50773e2cab0 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictLetRec/strictLetRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictLetRec/strictLetRec.golden @@ -1 +1,3 @@ -(\xxx -> 1) ((\s -> s s) (\s -> force trace "hello" (\z -> s s z))) \ No newline at end of file +(\xxx-1293 -> 1) + ((\s-1294 -> s-1294 s-1294) + (\s-1295 -> force trace "hello" (\z-1296 -> s-1295 s-1295 z-1296))) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/conapp.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/conapp.golden index 4723d56e64a..ea786a1602b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/conapp.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/conapp.golden @@ -1,21 +1,9 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - match_List - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl x [ List (con integer) ]) - [ [ { Cons (con integer) } (con integer 1) ] { Nil (con integer) } ] - ) - x - ) -) \ No newline at end of file +letrec + data (List-0 :: * -> *) a-1 | match_List-2 where + Nil-3 : List-0 a-1 + Cons-4 : a-1 -> List-0 a-1 -> List-0 a-1 +in +let + !x-5 : List-0 integer = Cons-4 {integer} 1 (Nil-3 {integer}) +in +x-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/impure1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/impure1.golden index cecea5f7ea8..2ac482b3cc8 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/impure1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/impure1.golden @@ -1,10 +1,5 @@ -(let - (nonrec) - (termbind - (strict) - (vardecl inc (fun (con integer) (con integer))) - (lam x (con integer) [ [ (builtin addInteger) x ] (con integer 1) ]) - ) - (termbind (nonstrict) (vardecl x (con integer)) [ inc (con integer 1) ]) - x -) \ No newline at end of file +let + !inc-0 : integer -> integer = \(x-1 : integer) -> addInteger x-1 1 + ~x-1 : integer = inc-0 1 +in +x-1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/pure1.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/pure1.golden index 6eadfc97a93..5211f3365ed 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/pure1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/pure1.golden @@ -1 +1,4 @@ -(let (nonrec) (termbind (strict) (vardecl x (con integer)) (con integer 1)) x) \ No newline at end of file +let + !x-0 : integer = 1 +in +x-0 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/unused.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/unused.golden index f997c97a207..48bf2c33b5a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/unused.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/StrictifyBindings/unused.golden @@ -1,5 +1,4 @@ -(let - (nonrec) - (termbind (strict) (vardecl x (con integer)) (con integer 1)) - (con integer 1) -) \ No newline at end of file +let + !x-0 : integer = 1 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/errorBinding.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/errorBinding.golden index a2b6eb67265..8683221f7c5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/errorBinding.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/errorBinding.golden @@ -1,6 +1,8 @@ -(let - (rec) - (termbind (nonstrict) (vardecl x (con integer)) (error (con integer))) - (termbind (nonstrict) (vardecl y (con integer)) x) - (let (nonrec) (termbind (strict) (vardecl x (con integer)) x) (con integer 1)) -) \ No newline at end of file +letrec + ~x-0 : integer = error {integer} + ~y-1 : integer = x-0 +in +let + !x-0 : integer = x-0 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFold.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFold.golden index 5490f98189c..4542aee6045 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFold.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFold.golden @@ -1,74 +1,22 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - match_List - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl - foldl - (all - a - (type) - (all b (type) (fun (fun b (fun a b)) (fun b (fun [ List a ] b)))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun b (fun a b)) - (lam - acc - b - (lam - lst - [ List a ] - [ - [ { [ { match_List a } lst ] b } acc ] - (lam - x - a - (lam - xs - [ List a ] - [ [ [ { { foldl a } b } f ] [ [ f acc ] x ] ] xs ] - ) - ) - ] - ) - ) - ) - ) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl - foldl - (all - a - (type) - (all b (type) (fun (fun b (fun a b)) (fun b (fun [ List a ] b)))) - ) - ) - foldl - ) - foldl - ) - ) -) \ No newline at end of file +letrec + data (List-0 :: * -> *) a-1 | match_List-2 where + Nil-3 : List-0 a-1 + Cons-4 : a-1 -> List-0 a-1 -> List-0 a-1 +in +letrec + ~foldl-5 : all a-1 b-6. (b-6 -> a-1 -> b-6) -> b-6 -> List-0 a-1 -> b-6 + = /\a-1 b-6 -> + \(f-7 : b-6 -> a-1 -> b-6) (acc-8 : b-6) (lst-9 : List-0 a-1) -> + match_List-2 + {a-1} + lst-9 + {b-6} + acc-8 + (\(x-10 : a-1) (xs-11 : List-0 a-1) -> + foldl-5 {a-1} {b-6} f-7 (f-7 acc-8 x-10) xs-11) +in +let + !foldl-5 : all a-1 b-6. (b-6 -> a-1 -> b-6) -> b-6 -> List-0 a-1 -> b-6 + = foldl-5 +in +foldl-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFoldTrace.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFoldTrace.golden index 756d649f18e..df08f3141c8 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFoldTrace.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/listFoldTrace.golden @@ -1,77 +1,25 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - match_List - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl - foldl - (all - a - (type) - (all b (type) (fun (fun b (fun a b)) (fun b (fun [ List a ] b)))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun b (fun a b)) - (lam - acc - b - (lam - lst - [ List a ] - [ - [ { [ { match_List a } lst ] b } acc ] - (lam - x - a - (lam - xs - [ List a ] - [ - [ { (builtin trace) b } (con string "hello") ] - [ [ [ { { foldl a } b } f ] [ [ f acc ] x ] ] xs ] - ] - ) - ) - ] - ) - ) - ) - ) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl - foldl - (all - a - (type) - (all b (type) (fun (fun b (fun a b)) (fun b (fun [ List a ] b)))) - ) - ) - foldl - ) - foldl - ) - ) -) \ No newline at end of file +letrec + data (List-0 :: * -> *) a-1 | match_List-2 where + Nil-3 : List-0 a-1 + Cons-4 : a-1 -> List-0 a-1 -> List-0 a-1 +in +letrec + ~foldl-5 : all a-1 b-6. (b-6 -> a-1 -> b-6) -> b-6 -> List-0 a-1 -> b-6 + = /\a-1 b-6 -> + \(f-7 : b-6 -> a-1 -> b-6) (acc-8 : b-6) (lst-9 : List-0 a-1) -> + match_List-2 + {a-1} + lst-9 + {b-6} + acc-8 + (\(x-10 : a-1) (xs-11 : List-0 a-1) -> + trace + {b-6} + "hello" + (foldl-5 {a-1} {b-6} f-7 (f-7 acc-8 x-10) xs-11)) +in +let + !foldl-5 : all a-1 b-6. (b-6 -> a-1 -> b-6) -> b-6 -> List-0 a-1 -> b-6 + = foldl-5 +in +foldl-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/monoMap.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/monoMap.golden index 56054fc3165..58923a38bdc 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/monoMap.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/monoMap.golden @@ -1,49 +1,17 @@ -(let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - match_List - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (rec) - (termbind - (strict) - (vardecl - map - (fun - (fun (con integer) (con integer)) - (fun [ List (con integer) ] [ List (con integer) ]) - ) - ) - (lam - f - (fun (con integer) (con integer)) - (lam - lst - [ List (con integer) ] - [ - [ - { [ { match_List (con integer) } lst ] [ List (con integer) ] } - { Nil (con integer) } - ] - (lam - x - (con integer) - (lam - xs - [ List (con integer) ] - [ [ { Cons (con integer) } [ f x ] ] [ [ map f ] xs ] ] - ) - ) - ] - ) - ) - ) - map - ) -) \ No newline at end of file +letrec + data (List-0 :: * -> *) a-1 | match_List-2 where + Nil-3 : List-0 a-1 + Cons-4 : a-1 -> List-0 a-1 -> List-0 a-1 +in +letrec + !map-5 : (integer -> integer) -> List-0 integer -> List-0 integer + = \(f-6 : integer -> integer) (lst-7 : List-0 integer) -> + match_List-2 + {integer} + lst-7 + {List-0 integer} + (Nil-3 {integer}) + (\(x-8 : integer) (xs-9 : List-0 integer) -> + Cons-4 {integer} (f-6 x-8) (map-5 f-6 xs-9)) +in +map-5 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/mutuallyRecursiveValues.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/mutuallyRecursiveValues.golden index 2fdd30b32d8..38b83a4bf07 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/mutuallyRecursiveValues.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/mutuallyRecursiveValues.golden @@ -1,15 +1,9 @@ -(let - (rec) - (termbind (nonstrict) (vardecl x (all a (type) (fun a a))) y) - (termbind - (nonstrict) - (vardecl y (all a (type) (fun a a))) - (abs a (type) (lam z a [ { x a } z ])) - ) - (let - (nonrec) - (termbind (strict) (vardecl x (all a (type) (fun a a))) x) - (termbind (strict) (vardecl y (all a (type) (fun a a))) y) - x - ) -) \ No newline at end of file +letrec + ~x-0 : all a-1. a-1 -> a-1 = y-2 + ~y-2 : all a-1. a-1 -> a-1 = /\a-1 -> \(z-3 : a-1) -> x-0 {a-1} z-3 +in +let + !x-0 : all a-1. a-1 -> a-1 = x-0 + !y-2 : all a-1. a-1 -> a-1 = y-2 +in +x-0 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveEffectOrder.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveEffectOrder.golden index c36ab2625c4..b49e5abed09 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveEffectOrder.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveEffectOrder.golden @@ -1,21 +1,13 @@ -(let - (rec) - (termbind (nonstrict) (vardecl x (con integer)) (error (con integer))) - (termbind - (nonstrict) - (vardecl y (fun (con integer) (con integer))) - [ - [ - { (builtin trace) (fun (con integer) (con integer)) } - (con string "SHOULD NOT BE PRINTED") - ] - (lam z (con integer) z) - ] - ) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (termbind (strict) (vardecl y (fun (con integer) (con integer))) y) - (con integer 1) - ) -) \ No newline at end of file +letrec + ~x-0 : integer = error {integer} + ~y-1 : integer -> integer + = trace + {integer -> integer} + "SHOULD NOT BE PRINTED" + (\(z-2 : integer) -> z-2) +in +let + !x-0 : integer = x-0 + !y-1 : integer -> integer = y-1 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveStrictness.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveStrictness.golden index 51c7a166f3e..d36c1f84483 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveStrictness.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/ThunkRecursions/preserveStrictness.golden @@ -1,11 +1,9 @@ -(let - (rec) - (termbind (nonstrict) (vardecl x (con integer)) (con integer 1)) - (termbind (nonstrict) (vardecl y (con integer)) (con integer 2)) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (termbind (strict) (vardecl y (con integer)) y) - (con integer 1) - ) -) \ No newline at end of file +letrec + ~x-0 : integer = 1 + ~y-1 : integer = 2 +in +let + !x-0 : integer = x-0 + !y-1 : integer = y-1 +in +1 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/Transform/Unwrap/unwrapWrap.golden b/plutus-core/plutus-ir/test/PlutusIR/Transform/Unwrap/unwrapWrap.golden index 24aebcf99ce..6201c874313 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/Transform/Unwrap/unwrapWrap.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/Transform/Unwrap/unwrapWrap.golden @@ -1,34 +1,10 @@ -(abs - a - (type) - (abs - r - (type) - (lam - z - r - (lam - f - (fun - a - (fun - (ifix - (lam - list - (fun (type) (type)) - (lam - a - (type) - (all r (type) (fun r (fun (fun a (fun [ list a ] r)) r))) - ) - ) - a - ) - r - ) - ) - z - ) - ) - ) -) \ No newline at end of file +/\a-0 r-2 -> + \(z-3 : r-2) + (f-4 : + a-0 -> + ifix + (\(list-1 :: * -> *) a-0 -> + all r-2. r-2 -> (a-0 -> list-1 a-0 -> r-2) -> r-2) + a-0 -> + r-2) -> + z-3 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/even3Eval.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/even3Eval.golden index e522d1df3ba..7decd544a4e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/even3Eval.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/even3Eval.golden @@ -1 +1 @@ -Bool_17 \ No newline at end of file +Bool-17 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/ifError.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/ifError.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/ifError.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/ifError.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/letInLet.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/letInLet.golden index 6eca618c961..4941d69ff8b 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/letInLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/letInLet.golden @@ -1 +1 @@ -(all a_11 (type) (fun a_11 a_11)) \ No newline at end of file +all a-11. a-11 -> a-11 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/listMatch.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/listMatch.golden index 5ce0a6292ed..4ea3c545cff 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/listMatch.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/listMatch.golden @@ -1 +1 @@ -(fun (con integer) (all a_42 (type) (fun a_42 a_42))) \ No newline at end of file +integer -> (all a-42. a-42 -> a-42) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/maybe.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/maybe.golden index c8d808d2857..fdb721b5c2e 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/maybe.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/maybe.golden @@ -1 +1 @@ -(fun (con integer) [ Maybe_9 (all a_25 (type) (fun a_25 a_25)) ]) \ No newline at end of file +integer -> Maybe-9 (all a-25. a-25 -> a-25) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveTypes.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveTypes.golden index 9f5a9c503b2..4356d89a614 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveTypes.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveTypes.golden @@ -1 +1 @@ -[ Forest_11 (all a_34 (type) (fun a_34 a_34)) ] \ No newline at end of file +Forest-11 (all a-34. a-34 -> a-34) \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveValues.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveValues.golden index c0626874c74..40826269b6a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveValues.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/mutuallyRecursiveValues.golden @@ -1 +1 @@ -(all a_12 (type) (fun a_12 a_12)) \ No newline at end of file +all a-12. a-12 -> a-12 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonSelfRecursive.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonSelfRecursive.golden index 40e6cd03780..f26dde336d5 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonSelfRecursive.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonSelfRecursive.golden @@ -1,2 +1,2 @@ Error during PIR typechecking: -Free type variable at nonSelfRecursive:8:57-8:60 : List \ No newline at end of file +Free type variable at nonSelfRecursive:8:57-8:60 : List-0 \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec1.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec1.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec1.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec2.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec2.golden index 63842ebe8d4..c16d3c3ff73 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec2.golden @@ -1 +1 @@ -(fun (con integer) (con integer)) \ No newline at end of file +integer -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec3.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec3.golden index 63842ebe8d4..c16d3c3ff73 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec3.golden @@ -1 +1 @@ -(fun (con integer) (con integer)) \ No newline at end of file +integer -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec4.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec4.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec4.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec4.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec6.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec6.golden index 63842ebe8d4..c16d3c3ff73 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec6.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec6.golden @@ -1 +1 @@ -(fun (con integer) (con integer)) \ No newline at end of file +integer -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec7.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec7.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec7.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec7.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec8.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec8.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec8.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrec8.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToNonrec.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToNonrec.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToNonrec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToNonrec.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToRec.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToRec.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/nonrecToRec.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/oldLength.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/oldLength.golden index f66430cf089..24ce391cbfb 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/oldLength.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/oldLength.golden @@ -1 +1 @@ -(fun (all a_6 (type) (fun a_6 (fun a_6 a_6))) (con integer)) \ No newline at end of file +(all a-6. a-6 -> a-6 -> a-6) -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec1.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec1.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec1.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec1.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec2.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec2.golden index 63842ebe8d4..c16d3c3ff73 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec2.golden @@ -1 +1 @@ -(fun (con integer) (con integer)) \ No newline at end of file +integer -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec3.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec3.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec3.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec4.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec4.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec4.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/rec4.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/sameNameDifferentEnv.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/sameNameDifferentEnv.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/sameNameDifferentEnv.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/sameNameDifferentEnv.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue2.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue2.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue2.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue2.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue3.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue3.golden index 63842ebe8d4..c16d3c3ff73 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue3.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValue3.golden @@ -1 +1 @@ -(fun (con integer) (con integer)) \ No newline at end of file +integer -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValueDeep.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValueDeep.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValueDeep.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictNonValueDeep.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValue.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValue.golden index 63842ebe8d4..c16d3c3ff73 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValue.golden @@ -1 +1 @@ -(fun (con integer) (con integer)) \ No newline at end of file +integer -> integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueNonValue.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueNonValue.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueNonValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueNonValue.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueValue.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueValue.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueValue.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/strictValueValue.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLet.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLet.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLet.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLet.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetRec.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetRec.golden index a1674e0be4b..c0740e5a58a 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetRec.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetRec.golden @@ -1 +1 @@ -(con integer) \ No newline at end of file +integer \ No newline at end of file diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetWrong.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetWrong.golden index 415f269ca8d..0cf12927b2c 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetWrong.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/typeLetWrong.golden @@ -1,7 +1,7 @@ Error during PIR typechecking: Type mismatch at typeLetWrong:4:3-4:33 Expected a term of type - 'a' + 'a-2' But found one of type '(con integer)' Namely, diff --git a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/wrongDataConstrReturnType.golden b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/wrongDataConstrReturnType.golden index 7efa510bbb8..c03bfdbbf82 100644 --- a/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/wrongDataConstrReturnType.golden +++ b/plutus-core/plutus-ir/test/PlutusIR/TypeCheck/wrongDataConstrReturnType.golden @@ -1,3 +1,3 @@ Error during PIR typechecking: The result-type of a dataconstructor is malformed at location wrongDataConstrReturnType:4:5-10:5 -The expected result-type is: [ Maybe a ] \ No newline at end of file +The expected result-type is: [ Maybe-5 a-9 ] \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letFun.golden b/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letFun.golden index d67be8cc736..8701a7d17ce 100644 --- a/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letFun.golden +++ b/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letFun.golden @@ -1,7 +1,7 @@ -pure work-free: (\n -> n 1 1) -pure work-free: (addInteger) -pure maybe work?: ((\n -> n 1 1) addInteger) -pure work-free: n +pure work-free: \n-0 -> n-0 1 1 +pure work-free: addInteger +pure maybe work?: (\n-0 -> n-0 1 1) addInteger +pure work-free: n-0 pure work-free: 1 -pure maybe work?: (n 1) +pure maybe work?: n-0 1 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letImpure.golden b/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letImpure.golden index 549116771e4..799dbf110ef 100644 --- a/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letImpure.golden +++ b/plutus-core/untyped-plutus-core/test/Analysis/evalOrder/letImpure.golden @@ -1,5 +1,5 @@ -pure work-free: (\n -> n 1 1) -pure work-free: m +pure work-free: \n-0 -> n-0 1 1 +pure work-free: m-1 pure work-free: 1 -pure maybe work?: (m 1) +pure maybe work?: m-1 1 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okConst.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okConst.uplc.golden index f5999fde189..b1099958fe3 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okConst.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okConst.uplc.golden @@ -1,3 +1 @@ -(Right (program - 1.1.0 [ [ (lam i_0 (lam i_1 i_0)) (con bool True) ] (lam i_2 i_2) ] -)) \ No newline at end of file +(Right (program 1.1.0 [ [ (lam i (lam i i)) (con bool True) ] (lam i i) ])) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep0.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep0.uplc.golden index 0167e3691d4..142ed893d7d 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep0.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep0.uplc.golden @@ -1,15 +1,6 @@ (Right (program 1.1.0 (lam - i_0 - (lam - i_1 - (lam - i_2 - (lam - i_3 (lam i_4 (lam i_5 (lam i_6 (lam i_7 (lam i_8 (lam i_9 i_0)))))) - ) - ) - ) + i (lam i (lam i (lam i (lam i (lam i (lam i (lam i (lam i (lam i i))))))))) ) )) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep99.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep99.uplc.golden index 0167e3691d4..142ed893d7d 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep99.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okDeep99.uplc.golden @@ -1,15 +1,6 @@ (Right (program 1.1.0 (lam - i_0 - (lam - i_1 - (lam - i_2 - (lam - i_3 (lam i_4 (lam i_5 (lam i_6 (lam i_7 (lam i_8 (lam i_9 i_0)))))) - ) - ) - ) + i (lam i (lam i (lam i (lam i (lam i (lam i (lam i (lam i (lam i i))))))))) ) )) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId0.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId0.uplc.golden index a7f77a006c8..0665c3a3849 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId0.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId0.uplc.golden @@ -1 +1 @@ -(Right (program 1.1.0 (lam i_0 i_0))) \ No newline at end of file +(Right (program 1.1.0 (lam i i))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId99.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId99.uplc.golden index a7f77a006c8..0665c3a3849 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId99.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okId99.uplc.golden @@ -1 +1 @@ -(Right (program 1.1.0 (lam i_0 i_0))) \ No newline at end of file +(Right (program 1.1.0 (lam i i))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix1.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix1.uplc.golden index 8c00e7c4b70..5d0a43381ff 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix1.uplc.golden @@ -1,42 +1,34 @@ (Right (program 1.1.0 (lam - i_0 + i (lam - i_1 + i (lam - i_2 + i (lam - i_3 + i (lam - i_4 + i (lam - i_5 + i (lam - i_6 + i (lam - i_7 + i (lam - i_8 + i (lam - i_9 + i (lam - i_10 + i (lam - i_11 + i (lam - i_12 + i (lam - i_13 - (lam - i_14 - (lam - i_15 - (lam - i_16 (lam i_17 (lam i_18 (lam i_19 i_0))) - ) - ) - ) + i + (lam i (lam i (lam i (lam i (lam i (lam i i)))))) ) ) ) diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix2.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix2.uplc.golden index 8c00e7c4b70..5d0a43381ff 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Default/okMix2.uplc.golden @@ -1,42 +1,34 @@ (Right (program 1.1.0 (lam - i_0 + i (lam - i_1 + i (lam - i_2 + i (lam - i_3 + i (lam - i_4 + i (lam - i_5 + i (lam - i_6 + i (lam - i_7 + i (lam - i_8 + i (lam - i_9 + i (lam - i_10 + i (lam - i_11 + i (lam - i_12 + i (lam - i_13 - (lam - i_14 - (lam - i_15 - (lam - i_16 (lam i_17 (lam i_18 (lam i_19 i_0))) - ) - ) - ) + i + (lam i (lam i (lam i (lam i (lam i (lam i i)))))) ) ) ) diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceConst.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceConst.uplc.golden index f862ebf0901..b1099958fe3 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceConst.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceConst.uplc.golden @@ -1,3 +1 @@ -(Right (program - 1.1.0 [ [ (lam i_0 (lam i_1 i_0)) (con bool True) ] (lam i_2 i_3) ] -)) \ No newline at end of file +(Right (program 1.1.0 [ [ (lam i (lam i i)) (con bool True) ] (lam i i) ])) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceDeep.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceDeep.uplc.golden index 66d0e7761ba..d0dadd981fb 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceDeep.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceDeep.uplc.golden @@ -1 +1 @@ -(Right (program 1.1.0 (lam i_0 (lam i_1 (lam i_2 (lam i_3 (lam i_4 i_5))))))) \ No newline at end of file +(Right (program 1.1.0 (lam i (lam i (lam i (lam i (lam i i))))))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceElaborate.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceElaborate.uplc.golden index ddf25db5e64..d99651f8f8b 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceElaborate.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceElaborate.uplc.golden @@ -1,3 +1 @@ -(Right (program - 1.1.0 (lam i_0 [ [ [ i_1 i_0 ] i_2 ] (lam i_3 [ [ [ i_3 i_4 ] i_1 ] i_2 ]) ]) -)) \ No newline at end of file +(Right (program 1.1.0 (lam i [ [ [ i i ] i ] (lam i [ [ [ i i ] i ] i ]) ]))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceTop.uplc.golden b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceTop.uplc.golden index eba26a51d89..da087a892a0 100644 --- a/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceTop.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/DeBruijn/Golden/Graceful/graceTop.uplc.golden @@ -1 +1 @@ -(Right (program 1.1.0 (delay i_0))) \ No newline at end of file +(Right (program 1.1.0 (delay i))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.plc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.plc.golden index 9d17ef9a5a4..9a0fbbf5ad2 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.plc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.plc.golden @@ -1 +1 @@ -(Right (lam j_1 (con integer 1))) \ No newline at end of file +(Right (lam j (con integer 1))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.uplc.golden index c37c65ee4b3..9a0fbbf5ad2 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/closure.uplc.golden @@ -1 +1 @@ -(Right (lam j_0 (con integer 1))) \ No newline at end of file +(Right (lam j (con integer 1))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/ite.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/ite.type.golden index 4a34bc25070..69bf353e2df 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/ite.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/ite.type.golden @@ -1 +1 @@ -(Right (all a_2 (type) (fun (con bool) (fun a_2 (fun a_2 a_2))))) \ No newline at end of file +(Right (all a (type) (fun (con bool) (fun a (fun a a))))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKind.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKind.type.golden index 6634145229d..cbc76b82358 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKind.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKind.type.golden @@ -4,4 +4,4 @@ Expected a type of kind But found one of kind '(fun (type) (type))' Namely, - '(lam a_1 (type) (fun a_1 a_1))') \ No newline at end of file + '(lam a (type) (fun a a))') \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindFullyApplied.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindFullyApplied.type.golden index 6634145229d..cbc76b82358 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindFullyApplied.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindFullyApplied.type.golden @@ -4,4 +4,4 @@ Expected a type of kind But found one of kind '(fun (type) (type))' Namely, - '(lam a_1 (type) (fun a_1 a_1))') \ No newline at end of file + '(lam a (type) (fun a a))') \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindWithCond.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindWithCond.type.golden index 6634145229d..cbc76b82358 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindWithCond.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteAtHigherKindWithCond.type.golden @@ -4,4 +4,4 @@ Expected a type of kind But found one of kind '(fun (type) (type))' Namely, - '(lam a_1 (type) (fun a_1 a_1))') \ No newline at end of file + '(lam a (type) (fun a a))') \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedFullyApplied.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedFullyApplied.type.golden index d82bc2d1e60..a21a8913ca4 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedFullyApplied.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedFullyApplied.type.golden @@ -2,6 +2,6 @@ Expected a term of type '(fun k l)' for some 'k' and 'l' But found one of type - '(all a_2 (type) (fun (con bool) (fun a_2 (fun a_2 a_2))))' + '(all a (type) (fun (con bool) (fun a (fun a a))))' Namely, '(builtin ifThenElse)') \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedWithCond.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedWithCond.type.golden index d82bc2d1e60..a21a8913ca4 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedWithCond.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/iteUninstantiatedWithCond.type.golden @@ -2,6 +2,6 @@ Expected a term of type '(fun k l)' for some 'k' and 'l' But found one of type - '(all a_2 (type) (fun (con bool) (fun a_2 (fun a_2 a_2))))' + '(all a (type) (fun (con bool) (fun a (fun a a))))' Namely, '(builtin ifThenElse)') \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/polyError.type.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/polyError.type.golden index 25bc5d87a71..be5cc9e3fb3 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Golden/polyError.type.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Golden/polyError.type.golden @@ -1 +1 @@ -(Right (all a_1 (type) a_1)) \ No newline at end of file +(Right (all a (type) a)) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/0.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/0.uplc.golden index 9f4e4813c90..fdbc1b65ee8 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/0.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/0.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 0 | mem: 0}) | BStep BVar causes ({cpu: 2176000 | mem: 13600}) | BStep BLamAbs causes ({cpu: 1472000 | mem: 9200}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/3.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/3.uplc.golden index c90e1999121..c1da85de793 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/3.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 0 | mem: 0}) | BStep BVar causes ({cpu: 2176000 | mem: 13600}) | BStep BLamAbs causes ({cpu: 1472000 | mem: 9200}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/6.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/6.uplc.golden index 36c0cb0fc75..cb8c5a1da45 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/6.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/6.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 0 | mem: 0}) | BStep BVar causes ({cpu: 2176000 | mem: 13600}) | BStep BLamAbs causes ({cpu: 1472000 | mem: 9200}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/9.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/9.uplc.golden index f69f6bbde9c..95ae1902625 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/9.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IdNat/9.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 0 | mem: 0}) | BStep BVar causes ({cpu: 2176000 | mem: 13600}) | BStep BLamAbs causes ({cpu: 1472000 | mem: 9200}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/0.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/0.uplc.golden index 9f4e4813c90..fdbc1b65ee8 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/0.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/0.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 0 | mem: 0}) | BStep BVar causes ({cpu: 2176000 | mem: 13600}) | BStep BLamAbs causes ({cpu: 1472000 | mem: 9200}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/1.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/1.uplc.golden index 62195414fac..83bb9621f8e 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/1.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 16000 | mem: 100}) | BStep BVar causes ({cpu: 2240000 | mem: 14000}) | BStep BLamAbs causes ({cpu: 1632000 | mem: 10200}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/2.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/2.uplc.golden index 3f4f55a1f16..daa53e2f4a2 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/2.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 32000 | mem: 200}) | BStep BVar causes ({cpu: 2256000 | mem: 14100}) | BStep BLamAbs causes ({cpu: 1664000 | mem: 10400}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/3.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/3.uplc.golden index 69feff17298..6de901bc1bb 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/3.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 48000 | mem: 300}) | BStep BVar causes ({cpu: 2272000 | mem: 14200}) | BStep BLamAbs causes ({cpu: 1696000 | mem: 10600}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/4.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/4.uplc.golden index 387b492343b..1be22bdf093 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/4.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/4.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 64000 | mem: 400}) | BStep BVar causes ({cpu: 2288000 | mem: 14300}) | BStep BLamAbs causes ({cpu: 1728000 | mem: 10800}) diff --git a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/5.uplc.golden b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/5.uplc.golden index 5c1148a0a87..e8843cd922b 100644 --- a/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/5.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Evaluation/Machines/Budget/IfThenElse/5.uplc.golden @@ -1,47 +1,47 @@ -( (Right (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - f - (delay - (\z - f -> - z))))))))))))))))))))))) +( (Right delay + (\z-0 + f-1 -> + f-1 + (delay + (\z-2 + f-3 -> + f-3 + (delay + (\z-4 + f-5 -> + f-5 + (delay + (\z-6 + f-7 -> + f-7 + (delay + (\z-8 + f-9 -> + f-9 + (delay + (\z-10 + f-11 -> + f-11 + (delay + (\z-12 + f-13 -> + f-13 + (delay + (\z-14 + f-15 -> + f-15 + (delay + (\z-16 + f-17 -> + f-17 + (delay + (\z-18 + f-19 -> + f-19 + (delay + (\z-20 + f-21 -> + z-20)))))))))))))))))))))) , ({ tally: ({BStep BConst causes ({cpu: 80000 | mem: 500}) | BStep BVar causes ({cpu: 2304000 | mem: 14400}) | BStep BLamAbs causes ({cpu: 1760000 | mem: 11000}) diff --git a/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/1.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/1.uplc.golden index 99e77d62902..9cf88689c14 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/1.uplc.golden @@ -1,7 +1,7 @@ (force [ [ - [ (force (builtin ifThenElse)) b_0 ] + [ (force (builtin ifThenElse)) b ] (delay (case (constr 0) (con integer 1) (con integer 2))) ] (delay (case (constr 1) (con integer 1) (con integer 2))) diff --git a/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/2.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/2.uplc.golden index c73165d882d..d8da14e00ad 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/2.uplc.golden @@ -1,5 +1,5 @@ (case - [ [ [ (force (builtin ifThenElse)) b_0 ] t_1 ] (constr 1) ] + [ [ [ (force (builtin ifThenElse)) b ] t ] (constr 1) ] (con integer 1) (con integer 2) ) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/3.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/3.uplc.golden index 74f9f77952f..9e7f8874321 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/CaseOfCase/3.uplc.golden @@ -1,9 +1,9 @@ (force [ [ - [ (force (builtin ifThenElse)) b_0 ] - (delay (case (constr 0 x_1 xs_2) f_3 (con integer 2))) + [ (force (builtin ifThenElse)) b ] + (delay (case (constr 0 x xs) f (con integer 2))) ] - (delay (case (constr 1) f_3 (con integer 2))) + (delay (case (constr 1) f (con integer 2))) ] ) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/callsiteInline.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/callsiteInline.uplc.golden index b7c97937ae3..c762b72fa51 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/callsiteInline.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/callsiteInline.uplc.golden @@ -1 +1 @@ -((\a_5 -> f_1 (g_2 1 0) (a_5 2)) (\x_6 y_7 -> g_2 y_7 x_6)) \ No newline at end of file +(\a -> f (g 1 0) (a 2)) (\x y -> g y x) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/cse1.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/cse1.uplc.golden index 8cb90c248e1..d7e4947f132 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/cse1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/cse1.uplc.golden @@ -1,12 +1,12 @@ -(\x_6 y_7 -> - (\cse_8 -> - (\cse_9 -> - addInteger - cse_9 - (case - y_7 - [ (addInteger cse_9 (addInteger 3 x_6)) - , (addInteger cse_8 (addInteger 3 x_6)) - , (addInteger 4 x_6) ])) - (addInteger 1 cse_8)) - (addInteger 2 x_6)) \ No newline at end of file +\x y -> + (\cse -> + (\cse -> + addInteger + cse + (case + y + [ (addInteger cse (addInteger 3 x)) + , (addInteger cse (addInteger 3 x)) + , (addInteger 4 x) ])) + (addInteger 1 cse)) + (addInteger 2 x) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/cse2.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/cse2.uplc.golden index b7ad3cd4538..8fe2274bd5b 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/cse2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/cse2.uplc.golden @@ -1,6 +1,6 @@ -(force - (force - (ifThenElse - (lessThanInteger 0 0) - (delay ((\cse_2 -> addInteger cse_2 cse_2) (addInteger 1 2))) - (delay (addInteger 1 2))))) \ No newline at end of file +force + (force + (ifThenElse + (lessThanInteger 0 0) + (delay ((\cse -> addInteger cse cse) (addInteger 1 2))) + (delay (addInteger 1 2)))) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/cse3.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/cse3.uplc.golden index 28f7f02ad95..f85dabf4e25 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/cse3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/cse3.uplc.golden @@ -1,6 +1,4 @@ -(\x_8 -> - (\cse_9 -> - f_3 - (addInteger 1 (addInteger cse_9 cse_9)) - (addInteger 2 (addInteger cse_9 cse_9))) - (addInteger 0 x_8)) \ No newline at end of file +\x -> + (\cse -> + f (addInteger 1 (addInteger cse cse)) (addInteger 2 (addInteger cse cse))) + (addInteger 0 x) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/cseExpensive.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/cseExpensive.uplc.golden index f2db2f58a9d..c098977a6ad 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/cseExpensive.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/cseExpensive.uplc.golden @@ -1,1171 +1,1169 @@ -((\cse_402 -> - (\cse_403 -> - (\cse_404 -> - (\cse_405 -> - (\cse_406 -> - (\cse_407 -> - (\cse_408 -> - (\cse_409 -> - (\cse_410 -> - (\cse_411 -> - (\cse_412 -> - (\cse_413 -> - (\cse_414 -> - (\cse_415 -> - (\cse_416 -> - (\cse_417 -> - (\cse_418 -> - (\cse_419 -> - (\cse_420 -> - (\cse_421 -> - (\cse_422 -> - (\cse_423 -> - (\cse_424 -> - (\cse_425 -> - (\cse_426 -> - (\cse_427 -> - (\cse_428 -> - (\cse_429 -> - (\cse_430 -> - (\cse_431 -> - (\cse_432 -> - (\cse_433 -> - (\cse_434 -> - (\cse_435 -> - (\cse_436 -> - (\cse_437 -> - (\cse_438 -> - (\cse_439 -> - (\cse_440 -> - (\cse_441 -> - (\cse_442 -> - (\cse_443 -> - (\cse_444 -> - (\cse_445 -> - (\cse_446 -> - (\cse_447 -> - (\cse_448 -> - (\cse_449 -> - (\cse_450 -> - (\cse_451 -> - (\cse_452 -> - (\cse_453 -> - (\cse_454 -> - (\cse_455 -> - (\cse_456 -> - (\cse_457 -> - (\cse_458 -> - (\cse_459 -> - (\cse_460 -> - (\cse_461 -> - (\cse_462 -> - (\cse_463 -> - (\cse_464 -> - (\cse_465 -> - (\cse_466 -> - (\cse_467 -> - (\cse_468 -> - (\cse_469 -> - (\cse_470 -> - (\cse_471 -> - (\cse_472 -> - (\cse_473 -> - (\cse_474 -> - (\cse_475 -> - (\cse_476 -> - (\cse_477 -> - (\cse_478 -> - (\cse_479 -> - (\cse_480 -> - (\cse_481 -> - (\cse_482 -> - (\cse_483 -> - (\cse_484 -> - (\cse_485 -> - (\cse_486 -> - (\cse_487 -> - (\cse_488 -> - (\cse_489 -> - (\cse_490 -> - (\cse_491 -> - (\cse_492 -> - (\cse_493 -> - (\cse_494 -> - (\cse_495 -> - (\cse_496 -> - (\cse_497 -> - (\cse_498 -> - (\cse_499 -> - (\cse_500 -> - (\cse_501 -> - (\cse_502 -> - (\cse_503 -> - (\cse_504 -> - (\cse_505 -> - (\cse_506 -> - (\cse_507 -> - (\cse_508 -> - (\cse_509 -> - (\cse_510 -> - (\cse_511 -> - (\cse_512 -> - (\cse_513 -> - (\cse_514 -> - (\cse_515 -> - (\cse_516 -> - (\cse_517 -> - (\cse_518 -> - (\cse_519 -> - (\cse_520 -> - (\cse_521 -> - (\cse_522 -> - (\cse_523 -> - (\cse_524 -> - (\cse_525 -> - (\cse_526 -> - (\cse_527 -> - (\cse_528 -> - (\cse_529 -> - (\cse_530 -> - (\cse_531 -> - (\cse_532 -> - (\cse_533 -> - (\cse_534 -> - (\cse_535 -> - (\cse_536 -> - (\cse_537 -> - (\cse_538 -> - (\cse_539 -> - (\cse_540 -> - (\cse_541 -> - (\cse_542 -> - (\cse_543 -> - (\cse_544 -> - (\cse_545 -> - (\cse_546 -> - (\cse_547 -> - (\cse_548 -> - (\cse_549 -> - (\cse_550 -> - (\cse_551 -> - (\cse_552 -> - (\cse_553 -> - (\cse_554 -> - (\cse_555 -> - (\cse_556 -> - (\cse_557 -> - (\cse_558 -> - (\cse_559 -> - (\cse_560 -> - (\cse_561 -> - (\cse_562 -> - (\cse_563 -> - (\cse_564 -> - (\cse_565 -> - (\cse_566 -> - (\cse_567 -> - (\cse_568 -> - (\cse_569 -> - (\cse_570 -> - (\cse_571 -> - (\cse_572 -> - (\cse_573 -> - (\cse_574 -> - (\cse_575 -> - (\cse_576 -> - (\cse_577 -> - (\cse_578 -> - (\cse_579 -> - (\cse_580 -> - (\cse_581 -> - (\cse_582 -> - (\cse_583 -> - (\cse_584 -> - (\cse_585 -> - (\cse_586 -> - (\cse_587 -> - (\cse_588 -> - (\cse_589 -> - (\cse_590 -> - (\cse_591 -> - (\cse_592 -> - (\cse_593 -> - (\cse_594 -> - (\cse_595 -> - (\cse_596 -> - (\cse_597 -> - (\cse_598 -> - (\cse_599 -> - (\cse_600 -> - (\cse_601 -> - (\cse_602 -> - (\cse_802 -> - addInteger - cse_802 - cse_802) - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - (addInteger - cse_537 - cse_417) - cse_601) - cse_485) - cse_410) - cse_493) - cse_476) - cse_552) - cse_489) - cse_563) - cse_549) - cse_431) - cse_555) - cse_445) - cse_422) - cse_503) - cse_437) - cse_504) - cse_499) - cse_565) - cse_514) - cse_579) - cse_569) - cse_440) - cse_582) - cse_454) - cse_448) - cse_516) - cse_466) - cse_532) - cse_521) - cse_595) - cse_534) - cse_446) - cse_423) - cse_481) - cse_413) - cse_515) - cse_500) - cse_554) - cse_492) - cse_594) - cse_570) - cse_428) - cse_558) - cse_467) - cse_449) - cse_506) - cse_439) - cse_507) - cse_522) - cse_587) - cse_510) - cse_576) - cse_599) - cse_468) - cse_585) - cse_458) - cse_473) - cse_544) - cse_463) - cse_529) - cse_547) - cse_415) - cse_539) - cse_566) - cse_596) - cse_479) - cse_556) - cse_494) - cse_426) - cse_505) - cse_490) - cse_517) - cse_545) - cse_432) - cse_509) - cse_441) - cse_571) - cse_455) - cse_438) - cse_456) - cse_501) - cse_519) - cse_461) - cse_580) - cse_523) - cse_443) - cse_583) - cse_403) - cse_450) - cse_471) - cse_409) - cse_533) - cse_474) - cse_589) - cse_536) - cse_442) - cse_572) - cse_483) - cse_560) - cse_469) - cse_502) - cse_508) - cse_487) - cse_588) - cse_524) - cse_429) - cse_512) - cse_416) - cse_452) - cse_459) - cse_434) - cse_460) - cse_475) - cse_590) - cse_464) - cse_577) - cse_600) - cse_418) - cse_586) - cse_407) - cse_421) - cse_540) - cse_412) - cse_530) - cse_548) - cse_564) - cse_433) - cse_520) - cse_597) - cse_480) - cse_511) - cse_495) - cse_478) - cse_553) - cse_491) - cse_567) - cse_447) - cse_528) - cse_557) - cse_541) - cse_525) - cse_404) - cse_538) - cse_405) - cse_497) - cse_568) - cse_411) - cse_575) - cse_573) - cse_543) - cse_584) - cse_457) - cse_550) - cse_420) - cse_462) - cse_427) - cse_424) - cse_592) - cse_436) - cse_542) - cse_526) - cse_484) - cse_513) - cse_419) - cse_498) - cse_551) - cse_488) - cse_591) - cse_574) - cse_531) - cse_561) - cse_470) - cse_546) - cse_408) - cse_535) - cse_402) - cse_425) - cse_593) - cse_414) - cse_578) - cse_602) - cse_472) - cse_581) - cse_453) - cse_477) - cse_444) - cse_465) - cse_430) - cse_451) - cse_518) - cse_435) - cse_562) - cse_598) - cse_482) - cse_559) - cse_496) - cse_527) - cse_406) - cse_486)) - (addInteger - 364 - 365)) - (addInteger - 4 - 5)) - (addInteger - 236 - 237)) - (addInteger - 108 - 109)) - (addInteger - 388 - 389)) - (addInteger - 260 - 261)) - (addInteger - 132 - 133)) - (addInteger - 62 - 63)) - (addInteger - 82 - 83)) - (addInteger - 358 - 359)) - (addInteger - 318 - 319)) - (addInteger - 338 - 339)) - (addInteger - 230 - 231)) - (addInteger - 190 - 191)) - (addInteger - 210 - 211)) - (addInteger - 102 - 103)) - (addInteger - 240 - 241)) - (addInteger - 112 - 113)) - (addInteger - 304 - 305)) - (addInteger - 176 - 177)) - (addInteger - 48 - 49)) - (addInteger - 368 - 369)) - (addInteger - 170 - 171)) - (addInteger - 42 - 43)) - (addInteger - 362 - 363)) - (addInteger - 234 - 235)) - (addInteger - 106 - 107)) - (addInteger - 298 - 299)) - (addInteger - 340 - 341)) - (addInteger - 300 - 301)) - (addInteger - 196 - 197)) - (addInteger - 156 - 157)) - (addInteger - 84 - 85)) - (addInteger - 44 - 45)) - (addInteger - 294 - 295)) - (addInteger - 274 - 275)) - (addInteger - 130 - 131)) - (addInteger - 38 - 39)) - (addInteger - 254 - 255)) - (addInteger - 18 - 19)) - (addInteger - 386 - 387)) - (addInteger - 344 - 345)) - (addInteger - 200 - 201)) - (addInteger - 392 - 393)) - (addInteger - 88 - 89)) - (addInteger - 280 - 281)) - (addInteger - 136 - 137)) - (addInteger - 24 - 25)) - (addInteger - 78 - 79)) - (addInteger - 270 - 271)) - (addInteger - 14 - 15)) - (addInteger - 334 - 335)) - (addInteger - 308 - 309)) - (addInteger - 20 - 21)) - (addInteger - 252 - 253)) - (addInteger - 124 - 125)) - (addInteger - 348 - 349)) - (addInteger - 148 - 149)) - (addInteger - 118 - 119)) - (addInteger - 302 - 303)) - (addInteger - 322 - 323)) - (addInteger - 282 - 283)) - (addInteger - 246 - 247)) - (addInteger - 128 - 129)) - (addInteger - 288 - 289)) - (addInteger - 0 - 1)) - (addInteger - 192 - 193)) - (addInteger - 352 - 353)) - (addInteger - 64 - 65)) - (addInteger - 186 - 187)) - (addInteger - 58 - 59)) - (addInteger - 342 - 343)) - (addInteger - 250 - 251)) - (addInteger - 122 - 123)) - (addInteger - 278 - 279)) - (addInteger - 396 - 397)) - (addInteger - 324 - 325)) - (addInteger - 284 - 285)) - (addInteger - 212 - 213)) - (addInteger - 172 - 173)) - (addInteger - 100 - 101)) - (addInteger - 60 - 61)) - (addInteger - 258 - 259)) - (addInteger - 166 - 167)) - (addInteger - 382 - 383)) - (addInteger - 146 - 147)) - (addInteger - 54 - 55)) - (addInteger - 74 - 75)) - (addInteger - 40 - 41)) - (addInteger - 328 - 329)) - (addInteger - 216 - 217)) - (addInteger - 264 - 265)) - (addInteger - 104 - 105)) - (addInteger - 152 - 153)) - (addInteger - 206 - 207)) - (addInteger - 98 - 99)) - (addInteger - 94 - 95)) - (addInteger - 142 - 143)) - (addInteger - 34 - 35)) - (addInteger - 30 - 31)) - (addInteger - 204 - 205)) - (addInteger - 164 - 165)) - (addInteger - 76 - 77)) - (addInteger - 36 - 37)) - (addInteger - 332 - 333)) - (addInteger - 292 - 293)) - (addInteger - 394 - 395)) - (addInteger - 266 - 267)) - (addInteger - 138 - 139)) - (addInteger - 10 - 11)) - (addInteger - 80 - 81)) - (addInteger - 272 - 273)) - (addInteger - 144 - 145)) - (addInteger - 16 - 17)) - (addInteger - 336 - 337)) - (addInteger - 208 - 209)) - (addInteger - 400 - 401)) - (addInteger - 6 - 7)) - (addInteger - 326 - 327)) - (addInteger - 198 - 199)) - (addInteger - 390 - 391)) - (addInteger - 70 - 71)) - (addInteger - 262 - 263)) - (addInteger - 134 - 135)) - (addInteger - 268 - 269)) - (addInteger - 372 - 373)) - (addInteger - 12 - 13)) - (addInteger - 228 - 229)) - (addInteger - 188 - 189)) - (addInteger - 116 - 117)) - (addInteger - 366 - 367)) - (addInteger - 182 - 183)) - (addInteger - 346 - 347)) - (addInteger - 202 - 203)) - (addInteger - 110 - 111)) - (addInteger - 90 - 91)) - (addInteger - 56 - 57)) - (addInteger - 376 - 377)) - (addInteger - 232 - 233)) - (addInteger - 120 - 121)) - (addInteger - 312 - 313)) - (addInteger - 168 - 169)) - (addInteger - 226 - 227)) - (addInteger - 222 - 223)) - (addInteger - 114 - 115)) - (addInteger - 306 - 307)) - (addInteger - 162 - 163)) - (addInteger - 158 - 159)) - (addInteger - 50 - 51)) - (addInteger - 370 - 371)) - (addInteger - 220 - 221)) - (addInteger - 380 - 381)) - (addInteger - 180 - 181)) - (addInteger - 92 - 93)) - (addInteger - 52 - 53)) - (addInteger - 276 - 277)) - (addInteger - 66 - 67)) - (addInteger - 26 - 27)) - (addInteger - 374 - 375)) - (addInteger - 174 - 175)) - (addInteger - 194 - 195)) - (addInteger - 154 - 155)) - (addInteger - 46 - 47)) - (addInteger - 96 - 97)) - (addInteger - 160 - 161)) - (addInteger - 32 - 33)) - (addInteger - 320 - 321)) - (addInteger - 384 - 385)) - (addInteger - 224 - 225)) - (addInteger - 256 - 257)) - (addInteger - 150 - 151)) - (addInteger - 22 - 23)) - (addInteger - 378 - 379)) - (addInteger - 214 - 215)) - (addInteger - 86 - 87)) - (addInteger - 314 - 315)) - (addInteger - 140 - 141)) - (addInteger - 356 - 357)) - (addInteger - 316 - 317)) - (addInteger - 68 - 69)) - (addInteger - 28 - 29)) - (addInteger - 244 - 245)) - (addInteger 310 311)) - (addInteger 330 331)) - (addInteger 238 239)) - (addInteger 2 3)) - (addInteger 218 219)) - (addInteger 126 127)) - (addInteger 360 361)) - (addInteger 72 73)) - (addInteger 248 249)) - (addInteger 296 297)) - (addInteger 8 9)) - (addInteger 184 185)) - (addInteger 350 351)) - (addInteger 242 243)) - (addInteger 398 399)) - (addInteger 290 291)) - (addInteger 286 287)) - (addInteger 178 179)) - (addInteger 354 355)) \ No newline at end of file +(\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + addInteger + cse + cse) + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + (addInteger + cse + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse)) + (addInteger + 364 + 365)) + (addInteger + 4 + 5)) + (addInteger + 236 + 237)) + (addInteger + 108 + 109)) + (addInteger + 388 + 389)) + (addInteger + 260 + 261)) + (addInteger + 132 + 133)) + (addInteger + 62 + 63)) + (addInteger + 82 + 83)) + (addInteger + 358 + 359)) + (addInteger + 318 + 319)) + (addInteger + 338 + 339)) + (addInteger + 230 + 231)) + (addInteger + 190 + 191)) + (addInteger + 210 + 211)) + (addInteger + 102 + 103)) + (addInteger + 240 + 241)) + (addInteger + 112 + 113)) + (addInteger + 304 + 305)) + (addInteger + 176 + 177)) + (addInteger + 48 + 49)) + (addInteger + 368 + 369)) + (addInteger + 170 + 171)) + (addInteger + 42 + 43)) + (addInteger + 362 + 363)) + (addInteger + 234 + 235)) + (addInteger + 106 + 107)) + (addInteger + 298 + 299)) + (addInteger + 340 + 341)) + (addInteger + 300 + 301)) + (addInteger + 196 + 197)) + (addInteger + 156 + 157)) + (addInteger + 84 + 85)) + (addInteger + 44 + 45)) + (addInteger + 294 + 295)) + (addInteger + 274 + 275)) + (addInteger + 130 + 131)) + (addInteger + 38 + 39)) + (addInteger + 254 + 255)) + (addInteger + 18 + 19)) + (addInteger + 386 + 387)) + (addInteger + 344 + 345)) + (addInteger + 200 + 201)) + (addInteger + 392 + 393)) + (addInteger + 88 + 89)) + (addInteger + 280 + 281)) + (addInteger + 136 + 137)) + (addInteger + 24 + 25)) + (addInteger + 78 + 79)) + (addInteger + 270 + 271)) + (addInteger + 14 + 15)) + (addInteger + 334 + 335)) + (addInteger + 308 + 309)) + (addInteger + 20 + 21)) + (addInteger + 252 + 253)) + (addInteger + 124 + 125)) + (addInteger + 348 + 349)) + (addInteger + 148 + 149)) + (addInteger + 118 + 119)) + (addInteger + 302 + 303)) + (addInteger + 322 + 323)) + (addInteger + 282 + 283)) + (addInteger + 246 + 247)) + (addInteger + 128 + 129)) + (addInteger + 288 + 289)) + (addInteger + 0 + 1)) + (addInteger + 192 + 193)) + (addInteger + 352 + 353)) + (addInteger + 64 + 65)) + (addInteger + 186 + 187)) + (addInteger + 58 + 59)) + (addInteger + 342 + 343)) + (addInteger + 250 + 251)) + (addInteger + 122 + 123)) + (addInteger + 278 + 279)) + (addInteger + 396 + 397)) + (addInteger + 324 + 325)) + (addInteger + 284 + 285)) + (addInteger + 212 + 213)) + (addInteger + 172 + 173)) + (addInteger + 100 + 101)) + (addInteger + 60 + 61)) + (addInteger + 258 + 259)) + (addInteger + 166 + 167)) + (addInteger + 382 + 383)) + (addInteger + 146 + 147)) + (addInteger + 54 + 55)) + (addInteger + 74 + 75)) + (addInteger + 40 + 41)) + (addInteger + 328 + 329)) + (addInteger + 216 + 217)) + (addInteger + 264 + 265)) + (addInteger + 104 + 105)) + (addInteger + 152 + 153)) + (addInteger + 206 + 207)) + (addInteger + 98 + 99)) + (addInteger + 94 + 95)) + (addInteger + 142 + 143)) + (addInteger + 34 + 35)) + (addInteger + 30 + 31)) + (addInteger + 204 + 205)) + (addInteger + 164 + 165)) + (addInteger + 76 + 77)) + (addInteger + 36 + 37)) + (addInteger + 332 + 333)) + (addInteger + 292 + 293)) + (addInteger + 394 + 395)) + (addInteger + 266 + 267)) + (addInteger + 138 + 139)) + (addInteger + 10 + 11)) + (addInteger + 80 + 81)) + (addInteger + 272 + 273)) + (addInteger + 144 + 145)) + (addInteger + 16 + 17)) + (addInteger + 336 + 337)) + (addInteger + 208 + 209)) + (addInteger + 400 + 401)) + (addInteger + 6 + 7)) + (addInteger + 326 + 327)) + (addInteger + 198 + 199)) + (addInteger + 390 + 391)) + (addInteger + 70 + 71)) + (addInteger + 262 + 263)) + (addInteger + 134 + 135)) + (addInteger + 268 + 269)) + (addInteger + 372 + 373)) + (addInteger + 12 + 13)) + (addInteger + 228 + 229)) + (addInteger + 188 + 189)) + (addInteger + 116 + 117)) + (addInteger + 366 + 367)) + (addInteger + 182 + 183)) + (addInteger + 346 + 347)) + (addInteger + 202 + 203)) + (addInteger + 110 + 111)) + (addInteger + 90 + 91)) + (addInteger + 56 + 57)) + (addInteger + 376 + 377)) + (addInteger + 232 + 233)) + (addInteger + 120 + 121)) + (addInteger + 312 + 313)) + (addInteger + 168 + 169)) + (addInteger + 226 + 227)) + (addInteger + 222 + 223)) + (addInteger + 114 + 115)) + (addInteger + 306 + 307)) + (addInteger + 162 + 163)) + (addInteger + 158 + 159)) + (addInteger + 50 + 51)) + (addInteger + 370 + 371)) + (addInteger + 220 + 221)) + (addInteger + 380 + 381)) + (addInteger + 180 + 181)) + (addInteger + 92 + 93)) + (addInteger + 52 + 53)) + (addInteger + 276 + 277)) + (addInteger + 66 + 67)) + (addInteger + 26 + 27)) + (addInteger + 374 + 375)) + (addInteger + 174 + 175)) + (addInteger + 194 + 195)) + (addInteger + 154 + 155)) + (addInteger + 46 + 47)) + (addInteger + 96 + 97)) + (addInteger + 160 + 161)) + (addInteger + 32 + 33)) + (addInteger + 320 + 321)) + (addInteger + 384 + 385)) + (addInteger + 224 + 225)) + (addInteger + 256 + 257)) + (addInteger + 150 + 151)) + (addInteger + 22 + 23)) + (addInteger + 378 + 379)) + (addInteger + 214 + 215)) + (addInteger + 86 + 87)) + (addInteger + 314 + 315)) + (addInteger + 140 + 141)) + (addInteger + 356 + 357)) + (addInteger + 316 + 317)) + (addInteger + 68 + 69)) + (addInteger + 28 + 29)) + (addInteger 244 245)) + (addInteger 310 311)) + (addInteger 330 331)) + (addInteger 238 239)) + (addInteger 2 3)) + (addInteger 218 219)) + (addInteger 126 127)) + (addInteger 360 361)) + (addInteger 72 73)) + (addInteger 248 249)) + (addInteger 296 297)) + (addInteger 8 9)) + (addInteger 184 185)) + (addInteger 350 351)) + (addInteger 242 243)) + (addInteger 398 399)) + (addInteger 290 291)) + (addInteger 286 287)) + (addInteger 178 179)) + (addInteger 354 355) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/extraDelays.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/extraDelays.uplc.golden index df03e678730..c657cebfec2 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/extraDelays.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/extraDelays.uplc.golden @@ -1 +1 @@ -(delay 1) \ No newline at end of file +delay 1 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/floatDelay1.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/floatDelay1.uplc.golden index 76314bfe356..b7b8ae1aa74 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/floatDelay1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/floatDelay1.uplc.golden @@ -1 +1 @@ -(addInteger 1 1) \ No newline at end of file +addInteger 1 1 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/floatDelay2.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/floatDelay2.uplc.golden index 5f9aeb2233e..87366c81f72 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/floatDelay2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/floatDelay2.uplc.golden @@ -1 +1 @@ -((\a_1 -> addInteger (force a_1) (force a_1)) (delay (addInteger 1 2))) \ No newline at end of file +(\a -> addInteger (force a) (force a)) (delay (addInteger 1 2)) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/floatDelay3.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/floatDelay3.uplc.golden index ed8ba6f3db4..eacbcc02d3f 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/floatDelay3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/floatDelay3.uplc.golden @@ -1 +1 @@ -(addInteger (force (delay 1)) (force (delay 1))) \ No newline at end of file +addInteger (force (delay 1)) (force (delay 1)) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/forceDelayComplex.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/forceDelayComplex.uplc.golden index 50a3d500b30..9f652a4d85c 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/forceDelayComplex.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/forceDelayComplex.uplc.golden @@ -1 +1 @@ -(funcVar_7 1 2 "foo" "bar" 3 3) \ No newline at end of file +funcVar 1 2 "foo" "bar" 3 3 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/forceDelayMultiApply.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/forceDelayMultiApply.uplc.golden index 57132a23441..e3d9f788070 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/forceDelayMultiApply.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/forceDelayMultiApply.uplc.golden @@ -1 +1 @@ -(funcVar_4 1 2 3) \ No newline at end of file +funcVar 1 2 3 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure1.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure1.uplc.golden index e75aa445cac..a10b0484599 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure1.uplc.golden @@ -1 +1 @@ -((\a_2 b_3 -> a_2) error) \ No newline at end of file +(\a b -> a) error \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure2.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure2.uplc.golden index e75aa445cac..a10b0484599 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure2.uplc.golden @@ -1 +1 @@ -((\a_2 b_3 -> a_2) error) \ No newline at end of file +(\a b -> a) error \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure3.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure3.uplc.golden index e75aa445cac..a10b0484599 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure3.uplc.golden @@ -1 +1 @@ -((\a_2 b_3 -> a_2) error) \ No newline at end of file +(\a b -> a) error \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure4.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure4.uplc.golden index 414e00d57c3..08f14ca99e7 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlineImpure4.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlineImpure4.uplc.golden @@ -1 +1 @@ -((\a_3 b_4 -> a_3) (force a_2)) \ No newline at end of file +(\a b -> a) (force a) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlinePure1.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlinePure1.uplc.golden index bde3b1c0f1b..a89db790d73 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlinePure1.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlinePure1.uplc.golden @@ -1 +1 @@ -(\b_4 -> a_2) \ No newline at end of file +\b -> a \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlinePure2.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlinePure2.uplc.golden index bde3b1c0f1b..a89db790d73 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlinePure2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlinePure2.uplc.golden @@ -1 +1 @@ -(\b_4 -> a_2) \ No newline at end of file +\b -> a \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlinePure3.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlinePure3.uplc.golden index 5946b96c2b6..e2e6423b7f6 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlinePure3.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlinePure3.uplc.golden @@ -1 +1 @@ -(\b_5 y_8 -> 1 1) \ No newline at end of file +\b y -> 1 1 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/inlinePure4.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/inlinePure4.uplc.golden index 5e1a936a2a0..74535e5d945 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/inlinePure4.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/inlinePure4.uplc.golden @@ -1 +1 @@ -(\b_5 -> (\x_8 y_9 -> x_8 x_8) (delay (error 1))) \ No newline at end of file +\b -> (\x y -> x x) (delay (error 1)) \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/interveningLambda.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/interveningLambda.uplc.golden index b9abc06d8e7..92880af7137 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/interveningLambda.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/interveningLambda.uplc.golden @@ -1 +1 @@ -(1 1) \ No newline at end of file +1 1 \ No newline at end of file diff --git a/plutus-core/untyped-plutus-core/test/Transform/multiApp.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/multiApp.uplc.golden index aa7d0034dc3..354bbaf3997 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/multiApp.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/multiApp.uplc.golden @@ -1 +1 @@ -(3 1 2) \ No newline at end of file +3 1 2 \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.uplc.golden index 3ddd54e5787..7340b582ad0 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.uplc.golden @@ -1,25 +1,25 @@ -program - 1.1.0 - (\d -> - (\tup -> - force - (force ifThenElse - (equalsInteger 0 (force (force fstPair) tup)) - (delay - ((\l -> - (\l -> - (\l -> - (\ds -> - (\ds -> - (\ds -> - (\ds -> ds) - (unIData - (force headList (force tailList l)))) - (unIData (force headList l))) - (unIData (force headList l))) - (unIData (force headList l))) - (force tailList l)) - (force tailList l)) - (force (force sndPair) tup))) - (delay error))) - (unConstrData d)) \ No newline at end of file +(program + 1.1.0 + (\d -> + (\tup -> + force + (force ifThenElse + (equalsInteger 0 (force (force fstPair) tup)) + (delay + ((\l -> + (\l -> + (\l -> + (\ds -> + (\ds -> + (\ds -> + (\ds -> ds) + (unIData + (force headList (force tailList l)))) + (unIData (force headList l))) + (unIData (force headList l))) + (unIData (force headList l))) + (force tailList l)) + (force tailList l)) + (force (force sndPair) tup))) + (delay error))) + (unConstrData d))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden index e2393ed1fc3..9d2d8c309ea 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.uplc.golden @@ -1,58 +1,58 @@ -program - 1.1.0 - (\d -> - (\cse -> - (\lessThanInteger -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - addInteger - (addInteger - (addInteger - (addInteger (addInteger cse cse) cse) - cse) - (force - (case - (lessThanInteger - (addInteger cse cse) - (addInteger cse cse)) - [ (delay (addInteger cse cse)) - , (delay (addInteger cse cse)) ]))) - (force - (case - (lessThanInteger - (addInteger cse cse) - (addInteger cse cse)) - [ (delay (addInteger cse cse)) - , (delay (addInteger cse cse)) ]))) - (case cse [(\x y z w -> z)])) - (case cse [(\x y z w -> w)])) - (case cse [(\x y z w -> x)])) - (case cse [(\x y z w -> y)])) - (\x y -> - force ifThenElse - (lessThanInteger x y) - (constr 0 []) - (constr 1 []))) - ((\tup -> - force - (force ifThenElse - (equalsInteger 0 (force (force fstPair) tup)) - (delay - ((\l -> - (\l -> - (\l -> - (\z w -> - constr 0 - [ (unIData (force headList l)) - , (unIData (force headList l)) - , z - , w ]) - (unIData (force headList l)) - (unIData (force headList (force tailList l)))) - (force tailList l)) - (force tailList l)) - (force (force sndPair) tup))) - (delay (case error [error])))) - (unConstrData d))) \ No newline at end of file +(program + 1.1.0 + (\d -> + (\cse -> + (\lessThanInteger -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + addInteger + (addInteger + (addInteger + (addInteger (addInteger cse cse) cse) + cse) + (force + (case + (lessThanInteger + (addInteger cse cse) + (addInteger cse cse)) + [ (delay (addInteger cse cse)) + , (delay (addInteger cse cse)) ]))) + (force + (case + (lessThanInteger + (addInteger cse cse) + (addInteger cse cse)) + [ (delay (addInteger cse cse)) + , (delay (addInteger cse cse)) ]))) + (case cse [(\x y z w -> z)])) + (case cse [(\x y z w -> w)])) + (case cse [(\x y z w -> x)])) + (case cse [(\x y z w -> y)])) + (\x y -> + force ifThenElse + (lessThanInteger x y) + (constr 0 []) + (constr 1 []))) + ((\tup -> + force + (force ifThenElse + (equalsInteger 0 (force (force fstPair) tup)) + (delay + ((\l -> + (\l -> + (\l -> + (\z w -> + constr 0 + [ (unIData (force headList l)) + , (unIData (force headList l)) + , z + , w ]) + (unIData (force headList l)) + (unIData (force headList (force tailList l)))) + (force tailList l)) + (force tailList l)) + (force (force sndPair) tup))) + (delay (case error [error])))) + (unConstrData d)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden index a6f1ba700d8..2b2ee8beedd 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.uplc.golden @@ -1,71 +1,71 @@ -program - 1.1.0 - (\d -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\lessThanInteger -> - addInteger - (addInteger - (addInteger - (addInteger (addInteger cse cse) cse) - cse) - (force - (case - (lessThanInteger - (addInteger cse cse) - (addInteger cse cse)) - [ (delay (addInteger cse cse)) - , (delay (addInteger cse cse)) ]))) - (force - (case - (lessThanInteger - (addInteger cse cse) - (addInteger cse cse)) - [ (delay (addInteger cse cse)) - , (delay (addInteger cse cse)) ]))) - (\x y -> - force ifThenElse - (lessThanInteger x y) - (constr 0 []) - (constr 1 []))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList - (force tailList - (force tailList - (force tailList - (force (force sndPair) cse))))))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList - (force tailList - (force tailList (force (force sndPair) cse)))))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList - (force tailList (force (force sndPair) cse))))) - ((\d -> - force - (force ifThenElse - (equalsInteger 0 cse) - (delay (unIData d)) - (delay error))) - (force headList (force (force sndPair) cse)))) - (force (force fstPair) cse)) - (unConstrData d)) \ No newline at end of file +(program + 1.1.0 + (\d -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\lessThanInteger -> + addInteger + (addInteger + (addInteger + (addInteger (addInteger cse cse) cse) + cse) + (force + (case + (lessThanInteger + (addInteger cse cse) + (addInteger cse cse)) + [ (delay (addInteger cse cse)) + , (delay (addInteger cse cse)) ]))) + (force + (case + (lessThanInteger + (addInteger cse cse) + (addInteger cse cse)) + [ (delay (addInteger cse cse)) + , (delay (addInteger cse cse)) ]))) + (\x y -> + force ifThenElse + (lessThanInteger x y) + (constr 0 []) + (constr 1 []))) + ((\d -> + force + (force ifThenElse + (equalsInteger 0 cse) + (delay (unIData d)) + (delay error))) + (force headList + (force tailList + (force tailList + (force tailList + (force (force sndPair) cse))))))) + ((\d -> + force + (force ifThenElse + (equalsInteger 0 cse) + (delay (unIData d)) + (delay error))) + (force headList + (force tailList + (force tailList (force (force sndPair) cse)))))) + ((\d -> + force + (force ifThenElse + (equalsInteger 0 cse) + (delay (unIData d)) + (delay error))) + (force headList + (force tailList (force (force sndPair) cse))))) + ((\d -> + force + (force ifThenElse + (equalsInteger 0 cse) + (delay (unIData d)) + (delay error))) + (force headList (force (force sndPair) cse)))) + (force (force fstPair) cse)) + (unConstrData d))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden index c9f674502f1..aa87f7671ce 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.uplc.golden @@ -1,56 +1,56 @@ -program - 1.1.0 - (\d -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\cse -> - (\lessThanInteger -> - addInteger - (addInteger - (addInteger - (addInteger (addInteger cse cse) cse) - cse) - (force - (case - (lessThanInteger - (addInteger cse cse) - (addInteger cse cse)) - [ (delay (addInteger cse cse)) - , (delay (addInteger cse cse)) ]))) - (force - (case - (lessThanInteger - (addInteger cse cse) - (addInteger cse cse)) - [ (delay (addInteger cse cse)) - , (delay (addInteger cse cse)) ]))) - (\x y -> - force ifThenElse - (lessThanInteger x y) - (constr 0 []) - (constr 1 []))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (cse (\ds ds ds ds -> ds) (\void -> error))) - (\cont fail -> - (\tup -> - force - (force ifThenElse - (equalsInteger 0 (force (force fstPair) tup)) - (delay - ((\l -> - (\l -> - (\l -> - cont - (unIData (force headList l)) - (unIData (force headList l)) - (unIData (force headList l)) - (unIData (force headList (force tailList l)))) - (force tailList l)) - (force tailList l)) - (force (force sndPair) tup))) - (delay (fail ())))) - (unConstrData d))) \ No newline at end of file +(program + 1.1.0 + (\d -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\lessThanInteger -> + addInteger + (addInteger + (addInteger + (addInteger (addInteger cse cse) cse) + cse) + (force + (case + (lessThanInteger + (addInteger cse cse) + (addInteger cse cse)) + [ (delay (addInteger cse cse)) + , (delay (addInteger cse cse)) ]))) + (force + (case + (lessThanInteger + (addInteger cse cse) + (addInteger cse cse)) + [ (delay (addInteger cse cse)) + , (delay (addInteger cse cse)) ]))) + (\x y -> + force ifThenElse + (lessThanInteger x y) + (constr 0 []) + (constr 1 []))) + (cse (\ds ds ds ds -> ds) (\void -> error))) + (cse (\ds ds ds ds -> ds) (\void -> error))) + (cse (\ds ds ds ds -> ds) (\void -> error))) + (cse (\ds ds ds ds -> ds) (\void -> error))) + (\cont fail -> + (\tup -> + force + (force ifThenElse + (equalsInteger 0 (force (force fstPair) tup)) + (delay + ((\l -> + (\l -> + (\l -> + cont + (unIData (force headList l)) + (unIData (force headList l)) + (unIData (force headList l)) + (unIData (force headList (force tailList l)))) + (force tailList l)) + (force tailList l)) + (force (force sndPair) tup))) + (delay (fail ())))) + (unConstrData d)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/allCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/allCheap.uplc.golden index ab934def3c9..0f3a669fee0 100644 --- a/plutus-tx-plugin/test/Budget/9.6/allCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/allCheap.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay (constr 1 [])) - (delay (s s xs))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay (constr 1 [])) + (delay (s s xs))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/allEmptyList.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/allEmptyList.uplc.golden index 7de97d3d5e4..28a30ae0b26 100644 --- a/plutus-tx-plugin/test/Budget/9.6/allEmptyList.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/allEmptyList.uplc.golden @@ -1,16 +1,16 @@ -program - 1.1.0 - ((\s -> s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay (constr 1 [])) - (delay (s s xs))))) ])) - (constr 0 [])) \ No newline at end of file +(program + 1.1.0 + ((\s -> s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay (constr 1 [])) + (delay (s s xs))))) ])) + (constr 0 []))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/allExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/allExpensive.uplc.golden index 5b02767b792..aee3881f5b1 100644 --- a/plutus-tx-plugin/test/Budget/9.6/allExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/allExpensive.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 11 x) - (delay (constr 1 [])) - (delay (s s xs))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 11 x) + (delay (constr 1 [])) + (delay (s s xs))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/andCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/andCheap.uplc.golden index bd9a319fec4..14a11f1e466 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andCheap.uplc.golden @@ -1,35 +1,35 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (case x [(delay (s s xs)), (delay (constr 1 []))]))) ])) - (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (case x [(delay (s s xs)), (delay (constr 1 []))]))) ])) + (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/andExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/andExpensive.uplc.golden index 667cecfd0ab..17225b1f9a9 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andExpensive.uplc.golden @@ -1,35 +1,35 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (case x [(delay (s s xs)), (delay (constr 1 []))]))) ])) - (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 0 []) - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (case x [(delay (s s xs)), (delay (constr 1 []))]))) ])) + (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 0 []) + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.uplc.golden index 4c639dfcfe6..32888513da2 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.uplc.golden @@ -1,14 +1,14 @@ -program - 1.1.0 - ((\x y -> - force - (force ifThenElse - (lessThanInteger x 3) - (delay - (force ifThenElse - (lessThanInteger y 3) - (constr 0 []) - (constr 1 []))) - (delay (constr 1 [])))) - 4 - 4) \ No newline at end of file +(program + 1.1.0 + ((\x y -> + force + (force ifThenElse + (lessThanInteger x 3) + (delay + (force ifThenElse + (lessThanInteger y 3) + (constr 0 []) + (constr 1 []))) + (delay (constr 1 [])))) + 4 + 4)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/andWithLocal.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/andWithLocal.uplc.golden index 6698c4406e8..94abf5891ab 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andWithLocal.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andWithLocal.uplc.golden @@ -1,15 +1,15 @@ -program - 1.1.0 - ((\x y -> - force - ((\lessThanInteger -> - case - (lessThanInteger x 3) - [(delay (lessThanInteger y 3)), (delay (constr 1 []))]) - (\x y -> - force ifThenElse - (lessThanInteger x y) - (constr 0 []) - (constr 1 [])))) - 4 - 4) \ No newline at end of file +(program + 1.1.0 + ((\x y -> + force + ((\lessThanInteger -> + case + (lessThanInteger x 3) + [(delay (lessThanInteger y 3)), (delay (constr 1 []))]) + (\x y -> + force ifThenElse + (lessThanInteger x y) + (constr 0 []) + (constr 1 [])))) + 4 + 4)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.uplc.golden index d35e63fd029..85a233cb9d1 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.uplc.golden @@ -1,14 +1,14 @@ -program - 1.1.0 - ((\x y -> - force - (case - (force ifThenElse (lessThanInteger x 3) (constr 0 []) (constr 1 [])) - [ (delay - (force ifThenElse - (lessThanInteger y 3) - (constr 0 []) - (constr 1 []))) - , (delay (constr 1 [])) ])) - 4 - 4) \ No newline at end of file +(program + 1.1.0 + ((\x y -> + force + (case + (force ifThenElse (lessThanInteger x 3) (constr 0 []) (constr 1 [])) + [ (delay + (force ifThenElse + (lessThanInteger y 3) + (constr 0 []) + (constr 1 []))) + , (delay (constr 1 [])) ])) + 4 + 4)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/anyCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/anyCheap.uplc.golden index 51bd01a5972..9cdd8514e36 100644 --- a/plutus-tx-plugin/test/Budget/9.6/anyCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/anyCheap.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 10 x) - (delay (s s xs)) - (delay (constr 0 []))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 10 x) + (delay (s s xs)) + (delay (constr 0 []))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.uplc.golden index 68955cfa51e..7c520e61681 100644 --- a/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.uplc.golden @@ -1,16 +1,16 @@ -program - 1.1.0 - ((\s -> s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay (s s xs)) - (delay (constr 0 []))))) ])) - (constr 0 [])) \ No newline at end of file +(program + 1.1.0 + ((\s -> s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay (s s xs)) + (delay (constr 0 []))))) ])) + (constr 0 []))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/anyExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/anyExpensive.uplc.golden index e39c16d8c6f..bb92dd301c7 100644 --- a/plutus-tx-plugin/test/Budget/9.6/anyExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/anyExpensive.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay (s s xs)) - (delay (constr 0 []))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay (s s xs)) + (delay (constr 0 []))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/applicative.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/applicative.uplc.golden index b77b75470ce..1efbfc301cc 100644 --- a/plutus-tx-plugin/test/Budget/9.6/applicative.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/applicative.uplc.golden @@ -1 +1 @@ -program 1.1.0 (constr 0 [(addInteger 1 2)]) \ No newline at end of file +(program 1.1.0 (constr 0 [(addInteger 1 2)])) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.uplc.golden index 21752c6f5d3..6691e1a3bfa 100644 --- a/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.uplc.golden @@ -1,20 +1,20 @@ -program - 1.1.0 - ((\go d -> go (unListData d) 5) - ((\s -> s s) - (\s xs i -> - force (force chooseList) - xs - (\ds -> error) - (\ds ds -> - (\hd -> - (\tl -> - force - (force ifThenElse - (equalsInteger 0 i) - (delay hd) - (delay (s s tl (subtractInteger i 1))))) - (force tailList xs)) - (force headList xs)) - (constr 0 []) - (constr 0 [])))) \ No newline at end of file +(program + 1.1.0 + ((\go d -> go (unListData d) 5) + ((\s -> s s) + (\s xs i -> + force (force chooseList) + xs + (\ds -> error) + (\ds ds -> + (\hd -> + (\tl -> + force + (force ifThenElse + (equalsInteger 0 i) + (delay hd) + (delay (s s tl (subtractInteger i 1))))) + (force tailList xs)) + (force headList xs)) + (constr 0 []) + (constr 0 []))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/constAccL.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/constAccL.uplc.golden index 21d15327c78..a5a6bc0ade0 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constAccL.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constAccL.uplc.golden @@ -1,17 +1,17 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\ls -> go 42 ls) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [1, (go (subtractInteger n 1))])))) - 1000)) - (fix1 - (\go acc ds -> - force (case ds [(delay acc), (\x xs -> delay (go acc xs))])))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\ls -> go 42 ls) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [1, (go (subtractInteger n 1))])))) + 1000)) + (fix1 + (\go acc ds -> + force (case ds [(delay acc), (\x xs -> delay (go acc xs))])))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/constAccR.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/constAccR.uplc.golden index fe7aef1771e..02caf1513bb 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constAccR.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constAccR.uplc.golden @@ -1,14 +1,14 @@ -program - 1.1.0 - ((\fix1 -> - fix1 - (\go ds -> force (case ds [(delay 42), (\x xs -> delay (go xs))])) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [1, (go (subtractInteger n 1))])))) - 1000)) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + fix1 + (\go ds -> force (case ds [(delay 42), (\x xs -> delay (go xs))])) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [1, (go (subtractInteger n 1))])))) + 1000)) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/constElL.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/constElL.uplc.golden index e0ab4fd3a98..4ab38466cbc 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constElL.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constElL.uplc.golden @@ -1,17 +1,17 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\ls -> go 42 ls) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [1, (go (subtractInteger n 1))])))) - 1000)) - (fix1 - (\go acc ds -> - force (case ds [(delay acc), (\x xs -> delay (go x xs))])))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\ls -> go 42 ls) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [1, (go (subtractInteger n 1))])))) + 1000)) + (fix1 + (\go acc ds -> + force (case ds [(delay acc), (\x xs -> delay (go x xs))])))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/constElR.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/constElR.uplc.golden index a89dda1cfc9..04c7b211062 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constElR.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constElR.uplc.golden @@ -1,15 +1,15 @@ -program - 1.1.0 - ((\fix1 -> - fix1 - (\go ds -> - force (case ds [(delay 42), (\x xs -> delay ((\ds -> x) (go xs)))])) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [1, (go (subtractInteger n 1))])))) - 1000)) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + fix1 + (\go ds -> + force (case ds [(delay 42), (\x xs -> delay ((\ds -> x) (go xs)))])) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [1, (go (subtractInteger n 1))])))) + 1000)) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/elemCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/elemCheap.uplc.golden index 66b6b7d1ca2..bda649f1b2d 100644 --- a/plutus-tx-plugin/test/Budget/9.6/elemCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/elemCheap.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (equalsInteger 1 x) - (delay (constr 0 [])) - (delay (s s xs))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (equalsInteger 1 x) + (delay (constr 0 [])) + (delay (s s xs))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/elemExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/elemExpensive.uplc.golden index 33bf02b14e8..369596bc737 100644 --- a/plutus-tx-plugin/test/Budget/9.6/elemExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/elemExpensive.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (equalsInteger 0 x) - (delay (constr 0 [])) - (delay (s s xs))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (equalsInteger 0 x) + (delay (constr 0 [])) + (delay (s s xs))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/filter.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/filter.uplc.golden index 23e26eb251c..1e750c23490 100644 --- a/plutus-tx-plugin/test/Budget/9.6/filter.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/filter.uplc.golden @@ -1,40 +1,40 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - ((\xs -> - force - (force ifThenElse - (equalsInteger 0 (modInteger x 2)) - (delay (constr 1 [x, xs])) - (delay xs))) - (s s xs))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + ((\xs -> + force + (force ifThenElse + (equalsInteger 0 (modInteger x 2)) + (delay (constr 1 [x, xs])) + (delay xs))) + (s s xs))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/findCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/findCheap.uplc.golden index 3c78286baf0..ffb50bcac32 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findCheap.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 10 x) - (delay (s s xs)) - (delay (constr 0 [x]))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 10 x) + (delay (s s xs)) + (delay (constr 0 [x]))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/findEmptyList.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/findEmptyList.uplc.golden index 534821e32a8..6a111cc553d 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findEmptyList.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findEmptyList.uplc.golden @@ -1,16 +1,16 @@ -program - 1.1.0 - ((\s -> s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay (s s xs)) - (delay (constr 0 [x]))))) ])) - (constr 0 [])) \ No newline at end of file +(program + 1.1.0 + ((\s -> s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay (s s xs)) + (delay (constr 0 [x]))))) ])) + (constr 0 []))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/findExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/findExpensive.uplc.golden index 81895cfec3a..c6e674f1d57 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findExpensive.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay (s s xs)) - (delay (constr 0 [x]))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay (s s xs)) + (delay (constr 0 [x]))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.uplc.golden index cbd60129379..c63e207afbe 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.uplc.golden @@ -1,39 +1,39 @@ -program - 1.1.0 - ((\s -> - s s) - (\s i ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 10 x) - (delay ((\x -> s s x) (addInteger 1 i) xs)) - (delay (constr 0 [i]))))) ])) - 0 - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s i ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 10 x) + (delay ((\x -> s s x) (addInteger 1 i) xs)) + (delay (constr 0 [i]))))) ])) + 0 + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.uplc.golden index 740e396f938..24ff292df93 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.uplc.golden @@ -1,17 +1,17 @@ -program - 1.1.0 - ((\s -> s s) - (\s i ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay ((\x -> s s x) (addInteger 1 i) xs)) - (delay (constr 0 [i]))))) ])) - 0 - (constr 0 [])) \ No newline at end of file +(program + 1.1.0 + ((\s -> s s) + (\s i ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay ((\x -> s s x) (addInteger 1 i) xs)) + (delay (constr 0 [i]))))) ])) + 0 + (constr 0 []))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.uplc.golden index cb0caead04f..365d0d04d4b 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.uplc.golden @@ -1,39 +1,39 @@ -program - 1.1.0 - ((\s -> - s s) - (\s i ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger 1 x) - (delay ((\x -> s s x) (addInteger 1 i) xs)) - (delay (constr 0 [i]))))) ])) - 0 - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s i ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger 1 x) + (delay ((\x -> s s x) (addInteger 1 i) xs)) + (delay (constr 0 [i]))))) ])) + 0 + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/gte0.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/gte0.uplc.golden index 9c058202c0e..8b8ce9d3cbf 100644 --- a/plutus-tx-plugin/test/Budget/9.6/gte0.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/gte0.uplc.golden @@ -1,25 +1,25 @@ -program - 1.1.0 - ((\fix1 -> - fix1 - (\go ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanInteger x 0) - (delay (constr 1 [])) - (delay (go xs))))) ])) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [0, (go (subtractInteger n 1))])))) - 1000)) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + fix1 + (\go ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanInteger x 0) + (delay (constr 1 [])) + (delay (go xs))))) ])) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [0, (go (subtractInteger n 1))])))) + 1000)) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.uplc.golden index 17cc51cac6d..ad1e04602ac 100644 --- a/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.uplc.golden @@ -1 +1 @@ -program 1.1.0 5 \ No newline at end of file +(program 1.1.0 5) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.uplc.golden index c2373c0e794..7cf8a1f4286 100644 --- a/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.uplc.golden @@ -1 +1 @@ -program 1.1.0 18 \ No newline at end of file +(program 1.1.0 18) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/listIndexing.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/listIndexing.uplc.golden index 4044ad577c1..891229acf04 100644 --- a/plutus-tx-plugin/test/Budget/9.6/listIndexing.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/listIndexing.uplc.golden @@ -1,19 +1,19 @@ -program - 1.1.0 - ((\go xs -> go 5 xs) - ((\s -> s s) - (\s ds ds -> - force - (case - ds - [ (delay error) - , (\x xs -> - delay - (force - (force ifThenElse - (equalsInteger 0 ds) - (delay x) - (delay - ((\x -> s s x) - (subtractInteger ds 1) - xs))))) ])))) \ No newline at end of file +(program + 1.1.0 + ((\go xs -> go 5 xs) + ((\s -> s s) + (\s ds ds -> + force + (case + ds + [ (delay error) + , (\x xs -> + delay + (force + (force ifThenElse + (equalsInteger 0 ds) + (delay x) + (delay + ((\x -> s s x) + (subtractInteger ds 1) + xs))))) ]))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/lte0.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/lte0.uplc.golden index 57ba98c50b2..cc3f355cfd1 100644 --- a/plutus-tx-plugin/test/Budget/9.6/lte0.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/lte0.uplc.golden @@ -1,25 +1,25 @@ -program - 1.1.0 - ((\fix1 -> - fix1 - (\go ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (lessThanEqualsInteger x 0) - (delay (go xs)) - (delay (constr 1 []))))) ])) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [0, (go (subtractInteger n 1))])))) - 1000)) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + fix1 + (\go ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (lessThanEqualsInteger x 0) + (delay (go xs)) + (delay (constr 1 []))))) ])) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [0, (go (subtractInteger n 1))])))) + 1000)) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/map1.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/map1.uplc.golden index 9553f47f06b..0f9085dc291 100644 --- a/plutus-tx-plugin/test/Budget/9.6/map1.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/map1.uplc.golden @@ -1,412 +1,422 @@ -program - 1.1.0 - ((\fix1 -> - (\`$fEnumBool_$cenumFromTo` -> - (\go -> - (\go -> - (\`$fShowBuiltinByteString_$cshowsPrec` -> - (\go -> - (\go -> - (\concatBuiltinStrings - n -> - (\nt -> - (\cse -> - (\nt -> - (\lookup -> - constr 0 - [ (lookup (\i -> iData i) unBData n nt) - , (lookup - (\i -> iData i) - unBData - cse - nt) - , (lookup - (\i -> iData i) - unBData - (addInteger 10 n) - nt) - , (lookup - (\i -> iData i) - unBData - (addInteger 20 n) - nt) - , (lookup - (\i -> iData i) - unBData - cse - nt) ]) - (\`$dToData` - `$dUnsafeFromData` - ds - ds -> - force - (case - ((\k -> - fix1 - (\go - xs -> - force - (force chooseList) - xs - (\ds -> constr 1 []) - (\ds -> - (\hd -> - force - (force - ifThenElse - (equalsData - k - (force +(program + 1.1.0 + ((\fix1 -> + (\`$fEnumBool_$cenumFromTo` -> + (\go -> + (\go -> + (\`$fShowBuiltinByteString_$cshowsPrec` -> + (\go -> + (\go -> + (\concatBuiltinStrings + n -> + (\nt -> + (\cse -> + (\nt -> + (\lookup -> + constr 0 + [ (lookup + (\i -> iData i) + unBData + n + nt) + , (lookup + (\i -> iData i) + unBData + cse + nt) + , (lookup + (\i -> iData i) + unBData + (addInteger 10 n) + nt) + , (lookup + (\i -> iData i) + unBData + (addInteger 20 n) + nt) + , (lookup + (\i -> iData i) + unBData + cse + nt) ]) + (\`$dToData` + `$dUnsafeFromData` + ds + ds -> + force + (case + ((\k -> + fix1 + (\go + xs -> + force + (force chooseList) + xs + (\ds -> constr 1 []) + (\ds -> + (\hd -> + force + (force + ifThenElse + (equalsData + k + (force + (force + fstPair) + hd)) + (delay + ((\ds -> + constr 0 + [ (force + (force + sndPair) + hd) ]) + (force + tailList + xs))) + (delay + (go + (force + tailList + xs))))) + (force headList + xs)) + (constr 0 [])) + ds) + (`$dToData` ds)) + [ (\a -> + delay + (constr 0 + [ (`$dUnsafeFromData` + a) ])) + , (delay (constr 1 [])) ]))) + ((\k -> + fix1 + (\go xs -> + force (force chooseList) + xs + (\ds -> []) + (\ds -> + (\hd -> + (\tl -> + force + (force ifThenElse + (equalsData + k + (force + (force + fstPair) + hd)) + (delay tl) + (delay + (force mkCons + hd + (go tl))))) + (force tailList xs)) + (force headList xs)) + (constr 0 [])) + nt) + (iData cse))) + (addInteger 5 n)) + ((\z -> + (\go eta -> + go eta) + (fix1 + (\go + ds -> + force + (case + ds + [ (delay z) + , (\y + ys -> + delay + ((\ds -> + (\ds + ds -> + (\k -> + (\a -> + fix1 + (\go + xs -> + force (force - fstPair) - hd)) - (delay - ((\ds -> - constr 0 - [ (force + chooseList) + xs + (\ds -> + force + mkCons + (mkPairData + k + a) + [ ]) + (\ds -> + (\hd -> + (\tl -> + force + (force + ifThenElse + (equalsData + k + (force + (force + fstPair) + hd)) + (delay + (force + mkCons + (mkPairData + k + a) + tl)) + (delay + (force + mkCons + hd + (go + tl))))) (force - sndPair) - hd) ]) - (force - tailList - xs))) - (delay - (go - (force - tailList - xs))))) - (force headList - xs)) - (constr 0 [])) - ds) - (`$dToData` ds)) - [ (\a -> - delay - (constr 0 - [ (`$dUnsafeFromData` - a) ])) - , (delay (constr 1 [])) ]))) - ((\k -> - fix1 - (\go xs -> - force (force chooseList) - xs - (\ds -> []) - (\ds -> - (\hd -> - (\tl -> - force - (force ifThenElse - (equalsData - k - (force - (force - fstPair) - hd)) - (delay tl) - (delay - (force mkCons - hd - (go tl))))) - (force tailList xs)) - (force headList xs)) - (constr 0 [])) - nt) - (iData cse))) - (addInteger 5 n)) - ((\z -> - (\go eta -> - go eta) - (fix1 - (\go - ds -> - force - (case - ds - [ (delay z) - , (\y - ys -> - delay - ((\ds -> - (\ds - ds -> - (\k -> - (\a -> - fix1 - (\go - xs -> - force - (force - chooseList) - xs - (\ds -> - force - mkCons - (mkPairData - k - a) - [ ]) - (\ds -> - (\hd -> - (\tl -> - force - (force - ifThenElse - (equalsData - k - (force - (force - fstPair) - hd)) - (delay - (force - mkCons - (mkPairData - k - a) - tl)) - (delay - (force - mkCons - hd - (go - tl))))) - (force - tailList - xs)) - (force - headList - xs)) - (constr 0 - [])) - ds) - (bData ds)) - (iData ds)) - (encodeUtf8 - (concatBuiltinStrings - (`$fShowBuiltinByteString_$cshowsPrec` - 0 - y - (constr 0 - []))))) - (addInteger n y) - (go ys))) ])))) - (force mkCons (mkPairData (iData n) (B #30)) []) - (`$fEnumBool_$cenumFromTo` 1 10))) - (fix1 - (\concatBuiltinStrings - ds -> - case - ds - [ "" - , (\x - ds -> - force - (case - ds - [ (delay x) - , (\ipv - ipv -> - delay - (case - ((\n -> - force - (force - ifThenElse - (lessThanEqualsInteger - n - 0) - (delay - (constr 0 - [ (constr 0 - []) - , ds ])) - (delay - (force go - n - ds)))) - (divideInteger - (go ds) - 2)) - [ (\ipv - ipv -> - appendString - (concatBuiltinStrings - ipv) - (concatBuiltinStrings - ipv)) ])) ])) ]))) - (fix1 - (\go ds -> - force - (case - ds - [ (delay 0) - , (\x xs -> - delay (addInteger 1 (go xs))) ])))) - (fix1 - (\go - arg -> - delay - (\ds - ds -> - force - (case - ds - [ (delay - (constr 0 - [(constr 0 []), (constr 0 [])])) - , (\y - ys -> - delay - (force - (force - ifThenElse - (equalsInteger 1 ds) - (delay - (constr 0 - [ (constr 1 - [y, (constr 0 [])]) - , ys ])) - (delay + tailList + xs)) + (force + headList + xs)) + (constr 0 + [ ])) + ds) + (bData ds)) + (iData ds)) + (encodeUtf8 + (concatBuiltinStrings + (`$fShowBuiltinByteString_$cshowsPrec` + 0 + y + (constr 0 + []))))) + (addInteger n y) + (go ys))) ])))) + (force mkCons + (mkPairData (iData n) (B #30)) + []) + (`$fEnumBool_$cenumFromTo` 1 10))) + (fix1 + (\concatBuiltinStrings + ds -> + case + ds + [ "" + , (\x + ds -> + force + (case + ds + [ (delay x) + , (\ipv + ipv -> + delay (case - (force - (go (delay (\x -> x))) - (subtractInteger ds 1) - ys) - [ (\zs - ws -> - constr 0 - [ (constr 1 - [y, zs]) - , ws ]) ]))))) ]))) - (delay (\x -> x)))) - (fix1 - (\`$fShowBuiltinByteString_$cshowsPrec` p n -> - force - (force ifThenElse - (lessThanInteger n 0) - (delay - (\eta -> - constr 1 - [ "-" - , (`$fShowBuiltinByteString_$cshowsPrec` - p - (subtractInteger 0 n) - eta) ])) - (delay (go (go (constr 0 []) n))))))) - (fix1 - (\go - ds -> - force - (case - ds - [ (delay (\x -> x)) - , (\x - xs -> - delay - ((\acc - eta -> - constr 1 - [ (force - (force - ifThenElse - (equalsInteger 0 x) - (delay "0") - (delay - (force - (force - ifThenElse - (equalsInteger 1 x) - (delay "1") - (delay - (force + ((\n -> + force (force ifThenElse - (equalsInteger - 2 - x) - (delay "2") + (lessThanEqualsInteger + n + 0) (delay - (force - (force - ifThenElse - (equalsInteger - 3 - x) - (delay - "3") - (delay - (force - (force - ifThenElse - (equalsInteger - 4 - x) - (delay - "4") - (delay - (force - (force - ifThenElse - (equalsInteger - 5 - x) - (delay - "5") - (delay - (force - (force - ifThenElse - (equalsInteger - 6 - x) - (delay - "6") - (delay - (force - (force - ifThenElse - (equalsInteger - 7 - x) - (delay - "7") - (delay - (force - (force - ifThenElse - (equalsInteger - 8 - x) - (delay - "8") - (delay - (force - ifThenElse - (equalsInteger - 9 - x) - "9" - "")))))))))))))))))))))))))))) - , (acc eta) ]) - (go xs))) ])))) - (fix1 - (\go acc n -> - (\x -> - force - (force ifThenElse - (equalsInteger 0 x) - (delay (constr 1 [(remainderInteger n 10), acc])) - (delay - (go (constr 1 [(remainderInteger n 10), acc]) x)))) - (quotientInteger n 10)))) - (fix1 - (\`$fEnumBool_$cenumFromTo` x lim -> - force - (force ifThenElse - (lessThanEqualsInteger x lim) - (delay - (constr 1 - [x, (`$fEnumBool_$cenumFromTo` (addInteger 1 x) lim)])) - (delay (constr 0 [])))))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file + (constr 0 + [ (constr 0 + []) + , ds ])) + (delay + (force go + n + ds)))) + (divideInteger + (go ds) + 2)) + [ (\ipv + ipv -> + appendString + (concatBuiltinStrings + ipv) + (concatBuiltinStrings + ipv)) ])) ])) ]))) + (fix1 + (\go ds -> + force + (case + ds + [ (delay 0) + , (\x xs -> + delay (addInteger 1 (go xs))) ])))) + (fix1 + (\go + arg -> + delay + (\ds + ds -> + force + (case + ds + [ (delay + (constr 0 + [(constr 0 []), (constr 0 [])])) + , (\y + ys -> + delay + (force + (force + ifThenElse + (equalsInteger 1 ds) + (delay + (constr 0 + [ (constr 1 + [y, (constr 0 [])]) + , ys ])) + (delay + (case + (force + (go + (delay (\x -> x))) + (subtractInteger + ds + 1) + ys) + [ (\zs + ws -> + constr 0 + [ (constr 1 + [y, zs]) + , ws ]) ]))))) ]))) + (delay (\x -> x)))) + (fix1 + (\`$fShowBuiltinByteString_$cshowsPrec` p n -> + force + (force ifThenElse + (lessThanInteger n 0) + (delay + (\eta -> + constr 1 + [ "-" + , (`$fShowBuiltinByteString_$cshowsPrec` + p + (subtractInteger 0 n) + eta) ])) + (delay (go (go (constr 0 []) n))))))) + (fix1 + (\go + ds -> + force + (case + ds + [ (delay (\x -> x)) + , (\x + xs -> + delay + ((\acc + eta -> + constr 1 + [ (force + (force + ifThenElse + (equalsInteger 0 x) + (delay "0") + (delay + (force + (force + ifThenElse + (equalsInteger 1 x) + (delay "1") + (delay + (force + (force + ifThenElse + (equalsInteger + 2 + x) + (delay "2") + (delay + (force + (force + ifThenElse + (equalsInteger + 3 + x) + (delay + "3") + (delay + (force + (force + ifThenElse + (equalsInteger + 4 + x) + (delay + "4") + (delay + (force + (force + ifThenElse + (equalsInteger + 5 + x) + (delay + "5") + (delay + (force + (force + ifThenElse + (equalsInteger + 6 + x) + (delay + "6") + (delay + (force + (force + ifThenElse + (equalsInteger + 7 + x) + (delay + "7") + (delay + (force + (force + ifThenElse + (equalsInteger + 8 + x) + (delay + "8") + (delay + (force + ifThenElse + (equalsInteger + 9 + x) + "9" + "")))))))))))))))))))))))))))) + , (acc eta) ]) + (go xs))) ])))) + (fix1 + (\go acc n -> + (\x -> + force + (force ifThenElse + (equalsInteger 0 x) + (delay (constr 1 [(remainderInteger n 10), acc])) + (delay + (go (constr 1 [(remainderInteger n 10), acc]) x)))) + (quotientInteger n 10)))) + (fix1 + (\`$fEnumBool_$cenumFromTo` x lim -> + force + (force ifThenElse + (lessThanEqualsInteger x lim) + (delay + (constr 1 + [ x + , (`$fEnumBool_$cenumFromTo` (addInteger 1 x) lim) ])) + (delay (constr 0 [])))))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/map2.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/map2.uplc.golden index f1bf99b0f21..fb6d89409d1 100644 --- a/plutus-tx-plugin/test/Budget/9.6/map2.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/map2.uplc.golden @@ -1,272 +1,273 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\go -> - (\goList - n -> - (\unsafeFromList -> - (\cse -> - (\cse -> - (\nt -> - (\go -> - (\nt -> - (\nt -> - fix1 - (\go - ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x - xs -> - delay - (constr 1 - [ (case - x - [ (\k - v -> - constr 0 - [ k - , (decodeUtf8 - v) ]) ]) - , (go xs) ])) ])) - (go nt)) - ((\rs' -> - (\ls' -> go rs' ls') (go nt)) - (fix1 - (\go - xs -> - force - (force chooseList) - xs - (\ds -> []) - (\ds -> - (\hd -> - (\tl' -> - force - (case - ((\k -> - fix1 - (\go - xs -> - force - (force - chooseList) - xs - (\ds -> - constr 1 - []) - (\ds -> - force - (force - ifThenElse - (equalsData - k - (force - (force - fstPair) - (force - headList - xs))) - (delay - ((\ds -> - constr 0 - [ ]) - (force - tailList - xs))) - (delay - (go - (force - tailList - xs))))) - (constr 0 - [])) - nt) - (force +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\go -> + (\goList + n -> + (\unsafeFromList -> + (\cse -> + (\cse -> + (\nt -> + (\go -> + (\nt -> + (\nt -> + fix1 + (\go + ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x + xs -> + delay + (constr 1 + [ (case + x + [ (\k + v -> + constr 0 + [ k + , (decodeUtf8 + v) ]) ]) + , (go xs) ])) ])) + (go nt)) + ((\rs' -> + (\ls' -> go rs' ls') (go nt)) + (fix1 + (\go + xs -> + force + (force chooseList) + xs + (\ds -> []) + (\ds -> + (\hd -> + (\tl' -> + force + (case + ((\k -> + fix1 + (\go + xs -> + force + (force + chooseList) + xs + (\ds -> + constr 1 + []) + (\ds -> + force + (force + ifThenElse + (equalsData + k + (force + (force + fstPair) + (force + headList + xs))) + (delay + ((\ds -> + constr 0 + [ ]) + (force + tailList + xs))) + (delay + (go + (force + tailList + xs))))) + (constr 0 + [])) + nt) + (force + (force + fstPair) + hd)) + [ (delay tl') + , (delay + (force mkCons + hd + tl')) ])) + (go (force tailList xs))) + (force headList xs)) + (constr 0 [])) + nt))) + (unsafeFromList + (\i -> iData i) + bData + (constr 1 + [ (constr 0 [(addInteger 1 n), #6f6e65]) + , (constr 1 + [ (constr 0 + [(addInteger 2 n), #74776f]) + , (constr 1 + [ (constr 0 [cse, #7468726565]) + , (constr 1 + [ (constr 0 + [cse, #666f7572]) + , (constr 1 + [ (constr 0 + [ (addInteger + 5 + n) + , #66697665 ]) + , (constr 0 + [ ]) ]) ]) ]) ]) ]))) + (fix1 + (\go + xs -> + force + (force chooseList) + xs + (\ds -> []) + (\ds -> + (\hd -> + (\tl -> + (\v' -> + (\k' -> + force + (case + (fix1 + (\go + xs -> + force (force - fstPair) - hd)) - [ (delay tl') - , (delay - (force mkCons - hd - tl')) ])) - (go (force tailList xs))) - (force headList xs)) - (constr 0 [])) - nt))) - (unsafeFromList - (\i -> iData i) - bData - (constr 1 - [ (constr 0 [(addInteger 1 n), #6f6e65]) + chooseList) + xs + (\ds -> + constr 1 + []) + (\ds -> + (\hd -> + force + (force + ifThenElse + (equalsData + k' + (force + (force + fstPair) + hd)) + (delay + ((\ds -> + constr 0 + [ (force + (force + sndPair) + hd) ]) + (force + tailList + xs))) + (delay + (go + (force + tailList + xs))))) + (force + headList + xs)) + (constr 0 [])) + nt) + [ (\r -> + delay + (force + mkCons + (mkPairData + k' + (bData + (appendByteString + (unBData + v') + (unBData + r)))) + (go tl))) + , (delay + (force mkCons + (mkPairData + k' + v') + (go tl))) ])) + (force (force fstPair) hd)) + (force (force sndPair) hd)) + (force tailList xs)) + (force headList xs)) + (constr 0 [])))) + (unsafeFromList + (\i -> iData i) + bData + (constr 1 + [ (constr 0 [cse, #5448524545]) + , (constr 1 + [ (constr 0 [cse, #464f5552]) , (constr 1 [ (constr 0 - [(addInteger 2 n), #74776f]) + [(addInteger 6 n), #534958]) , (constr 1 - [ (constr 0 [cse, #7468726565]) - , (constr 1 - [ (constr 0 - [cse, #666f7572]) - , (constr 1 - [ (constr 0 - [ (addInteger - 5 - n) - , #66697665 ]) - , (constr 0 - [ ]) ]) ]) ]) ]) ]))) - (fix1 - (\go - xs -> - force - (force chooseList) - xs - (\ds -> []) - (\ds -> - (\hd -> - (\tl -> - (\v' -> - (\k' -> - force - (case - (fix1 - (\go - xs -> - force - (force - chooseList) - xs - (\ds -> - constr 1 []) - (\ds -> - (\hd -> - force - (force - ifThenElse - (equalsData - k' - (force - (force - fstPair) - hd)) - (delay - ((\ds -> - constr 0 - [ (force - (force - sndPair) - hd) ]) - (force - tailList - xs))) - (delay - (go - (force - tailList - xs))))) - (force - headList - xs)) - (constr 0 [])) - nt) - [ (\r -> - delay - (force - mkCons - (mkPairData - k' - (bData - (appendByteString - (unBData - v') - (unBData - r)))) - (go tl))) - , (delay - (force mkCons - (mkPairData - k' - v') - (go tl))) ])) - (force (force fstPair) hd)) - (force (force sndPair) hd)) - (force tailList xs)) - (force headList xs)) - (constr 0 [])))) - (unsafeFromList - (\i -> iData i) - bData - (constr 1 - [ (constr 0 [cse, #5448524545]) - , (constr 1 - [ (constr 0 [cse, #464f5552]) - , (constr 1 - [ (constr 0 - [(addInteger 6 n), #534958]) - , (constr 1 - [ (constr 0 - [ (addInteger 7 n) - , #534556454e ]) - , (constr 0 []) ]) ]) ]) ]))) - (addInteger 4 n)) - (addInteger 3 n)) - (\`$dToData` `$dToData` -> - (\go eta -> goList (go eta)) - (fix1 - (\go ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (constr 1 - [ (case - x - [ (\k a -> - constr 0 - [ (`$dToData` k) - , (`$dToData` a) ]) ]) - , (go xs) ])) ]))))) - (fix1 - (\goList ds -> - force - (case - ds - [ (delay []) - , (\d ds -> - delay - (force mkCons - (case d [(\d d -> mkPairData d d)]) - (goList ds))) ])))) - (fix1 - (\go acc xs -> - force (force chooseList) - xs - (\ds -> acc) - (\ds -> - go - (force mkCons (force headList xs) acc) - (force tailList xs)) - (constr 0 [])))) - (fix1 - (\go xs -> - force (force chooseList) - xs - (\ds -> constr 0 []) - (\ds -> - (\hd -> - (\tl -> - constr 1 - [ (constr 0 - [ (unIData (force (force fstPair) hd)) - , (unBData (force (force sndPair) hd)) ]) - , (go tl) ]) - (force tailList xs)) - (force headList xs)) - (constr 0 [])))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file + [ (constr 0 + [ (addInteger 7 n) + , #534556454e ]) + , (constr 0 []) ]) ]) ]) ]))) + (addInteger 4 n)) + (addInteger 3 n)) + (\`$dToData` `$dToData` -> + (\go eta -> goList (go eta)) + (fix1 + (\go ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (constr 1 + [ (case + x + [ (\k a -> + constr 0 + [ (`$dToData` k) + , (`$dToData` a) ]) ]) + , (go xs) ])) ]))))) + (fix1 + (\goList ds -> + force + (case + ds + [ (delay []) + , (\d ds -> + delay + (force mkCons + (case d [(\d d -> mkPairData d d)]) + (goList ds))) ])))) + (fix1 + (\go acc xs -> + force (force chooseList) + xs + (\ds -> acc) + (\ds -> + go + (force mkCons (force headList xs) acc) + (force tailList xs)) + (constr 0 [])))) + (fix1 + (\go xs -> + force (force chooseList) + xs + (\ds -> constr 0 []) + (\ds -> + (\hd -> + (\tl -> + constr 1 + [ (constr 0 + [ (unIData (force (force fstPair) hd)) + , (unBData (force (force sndPair) hd)) ]) + , (go tl) ]) + (force tailList xs)) + (force headList xs)) + (constr 0 [])))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/map3.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/map3.uplc.golden index f1bf99b0f21..fb6d89409d1 100644 --- a/plutus-tx-plugin/test/Budget/9.6/map3.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/map3.uplc.golden @@ -1,272 +1,273 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\go -> - (\goList - n -> - (\unsafeFromList -> - (\cse -> - (\cse -> - (\nt -> - (\go -> - (\nt -> - (\nt -> - fix1 - (\go - ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x - xs -> - delay - (constr 1 - [ (case - x - [ (\k - v -> - constr 0 - [ k - , (decodeUtf8 - v) ]) ]) - , (go xs) ])) ])) - (go nt)) - ((\rs' -> - (\ls' -> go rs' ls') (go nt)) - (fix1 - (\go - xs -> - force - (force chooseList) - xs - (\ds -> []) - (\ds -> - (\hd -> - (\tl' -> - force - (case - ((\k -> - fix1 - (\go - xs -> - force - (force - chooseList) - xs - (\ds -> - constr 1 - []) - (\ds -> - force - (force - ifThenElse - (equalsData - k - (force - (force - fstPair) - (force - headList - xs))) - (delay - ((\ds -> - constr 0 - [ ]) - (force - tailList - xs))) - (delay - (go - (force - tailList - xs))))) - (constr 0 - [])) - nt) - (force +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\go -> + (\goList + n -> + (\unsafeFromList -> + (\cse -> + (\cse -> + (\nt -> + (\go -> + (\nt -> + (\nt -> + fix1 + (\go + ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x + xs -> + delay + (constr 1 + [ (case + x + [ (\k + v -> + constr 0 + [ k + , (decodeUtf8 + v) ]) ]) + , (go xs) ])) ])) + (go nt)) + ((\rs' -> + (\ls' -> go rs' ls') (go nt)) + (fix1 + (\go + xs -> + force + (force chooseList) + xs + (\ds -> []) + (\ds -> + (\hd -> + (\tl' -> + force + (case + ((\k -> + fix1 + (\go + xs -> + force + (force + chooseList) + xs + (\ds -> + constr 1 + []) + (\ds -> + force + (force + ifThenElse + (equalsData + k + (force + (force + fstPair) + (force + headList + xs))) + (delay + ((\ds -> + constr 0 + [ ]) + (force + tailList + xs))) + (delay + (go + (force + tailList + xs))))) + (constr 0 + [])) + nt) + (force + (force + fstPair) + hd)) + [ (delay tl') + , (delay + (force mkCons + hd + tl')) ])) + (go (force tailList xs))) + (force headList xs)) + (constr 0 [])) + nt))) + (unsafeFromList + (\i -> iData i) + bData + (constr 1 + [ (constr 0 [(addInteger 1 n), #6f6e65]) + , (constr 1 + [ (constr 0 + [(addInteger 2 n), #74776f]) + , (constr 1 + [ (constr 0 [cse, #7468726565]) + , (constr 1 + [ (constr 0 + [cse, #666f7572]) + , (constr 1 + [ (constr 0 + [ (addInteger + 5 + n) + , #66697665 ]) + , (constr 0 + [ ]) ]) ]) ]) ]) ]))) + (fix1 + (\go + xs -> + force + (force chooseList) + xs + (\ds -> []) + (\ds -> + (\hd -> + (\tl -> + (\v' -> + (\k' -> + force + (case + (fix1 + (\go + xs -> + force (force - fstPair) - hd)) - [ (delay tl') - , (delay - (force mkCons - hd - tl')) ])) - (go (force tailList xs))) - (force headList xs)) - (constr 0 [])) - nt))) - (unsafeFromList - (\i -> iData i) - bData - (constr 1 - [ (constr 0 [(addInteger 1 n), #6f6e65]) + chooseList) + xs + (\ds -> + constr 1 + []) + (\ds -> + (\hd -> + force + (force + ifThenElse + (equalsData + k' + (force + (force + fstPair) + hd)) + (delay + ((\ds -> + constr 0 + [ (force + (force + sndPair) + hd) ]) + (force + tailList + xs))) + (delay + (go + (force + tailList + xs))))) + (force + headList + xs)) + (constr 0 [])) + nt) + [ (\r -> + delay + (force + mkCons + (mkPairData + k' + (bData + (appendByteString + (unBData + v') + (unBData + r)))) + (go tl))) + , (delay + (force mkCons + (mkPairData + k' + v') + (go tl))) ])) + (force (force fstPair) hd)) + (force (force sndPair) hd)) + (force tailList xs)) + (force headList xs)) + (constr 0 [])))) + (unsafeFromList + (\i -> iData i) + bData + (constr 1 + [ (constr 0 [cse, #5448524545]) + , (constr 1 + [ (constr 0 [cse, #464f5552]) , (constr 1 [ (constr 0 - [(addInteger 2 n), #74776f]) + [(addInteger 6 n), #534958]) , (constr 1 - [ (constr 0 [cse, #7468726565]) - , (constr 1 - [ (constr 0 - [cse, #666f7572]) - , (constr 1 - [ (constr 0 - [ (addInteger - 5 - n) - , #66697665 ]) - , (constr 0 - [ ]) ]) ]) ]) ]) ]))) - (fix1 - (\go - xs -> - force - (force chooseList) - xs - (\ds -> []) - (\ds -> - (\hd -> - (\tl -> - (\v' -> - (\k' -> - force - (case - (fix1 - (\go - xs -> - force - (force - chooseList) - xs - (\ds -> - constr 1 []) - (\ds -> - (\hd -> - force - (force - ifThenElse - (equalsData - k' - (force - (force - fstPair) - hd)) - (delay - ((\ds -> - constr 0 - [ (force - (force - sndPair) - hd) ]) - (force - tailList - xs))) - (delay - (go - (force - tailList - xs))))) - (force - headList - xs)) - (constr 0 [])) - nt) - [ (\r -> - delay - (force - mkCons - (mkPairData - k' - (bData - (appendByteString - (unBData - v') - (unBData - r)))) - (go tl))) - , (delay - (force mkCons - (mkPairData - k' - v') - (go tl))) ])) - (force (force fstPair) hd)) - (force (force sndPair) hd)) - (force tailList xs)) - (force headList xs)) - (constr 0 [])))) - (unsafeFromList - (\i -> iData i) - bData - (constr 1 - [ (constr 0 [cse, #5448524545]) - , (constr 1 - [ (constr 0 [cse, #464f5552]) - , (constr 1 - [ (constr 0 - [(addInteger 6 n), #534958]) - , (constr 1 - [ (constr 0 - [ (addInteger 7 n) - , #534556454e ]) - , (constr 0 []) ]) ]) ]) ]))) - (addInteger 4 n)) - (addInteger 3 n)) - (\`$dToData` `$dToData` -> - (\go eta -> goList (go eta)) - (fix1 - (\go ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (constr 1 - [ (case - x - [ (\k a -> - constr 0 - [ (`$dToData` k) - , (`$dToData` a) ]) ]) - , (go xs) ])) ]))))) - (fix1 - (\goList ds -> - force - (case - ds - [ (delay []) - , (\d ds -> - delay - (force mkCons - (case d [(\d d -> mkPairData d d)]) - (goList ds))) ])))) - (fix1 - (\go acc xs -> - force (force chooseList) - xs - (\ds -> acc) - (\ds -> - go - (force mkCons (force headList xs) acc) - (force tailList xs)) - (constr 0 [])))) - (fix1 - (\go xs -> - force (force chooseList) - xs - (\ds -> constr 0 []) - (\ds -> - (\hd -> - (\tl -> - constr 1 - [ (constr 0 - [ (unIData (force (force fstPair) hd)) - , (unBData (force (force sndPair) hd)) ]) - , (go tl) ]) - (force tailList xs)) - (force headList xs)) - (constr 0 [])))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file + [ (constr 0 + [ (addInteger 7 n) + , #534556454e ]) + , (constr 0 []) ]) ]) ]) ]))) + (addInteger 4 n)) + (addInteger 3 n)) + (\`$dToData` `$dToData` -> + (\go eta -> goList (go eta)) + (fix1 + (\go ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (constr 1 + [ (case + x + [ (\k a -> + constr 0 + [ (`$dToData` k) + , (`$dToData` a) ]) ]) + , (go xs) ])) ]))))) + (fix1 + (\goList ds -> + force + (case + ds + [ (delay []) + , (\d ds -> + delay + (force mkCons + (case d [(\d d -> mkPairData d d)]) + (goList ds))) ])))) + (fix1 + (\go acc xs -> + force (force chooseList) + xs + (\ds -> acc) + (\ds -> + go + (force mkCons (force headList xs) acc) + (force tailList xs)) + (constr 0 [])))) + (fix1 + (\go xs -> + force (force chooseList) + xs + (\ds -> constr 0 []) + (\ds -> + (\hd -> + (\tl -> + constr 1 + [ (constr 0 + [ (unIData (force (force fstPair) hd)) + , (unBData (force (force sndPair) hd)) ]) + , (go tl) ]) + (force tailList xs)) + (force headList xs)) + (constr 0 [])))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/monadicDo.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/monadicDo.uplc.golden index f9c81874ea3..de611eedb67 100644 --- a/plutus-tx-plugin/test/Budget/9.6/monadicDo.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/monadicDo.uplc.golden @@ -1,10 +1,10 @@ -program - 1.1.0 - ((\`$fMonadMaybe_$c>>=` -> - `$fMonadMaybe_$c>>=` - (constr 0 [1]) - (\x' -> - `$fMonadMaybe_$c>>=` - (constr 0 [2]) - (\y' -> constr 0 [(addInteger x' y')]))) - (\ds k -> force (case ds [(\x -> delay (k x)), (delay (constr 1 []))]))) \ No newline at end of file +(program + 1.1.0 + ((\`$fMonadMaybe_$c>>=` -> + `$fMonadMaybe_$c>>=` + (constr 0 [1]) + (\x' -> + `$fMonadMaybe_$c>>=` + (constr 0 [2]) + (\y' -> constr 0 [(addInteger x' y')]))) + (\ds k -> force (case ds [(\x -> delay (k x)), (delay (constr 1 []))])))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/not-not.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/not-not.uplc.golden index fb3a319d9f9..fe1c700ea88 100644 --- a/plutus-tx-plugin/test/Budget/9.6/not-not.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/not-not.uplc.golden @@ -1,12 +1,12 @@ -program - 1.1.0 - ((\x -> - force - (case - (force - (force ifThenElse - (lessThanInteger 0 x) - (delay (constr 1 [])) - (delay (constr 0 [])))) - [(delay (constr 1 [])), (delay (constr 0 []))])) - 1) \ No newline at end of file +(program + 1.1.0 + ((\x -> + force + (case + (force + (force ifThenElse + (lessThanInteger 0 x) + (delay (constr 1 [])) + (delay (constr 0 [])))) + [(delay (constr 1 [])), (delay (constr 0 []))])) + 1)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/notElemCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/notElemCheap.uplc.golden index 222508a75bf..b8693a889e2 100644 --- a/plutus-tx-plugin/test/Budget/9.6/notElemCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/notElemCheap.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (equalsInteger 1 x) - (delay (constr 1 [])) - (delay (s s xs))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (equalsInteger 1 x) + (delay (constr 1 [])) + (delay (s s xs))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.uplc.golden index 4bf32effaa2..bf82bf5d910 100644 --- a/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.uplc.golden @@ -1,38 +1,38 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (force ifThenElse - (equalsInteger 0 x) - (delay (constr 1 [])) - (delay (s s xs))))) ])) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (force ifThenElse + (equalsInteger 0 x) + (delay (constr 1 [])) + (delay (s s xs))))) ])) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/null.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/null.uplc.golden index 82ae7e6d845..8cea17095f8 100644 --- a/plutus-tx-plugin/test/Budget/9.6/null.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/null.uplc.golden @@ -1 +1 @@ -program 1.1.0 (constr 1 []) \ No newline at end of file +(program 1.1.0 (constr 1 [])) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/orCheap.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/orCheap.uplc.golden index 07f7cdbe6c6..22714ff32ac 100644 --- a/plutus-tx-plugin/test/Budget/9.6/orCheap.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/orCheap.uplc.golden @@ -1,35 +1,35 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (case x [(delay (constr 0 [])), (delay (s s xs))]))) ])) - (constr 1 - [ (constr 0 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (case x [(delay (constr 0 [])), (delay (s s xs))]))) ])) + (constr 1 + [ (constr 0 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/orExpensive.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/orExpensive.uplc.golden index 999d48fa89a..12afb874897 100644 --- a/plutus-tx-plugin/test/Budget/9.6/orExpensive.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/orExpensive.uplc.golden @@ -1,35 +1,35 @@ -program - 1.1.0 - ((\s -> - s s) - (\s ds -> - force - (case - ds - [ (delay (constr 1 [])) - , (\x xs -> - delay - (force - (case x [(delay (constr 0 [])), (delay (s s xs))]))) ])) - (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 1 - [ (constr 1 []) - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) \ No newline at end of file +(program + 1.1.0 + ((\s -> + s s) + (\s ds -> + force + (case + ds + [ (delay (constr 1 [])) + , (\x xs -> + delay + (force + (case x [(delay (constr 0 [])), (delay (s s xs))]))) ])) + (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 1 + [ (constr 1 []) + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/patternMatch.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/patternMatch.uplc.golden index eff0c489f34..2636cbd763d 100644 --- a/plutus-tx-plugin/test/Budget/9.6/patternMatch.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/patternMatch.uplc.golden @@ -1 +1 @@ -program 1.1.0 (constr 0 [3]) \ No newline at end of file +(program 1.1.0 (constr 0 [3])) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.uplc.golden index fbfc5432b98..577d76660b4 100644 --- a/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.uplc.golden @@ -1,42 +1,43 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\recursiveAll -> - (\ls -> - force recursiveAll - (\v -> - force ifThenElse - (lessThanInteger v 0) - (constr 1 []) - (constr 0 [])) - ls) - (go 1000)) - (fix1 - (\recursiveAll arg -> - delay - (\ds ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (case - (ds x) - [ (delay - (force - (recursiveAll (delay (\x -> x))) - ds - xs)) - , (delay (constr 1 [])) ]))) ]))) - (delay (\x -> x)))) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [0, (go (subtractInteger n 1))])))))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\recursiveAll -> + (\ls -> + force recursiveAll + (\v -> + force ifThenElse + (lessThanInteger v 0) + (constr 1 []) + (constr 0 [])) + ls) + (go 1000)) + (fix1 + (\recursiveAll arg -> + delay + (\ds ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (case + (ds x) + [ (delay + (force + (recursiveAll + (delay (\x -> x))) + ds + xs)) + , (delay (constr 1 [])) ]))) ]))) + (delay (\x -> x)))) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [0, (go (subtractInteger n 1))])))))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.uplc.golden index 8a391a66f29..d443273a883 100644 --- a/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.uplc.golden @@ -1,42 +1,43 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\recursiveAll -> - (\ls -> - force recursiveAll - (\v -> - force ifThenElse - (lessThanEqualsInteger v 0) - (constr 0 []) - (constr 1 [])) - ls) - (go 1000)) - (fix1 - (\recursiveAll arg -> - delay - (\ds ds -> - force - (case - ds - [ (delay (constr 0 [])) - , (\x xs -> - delay - (force - (case - (ds x) - [ (delay - (force - (recursiveAll (delay (\x -> x))) - ds - xs)) - , (delay (constr 1 [])) ]))) ]))) - (delay (\x -> x)))) - (fix1 - (\go n -> - force - (force ifThenElse - (lessThanEqualsInteger n 0) - (delay (constr 0 [])) - (delay (constr 1 [0, (go (subtractInteger n 1))])))))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\recursiveAll -> + (\ls -> + force recursiveAll + (\v -> + force ifThenElse + (lessThanEqualsInteger v 0) + (constr 0 []) + (constr 1 [])) + ls) + (go 1000)) + (fix1 + (\recursiveAll arg -> + delay + (\ds ds -> + force + (case + ds + [ (delay (constr 0 [])) + , (\x xs -> + delay + (force + (case + (ds x) + [ (delay + (force + (recursiveAll + (delay (\x -> x))) + ds + xs)) + , (delay (constr 1 [])) ]))) ]))) + (delay (\x -> x)))) + (fix1 + (\go n -> + force + (force ifThenElse + (lessThanEqualsInteger n 0) + (delay (constr 0 [])) + (delay (constr 1 [0, (go (subtractInteger n 1))])))))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/show.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/show.uplc.golden index 29764c4e857..b4c417b783e 100644 --- a/plutus-tx-plugin/test/Budget/9.6/show.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/show.uplc.golden @@ -1,426 +1,431 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\go -> - (\`$fShowBuiltinByteString_$cshowsPrec` -> - (\toHex -> - (\go -> - (\`$fEnumBool_$cenumFromTo` -> - (\go -> - (\go -> - (\concatBuiltinStrings -> - (\a -> - (\c -> - (\d -> - (\cse -> - (\e -> - (\cse -> - multiplyInteger - 2 - (force - trace - (concatBuiltinStrings - (constr 1 - [ "(" - , (cse - (constr 1 - [ "," - , (cse - (constr 1 - [ "," - , (cse - c - (constr 1 - [ "," - , (cse - d - (constr 1 - [ "," - , (cse - e - (constr 1 - [ ")" - , (constr 0 - [ ]) ])) ])) ])) ])) ])) ])) - e)) - (cse a)) - (force - trace - (concatBuiltinStrings - ((\go -> - constr 1 - [ "[" - , (cse - a - (go - (constr 1 - [ a - , (constr 1 - [ c - , (constr 1 - [ d - , (constr 0 - [ ]) ]) ]) ]) - (constr 1 - [ "]" - , (constr 0 - [ ]) ]))) ]) - (fix1 - (\go - ds -> - force - (case - ds - [ (delay - (\x -> - x)) - , (\x - xs -> - delay - ((\acc - eta -> - constr 1 - [ "," - , (cse - x - (acc - eta)) ]) - (go - xs))) ]))))) - d)) - (`$fShowBuiltinByteString_$cshowsPrec` - 0)) - (force trace - (force ifThenElse - (lessThanEqualsInteger c 0) - "False" - "True") - c)) - (force trace - (concatBuiltinStrings - (go - (`$fEnumBool_$cenumFromTo` 0 17) - (constr 0 []))) - a)) - (force - trace - ((\x -> - concatBuiltinStrings - (`$fShowBuiltinByteString_$cshowsPrec` - 0 - x - (constr 0 []))) - -1234567890) - -1234567890)) - (fix1 - (\concatBuiltinStrings - ds -> - case - ds - [ "" - , (\x - ds -> - force - (case - ds - [ (delay x) - , (\ipv - ipv -> - delay - (case - ((\n -> - force - (force - ifThenElse - (lessThanEqualsInteger - n - 0) - (delay - (constr 0 - [ (constr 0 - [ ]) - , ds ])) - (delay - (force - go - n - ds)))) - (divideInteger - (go ds) - 2)) - [ (\ipv - ipv -> - appendString - (concatBuiltinStrings - ipv) - (concatBuiltinStrings - ipv)) ])) ])) ]))) - (fix1 - (\go ds -> - force - (case - ds - [ (delay 0) - , (\x xs -> - delay (addInteger 1 (go xs))) ])))) - (fix1 - (\go - arg -> - delay - (\ds - ds -> - force - (case - ds - [ (delay - (constr 0 - [ (constr 0 []) - , (constr 0 []) ])) - , (\y - ys -> - delay - (force - (force - ifThenElse - (equalsInteger 1 ds) - (delay - (constr 0 - [ (constr 1 - [ y - , (constr 0 - []) ]) - , ys ])) - (delay - (case - (force - (go - (delay - (\x -> - x))) - (subtractInteger - ds - 1) - ys) - [ (\zs - ws -> - constr 0 - [ (constr 1 - [ y - , zs ]) - , ws ]) ]))))) ]))) - (delay (\x -> x)))) - (fix1 - (\`$fEnumBool_$cenumFromTo` x lim -> - force - (force ifThenElse - (lessThanEqualsInteger x lim) - (delay - (constr 1 - [ x - , (`$fEnumBool_$cenumFromTo` - (addInteger 1 x) - lim) ])) - (delay (constr 0 [])))))) - (fix1 - (\go - ds -> - force - (case - ds - [ (delay (\x -> x)) - , (\x - xs -> - delay - ((\acc - eta -> - (\x eta -> - toHex - (divideInteger x 16) - (toHex (modInteger x 16) eta)) - (indexByteString - #5468697320697320616e206578616d706c65 - x) - (acc eta)) - (go xs))) ])))) - (\x -> - force - (force - ifThenElse - (lessThanEqualsInteger x 9) - (delay (`$fShowBuiltinByteString_$cshowsPrec` 0 x)) - (delay - (force - (force - ifThenElse - (equalsInteger 10 x) - (delay (\ds -> constr 1 ["a", ds])) - (delay - (force - (force - ifThenElse - (equalsInteger 11 x) - (delay (\ds -> constr 1 ["b", ds])) - (delay - (force - (force - ifThenElse - (equalsInteger 12 x) - (delay - (\ds -> - constr 1 ["c", ds])) - (delay - (force - (force - ifThenElse - (equalsInteger - 13 - x) - (delay - (\ds -> - constr 1 - ["d", ds])) - (delay - (force - (force - ifThenElse - (equalsInteger - 14 - x) - (delay - (\ds -> - constr 1 - [ "e" - , ds ])) - (delay - (force - ifThenElse - (equalsInteger - 15 - x) - (\ds -> - constr 1 - [ "f" - , ds ]) - (\ds -> +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\go -> + (\`$fShowBuiltinByteString_$cshowsPrec` -> + (\toHex -> + (\go -> + (\`$fEnumBool_$cenumFromTo` -> + (\go -> + (\go -> + (\concatBuiltinStrings -> + (\a -> + (\c -> + (\d -> + (\cse -> + (\e -> + (\cse -> + multiplyInteger + 2 + (force + trace + (concatBuiltinStrings + (constr 1 + [ "(" + , (cse + (constr 1 + [ "," + , (cse + (constr 1 + [ "," + , (cse + c + (constr 1 + [ "," + , (cse + d + (constr 1 + [ "," + , (cse + e + (constr 1 + [ ")" + , (constr 0 + [ ]) ])) ])) ])) ])) ])) ])) + e)) + (cse a)) + (force + trace + (concatBuiltinStrings + ((\go -> + constr 1 + [ "[" + , (cse + a + (go + (constr 1 + [ a + , (constr 1 + [ c + , (constr 1 + [ d + , (constr 0 + [ ]) ]) ]) ]) + (constr 1 + [ "]" + , (constr 0 + [ ]) ]))) ]) + (fix1 + (\go + ds -> + force + (case + ds + [ (delay + (\x -> + x)) + , (\x + xs -> + delay + ((\acc + eta -> constr 1 - [ "" - , ds ]))))))))))))))))))))) - (fix1 - (\`$fShowBuiltinByteString_$cshowsPrec` p n -> - force - (force ifThenElse - (lessThanInteger n 0) - (delay - (\eta -> - constr 1 - [ "-" - , (`$fShowBuiltinByteString_$cshowsPrec` - p - (subtractInteger 0 n) - eta) ])) - (delay (go (go (constr 0 []) n))))))) - (fix1 - (\go - ds -> - force - (case - ds - [ (delay (\x -> x)) - , (\x - xs -> - delay - ((\acc - eta -> - constr 1 - [ (force - (force - ifThenElse - (equalsInteger 0 x) - (delay "0") - (delay - (force - (force - ifThenElse - (equalsInteger 1 x) - (delay "1") - (delay - (force - (force - ifThenElse - (equalsInteger 2 x) - (delay "2") - (delay - (force + [ "," + , (cse + x + (acc + eta)) ]) + (go + xs))) ]))))) + d)) + (`$fShowBuiltinByteString_$cshowsPrec` + 0)) + (force trace + (force ifThenElse + (lessThanEqualsInteger c 0) + "False" + "True") + c)) + (force trace + (concatBuiltinStrings + (go + (`$fEnumBool_$cenumFromTo` 0 17) + (constr 0 []))) + a)) + (force + trace + ((\x -> + concatBuiltinStrings + (`$fShowBuiltinByteString_$cshowsPrec` + 0 + x + (constr 0 []))) + -1234567890) + -1234567890)) + (fix1 + (\concatBuiltinStrings + ds -> + case + ds + [ "" + , (\x + ds -> + force + (case + ds + [ (delay x) + , (\ipv + ipv -> + delay + (case + ((\n -> + force (force ifThenElse - (equalsInteger - 3 - x) + (lessThanEqualsInteger + n + 0) (delay - "3") + (constr 0 + [ (constr 0 + [ ]) + , ds ])) (delay (force - (force - ifThenElse - (equalsInteger - 4 - x) - (delay - "4") - (delay - (force - (force - ifThenElse - (equalsInteger - 5 - x) - (delay - "5") - (delay - (force - (force - ifThenElse - (equalsInteger - 6 - x) - (delay - "6") - (delay - (force - (force - ifThenElse - (equalsInteger - 7 - x) - (delay - "7") - (delay - (force - (force - ifThenElse - (equalsInteger - 8 - x) - (delay - "8") - (delay - (force - ifThenElse - (equalsInteger - 9 - x) - "9" - "")))))))))))))))))))))))))))) - , (acc eta) ]) - (go xs))) ])))) - (fix1 - (\go acc n -> - (\x -> - force - (force ifThenElse - (equalsInteger 0 x) - (delay (constr 1 [(remainderInteger n 10), acc])) - (delay (go (constr 1 [(remainderInteger n 10), acc]) x)))) - (quotientInteger n 10)))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file + go + n + ds)))) + (divideInteger + (go ds) + 2)) + [ (\ipv + ipv -> + appendString + (concatBuiltinStrings + ipv) + (concatBuiltinStrings + ipv)) ])) ])) ]))) + (fix1 + (\go ds -> + force + (case + ds + [ (delay 0) + , (\x xs -> + delay + (addInteger 1 (go xs))) ])))) + (fix1 + (\go + arg -> + delay + (\ds + ds -> + force + (case + ds + [ (delay + (constr 0 + [ (constr 0 []) + , (constr 0 []) ])) + , (\y + ys -> + delay + (force + (force + ifThenElse + (equalsInteger 1 ds) + (delay + (constr 0 + [ (constr 1 + [ y + , (constr 0 + []) ]) + , ys ])) + (delay + (case + (force + (go + (delay + (\x -> + x))) + (subtractInteger + ds + 1) + ys) + [ (\zs + ws -> + constr 0 + [ (constr 1 + [ y + , zs ]) + , ws ]) ]))))) ]))) + (delay (\x -> x)))) + (fix1 + (\`$fEnumBool_$cenumFromTo` x lim -> + force + (force ifThenElse + (lessThanEqualsInteger x lim) + (delay + (constr 1 + [ x + , (`$fEnumBool_$cenumFromTo` + (addInteger 1 x) + lim) ])) + (delay (constr 0 [])))))) + (fix1 + (\go + ds -> + force + (case + ds + [ (delay (\x -> x)) + , (\x + xs -> + delay + ((\acc + eta -> + (\x eta -> + toHex + (divideInteger x 16) + (toHex (modInteger x 16) eta)) + (indexByteString + #5468697320697320616e206578616d706c65 + x) + (acc eta)) + (go xs))) ])))) + (\x -> + force + (force + ifThenElse + (lessThanEqualsInteger x 9) + (delay (`$fShowBuiltinByteString_$cshowsPrec` 0 x)) + (delay + (force + (force + ifThenElse + (equalsInteger 10 x) + (delay (\ds -> constr 1 ["a", ds])) + (delay + (force + (force + ifThenElse + (equalsInteger 11 x) + (delay (\ds -> constr 1 ["b", ds])) + (delay + (force + (force + ifThenElse + (equalsInteger 12 x) + (delay + (\ds -> + constr 1 ["c", ds])) + (delay + (force + (force + ifThenElse + (equalsInteger + 13 + x) + (delay + (\ds -> + constr 1 + [ "d" + , ds ])) + (delay + (force + (force + ifThenElse + (equalsInteger + 14 + x) + (delay + (\ds -> + constr 1 + [ "e" + , ds ])) + (delay + (force + ifThenElse + (equalsInteger + 15 + x) + (\ds -> + constr 1 + [ "f" + , ds ]) + (\ds -> + constr 1 + [ "" + , ds ]))))))))))))))))))))) + (fix1 + (\`$fShowBuiltinByteString_$cshowsPrec` p n -> + force + (force ifThenElse + (lessThanInteger n 0) + (delay + (\eta -> + constr 1 + [ "-" + , (`$fShowBuiltinByteString_$cshowsPrec` + p + (subtractInteger 0 n) + eta) ])) + (delay (go (go (constr 0 []) n))))))) + (fix1 + (\go + ds -> + force + (case + ds + [ (delay (\x -> x)) + , (\x + xs -> + delay + ((\acc + eta -> + constr 1 + [ (force + (force + ifThenElse + (equalsInteger 0 x) + (delay "0") + (delay + (force + (force + ifThenElse + (equalsInteger 1 x) + (delay "1") + (delay + (force + (force + ifThenElse + (equalsInteger + 2 + x) + (delay "2") + (delay + (force + (force + ifThenElse + (equalsInteger + 3 + x) + (delay + "3") + (delay + (force + (force + ifThenElse + (equalsInteger + 4 + x) + (delay + "4") + (delay + (force + (force + ifThenElse + (equalsInteger + 5 + x) + (delay + "5") + (delay + (force + (force + ifThenElse + (equalsInteger + 6 + x) + (delay + "6") + (delay + (force + (force + ifThenElse + (equalsInteger + 7 + x) + (delay + "7") + (delay + (force + (force + ifThenElse + (equalsInteger + 8 + x) + (delay + "8") + (delay + (force + ifThenElse + (equalsInteger + 9 + x) + "9" + "")))))))))))))))))))))))))))) + , (acc eta) ]) + (go xs))) ])))) + (fix1 + (\go acc n -> + (\x -> + force + (force ifThenElse + (equalsInteger 0 x) + (delay (constr 1 [(remainderInteger n 10), acc])) + (delay + (go (constr 1 [(remainderInteger n 10), acc]) x)))) + (quotientInteger n 10)))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/sum.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/sum.uplc.golden index 22d067a2473..b7b1aaf24e0 100644 --- a/plutus-tx-plugin/test/Budget/9.6/sum.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/sum.uplc.golden @@ -1,35 +1,35 @@ -program - 1.1.0 - ((\`$dAdditiveMonoid` -> - (\f -> - (\z -> - (\go eta -> go eta) - ((\s -> s s) - (\s ds -> - force - (case ds [(delay z), (\x xs -> delay (f x (s s xs)))])))) - (case `$dAdditiveMonoid` [(\v v -> v)])) - (case `$dAdditiveMonoid` [(\v v -> v)]) - (constr 1 - [ 1 - , (constr 1 - [ 2 - , (constr 1 - [ 3 - , (constr 1 - [ 4 - , (constr 1 - [ 5 - , (constr 1 - [ 6 - , (constr 1 - [ 7 - , (constr 1 - [ 8 - , (constr 1 - [ 9 - , (constr 1 - [ 10 - , (constr 0 - [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) - (constr 0 [(\x y -> addInteger x y), 0])) \ No newline at end of file +(program + 1.1.0 + ((\`$dAdditiveMonoid` -> + (\f -> + (\z -> + (\go eta -> go eta) + ((\s -> s s) + (\s ds -> + force + (case ds [(delay z), (\x xs -> delay (f x (s s xs)))])))) + (case `$dAdditiveMonoid` [(\v v -> v)])) + (case `$dAdditiveMonoid` [(\v v -> v)]) + (constr 1 + [ 1 + , (constr 1 + [ 2 + , (constr 1 + [ 3 + , (constr 1 + [ 4 + , (constr 1 + [ 5 + , (constr 1 + [ 6 + , (constr 1 + [ 7 + , (constr 1 + [ 8 + , (constr 1 + [ 9 + , (constr 1 + [ 10 + , (constr 0 + [ ]) ]) ]) ]) ]) ]) ]) ]) ]) ]) ])) + (constr 0 [(\x y -> addInteger x y), 0]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/sumL.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/sumL.uplc.golden index 25d99747af2..5c4daae671f 100644 --- a/plutus-tx-plugin/test/Budget/9.6/sumL.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/sumL.uplc.golden @@ -1,27 +1,27 @@ -program - 1.1.0 - ((\fix1 -> - (\go -> - (\ls -> go 0 ls) - (fix1 - (\`$fEnumBool_$cenumFromTo` x lim -> - force - (force ifThenElse - (lessThanEqualsInteger x lim) - (delay - (constr 1 - [ x - , (`$fEnumBool_$cenumFromTo` - (addInteger 1 x) - lim) ])) - (delay (constr 0 [])))) - 1 - 1000)) - (fix1 - (\go acc ds -> - force - (case - ds - [ (delay acc) - , (\x xs -> delay (go (addInteger acc x) xs)) ])))) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + (\go -> + (\ls -> go 0 ls) + (fix1 + (\`$fEnumBool_$cenumFromTo` x lim -> + force + (force ifThenElse + (lessThanEqualsInteger x lim) + (delay + (constr 1 + [ x + , (`$fEnumBool_$cenumFromTo` + (addInteger 1 x) + lim) ])) + (delay (constr 0 [])))) + 1 + 1000)) + (fix1 + (\go acc ds -> + force + (case + ds + [ (delay acc) + , (\x xs -> delay (go (addInteger acc x) xs)) ])))) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/sumR.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/sumR.uplc.golden index 67c0c138204..d7c08c2d03c 100644 --- a/plutus-tx-plugin/test/Budget/9.6/sumR.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/sumR.uplc.golden @@ -1,18 +1,20 @@ -program - 1.1.0 - ((\fix1 -> - fix1 - (\go ds -> - force (case ds [(delay 0), (\x xs -> delay (addInteger x (go xs)))])) - (fix1 - (\`$fEnumBool_$cenumFromTo` x lim -> - force - (force ifThenElse - (lessThanEqualsInteger x lim) - (delay - (constr 1 - [x, (`$fEnumBool_$cenumFromTo` (addInteger 1 x) lim)])) - (delay (constr 0 [])))) - 1 - 1000)) - (\f -> (\s -> s s) (\s -> f (\x -> s s x)))) \ No newline at end of file +(program + 1.1.0 + ((\fix1 -> + fix1 + (\go ds -> + force + (case ds [(delay 0), (\x xs -> delay (addInteger x (go xs)))])) + (fix1 + (\`$fEnumBool_$cenumFromTo` x lim -> + force + (force ifThenElse + (lessThanEqualsInteger x lim) + (delay + (constr 1 + [ x + , (`$fEnumBool_$cenumFromTo` (addInteger 1 x) lim) ])) + (delay (constr 0 [])))) + 1 + 1000)) + (\f -> (\s -> s s) (\s -> f (\x -> s s x))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Budget/9.6/toFromData.uplc.golden b/plutus-tx-plugin/test/Budget/9.6/toFromData.uplc.golden index 2eaef3eabab..0ff6e703bc5 100644 --- a/plutus-tx-plugin/test/Budget/9.6/toFromData.uplc.golden +++ b/plutus-tx-plugin/test/Budget/9.6/toFromData.uplc.golden @@ -1,172 +1,172 @@ -program - 1.1.0 - ((\traceError -> - (\tup -> - (\index -> - (\args -> - force - (force - ifThenElse - (equalsInteger 0 index) - (delay (constr 0 [(unIData (force headList args))])) - (delay - (force - (force - ifThenElse - (equalsInteger 1 index) - (delay - (constr 1 - [ ((\tup -> - (\index -> - (\args -> - force - (force - ifThenElse - (equalsInteger 1 index) - (delay (constr 1 [])) - (delay - (force - (force - ifThenElse - (equalsInteger - 0 - index) - (delay - (constr 0 - [ ((\tup -> - (\index -> - (\args -> - force - (force - ifThenElse - (equalsInteger - 0 - index) - (delay - ((\l -> - constr 0 - [ ((\tup -> - (\index -> - (\args -> - force - (force - ifThenElse - (equalsInteger - 0 - index) - (delay - (constr 1 - [ ])) - (delay - (force - (force - ifThenElse - (equalsInteger - 1 - index) - (delay - (constr 0 - [ ])) - (delay - (traceError - "PT1"))))))) - (force - (force - sndPair) - tup)) - (force - (force - fstPair) - tup)) - (unConstrData - (force - headList - args))) - , (unIData - (force - headList - l)) - , ((\tup -> - (\index -> - (\args -> - force - (force - ifThenElse - (equalsInteger - 0 - index) - (delay - (constr 1 - [ ])) - (delay - (force - (force - ifThenElse - (equalsInteger - 1 - index) - (delay - (constr 0 - [ ])) - (delay - (traceError - "PT1"))))))) - (force - (force - sndPair) - tup)) - (force - (force - fstPair) - tup)) - (unConstrData - (force - headList - (force - tailList - l)))) ]) - (force - tailList - args))) - (delay - (traceError - "PT1")))) - (force - (force - sndPair) - tup)) - (force - (force - fstPair) - tup)) - (unConstrData - (force - headList - args))) ])) - (delay - (traceError - "PT1"))))))) - (force (force sndPair) tup)) - (force (force fstPair) tup)) - (unConstrData - (force headList args))) ])) - (delay (traceError "PT1"))))))) - (force (force sndPair) tup)) - (force (force fstPair) tup)) - (unConstrData - (constrData - 1 - (force mkCons - (constrData - 0 - (force mkCons - (constrData - 0 - (force mkCons - (Constr 1 []) - (force mkCons - (iData 1) - (force mkCons (Constr 0 []) [])))) - [])) - [])))) - (\str -> (\x -> error) (force trace str (constr 0 [])))) \ No newline at end of file +(program + 1.1.0 + ((\traceError -> + (\tup -> + (\index -> + (\args -> + force + (force + ifThenElse + (equalsInteger 0 index) + (delay (constr 0 [(unIData (force headList args))])) + (delay + (force + (force + ifThenElse + (equalsInteger 1 index) + (delay + (constr 1 + [ ((\tup -> + (\index -> + (\args -> + force + (force + ifThenElse + (equalsInteger 1 index) + (delay (constr 1 [])) + (delay + (force + (force + ifThenElse + (equalsInteger + 0 + index) + (delay + (constr 0 + [ ((\tup -> + (\index -> + (\args -> + force + (force + ifThenElse + (equalsInteger + 0 + index) + (delay + ((\l -> + constr 0 + [ ((\tup -> + (\index -> + (\args -> + force + (force + ifThenElse + (equalsInteger + 0 + index) + (delay + (constr 1 + [ ])) + (delay + (force + (force + ifThenElse + (equalsInteger + 1 + index) + (delay + (constr 0 + [ ])) + (delay + (traceError + "PT1"))))))) + (force + (force + sndPair) + tup)) + (force + (force + fstPair) + tup)) + (unConstrData + (force + headList + args))) + , (unIData + (force + headList + l)) + , ((\tup -> + (\index -> + (\args -> + force + (force + ifThenElse + (equalsInteger + 0 + index) + (delay + (constr 1 + [ ])) + (delay + (force + (force + ifThenElse + (equalsInteger + 1 + index) + (delay + (constr 0 + [ ])) + (delay + (traceError + "PT1"))))))) + (force + (force + sndPair) + tup)) + (force + (force + fstPair) + tup)) + (unConstrData + (force + headList + (force + tailList + l)))) ]) + (force + tailList + args))) + (delay + (traceError + "PT1")))) + (force + (force + sndPair) + tup)) + (force + (force + fstPair) + tup)) + (unConstrData + (force + headList + args))) ])) + (delay + (traceError + "PT1"))))))) + (force (force sndPair) tup)) + (force (force fstPair) tup)) + (unConstrData + (force headList args))) ])) + (delay (traceError "PT1"))))))) + (force (force sndPair) tup)) + (force (force fstPair) tup)) + (unConstrData + (constrData + 1 + (force mkCons + (constrData + 0 + (force mkCons + (constrData + 0 + (force mkCons + (Constr 1 []) + (force mkCons + (iData 1) + (force mkCons (Constr 0 []) [])))) + [])) + [])))) + (\str -> (\x -> error) (force trace str (constr 0 []))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NegativeLiterals.pir.golden b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NegativeLiterals.pir.golden index c250a5158ce..8fad28782d2 100644 --- a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NegativeLiterals.pir.golden +++ b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NegativeLiterals.pir.golden @@ -1,35 +1,20 @@ -(program +program 1.1.0 - (lam - x - (con integer) - [ - [ (builtin addInteger) (con integer 24680135792468013579) ] - [ - [ (builtin addInteger) (con integer -99887766554433221100) ] - [ - [ (builtin addInteger) (con integer 98765432109876543210) ] - [ - [ (builtin addInteger) (con integer -654) ] - [ - [ (builtin addInteger) (con integer 456) ] - [ - [ (builtin addInteger) (con integer 13579246801357924680) ] - [ - [ (builtin addInteger) (con integer -11223344556677889900) ] - [ - [ (builtin addInteger) (con integer 12345678901234567890) ] - [ - [ (builtin addInteger) (con integer -321) ] - [ [ (builtin multiplyInteger) (con integer 123) ] x ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ) -) \ No newline at end of file + (\(x : integer) -> + addInteger + 24680135792468013579 + (addInteger + -99887766554433221100 + (addInteger + 98765432109876543210 + (addInteger + -654 + (addInteger + 456 + (addInteger + 13579246801357924680 + (addInteger + -11223344556677889900 + (addInteger + 12345678901234567890 + (addInteger -321 (multiplyInteger 123 x)))))))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NoNegativeLiterals.pir.golden b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NoNegativeLiterals.pir.golden index c250a5158ce..8fad28782d2 100644 --- a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NoNegativeLiterals.pir.golden +++ b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-NoStrict-NoNegativeLiterals.pir.golden @@ -1,35 +1,20 @@ -(program +program 1.1.0 - (lam - x - (con integer) - [ - [ (builtin addInteger) (con integer 24680135792468013579) ] - [ - [ (builtin addInteger) (con integer -99887766554433221100) ] - [ - [ (builtin addInteger) (con integer 98765432109876543210) ] - [ - [ (builtin addInteger) (con integer -654) ] - [ - [ (builtin addInteger) (con integer 456) ] - [ - [ (builtin addInteger) (con integer 13579246801357924680) ] - [ - [ (builtin addInteger) (con integer -11223344556677889900) ] - [ - [ (builtin addInteger) (con integer 12345678901234567890) ] - [ - [ (builtin addInteger) (con integer -321) ] - [ [ (builtin multiplyInteger) (con integer 123) ] x ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ) -) \ No newline at end of file + (\(x : integer) -> + addInteger + 24680135792468013579 + (addInteger + -99887766554433221100 + (addInteger + 98765432109876543210 + (addInteger + -654 + (addInteger + 456 + (addInteger + 13579246801357924680 + (addInteger + -11223344556677889900 + (addInteger + 12345678901234567890 + (addInteger -321 (multiplyInteger 123 x)))))))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NegativeLiterals.pir.golden b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NegativeLiterals.pir.golden index c250a5158ce..8fad28782d2 100644 --- a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NegativeLiterals.pir.golden +++ b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NegativeLiterals.pir.golden @@ -1,35 +1,20 @@ -(program +program 1.1.0 - (lam - x - (con integer) - [ - [ (builtin addInteger) (con integer 24680135792468013579) ] - [ - [ (builtin addInteger) (con integer -99887766554433221100) ] - [ - [ (builtin addInteger) (con integer 98765432109876543210) ] - [ - [ (builtin addInteger) (con integer -654) ] - [ - [ (builtin addInteger) (con integer 456) ] - [ - [ (builtin addInteger) (con integer 13579246801357924680) ] - [ - [ (builtin addInteger) (con integer -11223344556677889900) ] - [ - [ (builtin addInteger) (con integer 12345678901234567890) ] - [ - [ (builtin addInteger) (con integer -321) ] - [ [ (builtin multiplyInteger) (con integer 123) ] x ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ) -) \ No newline at end of file + (\(x : integer) -> + addInteger + 24680135792468013579 + (addInteger + -99887766554433221100 + (addInteger + 98765432109876543210 + (addInteger + -654 + (addInteger + 456 + (addInteger + 13579246801357924680 + (addInteger + -11223344556677889900 + (addInteger + 12345678901234567890 + (addInteger -321 (multiplyInteger 123 x)))))))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NoNegativeLiterals.pir.golden b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NoNegativeLiterals.pir.golden index c250a5158ce..8fad28782d2 100644 --- a/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NoNegativeLiterals.pir.golden +++ b/plutus-tx-plugin/test/IntegerLiterals/9.6/integerLiterals-Strict-NoNegativeLiterals.pir.golden @@ -1,35 +1,20 @@ -(program +program 1.1.0 - (lam - x - (con integer) - [ - [ (builtin addInteger) (con integer 24680135792468013579) ] - [ - [ (builtin addInteger) (con integer -99887766554433221100) ] - [ - [ (builtin addInteger) (con integer 98765432109876543210) ] - [ - [ (builtin addInteger) (con integer -654) ] - [ - [ (builtin addInteger) (con integer 456) ] - [ - [ (builtin addInteger) (con integer 13579246801357924680) ] - [ - [ (builtin addInteger) (con integer -11223344556677889900) ] - [ - [ (builtin addInteger) (con integer 12345678901234567890) ] - [ - [ (builtin addInteger) (con integer -321) ] - [ [ (builtin multiplyInteger) (con integer 123) ] x ] - ] - ] - ] - ] - ] - ] - ] - ] - ] - ) -) \ No newline at end of file + (\(x : integer) -> + addInteger + 24680135792468013579 + (addInteger + -99887766554433221100 + (addInteger + 98765432109876543210 + (addInteger + -654 + (addInteger + 456 + (addInteger + 13579246801357924680 + (addInteger + -11223344556677889900 + (addInteger + 12345678901234567890 + (addInteger -321 (multiplyInteger 123 x)))))))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/bytestring.eval.golden b/plutus-tx-plugin/test/IsData/9.6/bytestring.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/bytestring.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/bytestring.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/int.eval.golden b/plutus-tx-plugin/test/IsData/9.6/int.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/int.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/int.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/list.eval.golden b/plutus-tx-plugin/test/IsData/9.6/list.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/list.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/list.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/matchAsDataE.eval.golden b/plutus-tx-plugin/test/IsData/9.6/matchAsDataE.eval.golden index ab13a55a15b..77a22a37ae9 100644 --- a/plutus-tx-plugin/test/IsData/9.6/matchAsDataE.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/matchAsDataE.eval.golden @@ -1 +1 @@ -(con data (Constr 0 [Constr 0 []])) \ No newline at end of file +Constr 0 [Constr 0 []] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/mono.eval.golden b/plutus-tx-plugin/test/IsData/9.6/mono.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/mono.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/mono.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/nested.eval.golden b/plutus-tx-plugin/test/IsData/9.6/nested.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/nested.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/nested.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/poly.eval.golden b/plutus-tx-plugin/test/IsData/9.6/poly.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/poly.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/poly.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/record.eval.golden b/plutus-tx-plugin/test/IsData/9.6/record.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/record.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/record.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/tuple.eval.golden b/plutus-tx-plugin/test/IsData/9.6/tuple.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/tuple.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/tuple.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/tupleInterop.eval.golden b/plutus-tx-plugin/test/IsData/9.6/tupleInterop.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/tupleInterop.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/tupleInterop.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/unit.eval.golden b/plutus-tx-plugin/test/IsData/9.6/unit.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/unit.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/unit.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/unitInterop.eval.golden b/plutus-tx-plugin/test/IsData/9.6/unitInterop.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/unitInterop.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/unitInterop.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/unsafeTupleInterop.eval.golden b/plutus-tx-plugin/test/IsData/9.6/unsafeTupleInterop.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/IsData/9.6/unsafeTupleInterop.eval.golden +++ b/plutus-tx-plugin/test/IsData/9.6/unsafeTupleInterop.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/boolInterop.eval.golden b/plutus-tx-plugin/test/Lift/9.6/boolInterop.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Lift/9.6/boolInterop.eval.golden +++ b/plutus-tx-plugin/test/Lift/9.6/boolInterop.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/bytestring.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/bytestring.uplc.golden index f5428834a57..1abec1041c1 100644 --- a/plutus-tx-plugin/test/Lift/9.6/bytestring.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/bytestring.uplc.golden @@ -1,28 +1,11 @@ -(program +program 1.1.0 - [ - [ - [ - (force - (delay - (lam - `Lift.Spec.WrappedBS_i0` - (lam `match_Lift.Spec.WrappedBS_i0` `Lift.Spec.WrappedBS_i2`) - ) - ) - ) - (lam arg_0_i0 (constr 0 arg_0_i1)) - ] - (lam - x_i0 - (delay - (lam - `case_Lift.Spec.WrappedBS_i0` - (case x_i2 `case_Lift.Spec.WrappedBS_i1`) - ) - ) - ) - ] - (con bytestring #68656c6c6f) - ] -) \ No newline at end of file + (force + (delay + (\`Lift.Spec.WrappedBS` `match_Lift.Spec.WrappedBS` -> + `Lift.Spec.WrappedBS`)) + (\arg_0 -> constr 0 [arg_0]) + (\x -> + delay + (\`case_Lift.Spec.WrappedBS` -> case x [`case_Lift.Spec.WrappedBS`])) + #68656c6c6f) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/int.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/int.uplc.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Lift/9.6/int.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/int.uplc.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/list.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/list.uplc.golden index 6ce476986b2..46f5cd08347 100644 --- a/plutus-tx-plugin/test/Lift/9.6/list.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/list.uplc.golden @@ -1,42 +1,13 @@ -(program +program 1.1.0 - [ - [ - [ - (force - (delay - (lam - `GHC.Types.Nil_i0` - (lam - `GHC.Types.Cons_i0` - (lam - `match_GHC.Types.List_i0` - [ - [ (force `GHC.Types.Cons_i2`) (con integer 1) ] - (force `GHC.Types.Nil_i3`) - ] - ) - ) - ) - ) - ) - (delay (constr 0)) - ] - (delay (lam arg_0_i0 (lam arg_1_i0 (constr 1 arg_0_i2 arg_1_i1)))) - ] - (delay - (lam - x_i0 - (delay - (lam - `case_GHC.Types.Nil_i0` - (lam - `case_GHC.Types.Cons_i0` - (case x_i3 `case_GHC.Types.Nil_i2` `case_GHC.Types.Cons_i1`) - ) - ) - ) - ) - ) - ] -) \ No newline at end of file + (force + (delay + (\`GHC.Types.Nil` `GHC.Types.Cons` `match_GHC.Types.List` -> + force `GHC.Types.Cons` 1 (force `GHC.Types.Nil`))) + (delay (constr 0 [])) + (delay (\arg_0 arg_1 -> constr 1 [arg_0, arg_1])) + (delay + (\x -> + delay + (\`case_GHC.Types.Nil` `case_GHC.Types.Cons` -> + case x [`case_GHC.Types.Nil`, `case_GHC.Types.Cons`])))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/listInterop.eval.golden b/plutus-tx-plugin/test/Lift/9.6/listInterop.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Lift/9.6/listInterop.eval.golden +++ b/plutus-tx-plugin/test/Lift/9.6/listInterop.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/mono.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/mono.uplc.golden index 3e5354daa25..01d5641c6c5 100644 --- a/plutus-tx-plugin/test/Lift/9.6/mono.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/mono.uplc.golden @@ -1,54 +1,23 @@ -(program +program 1.1.0 - [ - [ - [ - [ - [ - (force - (delay - (lam - `Plugin.Data.Spec.Mono1_i0` - (lam - `Plugin.Data.Spec.Mono2_i0` - (lam - `Plugin.Data.Spec.Mono3_i0` - (lam - `match_Plugin.Data.Spec.MyMonoData_i0` - `Plugin.Data.Spec.Mono2_i3` - ) - ) - ) - ) - ) - ) - (lam arg_0_i0 (lam arg_1_i0 (constr 0 arg_0_i2 arg_1_i1))) - ] - (lam arg_0_i0 (constr 1 arg_0_i1)) - ] - (lam arg_0_i0 (constr 2 arg_0_i1)) - ] - (lam - x_i0 - (delay - (lam - `case_Plugin.Data.Spec.Mono1_i0` - (lam - `case_Plugin.Data.Spec.Mono2_i0` - (lam - `case_Plugin.Data.Spec.Mono3_i0` - (case - x_i4 - `case_Plugin.Data.Spec.Mono1_i3` - `case_Plugin.Data.Spec.Mono2_i2` - `case_Plugin.Data.Spec.Mono3_i1` - ) - ) - ) - ) - ) - ) - ] - (con integer 2) - ] -) \ No newline at end of file + (force + (delay + (\`Plugin.Data.Spec.Mono1` + `Plugin.Data.Spec.Mono2` + `Plugin.Data.Spec.Mono3` + `match_Plugin.Data.Spec.MyMonoData` -> + `Plugin.Data.Spec.Mono2`)) + (\arg_0 arg_1 -> constr 0 [arg_0, arg_1]) + (\arg_0 -> constr 1 [arg_0]) + (\arg_0 -> constr 2 [arg_0]) + (\x -> + delay + (\`case_Plugin.Data.Spec.Mono1` + `case_Plugin.Data.Spec.Mono2` + `case_Plugin.Data.Spec.Mono3` -> + case + x + [ `case_Plugin.Data.Spec.Mono1` + , `case_Plugin.Data.Spec.Mono2` + , `case_Plugin.Data.Spec.Mono3` ])) + 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/monoInterop.eval.golden b/plutus-tx-plugin/test/Lift/9.6/monoInterop.eval.golden index d135c1204f4..d8263ee9860 100644 --- a/plutus-tx-plugin/test/Lift/9.6/monoInterop.eval.golden +++ b/plutus-tx-plugin/test/Lift/9.6/monoInterop.eval.golden @@ -1 +1 @@ -(con integer 2) \ No newline at end of file +2 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/nested.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/nested.uplc.golden index df1231c0ba8..af82936fa25 100644 --- a/plutus-tx-plugin/test/Lift/9.6/nested.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/nested.uplc.golden @@ -1,109 +1,38 @@ -(program +program 1.1.0 - [ - [ - (force + (force + (delay + (\`GHC.Tuple.Prim.Tuple2` `match_GHC.Tuple.Prim.Tuple2` -> + force + (delay + (\`GHC.Maybe.Just` + `GHC.Maybe.Nothing` + `match_GHC.Maybe.Maybe` -> + force + (delay + (\`Lift.Spec.NestedRecord` + `match_Lift.Spec.NestedRecord` -> + `Lift.Spec.NestedRecord`)) + (\arg_0 -> constr 0 [arg_0]) + (\x -> + delay + (\`case_Lift.Spec.NestedRecord` -> + case x [`case_Lift.Spec.NestedRecord`])) + (force `GHC.Maybe.Just` + (force (force `GHC.Tuple.Prim.Tuple2`) 1 2)))) + (delay (\arg_0 -> constr 0 [arg_0])) + (delay (constr 1 [])) + (delay + (\x -> + delay + (\`case_GHC.Maybe.Just` `case_GHC.Maybe.Nothing` -> + case + x + [`case_GHC.Maybe.Just`, `case_GHC.Maybe.Nothing`]))))) + (delay (delay (\arg_0 arg_1 -> constr 0 [arg_0, arg_1]))) + (delay (delay - (lam - `GHC.Tuple.Prim.Tuple2_i0` - (lam - `match_GHC.Tuple.Prim.Tuple2_i0` - [ - [ - [ - (force - (delay - (lam - `GHC.Maybe.Just_i0` - (lam - `GHC.Maybe.Nothing_i0` - (lam - `match_GHC.Maybe.Maybe_i0` - [ - [ - [ - (force - (delay - (lam - `Lift.Spec.NestedRecord_i0` - (lam - `match_Lift.Spec.NestedRecord_i0` - `Lift.Spec.NestedRecord_i2` - ) - ) - ) - ) - (lam arg_0_i0 (constr 0 arg_0_i1)) - ] - (lam - x_i0 - (delay - (lam - `case_Lift.Spec.NestedRecord_i0` - (case - x_i2 `case_Lift.Spec.NestedRecord_i1` - ) - ) - ) - ) - ] - [ - (force `GHC.Maybe.Just_i3`) - [ - [ - (force (force `GHC.Tuple.Prim.Tuple2_i5`)) - (con integer 1) - ] - (con integer 2) - ] - ] - ] - ) - ) - ) - ) - ) - (delay (lam arg_0_i0 (constr 0 arg_0_i1))) - ] - (delay (constr 1)) - ] - (delay - (lam - x_i0 - (delay - (lam - `case_GHC.Maybe.Just_i0` - (lam - `case_GHC.Maybe.Nothing_i0` - (case - x_i3 - `case_GHC.Maybe.Just_i2` - `case_GHC.Maybe.Nothing_i1` - ) - ) - ) - ) - ) - ) - ] - ) - ) - ) - ) - (delay (delay (lam arg_0_i0 (lam arg_1_i0 (constr 0 arg_0_i2 arg_1_i1))))) - ] - (delay - (delay - (lam - x_i0 - (delay - (lam - `case_GHC.Tuple.Prim.Tuple2_i0` - (case x_i2 `case_GHC.Tuple.Prim.Tuple2_i1`) - ) - ) - ) - ) - ) - ] -) \ No newline at end of file + (\x -> + delay + (\`case_GHC.Tuple.Prim.Tuple2` -> + case x [`case_GHC.Tuple.Prim.Tuple2`]))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/newtypeInt.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/newtypeInt.uplc.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Lift/9.6/newtypeInt.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/newtypeInt.uplc.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/newtypeInt2.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/newtypeInt2.uplc.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Lift/9.6/newtypeInt2.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/newtypeInt2.uplc.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/newtypeInt3.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/newtypeInt3.uplc.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Lift/9.6/newtypeInt3.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/newtypeInt3.uplc.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/poly.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/poly.uplc.golden index 37c366ce476..34fbd64e7d5 100644 --- a/plutus-tx-plugin/test/Lift/9.6/poly.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/poly.uplc.golden @@ -1,59 +1,24 @@ -(program +program 1.1.0 - [ - [ - (force + (force + (force (force - [ - [ - [ - (force - (delay - (lam - `Plugin.Data.Spec.Poly1_i0` - (lam - `Plugin.Data.Spec.Poly2_i0` - (lam - `match_Plugin.Data.Spec.MyPolyData_i0` - `Plugin.Data.Spec.Poly1_i3` - ) - ) - ) - ) - ) - (delay - (delay - (lam arg_0_i0 (lam arg_1_i0 (constr 0 arg_0_i2 arg_1_i1))) - ) - ) - ] - (delay (delay (lam arg_0_i0 (constr 1 arg_0_i1)))) - ] - (delay + (delay + (\`Plugin.Data.Spec.Poly1` + `Plugin.Data.Spec.Poly2` + `match_Plugin.Data.Spec.MyPolyData` -> + `Plugin.Data.Spec.Poly1`)) + (delay (delay (\arg_0 arg_1 -> constr 0 [arg_0, arg_1]))) + (delay (delay (\arg_0 -> constr 1 [arg_0]))) + (delay (delay - (lam - x_i0 - (delay - (lam - `case_Plugin.Data.Spec.Poly1_i0` - (lam - `case_Plugin.Data.Spec.Poly2_i0` - (case - x_i3 - `case_Plugin.Data.Spec.Poly1_i2` - `case_Plugin.Data.Spec.Poly2_i1` - ) - ) - ) - ) - ) - ) - ) - ] - ) - ) - (con integer 1) - ] - (con integer 2) - ] -) \ No newline at end of file + (\x -> + delay + (\`case_Plugin.Data.Spec.Poly1` + `case_Plugin.Data.Spec.Poly2` -> + case + x + [ `case_Plugin.Data.Spec.Poly1` + , `case_Plugin.Data.Spec.Poly2` ])))))) + 1 + 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/polyInterop.eval.golden b/plutus-tx-plugin/test/Lift/9.6/polyInterop.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Lift/9.6/polyInterop.eval.golden +++ b/plutus-tx-plugin/test/Lift/9.6/polyInterop.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/record.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/record.uplc.golden index 6afcea88e27..1cb08bcde10 100644 --- a/plutus-tx-plugin/test/Lift/9.6/record.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/record.uplc.golden @@ -1,34 +1,14 @@ -(program +program 1.1.0 - [ - [ - [ - [ - (force - (delay - (lam - `Plugin.Data.Spec.MyMonoRecord_i0` - (lam - `match_Plugin.Data.Spec.MyMonoRecord_i0` - `Plugin.Data.Spec.MyMonoRecord_i2` - ) - ) - ) - ) - (lam arg_0_i0 (lam arg_1_i0 (constr 0 arg_0_i2 arg_1_i1))) - ] - (lam - x_i0 - (delay - (lam - `case_Plugin.Data.Spec.MyMonoRecord_i0` - (case x_i2 `case_Plugin.Data.Spec.MyMonoRecord_i1`) - ) - ) - ) - ] - (con integer 1) - ] - (con integer 2) - ] -) \ No newline at end of file + (force + (delay + (\`Plugin.Data.Spec.MyMonoRecord` + `match_Plugin.Data.Spec.MyMonoRecord` -> + `Plugin.Data.Spec.MyMonoRecord`)) + (\arg_0 arg_1 -> constr 0 [arg_0, arg_1]) + (\x -> + delay + (\`case_Plugin.Data.Spec.MyMonoRecord` -> + case x [`case_Plugin.Data.Spec.MyMonoRecord`])) + 1 + 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/syn.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/syn.uplc.golden index 36a3b71fcb8..df57e3f2def 100644 --- a/plutus-tx-plugin/test/Lift/9.6/syn.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/syn.uplc.golden @@ -1,49 +1,17 @@ -(program +program 1.1.0 - [ - [ - (force - (delay - (lam - `Lift.Spec.Z_i0` - (lam - `match_Lift.Spec.Z_i0` - [ - [ - [ - (force - (delay - (lam - `Lift.Spec.SynExample_i0` - (lam - `match_Lift.Spec.SynExample_i0` - `Lift.Spec.SynExample_i2` - ) - ) - ) - ) - (lam arg_0_i0 (constr 0 arg_0_i1)) - ] - (lam - x_i0 - (delay - (lam - `case_Lift.Spec.SynExample_i0` - (case x_i2 `case_Lift.Spec.SynExample_i1`) - ) - ) - ) - ] - [ `Lift.Spec.Z_i2` (con integer 1) ] - ] - ) - ) - ) - ) - (lam arg_0_i0 (constr 0 arg_0_i1)) - ] - (lam - x_i0 (delay (lam `case_Lift.Spec.Z_i0` (case x_i2 `case_Lift.Spec.Z_i1`))) - ) - ] -) \ No newline at end of file + (force + (delay + (\`Lift.Spec.Z` `match_Lift.Spec.Z` -> + force + (delay + (\`Lift.Spec.SynExample` `match_Lift.Spec.SynExample` -> + `Lift.Spec.SynExample`)) + (\arg_0 -> constr 0 [arg_0]) + (\x -> + delay + (\`case_Lift.Spec.SynExample` -> + case x [`case_Lift.Spec.SynExample`])) + (`Lift.Spec.Z` 1))) + (\arg_0 -> constr 0 [arg_0]) + (\x -> delay (\`case_Lift.Spec.Z` -> case x [`case_Lift.Spec.Z`]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Lift/9.6/tuple.uplc.golden b/plutus-tx-plugin/test/Lift/9.6/tuple.uplc.golden index 267ab6e3789..9cc4e504c7e 100644 --- a/plutus-tx-plugin/test/Lift/9.6/tuple.uplc.golden +++ b/plutus-tx-plugin/test/Lift/9.6/tuple.uplc.golden @@ -1,46 +1,17 @@ -(program +program 1.1.0 - [ - [ - (force + (force + (force (force - [ - [ - (force - (delay - (lam - `GHC.Tuple.Prim.Tuple2_i0` - (lam - `match_GHC.Tuple.Prim.Tuple2_i0` - `GHC.Tuple.Prim.Tuple2_i2` - ) - ) - ) - ) + (delay + (\`GHC.Tuple.Prim.Tuple2` `match_GHC.Tuple.Prim.Tuple2` -> + `GHC.Tuple.Prim.Tuple2`)) + (delay (delay (\arg_0 arg_1 -> constr 0 [arg_0, arg_1]))) + (delay (delay - (delay - (lam arg_0_i0 (lam arg_1_i0 (constr 0 arg_0_i2 arg_1_i1))) - ) - ) - ] - (delay - (delay - (lam - x_i0 - (delay - (lam - `case_GHC.Tuple.Prim.Tuple2_i0` - (case x_i2 `case_GHC.Tuple.Prim.Tuple2_i1`) - ) - ) - ) - ) - ) - ] - ) - ) - (con integer 1) - ] - (con integer 2) - ] -) \ No newline at end of file + (\x -> + delay + (\`case_GHC.Tuple.Prim.Tuple2` -> + case x [`case_GHC.Tuple.Prim.Tuple2`])))))) + 1 + 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Optimization/9.6/maybeFun.uplc.golden b/plutus-tx-plugin/test/Optimization/9.6/maybeFun.uplc.golden index ea1a928b96e..d2899d853e9 100644 --- a/plutus-tx-plugin/test/Optimization/9.6/maybeFun.uplc.golden +++ b/plutus-tx-plugin/test/Optimization/9.6/maybeFun.uplc.golden @@ -1,30 +1,14 @@ -(program +program 1.1.0 - (lam - ds_i0 - (lam - ds_i0 - (force - (case - ds_i2 - (lam - x'_i0 - (delay - (force - (case - ds_i2 - (lam - y'_i0 - (delay (constr 0 [ [ (builtin addInteger) x'_i2 ] y'_i1 ])) - ) - (delay (constr 1)) - ) - ) - ) - ) - (delay (constr 1)) - ) - ) - ) - ) -) \ No newline at end of file + (\ds ds -> + force + (case + ds + [ (\x' -> + delay + (force + (case + ds + [ (\y' -> delay (constr 0 [(addInteger x' y')])) + , (delay (constr 1 [])) ]))) + , (delay (constr 1 [])) ])) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplication.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplication.pir.golden index be3bffbc56e..fc6ae40a03d 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplication.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplication.pir.golden @@ -1,33 +1,20 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind (nonstrict) (vardecl defaultBody (con integer)) (con integer 2)) - (datatypebind - (datatype - (tyvardecl A (type)) A_match (vardecl B A) (vardecl C A) (vardecl D A) - ) - ) - (lam + ~defaultBody : integer = 2 + data A | A_match where + B : A + C : A + D : A + in + \(ds : A) -> + let + !ds : A = ds + in + A_match ds - A - (let - (nonrec) - (termbind (strict) (vardecl ds A) ds) - { - [ - [ - [ - { [ A_match ds ] (all dead (type) (con integer)) } - (abs dead (type) (con integer 1)) - ] - (abs dead (type) defaultBody) - ] - (abs dead (type) defaultBody) - ] - (all dead (type) dead) - } - ) - ) - ) -) \ No newline at end of file + {all dead. integer} + (/\dead -> 1) + (/\dead -> defaultBody) + (/\dead -> defaultBody) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplicationNested.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplicationNested.pir.golden index f74fea27b8b..37bf137da63 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplicationNested.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/defaultCaseDuplicationNested.pir.golden @@ -1,58 +1,32 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind (nonstrict) (vardecl defaultBody (con integer)) (con integer 3)) - (datatypebind - (datatype - (tyvardecl A (type)) A_match (vardecl B A) (vardecl C A) (vardecl D A) - ) - ) - (lam - ds - A - (let - (nonrec) - (termbind (strict) (vardecl ds A) ds) - (lam - ds - A - (let - (nonrec) - (termbind (strict) (vardecl ds A) ds) - (termbind - (nonstrict) - (vardecl defaultBody (con integer)) - { - [ - [ - [ - { [ A_match ds ] (all dead (type) (con integer)) } - (abs dead (type) (con integer 2)) - ] - (abs dead (type) defaultBody) - ] - (abs dead (type) defaultBody) - ] - (all dead (type) dead) - } - ) - { - [ - [ - [ - { [ A_match ds ] (all dead (type) (con integer)) } - (abs dead (type) (con integer 1)) - ] - (abs dead (type) defaultBody) - ] - (abs dead (type) defaultBody) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) -) \ No newline at end of file + ~defaultBody : integer = 3 + data A | A_match where + B : A + C : A + D : A + in + \(ds : A) -> + let + !ds : A = ds + in + \(ds : A) -> + let + !ds : A = ds + ~defaultBody : integer + = A_match + ds + {all dead. integer} + (/\dead -> 2) + (/\dead -> defaultBody) + (/\dead -> defaultBody) + {all dead. dead} + in + A_match + ds + {all dead. integer} + (/\dead -> 1) + (/\dead -> defaultBody) + (/\dead -> defaultBody) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOpt.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOpt.pir.golden index b99125842ce..db3616eaaab 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOpt.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOpt.pir.golden @@ -1,87 +1,29 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl - divideInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin divideInteger) - ) - (termbind - (nonstrict) - (vardecl - divideInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ divideInteger x ] y ] - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl wild Bool) - [ - [ equalsInteger [ [ divideInteger (con integer 1) ] (con integer 0) ] ] - (con integer 0) - ] - ) - (con integer 1) - ) -) \ No newline at end of file + !divideInteger : integer -> integer -> integer = divideInteger + ~divideInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in divideInteger x y + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + !wild : Bool = equalsInteger (divideInteger 1 0) 0 + in + 1) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOptEval.eval.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOptEval.eval.golden index 8f62cdc8e64..f1383720835 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOptEval.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/ifOptEval.eval.golden @@ -1,6 +1,6 @@ An error has occurred: The machine terminated because of an error, either from a built-in function or from an explicit use of 'error'. -Caused by: (divideInteger 1 0) +Caused by: divideInteger 1 0 Final budget: ({cpu: 132030 | mem: 101}) Logs: \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/letFun.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/letFun.pir.golden index bc35ea6a6bd..210db8b4ce5 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/letFun.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/letFun.pir.golden @@ -1,65 +1,25 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ equalsInteger ds ] ds ] - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> let !ds : integer = ds in equalsInteger ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/monadicDo.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/monadicDo.pir.golden index b6afb8204de..4d7ba359c3f 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/monadicDo.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/monadicDo.pir.golden @@ -1,127 +1,51 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - (termbind - (nonstrict) - (vardecl `$fApplicativeMaybe_$cpure` (all a (type) (fun a [ Maybe a ]))) - (abs a (type) (lam ds a [ { Just a } ds ])) - ) - (termbind - (nonstrict) - (vardecl - `$fMonadMaybe_$c>>=` - (all - a - (type) - (all b (type) (fun [ Maybe a ] (fun (fun a [ Maybe b ]) [ Maybe b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - ds - [ Maybe a ] - (lam - k - (fun a [ Maybe b ]) - { - [ - [ - { [ { Maybe_match a } ds ] (all dead (type) [ Maybe b ]) } - (lam x a (abs dead (type) [ k x ])) - ] - (abs dead (type) { Nothing b }) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - [ Maybe (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl ds [ Maybe (con integer) ]) ds) - (lam - ds - [ Maybe (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl ds [ Maybe (con integer) ]) ds) - [ - [ { { `$fMonadMaybe_$c>>=` (con integer) } (con integer) } ds ] - (lam - x' - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x' (con integer)) x') - [ - [ - { { `$fMonadMaybe_$c>>=` (con integer) } (con integer) } - ds - ] - (lam - y' - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y' (con integer)) y') - [ - { `$fApplicativeMaybe_$cpure` (con integer) } - [ [ addInteger x' ] y' ] - ] - ) - ) - ] - ) - ) - ] - ) - ) - ) - ) - ) -) \ No newline at end of file + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + ~`$fApplicativeMaybe_$cpure` : all a. a -> Maybe a + = /\a -> \(ds : a) -> Just {a} ds + ~`$fMonadMaybe_$c>>=` : all a b. Maybe a -> (a -> Maybe b) -> Maybe b + = /\a b -> + \(ds : Maybe a) (k : a -> Maybe b) -> + Maybe_match + {a} + ds + {all dead. Maybe b} + (\(x : a) -> /\dead -> k x) + (/\dead -> Nothing {b}) + {all dead. dead} + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : Maybe integer) -> + let + !ds : Maybe integer = ds + in + \(ds : Maybe integer) -> + let + !ds : Maybe integer = ds + in + `$fMonadMaybe_$c>>=` + {integer} + {integer} + ds + (\(x' : integer) -> + let + !x' : integer = x' + in + `$fMonadMaybe_$c>>=` + {integer} + {integer} + ds + (\(y' : integer) -> + let + !y' : integer = y' + in + `$fApplicativeMaybe_$cpure` {integer} (addInteger x' y')))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/monoId.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/monoId.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/monoId.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/monoId.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/monoK.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/monoK.pir.golden index cfa4ac0ee32..5a9a14aa00a 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/monoK.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/monoK.pir.golden @@ -1,12 +1,3 @@ -(program +program 1.1.0 - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam ds (con integer) ds) - ) - ) -) \ No newline at end of file + (\(ds : integer) -> let !ds : integer = ds in \(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/nonstrictLet.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/nonstrictLet.pir.golden index 48a7e5abcab..e4cf284e5b0 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/nonstrictLet.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/nonstrictLet.pir.golden @@ -1,52 +1,21 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (termbind - (strict) (vardecl z (con integer)) [ [ addInteger ds ] ds ] - ) - [ [ addInteger z ] z ] - ) - ) - ) - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + !z : integer = addInteger ds ds + in + addInteger z z) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/patternMatchDo.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/patternMatchDo.pir.golden index 409c116c10b..94746c1b285 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/patternMatchDo.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/patternMatchDo.pir.golden @@ -1,160 +1,58 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - (termbind - (nonstrict) - (vardecl `$fApplicativeMaybe_$cpure` (all a (type) (fun a [ Maybe a ]))) - (abs a (type) (lam ds a [ { Just a } ds ])) - ) - (termbind - (nonstrict) - (vardecl - `$fMonadMaybe_$c>>=` - (all - a - (type) - (all b (type) (fun [ Maybe a ] (fun (fun a [ Maybe b ]) [ Maybe b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - ds - [ Maybe a ] - (lam - k - (fun a [ Maybe b ]) - { - [ - [ - { [ { Maybe_match a } ds ] (all dead (type) [ Maybe b ]) } - (lam x a (abs dead (type) [ k x ])) - ] - (abs dead (type) { Nothing b }) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - [ Maybe [ [ Tuple2 (con integer) ] (con integer) ] ] - (let - (nonrec) - (termbind - (strict) - (vardecl ds [ Maybe [ [ Tuple2 (con integer) ] (con integer) ] ]) - ds - ) - (lam - ds - [ Maybe (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl ds [ Maybe (con integer) ]) ds) - [ - [ - { - { - `$fMonadMaybe_$c>>=` - [ [ Tuple2 (con integer) ] (con integer) ] - } - (con integer) - } - ds - ] - (lam - ds - [ [ Tuple2 (con integer) ] (con integer) ] - [ - { - [ { { Tuple2_match (con integer) } (con integer) } ds ] - [ Maybe (con integer) ] - } - (lam - x - (con integer) - (lam - x - (con integer) - [ - [ - { - { `$fMonadMaybe_$c>>=` (con integer) } (con integer) - } - ds - ] - (lam - y' - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y' (con integer)) y') - [ - { `$fApplicativeMaybe_$cpure` (con integer) } - [ [ addInteger [ [ addInteger x ] x ] ] y' ] - ] - ) - ) - ] - ) - ) - ] - ) - ] - ) - ) - ) - ) - ) -) \ No newline at end of file + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + ~`$fApplicativeMaybe_$cpure` : all a. a -> Maybe a + = /\a -> \(ds : a) -> Just {a} ds + ~`$fMonadMaybe_$c>>=` : all a b. Maybe a -> (a -> Maybe b) -> Maybe b + = /\a b -> + \(ds : Maybe a) (k : a -> Maybe b) -> + Maybe_match + {a} + ds + {all dead. Maybe b} + (\(x : a) -> /\dead -> k x) + (/\dead -> Nothing {b}) + {all dead. dead} + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : Maybe (Tuple2 integer integer)) -> + let + !ds : Maybe (Tuple2 integer integer) = ds + in + \(ds : Maybe integer) -> + let + !ds : Maybe integer = ds + in + `$fMonadMaybe_$c>>=` + {Tuple2 integer integer} + {integer} + ds + (\(ds : Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} + ds + {Maybe integer} + (\(x : integer) (x : integer) -> + `$fMonadMaybe_$c>>=` + {integer} + {integer} + ds + (\(y' : integer) -> + let + !y' : integer = y' + in + `$fApplicativeMaybe_$cpure` + {integer} + (addInteger (addInteger x x) y'))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLet.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLet.pir.golden index 48a7e5abcab..e4cf284e5b0 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLet.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLet.pir.golden @@ -1,52 +1,21 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (termbind - (strict) (vardecl z (con integer)) [ [ addInteger ds ] ds ] - ) - [ [ addInteger z ] z ] - ) - ) - ) - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + !z : integer = addInteger ds ds + in + addInteger z z) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLetRec.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLetRec.pir.golden index 245ff864cb1..a2234ea9278 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLetRec.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/strictLetRec.pir.golden @@ -1,63 +1,28 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (let - (rec) - (termbind - (nonstrict) (vardecl q (con integer)) [ [ addInteger ds ] z ] - ) - (termbind - (nonstrict) (vardecl z (con integer)) [ [ addInteger ds ] q ] - ) - (let - (nonrec) - (termbind (strict) (vardecl z (con integer)) z) - (termbind (strict) (vardecl q (con integer)) q) - [ [ addInteger z ] z ] - ) - ) - ) - ) - ) - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + in + letrec + ~q : integer = addInteger ds z + ~z : integer = addInteger ds q + in + let + !z : integer = z + !q : integer = q + in + addInteger z z) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Basic/9.6/strictMultiLet.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/strictMultiLet.pir.golden index bd13e62b61f..d410ebbec43 100644 --- a/plutus-tx-plugin/test/Plugin/Basic/9.6/strictMultiLet.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Basic/9.6/strictMultiLet.pir.golden @@ -1,53 +1,22 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (termbind - (strict) (vardecl z (con integer)) [ [ addInteger ds ] ds ] - ) - (termbind (strict) (vardecl q (con integer)) [ [ addInteger z ] z ]) - [ [ addInteger q ] q ] - ) - ) - ) - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + !z : integer = addInteger ds ds + !q : integer = addInteger z z + in + addInteger q q) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Coverage/9.6/coverageCode.pir.golden b/plutus-tx-plugin/test/Plugin/Coverage/9.6/coverageCode.pir.golden index 5062a03adda..c3e9f322fe8 100644 --- a/plutus-tx-plugin/test/Plugin/Coverage/9.6/coverageCode.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Coverage/9.6/coverageCode.pir.golden @@ -1,538 +1,169 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (nonstrict) - (vardecl fail (fun (con unit) [ Maybe Bool ])) - (lam - ds - (con unit) - { - { - [ - [ - { (builtin trace) (all dead (type) (all a (type) [ Maybe a ])) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 41, _covLocEndLine = 41, _covLocStartCol = 14, _covLocEndCol = 15})" - ) - ] - (abs - dead - (type) - { - [ - [ - { - (builtin trace) - (all dead (type) (all a (type) [ Maybe a ])) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 43, _covLocEndLine = 43, _covLocStartCol = 26, _covLocEndCol = 33})" - ) - ] - (abs dead (type) Nothing) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - Bool - } - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fEqInteger` [ (lam a (type) (fun a (fun a Bool))) (con integer) ] - ) - equalsInteger - ) - (termbind - (nonstrict) - (vardecl `&&` (fun Bool (fun Bool Bool))) - (lam - ds - Bool - (lam - x - Bool - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } (abs dead (type) x) - ] - (abs dead (type) False) - ] - (all dead (type) dead) - } - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `==` - (all - a - (type) - (fun [ (lam a (type) (fun a (fun a Bool))) a ] (fun a (fun a Bool))) - ) - ) - (abs a (type) (lam v [ (lam a (type) (fun a (fun a Bool))) a ] v)) - ) - (termbind - (strict) - (vardecl trace (all a (type) (fun (con string) (fun a a)))) - (builtin trace) - ) - (termbind - (nonstrict) - (vardecl traceBool (fun (con string) (fun (con string) (fun Bool Bool)))) - (lam - trueLabel - (con string) - (let - (nonrec) - (termbind (strict) (vardecl trueLabel (con string)) trueLabel) - (lam - falseLabel - (con string) - (let - (nonrec) - (termbind (strict) (vardecl falseLabel (con string)) falseLabel) - (lam + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + data Bool | Bool_match where + True : Bool + False : Bool + ~fail : + unit -> Maybe Bool + = \(ds : unit) -> + trace + {all dead a. Maybe a} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 41, _covLocEndLine = 41, _covLocStartCol = 14, _covLocEndCol = 15})" + (/\dead -> + trace + {all dead a. Maybe a} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 43, _covLocEndLine = 43, _covLocStartCol = 26, _covLocEndCol = 33})" + (/\dead -> Nothing) + {all dead. dead}) + {all dead. dead} + {Bool} + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + ~`$fEqInteger` : (\a -> a -> a -> Bool) integer = equalsInteger + ~`&&` : Bool -> Bool -> Bool + = \(ds : Bool) (x : Bool) -> + Bool_match + ds + {all dead. Bool} + (/\dead -> x) + (/\dead -> False) + {all dead. dead} + ~`==` : all a. (\a -> a -> a -> Bool) a -> a -> a -> Bool + = /\a -> \(v : (\a -> a -> a -> Bool) a) -> v + !trace : all a. string -> a -> a = trace + ~traceBool : string -> string -> Bool -> Bool + = \(trueLabel : string) -> + let + !trueLabel : string = trueLabel + in + \(falseLabel : string) -> + let + !falseLabel : string = falseLabel + in + \(c : Bool) -> + Bool_match c - Bool - { - [ - [ - { [ Bool_match c ] (all dead (type) Bool) } - (abs dead (type) [ [ { trace Bool } trueLabel ] True ]) - ] - (abs dead (type) [ [ { trace Bool } falseLabel ] False ]) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl otherFun (fun (con integer) Bool)) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - [ - [ - traceBool - (con - string - "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 1, _covLocEndCol = 32}) True" - ) - ] - (con - string - "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 1, _covLocEndCol = 32}) False" - ) - ] - { - [ - [ - { (builtin trace) (all dead (type) Bool) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 1, _covLocEndCol = 32})" - ) - ] - (abs - dead - (type) - [ - [ - [ - traceBool - (con - string - "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 32}) True" - ) - ] - (con - string - "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 32}) False" - ) - ] - { - [ - [ - { (builtin trace) (all dead (type) Bool) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 32})" - ) - ] - (abs - dead - (type) - [ - [ - `&&` - [ - [ - [ - traceBool - (con - string - "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 24}) True" - ) - ] - (con - string - "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 24}) False" - ) - ] - { - [ - [ - { (builtin trace) (all dead (type) Bool) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 24})" - ) - ] - (abs - dead - (type) - [ - [ - [ - { `==` (con integer) } `$fEqInteger` - ] - { - [ - [ - { - (builtin trace) - (all - dead (type) (con integer) - ) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 15, _covLocEndCol = 16})" - ) - ] - (abs dead (type) x) - ] - (all dead (type) dead) - } - ] - { - [ - [ - { - (builtin trace) - (all dead (type) (con integer)) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 22, _covLocEndCol = 23})" - ) - ] - (abs dead (type) (con integer 5)) - ] - (all dead (type) dead) - } - ] - ) - ] - (all dead (type) dead) - } - ] - ] - { - [ - [ - { (builtin trace) (all dead (type) Bool) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 28, _covLocEndCol = 32})" - ) - ] - (abs dead (type) True) - ] - (all dead (type) dead) - } - ] - ) - ] - (all dead (type) dead) - } - ] - ) - ] - (all dead (type) dead) - } - ] - ) - ) - ) - (lam - x - [ Maybe (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl x [ Maybe (con integer) ]) x) - { - [ - [ - { (builtin trace) (all dead (type) [ Maybe Bool ]) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 37, _covLocEndLine = 37, _covLocStartCol = 54, _covLocEndCol = 57})" - ) - ] - (abs - dead - (type) - { - [ - [ - { (builtin trace) (all dead (type) [ Maybe Bool ]) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 41, _covLocEndLine = 43, _covLocStartCol = 1, _covLocEndCol = 33})" - ) - ] - (abs - dead - (type) - { - [ - [ - { (builtin trace) (all dead (type) [ Maybe Bool ]) } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 41, _covLocEndLine = 43, _covLocStartCol = 9, _covLocEndCol = 33})" - ) - ] - (abs - dead - (type) - { - [ - [ - { - [ { Maybe_match (con integer) } x ] - (all dead (type) [ Maybe Bool ]) - } - (lam - y - (con integer) - (abs - dead - (type) - { - [ - [ - { - (builtin trace) - (all dead (type) [ Maybe Bool ]) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 12, _covLocEndCol = 22})" - ) - ] - (abs - dead - (type) - { - [ - [ - { - [ - Bool_match - [ - otherFun - { - [ - [ - { - (builtin trace) - (all - dead - (type) - (con integer) - ) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 21, _covLocEndCol = 22})" - ) - ] - (abs dead (type) y) - ] - (all dead (type) dead) - } - ] - ] - (all - dead (type) [ Maybe Bool ] - ) - } - (abs - dead - (type) - { - [ - [ - { - (builtin trace) - (all - dead - (type) - [ Maybe Bool ] - ) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 26, _covLocEndCol = 36})" - ) - ] - (abs - dead - (type) - [ - { Just Bool } - { - [ - [ - { - (builtin - trace - ) - (all - dead - (type) - Bool - ) - } - (con - string - "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 31, _covLocEndCol = 36})" - ) - ] - (abs - dead - (type) - False - ) - ] - (all - dead (type) dead - ) - } - ] - ) - ] - (all dead (type) dead) - } - ) - ] - (abs - dead - (type) - [ fail (con unit ()) ] - ) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ) - ] - (abs dead (type) [ fail (con unit ()) ]) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ) - ) -) \ No newline at end of file + {all dead. Bool} + (/\dead -> trace {Bool} trueLabel True) + (/\dead -> trace {Bool} falseLabel False) + {all dead. dead} + ~otherFun : + integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + traceBool + "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 1, _covLocEndCol = 32}) True" + "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 1, _covLocEndCol = 32}) False" + (trace + {all dead. Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 1, _covLocEndCol = 32})" + (/\dead -> + traceBool + "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 32}) True" + "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 32}) False" + (trace + {all dead. Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 32})" + (/\dead -> + `&&` + (traceBool + "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 24}) True" + "CoverBool (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 24}) False" + (trace + {all dead. Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 14, _covLocEndCol = 24})" + (/\dead -> + `==` + {integer} + `$fEqInteger` + (trace + {all dead. integer} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 15, _covLocEndCol = 16})" + (/\dead -> x) + {all dead. dead}) + (trace + {all dead. integer} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 22, _covLocEndCol = 23})" + (/\dead -> 5) + {all dead. dead})) + {all dead. dead})) + (trace + {all dead. Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 46, _covLocEndLine = 46, _covLocStartCol = 28, _covLocEndCol = 32})" + (/\dead -> True) + {all dead. dead})) + {all dead. dead})) + {all dead. dead}) + in + \(x : Maybe integer) -> + let + !x : Maybe integer = x + in + trace + {all dead. Maybe Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 37, _covLocEndLine = 37, _covLocStartCol = 54, _covLocEndCol = 57})" + (/\dead -> + trace + {all dead. Maybe Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 41, _covLocEndLine = 43, _covLocStartCol = 1, _covLocEndCol = 33})" + (/\dead -> + trace + {all dead. Maybe Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 41, _covLocEndLine = 43, _covLocStartCol = 9, _covLocEndCol = 33})" + (/\dead -> + Maybe_match + {integer} + x + {all dead. Maybe Bool} + (\(y : integer) -> + /\dead -> + trace + {all dead. Maybe Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 12, _covLocEndCol = 22})" + (/\dead -> + Bool_match + (otherFun + (trace + {all dead. integer} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 21, _covLocEndCol = 22})" + (/\dead -> y) + {all dead. dead})) + {all dead. Maybe Bool} + (/\dead -> + trace + {all dead. Maybe Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 26, _covLocEndCol = 36})" + (/\dead -> + Just + {Bool} + (trace + {all dead. Bool} + "CoverLocation (CovLoc {_covLocFile = \"test/Plugin/Coverage/Spec.hs\", _covLocStartLine = 42, _covLocEndLine = 42, _covLocStartCol = 31, _covLocEndCol = 36})" + (/\dead -> False) + {all dead. dead})) + {all dead. dead}) + (/\dead -> fail ()) + {all dead. dead}) + {all dead. dead}) + (/\dead -> fail ()) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/families/associated.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/families/associated.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/families/associated.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/families/associated.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/families/associatedParam.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/families/associatedParam.pir.golden index 12ec7546f95..6f90ae74523 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/families/associatedParam.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/families/associatedParam.pir.golden @@ -1,43 +1,10 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Param (fun (type) (type))) - (tyvardecl a (type)) - Param_match - (vardecl Param (fun a [ Param a ])) - ) - ) - (termbind - (nonstrict) - (vardecl `$WParam` (all a (type) (fun a [ Param a ]))) - (abs - a - (type) - (lam - conrep - a - (let - (nonrec) - (termbind (strict) (vardecl conrep a) conrep) - [ { Param a } conrep ] - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl paramId (all a (type) (fun [ Param a ] (fun a a)))) - (abs a (type) (lam ds [ Param a ] (lam x a x))) - ) - [ - [ - { paramId (con integer) } - [ { `$WParam` (con integer) } (con integer 1) ] - ] - (con integer 1) - ] - ) -) \ No newline at end of file + data (Param :: * -> *) a | Param_match where + Param : a -> Param a + ~`$WParam` : all a. a -> Param a + = /\a -> \(conrep : a) -> let !conrep : a = conrep in Param {a} conrep + ~paramId : all a. Param a -> a -> a = /\a -> \(ds : Param a) (x : a) -> x + in + paramId {integer} (`$WParam` {integer} 1) 1) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicClosed.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicClosed.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicClosed.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicClosed.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicData.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicData.pir.golden index 1d2df6458fc..e97563d8275 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicData.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicData.pir.golden @@ -1,26 +1,11 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl `R:BasicDataBool` (type)) - - `R:BasicDataBool_match` - (vardecl Inst (fun (con integer) `R:BasicDataBool`)) - ) - ) - (lam - ds - `R:BasicDataBool` - (let - (nonrec) - (termbind (strict) (vardecl nt `R:BasicDataBool`) ds) - [ - { [ `R:BasicDataBool_match` nt ] (con integer) } - (lam i (con integer) i) - ] - ) - ) - ) -) \ No newline at end of file + data `R:BasicDataBool` | `R:BasicDataBool_match` where + Inst : integer -> `R:BasicDataBool` + in + \(ds : `R:BasicDataBool`) -> + let + !nt : `R:BasicDataBool` = ds + in + `R:BasicDataBool_match` nt {integer} (\(i : integer) -> i)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicOpen.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicOpen.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicOpen.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/families/basicOpen.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/atPattern.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/atPattern.pir.golden index 904ad70c7c5..166246d17a8 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/atPattern.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/atPattern.pir.golden @@ -1,48 +1,20 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(t : Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} t - [ [ Tuple2 (con integer) ] (con integer) ] - [ - { [ { { Tuple2_match (con integer) } (con integer) } t ] (con integer) } - (lam ds (con integer) (lam ds (con integer) [ [ addInteger ds ] ds ])) - ] - ) - ) -) \ No newline at end of file + {integer} + (\(ds : integer) (ds : integer) -> addInteger ds ds)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/defaultCase.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/defaultCase.pir.golden index 8c7d3487e43..11face25ff7 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/defaultCase.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/defaultCase.pir.golden @@ -1,39 +1,19 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind (nonstrict) (vardecl defaultBody (con integer)) (con integer 2)) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (lam + ~defaultBody : integer = 2 + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + in + \(ds : MyMonoData) -> + let + !ds : MyMonoData = ds + in + MyMonoData_match ds - MyMonoData - (let - (nonrec) - (termbind (strict) (vardecl ds MyMonoData) ds) - [ - [ - [ - { [ MyMonoData_match ds ] (con integer) } - (lam - default_arg0 - (con integer) - (lam default_arg1 (con integer) defaultBody) - ) - ] - (lam default_arg0 (con integer) defaultBody) - ] - (lam a (con integer) a) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(default_arg0 : integer) (default_arg1 : integer) -> defaultBody) + (\(default_arg0 : integer) -> defaultBody) + (\(a : integer) -> a)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/enum.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/enum.pir.golden index bd39e84f745..8b9f94a00ab 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/enum.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/enum.pir.golden @@ -1,15 +1,8 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyEnum (type)) - - MyEnum_match - (vardecl Enum MyEnum) (vardecl Enum MyEnum) - ) - ) - Enum - ) -) \ No newline at end of file + data MyEnum | MyEnum_match where + Enum : MyEnum + Enum : MyEnum + in + Enum) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/irrefutableMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/irrefutableMatch.pir.golden index 05c3a58bde2..0d70c8027a0 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/irrefutableMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/irrefutableMatch.pir.golden @@ -1,54 +1,23 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (nonstrict) - (vardecl defaultBody (con integer)) - { (abs e (type) (error e)) (con integer) } - ) - (datatypebind - (datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) - ) - (termbind - (nonstrict) - (vardecl defaultBody (con integer)) - [ - { [ Unit_match { (abs e (type) (error e)) Unit } ] (con integer) } - defaultBody - ] - ) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (lam + ~defaultBody : integer = (/\e -> error {e}) {integer} + data Unit | Unit_match where + Unit : Unit + ~defaultBody : integer + = Unit_match ((/\e -> error {e}) {Unit}) {integer} defaultBody + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + in + \(ds : MyMonoData) -> + let + !ds : MyMonoData = ds + in + MyMonoData_match ds - MyMonoData - (let - (nonrec) - (termbind (strict) (vardecl ds MyMonoData) ds) - [ - [ - [ - { [ MyMonoData_match ds ] (con integer) } - (lam - default_arg0 - (con integer) - (lam default_arg1 (con integer) defaultBody) - ) - ] - (lam a (con integer) a) - ] - (lam default_arg0 (con integer) defaultBody) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(default_arg0 : integer) (default_arg1 : integer) -> defaultBody) + (\(a : integer) -> a) + (\(default_arg0 : integer) -> defaultBody)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCase.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCase.pir.golden index fe9af864fc3..6e430b52b48 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCase.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCase.pir.golden @@ -1,34 +1,18 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (lam + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + in + \(ds : MyMonoData) -> + let + !ds : MyMonoData = ds + in + MyMonoData_match ds - MyMonoData - (let - (nonrec) - (termbind (strict) (vardecl ds MyMonoData) ds) - [ - [ - [ - { [ MyMonoData_match ds ] (con integer) } - (lam ds (con integer) (lam b (con integer) b)) - ] - (lam a (con integer) a) - ] - (lam a (con integer) a) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(ds : integer) (b : integer) -> b) + (\(a : integer) -> a) + (\(a : integer) -> a)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCaseStrict.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCaseStrict.pir.golden index fe9af864fc3..6e430b52b48 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCaseStrict.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoCaseStrict.pir.golden @@ -1,34 +1,18 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (lam + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + in + \(ds : MyMonoData) -> + let + !ds : MyMonoData = ds + in + MyMonoData_match ds - MyMonoData - (let - (nonrec) - (termbind (strict) (vardecl ds MyMonoData) ds) - [ - [ - [ - { [ MyMonoData_match ds ] (con integer) } - (lam ds (con integer) (lam b (con integer) b)) - ] - (lam a (con integer) a) - ] - (lam a (con integer) a) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(ds : integer) (b : integer) -> b) + (\(a : integer) -> a) + (\(a : integer) -> a)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDest.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDest.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDest.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDest.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDestDefault.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDestDefault.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDestDefault.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstDestDefault.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructed.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructed.pir.golden index b3e42a16e82..42adca87158 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructed.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructed.pir.golden @@ -1,30 +1,11 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (termbind - (nonstrict) - (vardecl `$WMono` (fun (con integer) MyMonoData)) - (lam - conrep - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl conrep (con integer)) conrep) - [ Mono conrep ] - ) - ) - ) - [ `$WMono` (con integer 1) ] - ) -) \ No newline at end of file + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + ~`$WMono` : integer -> MyMonoData + = \(conrep : integer) -> let !conrep : integer = conrep in Mono conrep + in + `$WMono` 1) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructor.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructor.pir.golden index 800fc951330..8316a48c601 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructor.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoConstructor.pir.golden @@ -1,38 +1,19 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (termbind - (nonstrict) - (vardecl `$WMono` (fun (con integer) (fun (con integer) MyMonoData))) - (lam - conrep - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl conrep (con integer)) conrep) - (lam - conrep - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl conrep (con integer)) conrep) - [ [ Mono conrep ] conrep ] - ) - ) - ) - ) - ) - (lam ds (con integer) (lam ds (con integer) [ [ `$WMono` ds ] ds ])) - ) -) \ No newline at end of file + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + ~`$WMono` : integer -> integer -> MyMonoData + = \(conrep : integer) -> + let + !conrep : integer = conrep + in + \(conrep : integer) -> + let + !conrep : integer = conrep + in + Mono conrep conrep + in + \(ds : integer) (ds : integer) -> `$WMono` ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoDataType.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoDataType.pir.golden index 1e4be4c34c6..c9ae439f0ec 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoDataType.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoDataType.pir.golden @@ -1,39 +1,19 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind (nonstrict) (vardecl defaultBody (con integer)) (con integer 1)) - (datatypebind - (datatype - (tyvardecl MyMonoData (type)) - - MyMonoData_match - (vardecl Mono (fun (con integer) (fun (con integer) MyMonoData))) - (vardecl Mono (fun (con integer) MyMonoData)) - (vardecl Mono (fun (con integer) MyMonoData)) - ) - ) - (lam + ~defaultBody : integer = 1 + data MyMonoData | MyMonoData_match where + Mono : integer -> integer -> MyMonoData + Mono : integer -> MyMonoData + Mono : integer -> MyMonoData + in + \(ds : MyMonoData) -> + let + !ds : MyMonoData = ds + in + MyMonoData_match ds - MyMonoData - (let - (nonrec) - (termbind (strict) (vardecl ds MyMonoData) ds) - [ - [ - [ - { [ MyMonoData_match ds ] (con integer) } - (lam - default_arg0 - (con integer) - (lam default_arg1 (con integer) defaultBody) - ) - ] - (lam i (con integer) i) - ] - (lam default_arg0 (con integer) defaultBody) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(default_arg0 : integer) (default_arg1 : integer) -> defaultBody) + (\(i : integer) -> i) + (\(default_arg0 : integer) -> defaultBody)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoRecord.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoRecord.pir.golden index 78a3e385301..ee345dd3bef 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoRecord.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/monoRecord.pir.golden @@ -1,24 +1,8 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyMonoRecord (type)) - - MyMonoRecord_match - (vardecl - MyMonoRecord (fun (con integer) (fun (con integer) MyMonoRecord)) - ) - ) - ) - (lam - ds - MyMonoRecord - [ - { [ MyMonoRecord_match ds ] (con integer) } - (lam ipv (con integer) (lam ipv (con integer) ipv)) - ] - ) - ) -) \ No newline at end of file + data MyMonoRecord | MyMonoRecord_match where + MyMonoRecord : integer -> integer -> MyMonoRecord + in + \(ds : MyMonoRecord) -> + MyMonoRecord_match ds {integer} (\(ipv : integer) (ipv : integer) -> ipv)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/nonValueCase.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/nonValueCase.pir.golden index e5218a8e063..051c3b778af 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/nonValueCase.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/nonValueCase.pir.golden @@ -1,46 +1,22 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyEnum (type)) - - MyEnum_match - (vardecl Enum MyEnum) (vardecl Enum MyEnum) - ) - ) - (datatypebind - (datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) - ) - (termbind - (strict) - (vardecl error (all a (type) (fun (con unit) a))) - (abs a (type) (lam thunk (con unit) (error a))) - ) - (termbind (strict) (vardecl unitval (con unit)) (con unit ())) - (termbind - (nonstrict) - (vardecl error (all a (type) (fun Unit a))) - (abs a (type) (lam x Unit [ { error a } unitval ])) - ) - (lam + data MyEnum | MyEnum_match where + Enum : MyEnum + Enum : MyEnum + data Unit | Unit_match where + Unit : Unit + !error : all a. unit -> a = /\a -> \(thunk : unit) -> error {a} + !unitval : unit = () + ~error : all a. Unit -> a = /\a -> \(x : Unit) -> error {a} unitval + in + \(ds : MyEnum) -> + let + !ds : MyEnum = ds + in + MyEnum_match ds - MyEnum - (let - (nonrec) - (termbind (strict) (vardecl ds MyEnum) ds) - { - [ - [ - { [ MyEnum_match ds ] (all dead (type) (con integer)) } - (abs dead (type) (con integer 1)) - ] - (abs dead (type) [ { error (con integer) } Unit ]) - ] - (all dead (type) dead) - } - ) - ) - ) -) \ No newline at end of file + {all dead. integer} + (/\dead -> 1) + (/\dead -> error {integer} Unit) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordNewtype.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordNewtype.pir.golden index 35cfb78d9b0..0594af143c4 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordNewtype.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordNewtype.pir.golden @@ -1,21 +1,8 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl RecordNewtype (type)) - - RecordNewtype_match - (vardecl RecordNewtype (fun (con integer) RecordNewtype)) - ) - ) - (lam - ds - RecordNewtype - [ - { [ RecordNewtype_match ds ] (con integer) } (lam ipv (con integer) ipv) - ] - ) - ) -) \ No newline at end of file + data RecordNewtype | RecordNewtype_match where + RecordNewtype : integer -> RecordNewtype + in + \(ds : RecordNewtype) -> + RecordNewtype_match ds {integer} (\(ipv : integer) -> ipv)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordWithStrictField.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordWithStrictField.pir.golden index 5eb4e3ed4ec..d004d0bfa2b 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordWithStrictField.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/recordWithStrictField.pir.golden @@ -1,40 +1,20 @@ -(program +program 1.1.0 (let - (nonrec) - (typebind (tyvardecl RecordNewtype (type)) (all a (type) (fun a a))) - (typebind (tyvardecl MyMonoRecord (type)) (all a (type) (fun a a))) - (datatypebind - (datatype - (tyvardecl RecordWithStrictField (type)) - - RecordWithStrictField_match - (vardecl - RecordWithStrictField - (fun MyMonoRecord (fun RecordNewtype RecordWithStrictField)) - ) - ) - ) - (termbind - (nonstrict) - (vardecl strictField (fun RecordWithStrictField RecordNewtype)) - (lam - ds - RecordWithStrictField - [ - { [ RecordWithStrictField_match ds ] RecordNewtype } - (lam ds MyMonoRecord (lam ds RecordNewtype ds)) - ] - ) - ) - (lam - ds - RecordWithStrictField - (let - (nonrec) - (termbind (strict) (vardecl ds RecordWithStrictField) ds) - [ strictField ds ] - ) - ) - ) -) \ No newline at end of file + RecordNewtype = all a. a -> a + MyMonoRecord = all a. a -> a + data RecordWithStrictField | RecordWithStrictField_match where + RecordWithStrictField : + MyMonoRecord -> RecordNewtype -> RecordWithStrictField + ~strictField : RecordWithStrictField -> RecordNewtype + = \(ds : RecordWithStrictField) -> + RecordWithStrictField_match + ds + {RecordNewtype} + (\(ds : MyMonoRecord) (ds : RecordNewtype) -> ds) + in + \(ds : RecordWithStrictField) -> + let + !ds : RecordWithStrictField = ds + in + strictField ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/strictDataMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/strictDataMatch.pir.golden index ab53859bbd9..0941192c29c 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/strictDataMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/strictDataMatch.pir.golden @@ -1,40 +1,18 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl StrictTy (fun (type) (type))) - (tyvardecl a (type)) - StrictTy_match - (vardecl StrictTy (fun a (fun a [ StrictTy a ]))) - ) - ) - (termbind - (nonstrict) - (vardecl `$WStrictTy` (all a (type) (fun a (fun a [ StrictTy a ])))) - (abs - a - (type) - (lam - conrep - a - (let - (nonrec) - (termbind (strict) (vardecl conrep a) conrep) - (lam - conrep - a - (let - (nonrec) - (termbind (strict) (vardecl conrep a) conrep) - [ [ { StrictTy a } conrep ] conrep ] - ) - ) - ) - ) - ) - ) - [ [ { `$WStrictTy` (con integer) } (con integer 1) ] (con integer 2) ] - ) -) \ No newline at end of file + data (StrictTy :: * -> *) a | StrictTy_match where + StrictTy : a -> a -> StrictTy a + ~`$WStrictTy` : all a. a -> a -> StrictTy a + = /\a -> + \(conrep : a) -> + let + !conrep : a = conrep + in + \(conrep : a) -> + let + !conrep : a = conrep + in + StrictTy {a} conrep conrep + in + `$WStrictTy` {integer} 1 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/synonym.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/synonym.pir.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/synonym.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/synonym.pir.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/unusedWrapper.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/unusedWrapper.pir.golden index cc60f56b90a..8bddd86f78d 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/unusedWrapper.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/monomorphic/unusedWrapper.pir.golden @@ -1,51 +1,17 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (datatypebind - (datatype - (tyvardecl T (type)) - - T_match - (vardecl MkT (fun [ [ Tuple2 (con integer) ] (con integer) ] T)) - ) - ) - (termbind - (nonstrict) - (vardecl `$WMkT` (fun [ [ Tuple2 (con integer) ] (con integer) ] T)) - (lam - conrep - [ [ Tuple2 (con integer) ] (con integer) ] - (let - (nonrec) - (termbind - (strict) - (vardecl conrep [ [ Tuple2 (con integer) ] (con integer) ]) - conrep - ) - [ MkT conrep ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl mkT (fun [ [ Tuple2 (con integer) ] (con integer) ] T)) - (lam ds [ [ Tuple2 (con integer) ] (con integer) ] [ `$WMkT` ds ]) - ) - [ - mkT - [ - [ { { Tuple2 (con integer) } (con integer) } (con integer 2) ] - (con integer 1) - ] - ] - ) -) \ No newline at end of file + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + data T | T_match where + MkT : Tuple2 integer integer -> T + ~`$WMkT` : Tuple2 integer integer -> T + = \(conrep : Tuple2 integer integer) -> + let + !conrep : Tuple2 integer integer = conrep + in + MkT conrep + ~mkT : Tuple2 integer integer -> T + = \(ds : Tuple2 integer integer) -> `$WMkT` ds + in + mkT (Tuple2 {integer} {integer} 2 1)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/basicNewtype.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/basicNewtype.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/basicNewtype.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/basicNewtype.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/nestedNewtypeMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/nestedNewtypeMatch.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/nestedNewtypeMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/nestedNewtypeMatch.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreatDest.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreatDest.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreatDest.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreatDest.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate2.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate2.pir.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate2.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeCreate2.pir.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeId.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeId.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeId.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeId.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeMatch.pir.golden index 7f9d8a4e60f..5f274561f69 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/newtypeMatch.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con integer) ds)) \ No newline at end of file +program 1.1.0 (\(ds : integer) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/paramNewtype.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/paramNewtype.pir.golden index a54d3cb88ff..e00e4be5105 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/paramNewtype.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/newtypes/paramNewtype.pir.golden @@ -1,29 +1,12 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - (lam - ds - [ (lam a (type) [ Maybe a ]) (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl nt [ Maybe (con integer) ]) ds) - [ - [ - { [ { Maybe_match (con integer) } nt ] (con integer) } - (lam i (con integer) i) - ] - (con integer 1) - ] - ) - ) - ) -) \ No newline at end of file + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + in + \(ds : (\a -> Maybe a) integer) -> + let + !nt : Maybe integer = ds + in + Maybe_match {integer} nt {integer} (\(i : integer) -> i) 1) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/defaultCasePoly.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/defaultCasePoly.pir.golden index 5d5764965e7..1e3240608b0 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/defaultCasePoly.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/defaultCasePoly.pir.golden @@ -1,37 +1,18 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyPolyData (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - MyPolyData_match - (vardecl Poly (fun a (fun b [ [ MyPolyData a ] b ]))) - (vardecl Poly (fun a [ [ MyPolyData a ] b ])) - ) - ) - (lam + data (MyPolyData :: * -> * -> *) a b | MyPolyData_match where + Poly : a -> b -> MyPolyData a b + Poly : a -> MyPolyData a b + in + \(ds : MyPolyData integer integer) -> + let + !ds : MyPolyData integer integer = ds + in + MyPolyData_match + {integer} + {integer} ds - [ [ MyPolyData (con integer) ] (con integer) ] - (let - (nonrec) - (termbind - (strict) - (vardecl ds [ [ MyPolyData (con integer) ] (con integer) ]) - ds - ) - [ - [ - { - [ { { MyPolyData_match (con integer) } (con integer) } ds ] - (con integer) - } - (lam a (con integer) (lam ds (con integer) a)) - ] - (lam ipv (con integer) (con integer 2)) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(a : integer) (ds : integer) -> a) + (\(ipv : integer) -> 2)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyConstructed.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyConstructed.pir.golden index d8fc0bfa72a..d54b5785af9 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyConstructed.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyConstructed.pir.golden @@ -1,51 +1,19 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyPolyData (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - MyPolyData_match - (vardecl Poly (fun a (fun b [ [ MyPolyData a ] b ]))) - (vardecl Poly (fun a [ [ MyPolyData a ] b ])) - ) - ) - (termbind - (nonstrict) - (vardecl - `$WPoly` - (all a (type) (all b (type) (fun a (fun b [ [ MyPolyData a ] b ])))) - ) - (abs - a - (type) - (abs - b - (type) - (lam - conrep - a - (let - (nonrec) - (termbind (strict) (vardecl conrep a) conrep) - (lam - conrep - b - (let - (nonrec) - (termbind (strict) (vardecl conrep b) conrep) - [ [ { { Poly a } b } conrep ] conrep ] - ) - ) - ) - ) - ) - ) - ) - [ - [ { { `$WPoly` (con integer) } (con integer) } (con integer 1) ] - (con integer 2) - ] - ) -) \ No newline at end of file + data (MyPolyData :: * -> * -> *) a b | MyPolyData_match where + Poly : a -> b -> MyPolyData a b + Poly : a -> MyPolyData a b + ~`$WPoly` : all a b. a -> b -> MyPolyData a b + = /\a b -> + \(conrep : a) -> + let + !conrep : a = conrep + in + \(conrep : b) -> + let + !conrep : b = conrep + in + Poly {a} {b} conrep conrep + in + `$WPoly` {integer} {integer} 1 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyDataType.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyDataType.pir.golden index 28d634e268c..abb1ebca972 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyDataType.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/polymorphic/polyDataType.pir.golden @@ -1,37 +1,18 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyPolyData (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - MyPolyData_match - (vardecl Poly (fun a (fun b [ [ MyPolyData a ] b ]))) - (vardecl Poly (fun a [ [ MyPolyData a ] b ])) - ) - ) - (lam + data (MyPolyData :: * -> * -> *) a b | MyPolyData_match where + Poly : a -> b -> MyPolyData a b + Poly : a -> MyPolyData a b + in + \(ds : MyPolyData integer integer) -> + let + !ds : MyPolyData integer integer = ds + in + MyPolyData_match + {integer} + {integer} ds - [ [ MyPolyData (con integer) ] (con integer) ] - (let - (nonrec) - (termbind - (strict) - (vardecl ds [ [ MyPolyData (con integer) ] (con integer) ]) - ds - ) - [ - [ - { - [ { { MyPolyData_match (con integer) } (con integer) } ds ] - (con integer) - } - (lam ipv (con integer) (lam ipv (con integer) (con integer 1))) - ] - (lam i (con integer) i) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + (\(ipv : integer) (ipv : integer) -> 1) + (\(i : integer) -> i)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/interListConstruct.tplc.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/interListConstruct.tplc.golden index f4883bd8476..914194ebc0a 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/interListConstruct.tplc.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/interListConstruct.tplc.golden @@ -1,157 +1,159 @@ -program - 1.1.0 - ((/\Bool -> - \(True : Bool) - (False : Bool) - (Bool_match : - Bool -> (all out_Bool. out_Bool -> out_Bool -> out_Bool)) -> - (/\(InterList :: * -> * -> *) -> - \(InterCons : all a b. a -> b -> InterList b a -> InterList a b) - (InterNil : all a b. InterList a b) - (InterList_match : - all a b. - InterList a b -> - (all out_InterList. - (a -> b -> InterList b a -> out_InterList) -> - out_InterList -> - out_InterList)) -> - InterCons - {integer} - {Bool} - 0 - False - (InterCons - {Bool} - {integer} - False - -1 - (InterCons - {integer} - {Bool} - 42 - True - (InterNil {Bool} {integer})))) - {\a b -> - ifix - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b)} - (/\a b -> - \(arg_0 : a) - (arg_1 : b) - (arg_2 : - (\a b -> - ifix - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b)) - b - a) -> - iwrap - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b) - (constr - (sop - [ a - , b - , ((\a b -> - ifix - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> - rec - (\(dat :: * -> * -> *) -> - dat a b)))) - (\(dat :: * -> * -> *) -> dat a b)) - b - a) ] - []) - 0 - [arg_0, arg_1, arg_2])) - (/\a b -> - iwrap - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b) - (constr - (sop - [ a - , b - , ((\a b -> - ifix - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> - rec - (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b)) - b - a) ] - []) - 1 - [])) - (/\a b -> - \(x : - (\a b -> - ifix - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b)) - a - b) -> - /\out_InterList -> - \(case_InterCons : - a -> - b -> - (\a b -> - ifix - (\(rec :: ((* -> * -> *) -> *) -> *) - (spine :: (* -> * -> *) -> *) -> - spine - ((\(InterList :: * -> * -> *) a b -> - sop [a, b, (InterList b a)] []) - (\a b -> - rec (\(dat :: * -> * -> *) -> dat a b)))) - (\(dat :: * -> * -> *) -> dat a b)) - b - a -> - out_InterList) - (case_InterNil : out_InterList) -> - case - out_InterList - (unwrap x) - [case_InterCons, case_InterNil])) - {sop [] []} - (constr (sop [] []) 0 []) - (constr (sop [] []) 1 []) - (\(x : sop [] []) -> - /\out_Bool -> - \(case_True : out_Bool) (case_False : out_Bool) -> - case out_Bool x [case_True, case_False])) \ No newline at end of file +(program + 1.1.0 + ((/\Bool -> + \(True : Bool) + (False : Bool) + (Bool_match : + Bool -> (all out_Bool. out_Bool -> out_Bool -> out_Bool)) -> + (/\(InterList :: * -> * -> *) -> + \(InterCons : all a b. a -> b -> InterList b a -> InterList a b) + (InterNil : all a b. InterList a b) + (InterList_match : + all a b. + InterList a b -> + (all out_InterList. + (a -> b -> InterList b a -> out_InterList) -> + out_InterList -> + out_InterList)) -> + InterCons + {integer} + {Bool} + 0 + False + (InterCons + {Bool} + {integer} + False + -1 + (InterCons + {integer} + {Bool} + 42 + True + (InterNil {Bool} {integer})))) + {\a b -> + ifix + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b)} + (/\a b -> + \(arg_0 : a) + (arg_1 : b) + (arg_2 : + (\a b -> + ifix + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> + rec (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b)) + b + a) -> + iwrap + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b) + (constr + (sop + [ a + , b + , ((\a b -> + ifix + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> + rec + (\(dat :: * -> * -> *) -> + dat a b)))) + (\(dat :: * -> * -> *) -> dat a b)) + b + a) ] + []) + 0 + [arg_0, arg_1, arg_2])) + (/\a b -> + iwrap + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> rec (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b) + (constr + (sop + [ a + , b + , ((\a b -> + ifix + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> + rec + (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b)) + b + a) ] + []) + 1 + [])) + (/\a b -> + \(x : + (\a b -> + ifix + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> + rec (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b)) + a + b) -> + /\out_InterList -> + \(case_InterCons : + a -> + b -> + (\a b -> + ifix + (\(rec :: ((* -> * -> *) -> *) -> *) + (spine :: (* -> * -> *) -> *) -> + spine + ((\(InterList :: * -> * -> *) a b -> + sop [a, b, (InterList b a)] []) + (\a b -> + rec (\(dat :: * -> * -> *) -> dat a b)))) + (\(dat :: * -> * -> *) -> dat a b)) + b + a -> + out_InterList) + (case_InterNil : out_InterList) -> + case + out_InterList + (unwrap x) + [case_InterCons, case_InterNil])) + {sop [] []} + (constr (sop [] []) 0 []) + (constr (sop [] []) 1 []) + (\(x : sop [] []) -> + /\out_Bool -> + \(case_True : out_Bool) (case_False : out_Bool) -> + case out_Bool x [case_True, case_False]))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest.eval.golden index b23026d4762..c227083464f 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest.eval.golden @@ -1 +1 @@ -(con integer 0) \ No newline at end of file +0 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest2.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest2.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest2.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstDest2.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct.pir.golden index 373ffbb189f..4d4250e84b1 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct.pir.golden @@ -1,16 +1,8 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - { Nil (con integer) } - ) -) \ No newline at end of file + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + Nil {integer}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct2.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct2.pir.golden index 95645eef92d..b3f6e29f3e2 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct2.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct2.pir.golden @@ -1,56 +1,14 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ]) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam n a [ [ c (con integer 1) ] n ]) - ) - ) - ] - ) - ) -) \ No newline at end of file + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + in + build {integer} (/\a -> \(c : integer -> a -> a) (n : a) -> c 1 n)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct3.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct3.pir.golden index 14f0aa30b85..c02762ea683 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct3.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listConstruct3.pir.golden @@ -1,22 +1,8 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - [ - [ { Cons (con integer) } (con integer 1) ] - [ - [ { Cons (con integer) } (con integer 2) ] - [ [ { Cons (con integer) } (con integer 3) ] { Nil (con integer) } ] - ] - ] - ) -) \ No newline at end of file + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + Cons {integer} 1 (Cons {integer} 2 (Cons {integer} 3 (Nil {integer})))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listMatch.pir.golden index 18f7b4233f9..487467be406 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/listMatch.pir.golden @@ -1,30 +1,17 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (lam + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + \(ds : List integer) -> + let + !ds : List integer = ds + in + List_match + {integer} ds - [ List (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl ds [ List (con integer) ]) ds) - [ - [ - { [ { List_match (con integer) } ds ] (con integer) } - (con integer 0) - ] - (lam x (con integer) (lam ds [ List (con integer) ] x)) - ] - ) - ) - ) -) \ No newline at end of file + {integer} + 0 + (\(x : integer) (ds : List integer) -> x)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/polyRecEval.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/polyRecEval.eval.golden index 7ce41fb5eca..e440e5c8425 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/polyRecEval.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/polyRecEval.eval.golden @@ -1 +1 @@ -(con integer 3) \ No newline at end of file +3 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/processInterListEval.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/processInterListEval.eval.golden index 2bfb66d0059..f70d7bba4ae 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/processInterListEval.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/processInterListEval.eval.golden @@ -1 +1 @@ -(con integer 42) \ No newline at end of file +42 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstDest.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstDest.eval.golden index d135c1204f4..d8263ee9860 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstDest.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstDest.eval.golden @@ -1 +1 @@ -(con integer 2) \ No newline at end of file +2 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstruct.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstruct.pir.golden index 9670052f56c..e0a0e9088cc 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstruct.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeConstruct.pir.golden @@ -1,100 +1,33 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl B (fun (type) (type))) - (tyvardecl a (type)) - B_match - (vardecl One (fun a [ B a ])) - (vardecl Two (fun [ B [ [ Tuple2 a ] a ] ] [ B a ])) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl `$WOne` (all a (type) (fun a [ B a ]))) - (abs - a - (type) - (lam - conrep - a - (let - (nonrec) - (termbind (strict) (vardecl conrep a) conrep) - [ { One a } conrep ] - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$WTwo` (all a (type) (fun [ B [ [ Tuple2 a ] a ] ] [ B a ])) - ) - (abs - a - (type) - (lam - conrep - [ B [ [ Tuple2 a ] a ] ] - (let - (nonrec) - (termbind - (strict) (vardecl conrep [ B [ [ Tuple2 a ] a ] ]) conrep - ) - [ { Two a } conrep ] - ) - ) - ) - ) - [ - { `$WTwo` (con integer) } - [ - { `$WTwo` [ [ Tuple2 (con integer) ] (con integer) ] } - [ - { - `$WOne` - [ - [ Tuple2 [ [ Tuple2 (con integer) ] (con integer) ] ] - [ [ Tuple2 (con integer) ] (con integer) ] - ] - } - [ - [ - { - { Tuple2 [ [ Tuple2 (con integer) ] (con integer) ] } - [ [ Tuple2 (con integer) ] (con integer) ] - } - [ - [ - { { Tuple2 (con integer) } (con integer) } (con integer 1) - ] - (con integer 2) - ] - ] - [ - [ { { Tuple2 (con integer) } (con integer) } (con integer 3) ] - (con integer 4) - ] - ] - ] - ] - ] - ) - ) - ) -) \ No newline at end of file + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + letrec + data (B :: * -> *) a | B_match where + One : a -> B a + Two : B (Tuple2 a a) -> B a + in + let + ~`$WOne` : all a. a -> B a + = /\a -> \(conrep : a) -> let !conrep : a = conrep in One {a} conrep + ~`$WTwo` : all a. B (Tuple2 a a) -> B a + = /\a -> + \(conrep : B (Tuple2 a a)) -> + let + !conrep : B (Tuple2 a a) = conrep + in + Two {a} conrep + in + `$WTwo` + {integer} + (`$WTwo` + {Tuple2 integer integer} + (`$WOne` + {Tuple2 (Tuple2 integer integer) (Tuple2 integer integer)} + (Tuple2 + {Tuple2 integer integer} + {Tuple2 integer integer} + (Tuple2 {integer} {integer} 1 2) + (Tuple2 {integer} {integer} 3 4))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeFirstEval.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeFirstEval.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeFirstEval.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeFirstEval.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeMatch.pir.golden index f13fdbc14c7..9940e5ffaa6 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/ptreeMatch.pir.golden @@ -1,41 +1,20 @@ -(program +program 1.1.0 (let - (nonrec) - (typebind - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (lam a (type) (lam a (type) (all a (type) (fun a a)))) - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl B (fun (type) (type))) - (tyvardecl a (type)) - B_match - (vardecl One (fun a [ B a ])) - (vardecl Two (fun [ B [ [ Tuple2 a ] a ] ] [ B a ])) - ) - ) - (lam - ds - [ B (con integer) ] - (let - (nonrec) - (termbind (strict) (vardecl ds [ B (con integer) ]) ds) - [ - [ - { [ { B_match (con integer) } ds ] (con integer) } - (lam a (con integer) a) - ] - (lam - ds - [ B [ [ Tuple2 (con integer) ] (con integer) ] ] - (con integer 2) - ) - ] - ) - ) - ) - ) -) \ No newline at end of file + Tuple2 :: * -> * -> * = \a a -> all a. a -> a + in + letrec + data (B :: * -> *) a | B_match where + One : a -> B a + Two : B (Tuple2 a a) -> B a + in + \(ds : B integer) -> + let + !ds : B integer = ds + in + B_match + {integer} + ds + {integer} + (\(a : integer) -> a) + (\(ds : B (Tuple2 integer integer)) -> 2)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRose.uplc.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRose.uplc.golden index 5855d08dbd6..b59ff296098 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRose.uplc.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRose.uplc.golden @@ -1,632 +1,177 @@ -(program +program 1.1.0 - [ - (lam - fixBy_i0 - [ - (lam - fix3_i0 - [ - (lam - fix1_i0 - [ - [ - [ - (force + ((\fixBy -> + (\fix3 -> + (\fix1 -> + force + (delay + (\Nil + Cons + List_match -> + force (delay - (lam - Nil_i0 - (lam - Cons_i0 - (lam - List_match_i0 - [ - [ - (force - (delay - (lam - EmptyRose_i0 - (lam - EmptyRose_match_i0 - [ - (lam - g_i0 - [ - (lam - f_i0 - [ - (lam - tup_i0 - [ - (lam - map_i0 - [ - (lam - map_i0 - [ - (lam - tup_i0 - [ - (lam - go_i0 - [ - (lam - g_i0 - [ - (lam - f_i0 - [ - (lam - go_i0 - [ - (lam - g_i0 - [ - (lam - f_i0 - (force - go_i3 - ) - ) - [ - f_i3 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ] - ) - [ - g_i3 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ] - ) - [ - go_i3 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ] - ) - [ - (force - tup_i3 - ) - (lam - arg_0_i0 - (lam - arg_1_i0 - (lam - arg_2_i0 - arg_2_i1 - ) - ) - ) - ] - ] - ) - [ - (force - tup_i2 - ) - (lam - arg_0_i0 - (lam - arg_1_i0 - (lam - arg_2_i0 - arg_1_i2 - ) - ) - ) - ] - ] - ) - [ - (force - tup_i1 - ) - (lam - arg_0_i0 - (lam - arg_1_i0 - (lam - arg_2_i0 - arg_0_i3 - ) - ) - ) - ] - ] - ) - [ - (force - (force - (force - (force - (force - (force - fix3_i12 - ) - ) - ) - ) - ) - ) + (\EmptyRose + EmptyRose_match -> + (\g -> + (\f -> + (\tup -> + (\map -> + (\map -> + (\tup -> + (\go -> + (\g -> + (\f -> + (\go -> + (\g -> + (\f -> force go) + (f (delay - (lam - choose_i0 - (lam - go_i0 - (lam - g_i0 - (lam - f_i0 - [ - [ - [ - choose_i4 - (lam - arg_i0 - (delay - (lam - x_i0 - [ - (lam - x_i0 - [ - (force - g_i12 - ) - [ - (force - [ - f_i4 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ) - x_i1 - ] - ] - ) - x_i1 - ] - ) - ) - ) - ] - (lam - arg_i0 - (delay - [ - (force - map_i6 - ) - (force - [ - go_i4 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ) - ] - ) - ) - ] - (lam - arg_i0 - (delay - (lam - x_i0 - [ - (lam - x_i0 - [ - (force - [ - g_i5 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ) - [ - (force - f_i11 - ) - x_i1 - ] - ] - ) - x_i1 - ] - ) - ) - ) - ] - ) - ) - ) - ) - ) - ] - ] - ) - [ - map_i1 - (delay - (lam x_i0 x_i1) - ) - ] - ] - ) - [ - (force tup_i1) - (lam - arg_0_i0 arg_0_i1 - ) - ] - ] - ) - (delay - (lam - f_i0 - [ - f_i1 - [ - (force - (force fix1_i9) - ) - (lam - map_i0 - (lam - arg_i0 - (delay - (lam - ds_i0 - [ - (lam - ds_i0 - (lam - ds_i0 - (force - [ - [ - (force - [ - (force - List_match_i11 - ) - ds_i1 - ] - ) - (delay - (force - Nil_i13 - ) - ) - ] - (lam - x_i0 - (lam - xs_i0 - (delay - [ - [ - (force - Cons_i14 - ) - [ - ds_i4 - x_i2 - ] - ] - [ - [ - (force - [ - map_i7 - (delay - (lam - x_i0 - x_i1 - ) - ) - ] - ) - ds_i4 - ] - xs_i1 - ] - ] - ) - ) - ) - ] - ) - ) - ) - ds_i1 - ] - ) - ) - ) - ) - ] - ] - ) - ) - ] - ) - (delay - (lam - ds_i0 - [ + (\x -> + x)))) + (g + (delay + (\x -> x)))) + (go (delay (\x -> x)))) + (force tup + (\arg_0 arg_1 arg_2 -> + arg_2))) + (force tup + (\arg_0 arg_1 arg_2 -> + arg_1))) + (force tup + (\arg_0 arg_1 arg_2 -> + arg_0))) + (force + (force + (force (force - [ - EmptyRose_match_i3 - ds_i1 - ] - ) - (lam x_i0 x_i1) - ] - ) - ) - ] - ) - (delay - (lam - ds_i0 - [ - [ - (lam - `$WEmptyRose_i0` - (force `$WEmptyRose_i1`) - ) - (delay - (lam - conrep_i0 - [ - (lam - conrep_i0 - [ - EmptyRose_i5 - conrep_i1 - ] - ) - conrep_i1 - ] - ) - ) - ] - ds_i1 - ] - ) - ) - ] - ) - ) - ) - ) - (lam arg_0_i0 (constr 0 arg_0_i1)) - ] - (lam - x_i0 - (delay - (lam - case_EmptyRose_i0 - (case x_i2 case_EmptyRose_i1) - ) - ) - ) - ] - ) - ) - ) - ) - ) - (delay (constr 0)) - ] - (delay - (lam arg_0_i0 (lam arg_1_i0 (constr 1 arg_0_i2 arg_1_i1))) - ) - ] - (delay - (lam - x_i0 - (delay - (lam - case_Nil_i0 - (lam case_Cons_i0 (case x_i3 case_Nil_i2 case_Cons_i1)) - ) - ) - ) - ) - ] - ) - (delay + (force (force fix3))))) + (delay + (\choose + go + g + f -> + choose + (\arg -> + delay + (\x -> + (\x -> + force + g + (force + (f + (delay + (\x -> + x))) + x)) + x)) + (\arg -> + delay + (force + map + (force + (go + (delay + (\x -> + x)))))) + (\arg -> + delay + (\x -> + (\x -> + force + (g + (delay + (\x -> + x))) + (force f + x)) + x)))))) + (map (delay (\x -> x)))) + (force tup (\arg_0 -> arg_0))) + (delay + (\f -> + f + (force + (force fix1) + (\map + arg -> + delay + (\ds -> + (\ds + ds -> + force + (force + (force List_match + ds) + (delay + (force Nil)) + (\x + xs -> + delay + (force + Cons + (ds x) + (force + (map + (delay + (\x -> + x))) + ds + xs))))) + ds)))))) + (delay + (\ds -> + force (EmptyRose_match ds) (\x -> x)))) + (delay + (\ds -> + (\`$WEmptyRose` -> force `$WEmptyRose`) + (delay + (\conrep -> + (\conrep -> EmptyRose conrep) + conrep)) + ds)))) + (\arg_0 -> constr 0 [arg_0]) + (\x -> + delay (\case_EmptyRose -> case x [case_EmptyRose])))) + (delay (constr 0 [])) + (delay (\arg_0 arg_1 -> constr 1 [arg_0, arg_1])) (delay - (lam - f_i0 - [ - (force (delay (lam s_i0 [ s_i1 s_i1 ]))) - (lam - s_i0 - [ - f_i2 - (lam - x_i0 - [ - [ (force (delay (lam s_i0 [ s_i1 s_i1 ]))) s_i2 ] - x_i1 - ] - ) - ] - ) - ] - ) - ) - ) - ] - ) - (delay - (delay - (delay + (\x -> + delay + (\case_Nil case_Cons -> case x [case_Nil, case_Cons])))) + (delay (delay - (delay - (delay - (lam - f_i0 - [ - [ - (force fixBy_i2) - (lam - k_i0 - (delay - (lam - h_i0 - [ - [ - [ - h_i1 - (lam - x_i0 - [ - (force k_i3) - (lam - f_0_i0 - (lam - f_1_i0 - (lam f_2_i0 [ f_0_i3 x_i4 ]) - ) - ) - ] - ) - ] - (lam - x_i0 - [ - (force k_i3) - (lam - f_0_i0 - (lam - f_1_i0 (lam f_2_i0 [ f_1_i2 x_i4 ]) - ) - ) - ] - ) - ] - (lam - x_i0 - [ - (force k_i3) - (lam - f_0_i0 - (lam - f_1_i0 (lam f_2_i0 [ f_2_i1 x_i4 ]) - ) - ) - ] - ) - ] - ) - ) - ) - ] - f_i1 - ] - ) - ) - ) - ) - ) - ) - ) - ] - ) - (delay - (lam - by_i0 - [ - (force - (force + (\f -> + force (delay (\s -> s s)) + (\s -> f (\x -> force (delay (\s -> s s)) s x)))))) + (delay + (delay (delay + (delay + (delay + (delay + (\f -> + force fixBy + (\k -> + delay + (\h -> + h + (\x -> force k (\f_0 f_1 f_2 -> f_0 x)) + (\x -> force k (\f_0 f_1 f_2 -> f_1 x)) + (\x -> + force k (\f_0 f_1 f_2 -> f_2 x)))) + f)))))))) + (delay + (\by -> + force + (force (delay - (lam - f_i0 - [ - (force (delay (lam s_i0 [ s_i1 s_i1 ]))) - (lam - s_i0 - [ - f_i2 - (lam - x_i0 - [ - [ (force (delay (lam s_i0 [ s_i1 s_i1 ]))) s_i2 ] - x_i1 - ] - ) - ] - ) - ] - ) - ) - ) - ) - ) - (lam - rec_i0 - (lam - h_i0 - (delay - (lam - fr_i0 - [ - (force - [ - by_i4 - (delay - (lam - fq_i0 - [ (force [ rec_i4 h_i3 ]) [ (force h_i3) fq_i1 ] ] - ) - ) - ] - ) - fr_i1 - ] - ) - ) - ) - ) - ] - ) - ) - ] -) \ No newline at end of file + (delay + (\f -> + force (delay (\s -> s s)) + (\s -> f (\x -> force (delay (\s -> s s)) s x)))))) + (\rec h -> + delay + (\fr -> + force (by (delay (\fq -> force (rec h) (force h fq)))) + fr))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRoseEval.eval.golden b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRoseEval.eval.golden index d485f0229df..e665e731059 100644 --- a/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRoseEval.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Data/9.6/recursive/sameEmptyRoseEval.eval.golden @@ -1,3 +1,4 @@ -(constr - 0 (constr 1 (constr 0 (constr 0)) (constr 1 (constr 0 (constr 0)) (constr 0))) -) \ No newline at end of file +constr 0 + [ (constr 1 + [ (constr 0 [(constr 0 [])]) + , (constr 1 [(constr 0 [(constr 0 [])]), (constr 0 [])]) ]) ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Debug/9.6/fib.pir.golden b/plutus-tx-plugin/test/Plugin/Debug/9.6/fib.pir.golden index 45afefbea79..dd27619e30e 100644 --- a/plutus-tx-plugin/test/Plugin/Debug/9.6/fib.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Debug/9.6/fib.pir.golden @@ -9,7 +9,7 @@ (strict) (vardecl { no-src-span } - addInteger + addInteger-505 (fun { no-src-span } (con { no-src-span } integer) @@ -27,7 +27,7 @@ (nonstrict) (vardecl { no-src-span } - addInteger + addInteger-510 (fun { no-src-span } (con { no-src-span } integer) @@ -40,7 +40,7 @@ ) (lam { no-src-span } - x + x-506 (con { no-src-span } integer) (let { no-src-span } @@ -48,12 +48,12 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } x (con { no-src-span } integer)) - { no-src-span } x + (vardecl { no-src-span } x-508 (con { no-src-span } integer)) + { no-src-span } x-506 ) (lam { no-src-span } - y + y-507 (con { no-src-span } integer) (let { no-src-span } @@ -61,13 +61,17 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } y (con { no-src-span } integer)) - { no-src-span } y + (vardecl { no-src-span } y-509 (con { no-src-span } integer)) + { no-src-span } y-507 ) [ { no-src-span } - [ { no-src-span } { no-src-span } addInteger { no-src-span } x ] - { no-src-span } y + [ + { no-src-span } + { no-src-span } addInteger-505 + { no-src-span } x-508 + ] + { no-src-span } y-509 ] ) ) @@ -78,11 +82,11 @@ { no-src-span } (datatype { no-src-span } - (tyvardecl { no-src-span } Bool ({ no-src-span } type)) + (tyvardecl { no-src-span } Bool-495 ({ no-src-span } type)) - Bool_match - (vardecl { no-src-span } True { no-src-span } Bool) - (vardecl { no-src-span } False { no-src-span } Bool) + Bool_match-498 + (vardecl { no-src-span } True-496 { no-src-span } Bool-495) + (vardecl { no-src-span } False-497 { no-src-span } Bool-495) ) ) (termbind @@ -90,7 +94,7 @@ (strict) (vardecl { no-src-span } - equalsInteger + equalsInteger-494 (fun { no-src-span } (con { no-src-span } integer) @@ -108,18 +112,18 @@ (strict) (vardecl { no-src-span } - ifThenElse + ifThenElse-492 (all { no-src-span } - a + a-493 ({ no-src-span } type) (fun { no-src-span } (con { no-src-span } bool) (fun { no-src-span } - { no-src-span } a - (fun { no-src-span } { no-src-span } a { no-src-span } a) + { no-src-span } a-493 + (fun { no-src-span } { no-src-span } a-493 { no-src-span } a-493) ) ) ) @@ -131,18 +135,20 @@ (nonstrict) (vardecl { no-src-span } - equalsInteger + equalsInteger-504 (fun { no-src-span } (con { no-src-span } integer) (fun - { no-src-span } (con { no-src-span } integer) { no-src-span } Bool + { no-src-span } + (con { no-src-span } integer) + { no-src-span } Bool-495 ) ) ) (lam { no-src-span } - x + x-499 (con { no-src-span } integer) (let { no-src-span } @@ -150,12 +156,12 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } x (con { no-src-span } integer)) - { no-src-span } x + (vardecl { no-src-span } x-501 (con { no-src-span } integer)) + { no-src-span } x-499 ) (lam { no-src-span } - y + y-500 (con { no-src-span } integer) (let { no-src-span } @@ -163,21 +169,21 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } y (con { no-src-span } integer)) - { no-src-span } y + (vardecl { no-src-span } y-502 (con { no-src-span } integer)) + { no-src-span } y-500 ) (termbind { no-src-span } (strict) - (vardecl { no-src-span } b (con { no-src-span } bool)) + (vardecl { no-src-span } b-503 (con { no-src-span } bool)) [ { no-src-span } [ { no-src-span } - { no-src-span } equalsInteger - { no-src-span } x + { no-src-span } equalsInteger-494 + { no-src-span } x-501 ] - { no-src-span } y + { no-src-span } y-502 ] ) [ @@ -188,14 +194,14 @@ { no-src-span } { { no-src-span } - { no-src-span } ifThenElse - { no-src-span } Bool + { no-src-span } ifThenElse-492 + { no-src-span } Bool-495 } - { no-src-span } b + { no-src-span } b-503 ] - { no-src-span } True + { no-src-span } True-496 ] - { no-src-span } False + { no-src-span } False-497 ] ) ) @@ -207,7 +213,7 @@ (strict) (vardecl { no-src-span } - subtractInteger + subtractInteger-486 (fun { no-src-span } (con { no-src-span } integer) @@ -225,7 +231,7 @@ (nonstrict) (vardecl { no-src-span } - subtractInteger + subtractInteger-491 (fun { no-src-span } (con { no-src-span } integer) @@ -238,7 +244,7 @@ ) (lam { no-src-span } - x + x-487 (con { no-src-span } integer) (let { no-src-span } @@ -246,12 +252,12 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } x (con { no-src-span } integer)) - { no-src-span } x + (vardecl { no-src-span } x-489 (con { no-src-span } integer)) + { no-src-span } x-487 ) (lam { no-src-span } - y + y-488 (con { no-src-span } integer) (let { no-src-span } @@ -259,17 +265,17 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } y (con { no-src-span } integer)) - { no-src-span } y + (vardecl { no-src-span } y-490 (con { no-src-span } integer)) + { no-src-span } y-488 ) [ { no-src-span } [ { no-src-span } - { no-src-span } subtractInteger - { no-src-span } x + { no-src-span } subtractInteger-486 + { no-src-span } x-489 ] - { no-src-span } y + { no-src-span } y-490 ] ) ) @@ -284,7 +290,7 @@ (nonstrict) (vardecl { no-src-span } - fib + fib-511 (fun { no-src-span } (con { no-src-span } integer) @@ -293,7 +299,7 @@ ) (lam { no-src-span } - n + n-512 (con { no-src-span } integer) (let { test/Plugin/Debug/Spec.hs:46:15-55:72 } @@ -303,10 +309,10 @@ (strict) (vardecl { test/Plugin/Debug/Spec.hs:46:15-55:72 } - n + n-513 (con { test/Plugin/Debug/Spec.hs:46:15-55:72 } integer) ) - { test/Plugin/Debug/Spec.hs:46:15-55:72 } n + { test/Plugin/Debug/Spec.hs:46:15-55:72 } n-512 ) { { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } @@ -319,15 +325,15 @@ [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - Bool_match + Bool_match-498 [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - equalsInteger + equalsInteger-504 { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:47:43-47:43 } - n + n-513 ] (con { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:47:45-47:45 } @@ -338,7 +344,7 @@ ] (all { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - dead + dead-514 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } type) (con @@ -349,7 +355,7 @@ } (abs { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - dead + dead-515 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } type) (con @@ -361,7 +367,7 @@ ] (abs { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - dead + dead-516 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } type) { @@ -375,15 +381,15 @@ [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - Bool_match + Bool_match-498 [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - equalsInteger + equalsInteger-504 { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:50:51-50:51 } - n + n-513 ] (con { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:50:53-50:53 } @@ -394,7 +400,7 @@ ] (all { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - dead + dead-517 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } type) (con @@ -405,7 +411,7 @@ } (abs { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - dead + dead-518 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } type) (con @@ -417,7 +423,7 @@ ] (abs { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - dead + dead-519 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } type) [ @@ -425,19 +431,19 @@ [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72 } - addInteger + addInteger-510 [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72 } - fib + fib-511 [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72, test/Plugin/Debug/Spec.hs:54:42-54:71 } [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72, test/Plugin/Debug/Spec.hs:54:42-54:71 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72, test/Plugin/Debug/Spec.hs:54:42-54:71 } - subtractInteger + subtractInteger-491 { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72, test/Plugin/Debug/Spec.hs:54:42-54:71, test/Plugin/Debug/Spec.hs:54:68-54:68 } - n + n-513 ] (con { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:54:37-54:72, test/Plugin/Debug/Spec.hs:54:42-54:71, test/Plugin/Debug/Spec.hs:54:70-54:70 } @@ -450,15 +456,15 @@ [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72 } - fib + fib-511 [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72, test/Plugin/Debug/Spec.hs:55:42-55:71 } [ { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72, test/Plugin/Debug/Spec.hs:55:42-55:71 } { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72, test/Plugin/Debug/Spec.hs:55:42-55:71 } - subtractInteger + subtractInteger-491 { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72, test/Plugin/Debug/Spec.hs:55:42-55:71, test/Plugin/Debug/Spec.hs:55:68-55:68 } - n + n-513 ] (con { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72, test/Plugin/Debug/Spec.hs:53:33-55:72, test/Plugin/Debug/Spec.hs:55:37-55:72, test/Plugin/Debug/Spec.hs:55:42-55:71, test/Plugin/Debug/Spec.hs:55:70-55:70 } @@ -472,28 +478,28 @@ ] (all { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - dead + dead-520 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } type) { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72, test/Plugin/Debug/Spec.hs:50:25-55:72 } - dead + dead-520 ) } ) ] (all { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - dead + dead-521 ({ test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } type) { test/Plugin/Debug/Spec.hs:46:15-55:72, test/Plugin/Debug/Spec.hs:47:17-55:72 } - dead + dead-521 ) } ) ) ) - { test/Plugin/Debug/Spec.hs:45:9-57:9 } fib + { test/Plugin/Debug/Spec.hs:45:9-57:9 } fib-511 ) ) ) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Debug/9.6/letFun.pir.golden b/plutus-tx-plugin/test/Plugin/Debug/9.6/letFun.pir.golden index 4c61eb0073f..4cbadcb5fce 100644 --- a/plutus-tx-plugin/test/Plugin/Debug/9.6/letFun.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Debug/9.6/letFun.pir.golden @@ -8,11 +8,11 @@ { no-src-span } (datatype { no-src-span } - (tyvardecl { no-src-span } Bool ({ no-src-span } type)) + (tyvardecl { no-src-span } Bool-412 ({ no-src-span } type)) - Bool_match - (vardecl { no-src-span } True { no-src-span } Bool) - (vardecl { no-src-span } False { no-src-span } Bool) + Bool_match-415 + (vardecl { no-src-span } True-413 { no-src-span } Bool-412) + (vardecl { no-src-span } False-414 { no-src-span } Bool-412) ) ) (termbind @@ -20,7 +20,7 @@ (strict) (vardecl { no-src-span } - equalsInteger + equalsInteger-411 (fun { no-src-span } (con { no-src-span } integer) @@ -38,18 +38,18 @@ (strict) (vardecl { no-src-span } - ifThenElse + ifThenElse-409 (all { no-src-span } - a + a-410 ({ no-src-span } type) (fun { no-src-span } (con { no-src-span } bool) (fun { no-src-span } - { no-src-span } a - (fun { no-src-span } { no-src-span } a { no-src-span } a) + { no-src-span } a-410 + (fun { no-src-span } { no-src-span } a-410 { no-src-span } a-410) ) ) ) @@ -61,18 +61,20 @@ (nonstrict) (vardecl { no-src-span } - equalsInteger + equalsInteger-421 (fun { no-src-span } (con { no-src-span } integer) (fun - { no-src-span } (con { no-src-span } integer) { no-src-span } Bool + { no-src-span } + (con { no-src-span } integer) + { no-src-span } Bool-412 ) ) ) (lam { no-src-span } - x + x-416 (con { no-src-span } integer) (let { no-src-span } @@ -80,12 +82,12 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } x (con { no-src-span } integer)) - { no-src-span } x + (vardecl { no-src-span } x-418 (con { no-src-span } integer)) + { no-src-span } x-416 ) (lam { no-src-span } - y + y-417 (con { no-src-span } integer) (let { no-src-span } @@ -93,21 +95,21 @@ (termbind { no-src-span } (strict) - (vardecl { no-src-span } y (con { no-src-span } integer)) - { no-src-span } y + (vardecl { no-src-span } y-419 (con { no-src-span } integer)) + { no-src-span } y-417 ) (termbind { no-src-span } (strict) - (vardecl { no-src-span } b (con { no-src-span } bool)) + (vardecl { no-src-span } b-420 (con { no-src-span } bool)) [ { no-src-span } [ { no-src-span } - { no-src-span } equalsInteger - { no-src-span } x + { no-src-span } equalsInteger-411 + { no-src-span } x-418 ] - { no-src-span } y + { no-src-span } y-419 ] ) [ @@ -118,14 +120,14 @@ { no-src-span } { { no-src-span } - { no-src-span } ifThenElse - { no-src-span } Bool + { no-src-span } ifThenElse-409 + { no-src-span } Bool-412 } - { no-src-span } b + { no-src-span } b-420 ] - { no-src-span } True + { no-src-span } True-413 ] - { no-src-span } False + { no-src-span } False-414 ] ) ) @@ -134,7 +136,7 @@ ) (lam { no-src-span } - ds + ds-422 (con { no-src-span } integer) (let { test/Plugin/Debug/Spec.hs:38:9-38:87 } @@ -144,14 +146,14 @@ (strict) (vardecl { test/Plugin/Debug/Spec.hs:38:9-38:87 } - ds + ds-424 (con { test/Plugin/Debug/Spec.hs:38:9-38:87 } integer) ) - { test/Plugin/Debug/Spec.hs:38:9-38:87 } ds + { test/Plugin/Debug/Spec.hs:38:9-38:87 } ds-422 ) (lam { no-src-span } - ds + ds-423 (con { no-src-span } integer) (let { test/Plugin/Debug/Spec.hs:38:9-38:87 } @@ -161,22 +163,22 @@ (strict) (vardecl { test/Plugin/Debug/Spec.hs:38:9-38:87 } - ds + ds-425 (con { test/Plugin/Debug/Spec.hs:38:9-38:87 } integer) ) - { test/Plugin/Debug/Spec.hs:38:9-38:87 } ds + { test/Plugin/Debug/Spec.hs:38:9-38:87 } ds-423 ) [ { test/Plugin/Debug/Spec.hs:38:9-38:87, test/Plugin/Debug/Spec.hs:38:44-38:86, test/Plugin/Debug/Spec.hs:38:54-38:79 } [ { test/Plugin/Debug/Spec.hs:38:9-38:87, test/Plugin/Debug/Spec.hs:38:44-38:86, test/Plugin/Debug/Spec.hs:38:54-38:79 } { test/Plugin/Debug/Spec.hs:38:9-38:87, test/Plugin/Debug/Spec.hs:38:44-38:86, test/Plugin/Debug/Spec.hs:38:54-38:79 } - equalsInteger + equalsInteger-421 { test/Plugin/Debug/Spec.hs:38:9-38:87, test/Plugin/Debug/Spec.hs:38:44-38:86, test/Plugin/Debug/Spec.hs:38:54-38:79, test/Plugin/Debug/Spec.hs:38:77-38:77 } - ds + ds-424 ] { test/Plugin/Debug/Spec.hs:38:9-38:87, test/Plugin/Debug/Spec.hs:38:44-38:86, test/Plugin/Debug/Spec.hs:38:54-38:79, test/Plugin/Debug/Spec.hs:38:79-38:79 } - ds + ds-425 ] ) ) diff --git a/plutus-tx-plugin/test/Plugin/Errors/9.6/literalAppendBs.uplc.golden b/plutus-tx-plugin/test/Plugin/Errors/9.6/literalAppendBs.uplc.golden index e486156dc3b..a68c541e0fc 100644 --- a/plutus-tx-plugin/test/Plugin/Errors/9.6/literalAppendBs.uplc.golden +++ b/plutus-tx-plugin/test/Plugin/Errors/9.6/literalAppendBs.uplc.golden @@ -1,27 +1,9 @@ -(program +program 1.1.0 - (lam - x_i0 - [ - (lam - x_i0 - [ - [ - [ - (lam appendByteString_i0 (force appendByteString_i1)) - (delay - [ - (lam appendByteString_i0 appendByteString_i1) - (builtin appendByteString) - ] - ) - ] - (con bytestring #68656c6c6f) - ] - x_i1 - ] - ) - x_i1 - ] - ) -) \ No newline at end of file + (\x -> + (\x -> + (\appendByteString -> force appendByteString) + (delay ((\appendByteString -> appendByteString) appendByteString)) + #68656c6c6f + x) + x) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even.pir.golden index ca4884de89c..6fddca8c052 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even.pir.golden @@ -1,137 +1,50 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin subtractInteger) - ) - (termbind - (nonstrict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ subtractInteger x ] y ] - ) - ) - ) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl even (fun (con integer) Bool)) - (lam - n - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl n (con integer)) n) - { - [ - [ - { - [ Bool_match [ [ equalsInteger n ] (con integer 0) ] ] - (all dead (type) Bool) - } - (abs dead (type) True) - ] - (abs - dead - (type) - (let - (nonrec) - (termbind - (strict) - (vardecl n (con integer)) - [ [ subtractInteger n ] (con integer 1) ] - ) - { - [ - [ - { - [ - Bool_match [ [ equalsInteger n ] (con integer 0) ] - ] - (all dead (type) Bool) - } - (abs dead (type) False) - ] - (abs - dead - (type) - [ even [ [ subtractInteger n ] (con integer 1) ] ] - ) - ] - (all dead (type) dead) - } - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - even - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + !subtractInteger : integer -> integer -> integer = subtractInteger + ~subtractInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in subtractInteger x y + in + letrec + ~even : integer -> Bool + = \(n : integer) -> + let + !n : integer = n + in + Bool_match + (equalsInteger n 0) + {all dead. Bool} + (/\dead -> True) + (/\dead -> + let + !n : integer = subtractInteger n 1 + in + Bool_match + (equalsInteger n 0) + {all dead. Bool} + (/\dead -> False) + (/\dead -> even (subtractInteger n 1)) + {all dead. dead}) + {all dead. dead} + in + even) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even3.eval.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even3.eval.golden index f217693e82c..3a05a39aa43 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even3.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even3.eval.golden @@ -1 +1 @@ -(constr 1) \ No newline at end of file +constr 1 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even4.eval.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even4.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even4.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/even4.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib.pir.golden index 0c8019e7afb..f4e7e9b6b50 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib.pir.golden @@ -1,159 +1,57 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin subtractInteger) - ) - (termbind - (nonstrict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ subtractInteger x ] y ] - ) - ) - ) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl fib (fun (con integer) (con integer))) - (lam - n - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl n (con integer)) n) - { - [ - [ - { - [ Bool_match [ [ equalsInteger n ] (con integer 0) ] ] - (all dead (type) (con integer)) - } - (abs dead (type) (con integer 0)) - ] - (abs - dead - (type) - { - [ - [ - { - [ Bool_match [ [ equalsInteger n ] (con integer 1) ] ] - (all dead (type) (con integer)) - } - (abs dead (type) (con integer 1)) - ] - (abs - dead - (type) - [ - [ - addInteger - [ fib [ [ subtractInteger n ] (con integer 1) ] ] - ] - [ fib [ [ subtractInteger n ] (con integer 2) ] ] - ] - ) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ) - ) - fib - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + !subtractInteger : integer -> integer -> integer = subtractInteger + ~subtractInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in subtractInteger x y + in + letrec + ~fib : integer -> integer + = \(n : integer) -> + let + !n : integer = n + in + Bool_match + (equalsInteger n 0) + {all dead. integer} + (/\dead -> 0) + (/\dead -> + Bool_match + (equalsInteger n 1) + {all dead. integer} + (/\dead -> 1) + (/\dead -> + addInteger + (fib (subtractInteger n 1)) + (fib (subtractInteger n 2))) + {all dead. dead}) + {all dead. dead} + in + fib) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib4.eval.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib4.eval.golden index 7ce41fb5eca..e440e5c8425 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib4.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/fib4.eval.golden @@ -1 +1 @@ -(con integer 3) \ No newline at end of file +3 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/lazyLength.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/lazyLength.pir.golden index 969e4c7594e..be60946322f 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/lazyLength.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/lazyLength.pir.golden @@ -1,112 +1,36 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl - addInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl - addInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl lengthLazy (all a (type) (fun [ List a ] (con integer)))) - (abs - a - (type) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun (con integer) (fun [ List a ] (con integer)))) - (lam - acc - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl acc (con integer)) acc) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) (con integer)) - } - (abs dead (type) acc) - ] - (lam - ds - a - (lam - tl - [ List a ] - (abs - dead - (type) - [ - [ go [ [ addInteger acc ] (con integer 1) ] ] tl - ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - (lam - l - [ List a ] - (let - (nonrec) - (termbind (strict) (vardecl l [ List a ]) l) - [ [ go (con integer 0) ] l ] - ) - ) - ) - ) - ) - { lengthLazy (con integer) } - ) - ) -) \ No newline at end of file + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~lengthLazy : all a. List a -> integer + = /\a -> + letrec + ~go : integer -> List a -> integer + = \(acc : integer) -> + let + !acc : integer = acc + in + \(ds : List a) -> + List_match + {a} + ds + {all dead. integer} + (/\dead -> acc) + (\(ds : a) (tl : List a) -> + /\dead -> go (addInteger acc 1) tl) + {all dead. dead} + in + \(l : List a) -> let !l : List a = l in go 0 l + in + lengthLazy {integer}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/strictLength.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/strictLength.pir.golden index 46bef8adf77..1eb6e93fa0c 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/strictLength.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/strictLength.pir.golden @@ -1,112 +1,36 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl - addInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl - addInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl lengthStrict (all a (type) (fun [ List a ] (con integer)))) - (abs - a - (type) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun (con integer) (fun [ List a ] (con integer)))) - (lam - acc - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl acc (con integer)) acc) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) (con integer)) - } - (abs dead (type) acc) - ] - (lam - ds - a - (lam - tl - [ List a ] - (abs - dead - (type) - [ - [ go [ [ addInteger acc ] (con integer 1) ] ] tl - ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - (lam - l - [ List a ] - (let - (nonrec) - (termbind (strict) (vardecl l [ List a ]) l) - [ [ go (con integer 0) ] l ] - ) - ) - ) - ) - ) - { lengthStrict (con integer) } - ) - ) -) \ No newline at end of file + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~lengthStrict : all a. List a -> integer + = /\a -> + letrec + ~go : integer -> List a -> integer + = \(acc : integer) -> + let + !acc : integer = acc + in + \(ds : List a) -> + List_match + {a} + ds + {all dead. integer} + (/\dead -> acc) + (\(ds : a) (tl : List a) -> + /\dead -> go (addInteger acc 1) tl) + {all dead. dead} + in + \(l : List a) -> let !l : List a = l in go 0 l + in + lengthStrict {integer}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sum.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sum.pir.golden index c2956ba9812..410b408a430 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sum.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sum.pir.golden @@ -1,71 +1,27 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (strict) - (vardecl - addInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl - addInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl sum (fun [ List (con integer) ] (con integer))) - (lam + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + letrec + ~sum : List integer -> integer + = \(ds : List integer) -> + List_match + {integer} ds - [ List (con integer) ] - [ - [ - { [ { List_match (con integer) } ds ] (con integer) } - (con integer 0) - ] - (lam - x - (con integer) - (lam xs [ List (con integer) ] [ [ addInteger x ] [ sum xs ] ]) - ) - ] - ) - ) - sum - ) - ) - ) -) \ No newline at end of file + {integer} + 0 + (\(x : integer) (xs : List integer) -> addInteger x (sum xs)) + in + sum) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sumList.eval.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sumList.eval.golden index 96d17867bdd..62f9457511f 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sumList.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/recursive/sumList.eval.golden @@ -1 +1 @@ -(con integer 6) \ No newline at end of file +6 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/allDirect.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/allDirect.pir.golden index 3339158e114..4dc4e539e4b 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/allDirect.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/allDirect.pir.golden @@ -1,247 +1,86 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (nonstrict) - (vardecl nandDirect (fun Bool (fun Bool Bool))) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) False) - ] - (abs - dead - (type) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) False) - ] - (abs dead (type) True) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl andDirect (fun Bool (fun Bool Bool))) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - [ - [ nandDirect [ [ nandDirect ds ] ds ] ] [ [ nandDirect ds ] ds ] - ] - ) - ) - ) - ) - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl - allDirect (all a (type) (fun (fun a Bool) (fun [ List a ] Bool))) - ) - (abs - a - (type) - (lam - p - (fun a Bool) - (let - (nonrec) - (termbind (strict) (vardecl p (fun a Bool)) p) - (lam - l - [ List a ] - (let - (nonrec) - (termbind (strict) (vardecl l [ List a ]) l) - { - [ - [ - { [ { List_match a } l ] (all dead (type) Bool) } - (abs dead (type) True) - ] - (lam - h - a - (lam - t - [ List a ] - (abs - dead - (type) - [ - [ andDirect [ p h ] ] - [ [ { allDirect a } p ] t ] - ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun - (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ] - ) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - (termbind - (strict) - (vardecl - ifThenElse (all a (type) (fun (con bool) (fun a (fun a a)))) - ) - (builtin ifThenElse) - ) - (termbind - (strict) - (vardecl - lessThanInteger (fun (con integer) (fun (con integer) (con bool))) - ) - (builtin lessThanInteger) - ) - (termbind - (nonstrict) - (vardecl - lessThanInteger (fun (con integer) (fun (con integer) Bool)) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) - (vardecl b (con bool)) - [ [ lessThanInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - [ - [ - { allDirect (con integer) } - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ lessThanInteger ds ] (con integer 5) ] - ) - ) - ] - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam - n a [ [ c (con integer 7) ] [ [ c (con integer 6) ] n ] ] - ) - ) - ) - ] - ] - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + ~nandDirect : Bool -> Bool -> Bool + = \(ds : Bool) -> + let + !ds : Bool = ds + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + Bool_match + ds + {all dead. Bool} + (/\dead -> False) + (/\dead -> + Bool_match + ds + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. dead} + ~andDirect : Bool -> Bool -> Bool + = \(ds : Bool) -> + let + !ds : Bool = ds + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + nandDirect (nandDirect ds ds) (nandDirect ds ds) + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + letrec + ~allDirect : all a. (a -> Bool) -> List a -> Bool + = /\a -> + \(p : a -> Bool) -> + let + !p : a -> Bool = p + in + \(l : List a) -> + let + !l : List a = l + in + List_match + {a} + l + {all dead. Bool} + (/\dead -> True) + (\(h : a) (t : List a) -> + /\dead -> andDirect (p h) (allDirect {a} p t)) + {all dead. dead} + in + let + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + !lessThanInteger : integer -> integer -> bool = lessThanInteger + ~lessThanInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanInteger x y + in + ifThenElse {Bool} b True False + in + allDirect + {integer} + (\(ds : integer) -> let !ds : integer = ds in lessThanInteger ds 5) + (build {integer} (/\a -> \(c : integer -> a -> a) (n : a) -> c 7 (c 6 n)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andDirect.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andDirect.pir.golden index 7e014377ae0..d4692d0424c 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andDirect.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andDirect.pir.golden @@ -1,81 +1,39 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (nonstrict) - (vardecl nandDirect (fun Bool (fun Bool Bool))) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) False) - ] - (abs - dead - (type) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) False) - ] - (abs dead (type) True) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl andDirect (fun Bool (fun Bool Bool))) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - [ - [ nandDirect [ [ nandDirect ds ] ds ] ] [ [ nandDirect ds ] ds ] - ] - ) - ) - ) - ) - ) - [ [ andDirect True ] False ] - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + ~nandDirect : Bool -> Bool -> Bool + = \(ds : Bool) -> + let + !ds : Bool = ds + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + Bool_match + ds + {all dead. Bool} + (/\dead -> False) + (/\dead -> + Bool_match + ds + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. dead} + ~andDirect : Bool -> Bool -> Bool + = \(ds : Bool) -> + let + !ds : Bool = ds + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + nandDirect (nandDirect ds ds) (nandDirect ds ds) + in + andDirect True False) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andExternal.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andExternal.pir.golden index 724509fc76d..e8e63e81cad 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andExternal.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/andExternal.pir.golden @@ -1,45 +1,23 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (nonstrict) - (vardecl andExternal (fun Bool (fun Bool Bool))) - (lam - a - Bool - (let - (nonrec) - (termbind (strict) (vardecl a Bool) a) - (lam - b - Bool - (let - (nonrec) - (termbind (strict) (vardecl b Bool) b) - { - [ - [ - { [ Bool_match a ] (all dead (type) Bool) } - (abs dead (type) b) - ] - (abs dead (type) False) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - [ [ andExternal True ] False ] - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + ~andExternal : Bool -> Bool -> Bool + = \(a : Bool) -> + let + !a : Bool = a + in + \(b : Bool) -> + let + !b : Bool = b + in + Bool_match + a + {all dead. Bool} + (/\dead -> b) + (/\dead -> False) + {all dead. dead} + in + andExternal True False) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/applicationFunction.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/applicationFunction.pir.golden index 1404fdb370a..f5a7ad7ede3 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/applicationFunction.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/applicationFunction.pir.golden @@ -1,70 +1,23 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl myDollar (all a (type) (all b (type) (fun (fun a b) (fun a b))))) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (lam - a a (let (nonrec) (termbind (strict) (vardecl a a) a) [ f a ]) - ) - ) - ) - ) - ) - ) - [ - [ - { { myDollar (con integer) } (con integer) } - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ [ addInteger (con integer 1) ] x ] - ) - ) - ] - (con integer 1) - ] - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~myDollar : all a b. (a -> b) -> a -> b + = /\a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + \(a : a) -> let !a : a = a in f a + in + myDollar + {integer} + {integer} + (\(x : integer) -> let !x : integer = x in addInteger 1 x) + 1) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/mutualRecursionUnfoldings.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/mutualRecursionUnfoldings.pir.golden index 07560d9cd8f..1ff79a6452d 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/mutualRecursionUnfoldings.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/mutualRecursionUnfoldings.pir.golden @@ -1,103 +1,37 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (strict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin subtractInteger) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl evenDirect (fun (con integer) Bool)) - (lam - n - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl n (con integer)) n) - (termbind - (strict) - (vardecl b (con bool)) - [ [ equalsInteger n ] (con integer 0) ] - ) - { - [ - [ - { - [ Bool_match [ [ [ { ifThenElse Bool } b ] True ] False ] ] - (all dead (type) Bool) - } - (abs dead (type) True) - ] - (abs - dead - (type) - [ oddDirect [ [ subtractInteger n ] (con integer 1) ] ] - ) - ] - (all dead (type) dead) - } - ) - ) - ) - (termbind - (nonstrict) - (vardecl oddDirect (fun (con integer) Bool)) - (lam - n - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl n (con integer)) n) - (termbind - (strict) - (vardecl b (con bool)) - [ [ equalsInteger n ] (con integer 0) ] - ) - { - [ - [ - { - [ Bool_match [ [ [ { ifThenElse Bool } b ] True ] False ] ] - (all dead (type) Bool) - } - (abs dead (type) False) - ] - (abs - dead - (type) - [ evenDirect [ [ subtractInteger n ] (con integer 1) ] ] - ) - ] - (all dead (type) dead) - } - ) - ) - ) - [ evenDirect (con integer 4) ] - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + !subtractInteger : integer -> integer -> integer = subtractInteger + in + letrec + ~evenDirect : integer -> Bool + = \(n : integer) -> + let + !n : integer = n + !b : bool = equalsInteger n 0 + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. Bool} + (/\dead -> True) + (/\dead -> oddDirect (subtractInteger n 1)) + {all dead. dead} + ~oddDirect : integer -> Bool + = \(n : integer) -> + let + !n : integer = n + !b : bool = equalsInteger n 0 + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. Bool} + (/\dead -> False) + (/\dead -> evenDirect (subtractInteger n 1)) + {all dead. dead} + in + evenDirect 4) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/nandDirect.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/nandDirect.pir.golden index 142605f2382..8c9d99a15aa 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/nandDirect.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/nandDirect.pir.golden @@ -1,58 +1,29 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (nonstrict) - (vardecl nandDirect (fun Bool (fun Bool Bool))) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) False) - ] - (abs - dead - (type) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) False) - ] - (abs dead (type) True) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - [ [ nandDirect True ] False ] - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + ~nandDirect : Bool -> Bool -> Bool + = \(ds : Bool) -> + let + !ds : Bool = ds + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + Bool_match + ds + {all dead. Bool} + (/\dead -> False) + (/\dead -> + Bool_match + ds + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. dead} + in + nandDirect True False) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/polyMap.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/polyMap.pir.golden index 5939fbfe33e..e91f5bf25b7 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/polyMap.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/polyMap.pir.golden @@ -1,159 +1,47 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ]) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl - mapDirect - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ List a ] [ List b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (lam - l - [ List a ] - (let - (nonrec) - (termbind (strict) (vardecl l [ List a ]) l) - { - [ - [ - { - [ { List_match a } l ] - (all dead (type) [ List b ]) - } - (abs dead (type) { Nil b }) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - [ - [ { Cons b } [ f x ] ] - [ [ { { mapDirect a } b } f ] xs ] - ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - ) - ) - [ - [ - { { mapDirect (con integer) } (con integer) } - [ addInteger (con integer 1) ] - ] - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam - n a [ [ c (con integer 0) ] [ [ c (con integer 1) ] n ] ] - ) - ) - ) - ] - ] - ) - ) - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + in + letrec + ~mapDirect : all a b. (a -> b) -> List a -> List b + = /\a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + \(l : List a) -> + let + !l : List a = l + in + List_match + {a} + l + {all dead. List b} + (/\dead -> Nil {b}) + (\(x : a) (xs : List a) -> + /\dead -> Cons {b} (f x) (mapDirect {a} {b} f xs)) + {all dead. dead} + in + mapDirect + {integer} + {integer} + (addInteger 1) + (build {integer} (/\a -> \(c : integer -> a -> a) (n : a) -> c 0 (c 1 n)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelector.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelector.pir.golden index 3f6b9ee1c06..428fc3542fc 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelector.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelector.pir.golden @@ -1,33 +1,10 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyMonoRecord (type)) - - MyMonoRecord_match - (vardecl - MyMonoRecord (fun (con integer) (fun (con integer) MyMonoRecord)) - ) - ) - ) - (termbind - (nonstrict) - (vardecl mrA (fun MyMonoRecord (con integer))) - (lam - ds - MyMonoRecord - [ - { [ MyMonoRecord_match ds ] (con integer) } - (lam ds (con integer) (lam ds (con integer) ds)) - ] - ) - ) - (lam - ds - MyMonoRecord - (let (nonrec) (termbind (strict) (vardecl ds MyMonoRecord) ds) [ mrA ds ]) - ) - ) -) \ No newline at end of file + data MyMonoRecord | MyMonoRecord_match where + MyMonoRecord : integer -> integer -> MyMonoRecord + ~mrA : MyMonoRecord -> integer + = \(ds : MyMonoRecord) -> + MyMonoRecord_match ds {integer} (\(ds : integer) (ds : integer) -> ds) + in + \(ds : MyMonoRecord) -> let !ds : MyMonoRecord = ds in mrA ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelectorExternal.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelectorExternal.pir.golden index 34a6948254d..bfd891dd56b 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelectorExternal.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/recordSelectorExternal.pir.golden @@ -1,35 +1,10 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl MyExternalRecord (type)) - - MyExternalRecord_match - (vardecl MyExternalRecord (fun (con integer) MyExternalRecord)) - ) - ) - (termbind - (nonstrict) - (vardecl myExternal (fun MyExternalRecord (con integer))) - (lam - ds - MyExternalRecord - [ - { [ MyExternalRecord_match ds ] (con integer) } - (lam ds (con integer) ds) - ] - ) - ) - (lam - ds - MyExternalRecord - (let - (nonrec) - (termbind (strict) (vardecl ds MyExternalRecord) ds) - [ myExternal ds ] - ) - ) - ) -) \ No newline at end of file + data MyExternalRecord | MyExternalRecord_match where + MyExternalRecord : integer -> MyExternalRecord + ~myExternal : MyExternalRecord -> integer + = \(ds : MyExternalRecord) -> + MyExternalRecord_match ds {integer} (\(ds : integer) -> ds) + in + \(ds : MyExternalRecord) -> let !ds : MyExternalRecord = ds in myExternal ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2.pir.golden index 510b82bcbe1..5de4434470c 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2.pir.golden @@ -1,67 +1,26 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl UTuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - UTuple2_match - (vardecl UTuple2 (fun a (fun b [ [ UTuple2 a ] b ]))) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuple - (fun [ [ UTuple2 (con integer) ] (con integer) ] (con integer)) - ) - (lam - ds - [ [ UTuple2 (con integer) ] (con integer) ] - [ - { - [ { { UTuple2_match (con integer) } (con integer) } ds ] - (con integer) - } - (lam i (con integer) (lam j (con integer) [ [ addInteger i ] j ])) - ] - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ unboxedTuple [ [ { { UTuple2 (con integer) } (con integer) } x ] x ] ] - ) - ) - ) -) \ No newline at end of file + data (UTuple2 :: * -> * -> *) a b | UTuple2_match where + UTuple2 : a -> b -> UTuple2 a b + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~unboxedTuple : UTuple2 integer integer -> integer + = \(ds : UTuple2 integer integer) -> + UTuple2_match + {integer} + {integer} + ds + {integer} + (\(i : integer) (j : integer) -> addInteger i j) + in + \(x : integer) -> + let + !x : integer = x + in + unboxedTuple (UTuple2 {integer} {integer} x x)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2Tuples.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2Tuples.pir.golden index 10461b44148..152474293af 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2Tuples.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples2Tuples.pir.golden @@ -1,334 +1,58 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl UTuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - UTuple2_match - (vardecl UTuple2 (fun a (fun b [ [ UTuple2 a ] b ]))) - ) - ) - (datatypebind - (datatype - (tyvardecl - UTuple5 - (fun - (type) (fun (type) (fun (type) (fun (type) (fun (type) (type))))) - ) - ) - (tyvardecl a (type)) - (tyvardecl b (type)) - (tyvardecl c (type)) - (tyvardecl d (type)) - (tyvardecl e (type)) - UTuple5_match - (vardecl - UTuple5 - (fun - a - (fun - b (fun c (fun d (fun e [ [ [ [ [ UTuple5 a ] b ] c ] d ] e ]))) - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuple - (fun - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ) - ) - (lam - ds - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - [ - { - [ - { - { - { - { { UTuple5_match (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - ds - ] - (con integer) - } - (lam - i - (con integer) - (lam - j - (con integer) - (lam - k - (con integer) - (lam - l - (con integer) - (lam - m - (con integer) - [ - [ - addInteger - [ - [ - addInteger - [ [ addInteger [ [ addInteger i ] j ] ] k ] - ] - l - ] - ] - m - ] - ) - ) - ) - ) - ) - ] - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuples2Tuple - (fun - [ - [ - UTuple2 - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - (con integer) - ) - ) - (lam - ds - [ - [ + data (UTuple2 :: * -> * -> *) a b | UTuple2_match where + UTuple2 : a -> b -> UTuple2 a b + data (UTuple5 :: * -> * -> * -> * -> * -> *) a b c d e | UTuple5_match where + UTuple5 : a -> b -> c -> d -> e -> UTuple5 a b c d e + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~unboxedTuple : UTuple5 integer integer integer integer integer -> integer + = \(ds : UTuple5 integer integer integer integer integer) -> + UTuple5_match + {integer} + {integer} + {integer} + {integer} + {integer} + ds + {integer} + (\(i : integer) + (j : integer) + (k : integer) + (l : integer) + (m : integer) -> + addInteger (addInteger (addInteger (addInteger i j) k) l) m) + ~unboxedTuples2Tuple : + UTuple2 + (UTuple5 integer integer integer integer integer) + (UTuple5 integer integer integer integer integer) -> + integer + = \(ds : UTuple2 - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - { - [ - { - { - UTuple2_match - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] (con integer) - ] - (con integer) - ] - (con integer) - ] - } - ds - ] - (con integer) - } - (lam - i - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (lam - j - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - [ [ addInteger [ unboxedTuple i ] ] [ unboxedTuple j ] ] - ) - ) - ] - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - unboxedTuples2Tuple - [ - [ - { - { - UTuple2 - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ - [ - { - { - { - { { UTuple5 (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - x - ] - ] - [ - [ - [ - [ - [ - { - { - { - { { UTuple5 (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - x - ] - ] - ] - ) - ) - ) -) \ No newline at end of file + (UTuple5 integer integer integer integer integer) + (UTuple5 integer integer integer integer integer)) -> + UTuple2_match + {UTuple5 integer integer integer integer integer} + {UTuple5 integer integer integer integer integer} + ds + {integer} + (\(i : UTuple5 integer integer integer integer integer) + (j : UTuple5 integer integer integer integer integer) -> + addInteger (unboxedTuple i) (unboxedTuple j)) + in + \(x : integer) -> + let + !x : integer = x + in + unboxedTuples2Tuple + (UTuple2 + {UTuple5 integer integer integer integer integer} + {UTuple5 integer integer integer integer integer} + (UTuple5 {integer} {integer} {integer} {integer} {integer} x x x x x) + (UTuple5 {integer} {integer} {integer} {integer} {integer} x x x x x))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3.pir.golden index 078fa9dfd42..7343906f4bd 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3.pir.golden @@ -1,94 +1,28 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl UTuple3 (fun (type) (fun (type) (fun (type) (type))))) - (tyvardecl a (type)) (tyvardecl b (type)) (tyvardecl c (type)) - UTuple3_match - (vardecl UTuple3 (fun a (fun b (fun c [ [ [ UTuple3 a ] b ] c ])))) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuple - (fun - [ [ [ UTuple3 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ) - ) - (lam - ds - [ [ [ UTuple3 (con integer) ] (con integer) ] (con integer) ] - [ - { - [ - { - { { UTuple3_match (con integer) } (con integer) } (con integer) - } - ds - ] - (con integer) - } - (lam - i - (con integer) - (lam - j - (con integer) - (lam k (con integer) [ [ addInteger [ [ addInteger i ] j ] ] k ]) - ) - ) - ] - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - unboxedTuple - [ - [ - [ - { { { UTuple3 (con integer) } (con integer) } (con integer) } x - ] - x - ] - x - ] - ] - ) - ) - ) -) \ No newline at end of file + data (UTuple3 :: * -> * -> * -> *) a b c | UTuple3_match where + UTuple3 : a -> b -> c -> UTuple3 a b c + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~unboxedTuple : UTuple3 integer integer integer -> integer + = \(ds : UTuple3 integer integer integer) -> + UTuple3_match + {integer} + {integer} + {integer} + ds + {integer} + (\(i : integer) (j : integer) (k : integer) -> + addInteger (addInteger i j) k) + in + \(x : integer) -> + let + !x : integer = x + in + unboxedTuple (UTuple3 {integer} {integer} {integer} x x x)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3Tuples.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3Tuples.pir.golden index 2ff64478ea1..ec5c8922248 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3Tuples.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples3Tuples.pir.golden @@ -1,424 +1,66 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl UTuple3 (fun (type) (fun (type) (fun (type) (type))))) - (tyvardecl a (type)) (tyvardecl b (type)) (tyvardecl c (type)) - UTuple3_match - (vardecl UTuple3 (fun a (fun b (fun c [ [ [ UTuple3 a ] b ] c ])))) - ) - ) - (datatypebind - (datatype - (tyvardecl - UTuple5 - (fun - (type) (fun (type) (fun (type) (fun (type) (fun (type) (type))))) - ) - ) - (tyvardecl a (type)) - (tyvardecl b (type)) - (tyvardecl c (type)) - (tyvardecl d (type)) - (tyvardecl e (type)) - UTuple5_match - (vardecl - UTuple5 - (fun - a - (fun - b (fun c (fun d (fun e [ [ [ [ [ UTuple5 a ] b ] c ] d ] e ]))) - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuple - (fun - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ) - ) - (lam - ds - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - [ - { - [ - { - { - { - { { UTuple5_match (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - ds - ] - (con integer) - } - (lam - i - (con integer) - (lam - j - (con integer) - (lam - k - (con integer) - (lam - l - (con integer) - (lam - m - (con integer) - [ - [ - addInteger - [ - [ - addInteger - [ [ addInteger [ [ addInteger i ] j ] ] k ] - ] - l - ] - ] - m - ] - ) - ) - ) - ) - ) - ] - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuples3Tuple - (fun - [ - [ - [ - UTuple3 - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] (con integer) - ] - (con integer) - ] - (con integer) - ] - ] - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - (con integer) - ) - ) - (lam - ds - [ - [ - [ - UTuple3 - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - ] - [ - { - [ - { - { - { - UTuple3_match - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] (con integer) - ] - (con integer) - ] - (con integer) - ] - } - ds - ] - (con integer) - } - (lam - i - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (lam - j - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (lam - k - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] (con integer) - ] - (con integer) - ] - (con integer) - ] - [ - [ - addInteger - [ [ addInteger [ unboxedTuple i ] ] [ unboxedTuple j ] ] - ] - [ unboxedTuple k ] - ] - ) - ) - ) - ] - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - unboxedTuples3Tuple - [ - [ - [ - { - { - { - UTuple3 - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ [ UTuple5 (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ] - } - [ - [ - [ - [ - [ - { - { - { - { { UTuple5 (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - x - ] - ] - [ - [ - [ - [ - [ - { - { - { - { { UTuple5 (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - x - ] - ] - [ - [ - [ - [ - [ - { - { - { - { { UTuple5 (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - x - ] - ] - ] - ) - ) - ) -) \ No newline at end of file + data (UTuple3 :: * -> * -> * -> *) a b c | UTuple3_match where + UTuple3 : a -> b -> c -> UTuple3 a b c + data (UTuple5 :: * -> * -> * -> * -> * -> *) a b c d e | UTuple5_match where + UTuple5 : a -> b -> c -> d -> e -> UTuple5 a b c d e + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~unboxedTuple : UTuple5 integer integer integer integer integer -> integer + = \(ds : UTuple5 integer integer integer integer integer) -> + UTuple5_match + {integer} + {integer} + {integer} + {integer} + {integer} + ds + {integer} + (\(i : integer) + (j : integer) + (k : integer) + (l : integer) + (m : integer) -> + addInteger (addInteger (addInteger (addInteger i j) k) l) m) + ~unboxedTuples3Tuple : + UTuple3 + (UTuple5 integer integer integer integer integer) + (UTuple5 integer integer integer integer integer) + (UTuple5 integer integer integer integer integer) -> + integer + = \(ds : + UTuple3 + (UTuple5 integer integer integer integer integer) + (UTuple5 integer integer integer integer integer) + (UTuple5 integer integer integer integer integer)) -> + UTuple3_match + {UTuple5 integer integer integer integer integer} + {UTuple5 integer integer integer integer integer} + {UTuple5 integer integer integer integer integer} + ds + {integer} + (\(i : UTuple5 integer integer integer integer integer) + (j : UTuple5 integer integer integer integer integer) + (k : UTuple5 integer integer integer integer integer) -> + addInteger + (addInteger (unboxedTuple i) (unboxedTuple j)) + (unboxedTuple k)) + in + \(x : integer) -> + let + !x : integer = x + in + unboxedTuples3Tuple + (UTuple3 + {UTuple5 integer integer integer integer integer} + {UTuple5 integer integer integer integer integer} + {UTuple5 integer integer integer integer integer} + (UTuple5 {integer} {integer} {integer} {integer} {integer} x x x x x) + (UTuple5 {integer} {integer} {integer} {integer} {integer} x x x x x) + (UTuple5 {integer} {integer} {integer} {integer} {integer} x x x x x))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples4.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples4.pir.golden index d10fbd1a9fe..2570ca5f6d9 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples4.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples4.pir.golden @@ -1,131 +1,29 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl - UTuple4 (fun (type) (fun (type) (fun (type) (fun (type) (type))))) - ) - (tyvardecl a (type)) - (tyvardecl b (type)) - (tyvardecl c (type)) - (tyvardecl d (type)) - UTuple4_match - (vardecl - UTuple4 - (fun a (fun b (fun c (fun d [ [ [ [ UTuple4 a ] b ] c ] d ])))) - ) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuple - (fun - [ - [ [ [ UTuple4 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ) - ) - (lam - ds - [ - [ [ [ UTuple4 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - [ - { - [ - { - { - { { UTuple4_match (con integer) } (con integer) } - (con integer) - } - (con integer) - } - ds - ] - (con integer) - } - (lam - i - (con integer) - (lam - j - (con integer) - (lam - k - (con integer) - (lam - l - (con integer) - [ - [ addInteger [ [ addInteger [ [ addInteger i ] j ] ] k ] ] l - ] - ) - ) - ) - ) - ] - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - unboxedTuple - [ - [ - [ - [ - { - { - { { UTuple4 (con integer) } (con integer) } (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - ] - ) - ) - ) -) \ No newline at end of file + data (UTuple4 :: * -> * -> * -> * -> *) a b c d | UTuple4_match where + UTuple4 : a -> b -> c -> d -> UTuple4 a b c d + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~unboxedTuple : UTuple4 integer integer integer integer -> integer + = \(ds : UTuple4 integer integer integer integer) -> + UTuple4_match + {integer} + {integer} + {integer} + {integer} + ds + {integer} + (\(i : integer) (j : integer) (k : integer) (l : integer) -> + addInteger (addInteger (addInteger i j) k) l) + in + \(x : integer) -> + let + !x : integer = x + in + unboxedTuple (UTuple4 {integer} {integer} {integer} {integer} x x x x)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples5.pir.golden b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples5.pir.golden index ea628517666..5a3ebe78fd3 100644 --- a/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples5.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Functions/9.6/unfoldings/unboxedTuples5.pir.golden @@ -1,170 +1,35 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl - UTuple5 - (fun - (type) (fun (type) (fun (type) (fun (type) (fun (type) (type))))) - ) - ) - (tyvardecl a (type)) - (tyvardecl b (type)) - (tyvardecl c (type)) - (tyvardecl d (type)) - (tyvardecl e (type)) - UTuple5_match - (vardecl - UTuple5 - (fun - a - (fun - b (fun c (fun d (fun e [ [ [ [ [ UTuple5 a ] b ] c ] d ] e ]))) - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - unboxedTuple - (fun - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - (con integer) - ) - ) - (lam - ds - [ - [ - [ [ [ UTuple5 (con integer) ] (con integer) ] (con integer) ] - (con integer) - ] - (con integer) - ] - [ - { - [ - { - { - { - { { UTuple5_match (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - ds - ] - (con integer) - } - (lam - i - (con integer) - (lam - j - (con integer) - (lam - k - (con integer) - (lam - l - (con integer) - (lam - m - (con integer) - [ - [ - addInteger - [ - [ - addInteger - [ [ addInteger [ [ addInteger i ] j ] ] k ] - ] - l - ] - ] - m - ] - ) - ) - ) - ) - ) - ] - ) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - unboxedTuple - [ - [ - [ - [ - [ - { - { - { - { { UTuple5 (con integer) } (con integer) } - (con integer) - } - (con integer) - } - (con integer) - } - x - ] - x - ] - x - ] - x - ] - x - ] - ] - ) - ) - ) -) \ No newline at end of file + data (UTuple5 :: * -> * -> * -> * -> * -> *) a b c d e | UTuple5_match where + UTuple5 : a -> b -> c -> d -> e -> UTuple5 a b c d e + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~unboxedTuple : UTuple5 integer integer integer integer integer -> integer + = \(ds : UTuple5 integer integer integer integer integer) -> + UTuple5_match + {integer} + {integer} + {integer} + {integer} + {integer} + ds + {integer} + (\(i : integer) + (j : integer) + (k : integer) + (l : integer) + (m : integer) -> + addInteger (addInteger (addInteger (addInteger i j) k) l) m) + in + \(x : integer) -> + let + !x : integer = x + in + unboxedTuple + (UTuple5 {integer} {integer} {integer} {integer} {integer} x x x x x)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinError.pir.golden b/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinError.pir.golden index 43b6475d966..7f3635ae812 100644 --- a/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinError.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinError.pir.golden @@ -1,67 +1,33 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl error (all a (type) (fun (con unit) a))) - (abs a (type) (lam thunk (con unit) (error a))) - ) - (termbind (strict) (vardecl unitval (con unit)) (con unit ())) - (termbind - (nonstrict) - (vardecl joinError (fun Bool (fun Bool Unit))) - (lam - x - Bool - (let - (nonrec) - (termbind (strict) (vardecl x Bool) x) - (lam - y - Bool - (let - (nonrec) - (termbind (strict) (vardecl y Bool) y) - { - [ - [ - { [ Bool_match x ] (all dead (type) Unit) } - (abs - dead - (type) - { - [ - [ - { [ Bool_match y ] (all dead (type) Unit) } - (abs dead (type) [ { error Unit } unitval ]) - ] - (abs dead (type) Unit) - ] - (all dead (type) dead) - } - ) - ] - (abs dead (type) Unit) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - joinError - ) -) \ No newline at end of file + data Unit | Unit_match where + Unit : Unit + data Bool | Bool_match where + True : Bool + False : Bool + !error : all a. unit -> a = /\a -> \(thunk : unit) -> error {a} + !unitval : unit = () + ~joinError : Bool -> Bool -> Unit + = \(x : Bool) -> + let + !x : Bool = x + in + \(y : Bool) -> + let + !y : Bool = y + in + Bool_match + x + {all dead. Unit} + (/\dead -> + Bool_match + y + {all dead. Unit} + (/\dead -> error {Unit} unitval) + (/\dead -> Unit) + {all dead. dead}) + (/\dead -> Unit) + {all dead. dead} + in + joinError) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinErrorEval.eval.golden b/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinErrorEval.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinErrorEval.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Laziness/9.6/joinErrorEval.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Laziness/9.6/lazyDepUnit.pir.golden b/plutus-tx-plugin/test/Plugin/Laziness/9.6/lazyDepUnit.pir.golden index 618f81d2b40..94eb661b012 100644 --- a/plutus-tx-plugin/test/Plugin/Laziness/9.6/lazyDepUnit.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Laziness/9.6/lazyDepUnit.pir.golden @@ -1,23 +1,9 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) (vardecl emptyByteString (con bytestring)) (con bytestring #) - ) - (termbind - (nonstrict) (vardecl emptyByteString (con bytestring)) emptyByteString - ) - (termbind - (nonstrict) - (vardecl monoId (fun (con bytestring) (con bytestring))) - (lam x (con bytestring) x) - ) - (termbind - (nonstrict) - (vardecl aByteString (con bytestring)) - [ monoId emptyByteString ] - ) - aByteString - ) -) \ No newline at end of file + !emptyByteString : bytestring = # + ~emptyByteString : bytestring = emptyByteString + ~monoId : bytestring -> bytestring = \(x : bytestring) -> x + ~aByteString : bytestring = monoId emptyByteString + in + aByteString) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysFails.uplc.golden b/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysFails.uplc.golden index 4898f1b9518..84474f1e55a 100644 --- a/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysFails.uplc.golden +++ b/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysFails.uplc.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds_i0 (lam ds_i0 (lam ds_i0 (error))))) \ No newline at end of file +program 1.1.0 (\ds ds ds -> error) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysSucceeds.uplc.golden b/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysSucceeds.uplc.golden index 458414d23a2..cc0fa6b6b80 100644 --- a/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysSucceeds.uplc.golden +++ b/plutus-tx-plugin/test/Plugin/Optimization/9.6/alwaysSucceeds.uplc.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds_i0 (lam ds_i0 (lam ds_i0 (constr 0))))) \ No newline at end of file +program 1.1.0 (\ds ds ds -> constr 0 []) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/and.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/and.pir.golden index e9c4ed13828..01260387ea4 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/and.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/and.pir.golden @@ -1,40 +1,21 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - (lam - ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Bool) } - (abs dead (type) ds) - ] - (abs dead (type) False) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + Bool_match + ds + {all dead. Bool} + (/\dead -> ds) + (/\dead -> False) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/andApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/andApply.eval.golden index f217693e82c..3a05a39aa43 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/andApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/andApply.eval.golden @@ -1 +1 @@ -(constr 1) \ No newline at end of file +constr 1 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/bool.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/bool.pir.golden index 55f951efd29..6817f273093 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/bool.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/bool.pir.golden @@ -1,15 +1,8 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - True - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + in + True) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestring.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestring.pir.golden index 6db4ca37033..93bd77be176 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestring.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestring.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con bytestring) ds)) \ No newline at end of file +program 1.1.0 (\(ds : bytestring) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestringApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestringApply.eval.golden index 654694afba7..e99e2cf725c 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestringApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/bytestringApply.eval.golden @@ -1 +1 @@ -(con bytestring #68656c6c6f) \ No newline at end of file +#68656c6c6f \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/consByteString.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/consByteString.eval.golden index 654694afba7..e99e2cf725c 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/consByteString.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/consByteString.eval.golden @@ -1 +1 @@ -(con bytestring #68656c6c6f) \ No newline at end of file +#68656c6c6f \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/constructData1.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/constructData1.eval.golden index e3fa6e48c68..9c15a755675 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/constructData1.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/constructData1.eval.golden @@ -1 +1 @@ -(con data (I 1)) \ No newline at end of file +I 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/decodeUtf8.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/decodeUtf8.eval.golden index b5b46ba8829..84ed78b69ba 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/decodeUtf8.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/decodeUtf8.eval.golden @@ -1 +1 @@ -(con string "hello") \ No newline at end of file +"hello" \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData1.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData1.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData1.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData1.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData2.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData2.eval.golden index 67af525910d..b665d049fe5 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData2.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData2.eval.golden @@ -1,5 +1 @@ -(constr - 0 - (con integer 1) - (constr 1 (con integer 2) (constr 1 (con integer 3) (constr 0))) -) \ No newline at end of file +constr 0 [1, (constr 1 [2, (constr 1 [3, (constr 0 [])])])] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData3.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData3.eval.golden index a94f80f17e3..bc5f2c982f4 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData3.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructData3.eval.golden @@ -1 +1 @@ -(constr 1 (con data (I 2)) (constr 1 (con data (I 3)) (constr 0))) \ No newline at end of file +constr 1 [(I 2), (constr 1 [(I 3), (constr 0 [])])] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData1.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData1.pir.golden index d35fbfd32ef..71d4b597974 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData1.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData1.pir.golden @@ -1,33 +1,8 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl unsafeDataAsI (fun (con data) (con integer))) - (builtin unIData) - ) - (termbind - (nonstrict) - (vardecl unsafeDataAsI (fun (con data) (con integer))) - (lam - d - (con data) - (let - (nonrec) - (termbind (strict) (vardecl d (con data)) d) - [ unsafeDataAsI d ] - ) - ) - ) - (lam - ds - (con data) - (let - (nonrec) - (termbind (strict) (vardecl ds (con data)) ds) - [ unsafeDataAsI ds ] - ) - ) - ) -) \ No newline at end of file + !unsafeDataAsI : data -> integer = unIData + ~unsafeDataAsI : data -> integer + = \(d : data) -> let !d : data = d in unsafeDataAsI d + in + \(ds : data) -> let !ds : data = ds in unsafeDataAsI ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData2.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData2.pir.golden index 2919c2b1560..59e0c7c3397 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData2.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/deconstructorData2.pir.golden @@ -1,488 +1,127 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFunctorTuple2_$cfmap` - (all - c - (type) - (all - a - (type) - (all - b - (type) - (fun (fun a b) (fun [ [ Tuple2 c ] a ] [ [ Tuple2 c ] b ])) - ) - ) - ) - ) - (abs - c - (type) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (lam - ds - [ [ Tuple2 c ] a ] - [ - { [ { { Tuple2_match c } a } ds ] [ [ Tuple2 c ] b ] } - (lam c c (lam a a [ [ { { Tuple2 c } b } c ] [ f a ] ])) - ] - ) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFunctorTuple2` - (all - c - (type) - [ - (lam - f - (fun (type) (type)) - (all - a (type) (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - [ Tuple2 c ] - ] - ) - ) - `$fFunctorTuple2_$cfmap` - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - `$fFunctorList_$cfmap` - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ List a ] [ List b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] [ List b ])) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) [ List b ]) - } - (abs dead (type) { Nil b }) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - [ [ { Cons b } [ f x ] ] [ go xs ] ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFunctorList` - [ - (lam - f - (fun (type) (type)) - (all - a (type) (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - List - ] - ) - `$fFunctorList_$cfmap` - ) - (termbind - (nonstrict) - (vardecl - `.` - (all - b - (type) - (all - c - (type) - (all a (type) (fun (fun b c) (fun (fun a b) (fun a c)))) - ) - ) - ) - (abs - b - (type) - (abs - c - (type) - (abs - a - (type) - (lam f (fun b c) (lam g (fun a b) (lam x a [ f [ g x ] ]))) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - fmap - (all - f - (fun (type) (type)) - (fun - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (all - a (type) (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - ) - ) - (abs - f - (fun (type) (type)) - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - v - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fHasFromOpaqueBuiltinDataBuiltinData_$cfromOpaque` - (fun (con data) (con data)) - ) - (lam eta (con data) eta) - ) - (termbind - (strict) - (vardecl - chooseList - (all - a (type) (all b (type) (fun [ (con list) a ] (fun b (fun b b)))) - ) - ) - (builtin chooseList) - ) - (termbind - (strict) - (vardecl head (all a (type) (fun [ (con list) a ] a))) - (builtin headList) - ) - (termbind - (strict) - (vardecl tail (all a (type) (fun [ (con list) a ] [ (con list) a ]))) - (builtin tailList) - ) - (termbind (strict) (vardecl unitval (con unit)) (con unit ())) - (termbind - (nonstrict) - (vardecl - `$fHasFromOpaqueBuiltinListList_$cfromOpaque` - (all - arep - (type) - (all - a - (type) - (fun - [ [ (lam arep (type) (lam a (type) (fun arep a))) arep ] a ] - (fun [ (con list) arep ] [ List a ]) - ) - ) - ) - ) - (abs - arep - (type) - (abs - a - (type) - (lam - `$dHasFromOpaque` - [ [ (lam arep (type) (lam a (type) (fun arep a))) arep ] a ] - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ (con list) arep ] [ List a ])) - (lam + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + ~`$fFunctorTuple2_$cfmap` : all c a b. (a -> b) -> Tuple2 c a -> Tuple2 c b + = /\c a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + \(ds : Tuple2 c a) -> + Tuple2_match + {c} + {a} + ds + {Tuple2 c b} + (\(c : c) (a : a) -> Tuple2 {c} {b} c (f a)) + ~`$fFunctorTuple2` : + all c. (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) (Tuple2 c) + = `$fFunctorTuple2_$cfmap` + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~`$fFunctorList_$cfmap` : all a b. (a -> b) -> List a -> List b + = /\a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + letrec + ~go : List a -> List b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List b} + (/\dead -> Nil {b}) + (\(x : a) (xs : List a) -> + /\dead -> Cons {b} (f x) (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + ~`$fFunctorList` : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) List + = `$fFunctorList_$cfmap` + ~`.` : all b c a. (b -> c) -> (a -> b) -> a -> c + = /\b c a -> \(f : b -> c) (g : a -> b) (x : a) -> f (g x) + ~fmap : + all (f :: * -> *). + (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f -> + (all a b. (a -> b) -> f a -> f b) + = /\(f :: * -> *) -> + \(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) -> v + ~`$fHasFromOpaqueBuiltinDataBuiltinData_$cfromOpaque` : data -> data + = \(eta : data) -> eta + !chooseList : all a b. list a -> b -> b -> b = chooseList + !head : all a. list a -> a = headList + !tail : all a. list a -> list a = tailList + !unitval : unit = () + ~`$fHasFromOpaqueBuiltinListList_$cfromOpaque` : + all arep a. (\arep a -> arep -> a) arep a -> list arep -> List a + = /\arep a -> + \(`$dHasFromOpaque` : (\arep a -> arep -> a) arep a) -> + letrec + ~go : list arep -> List a + = \(l : list arep) -> + let + !l : list arep = l + in + chooseList + {arep} + {unit -> List a} l - [ (con list) arep ] - (let - (nonrec) - (termbind (strict) (vardecl l [ (con list) arep ]) l) - [ - [ - [ - [ - { - { chooseList arep } - (fun (con unit) [ List a ]) - } - l - ] - (lam ds (con unit) { Nil a }) - ] - (lam - ds - (con unit) - [ - [ - { Cons a } - [ `$dHasFromOpaque` [ { head arep } l ] ] - ] - [ go [ { tail arep } l ] ] - ] - ) - ] - unitval - ] - ) - ) - ) - (lam eta [ (con list) arep ] [ go eta ]) - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl - fst (all a (type) (all b (type) (fun [ [ (con pair) a ] b ] a))) - ) - (builtin fstPair) - ) - (termbind - (strict) - (vardecl - snd (all a (type) (all b (type) (fun [ [ (con pair) a ] b ] b))) - ) - (builtin sndPair) - ) - (termbind - (strict) - (vardecl - unsafeDataAsConstr - (fun - (con data) - [ [ (con pair) (con integer) ] [ (con list) (con data) ] ] - ) - ) - (builtin unConstrData) - ) - (termbind - (nonstrict) - (vardecl - unsafeDataAsConstr - (fun (con data) [ [ Tuple2 (con integer) ] [ List (con data) ] ]) - ) - (lam - d - (con data) - (let - (nonrec) - (termbind (strict) (vardecl d (con data)) d) - (termbind - (strict) - (vardecl - p [ [ (con pair) (con integer) ] [ (con list) (con data) ] ] - ) - [ unsafeDataAsConstr d ] - ) - [ - [ - { { Tuple2 (con integer) } [ List (con data) ] } - [ { { fst (con integer) } [ (con list) (con data) ] } p ] - ] - (let - (nonrec) - (termbind - (strict) - (vardecl a [ (con list) (con data) ]) - [ { { snd (con integer) } [ (con list) (con data) ] } p ] - ) - [ - [ - { - { - `$fHasFromOpaqueBuiltinListList_$cfromOpaque` - (con data) - } - (con data) - } - `$fHasFromOpaqueBuiltinDataBuiltinData_$cfromOpaque` - ] - a - ] - ) - ] - ) - ) - ) - (termbind - (strict) - (vardecl unsafeDataAsI (fun (con data) (con integer))) - (builtin unIData) - ) - (termbind - (nonstrict) - (vardecl unsafeDataAsI (fun (con data) (con integer))) - (lam - d - (con data) + (\(ds : unit) -> Nil {a}) + (\(ds : unit) -> + Cons + {a} + (`$dHasFromOpaque` (head {arep} l)) + (go (tail {arep} l))) + unitval + in + \(eta : list arep) -> go eta + !fst : all a b. pair a b -> a = fstPair + !snd : all a b. pair a b -> b = sndPair + !unsafeDataAsConstr : data -> pair integer (list data) = unConstrData + ~unsafeDataAsConstr : data -> Tuple2 integer (List data) + = \(d : data) -> + let + !d : data = d + !p : pair integer (list data) = unsafeDataAsConstr d + in + Tuple2 + {integer} + {List data} + (fst {integer} {list data} p) (let - (nonrec) - (termbind (strict) (vardecl d (con data)) d) - [ unsafeDataAsI d ] - ) - ) - ) - (lam - ds - (con data) - (let - (nonrec) - (termbind (strict) (vardecl ds (con data)) ds) - [ - [ - [ - [ - { - { - { `.` (fun [ List (con data) ] [ List (con integer) ]) } - (fun - [ [ Tuple2 (con integer) ] [ List (con data) ] ] - [ [ Tuple2 (con integer) ] [ List (con integer) ] ] - ) - } - (fun (con data) (con integer)) - } - { - { - [ - { fmap [ Tuple2 (con integer) ] } - { `$fFunctorTuple2` (con integer) } - ] - [ List (con data) ] - } - [ List (con integer) ] - } - ] - { - { [ { fmap List } `$fFunctorList` ] (con data) } - (con integer) - } - ] - unsafeDataAsI - ] - [ unsafeDataAsConstr ds ] - ] - ) - ) - ) - ) - ) -) \ No newline at end of file + !a : list data = snd {integer} {list data} p + in + `$fHasFromOpaqueBuiltinListList_$cfromOpaque` + {data} + {data} + `$fHasFromOpaqueBuiltinDataBuiltinData_$cfromOpaque` + a) + !unsafeDataAsI : data -> integer = unIData + ~unsafeDataAsI : data -> integer + = \(d : data) -> let !d : data = d in unsafeDataAsI d + in + \(ds : data) -> + let + !ds : data = ds + in + `.` + {List data -> List integer} + {Tuple2 integer (List data) -> Tuple2 integer (List integer)} + {data -> integer} + (fmap + {Tuple2 integer} + (`$fFunctorTuple2` {integer}) + {List data} + {List integer}) + (fmap {List} `$fFunctorList` {data} {integer}) + unsafeDataAsI + (unsafeDataAsConstr ds)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteString.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteString.pir.golden index 6db4ca37033..93bd77be176 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteString.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteString.pir.golden @@ -1 +1 @@ -(program 1.1.0 (lam ds (con bytestring) ds)) \ No newline at end of file +program 1.1.0 (\(ds : bytestring) -> ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteStringApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteStringApply.eval.golden index 7b1b940e59b..4287ca86179 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteStringApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/emptyByteStringApply.eval.golden @@ -1 +1 @@ -(con bytestring #) \ No newline at end of file +# \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/encodeUtf8.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/encodeUtf8.pir.golden index f0dee62dd45..1baeeabe040 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/encodeUtf8.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/encodeUtf8.pir.golden @@ -1,17 +1,7 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl encodeUtf (fun (con string) (con bytestring))) - (builtin encodeUtf8) - ) - (termbind - (nonstrict) - (vardecl encodeUtf (fun (con string) (con bytestring))) - encodeUtf - ) - [ encodeUtf (con string "abc") ] - ) -) \ No newline at end of file + !encodeUtf : string -> bytestring = encodeUtf8 + ~encodeUtf : string -> bytestring = encodeUtf + in + encodeUtf "abc") \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsByteString.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsByteString.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsByteString.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsByteString.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsString.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsString.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsString.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/equalsString.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/error.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/error.pir.golden index 5b6f2bb1928..d46d4314de9 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/error.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/error.pir.golden @@ -1,19 +1,9 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl error (all a (type) (fun (con unit) a))) - (abs a (type) (lam thunk (con unit) (error a))) - ) - (termbind (strict) (vardecl unitval (con unit)) (con unit ())) - (typebind (tyvardecl Unit (type)) (all a (type) (fun a a))) - (termbind - (nonstrict) - (vardecl error (all a (type) (fun Unit a))) - (abs a (type) (lam x Unit [ { error a } unitval ])) - ) - { error (con integer) } - ) -) \ No newline at end of file + !error : all a. unit -> a = /\a -> \(thunk : unit) -> error {a} + !unitval : unit = () + Unit = all a. a -> a + ~error : all a. Unit -> a = /\a -> \(x : Unit) -> error {a} unitval + in + error {integer}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElse.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElse.pir.golden index 908f2d1125c..fd644ee88bd 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElse.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElse.pir.golden @@ -1,77 +1,34 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - { - [ - [ - { - [ Bool_match [ [ equalsInteger ds ] ds ] ] - (all dead (type) (con integer)) - } - (abs dead (type) ds) - ] - (abs dead (type) ds) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + in + Bool_match + (equalsInteger ds ds) + {all dead. integer} + (/\dead -> ds) + (/\dead -> ds) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElseApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElseApply.eval.golden index d135c1204f4..d8263ee9860 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElseApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/ifThenElseApply.eval.golden @@ -1 +1 @@ -(con integer 2) \ No newline at end of file +2 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/indexByteString.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/indexByteString.eval.golden index f427e8438c5..dec4c59e4a0 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/indexByteString.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/indexByteString.eval.golden @@ -1 +1 @@ -(con integer 104) \ No newline at end of file +104 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/int.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/int.pir.golden index c897a619d7e..0d9b8af24ca 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/int.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/int.pir.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 1)) \ No newline at end of file +program 1.1.0 1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/int2.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/int2.pir.golden index 2b513f80b57..71e8cc5eae5 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/int2.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/int2.pir.golden @@ -1 +1 @@ -(program 1.1.0 (con integer 2)) \ No newline at end of file +program 1.1.0 2 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intCompare.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intCompare.pir.golden index 55dd06e248e..0e6729c2c85 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intCompare.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intCompare.pir.golden @@ -1,67 +1,25 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (strict) - (vardecl - lessThanInteger (fun (con integer) (fun (con integer) (con bool))) - ) - (builtin lessThanInteger) - ) - (termbind - (nonstrict) - (vardecl lessThanInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ lessThanInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ lessThanInteger ds ] ds ] - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + !lessThanInteger : integer -> integer -> bool = lessThanInteger + ~lessThanInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanInteger x y + in + ifThenElse {Bool} b True False + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> let !ds : integer = ds in lessThanInteger ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intDiv.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intDiv.pir.golden index 98a7e3c4af7..fd061087ebf 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intDiv.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intDiv.pir.golden @@ -1,53 +1,16 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl - divideInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin divideInteger) - ) - (termbind - (nonstrict) - (vardecl - divideInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ divideInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ divideInteger ds ] ds ] - ) - ) - ) - ) - ) -) \ No newline at end of file + !divideInteger : integer -> integer -> integer = divideInteger + ~divideInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in divideInteger x y + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> let !ds : integer = ds in divideInteger ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEq.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEq.pir.golden index bc35ea6a6bd..210db8b4ce5 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEq.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEq.pir.golden @@ -1,65 +1,25 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ equalsInteger ds ] ds ] - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> let !ds : integer = ds in equalsInteger ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEqApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEqApply.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEqApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intEqApply.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlus.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlus.pir.golden index 9242b7bbe02..f07957a3925 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlus.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlus.pir.golden @@ -1,49 +1,16 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ addInteger ds ] ds ] - ) - ) - ) - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> let !ds : integer = ds in addInteger ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlusApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlusApply.eval.golden index 7ce41fb5eca..e440e5c8425 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlusApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/intPlusApply.eval.golden @@ -1 +1 @@ -(con integer 3) \ No newline at end of file +3 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/lengthOfByteString.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/lengthOfByteString.eval.golden index 4c1ba608f00..7813681f5b4 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/lengthOfByteString.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/lengthOfByteString.eval.golden @@ -1 +1 @@ -(con integer 5) \ No newline at end of file +5 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/ltByteString.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/ltByteString.eval.golden index 1dd2b8ed5d3..aac851c2ef6 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/ltByteString.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/ltByteString.eval.golden @@ -1 +1 @@ -(constr 0) \ No newline at end of file +constr 0 [] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/matchData1.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/matchData1.eval.golden index 005b0a452f3..fa9c0c5cdf4 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/matchData1.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/matchData1.eval.golden @@ -1 +1 @@ -(constr 0 (con integer 1)) \ No newline at end of file +constr 0 [1] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseData.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseData.pir.golden index d7c2e5e9f52..ec8dd895f3b 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseData.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseData.pir.golden @@ -1,17 +1,7 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl serialiseData (fun (con data) (con bytestring))) - (builtin serialiseData) - ) - (termbind - (nonstrict) - (vardecl serialiseData (fun (con data) (con bytestring))) - serialiseData - ) - serialiseData - ) -) \ No newline at end of file + !serialiseData : data -> bytestring = serialiseData + ~serialiseData : data -> bytestring = serialiseData + in + serialiseData) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseDataApply.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseDataApply.eval.golden index 9d0671c076f..99ea178bd48 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseDataApply.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/serialiseDataApply.eval.golden @@ -1 +1 @@ -(con bytestring #01) \ No newline at end of file +#01 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/sha2_256.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/sha2_256.eval.golden index da957a9a88d..c3b0e7455b9 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/sha2_256.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/sha2_256.eval.golden @@ -1,3 +1 @@ -(con - bytestring #2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 -) \ No newline at end of file +#2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/string.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/string.pir.golden index d5b9b57e7ce..eeb1da5e892 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/string.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/string.pir.golden @@ -1 +1 @@ -(program 1.1.0 (con string "text")) \ No newline at end of file +program 1.1.0 "text" \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/stringLiteral.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/stringLiteral.pir.golden index 43f834bd3ec..bf29f9f2f71 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/stringLiteral.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/stringLiteral.pir.golden @@ -1 +1 @@ -(program 1.1.0 (con string "abc")) \ No newline at end of file +program 1.1.0 "abc" \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/trace.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/trace.pir.golden index 362c2266480..fc3a8aed30f 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/trace.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/trace.pir.golden @@ -1,28 +1,9 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) - ) - (termbind - (strict) - (vardecl trace (all a (type) (fun (con string) (fun a a)))) - (builtin trace) - ) - (termbind - (nonstrict) - (vardecl trace (all a (type) (fun (con string) (fun a a)))) - trace - ) - (lam - ds - (con string) - (let - (nonrec) - (termbind (strict) (vardecl ds (con string)) ds) - [ [ { trace Unit } ds ] Unit ] - ) - ) - ) -) \ No newline at end of file + data Unit | Unit_match where + Unit : Unit + !trace : all a. string -> a -> a = trace + ~trace : all a. string -> a -> a = trace + in + \(ds : string) -> let !ds : string = ds in trace {Unit} ds Unit) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/traceComplex.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/traceComplex.pir.golden index e3b395a9920..b8a086b0efb 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/traceComplex.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/traceComplex.pir.golden @@ -1,69 +1,31 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl trace (all a (type) (fun (con string) (fun a a)))) - (builtin trace) - ) - (termbind - (nonstrict) - (vardecl trace (all a (type) (fun (con string) (fun a a)))) - trace - ) - (datatypebind - (datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) - ) - (termbind - (strict) - (vardecl error (all a (type) (fun (con unit) a))) - (abs a (type) (lam thunk (con unit) (error a))) - ) - (termbind (strict) (vardecl unitval (con unit)) (con unit ())) - (termbind - (nonstrict) - (vardecl traceError (all a (type) (fun (con string) a))) - (abs - a - (type) - (lam - str - (con string) - (let - (nonrec) - (termbind (strict) (vardecl str (con string)) str) - (termbind (strict) (vardecl x Unit) [ [ { trace Unit } str ] Unit ]) - [ { error a } unitval ] - ) - ) - ) - ) - (lam + data Bool | Bool_match where + True : Bool + False : Bool + !trace : all a. string -> a -> a = trace + ~trace : all a. string -> a -> a = trace + data Unit | Unit_match where + Unit : Unit + !error : all a. unit -> a = /\a -> \(thunk : unit) -> error {a} + !unitval : unit = () + ~traceError : all a. string -> a + = /\a -> + \(str : string) -> + let + !str : string = str + !x : Unit = trace {Unit} str Unit + in + error {a} unitval + in + \(ds : Bool) -> + let + !ds : Bool = ds + in + Bool_match ds - Bool - (let - (nonrec) - (termbind (strict) (vardecl ds Bool) ds) - { - [ - [ - { [ Bool_match ds ] (all dead (type) Unit) } - (abs dead (type) [ [ { trace Unit } (con string "yes") ] Unit ]) - ] - (abs dead (type) [ { traceError Unit } (con string "no") ]) - ] - (all dead (type) dead) - } - ) - ) - ) -) \ No newline at end of file + {all dead. Unit} + (/\dead -> trace {Unit} "yes" Unit) + (/\dead -> traceError {Unit} "no") + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/tuple.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/tuple.pir.golden index de2352d47eb..5ef927c3dfd 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/tuple.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/tuple.pir.golden @@ -1,18 +1,7 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - [ - [ { { Tuple2 (con integer) } (con integer) } (con integer 1) ] - (con integer 2) - ] - ) -) \ No newline at end of file + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + Tuple2 {integer} {integer} 1 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleConstDest.eval.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleConstDest.eval.golden index 132831f390c..56a6051ca2b 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleConstDest.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleConstDest.eval.golden @@ -1 +1 @@ -(con integer 1) \ No newline at end of file +1 \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleMatch.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleMatch.pir.golden index 71e89808b6b..56298407fe9 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleMatch.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/tupleMatch.pir.golden @@ -1,24 +1,13 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (lam + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + \(ds : Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} ds - [ [ Tuple2 (con integer) ] (con integer) ] - [ - { - [ { { Tuple2_match (con integer) } (con integer) } ds ] (con integer) - } - (lam ipv (con integer) (lam ipv (con integer) ipv)) - ] - ) - ) -) \ No newline at end of file + {integer} + (\(ipv : integer) (ipv : integer) -> ipv)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/verify.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/verify.pir.golden index 5f8be59e296..9c78f87257a 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/verify.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/verify.pir.golden @@ -1,96 +1,38 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (strict) - (vardecl - verifyEd25519Signature - (fun - (con bytestring) - (fun (con bytestring) (fun (con bytestring) (con bool))) - ) - ) - (builtin verifyEd25519Signature) - ) - (termbind - (nonstrict) - (vardecl - verifyEd25519Signature - (fun - (con bytestring) (fun (con bytestring) (fun (con bytestring) Bool)) - ) - ) - (lam - pubKey - (con bytestring) - (let - (nonrec) - (termbind (strict) (vardecl pubKey (con bytestring)) pubKey) - (lam - message - (con bytestring) - (let - (nonrec) - (termbind (strict) (vardecl message (con bytestring)) message) - (lam - signature - (con bytestring) - (let - (nonrec) - (termbind - (strict) (vardecl signature (con bytestring)) signature - ) - (termbind - (strict) - (vardecl b (con bool)) - [ [ [ verifyEd25519Signature pubKey ] message ] signature ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - ) - ) - (lam - ds - (con bytestring) - (let - (nonrec) - (termbind (strict) (vardecl ds (con bytestring)) ds) - (lam - ds - (con bytestring) - (let - (nonrec) - (termbind (strict) (vardecl ds (con bytestring)) ds) - (lam - ds - (con bytestring) - (let - (nonrec) - (termbind (strict) (vardecl ds (con bytestring)) ds) - [ [ [ verifyEd25519Signature ds ] ds ] ds ] - ) - ) - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + !verifyEd25519Signature : bytestring -> bytestring -> bytestring -> bool + = verifyEd25519Signature + ~verifyEd25519Signature : bytestring -> bytestring -> bytestring -> Bool + = \(pubKey : bytestring) -> + let + !pubKey : bytestring = pubKey + in + \(message : bytestring) -> + let + !message : bytestring = message + in + \(signature : bytestring) -> + let + !signature : bytestring = signature + !b : bool = verifyEd25519Signature pubKey message signature + in + ifThenElse {Bool} b True False + in + \(ds : bytestring) -> + let + !ds : bytestring = ds + in + \(ds : bytestring) -> + let + !ds : bytestring = ds + in + \(ds : bytestring) -> + let + !ds : bytestring = ds + in + verifyEd25519Signature ds ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Primitives/9.6/void.pir.golden b/plutus-tx-plugin/test/Plugin/Primitives/9.6/void.pir.golden index 5ab46d5c199..ff9202015b3 100644 --- a/plutus-tx-plugin/test/Plugin/Primitives/9.6/void.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Primitives/9.6/void.pir.golden @@ -1,92 +1,43 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (nonstrict) (vardecl fail (fun (con unit) Bool)) (lam ds (con unit) False) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (termbind (strict) (vardecl x' Bool) [ [ equalsInteger ds ] ds ]) - (termbind (strict) (vardecl y' Bool) [ [ equalsInteger ds ] ds ]) - { - [ - [ - { [ Bool_match x' ] (all dead (type) Bool) } - (abs - dead - (type) - { - [ - [ - { [ Bool_match y' ] (all dead (type) Bool) } - (abs dead (type) True) - ] - (abs dead (type) [ fail (con unit ()) ]) - ] - (all dead (type) dead) - } - ) - ] - (abs dead (type) [ fail (con unit ()) ]) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + ~fail : unit -> Bool = \(ds : unit) -> False + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + !x' : Bool = equalsInteger ds ds + !y' : Bool = equalsInteger ds ds + in + Bool_match + x' + {all dead. Bool} + (/\dead -> + Bool_match + y' + {all dead. Bool} + (/\dead -> True) + (/\dead -> fail ()) + {all dead. dead}) + (/\dead -> fail ()) + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt.pir.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt.pir.golden index 1add0957b66..646ef1a5ec8 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt.pir.golden @@ -1,87 +1,32 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ - [ - [ - { (builtin trace) (fun (con unit) (con integer)) } - (con string "entering addInteger") - ] - (lam - thunk - (con unit) - [ - [ - { (builtin trace) (con integer) } - (con string "exiting addInteger") - ] - [ [ addInteger x ] y ] - ] - ) - ] - (con unit ()) - ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl addInt (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - [ - [ - [ - { - (builtin trace) - (fun (con unit) (fun (con integer) (con integer))) - } - (con string "entering addInt") - ] - (lam - thunk - (con unit) - [ - [ - { (builtin trace) (fun (con integer) (con integer)) } - (con string "exiting addInt") - ] - [ addInteger x ] - ] - ) - ] - (con unit ()) - ] - ) - ) - ) - addInt - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + in + trace + {unit -> integer} + "entering addInteger-118" + (\(thunk : unit) -> + trace {integer} "exiting addInteger-118" (addInteger x y)) + () + ~addInt : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + trace + {unit -> integer -> integer} + "entering addInt-115" + (\(thunk : unit) -> + trace {integer -> integer} "exiting addInt-115" (addInteger x)) + () + in + addInt) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt3.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt3.eval.golden index 68eeb5e4784..71b3e0886e9 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt3.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/addInt3.eval.golden @@ -1 +1 @@ -[entering addInt, exiting addInt] \ No newline at end of file +[entering addInt-115, exiting addInt-115] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch1.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch1.eval.golden index a316f49d6bc..3bd5ac5be96 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch1.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch1.eval.golden @@ -1,6 +1,6 @@ -[ entering runIdentity -, exiting runIdentity -, entering newtypeFunction -, exiting newtypeFunction -, entering `$fFoldableIdentity` -, exiting `$fFoldableIdentity` ] \ No newline at end of file +[ entering runIdentity-118 +, exiting runIdentity-118 +, entering newtypeFunction-126 +, exiting newtypeFunction-126 +, entering `$fFoldableIdentity`-120 +, exiting `$fFoldableIdentity`-120 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch2.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch2.eval.golden index 38bf38703e4..fe6963b458a 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch2.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/argMismatch2.eval.golden @@ -1 +1 @@ -[entering obscuredFunction, exiting obscuredFunction] \ No newline at end of file +[entering obscuredFunction-116, exiting obscuredFunction-116] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/fact4.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/fact4.eval.golden index 4752d376629..e6106d1758e 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/fact4.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/fact4.eval.golden @@ -1,36 +1,36 @@ -[ entering fact -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fact -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fact -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fact -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fact -, entering equalsInteger -, exiting equalsInteger -, exiting fact -, entering multiplyInteger -, exiting multiplyInteger -, exiting fact -, entering multiplyInteger -, exiting multiplyInteger -, exiting fact -, entering multiplyInteger -, exiting multiplyInteger -, exiting fact -, entering multiplyInteger -, exiting multiplyInteger -, exiting fact ] \ No newline at end of file +[ entering fact-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-139 +, exiting subtractInteger-139 +, entering fact-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-139 +, exiting subtractInteger-139 +, entering fact-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-139 +, exiting subtractInteger-139 +, entering fact-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-139 +, exiting subtractInteger-139 +, entering fact-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, exiting fact-115 +, entering multiplyInteger-133 +, exiting multiplyInteger-133 +, exiting fact-115 +, entering multiplyInteger-133 +, exiting multiplyInteger-133 +, exiting fact-115 +, entering multiplyInteger-133 +, exiting multiplyInteger-133 +, exiting fact-115 +, entering multiplyInteger-133 +, exiting multiplyInteger-133 +, exiting fact-115 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib.pir.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib.pir.golden index 739a651ce85..6d423d51093 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib.pir.golden @@ -1,251 +1,96 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ - [ - [ - { (builtin trace) (fun (con unit) (con integer)) } - (con string "entering addInteger") - ] - (lam - thunk - (con unit) - [ - [ - { (builtin trace) (con integer) } - (con string "exiting addInteger") - ] - [ [ addInteger x ] y ] - ] - ) - ] - (con unit ()) - ] - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ - [ - [ - { (builtin trace) (fun (con unit) Bool) } - (con string "entering equalsInteger") - ] - (lam - thunk - (con unit) - [ - [ - { (builtin trace) Bool } - (con string "exiting equalsInteger") - ] - (let - (nonrec) - (termbind - (strict) - (vardecl b (con bool)) - [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ] - ) - ] - (con unit ()) - ] - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (builtin subtractInteger) - ) - (termbind - (nonstrict) - (vardecl - subtractInteger (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ - [ - [ - { (builtin trace) (fun (con unit) (con integer)) } - (con string "entering subtractInteger") - ] - (lam - thunk - (con unit) - [ - [ - { (builtin trace) (con integer) } - (con string "exiting subtractInteger") - ] - [ [ subtractInteger x ] y ] - ] - ) - ] - (con unit ()) - ] - ) - ) - ) - ) - ) - (let - (rec) - (termbind - (nonstrict) - (vardecl fib (fun (con integer) (con integer))) - (lam - n - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl n (con integer)) n) - [ - [ - [ - { (builtin trace) (fun (con unit) (con integer)) } - (con string "entering fib") - ] - (lam - thunk - (con unit) - [ - [ - { (builtin trace) (con integer) } - (con string "exiting fib") - ] - { - [ - [ - { - [ - Bool_match [ [ equalsInteger n ] (con integer 0) ] - ] - (all dead (type) (con integer)) - } - (abs dead (type) (con integer 0)) - ] - (abs - dead - (type) - { - [ - [ - { - [ - Bool_match - [ [ equalsInteger n ] (con integer 1) ] - ] - (all dead (type) (con integer)) - } - (abs dead (type) (con integer 1)) - ] - (abs - dead - (type) - [ - [ - addInteger - [ - fib - [ [ subtractInteger n ] (con integer 1) ] - ] - ] - [ - fib - [ [ subtractInteger n ] (con integer 2) ] - ] - ] - ) - ] - (all dead (type) dead) - } - ) - ] - (all dead (type) dead) - } - ] - ) - ] - (con unit ()) - ] - ) - ) - ) - fib - ) - ) -) \ No newline at end of file + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + in + trace + {unit -> integer} + "entering addInteger-137" + (\(thunk : unit) -> + trace {integer} "exiting addInteger-137" (addInteger x y)) + () + data Bool | Bool_match where + True : Bool + False : Bool + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + in + trace + {unit -> Bool} + "entering equalsInteger-122" + (\(thunk : unit) -> + trace + {Bool} + "exiting equalsInteger-122" + (let + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False)) + () + !subtractInteger : integer -> integer -> integer = subtractInteger + ~subtractInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + in + trace + {unit -> integer} + "entering subtractInteger-143" + (\(thunk : unit) -> + trace + {integer} + "exiting subtractInteger-143" + (subtractInteger x y)) + () + in + letrec + ~fib : integer -> integer + = \(n : integer) -> + let + !n : integer = n + in + trace + {unit -> integer} + "entering fib-115" + (\(thunk : unit) -> + trace + {integer} + "exiting fib-115" + (Bool_match + (equalsInteger n 0) + {all dead. integer} + (/\dead -> 0) + (/\dead -> + Bool_match + (equalsInteger n 1) + {all dead. integer} + (/\dead -> 1) + (/\dead -> + addInteger + (fib (subtractInteger n 1)) + (fib (subtractInteger n 2))) + {all dead. dead}) + {all dead. dead})) + () + in + fib) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib4.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib4.eval.golden index 9ba81e62d9d..0b15c6b6301 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib4.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/fib4.eval.golden @@ -1,74 +1,74 @@ -[ entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, exiting fib -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, exiting fib -, entering addInteger -, exiting addInteger -, exiting fib -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, exiting fib -, entering addInteger -, exiting addInteger -, exiting fib -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, entering equalsInteger -, exiting equalsInteger -, exiting fib -, entering subtractInteger -, exiting subtractInteger -, entering fib -, entering equalsInteger -, exiting equalsInteger -, exiting fib -, entering addInteger -, exiting addInteger -, exiting fib -, entering addInteger -, exiting addInteger -, exiting fib ] \ No newline at end of file +[ entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, exiting fib-115 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, exiting fib-115 +, entering addInteger-137 +, exiting addInteger-137 +, exiting fib-115 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, exiting fib-115 +, entering addInteger-137 +, exiting addInteger-137 +, exiting fib-115 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, exiting fib-115 +, entering subtractInteger-143 +, exiting subtractInteger-143 +, entering fib-115 +, entering equalsInteger-122 +, exiting equalsInteger-122 +, exiting fib-115 +, entering addInteger-137 +, exiting addInteger-137 +, exiting fib-115 +, entering addInteger-137 +, exiting addInteger-137 +, exiting fib-115 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/id.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/id.eval.golden index ca3df46b62a..17294a64c91 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/id.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/id.eval.golden @@ -1 +1 @@ -[entering id, exiting id, entering id, exiting id] \ No newline at end of file +[entering id-116, exiting id-116, entering id-116, exiting id-116] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/idCode.pir.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/idCode.pir.golden index 50417060cea..44e1401b0b6 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/idCode.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/idCode.pir.golden @@ -1,33 +1,13 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (nonstrict) - (vardecl id (all a (type) (fun a a))) - (abs - a - (type) - (lam - x - a - [ - [ - [ - { (builtin trace) (fun (con unit) a) } - (con string "entering id") - ] - (lam - thunk - (con unit) - [ [ { (builtin trace) a } (con string "exiting id") ] x ] - ) - ] - (con unit ()) - ] - ) - ) - ) - [ { id (con integer) } [ { id (con integer) } (con integer 1) ] ] - ) -) \ No newline at end of file + ~id : all a. a -> a + = /\a -> + \(x : a) -> + trace + {unit -> a} + "entering id-116" + (\(thunk : unit) -> trace {a} "exiting id-116" x) + () + in + id {integer} (id {integer} 1)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFun.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFun.eval.golden index 7da8f83021d..b74c6337f6c 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFun.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFun.eval.golden @@ -1,10 +1,10 @@ -[ entering f -, entering addInteger -, exiting addInteger -, exiting f -, entering f -, entering addInteger -, exiting addInteger -, exiting f -, entering addInteger -, exiting addInteger ] \ No newline at end of file +[ entering f-127 +, entering addInteger-121 +, exiting addInteger-121 +, exiting f-127 +, entering f-127 +, entering addInteger-121 +, exiting addInteger-121 +, exiting f-127 +, entering addInteger-121 +, exiting addInteger-121 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFunMoreArg.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFunMoreArg.eval.golden index dc9cc516585..0b7794cad86 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFunMoreArg.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/letInFunMoreArg.eval.golden @@ -1,12 +1,12 @@ -[ entering f -, entering addInteger -, exiting addInteger -, exiting f -, entering f -, entering addInteger -, exiting addInteger -, exiting f -, entering addInteger -, exiting addInteger -, entering multiplyInteger -, exiting multiplyInteger ] \ No newline at end of file +[ entering f-129 +, entering addInteger-123 +, exiting addInteger-123 +, exiting f-129 +, entering f-129 +, entering addInteger-123 +, exiting addInteger-123 +, exiting f-129 +, entering addInteger-123 +, exiting addInteger-123 +, entering multiplyInteger-131 +, exiting multiplyInteger-131 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/letRecInFun.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/letRecInFun.eval.golden index 6ffdaa268eb..9f4880b9ca6 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/letRecInFun.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/letRecInFun.eval.golden @@ -1,28 +1,28 @@ -[ entering f -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering f -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering f -, entering equalsInteger -, exiting equalsInteger -, entering subtractInteger -, exiting subtractInteger -, entering f -, entering equalsInteger -, exiting equalsInteger -, exiting f -, entering addInteger -, exiting addInteger -, exiting f -, entering addInteger -, exiting addInteger -, exiting f -, entering addInteger -, exiting addInteger -, exiting f ] \ No newline at end of file +[ entering f-117 +, entering equalsInteger-124 +, exiting equalsInteger-124 +, entering subtractInteger-141 +, exiting subtractInteger-141 +, entering f-117 +, entering equalsInteger-124 +, exiting equalsInteger-124 +, entering subtractInteger-141 +, exiting subtractInteger-141 +, entering f-117 +, entering equalsInteger-124 +, exiting equalsInteger-124 +, entering subtractInteger-141 +, exiting subtractInteger-141 +, entering f-117 +, entering equalsInteger-124 +, exiting equalsInteger-124 +, exiting f-117 +, entering addInteger-135 +, exiting addInteger-135 +, exiting f-117 +, entering addInteger-135 +, exiting addInteger-135 +, exiting f-117 +, entering addInteger-135 +, exiting addInteger-135 +, exiting f-117 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/swap.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/swap.eval.golden index 238bb53a13e..0d3823ca411 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/swap.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/swap.eval.golden @@ -1 +1 @@ -[entering swap, exiting swap] \ No newline at end of file +[entering swap-122, exiting swap-122] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Profiling/9.6/typeclass.eval.golden b/plutus-tx-plugin/test/Plugin/Profiling/9.6/typeclass.eval.golden index 1d9414013aa..10497b000a9 100644 --- a/plutus-tx-plugin/test/Plugin/Profiling/9.6/typeclass.eval.golden +++ b/plutus-tx-plugin/test/Plugin/Profiling/9.6/typeclass.eval.golden @@ -1,12 +1,12 @@ -[ entering useTypeclass -, entering methodA -, exiting methodA -, entering addInteger -, exiting addInteger -, entering methodB -, exiting methodB -, entering subtractInteger -, exiting subtractInteger -, entering addInteger -, exiting addInteger -, exiting useTypeclass ] \ No newline at end of file +[ entering useTypeclass-124 +, entering methodA-138 +, exiting methodA-138 +, entering addInteger-131 +, exiting addInteger-131 +, entering methodB-149 +, exiting methodB-149 +, entering subtractInteger-161 +, exiting subtractInteger-161 +, entering addInteger-131 +, exiting addInteger-131 +, exiting useTypeclass-124 ] \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/compareTest.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/compareTest.pir.golden index 54360ee1160..7644ed22f9f 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/compareTest.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/compareTest.pir.golden @@ -1,477 +1,181 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl - lessThanEqualsInteger (fun (con integer) (fun (con integer) (con bool))) - ) - (builtin lessThanEqualsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl Ordering (type)) - - Ordering_match - (vardecl EQ Ordering) (vardecl GT Ordering) (vardecl LT Ordering) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fOrdInteger_$ccompare` - (fun (con integer) (fun (con integer) Ordering)) - ) - (lam - eta - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) eta) - (lam - eta - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) eta) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - { - [ - [ - { - [ - Bool_match [ [ [ { ifThenElse Bool } b ] True ] False ] - ] - (all dead (type) Ordering) - } - (abs dead (type) EQ) - ] - (abs - dead - (type) - (let - (nonrec) - (termbind - (strict) - (vardecl b (con bool)) - [ [ lessThanEqualsInteger x ] y ] - ) - { - [ - [ - { - [ - Bool_match - [ [ [ { ifThenElse Bool } b ] True ] False ] - ] - (all dead (type) Ordering) - } - (abs dead (type) LT) - ] - (abs dead (type) GT) - ] - (all dead (type) dead) - } - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fOrdInteger_$cmax` - (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) - (vardecl b (con bool)) - [ [ lessThanEqualsInteger x ] y ] - ) - { - [ - [ - { - [ - Bool_match [ [ [ { ifThenElse Bool } b ] True ] False ] - ] - (all dead (type) (con integer)) - } - (abs dead (type) y) - ] - (abs dead (type) x) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fOrdInteger_$cmin` - (fun (con integer) (fun (con integer) (con integer))) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) - (vardecl b (con bool)) - [ [ lessThanEqualsInteger x ] y ] - ) - { - [ - [ - { - [ - Bool_match [ [ [ { ifThenElse Bool } b ] True ] False ] - ] - (all dead (type) (con integer)) - } - (abs dead (type) x) - ] - (abs dead (type) y) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (strict) - (vardecl - lessThanInteger (fun (con integer) (fun (con integer) (con bool))) - ) - (builtin lessThanInteger) - ) - (termbind - (nonstrict) - (vardecl - greaterThanEqualsInteger (fun (con integer) (fun (con integer) Bool)) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ - [ [ { ifThenElse Bool } [ [ lessThanInteger x ] y ] ] False ] - True - ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl greaterThanInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ - [ - [ { ifThenElse Bool } [ [ lessThanEqualsInteger x ] y ] ] - False - ] - True - ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - lessThanEqualsInteger (fun (con integer) (fun (con integer) Bool)) - ) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) - (vardecl b (con bool)) - [ [ lessThanEqualsInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl lessThanInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ lessThanInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Ord (fun (type) (type))) - (tyvardecl a (type)) - Ord_match - (vardecl - CConsOrd - (fun - [ (lam a (type) (fun a (fun a Bool))) a ] - (fun - (fun a (fun a Ordering)) - (fun - (fun a (fun a Bool)) - (fun - (fun a (fun a Bool)) - (fun - (fun a (fun a Bool)) - (fun - (fun a (fun a Bool)) - (fun (fun a (fun a a)) (fun (fun a (fun a a)) [ Ord a ])) - ) - ) - ) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fOrdInteger` [ Ord (con integer) ]) - [ - [ - [ - [ - [ - [ - [ - [ { CConsOrd (con integer) } equalsInteger ] - `$fOrdInteger_$ccompare` - ] - lessThanInteger - ] - lessThanEqualsInteger - ] - greaterThanInteger - ] - greaterThanEqualsInteger - ] + !equalsInteger : integer -> integer -> bool = equalsInteger + !lessThanEqualsInteger : integer -> integer -> bool = lessThanEqualsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + data Bool | Bool_match where + True : Bool + False : Bool + data Ordering | Ordering_match where + EQ : Ordering + GT : Ordering + LT : Ordering + ~`$fOrdInteger_$ccompare` : integer -> integer -> Ordering + = \(eta : integer) -> + let + !x : integer = eta + in + \(eta : integer) -> + let + !y : integer = eta + !b : bool = equalsInteger x y + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. Ordering} + (/\dead -> EQ) + (/\dead -> + let + !b : bool = lessThanEqualsInteger x y + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. Ordering} + (/\dead -> LT) + (/\dead -> GT) + {all dead. dead}) + {all dead. dead} + ~`$fOrdInteger_$cmax` : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanEqualsInteger x y + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. integer} + (/\dead -> y) + (/\dead -> x) + {all dead. dead} + ~`$fOrdInteger_$cmin` : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanEqualsInteger x y + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. integer} + (/\dead -> x) + (/\dead -> y) + {all dead. dead} + ~equalsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = equalsInteger x y + in + ifThenElse {Bool} b True False + !lessThanInteger : integer -> integer -> bool = lessThanInteger + ~greaterThanEqualsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + in + ifThenElse {Bool} (lessThanInteger x y) False True + ~greaterThanInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + in + ifThenElse {Bool} (lessThanEqualsInteger x y) False True + ~lessThanEqualsInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanEqualsInteger x y + in + ifThenElse {Bool} b True False + ~lessThanInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanInteger x y + in + ifThenElse {Bool} b True False + data (Ord :: * -> *) a | Ord_match where + CConsOrd : + (\a -> a -> a -> Bool) a -> + (a -> a -> Ordering) -> + (a -> a -> Bool) -> + (a -> a -> Bool) -> + (a -> a -> Bool) -> + (a -> a -> Bool) -> + (a -> a -> a) -> + (a -> a -> a) -> + Ord a + ~`$fOrdInteger` : Ord integer + = CConsOrd + {integer} + equalsInteger + `$fOrdInteger_$ccompare` + lessThanInteger + lessThanEqualsInteger + greaterThanInteger + greaterThanEqualsInteger `$fOrdInteger_$cmax` - ] - `$fOrdInteger_$cmin` - ] - ) - (termbind - (nonstrict) - (vardecl compare (all a (type) (fun [ Ord a ] (fun a (fun a Ordering))))) - (abs - a - (type) - (lam - v - [ Ord a ] - [ - { [ { Ord_match a } v ] (fun a (fun a Ordering)) } - (lam + `$fOrdInteger_$cmin` + ~compare : all a. Ord a -> a -> a -> Ordering + = /\a -> + \(v : Ord a) -> + Ord_match + {a} v - [ (lam a (type) (fun a (fun a Bool))) a ] - (lam - v - (fun a (fun a Ordering)) - (lam - v - (fun a (fun a Bool)) - (lam - v - (fun a (fun a Bool)) - (lam - v - (fun a (fun a Bool)) - (lam - v - (fun a (fun a Bool)) - (lam v (fun a (fun a a)) (lam v (fun a (fun a a)) v)) - ) - ) - ) - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - opCompare (all a (type) (fun [ Ord a ] (fun a (fun a Ordering)))) - ) - (abs - a - (type) - (lam - `$dOrd` - [ Ord a ] - (lam - a - a - (let - (nonrec) - (termbind (strict) (vardecl a a) a) - (lam - b - a - (let - (nonrec) - (termbind (strict) (vardecl b a) b) - { - [ - [ - [ - { - [ - Ordering_match - [ [ [ { compare a } `$dOrd` ] a ] b ] - ] - (all dead (type) Ordering) - } - (abs dead (type) EQ) - ] - (abs dead (type) LT) - ] - (abs dead (type) GT) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - ) - ) - [ - [ [ { opCompare (con integer) } `$fOrdInteger` ] (con integer 1) ] - (con integer 2) - ] - ) -) \ No newline at end of file + {a -> a -> Ordering} + (\(v : (\a -> a -> a -> Bool) a) + (v : a -> a -> Ordering) + (v : a -> a -> Bool) + (v : a -> a -> Bool) + (v : a -> a -> Bool) + (v : a -> a -> Bool) + (v : a -> a -> a) + (v : a -> a -> a) -> + v) + ~opCompare : all a. Ord a -> a -> a -> Ordering + = /\a -> + \(`$dOrd` : Ord a) (a : a) -> + let + !a : a = a + in + \(b : a) -> + let + !b : a = b + in + Ordering_match + (compare {a} `$dOrd` a b) + {all dead. Ordering} + (/\dead -> EQ) + (/\dead -> LT) + (/\dead -> GT) + {all dead. dead} + in + opCompare {integer} `$fOrdInteger` 1 2) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/concatTest.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/concatTest.pir.golden index 3e53744bb45..e607ce51f5b 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/concatTest.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/concatTest.pir.golden @@ -1,349 +1,104 @@ -(program +program 1.1.0 - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - `$fFoldableList_$cfoldr` - (all - a - (type) - (all b (type) (fun (fun a (fun b b)) (fun b (fun [ List a ] b)))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a (fun b b)) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a (fun b b))) f) - (lam - z - b - (let - (nonrec) - (termbind (strict) (vardecl z b) z) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] b)) - (lam - ds - [ List a ] - { - [ - [ - { [ { List_match a } ds ] (all dead (type) b) } - (abs dead (type) z) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs dead (type) [ [ f x ] [ go xs ] ]) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFoldableList` - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a (fun b b)) (fun b (fun [ t a ] b)))) - ) - ) - List - ] - ) - `$fFoldableList_$cfoldr` - ) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ]) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - concat - (all - t - (fun (type) (type)) - (all - a - (type) - (fun - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b (type) (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (fun [ t [ List a ] ] [ List a ]) - ) - ) - ) - ) - (abs - t - (fun (type) (type)) - (abs - a - (type) - (lam - `$dFoldable` - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b (type) (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (lam - xs - [ t [ List a ] ] - (let - (nonrec) - (termbind (strict) (vardecl xs [ t [ List a ] ]) xs) - [ - { build a } - (abs - b - (type) - (lam - c - (fun a (fun b b)) - (let - (nonrec) - (termbind (strict) (vardecl c (fun a (fun b b))) c) - (lam - n - b - (let - (nonrec) - (termbind (strict) (vardecl n b) n) - [ - [ - [ - { { `$dFoldable` [ List a ] } b } - (lam - x - [ List a ] - (let - (nonrec) - (termbind - (strict) (vardecl x [ List a ]) x - ) - (lam - y - b - (let - (nonrec) - (termbind (strict) (vardecl y b) y) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] b)) - (lam - ds - [ List a ] - { - [ - [ - { - [ - { List_match a } ds - ] - (all dead (type) b) - } - (abs dead (type) y) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - [ - [ c x ] [ go xs ] - ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - [ go x ] - ) - ) - ) - ) - ) - ] - n - ] - xs - ] - ) - ) - ) - ) - ) - ] - ) - ) - ) - ) - ) - ) - [ - [ { { concat List } (con integer) } `$fFoldableList` ] - [ - { build [ List (con integer) ] } - (abs - a - (type) - (lam - c - (fun [ List (con integer) ] (fun a a)) - (lam - n - a - [ - [ - c - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam - n - a - [ - [ c (con integer 1) ] [ [ c (con integer 2) ] n ] - ] - ) - ) - ) - ] - ] - [ - [ - c - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam - n - a - [ - [ c (con integer 3) ] - [ [ c (con integer 4) ] n ] - ] - ) - ) - ) - ] - ] - n - ] - ] - ) - ) - ) - ] - ] - ) - ) -) \ No newline at end of file + (letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~`$fFoldableList_$cfoldr` : all a b. (a -> b -> b) -> b -> List a -> b + = /\a b -> + \(f : a -> b -> b) -> + let + !f : a -> b -> b = f + in + \(z : b) -> + let + !z : b = z + in + letrec + ~go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> z) + (\(x : a) (xs : List a) -> /\dead -> f x (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + ~`$fFoldableList` : + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) List + = `$fFoldableList_$cfoldr` + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + ~concat : + all (t :: * -> *) a. + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) t -> + t (List a) -> + List a + = /\(t :: * -> *) a -> + \(`$dFoldable` : + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) t) + (xs : t (List a)) -> + let + !xs : t (List a) = xs + in + build + {a} + (/\b -> + \(c : a -> b -> b) -> + let + !c : a -> b -> b = c + in + \(n : b) -> + let + !n : b = n + in + `$dFoldable` + {List a} + {b} + (\(x : List a) -> + let + !x : List a = x + in + \(y : b) -> + let + !y : b = y + in + letrec + ~go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> y) + (\(x : a) (xs : List a) -> + /\dead -> c x (go xs)) + {all dead. dead} + in + go x) + n + xs) + in + concat + {List} + {integer} + `$fFoldableList` + (build + {List integer} + (/\a -> + \(c : List integer -> a -> a) (n : a) -> + c + (build + {integer} + (/\a -> \(c : integer -> a -> a) (n : a) -> c 1 (c 2 n))) + (c + (build + {integer} + (/\a -> \(c : integer -> a -> a) (n : a) -> c 3 (c 4 n))) + n)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/defaultMethods.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/defaultMethods.pir.golden index 1b821ef142f..217841ad939 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/defaultMethods.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/defaultMethods.pir.golden @@ -1,108 +1,36 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl DefaultMethods (fun (type) (type))) - (tyvardecl a (type)) - DefaultMethods_match - (vardecl - CConsDefaultMethods - (fun - (fun a (con integer)) - (fun (fun a (con integer)) [ DefaultMethods a ]) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - method (all a (type) (fun [ DefaultMethods a ] (fun a (con integer)))) - ) - (abs - a - (type) - (lam - v - [ DefaultMethods a ] - [ - { [ { DefaultMethods_match a } v ] (fun a (con integer)) } - (lam v (fun a (con integer)) (lam v (fun a (con integer)) v)) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - f (all a (type) (fun [ DefaultMethods a ] (fun a (con integer)))) - ) - (abs - a - (type) - (lam - `$dDefaultMethods` - [ DefaultMethods a ] - (lam - a - a - (let - (nonrec) - (termbind (strict) (vardecl a a) a) - [ [ { method a } `$dDefaultMethods` ] a ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fDefaultMethodsInteger_$cmethod` (fun (con integer) (con integer)) - ) - (lam a (con integer) a) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl - `$fDefaultMethodsInteger_$cmethod` (fun (con integer) (con integer)) - ) - (lam - a - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl a (con integer)) a) - [ [ addInteger a ] (con integer 1) ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fDefaultMethodsInteger` [ DefaultMethods (con integer) ]) - [ - [ - { CConsDefaultMethods (con integer) } + data (DefaultMethods :: * -> *) a | DefaultMethods_match where + CConsDefaultMethods : (a -> integer) -> (a -> integer) -> DefaultMethods a + ~method : all a. DefaultMethods a -> a -> integer + = /\a -> + \(v : DefaultMethods a) -> + DefaultMethods_match + {a} + v + {a -> integer} + (\(v : a -> integer) (v : a -> integer) -> v) + ~f : all a. DefaultMethods a -> a -> integer + = /\a -> + \(`$dDefaultMethods` : DefaultMethods a) (a : a) -> + let + !a : a = a + in + method {a} `$dDefaultMethods` a + ~`$fDefaultMethodsInteger_$cmethod` : integer -> integer + = \(a : integer) -> a + !addInteger : integer -> integer -> integer = addInteger + ~`$fDefaultMethodsInteger_$cmethod` : integer -> integer + = \(a : integer) -> let !a : integer = a in addInteger a 1 + ~`$fDefaultMethodsInteger` : DefaultMethods integer + = CConsDefaultMethods + {integer} `$fDefaultMethodsInteger_$cmethod` - ] - `$fDefaultMethodsInteger_$cmethod` - ] - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ { f (con integer) } `$fDefaultMethodsInteger` ] ds ] - ) - ) - ) -) \ No newline at end of file + `$fDefaultMethodsInteger_$cmethod` + in + \(ds : integer) -> + let + !ds : integer = ds + in + f {integer} `$fDefaultMethodsInteger` ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/fmapDefaultTest.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/fmapDefaultTest.pir.golden index 542ba6ca065..4c6d50985cf 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/fmapDefaultTest.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/fmapDefaultTest.pir.golden @@ -1,884 +1,209 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind (nonstrict) (vardecl v (con integer)) (con integer 1)) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fAdditiveSemigroupInteger` - [ (lam a (type) (fun a (fun a a))) (con integer) ] - ) - addInteger - ) - (termbind - (nonstrict) - (vardecl - `+` - (all - a - (type) - (fun [ (lam a (type) (fun a (fun a a))) a ] (fun a (fun a a))) - ) - ) - (abs a (type) (lam v [ (lam a (type) (fun a (fun a a))) a ] v)) - ) - (termbind - (nonstrict) - (vardecl v (fun (con integer) (fun (con integer) (con integer)))) - [ { `+` (con integer) } `$fAdditiveSemigroupInteger` ] - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - `$fFoldableList_$cfoldr` - (all - a - (type) - (all b (type) (fun (fun a (fun b b)) (fun b (fun [ List a ] b)))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a (fun b b)) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a (fun b b))) f) - (lam - z - b - (let - (nonrec) - (termbind (strict) (vardecl z b) z) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] b)) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] (all dead (type) b) - } - (abs dead (type) z) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs dead (type) [ [ f x ] [ go xs ] ]) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFunctorList_$cfmap` - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ List a ] [ List b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] [ List b ])) - (lam + ~v : integer = 1 + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + ~`$fAdditiveSemigroupInteger` : (\a -> a -> a -> a) integer = addInteger + ~`+` : all a. (\a -> a -> a -> a) a -> a -> a -> a + = /\a -> \(v : (\a -> a -> a -> a) a) -> v + ~v : integer -> integer -> integer + = `+` {integer} `$fAdditiveSemigroupInteger` + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~`$fFoldableList_$cfoldr` : all a b. (a -> b -> b) -> b -> List a -> b + = /\a b -> + \(f : a -> b -> b) -> + let + !f : a -> b -> b = f + in + \(z : b) -> + let + !z : b = z + in + letrec + ~go : List a -> b + = \(ds : List a) -> + List_match + {a} ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) [ List b ]) - } - (abs dead (type) { Nil b }) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - [ [ { Cons b } [ f x ] ] [ go xs ] ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Applicative (fun (fun (type) (type)) (type))) - (tyvardecl f (fun (type) (type))) + {all dead. b} + (/\dead -> z) + (\(x : a) (xs : List a) -> /\dead -> f x (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + ~`$fFunctorList_$cfmap` : all a b. (a -> b) -> List a -> List b + = /\a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + letrec + ~go : List a -> List b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List b} + (/\dead -> Nil {b}) + (\(x : a) (xs : List a) -> + /\dead -> Cons {b} (f x) (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + data (Applicative :: (* -> *) -> *) (f :: * -> *) | Applicative_match where + CConsApplicative : + (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f -> + (all a. a -> f a) -> + (all a b. f (a -> b) -> f a -> f b) -> + Applicative f + ~`$p1Applicative` : + all (f :: * -> *). + Applicative f -> (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f + = /\(f :: * -> *) -> + \(v : Applicative f) -> Applicative_match - (vardecl - CConsApplicative - (fun - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (fun - (all a (type) (fun a [ f a ])) - (fun - (all - a - (type) - (all b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ]))) - ) - [ Applicative f ] - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$p1Applicative` - (all - f - (fun (type) (type)) - (fun - [ Applicative f ] - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - ) - ) - ) - (abs - f - (fun (type) (type)) - (lam + {f} v - [ Applicative f ] - [ - { - [ { Applicative_match f } v ] - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (lam - v - (all a (type) (fun a [ f a ])) - (lam - v - (all - a - (type) - (all - b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ])) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `<*>` - (all - f - (fun (type) (type)) - (fun - [ Applicative f ] - (all - a - (type) - (all b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ]))) - ) - ) - ) - ) - (abs - f - (fun (type) (type)) - (lam + {(\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) + (v : all a. a -> f a) + (v : all a b. f (a -> b) -> f a -> f b) -> + v) + ~`<*>` : + all (f :: * -> *). Applicative f -> (all a b. f (a -> b) -> f a -> f b) + = /\(f :: * -> *) -> + \(v : Applicative f) -> + Applicative_match + {f} v - [ Applicative f ] - [ - { - [ { Applicative_match f } v ] - (all - a - (type) - (all b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ]))) - ) - } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (lam - v - (all a (type) (fun a [ f a ])) - (lam - v - (all - a - (type) - (all - b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ])) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - pure - (all - f - (fun (type) (type)) - (fun [ Applicative f ] (all a (type) (fun a [ f a ]))) - ) - ) - (abs - f - (fun (type) (type)) - (lam + {all a b. f (a -> b) -> f a -> f b} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) + (v : all a. a -> f a) + (v : all a b. f (a -> b) -> f a -> f b) -> + v) + ~pure : all (f :: * -> *). Applicative f -> (all a. a -> f a) + = /\(f :: * -> *) -> + \(v : Applicative f) -> + Applicative_match + {f} v - [ Applicative f ] - [ - { [ { Applicative_match f } v ] (all a (type) (fun a [ f a ])) } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (lam - v - (all a (type) (fun a [ f a ])) - (lam - v - (all - a - (type) - (all - b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ])) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fTraversableList_$ctraverse` - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ List a ] [ f [ List b ] ])) - ) - ) - ) - ) - ) - (abs - f - (fun (type) (type)) - (abs - a - (type) - (abs - b - (type) - (lam - `$dApplicative` - [ Applicative f ] - (lam - f - (fun a [ f b ]) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a [ f b ])) f) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] [ f [ List b ] ])) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) [ f [ List b ] ]) - } - (abs - dead - (type) - [ - { - [ { pure f } `$dApplicative` ] - [ List b ] - } - { Nil b } - ] - ) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - (let - (nonrec) - (termbind - (strict) (vardecl x [ f b ]) [ f x ] - ) - [ - [ - { - { - [ { `<*>` f } `$dApplicative` ] - [ List b ] - } - [ List b ] - } - [ - [ - { - { - [ - { `$p1Applicative` f } - `$dApplicative` - ] - b - } - (fun [ List b ] [ List b ]) - } - (lam - ds - b - (lam - ds - [ List b ] - [ [ { Cons b } ds ] ds ] - ) - ) - ] - x - ] - ] - [ go xs ] - ] - ) - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Traversable (fun (fun (type) (type)) (type))) - (tyvardecl t (fun (type) (type))) + {all a. a -> f a} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) + (v : all a. a -> f a) + (v : all a b. f (a -> b) -> f a -> f b) -> + v) + ~`$fTraversableList_$ctraverse` : + all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> List a -> f (List b) + = /\(f :: * -> *) a b -> + \(`$dApplicative` : Applicative f) (f : a -> f b) -> + let + !f : a -> f b = f + in + letrec + ~go : List a -> f (List b) + = \(ds : List a) -> + List_match + {a} + ds + {all dead. f (List b)} + (/\dead -> pure {f} `$dApplicative` {List b} (Nil {b})) + (\(x : a) (xs : List a) -> + /\dead -> + let + !x : f b = f x + in + `<*>` + {f} + `$dApplicative` + {List b} + {List b} + (`$p1Applicative` + {f} + `$dApplicative` + {b} + {List b -> List b} + (\(ds : b) (ds : List b) -> Cons {b} ds ds) + x) + (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + data (Traversable :: (* -> *) -> *) (t :: * -> *) | Traversable_match where + CConsTraversable : + (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) t -> + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) t -> + (all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> t a -> f (t b)) -> + Traversable t + ~`$fTraversableList` : Traversable List + = CConsTraversable + {List} + `$fFunctorList_$cfmap` + `$fFoldableList_$cfoldr` + `$fTraversableList_$ctraverse` + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + ~`$fApplicativeIdentity_$cpure` : all a. a -> (\a -> a) a + = /\a -> \(ds : a) -> ds + ~id : all a. a -> a = /\a -> \(x : a) -> x + ~`$fApplicativeIdentity` : Applicative (\a -> a) + = CConsApplicative + {\a -> a} + (/\a b -> id {a -> b}) + `$fApplicativeIdentity_$cpure` + (/\a b -> id {a -> b}) + ~traverse : + all (t :: * -> *). + Traversable t -> + (all (f :: * -> *) a b. Applicative f -> (a -> f b) -> t a -> f (t b)) + = /\(t :: * -> *) -> + \(v : Traversable t) -> Traversable_match - (vardecl - CConsTraversable - (fun - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - t - ] - (fun - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (fun - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - [ Traversable t ] - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fTraversableList` [ Traversable List ]) - [ - [ - [ { CConsTraversable List } `$fFunctorList_$cfmap` ] - `$fFoldableList_$cfoldr` - ] - `$fTraversableList_$ctraverse` - ] - ) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ]) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fApplicativeIdentity_$cpure` - (all a (type) (fun a [ (lam a (type) a) a ])) - ) - (abs a (type) (lam ds a ds)) - ) - (termbind - (nonstrict) - (vardecl id (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - (termbind - (nonstrict) - (vardecl `$fApplicativeIdentity` [ Applicative (lam a (type) a) ]) - [ - [ - [ - { CConsApplicative (lam a (type) a) } - (abs a (type) (abs b (type) { id (fun a b) })) - ] - `$fApplicativeIdentity_$cpure` - ] - (abs a (type) (abs b (type) { id (fun a b) })) - ] - ) - (termbind - (nonstrict) - (vardecl - traverse - (all - t - (fun (type) (type)) - (fun - [ Traversable t ] - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - ) - ) - ) - (abs - t - (fun (type) (type)) - (lam + {t} v - [ Traversable t ] - [ - { - [ { Traversable_match t } v ] - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - t - ] - (lam - v - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (lam - v - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - fmapDefault - (all - t - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun [ Traversable t ] (fun (fun a b) (fun [ t a ] [ t b ]))) - ) - ) - ) - ) - (abs - t - (fun (type) (type)) - (abs - a - (type) - (abs - b - (type) - (lam - `$dTraversable` - [ Traversable t ] - [ - { - { - { [ { traverse t } `$dTraversable` ] (lam a (type) a) } - a - } - b - } - `$fApplicativeIdentity` - ] - ) - ) - ) - ) - ) - [ - [ - [ - { { { fmapDefault List } (con integer) } (con integer) } - `$fTraversableList` - ] - (lam v (con integer) [ [ v v ] v ]) - ] - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam - n - a - [ - [ c (con integer 1) ] - [ - [ c (con integer 2) ] - [ [ c (con integer 3) ] [ [ c (con integer 4) ] n ] ] - ] - ] - ) - ) - ) - ] - ] - ) - ) - ) -) \ No newline at end of file + {all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> t a -> f (t b)} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) t) + (v : + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) + t) + (v : + all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> t a -> f (t b)) -> + v) + ~fmapDefault : + all (t :: * -> *) a b. Traversable t -> (a -> b) -> t a -> t b + = /\(t :: * -> *) a b -> + \(`$dTraversable` : Traversable t) -> + traverse + {t} + `$dTraversable` + {\a -> a} + {a} + {b} + `$fApplicativeIdentity` + in + fmapDefault + {List} + {integer} + {integer} + `$fTraversableList` + (\(v : integer) -> v v v) + (build + {integer} + (/\a -> \(c : integer -> a -> a) (n : a) -> c 1 (c 2 (c 3 (c 4 n)))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/multiFunction.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/multiFunction.pir.golden index 480c779c5c1..4dad97a8f09 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/multiFunction.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/multiFunction.pir.golden @@ -1,219 +1,79 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Animal (type)) - - Animal_match - (vardecl Cat Animal) (vardecl Dog Animal) - ) - ) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl PersonLike (fun (type) (type))) - (tyvardecl a (type)) - PersonLike_match - (vardecl - CConsPersonLike - (fun - (fun a (con integer)) - (fun (fun a (fun Animal Bool)) [ PersonLike a ]) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl age (all a (type) (fun [ PersonLike a ] (fun a (con integer))))) - (abs - a - (type) - (lam - v - [ PersonLike a ] - [ - { [ { PersonLike_match a } v ] (fun a (con integer)) } - (lam v (fun a (con integer)) (lam v (fun a (fun Animal Bool)) v)) - ] - ) - ) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (strict) - (vardecl - lessThanInteger (fun (con integer) (fun (con integer) (con bool))) - ) - (builtin lessThanInteger) - ) - (termbind - (nonstrict) - (vardecl lessThanInteger (fun (con integer) (fun (con integer) Bool))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - (termbind - (strict) (vardecl b (con bool)) [ [ lessThanInteger x ] y ] - ) - [ [ [ { ifThenElse Bool } b ] True ] False ] - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - likesAnimal - (all a (type) (fun [ PersonLike a ] (fun a (fun Animal Bool)))) - ) - (abs - a - (type) - (lam - v - [ PersonLike a ] - [ - { [ { PersonLike_match a } v ] (fun a (fun Animal Bool)) } - (lam v (fun a (con integer)) (lam v (fun a (fun Animal Bool)) v)) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl predicate (all p (type) (fun [ PersonLike p ] (fun p Bool)))) - (abs - p - (type) - (lam - `$dPersonLike` - [ PersonLike p ] - (lam - p - p - (let - (nonrec) - (termbind (strict) (vardecl p p) p) - { - [ - [ - { - [ - Bool_match - [ [ [ { likesAnimal p } `$dPersonLike` ] p ] Cat ] - ] - (all dead (type) Bool) - } - (abs - dead - (type) - [ - [ lessThanInteger [ [ { age p } `$dPersonLike` ] p ] ] - (con integer 30) - ] - ) - ] - (abs dead (type) False) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Person (type)) - - Person_match - (vardecl Jane Person) (vardecl Jim Person) - ) - ) - (termbind - (nonstrict) - (vardecl `$cage` (fun Person (con integer))) - (lam - ds - Person - [ - [ { [ Person_match ds ] (con integer) } (con integer 35) ] - (con integer 30) - ] - ) - ) - (termbind - (nonstrict) - (vardecl `$clikesAnimal` (fun Person (fun Animal Bool))) - (lam - ds - Person - (lam - ds - Animal - { - [ - [ - { [ Person_match ds ] (all dead (type) Bool) } - (abs - dead - (type) - { - [ - [ - { [ Animal_match ds ] (all dead (type) Bool) } - (abs dead (type) True) - ] - (abs dead (type) False) - ] - (all dead (type) dead) - } - ) - ] - (abs dead (type) False) - ] - (all dead (type) dead) - } - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fPersonLikePerson` [ PersonLike Person ]) - [ [ { CConsPersonLike Person } `$cage` ] `$clikesAnimal` ] - ) - (lam - ds - Person - (let - (nonrec) - (termbind (strict) (vardecl ds Person) ds) - [ [ { predicate Person } `$fPersonLikePerson` ] ds ] - ) - ) - ) -) \ No newline at end of file + data Animal | Animal_match where + Cat : Animal + Dog : Animal + data Bool | Bool_match where + True : Bool + False : Bool + data (PersonLike :: * -> *) a | PersonLike_match where + CConsPersonLike : (a -> integer) -> (a -> Animal -> Bool) -> PersonLike a + ~age : all a. PersonLike a -> a -> integer + = /\a -> + \(v : PersonLike a) -> + PersonLike_match + {a} + v + {a -> integer} + (\(v : a -> integer) (v : a -> Animal -> Bool) -> v) + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + !lessThanInteger : integer -> integer -> bool = lessThanInteger + ~lessThanInteger : integer -> integer -> Bool + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> + let + !y : integer = y + !b : bool = lessThanInteger x y + in + ifThenElse {Bool} b True False + ~likesAnimal : all a. PersonLike a -> a -> Animal -> Bool + = /\a -> + \(v : PersonLike a) -> + PersonLike_match + {a} + v + {a -> Animal -> Bool} + (\(v : a -> integer) (v : a -> Animal -> Bool) -> v) + ~predicate : all p. PersonLike p -> p -> Bool + = /\p -> + \(`$dPersonLike` : PersonLike p) (p : p) -> + let + !p : p = p + in + Bool_match + (likesAnimal {p} `$dPersonLike` p Cat) + {all dead. Bool} + (/\dead -> lessThanInteger (age {p} `$dPersonLike` p) 30) + (/\dead -> False) + {all dead. dead} + data Person | Person_match where + Jane : Person + Jim : Person + ~`$cage` : Person -> integer + = \(ds : Person) -> Person_match ds {integer} 35 30 + ~`$clikesAnimal` : Person -> Animal -> Bool + = \(ds : Person) (ds : Animal) -> + Person_match + ds + {all dead. Bool} + (/\dead -> + Animal_match + ds + {all dead. Bool} + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (/\dead -> False) + {all dead. dead} + ~`$fPersonLikePerson` : PersonLike Person + = CConsPersonLike {Person} `$cage` `$clikesAnimal` + in + \(ds : Person) -> + let + !ds : Person = ds + in + predicate {Person} `$fPersonLikePerson` ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/partialApplication.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/partialApplication.pir.golden index bf1d7fd84fe..23bb296c13c 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/partialApplication.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/partialApplication.pir.golden @@ -1,108 +1,40 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Bool (type)) - - Bool_match - (vardecl True Bool) (vardecl False Bool) - ) - ) - (datatypebind - (datatype - (tyvardecl Ordering (type)) - - Ordering_match - (vardecl EQ Ordering) (vardecl GT Ordering) (vardecl LT Ordering) - ) - ) - (termbind - (strict) - (vardecl equalsInteger (fun (con integer) (fun (con integer) (con bool)))) - (builtin equalsInteger) - ) - (termbind - (strict) - (vardecl ifThenElse (all a (type) (fun (con bool) (fun a (fun a a))))) - (builtin ifThenElse) - ) - (termbind - (strict) - (vardecl - lessThanEqualsInteger (fun (con integer) (fun (con integer) (con bool))) - ) - (builtin lessThanEqualsInteger) - ) - (termbind - (nonstrict) - (vardecl - `$fOrdInteger_$ccompare` - (fun (con integer) (fun (con integer) Ordering)) - ) - (lam - eta - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) eta) - (lam - eta - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) eta) - (termbind - (strict) (vardecl b (con bool)) [ [ equalsInteger x ] y ] - ) - { - [ - [ - { - [ - Bool_match [ [ [ { ifThenElse Bool } b ] True ] False ] - ] - (all dead (type) Ordering) - } - (abs dead (type) EQ) - ] - (abs - dead - (type) - (let - (nonrec) - (termbind - (strict) - (vardecl b (con bool)) - [ [ lessThanEqualsInteger x ] y ] - ) - { - [ - [ - { - [ - Bool_match - [ [ [ { ifThenElse Bool } b ] True ] False ] - ] - (all dead (type) Ordering) - } - (abs dead (type) LT) - ] - (abs dead (type) GT) - ] - (all dead (type) dead) - } - ) - ) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - `$fOrdInteger_$ccompare` - ) -) \ No newline at end of file + data Bool | Bool_match where + True : Bool + False : Bool + data Ordering | Ordering_match where + EQ : Ordering + GT : Ordering + LT : Ordering + !equalsInteger : integer -> integer -> bool = equalsInteger + !ifThenElse : all a. bool -> a -> a -> a = ifThenElse + !lessThanEqualsInteger : integer -> integer -> bool = lessThanEqualsInteger + ~`$fOrdInteger_$ccompare` : integer -> integer -> Ordering + = \(eta : integer) -> + let + !x : integer = eta + in + \(eta : integer) -> + let + !y : integer = eta + !b : bool = equalsInteger x y + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. Ordering} + (/\dead -> EQ) + (/\dead -> + let + !b : bool = lessThanEqualsInteger x y + in + Bool_match + (ifThenElse {Bool} b True False) + {all dead. Ordering} + (/\dead -> LT) + (/\dead -> GT) + {all dead. dead}) + {all dead. dead} + in + `$fOrdInteger_$ccompare`) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sequenceTest.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sequenceTest.pir.golden index 723765c24b5..1c30e916b20 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sequenceTest.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sequenceTest.pir.golden @@ -1,937 +1,236 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Maybe (fun (type) (type))) - (tyvardecl a (type)) - Maybe_match - (vardecl Just (fun a [ Maybe a ])) (vardecl Nothing [ Maybe a ]) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fApplicativeMaybe_$c<*>` - (all - a - (type) - (all b (type) (fun [ Maybe (fun a b) ] (fun [ Maybe a ] [ Maybe b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - ds - [ Maybe (fun a b) ] - (lam + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + ~`$fApplicativeMaybe_$c<*>` : all a b. Maybe (a -> b) -> Maybe a -> Maybe b + = /\a b -> + \(ds : Maybe (a -> b)) (ds : Maybe a) -> + Maybe_match + {a -> b} ds - [ Maybe a ] - { - [ - [ - { - [ { Maybe_match (fun a b) } ds ] - (all dead (type) [ Maybe b ]) - } - (lam - ipv - (fun a b) - (abs - dead - (type) - { - [ - [ - { - [ { Maybe_match a } ds ] - (all dead (type) [ Maybe b ]) - } - (lam - ipv - a - (abs dead (type) [ { Just b } [ ipv ipv ] ]) - ) - ] - (abs dead (type) { Nothing b }) - ] - (all dead (type) dead) - } - ) - ) - ] - (abs dead (type) { Nothing b }) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fApplicativeMaybe_$cpure` (all a (type) (fun a [ Maybe a ]))) - (abs a (type) (lam ds a [ { Just a } ds ])) - ) - (termbind - (nonstrict) - (vardecl - `$fFunctorMaybe_$cfmap` - (all - a (type) (all b (type) (fun (fun a b) (fun [ Maybe a ] [ Maybe b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (lam + {all dead. Maybe b} + (\(ipv : a -> b) -> + /\dead -> + Maybe_match + {a} + ds + {all dead. Maybe b} + (\(ipv : a) -> /\dead -> Just {b} (ipv ipv)) + (/\dead -> Nothing {b}) + {all dead. dead}) + (/\dead -> Nothing {b}) + {all dead. dead} + ~`$fApplicativeMaybe_$cpure` : all a. a -> Maybe a + = /\a -> \(ds : a) -> Just {a} ds + ~`$fFunctorMaybe_$cfmap` : all a b. (a -> b) -> Maybe a -> Maybe b + = /\a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + \(ds : Maybe a) -> + Maybe_match + {a} ds - [ Maybe a ] - { - [ - [ - { [ { Maybe_match a } ds ] (all dead (type) [ Maybe b ]) } - (lam a a (abs dead (type) [ { Just b } [ f a ] ])) - ] - (abs dead (type) { Nothing b }) - ] - (all dead (type) dead) - } - ) - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Applicative (fun (fun (type) (type)) (type))) - (tyvardecl f (fun (type) (type))) - Applicative_match - (vardecl - CConsApplicative - (fun - [ - (lam - f - (fun (type) (type)) - (all - a (type) (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (fun - (all a (type) (fun a [ f a ])) - (fun - (all - a - (type) - (all b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ]))) - ) - [ Applicative f ] - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fApplicativeMaybe` [ Applicative Maybe ]) - [ - [ - [ { CConsApplicative Maybe } `$fFunctorMaybe_$cfmap` ] + {all dead. Maybe b} + (\(a : a) -> /\dead -> Just {b} (f a)) + (/\dead -> Nothing {b}) + {all dead. dead} + data (Applicative :: (* -> *) -> *) (f :: * -> *) | Applicative_match where + CConsApplicative : + (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f -> + (all a. a -> f a) -> + (all a b. f (a -> b) -> f a -> f b) -> + Applicative f + ~`$fApplicativeMaybe` : Applicative Maybe + = CConsApplicative + {Maybe} + `$fFunctorMaybe_$cfmap` `$fApplicativeMaybe_$cpure` - ] - `$fApplicativeMaybe_$c<*>` - ] - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - `$fFoldableList_$cfoldr` - (all - a - (type) - (all b (type) (fun (fun a (fun b b)) (fun b (fun [ List a ] b)))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a (fun b b)) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a (fun b b))) f) - (lam - z - b - (let - (nonrec) - (termbind (strict) (vardecl z b) z) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] b)) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] (all dead (type) b) - } - (abs dead (type) z) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs dead (type) [ [ f x ] [ go xs ] ]) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFunctorList_$cfmap` - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ List a ] [ List b ]))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a b) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a b)) f) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] [ List b ])) - (lam + `$fApplicativeMaybe_$c<*>` + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~`$fFoldableList_$cfoldr` : all a b. (a -> b -> b) -> b -> List a -> b + = /\a b -> + \(f : a -> b -> b) -> + let + !f : a -> b -> b = f + in + \(z : b) -> + let + !z : b = z + in + letrec + ~go : List a -> b + = \(ds : List a) -> + List_match + {a} ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) [ List b ]) - } - (abs dead (type) { Nil b }) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - [ [ { Cons b } [ f x ] ] [ go xs ] ] - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$p1Applicative` - (all - f - (fun (type) (type)) - (fun - [ Applicative f ] - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - ) - ) - ) - (abs - f - (fun (type) (type)) - (lam + {all dead. b} + (/\dead -> z) + (\(x : a) (xs : List a) -> /\dead -> f x (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + ~`$fFunctorList_$cfmap` : all a b. (a -> b) -> List a -> List b + = /\a b -> + \(f : a -> b) -> + let + !f : a -> b = f + in + letrec + ~go : List a -> List b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List b} + (/\dead -> Nil {b}) + (\(x : a) (xs : List a) -> + /\dead -> Cons {b} (f x) (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + ~`$p1Applicative` : + all (f :: * -> *). + Applicative f -> (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f + = /\(f :: * -> *) -> + \(v : Applicative f) -> + Applicative_match + {f} v - [ Applicative f ] - [ - { - [ { Applicative_match f } v ] - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (lam - v - (all a (type) (fun a [ f a ])) - (lam - v - (all - a - (type) - (all - b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ])) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `<*>` - (all - f - (fun (type) (type)) - (fun - [ Applicative f ] - (all - a - (type) - (all b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ]))) - ) - ) - ) - ) - (abs - f - (fun (type) (type)) - (lam + {(\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) + (v : all a. a -> f a) + (v : all a b. f (a -> b) -> f a -> f b) -> + v) + ~`<*>` : + all (f :: * -> *). Applicative f -> (all a b. f (a -> b) -> f a -> f b) + = /\(f :: * -> *) -> + \(v : Applicative f) -> + Applicative_match + {f} v - [ Applicative f ] - [ - { - [ { Applicative_match f } v ] - (all - a - (type) - (all b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ]))) - ) - } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (lam - v - (all a (type) (fun a [ f a ])) - (lam - v - (all - a - (type) - (all - b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ])) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - pure - (all - f - (fun (type) (type)) - (fun [ Applicative f ] (all a (type) (fun a [ f a ]))) - ) - ) - (abs - f - (fun (type) (type)) - (lam + {all a b. f (a -> b) -> f a -> f b} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) + (v : all a. a -> f a) + (v : all a b. f (a -> b) -> f a -> f b) -> + v) + ~pure : all (f :: * -> *). Applicative f -> (all a. a -> f a) + = /\(f :: * -> *) -> + \(v : Applicative f) -> + Applicative_match + {f} v - [ Applicative f ] - [ - { [ { Applicative_match f } v ] (all a (type) (fun a [ f a ])) } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - f - ] - (lam - v - (all a (type) (fun a [ f a ])) - (lam - v - (all - a - (type) - (all - b (type) (fun [ f (fun a b) ] (fun [ f a ] [ f b ])) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fTraversableList_$ctraverse` - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ List a ] [ f [ List b ] ])) - ) - ) - ) - ) - ) - (abs - f - (fun (type) (type)) - (abs - a - (type) - (abs - b - (type) - (lam - `$dApplicative` - [ Applicative f ] - (lam - f - (fun a [ f b ]) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a [ f b ])) f) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] [ f [ List b ] ])) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] - (all dead (type) [ f [ List b ] ]) - } - (abs - dead - (type) - [ - { - [ { pure f } `$dApplicative` ] - [ List b ] - } - { Nil b } - ] - ) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs - dead - (type) - (let - (nonrec) - (termbind - (strict) (vardecl x [ f b ]) [ f x ] - ) - [ - [ - { - { - [ { `<*>` f } `$dApplicative` ] - [ List b ] - } - [ List b ] - } - [ - [ - { - { - [ - { `$p1Applicative` f } - `$dApplicative` - ] - b - } - (fun [ List b ] [ List b ]) - } - (lam - ds - b - (lam - ds - [ List b ] - [ [ { Cons b } ds ] ds ] - ) - ) - ] - x - ] - ] - [ go xs ] - ] - ) - ) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl Traversable (fun (fun (type) (type)) (type))) - (tyvardecl t (fun (type) (type))) + {all a. a -> f a} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) f) + (v : all a. a -> f a) + (v : all a b. f (a -> b) -> f a -> f b) -> + v) + ~`$fTraversableList_$ctraverse` : + all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> List a -> f (List b) + = /\(f :: * -> *) a b -> + \(`$dApplicative` : Applicative f) (f : a -> f b) -> + let + !f : a -> f b = f + in + letrec + ~go : List a -> f (List b) + = \(ds : List a) -> + List_match + {a} + ds + {all dead. f (List b)} + (/\dead -> pure {f} `$dApplicative` {List b} (Nil {b})) + (\(x : a) (xs : List a) -> + /\dead -> + let + !x : f b = f x + in + `<*>` + {f} + `$dApplicative` + {List b} + {List b} + (`$p1Applicative` + {f} + `$dApplicative` + {b} + {List b -> List b} + (\(ds : b) (ds : List b) -> Cons {b} ds ds) + x) + (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + data (Traversable :: (* -> *) -> *) (t :: * -> *) | Traversable_match where + CConsTraversable : + (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) t -> + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) t -> + (all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> t a -> f (t b)) -> + Traversable t + ~`$fTraversableList` : Traversable List + = CConsTraversable + {List} + `$fFunctorList_$cfmap` + `$fFoldableList_$cfoldr` + `$fTraversableList_$ctraverse` + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + ~id : all a. a -> a = /\a -> \(x : a) -> x + ~traverse : + all (t :: * -> *). + Traversable t -> + (all (f :: * -> *) a b. Applicative f -> (a -> f b) -> t a -> f (t b)) + = /\(t :: * -> *) -> + \(v : Traversable t) -> Traversable_match - (vardecl - CConsTraversable - (fun - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - t - ] - (fun - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (fun - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - [ Traversable t ] - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fTraversableList` [ Traversable List ]) - [ - [ - [ { CConsTraversable List } `$fFunctorList_$cfmap` ] - `$fFoldableList_$cfoldr` - ] - `$fTraversableList_$ctraverse` - ] - ) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ]) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl id (all a (type) (fun a a))) - (abs a (type) (lam x a x)) - ) - (termbind - (nonstrict) - (vardecl - traverse - (all - t - (fun (type) (type)) - (fun - [ Traversable t ] - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - ) - ) - ) - (abs - t - (fun (type) (type)) - (lam + {t} v - [ Traversable t ] - [ - { - [ { Traversable_match t } v ] - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - } - (lam - v - [ - (lam - f - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a b) (fun [ f a ] [ f b ]))) - ) - ) - t - ] - (lam - v - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (lam - v - (all - f - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun - [ Applicative f ] - (fun (fun a [ f b ]) (fun [ t a ] [ f [ t b ] ])) - ) - ) - ) - ) - v - ) - ) - ) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - sequence - (all - t - (fun (type) (type)) - (all - f - (fun (type) (type)) - (all - a - (type) - (fun - [ Traversable t ] - (fun [ Applicative f ] (fun [ t [ f a ] ] [ f [ t a ] ])) - ) - ) - ) - ) - ) - (abs - t - (fun (type) (type)) - (abs - f - (fun (type) (type)) - (abs - a - (type) - (lam - `$dTraversable` - [ Traversable t ] - (lam - `$dApplicative` - [ Applicative f ] - [ - [ - { - { { [ { traverse t } `$dTraversable` ] f } [ f a ] } a - } - `$dApplicative` - ] - { id [ f a ] } - ] - ) - ) - ) - ) - ) - ) - [ - [ - [ - { { { sequence List } Maybe } (con integer) } `$fTraversableList` - ] - `$fApplicativeMaybe` - ] - [ - { build [ Maybe (con integer) ] } - (abs - a - (type) - (lam - c - (fun [ Maybe (con integer) ] (fun a a)) - (lam - n - a - [ - [ c [ { Just (con integer) } (con integer 1) ] ] - [ [ c [ { Just (con integer) } (con integer 2) ] ] n ] - ] - ) - ) - ) - ] - ] - ) - ) - ) -) \ No newline at end of file + {all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> t a -> f (t b)} + (\(v : (\(f :: * -> *) -> all a b. (a -> b) -> f a -> f b) t) + (v : + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) + t) + (v : + all (f :: * -> *) a b. + Applicative f -> (a -> f b) -> t a -> f (t b)) -> + v) + ~sequence : + all (t :: * -> *) (f :: * -> *) a. + Traversable t -> Applicative f -> t (f a) -> f (t a) + = /\(t :: * -> *) (f :: * -> *) a -> + \(`$dTraversable` : Traversable t) + (`$dApplicative` : Applicative f) -> + traverse + {t} + `$dTraversable` + {f} + {f a} + {a} + `$dApplicative` + (id {f a}) + in + sequence + {List} + {Maybe} + {integer} + `$fTraversableList` + `$fApplicativeMaybe` + (build + {Maybe integer} + (/\a -> + \(c : Maybe integer -> a -> a) (n : a) -> + c (Just {integer} 1) (c (Just {integer} 2) n)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedBasic.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedBasic.pir.golden index e4265904107..a7c54e1ad50 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedBasic.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedBasic.pir.golden @@ -1,39 +1,13 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (nonstrict) - (vardecl `$csize` (fun (con integer) (con integer))) - (lam x (con integer) x) - ) - (termbind - (nonstrict) - (vardecl - `$fSizedInteger` [ (lam a (type) (fun a (con integer))) (con integer) ] - ) - `$csize` - ) - (termbind - (nonstrict) - (vardecl - size - (all - a - (type) - (fun [ (lam a (type) (fun a (con integer))) a ] (fun a (con integer))) - ) - ) - (abs a (type) (lam v [ (lam a (type) (fun a (con integer))) a ] v)) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ [ { size (con integer) } `$fSizedInteger` ] ds ] - ) - ) - ) -) \ No newline at end of file + ~`$csize` : integer -> integer = \(x : integer) -> x + ~`$fSizedInteger` : (\a -> a -> integer) integer = `$csize` + ~size : all a. (\a -> a -> integer) a -> a -> integer + = /\a -> \(v : (\a -> a -> integer) a) -> v + in + \(ds : integer) -> + let + !ds : integer = ds + in + size {integer} `$fSizedInteger` ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedPair.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedPair.pir.golden index 40b11797d8b..af12b31b5e0 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedPair.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sizedPair.pir.golden @@ -1,161 +1,52 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype - (tyvardecl Tuple2 (fun (type) (fun (type) (type)))) - (tyvardecl a (type)) (tyvardecl b (type)) - Tuple2_match - (vardecl Tuple2 (fun a (fun b [ [ Tuple2 a ] b ]))) - ) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl - `$csize` - (all - a - (type) - (all - b - (type) - (fun - [ (lam a (type) (fun a (con integer))) a ] - (fun - [ (lam a (type) (fun a (con integer))) b ] - (fun [ [ Tuple2 a ] b ] (con integer)) - ) - ) - ) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - `$dSized` - [ (lam a (type) (fun a (con integer))) a ] - (lam - `$dSized` - [ (lam a (type) (fun a (con integer))) b ] - (lam - ds - [ [ Tuple2 a ] b ] - [ - { [ { { Tuple2_match a } b } ds ] (con integer) } - (lam - a - a - (lam - b - b - (let - (nonrec) - (termbind - (strict) (vardecl x (con integer)) [ `$dSized` a ] - ) - (termbind - (strict) (vardecl y (con integer)) [ `$dSized` b ] - ) - [ [ addInteger x ] y ] - ) - ) - ) - ] - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fSizedTuple2` - (all - a - (type) - (all - b - (type) - (fun - [ (lam a (type) (fun a (con integer))) a ] - (fun - [ (lam a (type) (fun a (con integer))) b ] - [ (lam a (type) (fun a (con integer))) [ [ Tuple2 a ] b ] ] - ) - ) - ) - ) - ) - `$csize` - ) - (termbind - (nonstrict) - (vardecl `$csize` (fun (con integer) (con integer))) - (lam x (con integer) x) - ) - (termbind - (nonstrict) - (vardecl - `$fSizedInteger` [ (lam a (type) (fun a (con integer))) (con integer) ] - ) - `$csize` - ) - (termbind - (nonstrict) - (vardecl + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + !addInteger : integer -> integer -> integer = addInteger + ~`$csize` : + all a b. + (\a -> a -> integer) a -> + (\a -> a -> integer) b -> + Tuple2 a b -> + integer + = /\a b -> + \(`$dSized` : (\a -> a -> integer) a) + (`$dSized` : (\a -> a -> integer) b) + (ds : Tuple2 a b) -> + Tuple2_match + {a} + {b} + ds + {integer} + (\(a : a) (b : b) -> + let + !x : integer = `$dSized` a + !y : integer = `$dSized` b + in + addInteger x y) + ~`$fSizedTuple2` : + all a b. + (\a -> a -> integer) a -> + (\a -> a -> integer) b -> + (\a -> a -> integer) (Tuple2 a b) + = `$csize` + ~`$csize` : integer -> integer = \(x : integer) -> x + ~`$fSizedInteger` : (\a -> a -> integer) integer = `$csize` + ~`$dSized` : (\a -> a -> integer) (Tuple2 integer integer) + = `$fSizedTuple2` {integer} {integer} `$fSizedInteger` `$fSizedInteger` + ~size : all a. (\a -> a -> integer) a -> a -> integer + = /\a -> \(v : (\a -> a -> integer) a) -> v + in + \(ds : integer) -> + let + !ds : integer = ds + in + \(ds : integer) -> + let + !ds : integer = ds + in + size + {Tuple2 integer integer} `$dSized` - [ - (lam a (type) (fun a (con integer))) - [ [ Tuple2 (con integer) ] (con integer) ] - ] - ) - [ - [ { { `$fSizedTuple2` (con integer) } (con integer) } `$fSizedInteger` ] - `$fSizedInteger` - ] - ) - (termbind - (nonstrict) - (vardecl - size - (all - a - (type) - (fun [ (lam a (type) (fun a (con integer))) a ] (fun a (con integer))) - ) - ) - (abs a (type) (lam v [ (lam a (type) (fun a (con integer))) a ] v)) - ) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - (lam - ds - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl ds (con integer)) ds) - [ - [ { size [ [ Tuple2 (con integer) ] (con integer) ] } `$dSized` ] - [ [ { { Tuple2 (con integer) } (con integer) } ds ] ds ] - ] - ) - ) - ) - ) - ) -) \ No newline at end of file + (Tuple2 {integer} {integer} ds ds)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sumTest.pir.golden b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sumTest.pir.golden index 7e88a3e2032..59c4302fcbd 100644 --- a/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sumTest.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Typeclasses/9.6/sumTest.pir.golden @@ -1,324 +1,94 @@ -(program +program 1.1.0 (let - (nonrec) - (termbind - (nonstrict) - (vardecl `$fAdditiveMonoidInteger_$czero` (con integer)) - (con integer 0) - ) - (termbind - (strict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (builtin addInteger) - ) - (termbind - (nonstrict) - (vardecl addInteger (fun (con integer) (fun (con integer) (con integer)))) - (lam - x - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl x (con integer)) x) - (lam - y - (con integer) - (let - (nonrec) - (termbind (strict) (vardecl y (con integer)) y) - [ [ addInteger x ] y ] - ) - ) - ) - ) - ) - (datatypebind - (datatype - (tyvardecl AdditiveMonoid (fun (type) (type))) - (tyvardecl a (type)) - AdditiveMonoid_match - (vardecl - CConsAdditiveMonoid - (fun - [ (lam a (type) (fun a (fun a a))) a ] (fun a [ AdditiveMonoid a ]) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl `$fAdditiveMonoidInteger` [ AdditiveMonoid (con integer) ]) - [ - [ { CConsAdditiveMonoid (con integer) } addInteger ] - `$fAdditiveMonoidInteger_$czero` - ] - ) - (let - (rec) - (datatypebind - (datatype - (tyvardecl List (fun (type) (type))) - (tyvardecl a (type)) - List_match - (vardecl Nil [ List a ]) - (vardecl Cons (fun a (fun [ List a ] [ List a ]))) - ) - ) - (let - (nonrec) - (termbind - (nonstrict) - (vardecl - `$fFoldableList_$cfoldr` - (all - a - (type) - (all b (type) (fun (fun a (fun b b)) (fun b (fun [ List a ] b)))) - ) - ) - (abs - a - (type) - (abs - b - (type) - (lam - f - (fun a (fun b b)) - (let - (nonrec) - (termbind (strict) (vardecl f (fun a (fun b b))) f) - (lam - z - b - (let - (nonrec) - (termbind (strict) (vardecl z b) z) - (let - (rec) - (termbind - (nonstrict) - (vardecl go (fun [ List a ] b)) - (lam - ds - [ List a ] - { - [ - [ - { - [ { List_match a } ds ] (all dead (type) b) - } - (abs dead (type) z) - ] - (lam - x - a - (lam - xs - [ List a ] - (abs dead (type) [ [ f x ] [ go xs ] ]) - ) - ) - ] - (all dead (type) dead) - } - ) - ) - (lam eta [ List a ] [ go eta ]) - ) - ) - ) - ) - ) - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$fFoldableList` - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all b (type) (fun (fun a (fun b b)) (fun b (fun [ t a ] b)))) - ) - ) - List - ] - ) - `$fFoldableList_$cfoldr` - ) - (termbind - (nonstrict) - (vardecl - build - (all - a - (type) - (fun (all b (type) (fun (fun a (fun b b)) (fun b b))) [ List a ]) - ) - ) - (abs - a - (type) - (lam - g - (all b (type) (fun (fun a (fun b b)) (fun b b))) - [ - [ - { g [ List a ] } - (lam ds a (lam ds [ List a ] [ [ { Cons a } ds ] ds ])) - ] - { Nil a } - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - `$p1AdditiveMonoid` - (all - a - (type) - (fun [ AdditiveMonoid a ] [ (lam a (type) (fun a (fun a a))) a ]) - ) - ) - (abs - a - (type) - (lam + ~`$fAdditiveMonoidInteger_$czero` : integer = 0 + !addInteger : integer -> integer -> integer = addInteger + ~addInteger : integer -> integer -> integer + = \(x : integer) -> + let + !x : integer = x + in + \(y : integer) -> let !y : integer = y in addInteger x y + data (AdditiveMonoid :: * -> *) a | AdditiveMonoid_match where + CConsAdditiveMonoid : (\a -> a -> a -> a) a -> a -> AdditiveMonoid a + ~`$fAdditiveMonoidInteger` : AdditiveMonoid integer + = CConsAdditiveMonoid + {integer} + addInteger + `$fAdditiveMonoidInteger_$czero` + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + ~`$fFoldableList_$cfoldr` : all a b. (a -> b -> b) -> b -> List a -> b + = /\a b -> + \(f : a -> b -> b) -> + let + !f : a -> b -> b = f + in + \(z : b) -> + let + !z : b = z + in + letrec + ~go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> z) + (\(x : a) (xs : List a) -> /\dead -> f x (go xs)) + {all dead. dead} + in + \(eta : List a) -> go eta + ~`$fFoldableList` : + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) List + = `$fFoldableList_$cfoldr` + ~build : all a. (all b. (a -> b -> b) -> b -> b) -> List a + = /\a -> + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a}) + ~`$p1AdditiveMonoid` : all a. AdditiveMonoid a -> (\a -> a -> a -> a) a + = /\a -> + \(v : AdditiveMonoid a) -> + AdditiveMonoid_match + {a} v - [ AdditiveMonoid a ] - [ - { - [ { AdditiveMonoid_match a } v ] - [ (lam a (type) (fun a (fun a a))) a ] - } - (lam v [ (lam a (type) (fun a (fun a a))) a ] (lam v a v)) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl zero (all a (type) (fun [ AdditiveMonoid a ] a))) - (abs - a - (type) - (lam + {(\a -> a -> a -> a) a} + (\(v : (\a -> a -> a -> a) a) (v : a) -> v) + ~zero : all a. AdditiveMonoid a -> a + = /\a -> + \(v : AdditiveMonoid a) -> + AdditiveMonoid_match + {a} v - [ AdditiveMonoid a ] - [ - { [ { AdditiveMonoid_match a } v ] a } - (lam v [ (lam a (type) (fun a (fun a a))) a ] (lam v a v)) - ] - ) - ) - ) - (termbind - (nonstrict) - (vardecl - sum - (all - t - (fun (type) (type)) - (all - a - (type) - (fun - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b - (type) - (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (fun [ AdditiveMonoid a ] (fun [ t a ] a)) - ) - ) - ) - ) - (abs - t - (fun (type) (type)) - (abs - a - (type) - (lam - `$dFoldable` - [ - (lam - t - (fun (type) (type)) - (all - a - (type) - (all - b (type) (fun (fun a (fun b b)) (fun b (fun [ t a ] b))) - ) - ) - ) - t - ] - (lam - `$dAdditiveMonoid` - [ AdditiveMonoid a ] - [ - [ - { { `$dFoldable` a } a } - [ { `$p1AdditiveMonoid` a } `$dAdditiveMonoid` ] - ] - [ { zero a } `$dAdditiveMonoid` ] - ] - ) - ) - ) - ) - ) - [ - [ - [ { { sum List } (con integer) } `$fFoldableList` ] - `$fAdditiveMonoidInteger` - ] - [ - { build (con integer) } - (abs - a - (type) - (lam - c - (fun (con integer) (fun a a)) - (lam - n - a - [ - [ c (con integer 1) ] - [ - [ c (con integer 2) ] - [ [ c (con integer 3) ] [ [ c (con integer 4) ] n ] ] - ] - ] - ) - ) - ) - ] - ] - ) - ) - ) -) \ No newline at end of file + {a} + (\(v : (\a -> a -> a -> a) a) (v : a) -> v) + ~sum : + all (t :: * -> *) a. + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) t -> + AdditiveMonoid a -> + t a -> + a + = /\(t :: * -> *) a -> + \(`$dFoldable` : + (\(t :: * -> *) -> all a b. (a -> b -> b) -> b -> t a -> b) t) + (`$dAdditiveMonoid` : AdditiveMonoid a) -> + `$dFoldable` + {a} + {a} + (`$p1AdditiveMonoid` {a} `$dAdditiveMonoid`) + (zero {a} `$dAdditiveMonoid`) + in + sum + {List} + {integer} + `$fFoldableList` + `$fAdditiveMonoidInteger` + (build + {integer} + (/\a -> \(c : integer -> a -> a) (n : a) -> c 1 (c 2 (c 3 (c 4 n)))))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/StdLib/9.6/errorTrace.pir.golden b/plutus-tx-plugin/test/StdLib/9.6/errorTrace.pir.golden index ebd70eca028..b0adcc556ce 100644 --- a/plutus-tx-plugin/test/StdLib/9.6/errorTrace.pir.golden +++ b/plutus-tx-plugin/test/StdLib/9.6/errorTrace.pir.golden @@ -1,39 +1,18 @@ -(program +program 1.1.0 (let - (nonrec) - (datatypebind - (datatype (tyvardecl Unit (type)) Unit_match (vardecl Unit Unit)) - ) - (termbind - (strict) - (vardecl error (all a (type) (fun (con unit) a))) - (abs a (type) (lam thunk (con unit) (error a))) - ) - (termbind - (strict) - (vardecl trace (all a (type) (fun (con string) (fun a a)))) - (builtin trace) - ) - (termbind (strict) (vardecl unitval (con unit)) (con unit ())) - (termbind - (nonstrict) - (vardecl traceError (all a (type) (fun (con string) a))) - (abs - a - (type) - (lam - str - (con string) - (let - (nonrec) - (termbind (strict) (vardecl str (con string)) str) - (termbind (strict) (vardecl x Unit) [ [ { trace Unit } str ] Unit ]) - [ { error a } unitval ] - ) - ) - ) - ) - [ { traceError (con integer) } (con string "") ] - ) -) \ No newline at end of file + data Unit | Unit_match where + Unit : Unit + !error : all a. unit -> a = /\a -> \(thunk : unit) -> error {a} + !trace : all a. string -> a -> a = trace + !unitval : unit = () + ~traceError : all a. string -> a + = /\a -> + \(str : string) -> + let + !str : string = str + !x : Unit = trace {Unit} str Unit + in + error {a} unitval + in + traceError {integer} "") \ No newline at end of file diff --git a/plutus-tx-plugin/test/StdLib/9.6/ratioInterop.eval.golden b/plutus-tx-plugin/test/StdLib/9.6/ratioInterop.eval.golden deleted file mode 100644 index 7418ebb255e..00000000000 --- a/plutus-tx-plugin/test/StdLib/9.6/ratioInterop.eval.golden +++ /dev/null @@ -1 +0,0 @@ -(con integer 4) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Strictness/9.6/lambda-default.uplc.golden b/plutus-tx-plugin/test/Strictness/9.6/lambda-default.uplc.golden index 24c6b451d7e..5ce90e153ef 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/lambda-default.uplc.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/lambda-default.uplc.golden @@ -1 +1 @@ -program 1.1.0 (\n m -> addInteger n m) \ No newline at end of file +(program 1.1.0 (\n m -> addInteger n m)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.uplc.golden b/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.uplc.golden index 24c6b451d7e..5ce90e153ef 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.uplc.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.uplc.golden @@ -1 +1 @@ -program 1.1.0 (\n m -> addInteger n m) \ No newline at end of file +(program 1.1.0 (\n m -> addInteger n m)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.uplc.golden b/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.uplc.golden index 24c6b451d7e..5ce90e153ef 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.uplc.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.uplc.golden @@ -1 +1 @@ -program 1.1.0 (\n m -> addInteger n m) \ No newline at end of file +(program 1.1.0 (\n m -> addInteger n m)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Strictness/9.6/let-default.uplc.golden b/plutus-tx-plugin/test/Strictness/9.6/let-default.uplc.golden index 46f206ffc00..12709cecb0b 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/let-default.uplc.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/let-default.uplc.golden @@ -1,8 +1,8 @@ -program - 1.1.0 - (\m -> - force - (force ifThenElse - (lessThanInteger m 0) - (delay ((\cse -> addInteger cse cse) (error m))) - (delay m))) \ No newline at end of file +(program + 1.1.0 + (\m -> + force + (force ifThenElse + (lessThanInteger m 0) + (delay ((\cse -> addInteger cse cse) (error m))) + (delay m)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.uplc.golden b/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.uplc.golden index 46f206ffc00..12709cecb0b 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.uplc.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.uplc.golden @@ -1,8 +1,8 @@ -program - 1.1.0 - (\m -> - force - (force ifThenElse - (lessThanInteger m 0) - (delay ((\cse -> addInteger cse cse) (error m))) - (delay m))) \ No newline at end of file +(program + 1.1.0 + (\m -> + force + (force ifThenElse + (lessThanInteger m 0) + (delay ((\cse -> addInteger cse cse) (error m))) + (delay m)))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Strictness/9.6/let-strict.uplc.golden b/plutus-tx-plugin/test/Strictness/9.6/let-strict.uplc.golden index 46f206ffc00..12709cecb0b 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/let-strict.uplc.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/let-strict.uplc.golden @@ -1,8 +1,8 @@ -program - 1.1.0 - (\m -> - force - (force ifThenElse - (lessThanInteger m 0) - (delay ((\cse -> addInteger cse cse) (error m))) - (delay m))) \ No newline at end of file +(program + 1.1.0 + (\m -> + force + (force ifThenElse + (lessThanInteger m 0) + (delay ((\cse -> addInteger cse cse) (error m))) + (delay m)))) \ No newline at end of file