From 73bea69db4957201079375821d3c107592df674c Mon Sep 17 00:00:00 2001 From: Yura Lazaryev Date: Wed, 29 May 2024 10:29:54 +0200 Subject: [PATCH] Updated golden files --- .../nofib/test/9.6/clausify-F5.pir.golden | 1967 +++++----- .../nofib/test/9.6/knights10-4x4.pir.golden | 3072 +++++++-------- .../nofib/test/9.6/queens4-bt.pir.golden | 3366 +++++++++-------- .../nofib/test/9.6/queens5-fc.pir.golden | 3366 +++++++++-------- .../test/9.6/checkScriptContext1.pir.golden | 2663 ++++++------- .../test/9.6/checkScriptContext2.pir.golden | 2617 ++++++------- .../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 | 247 +- .../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 | 518 +-- .../Compiler/Recursion/stupidZero.golden | 245 +- .../PlutusIR/Core/prettyprinting/basic.golden | 2 +- .../PlutusIR/Core/prettyprinting/maybe.golden | 16 +- .../Core/prettyprintingReadable/basic.golden | 2 +- .../errorBinding.golden | 8 +- .../Core/prettyprintingReadable/even3.golden | 28 +- .../prettyprintingReadable/idleAll.golden | 12 +- .../Core/prettyprintingReadable/letDep.golden | 8 +- .../prettyprintingReadable/letInLet.golden | 10 +- .../prettyprintingReadable/listMatch.golden | 21 +- .../Core/prettyprintingReadable/maybe.golden | 10 +- .../mutuallyRecursiveValues.golden | 8 +- .../recursiveTypeBind.golden | 8 +- .../Core/prettyprintingReadable/some.golden | 8 +- .../prettyprintingReadable/stupidZero.golden | 21 +- .../Core/serialization/serializeBasic.golden | 2 +- .../serialization/serializeEvenOdd.golden | 65 +- .../serialization/serializeListMatch.golden | 41 +- .../serializeMaybePirTerm.golden | 16 +- .../test/PlutusIR/Purity/letFun.golden | 4 +- .../test/PlutusIR/Purity/nestedLets1.golden | 10 +- .../test/PlutusIR/Purity/pureLet.golden | 2 +- .../PlutusIR/Transform/Beta/absapp.golden | 5 +- .../PlutusIR/Transform/Beta/lamapp.golden | 5 +- .../PlutusIR/Transform/Beta/lamapp2.golden | 13 +- .../PlutusIR/Transform/Beta/multiapp.golden | 15 +- .../PlutusIR/Transform/Beta/multilet.golden | 25 +- .../Transform/CaseOfCase/basic.golden | 53 +- .../Transform/CaseOfCase/builtinBool.golden | 48 +- .../Transform/CaseOfCase/exponential.golden | 152 +- .../Transform/CaseOfCase/largeExpr.golden | 62 +- .../Transform/CaseOfCase/twoTyArgs.golden | 53 +- .../Transform/DeadCode/builtinBinding.golden | 2 +- .../Transform/DeadCode/datatypeDead.golden | 2 +- .../DeadCode/datatypeLiveConstr.golden | 16 +- .../DeadCode/datatypeLiveDestr.golden | 16 +- .../DeadCode/datatypeLiveType.golden | 10 +- .../DeadCode/etaBuiltinBinding.golden | 2 +- .../Transform/DeadCode/nestedBindings.golden | 11 +- .../DeadCode/nestedBindingsIndirect.golden | 22 +- .../Transform/DeadCode/nonstrictLet.golden | 11 +- .../Transform/DeadCode/pruneDatatype.golden | 14 +- .../DeadCode/recBindingComplex.golden | 13 +- .../DeadCode/recBindingSimple.golden | 2 +- .../Transform/DeadCode/singleBinding.golden | 11 +- .../Transform/DeadCode/strictLet.golden | 23 +- .../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 | 7 +- .../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 | 83 +- .../PlutusIR/Transform/Inline/constant.golden | 2 +- .../Inline/effectfulBuiltinArg.golden | 31 +- .../Inline/firstEffectfulTerm1.golden | 2 +- .../Inline/firstEffectfulTerm2.golden | 11 +- .../Transform/Inline/immediateApp.golden | 2 +- .../Transform/Inline/immediateVar.golden | 2 +- .../Inline/inlineConstantsOff.golden | 7 +- .../Transform/Inline/inlineConstantsOn.golden | 5 +- .../PlutusIR/Transform/Inline/letApp.golden | 2 +- .../Inline/letAppMultiNotAcceptable.golden | 11 +- .../Transform/Inline/letFunConstBool.golden | 16 +- .../Transform/Inline/letFunConstInt.golden | 5 +- .../Transform/Inline/letFunConstMulti.golden | 12 +- .../Transform/Inline/letFunInFun.golden | 2 +- .../Transform/Inline/letFunInFunMulti.golden | 11 +- .../Transform/Inline/letNonPure.golden | 13 +- .../Transform/Inline/letNonPureMulti.golden | 20 +- .../Inline/letNonPureMultiStrict.golden | 13 +- .../Transform/Inline/letOverApp.golden | 5 +- .../Transform/Inline/letOverAppMulti.golden | 28 +- .../Transform/Inline/letOverAppType.golden | 9 +- .../Transform/Inline/letTypeApp.golden | 2 +- .../Transform/Inline/letTypeApp2.golden | 13 +- .../Transform/Inline/letTypeAppMulti.golden | 9 +- .../Inline/letTypeAppMultiNotSat.golden | 9 +- .../Inline/letTypeAppMultiSat.golden | 11 +- .../PlutusIR/Transform/Inline/multilet.golden | 35 +- .../Transform/Inline/nameCapture.golden | 17 +- .../Transform/Inline/partiallyApp.golden | 28 +- .../Transform/Inline/rhs-modified.golden | 15 +- .../PlutusIR/Transform/Inline/single.golden | 22 +- .../Transform/Inline/transitive.golden | 2 +- .../PlutusIR/Transform/Inline/tyvar.golden | 2 +- .../test/PlutusIR/Transform/Inline/var.golden | 2 +- .../Transform/KnownCon/applicative.golden | 155 +- .../PlutusIR/Transform/KnownCon/bool.golden | 16 +- .../PlutusIR/Transform/KnownCon/list.golden | 39 +- .../KnownCon/maybe-just-unsaturated.golden | 32 +- .../Transform/KnownCon/maybe-just.golden | 26 +- .../Transform/KnownCon/maybe-nothing.golden | 16 +- .../PlutusIR/Transform/KnownCon/pair.golden | 33 +- .../avoid-floating-into-lam.golden | 23 +- .../avoid-floating-into-tyabs.golden | 19 +- .../relaxed/avoid-floating-into-RHS.golden | 15 +- ...oid-moving-strict-nonvalue-bindings.golden | 15 +- .../relaxed/cannot-float-into-app.golden | 17 +- .../LetFloatIn/relaxed/datatype1.golden | 26 +- .../LetFloatIn/relaxed/datatype2.golden | 33 +- .../LetFloatIn/relaxed/float-into-RHS.golden | 29 +- .../relaxed/float-into-case-arg.golden | 19 +- .../relaxed/float-into-case-branch.golden | 19 +- .../relaxed/float-into-constr.golden | 17 +- .../relaxed/float-into-fun-and-arg-1.golden | 33 +- .../relaxed/float-into-fun-and-arg-2.golden | 34 +- .../LetFloatIn/relaxed/float-into-lam1.golden | 18 +- .../LetFloatIn/relaxed/float-into-lam2.golden | 28 +- .../relaxed/float-into-tyabs1.golden | 54 +- .../relaxed/float-into-tyabs2.golden | 23 +- .../Transform/LetFloatIn/relaxed/type.golden | 38 +- .../Transform/LetFloatOut/even3Eval.golden | 62 +- .../Transform/LetFloatOut/ifError.golden | 38 +- .../Transform/LetFloatOut/inLam.golden | 18 +- .../Transform/LetFloatOut/letInLet.golden | 13 +- .../Transform/LetFloatOut/listMatch.golden | 56 +- .../Transform/LetFloatOut/maybe.golden | 32 +- .../LetFloatOut/mutuallyRecursiveTypes.golden | 29 +- .../mutuallyRecursiveValues.golden | 15 +- .../Transform/LetFloatOut/nonrec1.golden | 15 +- .../Transform/LetFloatOut/nonrec2.golden | 36 +- .../Transform/LetFloatOut/nonrec3.golden | 18 +- .../Transform/LetFloatOut/nonrec4.golden | 22 +- .../Transform/LetFloatOut/nonrec6.golden | 26 +- .../Transform/LetFloatOut/nonrec7.golden | 27 +- .../Transform/LetFloatOut/nonrec8.golden | 37 +- .../Transform/LetFloatOut/nonrec9.golden | 13 +- .../LetFloatOut/nonrecToNonrec.golden | 13 +- .../Transform/LetFloatOut/nonrecToRec.golden | 15 +- .../Transform/LetFloatOut/oldFloatBug.golden | 13 +- .../Transform/LetFloatOut/oldLength.golden | 25 +- .../Transform/LetFloatOut/outLam.golden | 7 +- .../Transform/LetFloatOut/outRhs.golden | 19 +- .../Transform/LetFloatOut/rec1.golden | 38 +- .../Transform/LetFloatOut/rec2.golden | 54 +- .../Transform/LetFloatOut/rec3.golden | 24 +- .../Transform/LetFloatOut/rec4.golden | 13 +- .../LetFloatOut/rhsSqueezeVsNest.golden | 38 +- .../LetFloatOut/strictNonValue.golden | 15 +- .../LetFloatOut/strictNonValue2.golden | 9 +- .../LetFloatOut/strictNonValue3.golden | 30 +- .../LetFloatOut/strictNonValueDeep.golden | 26 +- .../Transform/LetFloatOut/strictValue.golden | 17 +- .../LetFloatOut/strictValueNonValue.golden | 24 +- .../LetFloatOut/strictValueValue.golden | 17 +- .../Transform/NonStrict/nonStrict1.golden | 11 +- .../PlutusIR/Transform/RecSplit/big.golden | 68 +- .../RecSplit/mutuallyRecursiveTypes.golden | 38 +- .../RecSplit/mutuallyRecursiveValues.golden | 15 +- .../Transform/RecSplit/selfrecursive.golden | 36 +- .../PlutusIR/Transform/RecSplit/small.golden | 26 +- .../Transform/RecSplit/truenonrec.golden | 33 +- .../Rename/allShadowedDataNonRec.golden | 15 +- .../Rename/allShadowedDataRec.golden | 17 +- .../Rename/paramShadowedDataNonRec.golden | 15 +- .../Rename/paramShadowedDataRec.golden | 17 +- .../RewriteRules/divideInt.pir.golden | 8 +- .../RewriteRules/equalsInt.pir.golden | 5 +- .../Transform/RewriteRules/let.pir.golden | 10 +- .../RewriteRules/multiplyInt.pir.golden | 5 +- .../unConstrConstrDataFst.pir.golden | 52 +- .../unConstrConstrDataSnd.pir.golden | 20 +- .../StrictLetRec/strictLetRec.golden | 4 +- .../Transform/StrictifyBindings/conapp.golden | 30 +- .../StrictifyBindings/impure1.golden | 13 +- .../Transform/StrictifyBindings/pure1.golden | 5 +- .../Transform/StrictifyBindings/unused.golden | 7 +- .../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 | 8 +- .../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 | 66 +- .../Machines/Budget/IdNat/3.uplc.golden | 66 +- .../Machines/Budget/IdNat/6.uplc.golden | 66 +- .../Machines/Budget/IdNat/9.uplc.golden | 66 +- .../Machines/Budget/IfThenElse/0.uplc.golden | 66 +- .../Machines/Budget/IfThenElse/1.uplc.golden | 66 +- .../Machines/Budget/IfThenElse/2.uplc.golden | 66 +- .../Machines/Budget/IfThenElse/3.uplc.golden | 66 +- .../Machines/Budget/IfThenElse/4.uplc.golden | 66 +- .../Machines/Budget/IfThenElse/5.uplc.golden | 66 +- .../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 | 20 +- .../test/Transform/cse2.uplc.golden | 2 +- .../test/Transform/cse3.uplc.golden | 10 +- .../test/Transform/cseExpensive.uplc.golden | 810 ++-- .../test/Transform/floatDelay2.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 +- .../9.6/currencySymbolValueOf.pir.golden | 4 +- .../test-plugin/Spec/Budget/9.6/gt.pir.golden | 4 +- .../Budget/9.6/onlyUseFirstField.pir.golden | 4 +- .../Budget/9.6/onlyUseFirstField.uplc.golden | 50 +- .../Budget/9.6/patternMatching.pir.golden | 4 +- .../Budget/9.6/patternMatching.uplc.golden | 116 +- .../Budget/9.6/recordFields-manual.pir.golden | 4 +- .../9.6/recordFields-manual.uplc.golden | 142 +- .../AsData/Budget/9.6/recordFields.pir.golden | 4 +- .../Budget/9.6/recordFields.uplc.golden | 112 +- .../test/Budget/9.6/allCheap.pir.golden | 4 +- .../test/Budget/9.6/allCheap.uplc.golden | 76 +- .../test/Budget/9.6/allEmptyList.pir.golden | 4 +- .../test/Budget/9.6/allEmptyList.uplc.golden | 32 +- .../test/Budget/9.6/allExpensive.pir.golden | 4 +- .../test/Budget/9.6/allExpensive.uplc.golden | 76 +- .../test/Budget/9.6/andCheap.pir.golden | 4 +- .../test/Budget/9.6/andCheap.uplc.golden | 70 +- .../test/Budget/9.6/andExpensive.pir.golden | 4 +- .../test/Budget/9.6/andExpensive.uplc.golden | 70 +- .../test/Budget/9.6/andWithGHCOpts.pir.golden | 28 +- .../Budget/9.6/andWithGHCOpts.uplc.golden | 28 +- .../test/Budget/9.6/andWithLocal.pir.golden | 34 +- .../test/Budget/9.6/andWithLocal.uplc.golden | 30 +- .../Budget/9.6/andWithoutGHCOpts.pir.golden | 170 +- .../Budget/9.6/andWithoutGHCOpts.uplc.golden | 28 +- .../test/Budget/9.6/anyCheap.pir.golden | 4 +- .../test/Budget/9.6/anyCheap.uplc.golden | 76 +- .../test/Budget/9.6/anyEmptyList.pir.golden | 4 +- .../test/Budget/9.6/anyEmptyList.uplc.golden | 32 +- .../test/Budget/9.6/anyExpensive.pir.golden | 4 +- .../test/Budget/9.6/anyExpensive.uplc.golden | 76 +- .../test/Budget/9.6/applicative.pir.golden | 4 +- .../test/Budget/9.6/applicative.uplc.golden | 2 +- .../Budget/9.6/builtinListIndexing.pir.golden | 4 +- .../9.6/builtinListIndexing.uplc.golden | 40 +- .../test/Budget/9.6/constAccL.pir.golden | 4 +- .../test/Budget/9.6/constAccL.uplc.golden | 34 +- .../test/Budget/9.6/constAccR.pir.golden | 4 +- .../test/Budget/9.6/constAccR.uplc.golden | 28 +- .../test/Budget/9.6/constElL.pir.golden | 4 +- .../test/Budget/9.6/constElL.uplc.golden | 34 +- .../test/Budget/9.6/constElR.pir.golden | 4 +- .../test/Budget/9.6/constElR.uplc.golden | 30 +- .../test/Budget/9.6/elemCheap.pir.golden | 4 +- .../test/Budget/9.6/elemCheap.uplc.golden | 76 +- .../test/Budget/9.6/elemExpensive.pir.golden | 4 +- .../test/Budget/9.6/elemExpensive.uplc.golden | 76 +- .../test/Budget/9.6/filter.pir.golden | 4 +- .../test/Budget/9.6/filter.uplc.golden | 80 +- .../test/Budget/9.6/findCheap.pir.golden | 4 +- .../test/Budget/9.6/findCheap.uplc.golden | 76 +- .../test/Budget/9.6/findEmptyList.pir.golden | 4 +- .../test/Budget/9.6/findEmptyList.uplc.golden | 32 +- .../test/Budget/9.6/findExpensive.pir.golden | 4 +- .../test/Budget/9.6/findExpensive.uplc.golden | 76 +- .../test/Budget/9.6/findIndexCheap.pir.golden | 4 +- .../Budget/9.6/findIndexCheap.uplc.golden | 78 +- .../Budget/9.6/findIndexEmptyList.pir.golden | 4 +- .../Budget/9.6/findIndexEmptyList.uplc.golden | 34 +- .../Budget/9.6/findIndexExpensive.pir.golden | 4 +- .../Budget/9.6/findIndexExpensive.uplc.golden | 78 +- .../test/Budget/9.6/gte0.pir.golden | 4 +- .../test/Budget/9.6/gte0.uplc.golden | 50 +- .../test/Budget/9.6/ifThenElse1.pir.golden | 4 +- .../test/Budget/9.6/ifThenElse1.uplc.golden | 2 +- .../test/Budget/9.6/ifThenElse2.pir.golden | 4 +- .../test/Budget/9.6/ifThenElse2.uplc.golden | 2 +- .../test/Budget/9.6/listIndexing.pir.golden | 4 +- .../test/Budget/9.6/listIndexing.uplc.golden | 38 +- .../test/Budget/9.6/lte0.pir.golden | 4 +- .../test/Budget/9.6/lte0.uplc.golden | 50 +- .../test/Budget/9.6/map1.pir.golden | 4 +- .../test/Budget/9.6/map1.uplc.golden | 822 ++-- .../test/Budget/9.6/map2.pir.golden | 4 +- .../test/Budget/9.6/map2.uplc.golden | 537 +-- .../test/Budget/9.6/map3.pir.golden | 4 +- .../test/Budget/9.6/map3.uplc.golden | 537 +-- .../test/Budget/9.6/monadicDo.pir.golden | 4 +- .../test/Budget/9.6/monadicDo.uplc.golden | 20 +- .../test/Budget/9.6/not-not.pir.golden | 36 +- .../test/Budget/9.6/not-not.uplc.golden | 24 +- .../test/Budget/9.6/notElemCheap.pir.golden | 4 +- .../test/Budget/9.6/notElemCheap.uplc.golden | 76 +- .../Budget/9.6/notElemExpensive.pir.golden | 4 +- .../Budget/9.6/notElemExpensive.uplc.golden | 76 +- .../test/Budget/9.6/null.pir.golden | 4 +- .../test/Budget/9.6/null.uplc.golden | 2 +- .../test/Budget/9.6/orCheap.pir.golden | 4 +- .../test/Budget/9.6/orCheap.uplc.golden | 70 +- .../test/Budget/9.6/orExpensive.pir.golden | 4 +- .../test/Budget/9.6/orExpensive.uplc.golden | 70 +- .../test/Budget/9.6/patternMatch.pir.golden | 4 +- .../test/Budget/9.6/patternMatch.uplc.golden | 2 +- .../test/Budget/9.6/recursiveGte0.pir.golden | 4 +- .../test/Budget/9.6/recursiveGte0.uplc.golden | 85 +- .../test/Budget/9.6/recursiveLte0.pir.golden | 4 +- .../test/Budget/9.6/recursiveLte0.uplc.golden | 85 +- .../test/Budget/9.6/show.pir.golden | 4 +- .../test/Budget/9.6/show.uplc.golden | 845 +++-- .../test/Budget/9.6/sum.pir.golden | 4 +- .../test/Budget/9.6/sum.uplc.golden | 70 +- .../test/Budget/9.6/sumL.pir.golden | 4 +- .../test/Budget/9.6/sumL.uplc.golden | 54 +- .../test/Budget/9.6/sumR.pir.golden | 4 +- .../test/Budget/9.6/sumR.uplc.golden | 38 +- .../test/Budget/9.6/toFromData.pir.golden | 4 +- .../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/dataToData.pir.golden | 4 +- .../IsData/9.6/deconstructData.pir.golden | 4 +- .../test/IsData/9.6/equalityAsData.pir.golden | 4 +- .../test/IsData/9.6/fieldAccessor.pir.golden | 4 +- .../test/IsData/9.6/int.eval.golden | 2 +- .../test/IsData/9.6/list.eval.golden | 2 +- .../test/IsData/9.6/matchAsData.pir.golden | 4 +- .../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/recordAsData.pir.golden | 4 +- .../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 +- .../9.6/unsafeDeconstructData.pir.golden | 4 +- .../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 | 142 +- .../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/matchAsData.pir.golden | 4 +- .../Optimization/9.6/maybeFun.uplc.golden | 40 +- .../9.6/unsafeDeconstructData.pir.golden | 4 +- .../9.6/defaultCaseDuplication.pir.golden | 51 +- .../defaultCaseDuplicationNested.pir.golden | 88 +- .../test/Plugin/Basic/9.6/ifOpt.pir.golden | 114 +- .../test/Plugin/Basic/9.6/letFun.pir.golden | 88 +- .../Plugin/Basic/9.6/monadicDo.pir.golden | 176 +- .../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 | 71 +- .../Basic/9.6/patternMatchDo.pir.golden | 216 +- .../Plugin/Basic/9.6/strictLet.pir.golden | 71 +- .../Plugin/Basic/9.6/strictLetRec.pir.golden | 89 +- .../Basic/9.6/strictMultiLet.pir.golden | 73 +- .../Coverage/9.6/coverageCode.pir.golden | 705 +--- .../Data/9.6/families/associated.pir.golden | 2 +- .../9.6/families/associatedParam.pir.golden | 51 +- .../Data/9.6/families/basicClosed.pir.golden | 2 +- .../Data/9.6/families/basicData.pir.golden | 35 +- .../Data/9.6/families/basicOpen.pir.golden | 2 +- .../Data/9.6/monomorphic/atPattern.pir.golden | 66 +- .../9.6/monomorphic/defaultCase.pir.golden | 56 +- .../Data/9.6/monomorphic/enum.pir.golden | 21 +- .../monomorphic/irrefutableMatch.pir.golden | 75 +- .../Data/9.6/monomorphic/monoCase.pir.golden | 50 +- .../9.6/monomorphic/monoCaseStrict.pir.golden | 50 +- .../9.6/monomorphic/monoConstDest.eval.golden | 2 +- .../monoConstDestDefault.eval.golden | 2 +- .../monomorphic/monoConstructed.pir.golden | 39 +- .../monomorphic/monoConstructor.pir.golden | 55 +- .../9.6/monomorphic/monoDataType.pir.golden | 56 +- .../9.6/monomorphic/monoRecord.pir.golden | 30 +- .../9.6/monomorphic/nonValueCase.pir.golden | 66 +- .../9.6/monomorphic/recordNewtype.pir.golden | 27 +- .../recordWithStrictField.pir.golden | 58 +- .../monomorphic/strictDataMatch.pir.golden | 56 +- .../Data/9.6/monomorphic/synonym.pir.golden | 2 +- .../9.6/monomorphic/unusedWrapper.pir.golden | 66 +- .../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 | 39 +- .../polymorphic/defaultCasePoly.pir.golden | 53 +- .../polymorphic/polyConstructed.pir.golden | 68 +- .../9.6/polymorphic/polyDataType.pir.golden | 53 +- .../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 | 45 +- .../9.6/recursive/polyRecEval.eval.golden | 2 +- .../processInterListEval.eval.golden | 2 +- .../9.6/recursive/ptreeConstDest.eval.golden | 2 +- .../9.6/recursive/ptreeConstruct.pir.golden | 131 +- .../9.6/recursive/ptreeFirstEval.eval.golden | 2 +- .../Data/9.6/recursive/ptreeMatch.pir.golden | 59 +- .../9.6/recursive/sameEmptyRose.uplc.golden | 798 +--- .../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 | 185 +- .../Functions/9.6/recursive/even3.eval.golden | 2 +- .../Functions/9.6/recursive/even4.eval.golden | 2 +- .../Functions/9.6/recursive/fib.pir.golden | 214 +- .../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 | 96 +- .../9.6/recursive/sumList.eval.golden | 2 +- .../9.6/unfoldings/allDirect.pir.golden | 333 +- .../9.6/unfoldings/andDirect.pir.golden | 118 +- .../9.6/unfoldings/andExternal.pir.golden | 66 +- .../unfoldings/applicationFunction.pir.golden | 91 +- .../mutualRecursionUnfoldings.pir.golden | 138 +- .../9.6/unfoldings/nandDirect.pir.golden | 85 +- .../9.6/unfoldings/polyMap.pir.golden | 206 +- .../9.6/unfoldings/recordSelector.pir.golden | 44 +- .../recordSelectorExternal.pir.golden | 47 +- .../9.6/unfoldings/unboxedTuples2.pir.golden | 91 +- .../unboxedTuples2Tuples.pir.golden | 401 +- .../9.6/unfoldings/unboxedTuples3.pir.golden | 120 +- .../unboxedTuples3Tuples.pir.golden | 499 +-- .../9.6/unfoldings/unboxedTuples4.pir.golden | 158 +- .../9.6/unfoldings/unboxedTuples5.pir.golden | 204 +- .../Plugin/Laziness/9.6/joinError.pir.golden | 98 +- .../Laziness/9.6/joinErrorEval.eval.golden | 2 +- .../Laziness/9.6/lazyDepUnit.pir.golden | 30 +- .../Optimization/9.6/alwaysFails.uplc.golden | 2 +- .../9.6/alwaysSucceeds.uplc.golden | 2 +- .../test/Plugin/Patterns/9.6/psym1.pir.golden | 4 +- .../Plugin/Patterns/9.6/psymRec.pir.golden | 4 +- .../test/Plugin/Primitives/9.6/and.pir.golden | 59 +- .../Primitives/9.6/andApply.eval.golden | 2 +- .../Plugin/Primitives/9.6/bool.pir.golden | 21 +- .../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 | 39 +- .../9.6/deconstructorData2.pir.golden | 613 +-- .../Primitives/9.6/emptyByteString.pir.golden | 2 +- .../9.6/emptyByteStringApply.eval.golden | 2 +- .../Primitives/9.6/encodeUtf8.pir.golden | 22 +- .../9.6/equalsByteString.eval.golden | 2 +- .../Primitives/9.6/equalsString.eval.golden | 2 +- .../Plugin/Primitives/9.6/error.pir.golden | 26 +- .../Primitives/9.6/ifThenElse.pir.golden | 109 +- .../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 | 90 +- .../Plugin/Primitives/9.6/intDiv.pir.golden | 67 +- .../Plugin/Primitives/9.6/intEq.pir.golden | 88 +- .../Primitives/9.6/intEqApply.eval.golden | 2 +- .../Plugin/Primitives/9.6/intPlus.pir.golden | 63 +- .../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 | 22 +- .../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 | 35 +- .../Primitives/9.6/traceComplex.pir.golden | 98 +- .../Plugin/Primitives/9.6/tuple.pir.golden | 23 +- .../Primitives/9.6/tupleConstDest.eval.golden | 2 +- .../Primitives/9.6/tupleMatch.pir.golden | 35 +- .../Plugin/Primitives/9.6/verify.pir.golden | 132 +- .../Plugin/Primitives/9.6/void.pir.golden | 133 +- .../Plugin/Profiling/9.6/addInt.pir.golden | 117 +- .../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 | 345 +- .../Plugin/Profiling/9.6/fib4.eval.golden | 148 +- .../test/Plugin/Profiling/9.6/id.eval.golden | 2 +- .../Plugin/Profiling/9.6/idCode.pir.golden | 44 +- .../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 +- .../Plugin/Strict/9.6/issue4645.pir.golden | 4 +- .../Plugin/Strict/9.6/strictAdd.pir.golden | 2 +- .../Plugin/Strict/9.6/strictAppend.pir.golden | 2 +- .../Strict/9.6/strictAppend2.pir.golden | 2 +- .../Strict/9.6/strictAppendString.pir.golden | 2 +- .../Plugin/Strict/9.6/strictData.pir.golden | 2 +- .../Plugin/Strict/9.6/strictITE.pir.golden | 2 +- .../Plugin/Strict/9.6/strictList.pir.golden | 2 +- .../Plugin/Strict/9.6/strictPair.pir.golden | 2 +- .../Typeclasses/9.6/compareTest.pir.golden | 656 +--- .../Typeclasses/9.6/concatTest.pir.golden | 451 +-- .../Typeclasses/9.6/defaultMethods.pir.golden | 143 +- .../9.6/fmapDefaultTest.pir.golden | 1091 +----- .../Typeclasses/9.6/multiFunction.pir.golden | 296 +- .../9.6/partialApplication.pir.golden | 146 +- .../Typeclasses/9.6/sequenceTest.pir.golden | 1171 ++---- .../Typeclasses/9.6/sizedBasic.pir.golden | 50 +- .../Typeclasses/9.6/sizedPair.pir.golden | 211 +- .../Plugin/Typeclasses/9.6/sumTest.pir.golden | 416 +- .../test/StdLib/9.6/errorTrace.pir.golden | 55 +- .../test/StdLib/9.6/ratioInterop.eval.golden | 1 - .../Strictness/9.6/lambda-default.pir.golden | 2 +- .../Strictness/9.6/lambda-default.uplc.golden | 2 +- .../9.6/lambda-nonstrict.pir.golden | 2 +- .../9.6/lambda-nonstrict.uplc.golden | 2 +- .../Strictness/9.6/lambda-strict.pir.golden | 2 +- .../Strictness/9.6/lambda-strict.uplc.golden | 2 +- .../Strictness/9.6/let-default.pir.golden | 4 +- .../Strictness/9.6/let-default.uplc.golden | 16 +- .../Strictness/9.6/let-nonstrict.pir.golden | 4 +- .../Strictness/9.6/let-nonstrict.uplc.golden | 16 +- .../test/Strictness/9.6/let-strict.pir.golden | 4 +- .../Strictness/9.6/let-strict.uplc.golden | 16 +- 633 files changed, 18375 insertions(+), 29338 deletions(-) delete mode 100644 plutus-tx-plugin/test/StdLib/9.6/ratioInterop.eval.golden diff --git a/plutus-benchmark/nofib/test/9.6/clausify-F5.pir.golden b/plutus-benchmark/nofib/test/9.6/clausify-F5.pir.golden index ace6142f92a..4ab0286d080 100644 --- a/plutus-benchmark/nofib/test/9.6/clausify-F5.pir.golden +++ b/plutus-benchmark/nofib/test/9.6/clausify-F5.pir.golden @@ -1,990 +1,1001 @@ -(let - data Unit | Unit_match where - Unit : Unit - data (Tuple2 :: * -> * -> *) a b | Tuple2_match where - Tuple2 : a -> b -> Tuple2 a b - in - letrec - data (List :: * -> *) a | List_match where - Nil : List a - Cons : a -> List a -> List a - in - let - !fail : unit -> Tuple2 (List integer) (List integer) - = \(ds : unit) -> - Unit_match - (error {Unit}) - {Tuple2 (List integer) (List integer)} - (error {Tuple2 (List integer) (List integer)}) - ~defaultBody : Tuple2 (List integer) (List integer) = fail () - ~defaultBody : Tuple2 (List integer) (List integer) = fail () - data Ordering | Ordering_match where - EQ : Ordering - GT : Ordering - LT : Ordering - data Bool | Bool_match where - True : Bool - False : Bool - 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 - !equalsInteger : integer -> integer -> Bool - = \(x : integer) (y : integer) -> - ifThenElse {Bool} (equalsInteger x y) True False - !`$fOrdInteger` : Ord integer - = CConsOrd - {integer} - equalsInteger - (\(eta : integer) (eta : integer) -> - ifThenElse - {all dead. Ordering} - (equalsInteger eta eta) - (/\dead -> EQ) - (/\dead -> - ifThenElse - {all dead. Ordering} - (lessThanEqualsInteger eta eta) - (/\dead -> LT) - (/\dead -> GT) - {all dead. dead}) - {all dead. dead}) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) True False) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanEqualsInteger x y) True False) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanEqualsInteger x y) False True) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) False True) - (\(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (lessThanEqualsInteger x y) - (/\dead -> y) - (/\dead -> x) - {all dead. dead}) - (\(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (lessThanEqualsInteger x y) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}) - in - letrec - data Formula | Formula_match where - Con : Formula -> Formula -> Formula - Dis : Formula -> Formula -> Formula - Eqv : Formula -> Formula -> Formula - Imp : Formula -> Formula -> Formula - Not : Formula -> Formula - Sym : integer -> Formula - in - letrec - !insert : all t. Ord t -> t -> List t -> List t - = /\t -> - \(`$dOrd` : Ord t) (x : t) (ds : List t) -> - List_match - {t} - ds - {all dead. List t} - (/\dead -> - (let - a = List t - in - \(c : t -> a -> a) (n : a) -> c x n) - (\(ds : t) (ds : List t) -> Cons {t} ds ds) - (Nil {t})) - (\(y : t) (ys : List t) -> - /\dead -> - Bool_match - (Ord_match - {t} - `$dOrd` - {t -> t -> Bool} - (\(v : (\a -> a -> a -> Bool) t) - (v : t -> t -> Ordering) - (v : t -> t -> Bool) - (v : t -> t -> Bool) - (v : t -> t -> Bool) - (v : t -> t -> Bool) - (v : t -> t -> t) - (v : t -> t -> t) -> - v) - x - y) - {all dead. List t} - (/\dead -> Cons {t} x ds) - (/\dead -> - Bool_match - (Ord_match - {t} - `$dOrd` - {t -> t -> Bool} - (\(v : (\a -> a -> a -> Bool) t) - (v : t -> t -> Ordering) - (v : t -> t -> Bool) - (v : t -> t -> Bool) - (v : t -> t -> Bool) - (v : t -> t -> Bool) - (v : t -> t -> t) - (v : t -> t -> t) -> - v) - x - y) - {all dead. List t} - (/\dead -> Cons {t} y (insert {t} `$dOrd` x ys)) - (/\dead -> ds) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - in - letrec - !clause' : - Formula -> - Tuple2 (List integer) (List integer) -> - Tuple2 (List integer) (List integer) - = \(ds : Formula) (x : Tuple2 (List integer) (List integer)) -> - Formula_match - ds - {Tuple2 (List integer) (List integer)} - (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) - (\(p : Formula) (q : Formula) -> clause' p (clause' q x)) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) - (\(ds : Formula) -> - Formula_match - ds - {Tuple2 (List integer) (List integer)} - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) -> defaultBody) - (\(s : integer) -> - Tuple2_match - {List integer} - {List integer} - x - {Tuple2 (List integer) (List integer)} - (\(c : List integer) (a : List integer) -> - Tuple2 - {List integer} - {List integer} - c - (insert {integer} `$fOrdInteger` s a)))) - (\(s : integer) -> - Tuple2_match - {List integer} - {List integer} - x - {Tuple2 (List integer) (List integer)} - (\(c : List integer) (a : List integer) -> - Tuple2 - {List integer} - {List integer} - (insert {integer} `$fOrdInteger` s c) - a)) - in - let - !`$p1Ord` : all a. Ord a -> (\a -> a -> a -> Bool) a - = /\a -> - \(v : Ord a) -> - Ord_match - {a} - v - {(\a -> a -> a -> Bool) a} - (\(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) - !compare : all a. Ord a -> a -> a -> Ordering - = /\a -> - \(v : Ord a) -> - Ord_match - {a} - v - {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) - in - letrec - !`$fOrdList_$ccompare` : all a. Ord a -> List a -> List a -> Ordering - = /\a -> - \(`$dOrd` : Ord a) (ds : List a) (ds : List a) -> - List_match - {a} - ds - {all dead. Ordering} - (/\dead -> - List_match - {a} - ds - {all dead. Ordering} - (/\dead -> EQ) - (\(ds : a) (ds : List a) -> /\dead -> LT) - {all dead. dead}) - (\(ds : a) (ds : List a) -> - /\dead -> - List_match - {a} - ds +((let + data Unit | Unit_match where + Unit : Unit + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + !fail : unit -> Tuple2 (List integer) (List integer) + = \(ds : unit) -> + Unit_match + (error {Unit}) + {Tuple2 (List integer) (List integer)} + (error {Tuple2 (List integer) (List integer)}) + ~defaultBody : Tuple2 (List integer) (List integer) = fail () + ~defaultBody : Tuple2 (List integer) (List integer) = fail () + data Ordering | Ordering_match where + EQ : Ordering + GT : Ordering + LT : Ordering + data Bool | Bool_match where + True : Bool + False : Bool + 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 + !equalsInteger : integer -> integer -> Bool + = \(x : integer) (y : integer) -> + ifThenElse {Bool} (equalsInteger x y) True False + !`$fOrdInteger` : Ord integer + = CConsOrd + {integer} + equalsInteger + (\(eta : integer) (eta : integer) -> + ifThenElse + {all dead. Ordering} + (equalsInteger eta eta) + (/\dead -> EQ) + (/\dead -> + ifThenElse {all dead. Ordering} + (lessThanEqualsInteger eta eta) + (/\dead -> LT) (/\dead -> GT) - (\(y : a) -> - let - ~defaultBody : Ordering = compare {a} `$dOrd` ds y - in - \(ys : List a) -> - /\dead -> - Ordering_match - (compare {a} `$dOrd` ds y) - {all dead. Ordering} - (/\dead -> - `$fOrdList_$ccompare` {a} `$dOrd` ds ys) - (/\dead -> defaultBody) - (/\dead -> defaultBody) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - in - letrec - !`$fEqList_$c==` : - all a. (\a -> a -> a -> Bool) a -> List a -> List a -> Bool - = /\a -> - \(`$dEq` : (\a -> a -> a -> Bool) a) (eta : List a) (eta : List a) -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> True) - (\(ipv : a) (ipv : List a) -> /\dead -> False) - {all dead. dead}) - (\(x : a) (xs : List a) -> - /\dead -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> False) - (\(y : a) (ys : List a) -> - /\dead -> - Bool_match - (`$dEq` x y) - {all dead. Bool} - (/\dead -> `$fEqList_$c==` {a} `$dEq` xs ys) - (/\dead -> False) - {all dead. dead}) {all dead. dead}) - {all dead. dead} - in - let - ~`$dOrd` : Ord (List integer) - = CConsOrd - {List integer} - (\(eta : List integer) (eta : List integer) -> - `$fEqList_$c==` - {integer} - (`$p1Ord` {integer} `$fOrdInteger`) - eta - eta) - (`$fOrdList_$ccompare` {integer} `$fOrdInteger`) - (\(x : List integer) (y : List integer) -> - Ordering_match - (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) - {all dead. Bool} - (/\dead -> False) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (\(x : List integer) (y : List integer) -> - Ordering_match - (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) - {all dead. Bool} - (/\dead -> True) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (\(x : List integer) (y : List integer) -> - Ordering_match - (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}) - (\(x : List integer) (y : List integer) -> - Ordering_match - (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) - {all dead. Bool} - (/\dead -> True) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}) - (\(x : List integer) (y : List integer) -> - Ordering_match - (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) - {all dead. List integer} - (/\dead -> y) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}) - (\(x : List integer) (y : List integer) -> - Ordering_match - (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) - {all dead. List integer} - (/\dead -> x) - (/\dead -> y) - (/\dead -> x) - {all dead. dead}) - in - letrec - !go : List Formula -> List (Tuple2 (List integer) (List integer)) - = \(ds : List Formula) -> - List_match - {Formula} - ds - {all dead. List (Tuple2 (List integer) (List integer))} - (/\dead -> Nil {Tuple2 (List integer) (List integer)}) - (\(x : Formula) (xs : List Formula) -> - /\dead -> - let - !x : List (Tuple2 (List integer) (List integer)) = go xs - !cp : Tuple2 (List integer) (List integer) - = clause' + {all dead. dead}) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) True False) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanEqualsInteger x y) True False) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanEqualsInteger x y) False True) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) False True) + (\(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (lessThanEqualsInteger x y) + (/\dead -> y) + (/\dead -> x) + {all dead. dead}) + (\(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (lessThanEqualsInteger x y) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}) + in + letrec + data Formula | Formula_match where + Con : Formula -> Formula -> Formula + Dis : Formula -> Formula -> Formula + Eqv : Formula -> Formula -> Formula + Imp : Formula -> Formula -> Formula + Not : Formula -> Formula + Sym : integer -> Formula + in + letrec + !insert : all t. Ord t -> t -> List t -> List t + = /\t -> + \(`$dOrd` : Ord t) (x : t) (ds : List t) -> + List_match + {t} + ds + {all dead. List t} + (/\dead -> + (let + a = List t + in + \(c : t -> a -> a) (n : a) -> c x n) + (\(ds : t) (ds : List t) -> Cons {t} ds ds) + (Nil {t})) + (\(y : t) (ys : List t) -> + /\dead -> + Bool_match + (Ord_match + {t} + `$dOrd` + {t -> t -> Bool} + (\(v : (\a -> a -> a -> Bool) t) + (v : t -> t -> Ordering) + (v : t -> t -> Bool) + (v : t -> t -> Bool) + (v : t -> t -> Bool) + (v : t -> t -> Bool) + (v : t -> t -> t) + (v : t -> t -> t) -> + v) x - (Tuple2 + y) + {all dead. List t} + (/\dead -> Cons {t} x ds) + (/\dead -> + Bool_match + (Ord_match + {t} + `$dOrd` + {t -> t -> Bool} + (\(v : (\a -> a -> a -> Bool) t) + (v : t -> t -> Ordering) + (v : t -> t -> Bool) + (v : t -> t -> Bool) + (v : t -> t -> Bool) + (v : t -> t -> Bool) + (v : t -> t -> t) + (v : t -> t -> t) -> + v) + x + y) + {all dead. List t} + (/\dead -> Cons {t} y (insert {t} `$dOrd` x ys)) + (/\dead -> ds) + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + in + letrec + !clause' : + Formula -> + Tuple2 (List integer) (List integer) -> + Tuple2 (List integer) (List integer) + = \(ds : Formula) (x : Tuple2 (List integer) (List integer)) -> + Formula_match + ds + {Tuple2 (List integer) (List integer)} + (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) + (\(p : Formula) (q : Formula) -> clause' p (clause' q x)) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) + (\(ds : Formula) -> + Formula_match + ds + {Tuple2 (List integer) (List integer)} + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) -> defaultBody) + (\(s : integer) -> + Tuple2_match + {List integer} + {List integer} + x + {Tuple2 (List integer) (List integer)} + (\(c : List integer) (a : List integer) -> + Tuple2 {List integer} {List integer} - (Nil {integer}) - (Nil {integer})) - in - Tuple2_match - {List integer} - {List integer} - cp - {all dead. List (Tuple2 (List integer) (List integer))} - (\(c : List integer) (a : List integer) -> - Bool_match - (let - !x : List integer - = (let - a = List integer - in - \(c : integer -> a -> a) (n : a) -> - letrec - !go : List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) -> - letrec - !go : List integer -> Bool - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> False) - (\(x : integer) - (xs : - List integer) -> - /\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger - y - x) - (/\dead -> True) - (/\dead -> - go xs) - {all dead. - dead}) - {all dead. dead} - in - \(ys : List integer) -> - /\dead -> - let - !ds : a = go ys - in - Bool_match - (go a) - {all dead. a} - (/\dead -> c y ds) - (/\dead -> ds) - {all dead. dead}) - {all dead. dead} - in - go c) - (\(ds : integer) (ds : List integer) -> - Cons {integer} ds ds) - (Nil {integer}) - in - Bool_match - (`$fEqList_$c==` - {integer} - equalsInteger - x + c + (insert {integer} `$fOrdInteger` s a)))) + (\(s : integer) -> + Tuple2_match + {List integer} + {List integer} + x + {Tuple2 (List integer) (List integer)} + (\(c : List integer) (a : List integer) -> + Tuple2 + {List integer} + {List integer} + (insert {integer} `$fOrdInteger` s c) + a)) + in + let + !`$p1Ord` : all a. Ord a -> (\a -> a -> a -> Bool) a + = /\a -> + \(v : Ord a) -> + Ord_match + {a} + v + {(\a -> a -> a -> Bool) a} + (\(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) + !compare : all a. Ord a -> a -> a -> Ordering + = /\a -> + \(v : Ord a) -> + Ord_match + {a} + v + {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) + in + letrec + !`$fOrdList_$ccompare` : all a. Ord a -> List a -> List a -> Ordering + = /\a -> + \(`$dOrd` : Ord a) (ds : List a) (ds : List a) -> + List_match + {a} + ds + {all dead. Ordering} + (/\dead -> + List_match + {a} + ds + {all dead. Ordering} + (/\dead -> EQ) + (\(ds : a) (ds : List a) -> /\dead -> LT) + {all dead. dead}) + (\(ds : a) (ds : List a) -> + /\dead -> + List_match + {a} + ds + {all dead. Ordering} + (/\dead -> GT) + (\(y : a) -> + let + ~defaultBody : Ordering = compare {a} `$dOrd` ds y + in + \(ys : List a) -> + /\dead -> + Ordering_match + (compare {a} `$dOrd` ds y) + {all dead. Ordering} + (/\dead -> + `$fOrdList_$ccompare` {a} `$dOrd` ds ys) + (/\dead -> defaultBody) + (/\dead -> defaultBody) + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + in + letrec + !`$fEqList_$c==` : + all a. (\a -> a -> a -> Bool) a -> List a -> List a -> Bool + = /\a -> + \(`$dEq` : (\a -> a -> a -> Bool) a) (eta : List a) (eta : List a) -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> True) + (\(ipv : a) (ipv : List a) -> /\dead -> False) + {all dead. dead}) + (\(x : a) (xs : List a) -> + /\dead -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> False) + (\(y : a) (ys : List a) -> + /\dead -> + Bool_match + (`$dEq` x y) + {all dead. Bool} + (/\dead -> `$fEqList_$c==` {a} `$dEq` xs ys) + (/\dead -> False) + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + in + let + ~`$dOrd` : Ord (List integer) + = CConsOrd + {List integer} + (\(eta : List integer) (eta : List integer) -> + `$fEqList_$c==` + {integer} + (`$p1Ord` {integer} `$fOrdInteger`) + eta + eta) + (`$fOrdList_$ccompare` {integer} `$fOrdInteger`) + (\(x : List integer) (y : List integer) -> + Ordering_match + (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) + {all dead. Bool} + (/\dead -> False) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (\(x : List integer) (y : List integer) -> + Ordering_match + (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) + {all dead. Bool} + (/\dead -> True) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (\(x : List integer) (y : List integer) -> + Ordering_match + (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (\(x : List integer) (y : List integer) -> + Ordering_match + (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) + {all dead. Bool} + (/\dead -> True) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (\(x : List integer) (y : List integer) -> + Ordering_match + (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) + {all dead. List integer} + (/\dead -> y) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}) + (\(x : List integer) (y : List integer) -> + Ordering_match + (`$fOrdList_$ccompare` {integer} `$fOrdInteger` x y) + {all dead. List integer} + (/\dead -> x) + (/\dead -> y) + (/\dead -> x) + {all dead. dead}) + in + letrec + !go : List Formula -> List (Tuple2 (List integer) (List integer)) + = \(ds : List Formula) -> + List_match + {Formula} + ds + {all dead. List (Tuple2 (List integer) (List integer))} + (/\dead -> Nil {Tuple2 (List integer) (List integer)}) + (\(x : Formula) (xs : List Formula) -> + /\dead -> + let + !x : List (Tuple2 (List integer) (List integer)) = go xs + !cp : Tuple2 (List integer) (List integer) + = clause' + x + (Tuple2 + {List integer} + {List integer} + (Nil {integer}) (Nil {integer})) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - {all dead. List (Tuple2 (List integer) (List integer))} - (/\dead -> x) - (/\dead -> - insert - {Tuple2 (List integer) (List integer)} - ((let - a = List integer - in - /\b -> - \(v : Ord a) (v : Ord b) -> - CConsOrd - {Tuple2 a b} - (\(eta : Tuple2 a b) (eta : Tuple2 a b) -> - Tuple2_match - {a} - {b} - eta - {Bool} - (\(a : a) (b : b) -> - Tuple2_match - {a} - {b} - eta - {Bool} - (\(a' : a) (b' : b) -> - Bool_match - (`$p1Ord` {a} v a a') - {all dead. Bool} - (/\dead -> - `$p1Ord` {b} v b b') - (/\dead -> False) - {all dead. dead}))) - (\(ds : Tuple2 a b) (ds : Tuple2 a b) -> - Tuple2_match - {a} - {b} - ds - {Ordering} - (\(a : a) (b : b) -> - Tuple2_match - {a} - {b} - ds - {Ordering} - (\(a' : a) -> - let - ~defaultBody : Ordering - = compare {a} v a a' - in - \(b' : b) -> - Ordering_match - (compare {a} v a a') - {all dead. Ordering} - (/\dead -> - compare {b} v b b') - (/\dead -> defaultBody) - (/\dead -> defaultBody) - {all dead. dead}))) - (\(x : Tuple2 a b) (y : Tuple2 a b) -> - Tuple2_match - {a} - {b} - x - {Bool} - (\(ipv : a) (ipv : b) -> - Tuple2_match - {a} - {b} - y - {Bool} - (\(ipv : a) (ipv : b) -> - Ordering_match - (compare {a} v ipv ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {b} - v - ipv - ipv) + in + Tuple2_match + {List integer} + {List integer} + cp + {all dead. List (Tuple2 (List integer) (List integer))} + (\(c : List integer) (a : List integer) -> + Bool_match + (let + !x : List integer + = (let + a = List integer + in + \(c : integer -> a -> a) (n : a) -> + letrec + !go : List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) -> + letrec + !go : List integer -> Bool + = \(ds : List integer) -> + List_match + {integer} + ds {all dead. Bool} (/\dead -> False) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}))) - (\(x : Tuple2 a b) (y : Tuple2 a b) -> - Tuple2_match - {a} - {b} - x - {Bool} - (\(ipv : a) (ipv : b) -> - Tuple2_match - {a} - {b} - y - {Bool} - (\(ipv : a) (ipv : b) -> - Ordering_match - (compare {a} v ipv ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {b} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> True) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}))) - (\(x : Tuple2 a b) (y : Tuple2 a b) -> - Tuple2_match - {a} - {b} - x - {Bool} - (\(ipv : a) (ipv : b) -> - Tuple2_match - {a} - {b} - y - {Bool} - (\(ipv : a) (ipv : b) -> - Ordering_match - (compare {a} v ipv ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {b} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}))) - (\(x : Tuple2 a b) (y : Tuple2 a b) -> - Tuple2_match - {a} - {b} - x - {Bool} - (\(ipv : a) (ipv : b) -> - Tuple2_match - {a} - {b} - y - {Bool} - (\(ipv : a) (ipv : b) -> - Ordering_match - (compare {a} v ipv ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {b} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> True) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}))) - (\(x : Tuple2 a b) (y : Tuple2 a b) -> - Tuple2_match - {a} - {b} - x - {Tuple2 a b} - (\(ipv : a) (ipv : b) -> - Tuple2_match - {a} - {b} - y - {Tuple2 a b} - (\(ipv : a) (ipv : b) -> - Ordering_match - (compare {a} v ipv ipv) - {all dead. Tuple2 a b} - (/\dead -> - Ordering_match - (compare - {b} - v - ipv - ipv) - {all dead. Tuple2 a b} - (/\dead -> y) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}))) - (\(x : Tuple2 a b) (y : Tuple2 a b) -> - Tuple2_match - {a} - {b} - x - {Tuple2 a b} - (\(ipv : a) (ipv : b) -> - Tuple2_match - {a} - {b} - y - {Tuple2 a b} - (\(ipv : a) (ipv : b) -> - Ordering_match - (compare {a} v ipv ipv) - {all dead. Tuple2 a b} - (/\dead -> - Ordering_match - (compare - {b} - v - ipv - ipv) - {all dead. Tuple2 a b} - (/\dead -> x) - (/\dead -> y) - (/\dead -> x) - {all dead. dead}) - (/\dead -> y) - (/\dead -> x) - {all dead. dead})))) - {List integer} - `$dOrd` - `$dOrd`) - cp - x)) - {all dead. dead}) - {all dead. dead} - in - letrec - !split' : Formula -> List Formula -> List Formula - = \(ds : Formula) (a : List Formula) -> - let - !defaultBody : List Formula = Cons {Formula} ds a - in - Formula_match - ds - {List Formula} - (\(p : Formula) (q : Formula) -> split' p (split' q a)) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) - (\(default_arg0 : Formula) -> defaultBody) - (\(default_arg0 : integer) -> defaultBody) - in - let - data StaticFormula | StaticFormula_match where - F : StaticFormula - F : StaticFormula - F : StaticFormula - F : StaticFormula - F : StaticFormula - F : StaticFormula - F : StaticFormula - in - letrec - !disin : Formula -> Formula - = \(ds : Formula) -> - Formula_match - ds - {Formula} - (\(p : Formula) (q : Formula) -> Con (disin p) (disin q)) - (\(p : Formula) (ds : Formula) -> - let - ~defaultBody : Formula - = let - !dq : Formula = disin ds - !dp : Formula = disin p - in - Bool_match - (Formula_match - dp - {all dead. Bool} - (\(ds : Formula) (ds : Formula) -> /\dead -> True) + (\(x : integer) + (xs : + List integer) -> + /\dead -> + ifThenElse + {all dead. + Bool} + (equalsInteger + y + x) + (/\dead -> + True) + (/\dead -> + go xs) + {all dead. + dead}) + {all dead. dead} + in + \(ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in + Bool_match + (go a) + {all dead. a} + (/\dead -> c y ds) + (/\dead -> ds) + {all dead. dead}) + {all dead. dead} + in + go c) + (\(ds : integer) (ds : List integer) -> + Cons {integer} ds ds) + (Nil {integer}) + in + Bool_match + (`$fEqList_$c==` + {integer} + equalsInteger + x + (Nil {integer})) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. List (Tuple2 (List integer) (List integer))} + (/\dead -> x) + (/\dead -> + insert + {Tuple2 (List integer) (List integer)} + ((let + a = List integer + in + /\b -> + \(v : Ord a) (v : Ord b) -> + CConsOrd + {Tuple2 a b} + (\(eta : Tuple2 a b) + (eta : Tuple2 a b) -> + Tuple2_match + {a} + {b} + eta + {Bool} + (\(a : a) (b : b) -> + Tuple2_match + {a} + {b} + eta + {Bool} + (\(a' : a) (b' : b) -> + Bool_match + (`$p1Ord` {a} v a a') + {all dead. Bool} + (/\dead -> + `$p1Ord` {b} v b b') + (/\dead -> False) + {all dead. dead}))) + (\(ds : Tuple2 a b) (ds : Tuple2 a b) -> + Tuple2_match + {a} + {b} + ds + {Ordering} + (\(a : a) (b : b) -> + Tuple2_match + {a} + {b} + ds + {Ordering} + (\(a' : a) -> + let + ~defaultBody : Ordering + = compare {a} v a a' + in + \(b' : b) -> + Ordering_match + (compare {a} v a a') + {all dead. Ordering} + (/\dead -> + compare {b} v b b') + (/\dead -> defaultBody) + (/\dead -> defaultBody) + {all dead. dead}))) + (\(x : Tuple2 a b) (y : Tuple2 a b) -> + Tuple2_match + {a} + {b} + x + {Bool} + (\(ipv : a) (ipv : b) -> + Tuple2_match + {a} + {b} + y + {Bool} + (\(ipv : a) (ipv : b) -> + Ordering_match + (compare {a} v ipv ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {b} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> False) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}))) + (\(x : Tuple2 a b) (y : Tuple2 a b) -> + Tuple2_match + {a} + {b} + x + {Bool} + (\(ipv : a) (ipv : b) -> + Tuple2_match + {a} + {b} + y + {Bool} + (\(ipv : a) (ipv : b) -> + Ordering_match + (compare {a} v ipv ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {b} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> True) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}))) + (\(x : Tuple2 a b) (y : Tuple2 a b) -> + Tuple2_match + {a} + {b} + x + {Bool} + (\(ipv : a) (ipv : b) -> + Tuple2_match + {a} + {b} + y + {Bool} + (\(ipv : a) (ipv : b) -> + Ordering_match + (compare {a} v ipv ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {b} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}))) + (\(x : Tuple2 a b) (y : Tuple2 a b) -> + Tuple2_match + {a} + {b} + x + {Bool} + (\(ipv : a) (ipv : b) -> + Tuple2_match + {a} + {b} + y + {Bool} + (\(ipv : a) (ipv : b) -> + Ordering_match + (compare {a} v ipv ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {b} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> True) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}))) + (\(x : Tuple2 a b) (y : Tuple2 a b) -> + Tuple2_match + {a} + {b} + x + {Tuple2 a b} + (\(ipv : a) (ipv : b) -> + Tuple2_match + {a} + {b} + y + {Tuple2 a b} + (\(ipv : a) (ipv : b) -> + Ordering_match + (compare {a} v ipv ipv) + {all dead. Tuple2 a b} + (/\dead -> + Ordering_match + (compare + {b} + v + ipv + ipv) + {all dead. + Tuple2 a b} + (/\dead -> y) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}))) + (\(x : Tuple2 a b) (y : Tuple2 a b) -> + Tuple2_match + {a} + {b} + x + {Tuple2 a b} + (\(ipv : a) (ipv : b) -> + Tuple2_match + {a} + {b} + y + {Tuple2 a b} + (\(ipv : a) (ipv : b) -> + Ordering_match + (compare {a} v ipv ipv) + {all dead. Tuple2 a b} + (/\dead -> + Ordering_match + (compare + {b} + v + ipv + ipv) + {all dead. + Tuple2 a b} + (/\dead -> x) + (/\dead -> y) + (/\dead -> x) + {all dead. dead}) + (/\dead -> y) + (/\dead -> x) + {all dead. dead})))) + {List integer} + `$dOrd` + `$dOrd`) + cp + x)) + {all dead. dead}) + {all dead. dead} + in + letrec + !split' : Formula -> List Formula -> List Formula + = \(ds : Formula) (a : List Formula) -> + let + !defaultBody : List Formula = Cons {Formula} ds a + in + Formula_match + ds + {List Formula} + (\(p : Formula) (q : Formula) -> split' p (split' q a)) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> defaultBody) + (\(default_arg0 : Formula) -> defaultBody) + (\(default_arg0 : integer) -> defaultBody) + in + let + data StaticFormula | StaticFormula_match where + F : StaticFormula + F : StaticFormula + F : StaticFormula + F : StaticFormula + F : StaticFormula + F : StaticFormula + F : StaticFormula + in + letrec + !disin : Formula -> Formula + = \(ds : Formula) -> + Formula_match + ds + {Formula} + (\(p : Formula) (q : Formula) -> Con (disin p) (disin q)) + (\(p : Formula) (ds : Formula) -> + let + ~defaultBody : Formula + = let + !dq : Formula = disin ds + !dp : Formula = disin p + in + Bool_match + (Formula_match + dp + {all dead. Bool} + (\(ds : Formula) (ds : Formula) -> /\dead -> True) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + /\dead -> + Formula_match + dq + {Bool} + (\(ds : Formula) (ds : Formula) -> True) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) -> False) + (\(default_arg0 : integer) -> False)) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + /\dead -> + Formula_match + dq + {Bool} + (\(ds : Formula) (ds : Formula) -> True) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) -> False) + (\(default_arg0 : integer) -> False)) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + /\dead -> + Formula_match + dq + {Bool} + (\(ds : Formula) (ds : Formula) -> True) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) -> False) + (\(default_arg0 : integer) -> False)) + (\(default_arg0 : Formula) -> + /\dead -> + Formula_match + dq + {Bool} + (\(ds : Formula) (ds : Formula) -> True) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) -> False) + (\(default_arg0 : integer) -> False)) + (\(default_arg0 : integer) -> + /\dead -> + Formula_match + dq + {Bool} + (\(ds : Formula) (ds : Formula) -> True) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) + (default_arg1 : Formula) -> + False) + (\(default_arg0 : Formula) -> False) + (\(default_arg0 : integer) -> False)) + {all dead. dead}) + {all dead. Formula} + (/\dead -> disin (Dis dp dq)) + (/\dead -> Dis dp dq) + {all dead. dead} + ~defaultBody : Formula + = Formula_match + p + {Formula} + (\(p : Formula) (q : Formula) -> + Con (disin (Dis p ds)) (disin (Dis q ds))) (\(default_arg0 : Formula) (default_arg1 : Formula) -> - /\dead -> - Formula_match - dq - {Bool} - (\(ds : Formula) (ds : Formula) -> True) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) -> False) - (\(default_arg0 : integer) -> False)) + defaultBody) (\(default_arg0 : Formula) (default_arg1 : Formula) -> - /\dead -> - Formula_match - dq - {Bool} - (\(ds : Formula) (ds : Formula) -> True) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) -> False) - (\(default_arg0 : integer) -> False)) + defaultBody) (\(default_arg0 : Formula) (default_arg1 : Formula) -> - /\dead -> - Formula_match - dq - {Bool} - (\(ds : Formula) (ds : Formula) -> True) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) -> False) - (\(default_arg0 : integer) -> False)) - (\(default_arg0 : Formula) -> - /\dead -> - Formula_match - dq - {Bool} - (\(ds : Formula) (ds : Formula) -> True) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) -> False) - (\(default_arg0 : integer) -> False)) - (\(default_arg0 : integer) -> - /\dead -> - Formula_match - dq - {Bool} - (\(ds : Formula) (ds : Formula) -> True) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) - (default_arg1 : Formula) -> - False) - (\(default_arg0 : Formula) -> False) - (\(default_arg0 : integer) -> False)) - {all dead. dead}) - {all dead. Formula} - (/\dead -> disin (Dis dp dq)) - (/\dead -> Dis dp dq) - {all dead. dead} - ~defaultBody : Formula - = Formula_match - p - {Formula} - (\(p : Formula) (q : Formula) -> - Con (disin (Dis p ds)) (disin (Dis q ds))) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) -> defaultBody) - (\(default_arg0 : integer) -> defaultBody) - in - Formula_match - ds - {Formula} - (\(q : Formula) (r : Formula) -> - Con (disin (Dis p q)) (disin (Dis p r))) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> - defaultBody) - (\(default_arg0 : Formula) -> defaultBody) - (\(default_arg0 : integer) -> defaultBody)) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) - (\(default_arg0 : Formula) -> ds) - (\(default_arg0 : integer) -> ds) - in - letrec - !elim : Formula -> Formula - = \(ds : Formula) -> - Formula_match - ds - {Formula} - (\(p : Formula) (q : Formula) -> Con (elim p) (elim q)) - (\(p : Formula) (q : Formula) -> Dis (elim p) (elim q)) - (\(f : Formula) (f' : Formula) -> - Con (elim (Imp f f')) (elim (Imp f' f))) - (\(p : Formula) (q : Formula) -> Dis (Not (elim p)) (elim q)) - (\(p : Formula) -> Not (elim p)) - (\(s : integer) -> Sym s) - in - letrec - !negin : Formula -> Formula - = \(ds : Formula) -> - Formula_match - ds - {Formula} - (\(p : Formula) (q : Formula) -> Con (negin p) (negin q)) - (\(p : Formula) (q : Formula) -> Dis (negin p) (negin q)) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) - (\(ds : Formula) -> - Formula_match - ds - {Formula} - (\(p : Formula) (q : Formula) -> - Dis (negin (Not p)) (negin (Not q))) - (\(p : Formula) (q : Formula) -> - Con (negin (Not p)) (negin (Not q))) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) - (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) - (\(p : Formula) -> negin p) - (\(default_arg0 : integer) -> ds)) - (\(default_arg0 : integer) -> ds) - in - \(eta : StaticFormula) -> - let - !a : List Formula - = let - !p : Formula - = disin - (negin - (elim - (StaticFormula_match - eta - {all dead. Formula} - (/\dead -> - Eqv - (Eqv (Sym 1) (Sym 1)) - (Eqv (Eqv (Sym 1) (Sym 1)) (Eqv (Sym 1) (Sym 1)))) - (/\dead -> - Eqv - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1)))) - (/\dead -> - Eqv - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) - (Eqv (Eqv (Sym 1) (Sym 1)) (Eqv (Sym 1) (Sym 1)))) - (/\dead -> - Eqv - (Eqv (Sym 1) (Eqv (Sym 2) (Sym 3))) - (Eqv (Eqv (Sym 4) (Sym 5)) (Eqv (Sym 6) (Sym 7)))) - (/\dead -> - Eqv - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) - (Eqv - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) - (Eqv (Sym 1) (Sym 1)))) - (/\dead -> - Eqv - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) - (Eqv - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) - (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))))) - (/\dead -> - Eqv - (Eqv (Sym 1) (Eqv (Sym 2) (Sym 3))) - (Eqv - (Eqv (Sym 4) (Eqv (Sym 5) (Sym 6))) - (Eqv (Sym 7) (Eqv (Sym 8) (Sym 9))))) - {all dead. dead}))) - in - split' p (Nil {Formula}) - in - go a) - (let - data `PlutusBenchmark.NoFib.Clausify.StaticFormula` | `match_PlutusBenchmark.NoFib.Clausify.StaticFormula` where - `PlutusBenchmark.NoFib.Clausify.F1` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - `PlutusBenchmark.NoFib.Clausify.F2` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - `PlutusBenchmark.NoFib.Clausify.F3` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - `PlutusBenchmark.NoFib.Clausify.F4` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - `PlutusBenchmark.NoFib.Clausify.F5` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - `PlutusBenchmark.NoFib.Clausify.F6` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - `PlutusBenchmark.NoFib.Clausify.F7` : - `PlutusBenchmark.NoFib.Clausify.StaticFormula` - in - `PlutusBenchmark.NoFib.Clausify.F5`) \ No newline at end of file + defaultBody) + (\(default_arg0 : Formula) -> defaultBody) + (\(default_arg0 : integer) -> defaultBody) + in + Formula_match + ds + {Formula} + (\(q : Formula) (r : Formula) -> + Con (disin (Dis p q)) (disin (Dis p r))) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> + defaultBody) + (\(default_arg0 : Formula) -> defaultBody) + (\(default_arg0 : integer) -> defaultBody)) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) + (\(default_arg0 : Formula) -> ds) + (\(default_arg0 : integer) -> ds) + in + letrec + !elim : Formula -> Formula + = \(ds : Formula) -> + Formula_match + ds + {Formula} + (\(p : Formula) (q : Formula) -> Con (elim p) (elim q)) + (\(p : Formula) (q : Formula) -> Dis (elim p) (elim q)) + (\(f : Formula) (f' : Formula) -> + Con (elim (Imp f f')) (elim (Imp f' f))) + (\(p : Formula) (q : Formula) -> Dis (Not (elim p)) (elim q)) + (\(p : Formula) -> Not (elim p)) + (\(s : integer) -> Sym s) + in + letrec + !negin : Formula -> Formula + = \(ds : Formula) -> + Formula_match + ds + {Formula} + (\(p : Formula) (q : Formula) -> Con (negin p) (negin q)) + (\(p : Formula) (q : Formula) -> Dis (negin p) (negin q)) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) + (\(ds : Formula) -> + Formula_match + ds + {Formula} + (\(p : Formula) (q : Formula) -> + Dis (negin (Not p)) (negin (Not q))) + (\(p : Formula) (q : Formula) -> + Con (negin (Not p)) (negin (Not q))) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) + (\(default_arg0 : Formula) (default_arg1 : Formula) -> ds) + (\(p : Formula) -> negin p) + (\(default_arg0 : integer) -> ds)) + (\(default_arg0 : integer) -> ds) + in + \(eta : StaticFormula) -> + let + !a : List Formula + = let + !p : Formula + = disin + (negin + (elim + (StaticFormula_match + eta + {all dead. Formula} + (/\dead -> + Eqv + (Eqv (Sym 1) (Sym 1)) + (Eqv + (Eqv (Sym 1) (Sym 1)) + (Eqv (Sym 1) (Sym 1)))) + (/\dead -> + Eqv + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1)))) + (/\dead -> + Eqv + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) + (Eqv + (Eqv (Sym 1) (Sym 1)) + (Eqv (Sym 1) (Sym 1)))) + (/\dead -> + Eqv + (Eqv (Sym 1) (Eqv (Sym 2) (Sym 3))) + (Eqv + (Eqv (Sym 4) (Sym 5)) + (Eqv (Sym 6) (Sym 7)))) + (/\dead -> + Eqv + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) + (Eqv + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) + (Eqv (Sym 1) (Sym 1)))) + (/\dead -> + Eqv + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) + (Eqv + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))) + (Eqv (Sym 1) (Eqv (Sym 1) (Sym 1))))) + (/\dead -> + Eqv + (Eqv (Sym 1) (Eqv (Sym 2) (Sym 3))) + (Eqv + (Eqv (Sym 4) (Eqv (Sym 5) (Sym 6))) + (Eqv (Sym 7) (Eqv (Sym 8) (Sym 9))))) + {all dead. dead}))) + in + split' p (Nil {Formula}) + in + go a) + (let + data `PlutusBenchmark.NoFib.Clausify.StaticFormula` | `match_PlutusBenchmark.NoFib.Clausify.StaticFormula` where + `PlutusBenchmark.NoFib.Clausify.F1` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + `PlutusBenchmark.NoFib.Clausify.F2` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + `PlutusBenchmark.NoFib.Clausify.F3` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + `PlutusBenchmark.NoFib.Clausify.F4` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + `PlutusBenchmark.NoFib.Clausify.F5` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + `PlutusBenchmark.NoFib.Clausify.F6` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + `PlutusBenchmark.NoFib.Clausify.F7` : + `PlutusBenchmark.NoFib.Clausify.StaticFormula` + in + `PlutusBenchmark.NoFib.Clausify.F5`)) \ No newline at end of file diff --git a/plutus-benchmark/nofib/test/9.6/knights10-4x4.pir.golden b/plutus-benchmark/nofib/test/9.6/knights10-4x4.pir.golden index b8bdffdd19e..ed38a92600b 100644 --- a/plutus-benchmark/nofib/test/9.6/knights10-4x4.pir.golden +++ b/plutus-benchmark/nofib/test/9.6/knights10-4x4.pir.golden @@ -1,1499 +1,1579 @@ -(let - data Direction | Direction_match where - DL : Direction - DR : Direction - LD : Direction - LU : Direction - RD : Direction - RU : Direction - UL : Direction - UR : Direction - in - letrec - data (List :: * -> *) a | List_match where - Nil : List a - Cons : a -> List a -> List a - in - letrec - !go : List Direction -> integer - = \(ds : List Direction) -> - List_match - {Direction} - ds - {all dead. integer} - (/\dead -> 0) - (\(x : Direction) (xs : List Direction) -> - /\dead -> addInteger 1 (go xs)) - {all dead. dead} - in - let - data Bool | Bool_match where - True : Bool - False : Bool - data (Maybe :: * -> *) a | Maybe_match where - Just : a -> Maybe a - Nothing : Maybe a - data (Tuple2 :: * -> * -> *) a b | Tuple2_match where - Tuple2 : a -> b -> Tuple2 a b - data ChessSet | ChessSet_match where - Board : - integer -> - integer -> - Maybe (Tuple2 integer integer) -> - List (Tuple2 integer integer) -> - ChessSet - !`$fEqChessSet_$c==` : ChessSet -> ChessSet -> Bool - = \(ds : ChessSet) (ds : ChessSet) -> True - data Ordering | Ordering_match where - EQ : Ordering - GT : Ordering - LT : Ordering - 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 - !v : Ord ChessSet - = CConsOrd - {ChessSet} - `$fEqChessSet_$c==` - (\(eta : ChessSet) (eta : ChessSet) -> EQ) - (\(x : ChessSet) (y : ChessSet) -> False) - `$fEqChessSet_$c==` - (\(x : ChessSet) (y : ChessSet) -> False) - `$fEqChessSet_$c==` - (\(x : ChessSet) (y : ChessSet) -> y) - (\(x : ChessSet) (y : ChessSet) -> x) - !equalsInteger : integer -> integer -> Bool - = \(x : integer) (y : integer) -> - ifThenElse {Bool} (equalsInteger x y) True False - !v : Ord integer - = CConsOrd - {integer} - equalsInteger - (\(eta : integer) (eta : integer) -> +((let + data Direction | Direction_match where + DL : Direction + DR : Direction + LD : Direction + LU : Direction + RD : Direction + RU : Direction + UL : Direction + UR : Direction + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + letrec + !go : List Direction -> integer + = \(ds : List Direction) -> + List_match + {Direction} + ds + {all dead. integer} + (/\dead -> 0) + (\(x : Direction) (xs : List Direction) -> + /\dead -> addInteger 1 (go xs)) + {all dead. dead} + in + let + data Bool | Bool_match where + True : Bool + False : Bool + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + data ChessSet | ChessSet_match where + Board : + integer -> + integer -> + Maybe (Tuple2 integer integer) -> + List (Tuple2 integer integer) -> + ChessSet + !`$fEqChessSet_$c==` : ChessSet -> ChessSet -> Bool + = \(ds : ChessSet) (ds : ChessSet) -> True + data Ordering | Ordering_match where + EQ : Ordering + GT : Ordering + LT : Ordering + 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 + !v : Ord ChessSet + = CConsOrd + {ChessSet} + `$fEqChessSet_$c==` + (\(eta : ChessSet) (eta : ChessSet) -> EQ) + (\(x : ChessSet) (y : ChessSet) -> False) + `$fEqChessSet_$c==` + (\(x : ChessSet) (y : ChessSet) -> False) + `$fEqChessSet_$c==` + (\(x : ChessSet) (y : ChessSet) -> y) + (\(x : ChessSet) (y : ChessSet) -> x) + !equalsInteger : integer -> integer -> Bool + = \(x : integer) (y : integer) -> + ifThenElse {Bool} (equalsInteger x y) True False + !v : Ord integer + = CConsOrd + {integer} + equalsInteger + (\(eta : integer) (eta : integer) -> + ifThenElse + {all dead. Ordering} + (equalsInteger eta eta) + (/\dead -> EQ) + (/\dead -> + ifThenElse + {all dead. Ordering} + (lessThanEqualsInteger eta eta) + (/\dead -> LT) + (/\dead -> GT) + {all dead. dead}) + {all dead. dead}) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) True False) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanEqualsInteger x y) True False) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanEqualsInteger x y) False True) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) False True) + (\(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (lessThanEqualsInteger x y) + (/\dead -> y) + (/\dead -> x) + {all dead. dead}) + (\(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (lessThanEqualsInteger x y) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}) + in + letrec + !go : List (Tuple2 integer ChessSet) -> List ChessSet + = \(ds : List (Tuple2 integer ChessSet)) -> + List_match + {Tuple2 integer ChessSet} + ds + {all dead. List ChessSet} + (/\dead -> Nil {ChessSet}) + (\(x : Tuple2 integer ChessSet) + (xs : List (Tuple2 integer ChessSet)) -> + /\dead -> + Cons + {ChessSet} + (Tuple2_match + {integer} + {ChessSet} + x + {ChessSet} + (\(ds : integer) (b : ChessSet) -> b)) + (go xs)) + {all dead. dead} + in + letrec + !go : List ChessSet -> integer + = \(ds : List ChessSet) -> + List_match + {ChessSet} + ds + {all dead. integer} + (/\dead -> 0) + (\(x : ChessSet) (xs : List ChessSet) -> + /\dead -> addInteger 1 (go xs)) + {all dead. dead} + in + letrec + !go : List (Tuple2 integer ChessSet) -> List (Tuple2 integer ChessSet) + = \(ds : List (Tuple2 integer ChessSet)) -> + List_match + {Tuple2 integer ChessSet} + ds + {all dead. List (Tuple2 integer ChessSet)} + (/\dead -> Nil {Tuple2 integer ChessSet}) + (\(x : Tuple2 integer ChessSet) + (xs : List (Tuple2 integer ChessSet)) -> + /\dead -> Cons {Tuple2 integer ChessSet} x (go xs)) + {all dead. dead} + in + letrec + !go : List ChessSet -> integer + = \(ds : List ChessSet) -> + List_match + {ChessSet} + ds + {all dead. integer} + (/\dead -> 0) + (\(x : ChessSet) (xs : List ChessSet) -> + /\dead -> addInteger 1 (go xs)) + {all dead. dead} + in + letrec + !depthSearch : + all a. + (\a -> a -> a -> Bool) a -> + integer -> + List a -> + (a -> List a) -> + (a -> Bool) -> + List a + = /\a -> + \(`$dEq` : (\a -> a -> a -> Bool) a) + (depth : integer) + (q : List a) + (growFn : a -> List a) + (finFn : a -> Bool) -> ifThenElse - {all dead. Ordering} - (equalsInteger eta eta) - (/\dead -> EQ) + {all dead. List a} + (equalsInteger 0 depth) + (/\dead -> Nil {a}) (/\dead -> - ifThenElse - {all dead. Ordering} - (lessThanEqualsInteger eta eta) - (/\dead -> LT) - (/\dead -> GT) + Bool_match + (List_match + {a} + q + {all dead. Bool} + (/\dead -> True) + (\(ipv : a) (ipv : List a) -> /\dead -> False) + {all dead. dead}) + {all dead. List a} + (/\dead -> Nil {a}) + (/\dead -> + Bool_match + (finFn + (List_match + {a} + q + {all dead. a} + (/\dead -> error {a}) + (\(h : a) (ds : List a) -> /\dead -> h) + {all dead. dead})) + {all dead. List a} + (/\dead -> + Cons + {a} + (List_match + {a} + q + {all dead. a} + (/\dead -> error {a}) + (\(h : a) (ds : List a) -> /\dead -> h) + {all dead. dead}) + (depthSearch + {a} + `$dEq` + (subtractInteger depth 1) + (List_match + {a} + q + {all dead. List a} + (/\dead -> error {List a}) + (\(ds : a) (t : List a) -> /\dead -> t) + {all dead. dead}) + growFn + finFn)) + (/\dead -> + depthSearch + {a} + `$dEq` + (subtractInteger depth 1) + (let + !list : List a + = growFn + (List_match + {a} + q + {all dead. a} + (/\dead -> error {a}) + (\(h : a) (ds : List a) -> /\dead -> h) + {all dead. dead}) + !q : List a + = List_match + {a} + q + {all dead. List a} + (/\dead -> error {List a}) + (\(ds : a) (t : List a) -> /\dead -> t) + {all dead. dead} + in + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> q) + (\(x : a) (xs : List a) -> + /\dead -> Cons {a} x (go xs)) + {all dead. dead} + in + go list) + growFn + finFn) + {all dead. dead}) {all dead. dead}) - {all dead. dead}) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) True False) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanEqualsInteger x y) True False) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanEqualsInteger x y) False True) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) False True) - (\(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (lessThanEqualsInteger x y) - (/\dead -> y) - (/\dead -> x) - {all dead. dead}) - (\(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (lessThanEqualsInteger x y) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}) - in - letrec - !go : List (Tuple2 integer ChessSet) -> List ChessSet - = \(ds : List (Tuple2 integer ChessSet)) -> - List_match - {Tuple2 integer ChessSet} - ds - {all dead. List ChessSet} - (/\dead -> Nil {ChessSet}) - (\(x : Tuple2 integer ChessSet) - (xs : List (Tuple2 integer ChessSet)) -> - /\dead -> - Cons - {ChessSet} - (Tuple2_match - {integer} - {ChessSet} - x - {ChessSet} - (\(ds : integer) (b : ChessSet) -> b)) - (go xs)) - {all dead. dead} - in - letrec - !go : List ChessSet -> integer - = \(ds : List ChessSet) -> - List_match - {ChessSet} - ds - {all dead. integer} - (/\dead -> 0) - (\(x : ChessSet) (xs : List ChessSet) -> - /\dead -> addInteger 1 (go xs)) - {all dead. dead} - in - letrec - !go : List (Tuple2 integer ChessSet) -> List (Tuple2 integer ChessSet) - = \(ds : List (Tuple2 integer ChessSet)) -> - List_match - {Tuple2 integer ChessSet} - ds - {all dead. List (Tuple2 integer ChessSet)} - (/\dead -> Nil {Tuple2 integer ChessSet}) - (\(x : Tuple2 integer ChessSet) - (xs : List (Tuple2 integer ChessSet)) -> - /\dead -> Cons {Tuple2 integer ChessSet} x (go xs)) - {all dead. dead} - in - letrec - !go : List ChessSet -> integer - = \(ds : List ChessSet) -> - List_match - {ChessSet} - ds - {all dead. integer} - (/\dead -> 0) - (\(x : ChessSet) (xs : List ChessSet) -> - /\dead -> addInteger 1 (go xs)) - {all dead. dead} - in - letrec - !depthSearch : - all a. - (\a -> a -> a -> Bool) a -> - integer -> - List a -> - (a -> List a) -> - (a -> Bool) -> - List a - = /\a -> - \(`$dEq` : (\a -> a -> a -> Bool) a) - (depth : integer) - (q : List a) - (growFn : a -> List a) - (finFn : a -> Bool) -> - ifThenElse - {all dead. List a} - (equalsInteger 0 depth) - (/\dead -> Nil {a}) - (/\dead -> - Bool_match - (List_match - {a} - q + {all dead. dead} + in + let + !`$p1Ord` : all a. Ord a -> (\a -> a -> a -> Bool) a + = /\a -> + \(v : Ord a) -> + Ord_match + {a} + v + {(\a -> a -> a -> Bool) a} + (\(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) + !compare : all a. Ord a -> a -> a -> Ordering + = /\a -> + \(v : Ord a) -> + Ord_match + {a} + v + {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) + in + letrec + !quickSort : all a. Ord a -> List a -> List a + = /\a -> + \(`$dOrd` : Ord a) (ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(x : a) (xs : List a) -> + /\dead -> + let + !xs : List a + = let + !xs : List a + = quickSort + {a} + `$dOrd` + ((let + a = List a + in + \(c : a -> a -> a) (n : a) -> + letrec + !go : List a -> a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. a} + (/\dead -> n) + (\(y : a) (ys : List a) -> + /\dead -> + let + !ds : a = go ys + in + Bool_match + (Ord_match + {a} + `$dOrd` + {a -> a -> Bool} + (\(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) + y + x) + {all dead. a} + (/\dead -> c y ds) + (/\dead -> ds) + {all dead. dead}) + {all dead. dead} + in + go xs) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + in + (let + b = List a + in + \(c : a -> b -> b) (n : b) -> c x n) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + xs + in + (let + b = List a + in + \(c : a -> b -> b) (n : b) -> + letrec + !go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> n) + (\(y : a) (ys : List a) -> + /\dead -> c y (go ys)) + {all dead. dead} + in + let + !eta : List a + = quickSort + {a} + `$dOrd` + ((let + a = List a + in + \(c : a -> a -> a) (n : a) -> + letrec + !go : List a -> a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. a} + (/\dead -> n) + (\(y : a) (ys : List a) -> + /\dead -> + let + !ds : a = go ys + in + Bool_match + (Ord_match + {a} + `$dOrd` + {a -> a -> Bool} + (\(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) + y + x) + {all dead. a} + (/\dead -> c y ds) + (/\dead -> ds) + {all dead. dead}) + {all dead. dead} + in + go xs) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + in + go eta) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + xs) + {all dead. dead} + in + let + !interval : integer -> integer -> List integer + = \(a : integer) (b : integer) -> + letrec + !go : integer -> List integer + = \(a : integer) -> + ifThenElse + {all dead. List integer} + (lessThanEqualsInteger a b) + (/\dead -> Cons {integer} a (go (addInteger 1 a))) + (/\dead -> Nil {integer}) + {all dead. dead} + in + go a + in + letrec + !go : List Direction -> integer + = \(ds : List Direction) -> + List_match + {Direction} + ds + {all dead. integer} + (/\dead -> 0) + (\(x : Direction) (xs : List Direction) -> + /\dead -> addInteger 1 (go xs)) + {all dead. dead} + in + let + !move : Direction -> Tuple2 integer integer -> Tuple2 integer integer + = \(ds : Direction) (ds : Tuple2 integer integer) -> + Direction_match + ds + {all dead. Tuple2 integer integer} + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (subtractInteger x 1) + (addInteger 2 y))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (addInteger 1 x) + (addInteger 2 y))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (subtractInteger x 2) + (addInteger 1 y))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (subtractInteger x 2) + (subtractInteger y 1))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (addInteger 2 x) + (addInteger 1 y))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (addInteger 2 x) + (subtractInteger y 1))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (subtractInteger x 1) + (subtractInteger y 2))) + (/\dead -> + Tuple2_match + {integer} + {integer} + ds + {Tuple2 integer integer} + (\(x : integer) (y : integer) -> + Tuple2 + {integer} + {integer} + (addInteger 1 x) + (subtractInteger y 2))) + {all dead. dead} + in + letrec + !notIn : all a. (\a -> a -> a -> Bool) a -> a -> List a -> Bool + = /\a -> + \(`$dEq` : (\a -> a -> a -> Bool) a) (ds : a) (ds : List a) -> + List_match + {a} + ds + {all dead. Bool} + (/\dead -> True) + (\(a : a) (as : List a) -> + /\dead -> + Bool_match + (`$dEq` ds a) {all dead. Bool} - (/\dead -> True) - (\(ipv : a) (ipv : List a) -> /\dead -> False) + (/\dead -> False) + (/\dead -> notIn {a} `$dEq` ds as) {all dead. dead}) - {all dead. List a} - (/\dead -> Nil {a}) - (/\dead -> - Bool_match - (finFn - (List_match - {a} - q + {all dead. dead} + in + let + !canMoveTo : Tuple2 integer integer -> ChessSet -> Bool + = \(t : Tuple2 integer integer) (board : ChessSet) -> + Tuple2_match + {integer} + {integer} + t + {Bool} + (\(x : integer) (y : integer) -> + ChessSet_match + board + {Bool} + (\(ipv : integer) + (ipv : integer) + (ipv : Maybe (Tuple2 integer integer)) + (ipv : List (Tuple2 integer integer)) -> + ifThenElse + {all dead. Bool} + (lessThanInteger x 1) + (/\dead -> False) + (/\dead -> + ifThenElse + {all dead. Bool} + (lessThanEqualsInteger x ipv) + (/\dead -> + ifThenElse + {all dead. Bool} + (lessThanInteger y 1) + (/\dead -> False) + (/\dead -> + ifThenElse + {all dead. Bool} + (lessThanEqualsInteger y ipv) + (/\dead -> + notIn + {Tuple2 integer integer} + (\(ds : Tuple2 integer integer) + (ds : Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} + ds + {Bool} + (\(a : integer) (b : integer) -> + Tuple2_match + {integer} + {integer} + ds + {Bool} + (\(a' : integer) + (b' : integer) -> + ifThenElse + {all dead. Bool} + (equalsInteger a a') + (/\dead -> + equalsInteger b b') + (/\dead -> False) + {all dead. dead}))) + t + ipv) + (/\dead -> False) + {all dead. dead}) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. dead})) + !possibleMoves : ChessSet -> List Direction + = \(board : ChessSet) -> + ChessSet_match + board + {List Direction} + (\(ipv : integer) + (ipv : integer) + (ipv : Maybe (Tuple2 integer integer)) + (ipv : List (Tuple2 integer integer)) -> + (let + a = List Direction + in + \(c : Direction -> a -> a) -> + let + !c : Direction -> a -> a + = \(ds : Direction) (ds : a) -> + Bool_match + (canMoveTo + (move + ds + (List_match + {Tuple2 integer integer} + ipv + {all dead. Tuple2 integer integer} + (/\dead -> + error {Tuple2 integer integer}) + (\(t : Tuple2 integer integer) + (ds : List (Tuple2 integer integer)) -> + /\dead -> t) + {all dead. dead})) + board) {all dead. a} - (/\dead -> error {a}) - (\(h : a) (ds : List a) -> /\dead -> h) - {all dead. dead})) - {all dead. List a} - (/\dead -> - Cons - {a} - (List_match - {a} - q - {all dead. a} - (/\dead -> error {a}) - (\(h : a) (ds : List a) -> /\dead -> h) - {all dead. dead}) - (depthSearch - {a} - `$dEq` - (subtractInteger depth 1) - (List_match - {a} - q - {all dead. List a} - (/\dead -> error {List a}) - (\(ds : a) (t : List a) -> /\dead -> t) - {all dead. dead}) - growFn - finFn)) - (/\dead -> - depthSearch - {a} - `$dEq` - (subtractInteger depth 1) - (let - !list : List a - = growFn - (List_match - {a} - q - {all dead. a} - (/\dead -> error {a}) - (\(h : a) (ds : List a) -> /\dead -> h) - {all dead. dead}) - !q : List a - = List_match - {a} - q - {all dead. List a} - (/\dead -> error {List a}) - (\(ds : a) (t : List a) -> /\dead -> t) - {all dead. dead} - in - letrec - !go : List a -> List a - = \(ds : List a) -> + (/\dead -> c ds ds) + (/\dead -> ds) + {all dead. dead} + in + \(n : a) -> + c UL (c UR (c DL (c DR (c LU (c LD (c RU (c RD n)))))))) + (\(ds : Direction) (ds : List Direction) -> + Cons {Direction} ds ds) + (Nil {Direction})) + !deleteFirst : ChessSet -> ChessSet + = \(ds : ChessSet) -> + ChessSet_match + ds + {ChessSet} + (\(s : integer) + (n : integer) + (ds : Maybe (Tuple2 integer integer)) + (ts : List (Tuple2 integer integer)) -> + let + !f' : Maybe (Tuple2 integer integer) + = (let + a = Tuple2 integer integer + in + letrec + !rev : List a -> List a -> Maybe a + = \(ds : List a) (a : List a) -> + List_match + {a} + ds + {all dead. Maybe a} + (/\dead -> List_match {a} - ds - {all dead. List a} - (/\dead -> q) - (\(x : a) (xs : List a) -> - /\dead -> Cons {a} x (go xs)) - {all dead. dead} - in - go list) - growFn - finFn) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - in - let - !`$p1Ord` : all a. Ord a -> (\a -> a -> a -> Bool) a - = /\a -> - \(v : Ord a) -> - Ord_match - {a} - v - {(\a -> a -> a -> Bool) a} - (\(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) - !compare : all a. Ord a -> a -> a -> Ordering - = /\a -> - \(v : Ord a) -> - Ord_match - {a} - v - {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) - in - letrec - !quickSort : all a. Ord a -> List a -> List a - = /\a -> - \(`$dOrd` : Ord a) (ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> Nil {a}) - (\(x : a) (xs : List a) -> - /\dead -> - let - !xs : List a - = let - !xs : List a - = quickSort - {a} - `$dOrd` - ((let - a = List a - in - \(c : a -> a -> a) (n : a) -> - letrec - !go : List a -> a - = \(ds : List a) -> + a + {all dead. Maybe a} + (/\dead -> error {Maybe a}) + (\(ds : a) (ds : List a) -> + /\dead -> List_match {a} ds - {all dead. a} - (/\dead -> n) - (\(y : a) (ys : List a) -> - /\dead -> - let - !ds : a = go ys - in - Bool_match - (Ord_match - {a} - `$dOrd` - {a -> a -> Bool} - (\(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) - y - x) - {all dead. a} - (/\dead -> c y ds) - (/\dead -> ds) - {all dead. dead}) - {all dead. dead} + {all dead. Maybe a} + (/\dead -> Nothing {a}) + (\(a : a) (ds : List a) -> + /\dead -> Just {a} a) + {all dead. dead}) + {all dead. dead}) + (\(x : a) (xs : List a) -> + /\dead -> rev xs (Cons {a} x a)) + {all dead. dead} + in + \(l : List a) -> rev l (Nil {a})) + ts + in + letrec + !rev : + List (Tuple2 integer integer) -> + List (Tuple2 integer integer) -> + ChessSet + = \(ds : List (Tuple2 integer integer)) + (a : List (Tuple2 integer integer)) -> + List_match + {Tuple2 integer integer} + ds + {all dead. ChessSet} + (/\dead -> + List_match + {Tuple2 integer integer} + a + {all dead. ChessSet} + (/\dead -> + let + !ts' : List (Tuple2 integer integer) + = error {List (Tuple2 integer integer)} + in + Board s (subtractInteger n 1) f' ts') + (\(ds : Tuple2 integer integer) + (as : List (Tuple2 integer integer)) -> + /\dead -> + let + !ts' : List (Tuple2 integer integer) + = (let + a = Tuple2 integer integer + in + letrec + !rev : List a -> List a -> List a + = \(ds : List a) (a : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> a) + (\(x : a) (xs : List a) -> + /\dead -> + rev + xs + (Cons {a} x a)) + {all dead. dead} + in + \(l : List a) -> rev l (Nil {a})) + as in - go xs) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - in - (let - b = List a - in - \(c : a -> b -> b) (n : b) -> c x n) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - xs - in - (let - b = List a - in - \(c : a -> b -> b) (n : b) -> - letrec - !go : List a -> b - = \(ds : List a) -> - List_match - {a} - ds - {all dead. b} - (/\dead -> n) - (\(y : a) (ys : List a) -> - /\dead -> c y (go ys)) - {all dead. dead} - in - let - !eta : List a - = quickSort - {a} - `$dOrd` - ((let - a = List a + Board s (subtractInteger n 1) f' ts') + {all dead. dead}) + (\(x : Tuple2 integer integer) + (xs : List (Tuple2 integer integer)) -> + /\dead -> + rev xs (Cons {Tuple2 integer integer} x a)) + {all dead. dead} + in + rev ts (Nil {Tuple2 integer integer})) + !descAndNo : ChessSet -> List (Tuple2 integer ChessSet) + = \(board : ChessSet) -> + letrec + !go : List Direction -> List ChessSet + = \(ds : List Direction) -> + List_match + {Direction} + ds + {all dead. List ChessSet} + (/\dead -> Nil {ChessSet}) + (\(x : Direction) (xs : List Direction) -> + /\dead -> + Cons + {ChessSet} + (ChessSet_match + board + {ChessSet} + (\(ipv : integer) + (ipv : integer) + (ipv : Maybe (Tuple2 integer integer)) + (ipv : List (Tuple2 integer integer)) -> + let + !t : Tuple2 integer integer + = move + x + (List_match + {Tuple2 integer integer} + ipv + {all dead. Tuple2 integer integer} + (/\dead -> + error {Tuple2 integer integer}) + (\(t : Tuple2 integer integer) + (ds : + List + (Tuple2 integer integer)) -> + /\dead -> t) + {all dead. dead}) in - \(c : a -> a -> a) (n : a) -> + Board + ipv + (addInteger 1 ipv) + ipv + (Cons {Tuple2 integer integer} t ipv))) + (go xs)) + {all dead. dead} + in + (let + a = Tuple2 integer ChessSet + in + \(g : all b. (a -> b -> b) -> b -> b) -> + g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a})) + (/\a -> + \(c : Tuple2 integer ChessSet -> a -> a) (n : a) -> + letrec + !go : List ChessSet -> a + = \(ds : List ChessSet) -> + List_match + {ChessSet} + ds + {all dead. a} + (/\dead -> n) + (\(y : ChessSet) (ys : List ChessSet) -> + /\dead -> + let + !ds : a = go ys + in + c + (Tuple2 + {integer} + {ChessSet} + (go (possibleMoves (deleteFirst y))) + y) + ds) + {all dead. dead} + in + let + !eta : List ChessSet = go (possibleMoves board) + in + go eta) + in + letrec + !zip : all a b. List a -> List b -> List (Tuple2 a b) + = /\a b -> + \(ds : List a) (_bs : List b) -> + List_match + {a} + ds + {all dead. List (Tuple2 a b)} + (/\dead -> Nil {Tuple2 a b}) + (\(ipv : a) (ipv : List a) -> + /\dead -> + List_match + {b} + _bs + {all dead. List (Tuple2 a b)} + (/\dead -> Nil {Tuple2 a b}) + (\(ipv : b) (ipv : List b) -> + /\dead -> + Cons + {Tuple2 a b} + (Tuple2 {a} {b} ipv ipv) + (zip {a} {b} ipv ipv)) + {all dead. dead}) + {all dead. dead} + in + \(depth : integer) + (boardSize : integer) -> + depthSearch + {Tuple2 integer ChessSet} + (\(ds : Tuple2 integer ChessSet) (ds : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + ds + {Bool} + (\(a : integer) (b : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + ds + {Bool} + (\(a' : integer) (b' : ChessSet) -> + Bool_match + (equalsInteger a a') + {all dead. Bool} + (/\dead -> True) + (/\dead -> False) + {all dead. dead}))) + depth + (let + !list : + List (Tuple2 integer ChessSet) + = let + !l : + List ChessSet + = (let + a = List ChessSet + in + \(c : ChessSet -> a -> a) + (n : a) -> + letrec + !go : + List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in letrec - !go : List a -> a - = \(ds : List a) -> + !go : + List integer -> a + = \(ds : List integer) -> List_match - {a} + {integer} ds {all dead. a} - (/\dead -> n) - (\(y : a) (ys : List a) -> - /\dead -> - let - !ds : a = go ys - in - Bool_match - (Ord_match - {a} - `$dOrd` - {a -> a -> Bool} - (\(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) - y - x) - {all dead. a} - (/\dead -> c y ds) - (/\dead -> ds) - {all dead. dead}) + (/\dead -> ds) + (\(y : integer) -> + let + !st : Tuple2 integer integer + = Tuple2 + {integer} + {integer} + y + y + in + \(ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in + c + (ifThenElse + {all dead. ChessSet} + (equalsInteger + 0 + (remainderInteger + boardSize + 2)) + (/\dead -> + Board + boardSize + 1 + (Just + {Tuple2 + integer + integer} + st) + ((let + a + = Tuple2 + integer + integer + in + \(g : + all b. + (a -> + b -> + b) -> + b -> + b) -> + g + {List a} + (\(ds : a) + (ds : + List + a) -> + Cons + {a} + ds + ds) + (Nil {a})) + (/\a -> + \(c : + Tuple2 + integer + integer -> + a -> + a) + (n : a) -> + c st n))) + (/\dead -> + error {ChessSet}) + {all dead. dead}) + ds) {all dead. dead} in - go xs) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - in - go eta) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - xs) - {all dead. dead} - in - let - !interval : integer -> integer -> List integer - = \(a : integer) (b : integer) -> - letrec - !go : integer -> List integer - = \(a : integer) -> - ifThenElse - {all dead. List integer} - (lessThanEqualsInteger a b) - (/\dead -> Cons {integer} a (go (addInteger 1 a))) - (/\dead -> Nil {integer}) - {all dead. dead} - in - go a - in - letrec - !go : List Direction -> integer - = \(ds : List Direction) -> - List_match - {Direction} - ds - {all dead. integer} - (/\dead -> 0) - (\(x : Direction) (xs : List Direction) -> - /\dead -> addInteger 1 (go xs)) - {all dead. dead} - in - let - !move : Direction -> Tuple2 integer integer -> Tuple2 integer integer - = \(ds : Direction) (ds : Tuple2 integer integer) -> - Direction_match - ds - {all dead. Tuple2 integer integer} - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (subtractInteger x 1) - (addInteger 2 y))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (addInteger 1 x) - (addInteger 2 y))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (subtractInteger x 2) - (addInteger 1 y))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (subtractInteger x 2) - (subtractInteger y 1))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (addInteger 2 x) - (addInteger 1 y))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (addInteger 2 x) - (subtractInteger y 1))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (subtractInteger x 1) - (subtractInteger y 2))) - (/\dead -> - Tuple2_match - {integer} - {integer} - ds - {Tuple2 integer integer} - (\(x : integer) (y : integer) -> - Tuple2 - {integer} - {integer} - (addInteger 1 x) - (subtractInteger y 2))) - {all dead. dead} - in - letrec - !notIn : all a. (\a -> a -> a -> Bool) a -> a -> List a -> Bool - = /\a -> - \(`$dEq` : (\a -> a -> a -> Bool) a) (ds : a) (ds : List a) -> - List_match - {a} - ds - {all dead. Bool} - (/\dead -> True) - (\(a : a) (as : List a) -> - /\dead -> - Bool_match - (`$dEq` ds a) - {all dead. Bool} - (/\dead -> False) - (/\dead -> notIn {a} `$dEq` ds as) - {all dead. dead}) - {all dead. dead} - in - let - !canMoveTo : Tuple2 integer integer -> ChessSet -> Bool - = \(t : Tuple2 integer integer) (board : ChessSet) -> + let + !eta : List integer = interval 1 boardSize + in + go eta) + {all dead. dead} + in + let + !eta : List integer = interval 1 boardSize + in + go eta) + (\(ds : ChessSet) (ds : List ChessSet) -> + Cons {ChessSet} ds ds) + (Nil {ChessSet}) + !numStarts : integer = go l + in + zip + {integer} + {ChessSet} + (let + !x : integer = subtractInteger 1 numStarts + in + letrec + !go : integer -> List integer + = \(n : integer) -> + ifThenElse + {all dead. List integer} + (lessThanEqualsInteger n 0) + (/\dead -> Nil {integer}) + (/\dead -> Cons {integer} x (go (subtractInteger n 1))) + {all dead. dead} + in + go numStarts) + l + in + go list) + (\(ds : Tuple2 integer ChessSet) -> Tuple2_match {integer} - {integer} - t - {Bool} - (\(x : integer) (y : integer) -> - ChessSet_match - board - {Bool} - (\(ipv : integer) - (ipv : integer) - (ipv : Maybe (Tuple2 integer integer)) - (ipv : List (Tuple2 integer integer)) -> - ifThenElse - {all dead. Bool} - (lessThanInteger x 1) - (/\dead -> False) - (/\dead -> - ifThenElse - {all dead. Bool} - (lessThanEqualsInteger x ipv) - (/\dead -> - ifThenElse - {all dead. Bool} - (lessThanInteger y 1) - (/\dead -> False) - (/\dead -> - ifThenElse - {all dead. Bool} - (lessThanEqualsInteger y ipv) - (/\dead -> - notIn - {Tuple2 integer integer} - (\(ds : Tuple2 integer integer) - (ds : Tuple2 integer integer) -> - Tuple2_match - {integer} - {integer} - ds - {Bool} - (\(a : integer) (b : integer) -> - Tuple2_match - {integer} - {integer} - ds - {Bool} - (\(a' : integer) - (b' : integer) -> - ifThenElse - {all dead. Bool} - (equalsInteger a a') - (/\dead -> - equalsInteger b b') - (/\dead -> False) - {all dead. dead}))) - t - ipv) - (/\dead -> False) - {all dead. dead}) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. dead})) - !possibleMoves : ChessSet -> List Direction - = \(board : ChessSet) -> - ChessSet_match - board - {List Direction} - (\(ipv : integer) - (ipv : integer) - (ipv : Maybe (Tuple2 integer integer)) - (ipv : List (Tuple2 integer integer)) -> + {ChessSet} + ds + {List (Tuple2 integer ChessSet)} + (\(x : integer) (y : ChessSet) -> (let - a = List Direction + !a : integer = addInteger 1 x in - \(c : Direction -> a -> a) -> - let - !c : Direction -> a -> a - = \(ds : Direction) (ds : a) -> - Bool_match - (canMoveTo - (move - ds - (List_match - {Tuple2 integer integer} - ipv - {all dead. Tuple2 integer integer} - (/\dead -> error {Tuple2 integer integer}) - (\(t : Tuple2 integer integer) - (ds : List (Tuple2 integer integer)) -> - /\dead -> t) - {all dead. dead})) - board) - {all dead. a} - (/\dead -> c ds ds) - (/\dead -> ds) - {all dead. dead} - in - \(n : a) -> - c UL (c UR (c DL (c DR (c LU (c LD (c RU (c RD n)))))))) - (\(ds : Direction) (ds : List Direction) -> - Cons {Direction} ds ds) - (Nil {Direction})) - !deleteFirst : ChessSet -> ChessSet - = \(ds : ChessSet) -> - ChessSet_match - ds - {ChessSet} - (\(s : integer) - (n : integer) - (ds : Maybe (Tuple2 integer integer)) - (ts : List (Tuple2 integer integer)) -> - let - !f' : Maybe (Tuple2 integer integer) - = (let - a = Tuple2 integer integer - in - letrec - !rev : List a -> List a -> Maybe a - = \(ds : List a) (a : List a) -> - List_match - {a} - ds - {all dead. Maybe a} - (/\dead -> - List_match - {a} - a - {all dead. Maybe a} - (/\dead -> error {Maybe a}) - (\(ds : a) (ds : List a) -> - /\dead -> - List_match - {a} - ds - {all dead. Maybe a} - (/\dead -> Nothing {a}) - (\(a : a) (ds : List a) -> - /\dead -> Just {a} a) - {all dead. dead}) - {all dead. dead}) - (\(x : a) (xs : List a) -> - /\dead -> rev xs (Cons {a} x a)) - {all dead. dead} - in - \(l : List a) -> rev l (Nil {a})) - ts - in - letrec - !rev : - List (Tuple2 integer integer) -> - List (Tuple2 integer integer) -> - ChessSet - = \(ds : List (Tuple2 integer integer)) - (a : List (Tuple2 integer integer)) -> - List_match - {Tuple2 integer integer} - ds - {all dead. ChessSet} - (/\dead -> - List_match - {Tuple2 integer integer} - a - {all dead. ChessSet} - (/\dead -> - let - !ts' : List (Tuple2 integer integer) - = error {List (Tuple2 integer integer)} - in - Board s (subtractInteger n 1) f' ts') - (\(ds : Tuple2 integer integer) - (as : List (Tuple2 integer integer)) -> - /\dead -> - let - !ts' : List (Tuple2 integer integer) - = (let - a = Tuple2 integer integer - in - letrec - !rev : List a -> List a -> List a - = \(ds : List a) (a : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> a) - (\(x : a) (xs : List a) -> - /\dead -> - rev xs (Cons {a} x a)) - {all dead. dead} - in - \(l : List a) -> rev l (Nil {a})) - as - in - Board s (subtractInteger n 1) f' ts') - {all dead. dead}) - (\(x : Tuple2 integer integer) - (xs : List (Tuple2 integer integer)) -> - /\dead -> - rev xs (Cons {Tuple2 integer integer} x a)) - {all dead. dead} - in - rev ts (Nil {Tuple2 integer integer})) - !descAndNo : ChessSet -> List (Tuple2 integer ChessSet) - = \(board : ChessSet) -> - letrec - !go : List Direction -> List ChessSet - = \(ds : List Direction) -> - List_match - {Direction} - ds - {all dead. List ChessSet} - (/\dead -> Nil {ChessSet}) - (\(x : Direction) (xs : List Direction) -> - /\dead -> - Cons - {ChessSet} - (ChessSet_match - board - {ChessSet} - (\(ipv : integer) - (ipv : integer) - (ipv : Maybe (Tuple2 integer integer)) - (ipv : List (Tuple2 integer integer)) -> - let - !t : Tuple2 integer integer - = move - x - (List_match - {Tuple2 integer integer} - ipv - {all dead. Tuple2 integer integer} - (/\dead -> - error {Tuple2 integer integer}) - (\(t : Tuple2 integer integer) - (ds : - List - (Tuple2 integer integer)) -> - /\dead -> t) - {all dead. dead}) - in - Board - ipv - (addInteger 1 ipv) - ipv - (Cons {Tuple2 integer integer} t ipv))) - (go xs)) - {all dead. dead} - in - (let - a = Tuple2 integer ChessSet - in - \(g : all b. (a -> b -> b) -> b -> b) -> - g {List a} (\(ds : a) (ds : List a) -> Cons {a} ds ds) (Nil {a})) - (/\a -> - \(c : Tuple2 integer ChessSet -> a -> a) (n : a) -> letrec - !go : List ChessSet -> a + !go : List ChessSet -> List (Tuple2 integer ChessSet) = \(ds : List ChessSet) -> List_match {ChessSet} ds - {all dead. a} - (/\dead -> n) - (\(y : ChessSet) (ys : List ChessSet) -> + {all dead. List (Tuple2 integer ChessSet)} + (/\dead -> Nil {Tuple2 integer ChessSet}) + (\(x : ChessSet) (xs : List ChessSet) -> /\dead -> - let - !ds : a = go ys - in - c - (Tuple2 - {integer} - {ChessSet} - (go (possibleMoves (deleteFirst y))) - y) - ds) + Cons + {Tuple2 integer ChessSet} + (Tuple2 {integer} {ChessSet} a x) + (go xs)) {all dead. dead} in - let - !eta : List ChessSet = go (possibleMoves board) - in - go eta) - in - letrec - !zip : all a b. List a -> List b -> List (Tuple2 a b) - = /\a b -> - \(ds : List a) (_bs : List b) -> - List_match - {a} - ds - {all dead. List (Tuple2 a b)} - (/\dead -> Nil {Tuple2 a b}) - (\(ipv : a) (ipv : List a) -> - /\dead -> - List_match - {b} - _bs - {all dead. List (Tuple2 a b)} - (/\dead -> Nil {Tuple2 a b}) - (\(ipv : b) (ipv : List b) -> - /\dead -> - Cons - {Tuple2 a b} - (Tuple2 {a} {b} ipv ipv) - (zip {a} {b} ipv ipv)) - {all dead. dead}) - {all dead. dead} - in - \(depth : integer) - (boardSize : integer) -> - depthSearch - {Tuple2 integer ChessSet} - (\(ds : Tuple2 integer ChessSet) (ds : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - ds - {Bool} - (\(a : integer) (b : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - ds - {Bool} - (\(a' : integer) (b' : ChessSet) -> - Bool_match - (equalsInteger a a') - {all dead. Bool} - (/\dead -> True) - (/\dead -> False) - {all dead. dead}))) - depth - (let - !list : - List (Tuple2 integer ChessSet) - = let - !l : - List ChessSet - = (let - a = List ChessSet - in - \(c : ChessSet -> a -> a) - (n : a) -> - letrec - !go : - List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : List integer) -> - /\dead -> - let - !ds : a = go ys + \(eta : List ChessSet) -> go eta) + (ChessSet_match + y + {List ChessSet} + (\(ipv : integer) + (ipv : integer) + (ipv : Maybe (Tuple2 integer integer)) + (ipv : List (Tuple2 integer integer)) -> + let + !singles : List ChessSet + = (let + a = List ChessSet + in + \(c : ChessSet -> a -> a) (n : a) -> + (let + a = Tuple2 integer ChessSet in - letrec - !go : - List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds + /\b -> + \(k : a -> b -> b) (z : b) -> + letrec + !go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> z) + (\(y : a) (ys : List a) -> + /\dead -> k y (go ys)) + {all dead. dead} + in + \(eta : List a) -> go eta) + {a} + (\(ds : Tuple2 integer ChessSet) (ds : a) -> + Tuple2_match + {integer} + {ChessSet} + ds + {a} + (\(y : integer) (x : ChessSet) -> + ifThenElse {all dead. a} + (equalsInteger 1 y) + (/\dead -> c x ds) (/\dead -> ds) - (\(y : integer) -> - let - !st : Tuple2 integer integer - = Tuple2 - {integer} - {integer} - y - y - in - \(ys : List integer) -> - /\dead -> - let - !ds : a = go ys - in - c - (ifThenElse - {all dead. ChessSet} - (equalsInteger - 0 - (remainderInteger - boardSize - 2)) - (/\dead -> - Board - boardSize - 1 - (Just - {Tuple2 - integer - integer} - st) - ((let - a - = Tuple2 - integer - integer - in - \(g : - all b. - (a -> - b -> - b) -> - b -> - b) -> - g - {List a} - (\(ds : a) - (ds : - List - a) -> - Cons - {a} - ds - ds) - (Nil {a})) - (/\a -> - \(c : - Tuple2 - integer - integer -> - a -> - a) - (n : a) -> - c st n))) - (/\dead -> - error {ChessSet}) - {all dead. dead}) - ds) - {all dead. dead} - in - let - !eta : List integer = interval 1 boardSize - in - go eta) - {all dead. dead} - in - let - !eta : List integer = interval 1 boardSize - in - go eta) - (\(ds : ChessSet) (ds : List ChessSet) -> - Cons {ChessSet} ds ds) - (Nil {ChessSet}) - !numStarts : integer = go l - in - zip - {integer} - {ChessSet} - (let - !x : integer = subtractInteger 1 numStarts - in - letrec - !go : integer -> List integer - = \(n : integer) -> - ifThenElse - {all dead. List integer} - (lessThanEqualsInteger n 0) - (/\dead -> Nil {integer}) - (/\dead -> Cons {integer} x (go (subtractInteger n 1))) - {all dead. dead} - in - go numStarts) - l - in - go list) - (\(ds : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - ds - {List (Tuple2 integer ChessSet)} - (\(x : integer) (y : ChessSet) -> - (let - !a : integer = addInteger 1 x - in - letrec - !go : List ChessSet -> List (Tuple2 integer ChessSet) - = \(ds : List ChessSet) -> - List_match - {ChessSet} - ds - {all dead. List (Tuple2 integer ChessSet)} - (/\dead -> Nil {Tuple2 integer ChessSet}) - (\(x : ChessSet) (xs : List ChessSet) -> - /\dead -> - Cons - {Tuple2 integer ChessSet} - (Tuple2 {integer} {ChessSet} a x) - (go xs)) - {all dead. dead} - in - \(eta : List ChessSet) -> go eta) - (ChessSet_match - y - {List ChessSet} - (\(ipv : integer) - (ipv : integer) - (ipv : Maybe (Tuple2 integer integer)) - (ipv : List (Tuple2 integer integer)) -> - let - !singles : List ChessSet - = (let - a = List ChessSet - in - \(c : ChessSet -> a -> a) (n : a) -> - (let - a = Tuple2 integer ChessSet - in - /\b -> - \(k : a -> b -> b) (z : b) -> - letrec - !go : List a -> b - = \(ds : List a) -> - List_match - {a} - ds - {all dead. b} - (/\dead -> z) - (\(y : a) (ys : List a) -> - /\dead -> k y (go ys)) - {all dead. dead} - in - \(eta : List a) -> go eta) - {a} - (\(ds : Tuple2 integer ChessSet) (ds : a) -> - Tuple2_match - {integer} - {ChessSet} - ds - {a} - (\(y : integer) (x : ChessSet) -> - ifThenElse - {all dead. a} - (equalsInteger 1 y) - (/\dead -> c x ds) - (/\dead -> ds) - {all dead. dead})) - n - (descAndNo y)) - (\(ds : ChessSet) (ds : List ChessSet) -> - Cons {ChessSet} ds ds) - (Nil {ChessSet}) - ~`$j` : List ChessSet - = let - !l : integer = go singles - in - ifThenElse - {all dead. List ChessSet} - (equalsInteger 0 l) - (/\dead -> - go - (quickSort - {Tuple2 integer ChessSet} - (CConsOrd - {Tuple2 integer ChessSet} - (\(eta : Tuple2 integer ChessSet) - (eta : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - eta - {Bool} - (\(a : integer) (b : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - eta - {Bool} - (\(a' : integer) - (b' : ChessSet) -> - Bool_match - (`$p1Ord` - {integer} - v - a - a') - {all dead. Bool} - (/\dead -> - `$p1Ord` - {ChessSet} - v - b - b') - (/\dead -> False) - {all dead. dead}))) - (\(ds : Tuple2 integer ChessSet) - (ds : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - ds - {Ordering} - (\(a : integer) (b : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - ds - {Ordering} - (\(a' : integer) -> - let - ~defaultBody : Ordering - = compare + {all dead. dead})) + n + (descAndNo y)) + (\(ds : ChessSet) (ds : List ChessSet) -> + Cons {ChessSet} ds ds) + (Nil {ChessSet}) + ~`$j` : List ChessSet + = let + !l : integer = go singles + in + ifThenElse + {all dead. List ChessSet} + (equalsInteger 0 l) + (/\dead -> + go + (quickSort + {Tuple2 integer ChessSet} + (CConsOrd + {Tuple2 integer ChessSet} + (\(eta : Tuple2 integer ChessSet) + (eta : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + eta + {Bool} + (\(a : integer) (b : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + eta + {Bool} + (\(a' : integer) + (b' : ChessSet) -> + Bool_match + (`$p1Ord` + {integer} + v + a + a') + {all dead. Bool} + (/\dead -> + `$p1Ord` + {ChessSet} + v + b + b') + (/\dead -> False) + {all dead. dead}))) + (\(ds : Tuple2 integer ChessSet) + (ds : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + ds + {Ordering} + (\(a : integer) (b : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + ds + {Ordering} + (\(a' : integer) -> + let + ~defaultBody : Ordering + = compare + {integer} + v + a + a' + in + \(b' : ChessSet) -> + Ordering_match + (compare {integer} v a - a' - in - \(b' : ChessSet) -> - Ordering_match - (compare - {integer} - v - a - a') - {all dead. Ordering} - (/\dead -> - compare - {ChessSet} - v - b - b') - (/\dead -> defaultBody) - (/\dead -> defaultBody) - {all dead. dead}))) - (\(x : Tuple2 integer ChessSet) - (y : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - x - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - y - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Ordering_match - (compare - {integer} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {ChessSet} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> False) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}))) - (\(x : Tuple2 integer ChessSet) - (y : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - x - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - y - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Ordering_match - (compare - {integer} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {ChessSet} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> True) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}))) - (\(x : Tuple2 integer ChessSet) - (y : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - x - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - y - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Ordering_match - (compare - {integer} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {ChessSet} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}))) - (\(x : Tuple2 integer ChessSet) - (y : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - x - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - y - {Bool} - (\(ipv : integer) - (ipv : ChessSet) -> - Ordering_match - (compare - {integer} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> - Ordering_match - (compare - {ChessSet} - v - ipv - ipv) - {all dead. Bool} - (/\dead -> True) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}) - (/\dead -> True) - (/\dead -> False) - {all dead. dead}))) - (\(x : Tuple2 integer ChessSet) - (y : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - x - {Tuple2 integer ChessSet} - (\(ipv : integer) - (ipv : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - y - {Tuple2 integer ChessSet} - (\(ipv : integer) - (ipv : ChessSet) -> - Ordering_match - (compare - {integer} - v - ipv - ipv) - {all dead. - Tuple2 - integer - ChessSet} - (/\dead -> - Ordering_match - (compare - {ChessSet} - v - ipv - ipv) - {all dead. - Tuple2 - integer - ChessSet} - (/\dead -> y) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}))) - (\(x : Tuple2 integer ChessSet) - (y : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - x - {Tuple2 integer ChessSet} - (\(ipv : integer) - (ipv : ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - y - {Tuple2 integer ChessSet} - (\(ipv : integer) - (ipv : ChessSet) -> - Ordering_match - (compare - {integer} - v - ipv - ipv) - {all dead. - Tuple2 - integer - ChessSet} - (/\dead -> - Ordering_match - (compare + a') + {all dead. Ordering} + (/\dead -> + compare {ChessSet} v - ipv - ipv) - {all dead. - Tuple2 - integer - ChessSet} - (/\dead -> x) - (/\dead -> y) - (/\dead -> x) - {all dead. dead}) - (/\dead -> y) - (/\dead -> x) - {all dead. dead})))) - (descAndNo y))) - (/\dead -> - ifThenElse - {all dead. List ChessSet} - (equalsInteger 1 l) - (/\dead -> singles) - (/\dead -> Nil {ChessSet}) - {all dead. dead}) - {all dead. dead} - in - Bool_match - (canMoveTo + b + b') + (/\dead -> defaultBody) + (/\dead -> defaultBody) + {all dead. dead}))) + (\(x : Tuple2 integer ChessSet) + (y : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + x + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + y + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Ordering_match + (compare + {integer} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {ChessSet} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> False) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}))) + (\(x : Tuple2 integer ChessSet) + (y : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + x + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + y + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Ordering_match + (compare + {integer} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {ChessSet} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> True) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}))) + (\(x : Tuple2 integer ChessSet) + (y : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + x + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + y + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Ordering_match + (compare + {integer} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {ChessSet} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}))) + (\(x : Tuple2 integer ChessSet) + (y : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + x + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + y + {Bool} + (\(ipv : integer) + (ipv : ChessSet) -> + Ordering_match + (compare + {integer} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> + Ordering_match + (compare + {ChessSet} + v + ipv + ipv) + {all dead. Bool} + (/\dead -> True) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}) + (/\dead -> True) + (/\dead -> False) + {all dead. dead}))) + (\(x : Tuple2 integer ChessSet) + (y : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + x + {Tuple2 integer ChessSet} + (\(ipv : integer) + (ipv : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + y + {Tuple2 integer ChessSet} + (\(ipv : integer) + (ipv : ChessSet) -> + Ordering_match + (compare + {integer} + v + ipv + ipv) + {all dead. + Tuple2 + integer + ChessSet} + (/\dead -> + Ordering_match + (compare + {ChessSet} + v + ipv + ipv) + {all dead. + Tuple2 + integer + ChessSet} + (/\dead -> y) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}))) + (\(x : Tuple2 integer ChessSet) + (y : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + x + {Tuple2 integer ChessSet} + (\(ipv : integer) + (ipv : ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + y + {Tuple2 integer ChessSet} + (\(ipv : integer) + (ipv : ChessSet) -> + Ordering_match + (compare + {integer} + v + ipv + ipv) + {all dead. + Tuple2 + integer + ChessSet} + (/\dead -> + Ordering_match + (compare + {ChessSet} + v + ipv + ipv) + {all dead. + Tuple2 + integer + ChessSet} + (/\dead -> x) + (/\dead -> y) + (/\dead -> x) + {all dead. dead}) + (/\dead -> y) + (/\dead -> x) + {all dead. dead})))) + (descAndNo y))) + (/\dead -> + ifThenElse + {all dead. List ChessSet} + (equalsInteger 1 l) + (/\dead -> singles) + (/\dead -> Nil {ChessSet}) + {all dead. dead}) + {all dead. dead} + in + Bool_match + (canMoveTo + (Maybe_match + {Tuple2 integer integer} + ipv + {all dead. Tuple2 integer integer} + (\(tile : Tuple2 integer integer) -> + /\dead -> tile) + (/\dead -> error {Tuple2 integer integer}) + {all dead. dead}) + (deleteFirst y)) + {all dead. List ChessSet} + (/\dead -> + Bool_match + (let + !board : ChessSet + = Maybe_match + {Tuple2 integer integer} + ipv + {all dead. ChessSet} + (\(tile : Tuple2 integer integer) -> + /\dead -> + Board + ipv + (addInteger 1 ipv) + ipv + (Cons + {Tuple2 integer integer} + tile + ipv)) + (/\dead -> + let + !t : Tuple2 integer integer + = error {Tuple2 integer integer} + in + Board + ipv + (addInteger 1 ipv) + (Nothing {Tuple2 integer integer}) + (Cons + {Tuple2 integer integer} + t + ipv)) + {all dead. dead} + in + ifThenElse + {Bool} + (equalsInteger 0 (go (possibleMoves board))) + True + False) + {all dead. List ChessSet} + (/\dead -> Nil {ChessSet}) + (/\dead -> `$j`) + {all dead. dead}) + (/\dead -> `$j`) + {all dead. dead})))) + (\(ds : Tuple2 integer ChessSet) -> + Tuple2_match + {integer} + {ChessSet} + ds + {Bool} + (\(ds : integer) (y : ChessSet) -> + ChessSet_match + y + {Bool} + (\(ipv : integer) + (ipv : integer) + (ipv : Maybe (Tuple2 integer integer)) + (ipv : List (Tuple2 integer integer)) -> + ifThenElse + {all dead. Bool} + (equalsInteger ipv (multiplyInteger ipv ipv)) + (/\dead -> + canMoveTo (Maybe_match {Tuple2 integer integer} ipv @@ -1503,77 +1583,7 @@ (/\dead -> error {Tuple2 integer integer}) {all dead. dead}) (deleteFirst y)) - {all dead. List ChessSet} - (/\dead -> - Bool_match - (let - !board : ChessSet - = Maybe_match - {Tuple2 integer integer} - ipv - {all dead. ChessSet} - (\(tile : Tuple2 integer integer) -> - /\dead -> - Board - ipv - (addInteger 1 ipv) - ipv - (Cons - {Tuple2 integer integer} - tile - ipv)) - (/\dead -> - let - !t : Tuple2 integer integer - = error {Tuple2 integer integer} - in - Board - ipv - (addInteger 1 ipv) - (Nothing {Tuple2 integer integer}) - (Cons {Tuple2 integer integer} t ipv)) - {all dead. dead} - in - ifThenElse - {Bool} - (equalsInteger 0 (go (possibleMoves board))) - True - False) - {all dead. List ChessSet} - (/\dead -> Nil {ChessSet}) - (/\dead -> `$j`) - {all dead. dead}) - (/\dead -> `$j`) - {all dead. dead})))) - (\(ds : Tuple2 integer ChessSet) -> - Tuple2_match - {integer} - {ChessSet} - ds - {Bool} - (\(ds : integer) (y : ChessSet) -> - ChessSet_match - y - {Bool} - (\(ipv : integer) - (ipv : integer) - (ipv : Maybe (Tuple2 integer integer)) - (ipv : List (Tuple2 integer integer)) -> - ifThenElse - {all dead. Bool} - (equalsInteger ipv (multiplyInteger ipv ipv)) - (/\dead -> - canMoveTo - (Maybe_match - {Tuple2 integer integer} - ipv - {all dead. Tuple2 integer integer} - (\(tile : Tuple2 integer integer) -> - /\dead -> tile) - (/\dead -> error {Tuple2 integer integer}) - {all dead. dead}) - (deleteFirst y)) - (/\dead -> False) - {all dead. dead})))) - 10 - 4 \ No newline at end of file + (/\dead -> False) + {all dead. dead})))) + 10 + 4) \ No newline at end of file diff --git a/plutus-benchmark/nofib/test/9.6/queens4-bt.pir.golden b/plutus-benchmark/nofib/test/9.6/queens4-bt.pir.golden index f674eaefc97..d810c199745 100644 --- a/plutus-benchmark/nofib/test/9.6/queens4-bt.pir.golden +++ b/plutus-benchmark/nofib/test/9.6/queens4-bt.pir.golden @@ -1,1707 +1,1721 @@ -(let - data (Tuple2 :: * -> * -> *) a b | Tuple2_match where - Tuple2 : a -> b -> Tuple2 a b - in - letrec - data (List :: * -> *) a | List_match where - Nil : List a - Cons : a -> List a -> List a - in - let - data ConflictSet | ConflictSet_match where - Known : List integer -> ConflictSet - Unknown : ConflictSet - data Assign | Assign_match where - `Cons=` : integer -> integer -> Assign - in - letrec - !go : List (Tuple2 (List Assign) ConflictSet) -> List (List Assign) - = \(ds : List (Tuple2 (List Assign) ConflictSet)) -> - List_match - {Tuple2 (List Assign) ConflictSet} - ds - {all dead. List (List Assign)} - (/\dead -> Nil {List Assign}) - (\(x : Tuple2 (List Assign) ConflictSet) - (xs : List (Tuple2 (List Assign) ConflictSet)) -> - /\dead -> - Cons - {List Assign} - (Tuple2_match - {List Assign} - {ConflictSet} - x - {List Assign} - (\(a : List Assign) (ds : ConflictSet) -> a)) - (go xs)) - {all dead. dead} - in - let - data Bool | Bool_match where - True : Bool - False : Bool - in - letrec - !go : List ConflictSet -> Bool - = \(ds : List ConflictSet) -> - List_match - {ConflictSet} - ds - {all dead. Bool} - (/\dead -> True) - (\(x : ConflictSet) (xs : List ConflictSet) -> - /\dead -> - Bool_match - (ConflictSet_match - x - {all dead. Bool} - (\(ds : List integer) -> - /\dead -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> False) - (\(a : integer) (as : List integer) -> - /\dead -> True) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. Bool} - (/\dead -> go xs) - (/\dead -> False) - {all dead. dead}) - {all dead. dead} - in - letrec - data (Tree :: * -> *) a | Tree_match where - Node : a -> List (Tree a) -> Tree a - in - letrec - !go : - List (Tree (Tuple2 (List Assign) ConflictSet)) -> - List (Tuple2 (List Assign) ConflictSet) - = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - List_match - {Tree (Tuple2 (List Assign) ConflictSet)} - ds - {all dead. List (Tuple2 (List Assign) ConflictSet)} - (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) - (\(x : Tree (Tuple2 (List Assign) ConflictSet)) - (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - /\dead -> - Cons - {Tuple2 (List Assign) ConflictSet} - (Tree_match - {Tuple2 (List Assign) ConflictSet} - x - {Tuple2 (List Assign) ConflictSet} - (\(lab : Tuple2 (List Assign) ConflictSet) - (ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - lab)) - (go xs)) - {all dead. dead} - in - letrec - !go : - List (Tree (Tuple2 (List Assign) ConflictSet)) -> - List (Tuple2 (List Assign) ConflictSet) - = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - List_match - {Tree (Tuple2 (List Assign) ConflictSet)} - ds - {all dead. List (Tuple2 (List Assign) ConflictSet)} - (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) - (\(x : Tree (Tuple2 (List Assign) ConflictSet)) - (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - /\dead -> - Cons - {Tuple2 (List Assign) ConflictSet} - (Tree_match - {Tuple2 (List Assign) ConflictSet} - x - {Tuple2 (List Assign) ConflictSet} - (\(lab : Tuple2 (List Assign) ConflictSet) - (ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - lab)) - (go xs)) - {all dead. dead} - in - let - data Algorithm | Algorithm_match where - Bjbt : Algorithm - Bjbt : Algorithm - Bm : Algorithm - Bt : Algorithm - Fc : Algorithm - !equalsInteger : integer -> integer -> Bool - = \(x : integer) (y : integer) -> - ifThenElse {Bool} (equalsInteger x y) True False - data Unit | Unit_match where - Unit : Unit - in - letrec - !deleteBy : all a. (a -> a -> Bool) -> a -> List a -> List a - = /\a -> - \(ds : a -> a -> Bool) (ds : a) (ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> Nil {a}) - (\(y : a) (ys : List a) -> - /\dead -> - Bool_match - (ds ds y) - {all dead. List a} - (/\dead -> ys) - (/\dead -> Cons {a} y (deleteBy {a} ds ds ys)) - {all dead. dead}) - {all dead. dead} - in - let - !unionBy : all a. (a -> a -> Bool) -> List a -> List a -> List a - = /\a -> - \(eq : a -> a -> Bool) -> - letrec - !go : List a -> List a -> List a - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List a -> List a} - (/\dead -> \(x : List a) -> x) - (\(x : a) (xs : List a) -> - /\dead -> \(b : List a) -> go xs (deleteBy {a} eq x b)) - {all dead. dead} - in - letrec - !nubBy' : List a -> List a -> List a - = \(ds : List a) (ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> Nil {a}) - (\(y : a) (ys : List a) -> - letrec - !go : List a -> List a - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> - Cons {a} y (nubBy' ys (Cons {a} y ds))) - (\(x : a) (xs : List a) -> - /\dead -> - Bool_match - (eq x y) - {all dead. List a} - (/\dead -> nubBy' ys ds) - (/\dead -> go xs) - {all dead. dead}) - {all dead. dead} - in - /\dead -> go ds) - {all dead. dead} - in - \(xs : List a) (ys : List a) -> - let - !r : List a = let !z : List a = nubBy' ys (Nil {a}) in go xs z - in - letrec - !go : List a -> List a - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> r) - (\(x : a) (xs : List a) -> /\dead -> Cons {a} x (go xs)) - {all dead. dead} - in - go xs - in - letrec - !combine : - List (Tuple2 (List Assign) ConflictSet) -> List integer -> List integer - = \(ds : List (Tuple2 (List Assign) ConflictSet)) (acc : List integer) -> - List_match - {Tuple2 (List Assign) ConflictSet} - ds - {all dead. List integer} - (/\dead -> acc) - (\(ds : Tuple2 (List Assign) ConflictSet) - (css : List (Tuple2 (List Assign) ConflictSet)) -> - /\dead -> - Tuple2_match - {List Assign} - {ConflictSet} - ds - {List integer} - (\(s : List Assign) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. List integer} - (\(cs : List integer) -> - /\dead -> - Bool_match - ((let - !a : integer - = List_match - {Assign} - s - {integer} - 0 - (\(ds : Assign) (ds : List Assign) -> - Assign_match - ds - {integer} - (\(var : integer) - (val : integer) -> - var)) - in - letrec - !go : List integer -> Bool - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> True) - (\(x : integer) - (xs : List integer) -> - /\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger a x) - (/\dead -> False) - (/\dead -> go xs) - {all dead. dead}) - {all dead. dead} - in - \(x : List integer) -> go x) - cs) - {all dead. List integer} - (/\dead -> cs) - (/\dead -> - combine - css - (unionBy {integer} equalsInteger cs acc)) - {all dead. dead}) - (/\dead -> - Unit_match - (error {Unit}) - {List integer} - (error {List integer})) - {all dead. dead})) - {all dead. dead} - in - letrec - !rev : List Assign -> List Assign -> List Assign - = \(ds : List Assign) (a : List Assign) -> - List_match - {Assign} - ds - {all dead. List Assign} - (/\dead -> a) - (\(x : Assign) (xs : List Assign) -> - /\dead -> rev xs (Cons {Assign} x a)) - {all dead. dead} - in - let - data (Maybe :: * -> *) a | Maybe_match where - Just : a -> Maybe a - Nothing : Maybe a - data CSP | CSP_match where - CSP : integer -> integer -> (Assign -> Assign -> Bool) -> CSP - !checkComplete : CSP -> List Assign -> ConflictSet - = \(csp : CSP) (s : List Assign) -> - CSP_match - csp - {ConflictSet} - (\(ipv : integer) - (ipv : integer) - (ipv : Assign -> Assign -> Bool) -> - ifThenElse - {all dead. ConflictSet} - (equalsInteger - (List_match - {Assign} - s - {integer} - 0 - (\(ds : Assign) (ds : List Assign) -> - Assign_match - ds - {integer} - (\(var : integer) (val : integer) -> var))) - ipv) - (/\dead -> Known (Nil {integer})) - (/\dead -> Unknown) - {all dead. dead}) - in - letrec - !mapTree : all a b. (a -> b) -> Tree a -> Tree b - = /\a b -> - \(f : a -> b) (ds : Tree a) -> - Tree_match - {a} - ds - {Tree b} - (\(a : a) (cs : List (Tree a)) -> - Node - {b} - (f a) - (let - !f : Tree a -> Tree b = mapTree {a} {b} f - in - letrec - !go : List (Tree a) -> List (Tree b) - = \(ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List (Tree b)} - (/\dead -> Nil {Tree b}) - (\(x : Tree a) (xs : List (Tree a)) -> - /\dead -> Cons {Tree b} (f x) (go xs)) - {all dead. dead} - in - go cs)) - in - let - !filter : all a. (a -> Bool) -> List a -> List a - = /\a -> - \(p : a -> Bool) -> - letrec - !go : List a -> List a - = \(ds : List a) -> - List_match - {a} - ds +((let + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + data ConflictSet | ConflictSet_match where + Known : List integer -> ConflictSet + Unknown : ConflictSet + data Assign | Assign_match where + `Cons=` : integer -> integer -> Assign + in + letrec + !go : List (Tuple2 (List Assign) ConflictSet) -> List (List Assign) + = \(ds : List (Tuple2 (List Assign) ConflictSet)) -> + List_match + {Tuple2 (List Assign) ConflictSet} + ds + {all dead. List (List Assign)} + (/\dead -> Nil {List Assign}) + (\(x : Tuple2 (List Assign) ConflictSet) + (xs : List (Tuple2 (List Assign) ConflictSet)) -> + /\dead -> + Cons + {List Assign} + (Tuple2_match + {List Assign} + {ConflictSet} + x + {List Assign} + (\(a : List Assign) (ds : ConflictSet) -> a)) + (go xs)) + {all dead. dead} + in + let + data Bool | Bool_match where + True : Bool + False : Bool + in + letrec + !go : List ConflictSet -> Bool + = \(ds : List ConflictSet) -> + List_match + {ConflictSet} + ds + {all dead. Bool} + (/\dead -> True) + (\(x : ConflictSet) (xs : List ConflictSet) -> + /\dead -> + Bool_match + (ConflictSet_match + x + {all dead. Bool} + (\(ds : List integer) -> + /\dead -> + List_match + {integer} + ds + {all dead. Bool} + (/\dead -> False) + (\(a : integer) (as : List integer) -> + /\dead -> True) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. Bool} + (/\dead -> go xs) + (/\dead -> False) + {all dead. dead}) + {all dead. dead} + in + letrec + data (Tree :: * -> *) a | Tree_match where + Node : a -> List (Tree a) -> Tree a + in + letrec + !go : + List (Tree (Tuple2 (List Assign) ConflictSet)) -> + List (Tuple2 (List Assign) ConflictSet) + = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + List_match + {Tree (Tuple2 (List Assign) ConflictSet)} + ds + {all dead. List (Tuple2 (List Assign) ConflictSet)} + (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) + (\(x : Tree (Tuple2 (List Assign) ConflictSet)) + (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + /\dead -> + Cons + {Tuple2 (List Assign) ConflictSet} + (Tree_match + {Tuple2 (List Assign) ConflictSet} + x + {Tuple2 (List Assign) ConflictSet} + (\(lab : Tuple2 (List Assign) ConflictSet) + (ds : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + lab)) + (go xs)) + {all dead. dead} + in + letrec + !go : + List (Tree (Tuple2 (List Assign) ConflictSet)) -> + List (Tuple2 (List Assign) ConflictSet) + = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + List_match + {Tree (Tuple2 (List Assign) ConflictSet)} + ds + {all dead. List (Tuple2 (List Assign) ConflictSet)} + (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) + (\(x : Tree (Tuple2 (List Assign) ConflictSet)) + (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + /\dead -> + Cons + {Tuple2 (List Assign) ConflictSet} + (Tree_match + {Tuple2 (List Assign) ConflictSet} + x + {Tuple2 (List Assign) ConflictSet} + (\(lab : Tuple2 (List Assign) ConflictSet) + (ds : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + lab)) + (go xs)) + {all dead. dead} + in + let + data Algorithm | Algorithm_match where + Bjbt : Algorithm + Bjbt : Algorithm + Bm : Algorithm + Bt : Algorithm + Fc : Algorithm + !equalsInteger : integer -> integer -> Bool + = \(x : integer) (y : integer) -> + ifThenElse {Bool} (equalsInteger x y) True False + data Unit | Unit_match where + Unit : Unit + in + letrec + !deleteBy : all a. (a -> a -> Bool) -> a -> List a -> List a + = /\a -> + \(ds : a -> a -> Bool) (ds : a) (ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(y : a) (ys : List a) -> + /\dead -> + Bool_match + (ds ds y) {all dead. List a} - (/\dead -> Nil {a}) - (\(x : a) (xs : List a) -> - /\dead -> - let - !xs : List a = go xs - in - Bool_match - (p x) - {all dead. List a} - (/\dead -> Cons {a} x xs) - (/\dead -> xs) - {all dead. dead}) - {all dead. dead} - in - \(eta : List a) -> go eta - !bt : CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) - = \(csp : CSP) -> - mapTree - {List Assign} - {Tuple2 (List Assign) ConflictSet} - (\(s : List Assign) -> - Tuple2 - {List Assign} - {ConflictSet} - s - (CSP_match - csp - {all dead. ConflictSet} - (\(ds : integer) - (ds : integer) - (ds : Assign -> Assign -> Bool) -> - Maybe_match - {Tuple2 integer integer} - (List_match - {Assign} - s - {all dead. Maybe (Tuple2 integer integer)} - (/\dead -> Nothing {Tuple2 integer integer}) - (\(a : Assign) (as : List Assign) -> - /\dead -> - List_match - {Assign} - (filter - {Assign} - (\(eta : Assign) -> + (/\dead -> ys) + (/\dead -> Cons {a} y (deleteBy {a} ds ds ys)) + {all dead. dead}) + {all dead. dead} + in + let + !unionBy : all a. (a -> a -> Bool) -> List a -> List a -> List a + = /\a -> + \(eq : a -> a -> Bool) -> + letrec + !go : List a -> List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a -> List a} + (/\dead -> \(x : List a) -> x) + (\(x : a) (xs : List a) -> + /\dead -> + \(b : List a) -> go xs (deleteBy {a} eq x b)) + {all dead. dead} + in + letrec + !nubBy' : List a -> List a -> List a + = \(ds : List a) (ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(y : a) (ys : List a) -> + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> + Cons {a} y (nubBy' ys (Cons {a} y ds))) + (\(x : a) (xs : List a) -> + /\dead -> Bool_match - (ds a eta) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) + (eq x y) + {all dead. List a} + (/\dead -> nubBy' ys ds) + (/\dead -> go xs) {all dead. dead}) - (rev as (Nil {Assign}))) - {all dead. Maybe (Tuple2 integer integer)} - (/\dead -> Nothing {Tuple2 integer integer}) - (\(b : Assign) (ds : List Assign) -> - /\dead -> - Just - {Tuple2 integer integer} - (Tuple2 - {integer} - {integer} - (Assign_match - a + {all dead. dead} + in + /\dead -> go ds) + {all dead. dead} + in + \(xs : List a) (ys : List a) -> + let + !r : List a = let !z : List a = nubBy' ys (Nil {a}) in go xs z + in + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> r) + (\(x : a) (xs : List a) -> + /\dead -> Cons {a} x (go xs)) + {all dead. dead} + in + go xs + in + letrec + !combine : + List (Tuple2 (List Assign) ConflictSet) -> List integer -> List integer + = \(ds : List (Tuple2 (List Assign) ConflictSet)) (acc : List integer) -> + List_match + {Tuple2 (List Assign) ConflictSet} + ds + {all dead. List integer} + (/\dead -> acc) + (\(ds : Tuple2 (List Assign) ConflictSet) + (css : List (Tuple2 (List Assign) ConflictSet)) -> + /\dead -> + Tuple2_match + {List Assign} + {ConflictSet} + ds + {List integer} + (\(s : List Assign) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. List integer} + (\(cs : List integer) -> + /\dead -> + Bool_match + ((let + !a : integer + = List_match + {Assign} + s + {integer} + 0 + (\(ds : Assign) (ds : List Assign) -> + Assign_match + ds {integer} (\(var : integer) (val : integer) -> var)) - (Assign_match - b - {integer} - (\(var : integer) - (val : integer) -> - var)))) - {all dead. dead}) - {all dead. dead}) - {all dead. ConflictSet} - (\(ds : Tuple2 integer integer) -> - /\dead -> - Tuple2_match - {integer} - {integer} - ds - {ConflictSet} - (\(a : integer) (b : integer) -> - Known - ((let - a = List integer - in - \(c : integer -> a -> a) (n : a) -> - c a (c b n)) - (\(ds : integer) (ds : List integer) -> - Cons {integer} ds ds) - (Nil {integer})))) - (/\dead -> checkComplete csp s)) - {all dead. dead})) - in - letrec - !`$fEqList_$c==` : - all a. (\a -> a -> a -> Bool) a -> List a -> List a -> Bool - = /\a -> - \(`$dEq` : (\a -> a -> a -> Bool) a) (eta : List a) (eta : List a) -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> True) - (\(ipv : a) (ipv : List a) -> /\dead -> False) - {all dead. dead}) - (\(x : a) (xs : List a) -> - /\dead -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> False) - (\(y : a) (ys : List a) -> - /\dead -> - Bool_match - (`$dEq` x y) - {all dead. Bool} - (/\dead -> `$fEqList_$c==` {a} `$dEq` xs ys) - (/\dead -> False) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - in - let - !`$c==` : ConflictSet -> ConflictSet -> Bool - = \(ds : ConflictSet) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. Bool} - (\(v : List integer) -> - /\dead -> - ConflictSet_match - ds - {all dead. Bool} - (\(w : List integer) -> - /\dead -> `$fEqList_$c==` {integer} equalsInteger v w) - (/\dead -> False) - {all dead. dead}) - (/\dead -> - ConflictSet_match - ds - {all dead. Bool} - (\(ipv : List integer) -> /\dead -> False) - (/\dead -> True) - {all dead. dead}) - {all dead. dead} - in - letrec - !interval : integer -> integer -> List integer - = \(a : integer) (b : integer) -> - ifThenElse - {all dead. List integer} - (lessThanEqualsInteger a b) - (/\dead -> Cons {integer} a (interval (addInteger 1 a) b)) - (/\dead -> Nil {integer}) - {all dead. dead} - in - let - !traceError : all a. string -> a - = /\a -> - \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} - !zipWith : all a b c. (a -> b -> c) -> List a -> List b -> List c - = /\a b c -> - \(f : a -> b -> c) -> - letrec - !go : List a -> List b -> List c - = \(ds : List a) (ds : List b) -> + in + letrec + !go : List integer -> Bool + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. Bool} + (/\dead -> True) + (\(x : integer) + (xs : List integer) -> + /\dead -> + ifThenElse + {all dead. Bool} + (equalsInteger a x) + (/\dead -> False) + (/\dead -> go xs) + {all dead. dead}) + {all dead. dead} + in + \(x : List integer) -> go x) + cs) + {all dead. List integer} + (/\dead -> cs) + (/\dead -> + combine + css + (unionBy {integer} equalsInteger cs acc)) + {all dead. dead}) + (/\dead -> + Unit_match + (error {Unit}) + {List integer} + (error {List integer})) + {all dead. dead})) + {all dead. dead} + in + letrec + !rev : List Assign -> List Assign -> List Assign + = \(ds : List Assign) (a : List Assign) -> + List_match + {Assign} + ds + {all dead. List Assign} + (/\dead -> a) + (\(x : Assign) (xs : List Assign) -> + /\dead -> rev xs (Cons {Assign} x a)) + {all dead. dead} + in + let + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + data CSP | CSP_match where + CSP : integer -> integer -> (Assign -> Assign -> Bool) -> CSP + !checkComplete : CSP -> List Assign -> ConflictSet + = \(csp : CSP) (s : List Assign) -> + CSP_match + csp + {ConflictSet} + (\(ipv : integer) + (ipv : integer) + (ipv : Assign -> Assign -> Bool) -> + ifThenElse + {all dead. ConflictSet} + (equalsInteger + (List_match + {Assign} + s + {integer} + 0 + (\(ds : Assign) (ds : List Assign) -> + Assign_match + ds + {integer} + (\(var : integer) (val : integer) -> var))) + ipv) + (/\dead -> Known (Nil {integer})) + (/\dead -> Unknown) + {all dead. dead}) + in + letrec + !mapTree : all a b. (a -> b) -> Tree a -> Tree b + = /\a b -> + \(f : a -> b) (ds : Tree a) -> + Tree_match + {a} + ds + {Tree b} + (\(a : a) (cs : List (Tree a)) -> + Node + {b} + (f a) + (let + !f : Tree a -> Tree b = mapTree {a} {b} f + in + letrec + !go : List (Tree a) -> List (Tree b) + = \(ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List (Tree b)} + (/\dead -> Nil {Tree b}) + (\(x : Tree a) (xs : List (Tree a)) -> + /\dead -> Cons {Tree b} (f x) (go xs)) + {all dead. dead} + in + go cs)) + in + let + !filter : all a. (a -> Bool) -> List a -> List a + = /\a -> + \(p : a -> Bool) -> + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(x : a) (xs : List a) -> + /\dead -> + let + !xs : List a = go xs + in + Bool_match + (p x) + {all dead. List a} + (/\dead -> Cons {a} x xs) + (/\dead -> xs) + {all dead. dead}) + {all dead. dead} + in + \(eta : List a) -> go eta + !bt : CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) + = \(csp : CSP) -> + mapTree + {List Assign} + {Tuple2 (List Assign) ConflictSet} + (\(s : List Assign) -> + Tuple2 + {List Assign} + {ConflictSet} + s + (CSP_match + csp + {all dead. ConflictSet} + (\(ds : integer) + (ds : integer) + (ds : Assign -> Assign -> Bool) -> + Maybe_match + {Tuple2 integer integer} + (List_match + {Assign} + s + {all dead. Maybe (Tuple2 integer integer)} + (/\dead -> Nothing {Tuple2 integer integer}) + (\(a : Assign) (as : List Assign) -> + /\dead -> + List_match + {Assign} + (filter + {Assign} + (\(eta : Assign) -> + Bool_match + (ds a eta) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (rev as (Nil {Assign}))) + {all dead. Maybe (Tuple2 integer integer)} + (/\dead -> Nothing {Tuple2 integer integer}) + (\(b : Assign) (ds : List Assign) -> + /\dead -> + Just + {Tuple2 integer integer} + (Tuple2 + {integer} + {integer} + (Assign_match + a + {integer} + (\(var : integer) + (val : integer) -> + var)) + (Assign_match + b + {integer} + (\(var : integer) + (val : integer) -> + var)))) + {all dead. dead}) + {all dead. dead}) + {all dead. ConflictSet} + (\(ds : Tuple2 integer integer) -> + /\dead -> + Tuple2_match + {integer} + {integer} + ds + {ConflictSet} + (\(a : integer) (b : integer) -> + Known + ((let + a = List integer + in + \(c : integer -> a -> a) (n : a) -> + c a (c b n)) + (\(ds : integer) (ds : List integer) -> + Cons {integer} ds ds) + (Nil {integer})))) + (/\dead -> checkComplete csp s)) + {all dead. dead})) + in + letrec + !`$fEqList_$c==` : + all a. (\a -> a -> a -> Bool) a -> List a -> List a -> Bool + = /\a -> + \(`$dEq` : (\a -> a -> a -> Bool) a) (eta : List a) (eta : List a) -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> True) + (\(ipv : a) (ipv : List a) -> /\dead -> False) + {all dead. dead}) + (\(x : a) (xs : List a) -> + /\dead -> List_match {a} - ds - {all dead. List c} - (/\dead -> Nil {c}) - (\(ipv : a) (ipv : List a) -> + eta + {all dead. Bool} + (/\dead -> False) + (\(y : a) (ys : List a) -> /\dead -> - List_match - {b} - ds - {all dead. List c} - (/\dead -> Nil {c}) - (\(ipv : b) (ipv : List b) -> - /\dead -> Cons {c} (f ipv ipv) (go ipv ipv)) + Bool_match + (`$dEq` x y) + {all dead. Bool} + (/\dead -> `$fEqList_$c==` {a} `$dEq` xs ys) + (/\dead -> False) {all dead. dead}) - {all dead. dead} - in - \(eta : List a) (eta : List b) -> go eta eta - in - letrec - !cacheChecks : - CSP -> - List (List ConflictSet) -> - Tree (List Assign) -> - Tree (Tuple2 (List Assign) (List (List ConflictSet))) - = \(csp : CSP) - (tbl : List (List ConflictSet)) - (ds : Tree (List Assign)) -> - Tree_match - {List Assign} - ds - {Tree (Tuple2 (List Assign) (List (List ConflictSet)))} - (\(s : List Assign) - (cs : List (Tree (List Assign))) -> - (let - a = Tuple2 (List Assign) (List (List ConflictSet)) - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 {List Assign} {List (List ConflictSet)} s tbl) - (let - !f : - Tree (List Assign) -> - Tree (Tuple2 (List Assign) (List (List ConflictSet))) - = cacheChecks - csp - (let - !tbl : List (List ConflictSet) - = List_match - {List ConflictSet} - tbl - {all dead. List (List ConflictSet)} - (/\dead -> - traceError {List (List ConflictSet)} "PT9") - (\(ds : List ConflictSet) - (as : List (List ConflictSet)) -> - /\dead -> as) - {all dead. dead} - in - List_match - {Assign} - s - {all dead. List (List ConflictSet)} - (/\dead -> tbl) - (\(ds : Assign) - (as : List Assign) -> - /\dead -> - Assign_match - ds - {List (List ConflictSet)} - (\(var' : integer) - (val' : integer) -> - CSP_match - csp - {List (List ConflictSet)} - (\(ds : integer) - (ds : integer) - (ds : Assign -> Assign -> Bool) -> - zipWith - {List ConflictSet} - {List (Tuple2 integer integer)} - {List ConflictSet} - (zipWith - {ConflictSet} - {Tuple2 integer integer} - {ConflictSet} - (\(cs : ConflictSet) - (ds : - Tuple2 integer integer) -> - Tuple2_match - {integer} - {integer} - ds - {ConflictSet} - (\(var : integer) - (val : integer) -> - Bool_match - (Bool_match - (`$c==` cs Unknown) - {all dead. Bool} - (/\dead -> - Bool_match - (ds - ds - (`Cons=` - var - val)) - {all dead. - Bool} - (/\dead -> - False) - (/\dead -> - True) - {all dead. - dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. ConflictSet} - (/\dead -> - Known - ((let - a - = List - integer - in - \(c : - integer -> - a -> - a) - (n : a) -> - c - var' - (c var n)) - (\(ds : - integer) - (ds : - List - integer) -> - Cons - {integer} - ds - ds) - (Nil - {integer}))) - (/\dead -> cs) - {all dead. dead}))) - tbl - ((let - a - = List - (Tuple2 integer integer) - in - \(g : - all b. - (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> - Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : - List - (Tuple2 - integer - integer) -> - a -> - a) - (n : a) -> - letrec - !go : - List integer -> a - = \(ds : - List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : - List - integer) -> - /\dead -> - let - !ds : a - = go ys - in - c - ((let - a - = Tuple2 - integer - integer - in - \(g : - all b. - (a -> + {all dead. dead}) + {all dead. dead} + in + let + !`$c==` : ConflictSet -> ConflictSet -> Bool + = \(ds : ConflictSet) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. Bool} + (\(v : List integer) -> + /\dead -> + ConflictSet_match + ds + {all dead. Bool} + (\(w : List integer) -> + /\dead -> `$fEqList_$c==` {integer} equalsInteger v w) + (/\dead -> False) + {all dead. dead}) + (/\dead -> + ConflictSet_match + ds + {all dead. Bool} + (\(ipv : List integer) -> /\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. dead} + in + letrec + !interval : integer -> integer -> List integer + = \(a : integer) (b : integer) -> + ifThenElse + {all dead. List integer} + (lessThanEqualsInteger a b) + (/\dead -> Cons {integer} a (interval (addInteger 1 a) b)) + (/\dead -> Nil {integer}) + {all dead. dead} + in + let + !traceError : all a. string -> a + = /\a -> + \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} + !zipWith : all a b c. (a -> b -> c) -> List a -> List b -> List c + = /\a b c -> + \(f : a -> b -> c) -> + letrec + !go : List a -> List b -> List c + = \(ds : List a) (ds : List b) -> + List_match + {a} + ds + {all dead. List c} + (/\dead -> Nil {c}) + (\(ipv : a) (ipv : List a) -> + /\dead -> + List_match + {b} + ds + {all dead. List c} + (/\dead -> Nil {c}) + (\(ipv : b) (ipv : List b) -> + /\dead -> Cons {c} (f ipv ipv) (go ipv ipv)) + {all dead. dead}) + {all dead. dead} + in + \(eta : List a) (eta : List b) -> go eta eta + in + letrec + !cacheChecks : + CSP -> + List (List ConflictSet) -> + Tree (List Assign) -> + Tree (Tuple2 (List Assign) (List (List ConflictSet))) + = \(csp : CSP) + (tbl : List (List ConflictSet)) + (ds : Tree (List Assign)) -> + Tree_match + {List Assign} + ds + {Tree (Tuple2 (List Assign) (List (List ConflictSet)))} + (\(s : List Assign) + (cs : List (Tree (List Assign))) -> + (let + a = Tuple2 (List Assign) (List (List ConflictSet)) + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 {List Assign} {List (List ConflictSet)} s tbl) + (let + !f : + Tree (List Assign) -> + Tree (Tuple2 (List Assign) (List (List ConflictSet))) + = cacheChecks + csp + (let + !tbl : List (List ConflictSet) + = List_match + {List ConflictSet} + tbl + {all dead. List (List ConflictSet)} + (/\dead -> + traceError {List (List ConflictSet)} "PT9") + (\(ds : List ConflictSet) + (as : List (List ConflictSet)) -> + /\dead -> as) + {all dead. dead} + in + List_match + {Assign} + s + {all dead. List (List ConflictSet)} + (/\dead -> tbl) + (\(ds : Assign) + (as : List Assign) -> + /\dead -> + Assign_match + ds + {List (List ConflictSet)} + (\(var' : integer) + (val' : integer) -> + CSP_match + csp + {List (List ConflictSet)} + (\(ds : integer) + (ds : integer) + (ds : Assign -> Assign -> Bool) -> + zipWith + {List ConflictSet} + {List (Tuple2 integer integer)} + {List ConflictSet} + (zipWith + {ConflictSet} + {Tuple2 integer integer} + {ConflictSet} + (\(cs : ConflictSet) + (ds : + Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} + ds + {ConflictSet} + (\(var : integer) + (val : integer) -> + Bool_match + (Bool_match + (`$c==` cs Unknown) + {all dead. Bool} + (/\dead -> + Bool_match + (ds + ds + (`Cons=` + var + val)) + {all dead. + Bool} + (/\dead -> + False) + (/\dead -> + True) + {all dead. + dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. + ConflictSet} + (/\dead -> + Known + ((let + a + = List + integer + in + \(c : + integer -> + a -> + a) + (n : a) -> + c + var' + (c var n)) + (\(ds : + integer) + (ds : + List + integer) -> + Cons + {integer} + ds + ds) + (Nil + {integer}))) + (/\dead -> cs) + {all dead. dead}))) + tbl + ((let + a + = List + (Tuple2 integer integer) + in + \(g : + all b. + (a -> b -> b) -> + b -> + b) -> + g + {List a} + (\(ds : a) (ds : List a) -> + Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : + List + (Tuple2 + integer + integer) -> + a -> + a) + (n : a) -> + letrec + !go : + List integer -> a + = \(ds : + List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : + List + integer) -> + /\dead -> + let + !ds : a + = go ys + in + c + ((let + a + = Tuple2 + integer + integer + in + \(g : + all b. + (a -> + b -> + b) -> b -> b) -> - b -> - b) -> - g - {List - a} - (\(ds : - a) - (ds : - List - a) -> - Cons - {a} - ds - ds) - (Nil - {a})) - (/\a -> - \(c : - Tuple2 - integer - integer -> - a -> - a) - (n : - a) -> - letrec - !go : - List - integer -> - a - = \(ds : - List - integer) -> - List_match - {integer} - ds - {all dead. - a} - (/\dead -> - n) - (\(y : - integer) - (ys : - List - integer) -> - /\dead -> - let - !ds : - a - = go - ys - in - c - (Tuple2 - {integer} - {integer} - y - y) - ds) - {all dead. - dead} - in - let - !eta : + g + {List + a} + (\(ds : + a) + (ds : List - integer - = interval - 1 - ds - in - go - eta)) - ds) - {all dead. dead} - in - let - !eta : List integer - = interval - (addInteger 1 var') - ds - in - go eta))))) - {all dead. dead}) - in - letrec - !go : - List (Tree (List Assign)) -> - List - (Tree (Tuple2 (List Assign) (List (List ConflictSet)))) - = \(ds : List (Tree (List Assign))) -> - List_match - {Tree (List Assign)} - ds - {all dead. - List - (Tree - (Tuple2 - (List Assign) - (List (List ConflictSet))))} - (/\dead -> - Nil - {Tree - (Tuple2 - (List Assign) - (List (List ConflictSet)))}) - (\(x : Tree (List Assign)) - (xs : List (Tree (List Assign))) -> - /\dead -> - Cons - {Tree - (Tuple2 - (List Assign) - (List (List ConflictSet)))} - (f x) - (go xs)) - {all dead. dead} - in - go cs)) - in - letrec - !collect : List ConflictSet -> List integer - = \(ds : List ConflictSet) -> - List_match - {ConflictSet} - ds - {all dead. List integer} - (/\dead -> Nil {integer}) - (\(ds : ConflictSet) (css : List ConflictSet) -> - /\dead -> - ConflictSet_match - ds - {all dead. List integer} - (\(cs : List integer) -> - /\dead -> - unionBy {integer} equalsInteger cs (collect css)) - (/\dead -> - Unit_match - (error {Unit}) - {List integer} - (error {List integer})) - {all dead. dead}) - {all dead. dead} - in - let - !emptyTable : CSP -> List (List ConflictSet) - = \(ds : CSP) -> - CSP_match - ds - {List (List ConflictSet)} - (\(ds : integer) (ds : integer) (ds : Assign -> Assign -> Bool) -> - Cons - {List ConflictSet} - (Nil {ConflictSet}) - ((let - a = List ConflictSet + a) -> + Cons + {a} + ds + ds) + (Nil + {a})) + (/\a -> + \(c : + Tuple2 + integer + integer -> + a -> + a) + (n : + a) -> + letrec + !go : + List + integer -> + a + = \(ds : + List + integer) -> + List_match + {integer} + ds + {all dead. + a} + (/\dead -> + n) + (\(y : + integer) + (ys : + List + integer) -> + /\dead -> + let + !ds : + a + = go + ys + in + c + (Tuple2 + {integer} + {integer} + y + y) + ds) + {all dead. + dead} + in + let + !eta : + List + integer + = interval + 1 + ds + in + go + eta)) + ds) + {all dead. dead} + in + let + !eta : List integer + = interval + (addInteger 1 var') + ds + in + go eta))))) + {all dead. dead}) + in + letrec + !go : + List (Tree (List Assign)) -> + List + (Tree (Tuple2 (List Assign) (List (List ConflictSet)))) + = \(ds : List (Tree (List Assign))) -> + List_match + {Tree (List Assign)} + ds + {all dead. + List + (Tree + (Tuple2 + (List Assign) + (List (List ConflictSet))))} + (/\dead -> + Nil + {Tree + (Tuple2 + (List Assign) + (List (List ConflictSet)))}) + (\(x : Tree (List Assign)) + (xs : List (Tree (List Assign))) -> + /\dead -> + Cons + {Tree + (Tuple2 + (List Assign) + (List (List ConflictSet)))} + (f x) + (go xs)) + {all dead. dead} + in + go cs)) + in + letrec + !collect : List ConflictSet -> List integer + = \(ds : List ConflictSet) -> + List_match + {ConflictSet} + ds + {all dead. List integer} + (/\dead -> Nil {integer}) + (\(ds : ConflictSet) (css : List ConflictSet) -> + /\dead -> + ConflictSet_match + ds + {all dead. List integer} + (\(cs : List integer) -> + /\dead -> + unionBy {integer} equalsInteger cs (collect css)) + (/\dead -> + Unit_match + (error {Unit}) + {List integer} + (error {List integer})) + {all dead. dead}) + {all dead. dead} + in + let + !emptyTable : CSP -> List (List ConflictSet) + = \(ds : CSP) -> + CSP_match + ds + {List (List ConflictSet)} + (\(ds : integer) (ds : integer) (ds : Assign -> Assign -> Bool) -> + Cons + {List ConflictSet} + (Nil {ConflictSet}) + ((let + a = List ConflictSet + in + \(g : all b. (a -> b -> b) -> b -> b) -> + g + {List a} + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : List ConflictSet -> a -> a) (n : a) -> + letrec + !go : List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) (ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in + c + ((let + a = List ConflictSet + in + \(c : ConflictSet -> a -> a) + (n : a) -> + letrec + !go : List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : + List integer) -> + /\dead -> + let + !ds : a = go ys + in + c Unknown ds) + {all dead. dead} + in + let + !eta : List integer + = interval 1 ds + in + go eta) + (\(ds : ConflictSet) + (ds : List ConflictSet) -> + Cons {ConflictSet} ds ds) + (Nil {ConflictSet})) + ds) + {all dead. dead} + in + let + !eta : List integer = interval 1 ds + in + go eta))) + in + letrec + !go : integer -> List ConflictSet -> ConflictSet + = \(ds : integer) (ds : List ConflictSet) -> + List_match + {ConflictSet} + ds + {all dead. ConflictSet} + (/\dead -> traceError {ConflictSet} "PT7") + (\(x : ConflictSet) (xs : List ConflictSet) -> + /\dead -> + ifThenElse + {all dead. ConflictSet} + (equalsInteger 0 ds) + (/\dead -> x) + (/\dead -> go (subtractInteger ds 1) xs) + {all dead. dead}) + {all dead. dead} + in + let + !lookupCache : + CSP -> + Tree (Tuple2 (List Assign) (List (List ConflictSet))) -> + Tree + (Tuple2 (Tuple2 (List Assign) ConflictSet) (List (List ConflictSet))) + = \(csp : CSP) + (t : Tree (Tuple2 (List Assign) (List (List ConflictSet)))) -> + mapTree + {Tuple2 (List Assign) (List (List ConflictSet))} + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + (\(ds : Tuple2 (List Assign) (List (List ConflictSet))) -> + Tuple2_match + {List Assign} + {List (List ConflictSet)} + ds + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + (\(ds : List Assign) (tbl : List (List ConflictSet)) -> + List_match + {Assign} + ds + {all dead. + Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + (/\dead -> + Tuple2 + {Tuple2 (List Assign) ConflictSet} + {List (List ConflictSet)} + (Tuple2 + {List Assign} + {ConflictSet} + (Nil {Assign}) + Unknown) + tbl) + (\(a : Assign) (ds : List Assign) -> + /\dead -> + let + !tableEntry : ConflictSet + = let + !ds : List ConflictSet + = List_match + {List ConflictSet} + tbl + {all dead. List ConflictSet} + (/\dead -> + traceError {List ConflictSet} "PT8") + (\(x : List ConflictSet) + (ds : List (List ConflictSet)) -> + /\dead -> x) + {all dead. dead} + !n : integer + = subtractInteger + (Assign_match + a + {integer} + (\(var : integer) (val : integer) -> + val)) + 1 + in + ifThenElse + {all dead. ConflictSet} + (lessThanInteger n 0) + (/\dead -> traceError {ConflictSet} "PT6") + (/\dead -> go n ds) + {all dead. dead} + in + Tuple2 + {Tuple2 (List Assign) ConflictSet} + {List (List ConflictSet)} + (Tuple2 + {List Assign} + {ConflictSet} + ds + (Bool_match + (`$c==` tableEntry Unknown) + {all dead. ConflictSet} + (/\dead -> checkComplete csp ds) + (/\dead -> tableEntry) + {all dead. dead})) + tbl) + {all dead. dead})) + t + !abs : integer -> integer + = \(n : integer) -> + ifThenElse + {all dead. integer} + (lessThanInteger n 0) + (/\dead -> subtractInteger 0 n) + (/\dead -> n) + {all dead. dead} + in + letrec + !foldTree : all a b. (a -> List b -> b) -> Tree a -> b + = /\a b -> + \(f : a -> List b -> b) (ds : Tree a) -> + Tree_match + {a} + ds + {b} + (\(a : a) (cs : List (Tree a)) -> + f + a + (let + !f : Tree a -> b = foldTree {a} {b} f in - \(g : all b. (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : List ConflictSet -> a -> a) (n : a) -> - letrec - !go : List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) (ys : List integer) -> - /\dead -> - let - !ds : a = go ys - in - c - ((let - a = List ConflictSet - in - \(c : ConflictSet -> a -> a) - (n : a) -> - letrec - !go : List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : - List integer) -> - /\dead -> - let - !ds : a = go ys - in - c Unknown ds) - {all dead. dead} - in - let - !eta : List integer - = interval 1 ds - in - go eta) - (\(ds : ConflictSet) - (ds : List ConflictSet) -> - Cons {ConflictSet} ds ds) - (Nil {ConflictSet})) - ds) - {all dead. dead} + letrec + !go : List (Tree a) -> List b + = \(ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List b} + (/\dead -> Nil {b}) + (\(x : Tree a) (xs : List (Tree a)) -> + /\dead -> Cons {b} (f x) (go xs)) + {all dead. dead} + in + go cs)) + in + letrec + !leaves : all a. Tree a -> List a + = /\a -> + letrec + !go : List (Tree a) -> List (List a) + = \(ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List (List a)} + (/\dead -> Nil {List a}) + (\(x : Tree a) (xs : List (Tree a)) -> + /\dead -> Cons {List a} (leaves {a} x) (go xs)) + {all dead. dead} + in + \(ds : Tree a) -> + Tree_match + {a} + ds + {List a} + (\(leaf : a) (ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List a} + (/\dead -> + (let + a = List a in + \(c : a -> a -> a) (n : a) -> c leaf n) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + (\(ipv : Tree a) (ipv : List (Tree a)) -> + /\dead -> let - !eta : List integer = interval 1 ds + !xs : List (List a) = go ds in - go eta))) - in - letrec - !go : integer -> List ConflictSet -> ConflictSet - = \(ds : integer) (ds : List ConflictSet) -> - List_match - {ConflictSet} - ds - {all dead. ConflictSet} - (/\dead -> traceError {ConflictSet} "PT7") - (\(x : ConflictSet) (xs : List ConflictSet) -> - /\dead -> - ifThenElse - {all dead. ConflictSet} - (equalsInteger 0 ds) - (/\dead -> x) - (/\dead -> go (subtractInteger ds 1) xs) - {all dead. dead}) - {all dead. dead} - in - let - !lookupCache : - CSP -> - Tree (Tuple2 (List Assign) (List (List ConflictSet))) -> - Tree - (Tuple2 (Tuple2 (List Assign) ConflictSet) (List (List ConflictSet))) - = \(csp : CSP) - (t : Tree (Tuple2 (List Assign) (List (List ConflictSet)))) -> - mapTree - {Tuple2 (List Assign) (List (List ConflictSet))} - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - (\(ds : Tuple2 (List Assign) (List (List ConflictSet))) -> - Tuple2_match - {List Assign} - {List (List ConflictSet)} - ds - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - (\(ds : List Assign) (tbl : List (List ConflictSet)) -> - List_match - {Assign} - ds - {all dead. - Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - (/\dead -> - Tuple2 - {Tuple2 (List Assign) ConflictSet} - {List (List ConflictSet)} - (Tuple2 - {List Assign} - {ConflictSet} - (Nil {Assign}) - Unknown) - tbl) - (\(a : Assign) (ds : List Assign) -> - /\dead -> - let - !tableEntry : ConflictSet - = let - !ds : List ConflictSet - = List_match - {List ConflictSet} - tbl - {all dead. List ConflictSet} - (/\dead -> - traceError {List ConflictSet} "PT8") - (\(x : List ConflictSet) - (ds : List (List ConflictSet)) -> - /\dead -> x) + (let + b = List a + in + \(c : a -> b -> b) (n : b) -> + letrec + !go : List (List a) -> b + = \(ds : List (List a)) -> + List_match + {List a} + ds + {all dead. b} + (/\dead -> n) + (\(x : List a) (xs : List (List a)) -> + /\dead -> + let + !y : b = go xs + 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) {all dead. dead} - !n : integer - = subtractInteger - (Assign_match - a - {integer} - (\(var : integer) (val : integer) -> - val)) - 1 - in + in + go xs) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + {all dead. dead}) + in + letrec + !initTree : all a. (a -> List a) -> a -> Tree a + = /\a -> + \(f : a -> List a) (a : a) -> + Node + {a} + a + (let + !f : a -> Tree a = initTree {a} f + in + letrec + !go : List a -> List (Tree a) + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List (Tree a)} + (/\dead -> Nil {Tree a}) + (\(x : a) (xs : List a) -> + /\dead -> Cons {Tree a} (f x) (go xs)) + {all dead. dead} + in + go (f a)) + in + \(n : integer) -> + let + !csp : CSP + = CSP + n + n + (\(ds : Assign) (ds : Assign) -> + Assign_match + ds + {Bool} + (\(i : integer) (m : integer) -> + Assign_match + ds + {Bool} + (\(j : integer) (n : integer) -> + Bool_match + (ifThenElse + {all dead. Bool} + (equalsInteger m n) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. Bool} + (/\dead -> ifThenElse - {all dead. ConflictSet} - (lessThanInteger n 0) - (/\dead -> traceError {ConflictSet} "PT6") - (/\dead -> go n ds) - {all dead. dead} - in + {all dead. Bool} + (equalsInteger + (abs (subtractInteger i j)) + (abs (subtractInteger m n))) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}))) + in + \(alg : Algorithm) -> + let + !labeler : + CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) + = Algorithm_match + alg + {all dead. + CSP -> + Tree (List Assign) -> + Tree (Tuple2 (List Assign) ConflictSet)} + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + foldTree + {Tuple2 (List Assign) ConflictSet} + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(ds : Tuple2 (List Assign) ConflictSet) + (chs : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + Tuple2_match + {List Assign} + {ConflictSet} + ds + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(a : List Assign) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. + Tree (Tuple2 (List Assign) ConflictSet)} + (\(cs : List integer) -> + /\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + (Known cs)) + chs) + (/\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + (Known + (combine (go chs) (Nil {integer})))) + chs) + {all dead. dead})) + (bt csp eta)) + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + foldTree + {Tuple2 (List Assign) ConflictSet} + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(ds : Tuple2 (List Assign) ConflictSet) + (chs : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + Tuple2_match + {List Assign} + {ConflictSet} + ds + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(a : List Assign) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. + Tree (Tuple2 (List Assign) ConflictSet)} + (\(cs : List integer) -> + /\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + (Known cs)) + chs) + (/\dead -> + let + !conrep : List integer + = combine (go chs) (Nil {integer}) + !cs' : ConflictSet = Known conrep + in + Bool_match + (List_match + {integer} + conrep + {all dead. Bool} + (/\dead -> False) + (\(a : integer) (as : List integer) -> + /\dead -> True) + {all dead. dead}) + {all dead. + Tree (Tuple2 (List Assign) ConflictSet)} + (/\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) + (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + cs') + (Nil + {Tree + (Tuple2 + (List Assign) + ConflictSet)})) + (/\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) + (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + cs') + chs) + {all dead. dead}) + {all dead. dead})) + (bt csp eta)) + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + mapTree + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + {Tuple2 (List Assign) ConflictSet} + ((let + a = Tuple2 (List Assign) ConflictSet + in + /\b -> + \(ds : Tuple2 a b) -> + Tuple2_match + {a} + {b} + ds + {a} + (\(a : a) (ds : b) -> a)) + {List (List ConflictSet)}) + (lookupCache csp (cacheChecks csp (emptyTable csp) eta))) + (/\dead -> bt) + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + let + !t : + Tree + (Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))) + = lookupCache csp (cacheChecks csp (emptyTable csp) eta) + in + mapTree + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + {Tuple2 (List Assign) ConflictSet} + (\(ds : Tuple2 - {Tuple2 (List Assign) ConflictSet} - {List (List ConflictSet)} - (Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))) -> + Tuple2_match + {Tuple2 (List Assign) ConflictSet} + {List (List ConflictSet)} + ds + {Tuple2 (List Assign) ConflictSet} + (\(ds : Tuple2 (List Assign) ConflictSet) + (tbl : List (List ConflictSet)) -> + Tuple2_match {List Assign} {ConflictSet} ds - (Bool_match - (`$c==` tableEntry Unknown) - {all dead. ConflictSet} - (/\dead -> checkComplete csp ds) - (/\dead -> tableEntry) - {all dead. dead})) - tbl) - {all dead. dead})) - t - !abs : integer -> integer - = \(n : integer) -> - ifThenElse - {all dead. integer} - (lessThanInteger n 0) - (/\dead -> subtractInteger 0 n) - (/\dead -> n) - {all dead. dead} - in - letrec - !foldTree : all a b. (a -> List b -> b) -> Tree a -> b - = /\a b -> - \(f : a -> List b -> b) (ds : Tree a) -> - Tree_match - {a} - ds - {b} - (\(a : a) (cs : List (Tree a)) -> - f - a - (let - !f : Tree a -> b = foldTree {a} {b} f - in - letrec - !go : List (Tree a) -> List b - = \(ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List b} - (/\dead -> Nil {b}) - (\(x : Tree a) (xs : List (Tree a)) -> - /\dead -> Cons {b} (f x) (go xs)) - {all dead. dead} - in - go cs)) - in - letrec - !leaves : all a. Tree a -> List a - = /\a -> - letrec - !go : List (Tree a) -> List (List a) - = \(ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List (List a)} - (/\dead -> Nil {List a}) - (\(x : Tree a) (xs : List (Tree a)) -> - /\dead -> Cons {List a} (leaves {a} x) (go xs)) - {all dead. dead} - in - \(ds : Tree a) -> - Tree_match - {a} - ds - {List a} - (\(leaf : a) (ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List a} - (/\dead -> - (let - a = List a - in - \(c : a -> a -> a) (n : a) -> c leaf n) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - (\(ipv : Tree a) (ipv : List (Tree a)) -> - /\dead -> - let - !xs : List (List a) = go ds - in - (let - b = List a - in - \(c : a -> b -> b) (n : b) -> - letrec - !go : List (List a) -> b - = \(ds : List (List a)) -> - List_match - {List a} - ds - {all dead. b} - (/\dead -> n) - (\(x : List a) (xs : List (List a)) -> - /\dead -> - let - !y : b = go xs + {Tuple2 (List Assign) ConflictSet} + (\(as : List Assign) (cs : ConflictSet) -> + let + !wipedDomains : List (List ConflictSet) + = (let + a = List ConflictSet 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) - {all dead. dead} - in - go xs) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - {all dead. dead}) - in - letrec - !initTree : all a. (a -> List a) -> a -> Tree a - = /\a -> - \(f : a -> List a) (a : a) -> - Node - {a} - a - (let - !f : a -> Tree a = initTree {a} f - in - letrec - !go : List a -> List (Tree a) - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List (Tree a)} - (/\dead -> Nil {Tree a}) - (\(x : a) (xs : List a) -> - /\dead -> Cons {Tree a} (f x) (go xs)) - {all dead. dead} - in - go (f a)) - in - \(n : integer) -> - let - !csp : CSP - = CSP - n - n - (\(ds : Assign) (ds : Assign) -> - Assign_match - ds + \(g : + all b. + (a -> b -> b) -> b -> b) -> + g + {List a} + (\(ds : a) (ds : List a) -> + Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : List ConflictSet -> a -> a) + (n : a) -> + (let + a = List ConflictSet + in + /\b -> + \(k : a -> b -> b) + (z : b) -> + letrec + !go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> z) + (\(y : a) + (ys : + List a) -> + /\dead -> + k + y + (go ys)) + {all dead. dead} + in + \(eta : List a) -> go eta) + {a} + (\(ds : List ConflictSet) + (ds : a) -> + Bool_match + (go ds) + {all dead. a} + (/\dead -> c ds ds) + (/\dead -> ds) + {all dead. dead}) + n + tbl) + in + Tuple2 + {List Assign} + {ConflictSet} + as + (Bool_match + (List_match + {List ConflictSet} + wipedDomains + {all dead. Bool} + (/\dead -> True) + (\(ipv : List ConflictSet) + (ipv : List (List ConflictSet)) -> + /\dead -> False) + {all dead. dead}) + {all dead. ConflictSet} + (/\dead -> cs) + (/\dead -> + Known + (collect + (List_match + {List ConflictSet} + wipedDomains + {all dead. List ConflictSet} + (/\dead -> + traceError + {List ConflictSet} + "PT8") + (\(x : List ConflictSet) + (ds : + List + (List ConflictSet)) -> + /\dead -> x) + {all dead. dead}))) + {all dead. dead})))) + t) + {all dead. dead} + in + go + (filter + {Tuple2 (List Assign) ConflictSet} + (\(eta : Tuple2 (List Assign) ConflictSet) -> + Tuple2_match + {List Assign} + {ConflictSet} + eta {Bool} - (\(i : integer) (m : integer) -> - Assign_match - ds - {Bool} - (\(j : integer) (n : integer) -> - Bool_match - (ifThenElse - {all dead. Bool} - (equalsInteger m n) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - {all dead. Bool} - (/\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger - (abs (subtractInteger i j)) - (abs (subtractInteger m n))) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}))) - in - \(alg : Algorithm) -> - let - !labeler : - CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) - = Algorithm_match - alg - {all dead. - CSP -> - Tree (List Assign) -> - Tree (Tuple2 (List Assign) ConflictSet)} - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - foldTree - {Tuple2 (List Assign) ConflictSet} - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(ds : Tuple2 (List Assign) ConflictSet) - (chs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - Tuple2_match - {List Assign} - {ConflictSet} - ds - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(a : List Assign) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. - Tree (Tuple2 (List Assign) ConflictSet)} - (\(cs : List integer) -> - /\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - (Known cs)) - chs) - (/\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - (Known - (combine (go chs) (Nil {integer})))) - chs) - {all dead. dead})) - (bt csp eta)) - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - foldTree - {Tuple2 (List Assign) ConflictSet} - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(ds : Tuple2 (List Assign) ConflictSet) - (chs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - Tuple2_match - {List Assign} - {ConflictSet} - ds + (\(ipv : List Assign) (ipv : ConflictSet) -> + ConflictSet_match + ipv + {all dead. Bool} + (\(ds : List integer) -> + /\dead -> + List_match + {integer} + ds + {all dead. Bool} + (/\dead -> True) + (\(ipv : integer) (ipv : List integer) -> + /\dead -> False) + {all dead. dead}) + (/\dead -> False) + {all dead. dead})) + (leaves + {Tuple2 (List Assign) ConflictSet} + (foldTree + {Tuple2 (List Assign) ConflictSet} + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(a : Tuple2 (List Assign) ConflictSet) + (cs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + a + (filter {Tree (Tuple2 (List Assign) ConflictSet)} - (\(a : List Assign) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. - Tree (Tuple2 (List Assign) ConflictSet)} - (\(cs : List integer) -> - /\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - (Known cs)) - chs) - (/\dead -> - let - !conrep : List integer - = combine (go chs) (Nil {integer}) - !cs' : ConflictSet = Known conrep - in - Bool_match - (List_match - {integer} - conrep - {all dead. Bool} - (/\dead -> False) - (\(a : integer) (as : List integer) -> - /\dead -> True) - {all dead. dead}) - {all dead. - Tree (Tuple2 (List Assign) ConflictSet)} - (/\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) - (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - cs') - (Nil - {Tree - (Tuple2 - (List Assign) - ConflictSet)})) - (/\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) - (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - cs') - chs) - {all dead. dead}) - {all dead. dead})) - (bt csp eta)) - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - mapTree - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - {Tuple2 (List Assign) ConflictSet} - ((let - a = Tuple2 (List Assign) ConflictSet - in - /\b -> - \(ds : Tuple2 a b) -> - Tuple2_match - {a} - {b} - ds - {a} - (\(a : a) (ds : b) -> a)) - {List (List ConflictSet)}) - (lookupCache csp (cacheChecks csp (emptyTable csp) eta))) - (/\dead -> bt) - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - let - !t : - Tree - (Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))) - = lookupCache csp (cacheChecks csp (emptyTable csp) eta) - in - mapTree - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - {Tuple2 (List Assign) ConflictSet} - (\(ds : - Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))) -> - Tuple2_match - {Tuple2 (List Assign) ConflictSet} - {List (List ConflictSet)} - ds - {Tuple2 (List Assign) ConflictSet} - (\(ds : Tuple2 (List Assign) ConflictSet) - (tbl : List (List ConflictSet)) -> - Tuple2_match - {List Assign} - {ConflictSet} - ds + (\(eta : Tree (Tuple2 (List Assign) ConflictSet)) -> + Tree_match {Tuple2 (List Assign) ConflictSet} - (\(as : List Assign) (cs : ConflictSet) -> - let - !wipedDomains : List (List ConflictSet) - = (let - a = List ConflictSet - in - \(g : - all b. (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> - Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : List ConflictSet -> a -> a) - (n : a) -> - (let - a = List ConflictSet - in - /\b -> - \(k : a -> b -> b) (z : b) -> - letrec - !go : List a -> b - = \(ds : List a) -> - List_match - {a} - ds - {all dead. b} - (/\dead -> z) - (\(y : a) - (ys : - List a) -> - /\dead -> - k y (go ys)) - {all dead. dead} - in - \(eta : List a) -> go eta) - {a} - (\(ds : List ConflictSet) - (ds : a) -> - Bool_match - (go ds) - {all dead. a} - (/\dead -> c ds ds) - (/\dead -> ds) - {all dead. dead}) - n - tbl) - in - Tuple2 + eta + {Bool} + (\(ipv : Tuple2 (List Assign) ConflictSet) + (ipv : + List + (Tree + (Tuple2 (List Assign) ConflictSet))) -> + Tuple2_match {List Assign} {ConflictSet} - as - (Bool_match - (List_match - {List ConflictSet} - wipedDomains - {all dead. Bool} - (/\dead -> True) - (\(ipv : List ConflictSet) - (ipv : List (List ConflictSet)) -> - /\dead -> False) - {all dead. dead}) - {all dead. ConflictSet} - (/\dead -> cs) - (/\dead -> - Known - (collect - (List_match - {List ConflictSet} - wipedDomains - {all dead. List ConflictSet} - (/\dead -> - traceError - {List ConflictSet} - "PT8") - (\(x : List ConflictSet) - (ds : - List - (List ConflictSet)) -> - /\dead -> x) - {all dead. dead}))) - {all dead. dead})))) - t) - {all dead. dead} - in - go - (filter - {Tuple2 (List Assign) ConflictSet} - (\(eta : Tuple2 (List Assign) ConflictSet) -> - Tuple2_match - {List Assign} - {ConflictSet} - eta - {Bool} - (\(ipv : List Assign) (ipv : ConflictSet) -> - ConflictSet_match - ipv - {all dead. Bool} - (\(ds : List integer) -> - /\dead -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> True) - (\(ipv : integer) (ipv : List integer) -> - /\dead -> False) - {all dead. dead}) - (/\dead -> False) - {all dead. dead})) - (leaves - {Tuple2 (List Assign) ConflictSet} - (foldTree - {Tuple2 (List Assign) ConflictSet} - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(a : Tuple2 (List Assign) ConflictSet) - (cs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - a - (filter - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(eta : Tree (Tuple2 (List Assign) ConflictSet)) -> - Tree_match - {Tuple2 (List Assign) ConflictSet} - eta - {Bool} - (\(ipv : Tuple2 (List Assign) ConflictSet) - (ipv : - List - (Tree - (Tuple2 (List Assign) ConflictSet))) -> - Tuple2_match - {List Assign} - {ConflictSet} - ipv - {Bool} - (\(ipv : List Assign) (ipv : ConflictSet) -> - Bool_match - (ConflictSet_match - ipv - {all dead. Bool} - (\(ds : List integer) -> - /\dead -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> False) - (\(a : integer) - (as : List integer) -> - /\dead -> True) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - {all dead. dead}))) - cs)) - (labeler - csp - (CSP_match - csp - {Tree (List Assign)} - (\(ds : integer) - (ds : integer) - (ds : Assign -> Assign -> Bool) -> - let - !vallist : List integer = interval 1 ds - in - initTree - {List Assign} - (\(ss : List Assign) -> - (let - a = List Assign - in - \(g : all b. (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : List Assign -> a -> a) - (n : a) -> - letrec - !go : - List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : List integer) -> - /\dead -> - let - !ds : a = go ys - in - c - (Cons - {Assign} - (`Cons=` - (addInteger - 1 - (List_match - {Assign} - ss - {integer} - 0 - (\(ds : - Assign) - (ds : - List - Assign) -> - Assign_match - ds - {integer} - (\(var : - integer) - (val : - integer) -> - var)))) - y) - ss) - ds) - {all dead. dead} - in - ifThenElse - {all dead. a} - (lessThanInteger - (List_match - {Assign} - ss - {integer} - 0 - (\(ds : Assign) - (ds : List Assign) -> - Assign_match - ds + ipv + {Bool} + (\(ipv : List Assign) (ipv : ConflictSet) -> + Bool_match + (ConflictSet_match + ipv + {all dead. Bool} + (\(ds : List integer) -> + /\dead -> + List_match {integer} - (\(var : integer) - (val : integer) -> - var))) - ds) - (/\dead -> go vallist) - (/\dead -> n) - {all dead. dead})) - (Nil {Assign})))))))) - 4 - (let - data `PlutusBenchmark.NoFib.Queens.Algorithm` | `match_PlutusBenchmark.NoFib.Queens.Algorithm` where - `PlutusBenchmark.NoFib.Queens.Bjbt1` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Bjbt2` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Bm` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Bt` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Fc` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - in - `PlutusBenchmark.NoFib.Queens.Bt`) \ No newline at end of file + ds + {all dead. Bool} + (/\dead -> False) + (\(a : integer) + (as : List integer) -> + /\dead -> True) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}))) + cs)) + (labeler + csp + (CSP_match + csp + {Tree (List Assign)} + (\(ds : integer) + (ds : integer) + (ds : Assign -> Assign -> Bool) -> + let + !vallist : List integer = interval 1 ds + in + initTree + {List Assign} + (\(ss : List Assign) -> + (let + a = List Assign + in + \(g : all b. (a -> b -> b) -> b -> b) -> + g + {List a} + (\(ds : a) (ds : List a) -> + Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : List Assign -> a -> a) + (n : a) -> + letrec + !go : + List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in + c + (Cons + {Assign} + (`Cons=` + (addInteger + 1 + (List_match + {Assign} + ss + {integer} + 0 + (\(ds : + Assign) + (ds : + List + Assign) -> + Assign_match + ds + {integer} + (\(var : + integer) + (val : + integer) -> + var)))) + y) + ss) + ds) + {all dead. dead} + in + ifThenElse + {all dead. a} + (lessThanInteger + (List_match + {Assign} + ss + {integer} + 0 + (\(ds : Assign) + (ds : List Assign) -> + Assign_match + ds + {integer} + (\(var : integer) + (val : integer) -> + var))) + ds) + (/\dead -> go vallist) + (/\dead -> n) + {all dead. dead})) + (Nil {Assign})))))))) + 4 + (let + data `PlutusBenchmark.NoFib.Queens.Algorithm` | `match_PlutusBenchmark.NoFib.Queens.Algorithm` where + `PlutusBenchmark.NoFib.Queens.Bjbt1` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Bjbt2` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Bm` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Bt` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Fc` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + in + `PlutusBenchmark.NoFib.Queens.Bt`)) \ No newline at end of file diff --git a/plutus-benchmark/nofib/test/9.6/queens5-fc.pir.golden b/plutus-benchmark/nofib/test/9.6/queens5-fc.pir.golden index 3e5aec21b6c..bdabc6993f8 100644 --- a/plutus-benchmark/nofib/test/9.6/queens5-fc.pir.golden +++ b/plutus-benchmark/nofib/test/9.6/queens5-fc.pir.golden @@ -1,1707 +1,1721 @@ -(let - data (Tuple2 :: * -> * -> *) a b | Tuple2_match where - Tuple2 : a -> b -> Tuple2 a b - in - letrec - data (List :: * -> *) a | List_match where - Nil : List a - Cons : a -> List a -> List a - in - let - data ConflictSet | ConflictSet_match where - Known : List integer -> ConflictSet - Unknown : ConflictSet - data Assign | Assign_match where - `Cons=` : integer -> integer -> Assign - in - letrec - !go : List (Tuple2 (List Assign) ConflictSet) -> List (List Assign) - = \(ds : List (Tuple2 (List Assign) ConflictSet)) -> - List_match - {Tuple2 (List Assign) ConflictSet} - ds - {all dead. List (List Assign)} - (/\dead -> Nil {List Assign}) - (\(x : Tuple2 (List Assign) ConflictSet) - (xs : List (Tuple2 (List Assign) ConflictSet)) -> - /\dead -> - Cons - {List Assign} - (Tuple2_match - {List Assign} - {ConflictSet} - x - {List Assign} - (\(a : List Assign) (ds : ConflictSet) -> a)) - (go xs)) - {all dead. dead} - in - let - data Bool | Bool_match where - True : Bool - False : Bool - in - letrec - !go : List ConflictSet -> Bool - = \(ds : List ConflictSet) -> - List_match - {ConflictSet} - ds - {all dead. Bool} - (/\dead -> True) - (\(x : ConflictSet) (xs : List ConflictSet) -> - /\dead -> - Bool_match - (ConflictSet_match - x - {all dead. Bool} - (\(ds : List integer) -> - /\dead -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> False) - (\(a : integer) (as : List integer) -> - /\dead -> True) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. Bool} - (/\dead -> go xs) - (/\dead -> False) - {all dead. dead}) - {all dead. dead} - in - letrec - data (Tree :: * -> *) a | Tree_match where - Node : a -> List (Tree a) -> Tree a - in - letrec - !go : - List (Tree (Tuple2 (List Assign) ConflictSet)) -> - List (Tuple2 (List Assign) ConflictSet) - = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - List_match - {Tree (Tuple2 (List Assign) ConflictSet)} - ds - {all dead. List (Tuple2 (List Assign) ConflictSet)} - (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) - (\(x : Tree (Tuple2 (List Assign) ConflictSet)) - (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - /\dead -> - Cons - {Tuple2 (List Assign) ConflictSet} - (Tree_match - {Tuple2 (List Assign) ConflictSet} - x - {Tuple2 (List Assign) ConflictSet} - (\(lab : Tuple2 (List Assign) ConflictSet) - (ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - lab)) - (go xs)) - {all dead. dead} - in - letrec - !go : - List (Tree (Tuple2 (List Assign) ConflictSet)) -> - List (Tuple2 (List Assign) ConflictSet) - = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - List_match - {Tree (Tuple2 (List Assign) ConflictSet)} - ds - {all dead. List (Tuple2 (List Assign) ConflictSet)} - (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) - (\(x : Tree (Tuple2 (List Assign) ConflictSet)) - (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - /\dead -> - Cons - {Tuple2 (List Assign) ConflictSet} - (Tree_match - {Tuple2 (List Assign) ConflictSet} - x - {Tuple2 (List Assign) ConflictSet} - (\(lab : Tuple2 (List Assign) ConflictSet) - (ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - lab)) - (go xs)) - {all dead. dead} - in - let - data Algorithm | Algorithm_match where - Bjbt : Algorithm - Bjbt : Algorithm - Bm : Algorithm - Bt : Algorithm - Fc : Algorithm - !equalsInteger : integer -> integer -> Bool - = \(x : integer) (y : integer) -> - ifThenElse {Bool} (equalsInteger x y) True False - data Unit | Unit_match where - Unit : Unit - in - letrec - !deleteBy : all a. (a -> a -> Bool) -> a -> List a -> List a - = /\a -> - \(ds : a -> a -> Bool) (ds : a) (ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> Nil {a}) - (\(y : a) (ys : List a) -> - /\dead -> - Bool_match - (ds ds y) - {all dead. List a} - (/\dead -> ys) - (/\dead -> Cons {a} y (deleteBy {a} ds ds ys)) - {all dead. dead}) - {all dead. dead} - in - let - !unionBy : all a. (a -> a -> Bool) -> List a -> List a -> List a - = /\a -> - \(eq : a -> a -> Bool) -> - letrec - !go : List a -> List a -> List a - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List a -> List a} - (/\dead -> \(x : List a) -> x) - (\(x : a) (xs : List a) -> - /\dead -> \(b : List a) -> go xs (deleteBy {a} eq x b)) - {all dead. dead} - in - letrec - !nubBy' : List a -> List a -> List a - = \(ds : List a) (ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> Nil {a}) - (\(y : a) (ys : List a) -> - letrec - !go : List a -> List a - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> - Cons {a} y (nubBy' ys (Cons {a} y ds))) - (\(x : a) (xs : List a) -> - /\dead -> - Bool_match - (eq x y) - {all dead. List a} - (/\dead -> nubBy' ys ds) - (/\dead -> go xs) - {all dead. dead}) - {all dead. dead} - in - /\dead -> go ds) - {all dead. dead} - in - \(xs : List a) (ys : List a) -> - let - !r : List a = let !z : List a = nubBy' ys (Nil {a}) in go xs z - in - letrec - !go : List a -> List a - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List a} - (/\dead -> r) - (\(x : a) (xs : List a) -> /\dead -> Cons {a} x (go xs)) - {all dead. dead} - in - go xs - in - letrec - !combine : - List (Tuple2 (List Assign) ConflictSet) -> List integer -> List integer - = \(ds : List (Tuple2 (List Assign) ConflictSet)) (acc : List integer) -> - List_match - {Tuple2 (List Assign) ConflictSet} - ds - {all dead. List integer} - (/\dead -> acc) - (\(ds : Tuple2 (List Assign) ConflictSet) - (css : List (Tuple2 (List Assign) ConflictSet)) -> - /\dead -> - Tuple2_match - {List Assign} - {ConflictSet} - ds - {List integer} - (\(s : List Assign) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. List integer} - (\(cs : List integer) -> - /\dead -> - Bool_match - ((let - !a : integer - = List_match - {Assign} - s - {integer} - 0 - (\(ds : Assign) (ds : List Assign) -> - Assign_match - ds - {integer} - (\(var : integer) - (val : integer) -> - var)) - in - letrec - !go : List integer -> Bool - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> True) - (\(x : integer) - (xs : List integer) -> - /\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger a x) - (/\dead -> False) - (/\dead -> go xs) - {all dead. dead}) - {all dead. dead} - in - \(x : List integer) -> go x) - cs) - {all dead. List integer} - (/\dead -> cs) - (/\dead -> - combine - css - (unionBy {integer} equalsInteger cs acc)) - {all dead. dead}) - (/\dead -> - Unit_match - (error {Unit}) - {List integer} - (error {List integer})) - {all dead. dead})) - {all dead. dead} - in - letrec - !rev : List Assign -> List Assign -> List Assign - = \(ds : List Assign) (a : List Assign) -> - List_match - {Assign} - ds - {all dead. List Assign} - (/\dead -> a) - (\(x : Assign) (xs : List Assign) -> - /\dead -> rev xs (Cons {Assign} x a)) - {all dead. dead} - in - let - data (Maybe :: * -> *) a | Maybe_match where - Just : a -> Maybe a - Nothing : Maybe a - data CSP | CSP_match where - CSP : integer -> integer -> (Assign -> Assign -> Bool) -> CSP - !checkComplete : CSP -> List Assign -> ConflictSet - = \(csp : CSP) (s : List Assign) -> - CSP_match - csp - {ConflictSet} - (\(ipv : integer) - (ipv : integer) - (ipv : Assign -> Assign -> Bool) -> - ifThenElse - {all dead. ConflictSet} - (equalsInteger - (List_match - {Assign} - s - {integer} - 0 - (\(ds : Assign) (ds : List Assign) -> - Assign_match - ds - {integer} - (\(var : integer) (val : integer) -> var))) - ipv) - (/\dead -> Known (Nil {integer})) - (/\dead -> Unknown) - {all dead. dead}) - in - letrec - !mapTree : all a b. (a -> b) -> Tree a -> Tree b - = /\a b -> - \(f : a -> b) (ds : Tree a) -> - Tree_match - {a} - ds - {Tree b} - (\(a : a) (cs : List (Tree a)) -> - Node - {b} - (f a) - (let - !f : Tree a -> Tree b = mapTree {a} {b} f - in - letrec - !go : List (Tree a) -> List (Tree b) - = \(ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List (Tree b)} - (/\dead -> Nil {Tree b}) - (\(x : Tree a) (xs : List (Tree a)) -> - /\dead -> Cons {Tree b} (f x) (go xs)) - {all dead. dead} - in - go cs)) - in - let - !filter : all a. (a -> Bool) -> List a -> List a - = /\a -> - \(p : a -> Bool) -> - letrec - !go : List a -> List a - = \(ds : List a) -> - List_match - {a} - ds +((let + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + data ConflictSet | ConflictSet_match where + Known : List integer -> ConflictSet + Unknown : ConflictSet + data Assign | Assign_match where + `Cons=` : integer -> integer -> Assign + in + letrec + !go : List (Tuple2 (List Assign) ConflictSet) -> List (List Assign) + = \(ds : List (Tuple2 (List Assign) ConflictSet)) -> + List_match + {Tuple2 (List Assign) ConflictSet} + ds + {all dead. List (List Assign)} + (/\dead -> Nil {List Assign}) + (\(x : Tuple2 (List Assign) ConflictSet) + (xs : List (Tuple2 (List Assign) ConflictSet)) -> + /\dead -> + Cons + {List Assign} + (Tuple2_match + {List Assign} + {ConflictSet} + x + {List Assign} + (\(a : List Assign) (ds : ConflictSet) -> a)) + (go xs)) + {all dead. dead} + in + let + data Bool | Bool_match where + True : Bool + False : Bool + in + letrec + !go : List ConflictSet -> Bool + = \(ds : List ConflictSet) -> + List_match + {ConflictSet} + ds + {all dead. Bool} + (/\dead -> True) + (\(x : ConflictSet) (xs : List ConflictSet) -> + /\dead -> + Bool_match + (ConflictSet_match + x + {all dead. Bool} + (\(ds : List integer) -> + /\dead -> + List_match + {integer} + ds + {all dead. Bool} + (/\dead -> False) + (\(a : integer) (as : List integer) -> + /\dead -> True) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. Bool} + (/\dead -> go xs) + (/\dead -> False) + {all dead. dead}) + {all dead. dead} + in + letrec + data (Tree :: * -> *) a | Tree_match where + Node : a -> List (Tree a) -> Tree a + in + letrec + !go : + List (Tree (Tuple2 (List Assign) ConflictSet)) -> + List (Tuple2 (List Assign) ConflictSet) + = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + List_match + {Tree (Tuple2 (List Assign) ConflictSet)} + ds + {all dead. List (Tuple2 (List Assign) ConflictSet)} + (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) + (\(x : Tree (Tuple2 (List Assign) ConflictSet)) + (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + /\dead -> + Cons + {Tuple2 (List Assign) ConflictSet} + (Tree_match + {Tuple2 (List Assign) ConflictSet} + x + {Tuple2 (List Assign) ConflictSet} + (\(lab : Tuple2 (List Assign) ConflictSet) + (ds : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + lab)) + (go xs)) + {all dead. dead} + in + letrec + !go : + List (Tree (Tuple2 (List Assign) ConflictSet)) -> + List (Tuple2 (List Assign) ConflictSet) + = \(ds : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + List_match + {Tree (Tuple2 (List Assign) ConflictSet)} + ds + {all dead. List (Tuple2 (List Assign) ConflictSet)} + (/\dead -> Nil {Tuple2 (List Assign) ConflictSet}) + (\(x : Tree (Tuple2 (List Assign) ConflictSet)) + (xs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + /\dead -> + Cons + {Tuple2 (List Assign) ConflictSet} + (Tree_match + {Tuple2 (List Assign) ConflictSet} + x + {Tuple2 (List Assign) ConflictSet} + (\(lab : Tuple2 (List Assign) ConflictSet) + (ds : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + lab)) + (go xs)) + {all dead. dead} + in + let + data Algorithm | Algorithm_match where + Bjbt : Algorithm + Bjbt : Algorithm + Bm : Algorithm + Bt : Algorithm + Fc : Algorithm + !equalsInteger : integer -> integer -> Bool + = \(x : integer) (y : integer) -> + ifThenElse {Bool} (equalsInteger x y) True False + data Unit | Unit_match where + Unit : Unit + in + letrec + !deleteBy : all a. (a -> a -> Bool) -> a -> List a -> List a + = /\a -> + \(ds : a -> a -> Bool) (ds : a) (ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(y : a) (ys : List a) -> + /\dead -> + Bool_match + (ds ds y) {all dead. List a} - (/\dead -> Nil {a}) - (\(x : a) (xs : List a) -> - /\dead -> - let - !xs : List a = go xs - in - Bool_match - (p x) - {all dead. List a} - (/\dead -> Cons {a} x xs) - (/\dead -> xs) - {all dead. dead}) - {all dead. dead} - in - \(eta : List a) -> go eta - !bt : CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) - = \(csp : CSP) -> - mapTree - {List Assign} - {Tuple2 (List Assign) ConflictSet} - (\(s : List Assign) -> - Tuple2 - {List Assign} - {ConflictSet} - s - (CSP_match - csp - {all dead. ConflictSet} - (\(ds : integer) - (ds : integer) - (ds : Assign -> Assign -> Bool) -> - Maybe_match - {Tuple2 integer integer} - (List_match - {Assign} - s - {all dead. Maybe (Tuple2 integer integer)} - (/\dead -> Nothing {Tuple2 integer integer}) - (\(a : Assign) (as : List Assign) -> - /\dead -> - List_match - {Assign} - (filter - {Assign} - (\(eta : Assign) -> + (/\dead -> ys) + (/\dead -> Cons {a} y (deleteBy {a} ds ds ys)) + {all dead. dead}) + {all dead. dead} + in + let + !unionBy : all a. (a -> a -> Bool) -> List a -> List a -> List a + = /\a -> + \(eq : a -> a -> Bool) -> + letrec + !go : List a -> List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a -> List a} + (/\dead -> \(x : List a) -> x) + (\(x : a) (xs : List a) -> + /\dead -> + \(b : List a) -> go xs (deleteBy {a} eq x b)) + {all dead. dead} + in + letrec + !nubBy' : List a -> List a -> List a + = \(ds : List a) (ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(y : a) (ys : List a) -> + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> + Cons {a} y (nubBy' ys (Cons {a} y ds))) + (\(x : a) (xs : List a) -> + /\dead -> Bool_match - (ds a eta) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) + (eq x y) + {all dead. List a} + (/\dead -> nubBy' ys ds) + (/\dead -> go xs) {all dead. dead}) - (rev as (Nil {Assign}))) - {all dead. Maybe (Tuple2 integer integer)} - (/\dead -> Nothing {Tuple2 integer integer}) - (\(b : Assign) (ds : List Assign) -> - /\dead -> - Just - {Tuple2 integer integer} - (Tuple2 - {integer} - {integer} - (Assign_match - a + {all dead. dead} + in + /\dead -> go ds) + {all dead. dead} + in + \(xs : List a) (ys : List a) -> + let + !r : List a = let !z : List a = nubBy' ys (Nil {a}) in go xs z + in + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> r) + (\(x : a) (xs : List a) -> + /\dead -> Cons {a} x (go xs)) + {all dead. dead} + in + go xs + in + letrec + !combine : + List (Tuple2 (List Assign) ConflictSet) -> List integer -> List integer + = \(ds : List (Tuple2 (List Assign) ConflictSet)) (acc : List integer) -> + List_match + {Tuple2 (List Assign) ConflictSet} + ds + {all dead. List integer} + (/\dead -> acc) + (\(ds : Tuple2 (List Assign) ConflictSet) + (css : List (Tuple2 (List Assign) ConflictSet)) -> + /\dead -> + Tuple2_match + {List Assign} + {ConflictSet} + ds + {List integer} + (\(s : List Assign) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. List integer} + (\(cs : List integer) -> + /\dead -> + Bool_match + ((let + !a : integer + = List_match + {Assign} + s + {integer} + 0 + (\(ds : Assign) (ds : List Assign) -> + Assign_match + ds {integer} (\(var : integer) (val : integer) -> var)) - (Assign_match - b - {integer} - (\(var : integer) - (val : integer) -> - var)))) - {all dead. dead}) - {all dead. dead}) - {all dead. ConflictSet} - (\(ds : Tuple2 integer integer) -> - /\dead -> - Tuple2_match - {integer} - {integer} - ds - {ConflictSet} - (\(a : integer) (b : integer) -> - Known - ((let - a = List integer - in - \(c : integer -> a -> a) (n : a) -> - c a (c b n)) - (\(ds : integer) (ds : List integer) -> - Cons {integer} ds ds) - (Nil {integer})))) - (/\dead -> checkComplete csp s)) - {all dead. dead})) - in - letrec - !`$fEqList_$c==` : - all a. (\a -> a -> a -> Bool) a -> List a -> List a -> Bool - = /\a -> - \(`$dEq` : (\a -> a -> a -> Bool) a) (eta : List a) (eta : List a) -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> True) - (\(ipv : a) (ipv : List a) -> /\dead -> False) - {all dead. dead}) - (\(x : a) (xs : List a) -> - /\dead -> - List_match - {a} - eta - {all dead. Bool} - (/\dead -> False) - (\(y : a) (ys : List a) -> - /\dead -> - Bool_match - (`$dEq` x y) - {all dead. Bool} - (/\dead -> `$fEqList_$c==` {a} `$dEq` xs ys) - (/\dead -> False) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - in - let - !`$c==` : ConflictSet -> ConflictSet -> Bool - = \(ds : ConflictSet) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. Bool} - (\(v : List integer) -> - /\dead -> - ConflictSet_match - ds - {all dead. Bool} - (\(w : List integer) -> - /\dead -> `$fEqList_$c==` {integer} equalsInteger v w) - (/\dead -> False) - {all dead. dead}) - (/\dead -> - ConflictSet_match - ds - {all dead. Bool} - (\(ipv : List integer) -> /\dead -> False) - (/\dead -> True) - {all dead. dead}) - {all dead. dead} - in - letrec - !interval : integer -> integer -> List integer - = \(a : integer) (b : integer) -> - ifThenElse - {all dead. List integer} - (lessThanEqualsInteger a b) - (/\dead -> Cons {integer} a (interval (addInteger 1 a) b)) - (/\dead -> Nil {integer}) - {all dead. dead} - in - let - !traceError : all a. string -> a - = /\a -> - \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} - !zipWith : all a b c. (a -> b -> c) -> List a -> List b -> List c - = /\a b c -> - \(f : a -> b -> c) -> - letrec - !go : List a -> List b -> List c - = \(ds : List a) (ds : List b) -> + in + letrec + !go : List integer -> Bool + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. Bool} + (/\dead -> True) + (\(x : integer) + (xs : List integer) -> + /\dead -> + ifThenElse + {all dead. Bool} + (equalsInteger a x) + (/\dead -> False) + (/\dead -> go xs) + {all dead. dead}) + {all dead. dead} + in + \(x : List integer) -> go x) + cs) + {all dead. List integer} + (/\dead -> cs) + (/\dead -> + combine + css + (unionBy {integer} equalsInteger cs acc)) + {all dead. dead}) + (/\dead -> + Unit_match + (error {Unit}) + {List integer} + (error {List integer})) + {all dead. dead})) + {all dead. dead} + in + letrec + !rev : List Assign -> List Assign -> List Assign + = \(ds : List Assign) (a : List Assign) -> + List_match + {Assign} + ds + {all dead. List Assign} + (/\dead -> a) + (\(x : Assign) (xs : List Assign) -> + /\dead -> rev xs (Cons {Assign} x a)) + {all dead. dead} + in + let + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + data CSP | CSP_match where + CSP : integer -> integer -> (Assign -> Assign -> Bool) -> CSP + !checkComplete : CSP -> List Assign -> ConflictSet + = \(csp : CSP) (s : List Assign) -> + CSP_match + csp + {ConflictSet} + (\(ipv : integer) + (ipv : integer) + (ipv : Assign -> Assign -> Bool) -> + ifThenElse + {all dead. ConflictSet} + (equalsInteger + (List_match + {Assign} + s + {integer} + 0 + (\(ds : Assign) (ds : List Assign) -> + Assign_match + ds + {integer} + (\(var : integer) (val : integer) -> var))) + ipv) + (/\dead -> Known (Nil {integer})) + (/\dead -> Unknown) + {all dead. dead}) + in + letrec + !mapTree : all a b. (a -> b) -> Tree a -> Tree b + = /\a b -> + \(f : a -> b) (ds : Tree a) -> + Tree_match + {a} + ds + {Tree b} + (\(a : a) (cs : List (Tree a)) -> + Node + {b} + (f a) + (let + !f : Tree a -> Tree b = mapTree {a} {b} f + in + letrec + !go : List (Tree a) -> List (Tree b) + = \(ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List (Tree b)} + (/\dead -> Nil {Tree b}) + (\(x : Tree a) (xs : List (Tree a)) -> + /\dead -> Cons {Tree b} (f x) (go xs)) + {all dead. dead} + in + go cs)) + in + let + !filter : all a. (a -> Bool) -> List a -> List a + = /\a -> + \(p : a -> Bool) -> + letrec + !go : List a -> List a + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List a} + (/\dead -> Nil {a}) + (\(x : a) (xs : List a) -> + /\dead -> + let + !xs : List a = go xs + in + Bool_match + (p x) + {all dead. List a} + (/\dead -> Cons {a} x xs) + (/\dead -> xs) + {all dead. dead}) + {all dead. dead} + in + \(eta : List a) -> go eta + !bt : CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) + = \(csp : CSP) -> + mapTree + {List Assign} + {Tuple2 (List Assign) ConflictSet} + (\(s : List Assign) -> + Tuple2 + {List Assign} + {ConflictSet} + s + (CSP_match + csp + {all dead. ConflictSet} + (\(ds : integer) + (ds : integer) + (ds : Assign -> Assign -> Bool) -> + Maybe_match + {Tuple2 integer integer} + (List_match + {Assign} + s + {all dead. Maybe (Tuple2 integer integer)} + (/\dead -> Nothing {Tuple2 integer integer}) + (\(a : Assign) (as : List Assign) -> + /\dead -> + List_match + {Assign} + (filter + {Assign} + (\(eta : Assign) -> + Bool_match + (ds a eta) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (rev as (Nil {Assign}))) + {all dead. Maybe (Tuple2 integer integer)} + (/\dead -> Nothing {Tuple2 integer integer}) + (\(b : Assign) (ds : List Assign) -> + /\dead -> + Just + {Tuple2 integer integer} + (Tuple2 + {integer} + {integer} + (Assign_match + a + {integer} + (\(var : integer) + (val : integer) -> + var)) + (Assign_match + b + {integer} + (\(var : integer) + (val : integer) -> + var)))) + {all dead. dead}) + {all dead. dead}) + {all dead. ConflictSet} + (\(ds : Tuple2 integer integer) -> + /\dead -> + Tuple2_match + {integer} + {integer} + ds + {ConflictSet} + (\(a : integer) (b : integer) -> + Known + ((let + a = List integer + in + \(c : integer -> a -> a) (n : a) -> + c a (c b n)) + (\(ds : integer) (ds : List integer) -> + Cons {integer} ds ds) + (Nil {integer})))) + (/\dead -> checkComplete csp s)) + {all dead. dead})) + in + letrec + !`$fEqList_$c==` : + all a. (\a -> a -> a -> Bool) a -> List a -> List a -> Bool + = /\a -> + \(`$dEq` : (\a -> a -> a -> Bool) a) (eta : List a) (eta : List a) -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> + List_match + {a} + eta + {all dead. Bool} + (/\dead -> True) + (\(ipv : a) (ipv : List a) -> /\dead -> False) + {all dead. dead}) + (\(x : a) (xs : List a) -> + /\dead -> List_match {a} - ds - {all dead. List c} - (/\dead -> Nil {c}) - (\(ipv : a) (ipv : List a) -> + eta + {all dead. Bool} + (/\dead -> False) + (\(y : a) (ys : List a) -> /\dead -> - List_match - {b} - ds - {all dead. List c} - (/\dead -> Nil {c}) - (\(ipv : b) (ipv : List b) -> - /\dead -> Cons {c} (f ipv ipv) (go ipv ipv)) + Bool_match + (`$dEq` x y) + {all dead. Bool} + (/\dead -> `$fEqList_$c==` {a} `$dEq` xs ys) + (/\dead -> False) {all dead. dead}) - {all dead. dead} - in - \(eta : List a) (eta : List b) -> go eta eta - in - letrec - !cacheChecks : - CSP -> - List (List ConflictSet) -> - Tree (List Assign) -> - Tree (Tuple2 (List Assign) (List (List ConflictSet))) - = \(csp : CSP) - (tbl : List (List ConflictSet)) - (ds : Tree (List Assign)) -> - Tree_match - {List Assign} - ds - {Tree (Tuple2 (List Assign) (List (List ConflictSet)))} - (\(s : List Assign) - (cs : List (Tree (List Assign))) -> - (let - a = Tuple2 (List Assign) (List (List ConflictSet)) - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 {List Assign} {List (List ConflictSet)} s tbl) - (let - !f : - Tree (List Assign) -> - Tree (Tuple2 (List Assign) (List (List ConflictSet))) - = cacheChecks - csp - (let - !tbl : List (List ConflictSet) - = List_match - {List ConflictSet} - tbl - {all dead. List (List ConflictSet)} - (/\dead -> - traceError {List (List ConflictSet)} "PT9") - (\(ds : List ConflictSet) - (as : List (List ConflictSet)) -> - /\dead -> as) - {all dead. dead} - in - List_match - {Assign} - s - {all dead. List (List ConflictSet)} - (/\dead -> tbl) - (\(ds : Assign) - (as : List Assign) -> - /\dead -> - Assign_match - ds - {List (List ConflictSet)} - (\(var' : integer) - (val' : integer) -> - CSP_match - csp - {List (List ConflictSet)} - (\(ds : integer) - (ds : integer) - (ds : Assign -> Assign -> Bool) -> - zipWith - {List ConflictSet} - {List (Tuple2 integer integer)} - {List ConflictSet} - (zipWith - {ConflictSet} - {Tuple2 integer integer} - {ConflictSet} - (\(cs : ConflictSet) - (ds : - Tuple2 integer integer) -> - Tuple2_match - {integer} - {integer} - ds - {ConflictSet} - (\(var : integer) - (val : integer) -> - Bool_match - (Bool_match - (`$c==` cs Unknown) - {all dead. Bool} - (/\dead -> - Bool_match - (ds - ds - (`Cons=` - var - val)) - {all dead. - Bool} - (/\dead -> - False) - (/\dead -> - True) - {all dead. - dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. ConflictSet} - (/\dead -> - Known - ((let - a - = List - integer - in - \(c : - integer -> - a -> - a) - (n : a) -> - c - var' - (c var n)) - (\(ds : - integer) - (ds : - List - integer) -> - Cons - {integer} - ds - ds) - (Nil - {integer}))) - (/\dead -> cs) - {all dead. dead}))) - tbl - ((let - a - = List - (Tuple2 integer integer) - in - \(g : - all b. - (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> - Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : - List - (Tuple2 - integer - integer) -> - a -> - a) - (n : a) -> - letrec - !go : - List integer -> a - = \(ds : - List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : - List - integer) -> - /\dead -> - let - !ds : a - = go ys - in - c - ((let - a - = Tuple2 - integer - integer - in - \(g : - all b. - (a -> + {all dead. dead}) + {all dead. dead} + in + let + !`$c==` : ConflictSet -> ConflictSet -> Bool + = \(ds : ConflictSet) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. Bool} + (\(v : List integer) -> + /\dead -> + ConflictSet_match + ds + {all dead. Bool} + (\(w : List integer) -> + /\dead -> `$fEqList_$c==` {integer} equalsInteger v w) + (/\dead -> False) + {all dead. dead}) + (/\dead -> + ConflictSet_match + ds + {all dead. Bool} + (\(ipv : List integer) -> /\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. dead} + in + letrec + !interval : integer -> integer -> List integer + = \(a : integer) (b : integer) -> + ifThenElse + {all dead. List integer} + (lessThanEqualsInteger a b) + (/\dead -> Cons {integer} a (interval (addInteger 1 a) b)) + (/\dead -> Nil {integer}) + {all dead. dead} + in + let + !traceError : all a. string -> a + = /\a -> + \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} + !zipWith : all a b c. (a -> b -> c) -> List a -> List b -> List c + = /\a b c -> + \(f : a -> b -> c) -> + letrec + !go : List a -> List b -> List c + = \(ds : List a) (ds : List b) -> + List_match + {a} + ds + {all dead. List c} + (/\dead -> Nil {c}) + (\(ipv : a) (ipv : List a) -> + /\dead -> + List_match + {b} + ds + {all dead. List c} + (/\dead -> Nil {c}) + (\(ipv : b) (ipv : List b) -> + /\dead -> Cons {c} (f ipv ipv) (go ipv ipv)) + {all dead. dead}) + {all dead. dead} + in + \(eta : List a) (eta : List b) -> go eta eta + in + letrec + !cacheChecks : + CSP -> + List (List ConflictSet) -> + Tree (List Assign) -> + Tree (Tuple2 (List Assign) (List (List ConflictSet))) + = \(csp : CSP) + (tbl : List (List ConflictSet)) + (ds : Tree (List Assign)) -> + Tree_match + {List Assign} + ds + {Tree (Tuple2 (List Assign) (List (List ConflictSet)))} + (\(s : List Assign) + (cs : List (Tree (List Assign))) -> + (let + a = Tuple2 (List Assign) (List (List ConflictSet)) + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 {List Assign} {List (List ConflictSet)} s tbl) + (let + !f : + Tree (List Assign) -> + Tree (Tuple2 (List Assign) (List (List ConflictSet))) + = cacheChecks + csp + (let + !tbl : List (List ConflictSet) + = List_match + {List ConflictSet} + tbl + {all dead. List (List ConflictSet)} + (/\dead -> + traceError {List (List ConflictSet)} "PT9") + (\(ds : List ConflictSet) + (as : List (List ConflictSet)) -> + /\dead -> as) + {all dead. dead} + in + List_match + {Assign} + s + {all dead. List (List ConflictSet)} + (/\dead -> tbl) + (\(ds : Assign) + (as : List Assign) -> + /\dead -> + Assign_match + ds + {List (List ConflictSet)} + (\(var' : integer) + (val' : integer) -> + CSP_match + csp + {List (List ConflictSet)} + (\(ds : integer) + (ds : integer) + (ds : Assign -> Assign -> Bool) -> + zipWith + {List ConflictSet} + {List (Tuple2 integer integer)} + {List ConflictSet} + (zipWith + {ConflictSet} + {Tuple2 integer integer} + {ConflictSet} + (\(cs : ConflictSet) + (ds : + Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} + ds + {ConflictSet} + (\(var : integer) + (val : integer) -> + Bool_match + (Bool_match + (`$c==` cs Unknown) + {all dead. Bool} + (/\dead -> + Bool_match + (ds + ds + (`Cons=` + var + val)) + {all dead. + Bool} + (/\dead -> + False) + (/\dead -> + True) + {all dead. + dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. + ConflictSet} + (/\dead -> + Known + ((let + a + = List + integer + in + \(c : + integer -> + a -> + a) + (n : a) -> + c + var' + (c var n)) + (\(ds : + integer) + (ds : + List + integer) -> + Cons + {integer} + ds + ds) + (Nil + {integer}))) + (/\dead -> cs) + {all dead. dead}))) + tbl + ((let + a + = List + (Tuple2 integer integer) + in + \(g : + all b. + (a -> b -> b) -> + b -> + b) -> + g + {List a} + (\(ds : a) (ds : List a) -> + Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : + List + (Tuple2 + integer + integer) -> + a -> + a) + (n : a) -> + letrec + !go : + List integer -> a + = \(ds : + List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : + List + integer) -> + /\dead -> + let + !ds : a + = go ys + in + c + ((let + a + = Tuple2 + integer + integer + in + \(g : + all b. + (a -> + b -> + b) -> b -> b) -> - b -> - b) -> - g - {List - a} - (\(ds : - a) - (ds : - List - a) -> - Cons - {a} - ds - ds) - (Nil - {a})) - (/\a -> - \(c : - Tuple2 - integer - integer -> - a -> - a) - (n : - a) -> - letrec - !go : - List - integer -> - a - = \(ds : - List - integer) -> - List_match - {integer} - ds - {all dead. - a} - (/\dead -> - n) - (\(y : - integer) - (ys : - List - integer) -> - /\dead -> - let - !ds : - a - = go - ys - in - c - (Tuple2 - {integer} - {integer} - y - y) - ds) - {all dead. - dead} - in - let - !eta : + g + {List + a} + (\(ds : + a) + (ds : List - integer - = interval - 1 - ds - in - go - eta)) - ds) - {all dead. dead} - in - let - !eta : List integer - = interval - (addInteger 1 var') - ds - in - go eta))))) - {all dead. dead}) - in - letrec - !go : - List (Tree (List Assign)) -> - List - (Tree (Tuple2 (List Assign) (List (List ConflictSet)))) - = \(ds : List (Tree (List Assign))) -> - List_match - {Tree (List Assign)} - ds - {all dead. - List - (Tree - (Tuple2 - (List Assign) - (List (List ConflictSet))))} - (/\dead -> - Nil - {Tree - (Tuple2 - (List Assign) - (List (List ConflictSet)))}) - (\(x : Tree (List Assign)) - (xs : List (Tree (List Assign))) -> - /\dead -> - Cons - {Tree - (Tuple2 - (List Assign) - (List (List ConflictSet)))} - (f x) - (go xs)) - {all dead. dead} - in - go cs)) - in - letrec - !collect : List ConflictSet -> List integer - = \(ds : List ConflictSet) -> - List_match - {ConflictSet} - ds - {all dead. List integer} - (/\dead -> Nil {integer}) - (\(ds : ConflictSet) (css : List ConflictSet) -> - /\dead -> - ConflictSet_match - ds - {all dead. List integer} - (\(cs : List integer) -> - /\dead -> - unionBy {integer} equalsInteger cs (collect css)) - (/\dead -> - Unit_match - (error {Unit}) - {List integer} - (error {List integer})) - {all dead. dead}) - {all dead. dead} - in - let - !emptyTable : CSP -> List (List ConflictSet) - = \(ds : CSP) -> - CSP_match - ds - {List (List ConflictSet)} - (\(ds : integer) (ds : integer) (ds : Assign -> Assign -> Bool) -> - Cons - {List ConflictSet} - (Nil {ConflictSet}) - ((let - a = List ConflictSet + a) -> + Cons + {a} + ds + ds) + (Nil + {a})) + (/\a -> + \(c : + Tuple2 + integer + integer -> + a -> + a) + (n : + a) -> + letrec + !go : + List + integer -> + a + = \(ds : + List + integer) -> + List_match + {integer} + ds + {all dead. + a} + (/\dead -> + n) + (\(y : + integer) + (ys : + List + integer) -> + /\dead -> + let + !ds : + a + = go + ys + in + c + (Tuple2 + {integer} + {integer} + y + y) + ds) + {all dead. + dead} + in + let + !eta : + List + integer + = interval + 1 + ds + in + go + eta)) + ds) + {all dead. dead} + in + let + !eta : List integer + = interval + (addInteger 1 var') + ds + in + go eta))))) + {all dead. dead}) + in + letrec + !go : + List (Tree (List Assign)) -> + List + (Tree (Tuple2 (List Assign) (List (List ConflictSet)))) + = \(ds : List (Tree (List Assign))) -> + List_match + {Tree (List Assign)} + ds + {all dead. + List + (Tree + (Tuple2 + (List Assign) + (List (List ConflictSet))))} + (/\dead -> + Nil + {Tree + (Tuple2 + (List Assign) + (List (List ConflictSet)))}) + (\(x : Tree (List Assign)) + (xs : List (Tree (List Assign))) -> + /\dead -> + Cons + {Tree + (Tuple2 + (List Assign) + (List (List ConflictSet)))} + (f x) + (go xs)) + {all dead. dead} + in + go cs)) + in + letrec + !collect : List ConflictSet -> List integer + = \(ds : List ConflictSet) -> + List_match + {ConflictSet} + ds + {all dead. List integer} + (/\dead -> Nil {integer}) + (\(ds : ConflictSet) (css : List ConflictSet) -> + /\dead -> + ConflictSet_match + ds + {all dead. List integer} + (\(cs : List integer) -> + /\dead -> + unionBy {integer} equalsInteger cs (collect css)) + (/\dead -> + Unit_match + (error {Unit}) + {List integer} + (error {List integer})) + {all dead. dead}) + {all dead. dead} + in + let + !emptyTable : CSP -> List (List ConflictSet) + = \(ds : CSP) -> + CSP_match + ds + {List (List ConflictSet)} + (\(ds : integer) (ds : integer) (ds : Assign -> Assign -> Bool) -> + Cons + {List ConflictSet} + (Nil {ConflictSet}) + ((let + a = List ConflictSet + in + \(g : all b. (a -> b -> b) -> b -> b) -> + g + {List a} + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : List ConflictSet -> a -> a) (n : a) -> + letrec + !go : List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) (ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in + c + ((let + a = List ConflictSet + in + \(c : ConflictSet -> a -> a) + (n : a) -> + letrec + !go : List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : + List integer) -> + /\dead -> + let + !ds : a = go ys + in + c Unknown ds) + {all dead. dead} + in + let + !eta : List integer + = interval 1 ds + in + go eta) + (\(ds : ConflictSet) + (ds : List ConflictSet) -> + Cons {ConflictSet} ds ds) + (Nil {ConflictSet})) + ds) + {all dead. dead} + in + let + !eta : List integer = interval 1 ds + in + go eta))) + in + letrec + !go : integer -> List ConflictSet -> ConflictSet + = \(ds : integer) (ds : List ConflictSet) -> + List_match + {ConflictSet} + ds + {all dead. ConflictSet} + (/\dead -> traceError {ConflictSet} "PT7") + (\(x : ConflictSet) (xs : List ConflictSet) -> + /\dead -> + ifThenElse + {all dead. ConflictSet} + (equalsInteger 0 ds) + (/\dead -> x) + (/\dead -> go (subtractInteger ds 1) xs) + {all dead. dead}) + {all dead. dead} + in + let + !lookupCache : + CSP -> + Tree (Tuple2 (List Assign) (List (List ConflictSet))) -> + Tree + (Tuple2 (Tuple2 (List Assign) ConflictSet) (List (List ConflictSet))) + = \(csp : CSP) + (t : Tree (Tuple2 (List Assign) (List (List ConflictSet)))) -> + mapTree + {Tuple2 (List Assign) (List (List ConflictSet))} + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + (\(ds : Tuple2 (List Assign) (List (List ConflictSet))) -> + Tuple2_match + {List Assign} + {List (List ConflictSet)} + ds + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + (\(ds : List Assign) (tbl : List (List ConflictSet)) -> + List_match + {Assign} + ds + {all dead. + Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + (/\dead -> + Tuple2 + {Tuple2 (List Assign) ConflictSet} + {List (List ConflictSet)} + (Tuple2 + {List Assign} + {ConflictSet} + (Nil {Assign}) + Unknown) + tbl) + (\(a : Assign) (ds : List Assign) -> + /\dead -> + let + !tableEntry : ConflictSet + = let + !ds : List ConflictSet + = List_match + {List ConflictSet} + tbl + {all dead. List ConflictSet} + (/\dead -> + traceError {List ConflictSet} "PT8") + (\(x : List ConflictSet) + (ds : List (List ConflictSet)) -> + /\dead -> x) + {all dead. dead} + !n : integer + = subtractInteger + (Assign_match + a + {integer} + (\(var : integer) (val : integer) -> + val)) + 1 + in + ifThenElse + {all dead. ConflictSet} + (lessThanInteger n 0) + (/\dead -> traceError {ConflictSet} "PT6") + (/\dead -> go n ds) + {all dead. dead} + in + Tuple2 + {Tuple2 (List Assign) ConflictSet} + {List (List ConflictSet)} + (Tuple2 + {List Assign} + {ConflictSet} + ds + (Bool_match + (`$c==` tableEntry Unknown) + {all dead. ConflictSet} + (/\dead -> checkComplete csp ds) + (/\dead -> tableEntry) + {all dead. dead})) + tbl) + {all dead. dead})) + t + !abs : integer -> integer + = \(n : integer) -> + ifThenElse + {all dead. integer} + (lessThanInteger n 0) + (/\dead -> subtractInteger 0 n) + (/\dead -> n) + {all dead. dead} + in + letrec + !foldTree : all a b. (a -> List b -> b) -> Tree a -> b + = /\a b -> + \(f : a -> List b -> b) (ds : Tree a) -> + Tree_match + {a} + ds + {b} + (\(a : a) (cs : List (Tree a)) -> + f + a + (let + !f : Tree a -> b = foldTree {a} {b} f in - \(g : all b. (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : List ConflictSet -> a -> a) (n : a) -> - letrec - !go : List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) (ys : List integer) -> - /\dead -> - let - !ds : a = go ys - in - c - ((let - a = List ConflictSet - in - \(c : ConflictSet -> a -> a) - (n : a) -> - letrec - !go : List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : - List integer) -> - /\dead -> - let - !ds : a = go ys - in - c Unknown ds) - {all dead. dead} - in - let - !eta : List integer - = interval 1 ds - in - go eta) - (\(ds : ConflictSet) - (ds : List ConflictSet) -> - Cons {ConflictSet} ds ds) - (Nil {ConflictSet})) - ds) - {all dead. dead} + letrec + !go : List (Tree a) -> List b + = \(ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List b} + (/\dead -> Nil {b}) + (\(x : Tree a) (xs : List (Tree a)) -> + /\dead -> Cons {b} (f x) (go xs)) + {all dead. dead} + in + go cs)) + in + letrec + !leaves : all a. Tree a -> List a + = /\a -> + letrec + !go : List (Tree a) -> List (List a) + = \(ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List (List a)} + (/\dead -> Nil {List a}) + (\(x : Tree a) (xs : List (Tree a)) -> + /\dead -> Cons {List a} (leaves {a} x) (go xs)) + {all dead. dead} + in + \(ds : Tree a) -> + Tree_match + {a} + ds + {List a} + (\(leaf : a) (ds : List (Tree a)) -> + List_match + {Tree a} + ds + {all dead. List a} + (/\dead -> + (let + a = List a in + \(c : a -> a -> a) (n : a) -> c leaf n) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + (\(ipv : Tree a) (ipv : List (Tree a)) -> + /\dead -> let - !eta : List integer = interval 1 ds + !xs : List (List a) = go ds in - go eta))) - in - letrec - !go : integer -> List ConflictSet -> ConflictSet - = \(ds : integer) (ds : List ConflictSet) -> - List_match - {ConflictSet} - ds - {all dead. ConflictSet} - (/\dead -> traceError {ConflictSet} "PT7") - (\(x : ConflictSet) (xs : List ConflictSet) -> - /\dead -> - ifThenElse - {all dead. ConflictSet} - (equalsInteger 0 ds) - (/\dead -> x) - (/\dead -> go (subtractInteger ds 1) xs) - {all dead. dead}) - {all dead. dead} - in - let - !lookupCache : - CSP -> - Tree (Tuple2 (List Assign) (List (List ConflictSet))) -> - Tree - (Tuple2 (Tuple2 (List Assign) ConflictSet) (List (List ConflictSet))) - = \(csp : CSP) - (t : Tree (Tuple2 (List Assign) (List (List ConflictSet)))) -> - mapTree - {Tuple2 (List Assign) (List (List ConflictSet))} - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - (\(ds : Tuple2 (List Assign) (List (List ConflictSet))) -> - Tuple2_match - {List Assign} - {List (List ConflictSet)} - ds - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - (\(ds : List Assign) (tbl : List (List ConflictSet)) -> - List_match - {Assign} - ds - {all dead. - Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - (/\dead -> - Tuple2 - {Tuple2 (List Assign) ConflictSet} - {List (List ConflictSet)} - (Tuple2 - {List Assign} - {ConflictSet} - (Nil {Assign}) - Unknown) - tbl) - (\(a : Assign) (ds : List Assign) -> - /\dead -> - let - !tableEntry : ConflictSet - = let - !ds : List ConflictSet - = List_match - {List ConflictSet} - tbl - {all dead. List ConflictSet} - (/\dead -> - traceError {List ConflictSet} "PT8") - (\(x : List ConflictSet) - (ds : List (List ConflictSet)) -> - /\dead -> x) + (let + b = List a + in + \(c : a -> b -> b) (n : b) -> + letrec + !go : List (List a) -> b + = \(ds : List (List a)) -> + List_match + {List a} + ds + {all dead. b} + (/\dead -> n) + (\(x : List a) (xs : List (List a)) -> + /\dead -> + let + !y : b = go xs + 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) {all dead. dead} - !n : integer - = subtractInteger - (Assign_match - a - {integer} - (\(var : integer) (val : integer) -> - val)) - 1 - in + in + go xs) + (\(ds : a) (ds : List a) -> Cons {a} ds ds) + (Nil {a})) + {all dead. dead}) + in + letrec + !initTree : all a. (a -> List a) -> a -> Tree a + = /\a -> + \(f : a -> List a) (a : a) -> + Node + {a} + a + (let + !f : a -> Tree a = initTree {a} f + in + letrec + !go : List a -> List (Tree a) + = \(ds : List a) -> + List_match + {a} + ds + {all dead. List (Tree a)} + (/\dead -> Nil {Tree a}) + (\(x : a) (xs : List a) -> + /\dead -> Cons {Tree a} (f x) (go xs)) + {all dead. dead} + in + go (f a)) + in + \(n : integer) -> + let + !csp : CSP + = CSP + n + n + (\(ds : Assign) (ds : Assign) -> + Assign_match + ds + {Bool} + (\(i : integer) (m : integer) -> + Assign_match + ds + {Bool} + (\(j : integer) (n : integer) -> + Bool_match + (ifThenElse + {all dead. Bool} + (equalsInteger m n) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. Bool} + (/\dead -> ifThenElse - {all dead. ConflictSet} - (lessThanInteger n 0) - (/\dead -> traceError {ConflictSet} "PT6") - (/\dead -> go n ds) - {all dead. dead} - in + {all dead. Bool} + (equalsInteger + (abs (subtractInteger i j)) + (abs (subtractInteger m n))) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}))) + in + \(alg : Algorithm) -> + let + !labeler : + CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) + = Algorithm_match + alg + {all dead. + CSP -> + Tree (List Assign) -> + Tree (Tuple2 (List Assign) ConflictSet)} + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + foldTree + {Tuple2 (List Assign) ConflictSet} + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(ds : Tuple2 (List Assign) ConflictSet) + (chs : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + Tuple2_match + {List Assign} + {ConflictSet} + ds + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(a : List Assign) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. + Tree (Tuple2 (List Assign) ConflictSet)} + (\(cs : List integer) -> + /\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + (Known cs)) + chs) + (/\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + (Known + (combine (go chs) (Nil {integer})))) + chs) + {all dead. dead})) + (bt csp eta)) + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + foldTree + {Tuple2 (List Assign) ConflictSet} + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(ds : Tuple2 (List Assign) ConflictSet) + (chs : + List (Tree (Tuple2 (List Assign) ConflictSet))) -> + Tuple2_match + {List Assign} + {ConflictSet} + ds + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(a : List Assign) (ds : ConflictSet) -> + ConflictSet_match + ds + {all dead. + Tree (Tuple2 (List Assign) ConflictSet)} + (\(cs : List integer) -> + /\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + (Known cs)) + chs) + (/\dead -> + let + !conrep : List integer + = combine (go chs) (Nil {integer}) + !cs' : ConflictSet = Known conrep + in + Bool_match + (List_match + {integer} + conrep + {all dead. Bool} + (/\dead -> False) + (\(a : integer) (as : List integer) -> + /\dead -> True) + {all dead. dead}) + {all dead. + Tree (Tuple2 (List Assign) ConflictSet)} + (/\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) + (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + cs') + (Nil + {Tree + (Tuple2 + (List Assign) + ConflictSet)})) + (/\dead -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) + (conrep : List (Tree a)) -> + Node {a} conrep conrep) + (Tuple2 + {List Assign} + {ConflictSet} + a + cs') + chs) + {all dead. dead}) + {all dead. dead})) + (bt csp eta)) + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + mapTree + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + {Tuple2 (List Assign) ConflictSet} + ((let + a = Tuple2 (List Assign) ConflictSet + in + /\b -> + \(ds : Tuple2 a b) -> + Tuple2_match + {a} + {b} + ds + {a} + (\(a : a) (ds : b) -> a)) + {List (List ConflictSet)}) + (lookupCache csp (cacheChecks csp (emptyTable csp) eta))) + (/\dead -> bt) + (/\dead -> + \(csp : CSP) (eta : Tree (List Assign)) -> + let + !t : + Tree + (Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))) + = lookupCache csp (cacheChecks csp (emptyTable csp) eta) + in + mapTree + {Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))} + {Tuple2 (List Assign) ConflictSet} + (\(ds : Tuple2 - {Tuple2 (List Assign) ConflictSet} - {List (List ConflictSet)} - (Tuple2 + (Tuple2 (List Assign) ConflictSet) + (List (List ConflictSet))) -> + Tuple2_match + {Tuple2 (List Assign) ConflictSet} + {List (List ConflictSet)} + ds + {Tuple2 (List Assign) ConflictSet} + (\(ds : Tuple2 (List Assign) ConflictSet) + (tbl : List (List ConflictSet)) -> + Tuple2_match {List Assign} {ConflictSet} ds - (Bool_match - (`$c==` tableEntry Unknown) - {all dead. ConflictSet} - (/\dead -> checkComplete csp ds) - (/\dead -> tableEntry) - {all dead. dead})) - tbl) - {all dead. dead})) - t - !abs : integer -> integer - = \(n : integer) -> - ifThenElse - {all dead. integer} - (lessThanInteger n 0) - (/\dead -> subtractInteger 0 n) - (/\dead -> n) - {all dead. dead} - in - letrec - !foldTree : all a b. (a -> List b -> b) -> Tree a -> b - = /\a b -> - \(f : a -> List b -> b) (ds : Tree a) -> - Tree_match - {a} - ds - {b} - (\(a : a) (cs : List (Tree a)) -> - f - a - (let - !f : Tree a -> b = foldTree {a} {b} f - in - letrec - !go : List (Tree a) -> List b - = \(ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List b} - (/\dead -> Nil {b}) - (\(x : Tree a) (xs : List (Tree a)) -> - /\dead -> Cons {b} (f x) (go xs)) - {all dead. dead} - in - go cs)) - in - letrec - !leaves : all a. Tree a -> List a - = /\a -> - letrec - !go : List (Tree a) -> List (List a) - = \(ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List (List a)} - (/\dead -> Nil {List a}) - (\(x : Tree a) (xs : List (Tree a)) -> - /\dead -> Cons {List a} (leaves {a} x) (go xs)) - {all dead. dead} - in - \(ds : Tree a) -> - Tree_match - {a} - ds - {List a} - (\(leaf : a) (ds : List (Tree a)) -> - List_match - {Tree a} - ds - {all dead. List a} - (/\dead -> - (let - a = List a - in - \(c : a -> a -> a) (n : a) -> c leaf n) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - (\(ipv : Tree a) (ipv : List (Tree a)) -> - /\dead -> - let - !xs : List (List a) = go ds - in - (let - b = List a - in - \(c : a -> b -> b) (n : b) -> - letrec - !go : List (List a) -> b - = \(ds : List (List a)) -> - List_match - {List a} - ds - {all dead. b} - (/\dead -> n) - (\(x : List a) (xs : List (List a)) -> - /\dead -> - let - !y : b = go xs + {Tuple2 (List Assign) ConflictSet} + (\(as : List Assign) (cs : ConflictSet) -> + let + !wipedDomains : List (List ConflictSet) + = (let + a = List ConflictSet 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) - {all dead. dead} - in - go xs) - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - {all dead. dead}) - in - letrec - !initTree : all a. (a -> List a) -> a -> Tree a - = /\a -> - \(f : a -> List a) (a : a) -> - Node - {a} - a - (let - !f : a -> Tree a = initTree {a} f - in - letrec - !go : List a -> List (Tree a) - = \(ds : List a) -> - List_match - {a} - ds - {all dead. List (Tree a)} - (/\dead -> Nil {Tree a}) - (\(x : a) (xs : List a) -> - /\dead -> Cons {Tree a} (f x) (go xs)) - {all dead. dead} - in - go (f a)) - in - \(n : integer) -> - let - !csp : CSP - = CSP - n - n - (\(ds : Assign) (ds : Assign) -> - Assign_match - ds + \(g : + all b. + (a -> b -> b) -> b -> b) -> + g + {List a} + (\(ds : a) (ds : List a) -> + Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : List ConflictSet -> a -> a) + (n : a) -> + (let + a = List ConflictSet + in + /\b -> + \(k : a -> b -> b) + (z : b) -> + letrec + !go : List a -> b + = \(ds : List a) -> + List_match + {a} + ds + {all dead. b} + (/\dead -> z) + (\(y : a) + (ys : + List a) -> + /\dead -> + k + y + (go ys)) + {all dead. dead} + in + \(eta : List a) -> go eta) + {a} + (\(ds : List ConflictSet) + (ds : a) -> + Bool_match + (go ds) + {all dead. a} + (/\dead -> c ds ds) + (/\dead -> ds) + {all dead. dead}) + n + tbl) + in + Tuple2 + {List Assign} + {ConflictSet} + as + (Bool_match + (List_match + {List ConflictSet} + wipedDomains + {all dead. Bool} + (/\dead -> True) + (\(ipv : List ConflictSet) + (ipv : List (List ConflictSet)) -> + /\dead -> False) + {all dead. dead}) + {all dead. ConflictSet} + (/\dead -> cs) + (/\dead -> + Known + (collect + (List_match + {List ConflictSet} + wipedDomains + {all dead. List ConflictSet} + (/\dead -> + traceError + {List ConflictSet} + "PT8") + (\(x : List ConflictSet) + (ds : + List + (List ConflictSet)) -> + /\dead -> x) + {all dead. dead}))) + {all dead. dead})))) + t) + {all dead. dead} + in + go + (filter + {Tuple2 (List Assign) ConflictSet} + (\(eta : Tuple2 (List Assign) ConflictSet) -> + Tuple2_match + {List Assign} + {ConflictSet} + eta {Bool} - (\(i : integer) (m : integer) -> - Assign_match - ds - {Bool} - (\(j : integer) (n : integer) -> - Bool_match - (ifThenElse - {all dead. Bool} - (equalsInteger m n) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - {all dead. Bool} - (/\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger - (abs (subtractInteger i j)) - (abs (subtractInteger m n))) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}))) - in - \(alg : Algorithm) -> - let - !labeler : - CSP -> Tree (List Assign) -> Tree (Tuple2 (List Assign) ConflictSet) - = Algorithm_match - alg - {all dead. - CSP -> - Tree (List Assign) -> - Tree (Tuple2 (List Assign) ConflictSet)} - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - foldTree - {Tuple2 (List Assign) ConflictSet} - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(ds : Tuple2 (List Assign) ConflictSet) - (chs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - Tuple2_match - {List Assign} - {ConflictSet} - ds - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(a : List Assign) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. - Tree (Tuple2 (List Assign) ConflictSet)} - (\(cs : List integer) -> - /\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - (Known cs)) - chs) - (/\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - (Known - (combine (go chs) (Nil {integer})))) - chs) - {all dead. dead})) - (bt csp eta)) - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - foldTree - {Tuple2 (List Assign) ConflictSet} - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(ds : Tuple2 (List Assign) ConflictSet) - (chs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - Tuple2_match - {List Assign} - {ConflictSet} - ds + (\(ipv : List Assign) (ipv : ConflictSet) -> + ConflictSet_match + ipv + {all dead. Bool} + (\(ds : List integer) -> + /\dead -> + List_match + {integer} + ds + {all dead. Bool} + (/\dead -> True) + (\(ipv : integer) (ipv : List integer) -> + /\dead -> False) + {all dead. dead}) + (/\dead -> False) + {all dead. dead})) + (leaves + {Tuple2 (List Assign) ConflictSet} + (foldTree + {Tuple2 (List Assign) ConflictSet} + {Tree (Tuple2 (List Assign) ConflictSet)} + (\(a : Tuple2 (List Assign) ConflictSet) + (cs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> + (let + a = Tuple2 (List Assign) ConflictSet + in + \(conrep : a) (conrep : List (Tree a)) -> + Node {a} conrep conrep) + a + (filter {Tree (Tuple2 (List Assign) ConflictSet)} - (\(a : List Assign) (ds : ConflictSet) -> - ConflictSet_match - ds - {all dead. - Tree (Tuple2 (List Assign) ConflictSet)} - (\(cs : List integer) -> - /\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - (Known cs)) - chs) - (/\dead -> - let - !conrep : List integer - = combine (go chs) (Nil {integer}) - !cs' : ConflictSet = Known conrep - in - Bool_match - (List_match - {integer} - conrep - {all dead. Bool} - (/\dead -> False) - (\(a : integer) (as : List integer) -> - /\dead -> True) - {all dead. dead}) - {all dead. - Tree (Tuple2 (List Assign) ConflictSet)} - (/\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) - (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - cs') - (Nil - {Tree - (Tuple2 - (List Assign) - ConflictSet)})) - (/\dead -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) - (conrep : List (Tree a)) -> - Node {a} conrep conrep) - (Tuple2 - {List Assign} - {ConflictSet} - a - cs') - chs) - {all dead. dead}) - {all dead. dead})) - (bt csp eta)) - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - mapTree - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - {Tuple2 (List Assign) ConflictSet} - ((let - a = Tuple2 (List Assign) ConflictSet - in - /\b -> - \(ds : Tuple2 a b) -> - Tuple2_match - {a} - {b} - ds - {a} - (\(a : a) (ds : b) -> a)) - {List (List ConflictSet)}) - (lookupCache csp (cacheChecks csp (emptyTable csp) eta))) - (/\dead -> bt) - (/\dead -> - \(csp : CSP) (eta : Tree (List Assign)) -> - let - !t : - Tree - (Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))) - = lookupCache csp (cacheChecks csp (emptyTable csp) eta) - in - mapTree - {Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))} - {Tuple2 (List Assign) ConflictSet} - (\(ds : - Tuple2 - (Tuple2 (List Assign) ConflictSet) - (List (List ConflictSet))) -> - Tuple2_match - {Tuple2 (List Assign) ConflictSet} - {List (List ConflictSet)} - ds - {Tuple2 (List Assign) ConflictSet} - (\(ds : Tuple2 (List Assign) ConflictSet) - (tbl : List (List ConflictSet)) -> - Tuple2_match - {List Assign} - {ConflictSet} - ds + (\(eta : Tree (Tuple2 (List Assign) ConflictSet)) -> + Tree_match {Tuple2 (List Assign) ConflictSet} - (\(as : List Assign) (cs : ConflictSet) -> - let - !wipedDomains : List (List ConflictSet) - = (let - a = List ConflictSet - in - \(g : - all b. (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> - Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : List ConflictSet -> a -> a) - (n : a) -> - (let - a = List ConflictSet - in - /\b -> - \(k : a -> b -> b) (z : b) -> - letrec - !go : List a -> b - = \(ds : List a) -> - List_match - {a} - ds - {all dead. b} - (/\dead -> z) - (\(y : a) - (ys : - List a) -> - /\dead -> - k y (go ys)) - {all dead. dead} - in - \(eta : List a) -> go eta) - {a} - (\(ds : List ConflictSet) - (ds : a) -> - Bool_match - (go ds) - {all dead. a} - (/\dead -> c ds ds) - (/\dead -> ds) - {all dead. dead}) - n - tbl) - in - Tuple2 + eta + {Bool} + (\(ipv : Tuple2 (List Assign) ConflictSet) + (ipv : + List + (Tree + (Tuple2 (List Assign) ConflictSet))) -> + Tuple2_match {List Assign} {ConflictSet} - as - (Bool_match - (List_match - {List ConflictSet} - wipedDomains - {all dead. Bool} - (/\dead -> True) - (\(ipv : List ConflictSet) - (ipv : List (List ConflictSet)) -> - /\dead -> False) - {all dead. dead}) - {all dead. ConflictSet} - (/\dead -> cs) - (/\dead -> - Known - (collect - (List_match - {List ConflictSet} - wipedDomains - {all dead. List ConflictSet} - (/\dead -> - traceError - {List ConflictSet} - "PT8") - (\(x : List ConflictSet) - (ds : - List - (List ConflictSet)) -> - /\dead -> x) - {all dead. dead}))) - {all dead. dead})))) - t) - {all dead. dead} - in - go - (filter - {Tuple2 (List Assign) ConflictSet} - (\(eta : Tuple2 (List Assign) ConflictSet) -> - Tuple2_match - {List Assign} - {ConflictSet} - eta - {Bool} - (\(ipv : List Assign) (ipv : ConflictSet) -> - ConflictSet_match - ipv - {all dead. Bool} - (\(ds : List integer) -> - /\dead -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> True) - (\(ipv : integer) (ipv : List integer) -> - /\dead -> False) - {all dead. dead}) - (/\dead -> False) - {all dead. dead})) - (leaves - {Tuple2 (List Assign) ConflictSet} - (foldTree - {Tuple2 (List Assign) ConflictSet} - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(a : Tuple2 (List Assign) ConflictSet) - (cs : List (Tree (Tuple2 (List Assign) ConflictSet))) -> - (let - a = Tuple2 (List Assign) ConflictSet - in - \(conrep : a) (conrep : List (Tree a)) -> - Node {a} conrep conrep) - a - (filter - {Tree (Tuple2 (List Assign) ConflictSet)} - (\(eta : Tree (Tuple2 (List Assign) ConflictSet)) -> - Tree_match - {Tuple2 (List Assign) ConflictSet} - eta - {Bool} - (\(ipv : Tuple2 (List Assign) ConflictSet) - (ipv : - List - (Tree - (Tuple2 (List Assign) ConflictSet))) -> - Tuple2_match - {List Assign} - {ConflictSet} - ipv - {Bool} - (\(ipv : List Assign) (ipv : ConflictSet) -> - Bool_match - (ConflictSet_match - ipv - {all dead. Bool} - (\(ds : List integer) -> - /\dead -> - List_match - {integer} - ds - {all dead. Bool} - (/\dead -> False) - (\(a : integer) - (as : List integer) -> - /\dead -> True) - {all dead. dead}) - (/\dead -> False) - {all dead. dead}) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - {all dead. dead}))) - cs)) - (labeler - csp - (CSP_match - csp - {Tree (List Assign)} - (\(ds : integer) - (ds : integer) - (ds : Assign -> Assign -> Bool) -> - let - !vallist : List integer = interval 1 ds - in - initTree - {List Assign} - (\(ss : List Assign) -> - (let - a = List Assign - in - \(g : all b. (a -> b -> b) -> b -> b) -> - g - {List a} - (\(ds : a) (ds : List a) -> Cons {a} ds ds) - (Nil {a})) - (/\a -> - \(c : List Assign -> a -> a) - (n : a) -> - letrec - !go : - List integer -> a - = \(ds : List integer) -> - List_match - {integer} - ds - {all dead. a} - (/\dead -> n) - (\(y : integer) - (ys : List integer) -> - /\dead -> - let - !ds : a = go ys - in - c - (Cons - {Assign} - (`Cons=` - (addInteger - 1 - (List_match - {Assign} - ss - {integer} - 0 - (\(ds : - Assign) - (ds : - List - Assign) -> - Assign_match - ds - {integer} - (\(var : - integer) - (val : - integer) -> - var)))) - y) - ss) - ds) - {all dead. dead} - in - ifThenElse - {all dead. a} - (lessThanInteger - (List_match - {Assign} - ss - {integer} - 0 - (\(ds : Assign) - (ds : List Assign) -> - Assign_match - ds + ipv + {Bool} + (\(ipv : List Assign) (ipv : ConflictSet) -> + Bool_match + (ConflictSet_match + ipv + {all dead. Bool} + (\(ds : List integer) -> + /\dead -> + List_match {integer} - (\(var : integer) - (val : integer) -> - var))) - ds) - (/\dead -> go vallist) - (/\dead -> n) - {all dead. dead})) - (Nil {Assign})))))))) - 5 - (let - data `PlutusBenchmark.NoFib.Queens.Algorithm` | `match_PlutusBenchmark.NoFib.Queens.Algorithm` where - `PlutusBenchmark.NoFib.Queens.Bjbt1` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Bjbt2` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Bm` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Bt` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - `PlutusBenchmark.NoFib.Queens.Fc` : - `PlutusBenchmark.NoFib.Queens.Algorithm` - in - `PlutusBenchmark.NoFib.Queens.Fc`) \ No newline at end of file + ds + {all dead. Bool} + (/\dead -> False) + (\(a : integer) + (as : List integer) -> + /\dead -> True) + {all dead. dead}) + (/\dead -> False) + {all dead. dead}) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}))) + cs)) + (labeler + csp + (CSP_match + csp + {Tree (List Assign)} + (\(ds : integer) + (ds : integer) + (ds : Assign -> Assign -> Bool) -> + let + !vallist : List integer = interval 1 ds + in + initTree + {List Assign} + (\(ss : List Assign) -> + (let + a = List Assign + in + \(g : all b. (a -> b -> b) -> b -> b) -> + g + {List a} + (\(ds : a) (ds : List a) -> + Cons {a} ds ds) + (Nil {a})) + (/\a -> + \(c : List Assign -> a -> a) + (n : a) -> + letrec + !go : + List integer -> a + = \(ds : List integer) -> + List_match + {integer} + ds + {all dead. a} + (/\dead -> n) + (\(y : integer) + (ys : List integer) -> + /\dead -> + let + !ds : a = go ys + in + c + (Cons + {Assign} + (`Cons=` + (addInteger + 1 + (List_match + {Assign} + ss + {integer} + 0 + (\(ds : + Assign) + (ds : + List + Assign) -> + Assign_match + ds + {integer} + (\(var : + integer) + (val : + integer) -> + var)))) + y) + ss) + ds) + {all dead. dead} + in + ifThenElse + {all dead. a} + (lessThanInteger + (List_match + {Assign} + ss + {integer} + 0 + (\(ds : Assign) + (ds : List Assign) -> + Assign_match + ds + {integer} + (\(var : integer) + (val : integer) -> + var))) + ds) + (/\dead -> go vallist) + (/\dead -> n) + {all dead. dead})) + (Nil {Assign})))))))) + 5 + (let + data `PlutusBenchmark.NoFib.Queens.Algorithm` | `match_PlutusBenchmark.NoFib.Queens.Algorithm` where + `PlutusBenchmark.NoFib.Queens.Bjbt1` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Bjbt2` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Bm` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Bt` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + `PlutusBenchmark.NoFib.Queens.Fc` : + `PlutusBenchmark.NoFib.Queens.Algorithm` + in + `PlutusBenchmark.NoFib.Queens.Fc`)) \ No newline at end of file diff --git a/plutus-benchmark/script-contexts/test/9.6/checkScriptContext1.pir.golden b/plutus-benchmark/script-contexts/test/9.6/checkScriptContext1.pir.golden index 4a69e3c9acb..c5ff168e76c 100644 --- a/plutus-benchmark/script-contexts/test/9.6/checkScriptContext1.pir.golden +++ b/plutus-benchmark/script-contexts/test/9.6/checkScriptContext1.pir.golden @@ -1,1391 +1,1406 @@ -(let - data Credential | Credential_match where - PubKeyCredential : bytestring -> Credential - ScriptCredential : bytestring -> Credential - data StakingCredential | StakingCredential_match where - StakingHash : Credential -> StakingCredential - StakingPtr : integer -> integer -> integer -> StakingCredential - data (Maybe :: * -> *) a | Maybe_match where - Just : a -> Maybe a - Nothing : Maybe a - data Address | Address_match where - Address : Credential -> Maybe StakingCredential -> Address - data OutputDatum | OutputDatum_match where - NoOutputDatum : OutputDatum - OutputDatum : data -> OutputDatum - OutputDatumHash : bytestring -> OutputDatum - data (Tuple2 :: * -> * -> *) a b | Tuple2_match where - Tuple2 : a -> b -> Tuple2 a b - in - letrec - data (List :: * -> *) a | List_match where - Nil : List a - Cons : a -> List a -> List a - in - let - data TxOut | TxOut_match where - TxOut : - Address -> - (\k v -> List (Tuple2 k v)) - bytestring - ((\k v -> List (Tuple2 k v)) bytestring integer) -> - OutputDatum -> - Maybe bytestring -> - TxOut - in - letrec - !go : List TxOut -> integer - = \(ds : List TxOut) -> - List_match - {TxOut} - ds - {all dead. integer} - (/\dead -> 0) - (\(x : TxOut) (xs : List TxOut) -> /\dead -> addInteger 1 (go xs)) - {all dead. dead} - in - let - !`$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` : data -> data - = \(d : data) -> d - data Bool | Bool_match where - True : Bool - False : Bool - data Unit | Unit_match where - Unit : Unit - !traceError : all a. string -> a - = /\a -> - \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} - !`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` : data -> Bool - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Bool} - (equalsInteger 0 index) - (/\dead -> False) - (/\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger 1 index) - (/\dead -> True) - (/\dead -> traceError {Bool} "PT1") - {all dead. dead}) - {all dead. dead} - data (Extended :: * -> *) a | Extended_match where - Finite : a -> Extended a - NegInf : Extended a - PosInf : Extended a - !`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` : - all a. (\a -> data -> a) a -> data -> Extended a - = /\a -> - \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Extended a} - (equalsInteger 0 index) - (/\dead -> NegInf {a}) - (/\dead -> - ifThenElse - {all dead. Extended a} - (equalsInteger 1 index) - (/\dead -> - Finite {a} (`$dUnsafeFromData` (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Extended a} - (equalsInteger 2 index) - (/\dead -> PosInf {a}) - (/\dead -> traceError {Extended a} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data GovernanceActionId | GovernanceActionId_match where - GovernanceActionId : bytestring -> integer -> GovernanceActionId - !`$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` : - data -> GovernanceActionId - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. GovernanceActionId} - (equalsInteger 0 index) - (/\dead -> - GovernanceActionId - (unBData (headList {data} args)) - (unIData (headList {data} (tailList {data} args)))) - (/\dead -> traceError {GovernanceActionId} "PT1") - {all dead. dead} - !`$fUnsafeFromDataList_$cunsafeFromBuiltinData` : - all a. (\a -> data -> a) a -> data -> List a - = /\a -> - \(`$dUnsafeFromData` : (\a -> data -> a) a) -> - letrec - !go : list data -> List a - = \(l : list data) -> - chooseList - {data} - {Unit -> List a} - l - (\(ds : Unit) -> Nil {a}) - (\(ds : Unit) -> - Cons - {a} - (`$dUnsafeFromData` (headList {data} l)) - (go (tailList {data} l))) - Unit - in - \(d : data) -> go (unListData d) - !`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` : data -> Credential - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Credential} - (equalsInteger 0 index) - (/\dead -> PubKeyCredential (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Credential} - (equalsInteger 1 index) - (/\dead -> ScriptCredential (unBData (headList {data} args))) - (/\dead -> traceError {Credential} "PT1") - {all dead. dead}) - {all dead. dead} - !`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` : - all a. (\a -> data -> a) a -> data -> Maybe a - = /\a -> - \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Maybe a} - (equalsInteger 1 index) - (/\dead -> Nothing {a}) - (/\dead -> - ifThenElse - {all dead. Maybe a} - (equalsInteger 0 index) - (/\dead -> - Just {a} (`$dUnsafeFromData` (headList {data} args))) - (/\dead -> traceError {Maybe a} "PT1") - {all dead. dead}) - {all dead. dead} - !`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` : - all k v. - (\a -> data -> a) k -> - (\a -> data -> a) v -> +((let + data Credential | Credential_match where + PubKeyCredential : bytestring -> Credential + ScriptCredential : bytestring -> Credential + data StakingCredential | StakingCredential_match where + StakingHash : Credential -> StakingCredential + StakingPtr : integer -> integer -> integer -> StakingCredential + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + data Address | Address_match where + Address : Credential -> Maybe StakingCredential -> Address + data OutputDatum | OutputDatum_match where + NoOutputDatum : OutputDatum + OutputDatum : data -> OutputDatum + OutputDatumHash : bytestring -> OutputDatum + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + data TxOut | TxOut_match where + TxOut : + Address -> + (\k v -> List (Tuple2 k v)) + bytestring + ((\k v -> List (Tuple2 k v)) bytestring integer) -> + OutputDatum -> + Maybe bytestring -> + TxOut + in + letrec + !go : List TxOut -> integer + = \(ds : List TxOut) -> + List_match + {TxOut} + ds + {all dead. integer} + (/\dead -> 0) + (\(x : TxOut) (xs : List TxOut) -> /\dead -> addInteger 1 (go xs)) + {all dead. dead} + in + let + !`$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` : data -> data + = \(d : data) -> d + data Bool | Bool_match where + True : Bool + False : Bool + data Unit | Unit_match where + Unit : Unit + !traceError : all a. string -> a + = /\a -> + \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} + !`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` : data -> Bool + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Bool} + (equalsInteger 0 index) + (/\dead -> False) + (/\dead -> + ifThenElse + {all dead. Bool} + (equalsInteger 1 index) + (/\dead -> True) + (/\dead -> traceError {Bool} "PT1") + {all dead. dead}) + {all dead. dead} + data (Extended :: * -> *) a | Extended_match where + Finite : a -> Extended a + NegInf : Extended a + PosInf : Extended a + !`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` : + all a. (\a -> data -> a) a -> data -> Extended a + = /\a -> + \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Extended a} + (equalsInteger 0 index) + (/\dead -> NegInf {a}) + (/\dead -> + ifThenElse + {all dead. Extended a} + (equalsInteger 1 index) + (/\dead -> + Finite {a} (`$dUnsafeFromData` (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Extended a} + (equalsInteger 2 index) + (/\dead -> PosInf {a}) + (/\dead -> traceError {Extended a} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data GovernanceActionId | GovernanceActionId_match where + GovernanceActionId : bytestring -> integer -> GovernanceActionId + !`$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` : + data -> GovernanceActionId + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. GovernanceActionId} + (equalsInteger 0 index) + (/\dead -> + GovernanceActionId + (unBData (headList {data} args)) + (unIData (headList {data} (tailList {data} args)))) + (/\dead -> traceError {GovernanceActionId} "PT1") + {all dead. dead} + !`$fUnsafeFromDataList_$cunsafeFromBuiltinData` : + all a. (\a -> data -> a) a -> data -> List a + = /\a -> + \(`$dUnsafeFromData` : (\a -> data -> a) a) -> + letrec + !go : list data -> List a + = \(l : list data) -> + chooseList + {data} + {Unit -> List a} + l + (\(ds : Unit) -> Nil {a}) + (\(ds : Unit) -> + Cons + {a} + (`$dUnsafeFromData` (headList {data} l)) + (go (tailList {data} l))) + Unit + in + \(d : data) -> go (unListData d) + !`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` : data -> Credential + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Credential} + (equalsInteger 0 index) + (/\dead -> PubKeyCredential (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Credential} + (equalsInteger 1 index) + (/\dead -> ScriptCredential (unBData (headList {data} args))) + (/\dead -> traceError {Credential} "PT1") + {all dead. dead}) + {all dead. dead} + !`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` : + all a. (\a -> data -> a) a -> data -> Maybe a + = /\a -> + \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Maybe a} + (equalsInteger 1 index) + (/\dead -> Nothing {a}) + (/\dead -> + ifThenElse + {all dead. Maybe a} + (equalsInteger 0 index) + (/\dead -> + Just {a} (`$dUnsafeFromData` (headList {data} args))) + (/\dead -> traceError {Maybe a} "PT1") + {all dead. dead}) + {all dead. dead} + !`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` : + all k v. + (\a -> data -> a) k -> + (\a -> data -> a) v -> + data -> + (\k v -> List (Tuple2 k v)) k v + = /\k v -> + \(`$dUnsafeFromData` : (\a -> data -> a) k) + (`$dUnsafeFromData` : (\a -> data -> a) v) -> + letrec + !go : list (pair data data) -> List (Tuple2 k v) + = \(l : list (pair data data)) -> + chooseList + {pair data data} + {Unit -> List (Tuple2 k v)} + l + (\(ds : Unit) -> Nil {Tuple2 k v}) + (\(ds : Unit) -> + let + !tup : pair data data = headList {pair data data} l + in + Cons + {Tuple2 k v} + (Tuple2 + {k} + {v} + (`$dUnsafeFromData` (fstPair {data} {data} tup)) + (`$dUnsafeFromData` (sndPair {data} {data} tup))) + (go (tailList {pair data data} l))) + Unit + in + \(d : data) -> go (unMapData d) + data ProtocolVersion | ProtocolVersion_match where + ProtocolVersion : integer -> integer -> ProtocolVersion + data Rational | Rational_match where + Rational : integer -> integer -> Rational + data GovernanceAction | GovernanceAction_match where + HardForkInitiation : + Maybe GovernanceActionId -> ProtocolVersion -> GovernanceAction + InfoAction : GovernanceAction + NewConstitution : + Maybe GovernanceActionId -> Maybe bytestring -> GovernanceAction + NoConfidence : Maybe GovernanceActionId -> GovernanceAction + ParameterChange : + Maybe GovernanceActionId -> data -> - (\k v -> List (Tuple2 k v)) k v - = /\k v -> - \(`$dUnsafeFromData` : (\a -> data -> a) k) - (`$dUnsafeFromData` : (\a -> data -> a) v) -> - letrec - !go : list (pair data data) -> List (Tuple2 k v) - = \(l : list (pair data data)) -> - chooseList - {pair data data} - {Unit -> List (Tuple2 k v)} - l - (\(ds : Unit) -> Nil {Tuple2 k v}) - (\(ds : Unit) -> - let - !tup : pair data data = headList {pair data data} l - in - Cons - {Tuple2 k v} - (Tuple2 - {k} - {v} - (`$dUnsafeFromData` (fstPair {data} {data} tup)) - (`$dUnsafeFromData` (sndPair {data} {data} tup))) - (go (tailList {pair data data} l))) - Unit - in - \(d : data) -> go (unMapData d) - data ProtocolVersion | ProtocolVersion_match where - ProtocolVersion : integer -> integer -> ProtocolVersion - data Rational | Rational_match where - Rational : integer -> integer -> Rational - data GovernanceAction | GovernanceAction_match where - HardForkInitiation : - Maybe GovernanceActionId -> ProtocolVersion -> GovernanceAction - InfoAction : GovernanceAction - NewConstitution : - Maybe GovernanceActionId -> Maybe bytestring -> GovernanceAction - NoConfidence : Maybe GovernanceActionId -> GovernanceAction - ParameterChange : - Maybe GovernanceActionId -> data -> Maybe bytestring -> GovernanceAction - TreasuryWithdrawals : - (\k v -> List (Tuple2 k v)) Credential integer -> - Maybe bytestring -> - GovernanceAction - UpdateCommittee : - Maybe GovernanceActionId -> - List Credential -> - (\k v -> List (Tuple2 k v)) Credential integer -> - Rational -> - GovernanceAction - data ProposalProcedure | ProposalProcedure_match where - ProposalProcedure : - integer -> Credential -> GovernanceAction -> ProposalProcedure - in - letrec - !euclid : integer -> integer -> integer - = \(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (equalsInteger 0 y) - (/\dead -> x) - (/\dead -> euclid y (modInteger x y)) - {all dead. dead} - in - letrec - !unsafeRatio : integer -> integer -> Rational - = \(n : integer) (d : integer) -> - ifThenElse - {all dead. Rational} - (equalsInteger 0 d) - (/\dead -> traceError {Rational} "PT3") - (/\dead -> - ifThenElse - {all dead. Rational} - (lessThanInteger d 0) - (/\dead -> - unsafeRatio (subtractInteger 0 n) (subtractInteger 0 d)) - (/\dead -> - let - !gcd' : integer = euclid n d - in - Rational (quotientInteger n gcd') (quotientInteger d gcd')) - {all dead. dead}) - {all dead. dead} - in - let - !`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` : - data -> ProposalProcedure - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ProposalProcedure} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - ProposalProcedure - (unIData (headList {data} args)) - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} l)) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} (tailList {data} l)) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - ParameterChange - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (headList {data} l) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} (tailList {data} l)))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 1 index) - (/\dead -> - HardForkInitiation - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (let - !tup : pair integer (list data) - = unConstrData - (headList {data} (tailList {data} args)) - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ProtocolVersion} - (equalsInteger 0 index) - (/\dead -> - ProtocolVersion - (unIData (headList {data} args)) - (unIData - (headList - {data} - (tailList {data} args)))) - (/\dead -> traceError {ProtocolVersion} "PT1") - {all dead. dead})) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 2 index) - (/\dead -> - TreasuryWithdrawals - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Credential} - {integer} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - unIData - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 3 index) - (/\dead -> - NoConfidence - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 4 index) - (/\dead -> - let - !l : list data - = tailList {data} args - !l : list data = tailList {data} l - in - UpdateCommittee - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {Credential} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Credential} + Maybe bytestring -> + GovernanceAction + TreasuryWithdrawals : + (\k v -> List (Tuple2 k v)) Credential integer -> + Maybe bytestring -> + GovernanceAction + UpdateCommittee : + Maybe GovernanceActionId -> + List Credential -> + (\k v -> List (Tuple2 k v)) Credential integer -> + Rational -> + GovernanceAction + data ProposalProcedure | ProposalProcedure_match where + ProposalProcedure : + integer -> Credential -> GovernanceAction -> ProposalProcedure + in + letrec + !euclid : integer -> integer -> integer + = \(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (equalsInteger 0 y) + (/\dead -> x) + (/\dead -> euclid y (modInteger x y)) + {all dead. dead} + in + letrec + !unsafeRatio : integer -> integer -> Rational + = \(n : integer) (d : integer) -> + ifThenElse + {all dead. Rational} + (equalsInteger 0 d) + (/\dead -> traceError {Rational} "PT3") + (/\dead -> + ifThenElse + {all dead. Rational} + (lessThanInteger d 0) + (/\dead -> + unsafeRatio (subtractInteger 0 n) (subtractInteger 0 d)) + (/\dead -> + let + !gcd' : integer = euclid n d + in + Rational (quotientInteger n gcd') (quotientInteger d gcd')) + {all dead. dead}) + {all dead. dead} + in + let + !`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` : + data -> ProposalProcedure + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ProposalProcedure} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + ProposalProcedure + (unIData (headList {data} args)) + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} l)) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} (tailList {data} l)) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + ParameterChange + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (headList {data} l) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} (tailList {data} l)))) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 1 index) + (/\dead -> + HardForkInitiation + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (let + !tup : pair integer (list data) + = unConstrData + (headList {data} (tailList {data} args)) + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ProtocolVersion} + (equalsInteger 0 index) + (/\dead -> + ProtocolVersion + (unIData (headList {data} args)) + (unIData + (headList + {data} + (tailList {data} args)))) + (/\dead -> traceError {ProtocolVersion} "PT1") + {all dead. dead})) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 2 index) + (/\dead -> + TreasuryWithdrawals + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Credential} + {integer} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + unIData + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 3 index) + (/\dead -> + NoConfidence + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 4 index) + (/\dead -> + let + !l : list data + = tailList {data} args + !l : list data = tailList {data} l + in + UpdateCommittee + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {Credential} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Credential} + {integer} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + unIData + (headList {data} l)) + (let + !x : data + = headList + {data} + (tailList {data} l) + in + Tuple2_match {integer} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - unIData - (headList {data} l)) - (let - !x : data - = headList - {data} - (tailList {data} l) - in - Tuple2_match - {integer} - {integer} - (let - !tup : pair integer (list data) - = unConstrData x - !index : integer - = fstPair + {integer} + (let + !tup : pair integer (list data) + = unConstrData x + !index : integer + = fstPair + {integer} + {list data} + tup + !args : list data + = sndPair + {integer} + {list data} + tup + in + ifThenElse + {all dead. + Tuple2 integer integer} + (equalsInteger 0 index) + (/\dead -> + Tuple2 {integer} - {list data} - tup - !args : list data - = sndPair {integer} - {list data} - tup - in - ifThenElse - {all dead. - Tuple2 integer integer} - (equalsInteger 0 index) - (/\dead -> - Tuple2 - {integer} - {integer} - (unIData - (headList {data} args)) - (unIData - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - traceError - {Tuple2 integer integer} - "PT1") - {all dead. dead}) - {Rational} - (\(a : integer) (b : integer) -> - unsafeRatio a b))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 5 index) - (/\dead -> - NewConstitution - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (let - !tup : - pair integer (list data) - = unConstrData + (unIData + (headList {data} args)) + (unIData (headList {data} (tailList {data} - args)) - !index : integer - = fstPair - {integer} - {list data} - tup - !args : list data - = sndPair - {integer} - {list data} - tup - in - ifThenElse - {all dead. Maybe bytestring} - (equalsInteger 0 index) - (/\dead -> - `$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} args)) - (/\dead -> - traceError - {Maybe bytestring} - "PT1") - {all dead. dead})) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 6 index) - (/\dead -> InfoAction) + args)))) (/\dead -> traceError - {GovernanceAction} + {Tuple2 integer integer} "PT1") {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead})) - (/\dead -> traceError {ProposalProcedure} "PT1") - {all dead. dead} - data DRep | DRep_match where - DRep : Credential -> DRep - DRepAlwaysAbstain : DRep - DRepAlwaysNoConfidence : DRep - !`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` : data -> DRep - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. DRep} - (equalsInteger 0 index) - (/\dead -> - DRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. DRep} - (equalsInteger 1 index) - (/\dead -> DRepAlwaysAbstain) - (/\dead -> - ifThenElse - {all dead. DRep} - (equalsInteger 2 index) - (/\dead -> DRepAlwaysNoConfidence) - (/\dead -> traceError {DRep} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data Delegatee | Delegatee_match where - DelegStake : bytestring -> Delegatee - DelegStakeVote : bytestring -> DRep -> Delegatee - DelegVote : DRep -> Delegatee - !`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` : data -> Delegatee - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Delegatee} - (equalsInteger 0 index) - (/\dead -> DelegStake (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Delegatee} - (equalsInteger 1 index) - (/\dead -> - DelegVote - (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Delegatee} - (equalsInteger 2 index) - (/\dead -> - DelegStakeVote - (unBData (headList {data} args)) - (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {Delegatee} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data TxCert | TxCert_match where - TxCertAuthHotCommittee : Credential -> Credential -> TxCert - TxCertDelegStaking : Credential -> Delegatee -> TxCert - TxCertPoolRegister : bytestring -> bytestring -> TxCert - TxCertPoolRetire : bytestring -> integer -> TxCert - TxCertRegDRep : Credential -> integer -> TxCert - TxCertRegDeleg : Credential -> Delegatee -> integer -> TxCert - TxCertRegStaking : Credential -> Maybe integer -> TxCert - TxCertResignColdCommittee : Credential -> TxCert - TxCertUnRegDRep : Credential -> integer -> TxCert - TxCertUnRegStaking : Credential -> Maybe integer -> TxCert - TxCertUpdateDRep : Credential -> TxCert - !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : - data -> TxCert - = \(eta : data) -> - let - !tup : pair integer (list data) = unConstrData eta - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxCert} - (equalsInteger 0 index) - (/\dead -> - TxCertRegStaking - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 1 index) - (/\dead -> - TxCertUnRegStaking - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 2 index) - (/\dead -> - TxCertDelegStaking - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 3 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - TxCertRegDeleg - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` - (headList {data} l)) - (unIData (headList {data} (tailList {data} l)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 4 index) - (/\dead -> - TxCertRegDRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (unIData - (headList - {data} - (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 5 index) - (/\dead -> - TxCertUpdateDRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 6 index) - (/\dead -> - TxCertUnRegDRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (unIData - (headList - {data} - (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 7 index) - (/\dead -> - TxCertPoolRegister - (unBData - (headList {data} args)) - (unBData - (headList - {data} - (tailList + {Rational} + (\(a : integer) (b : integer) -> + unsafeRatio a b))) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 5 index) + (/\dead -> + NewConstitution + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (let + !tup : + pair integer (list data) + = unConstrData + (headList {data} - args)))) - (/\dead -> + (tailList + {data} + args)) + !index : integer + = fstPair + {integer} + {list data} + tup + !args : list data + = sndPair + {integer} + {list data} + tup + in ifThenElse - {all dead. TxCert} - (equalsInteger 8 index) + {all dead. Maybe bytestring} + (equalsInteger 0 index) (/\dead -> - TxCertPoolRetire - (unBData - (headList - {data} - args)) - (unIData - (headList - {data} - (tailList - {data} - args)))) + `$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} args)) (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 9 index) - (/\dead -> - TxCertAuthHotCommittee - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList - {data} - args)) - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger - 10 - index) - (/\dead -> - TxCertResignColdCommittee - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList - {data} - args))) - (/\dead -> - traceError - {TxCert} - "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data Voter | Voter_match where - CommitteeVoter : Credential -> Voter - DRepVoter : Credential -> Voter - StakePoolVoter : bytestring -> Voter - !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> Voter - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Voter} - (equalsInteger 0 index) - (/\dead -> - CommitteeVoter - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Voter} - (equalsInteger 1 index) - (/\dead -> - DRepVoter - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Voter} - (equalsInteger 2 index) - (/\dead -> - StakePoolVoter (unBData (headList {data} args))) - (/\dead -> traceError {Voter} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data TxOutRef | TxOutRef_match where - TxOutRef : bytestring -> integer -> TxOutRef - !`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` : data -> TxOutRef - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxOutRef} - (equalsInteger 0 index) - (/\dead -> - TxOutRef - (unBData (headList {data} args)) - (unIData (headList {data} (tailList {data} args)))) - (/\dead -> traceError {TxOutRef} "PT1") - {all dead. dead} - ~`$fUnsafeFromDataValue` : - data -> (\k v -> List (Tuple2 k v)) bytestring integer - = `$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {integer} - unBData - unIData - !`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` : - data -> TxOut - = \(eta : data) -> - let - !tup : pair integer (list data) = unConstrData eta - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxOut} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - !l : list data = tailList {data} l - in - TxOut - (let - !tup : pair integer (list data) - = unConstrData (headList {data} args) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Address} - (equalsInteger 0 index) - (/\dead -> - Address - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {StakingCredential} - (\(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. StakingCredential} - (equalsInteger 0 index) - (/\dead -> - StakingHash - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. StakingCredential} - (equalsInteger 1 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - StakingPtr - (unIData (headList {data} args)) - (unIData (headList {data} l)) - (unIData - (headList - {data} - (tailList {data} l)))) - (/\dead -> - traceError {StakingCredential} "PT1") - {all dead. dead}) - {all dead. dead}) - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {Address} "PT1") - {all dead. dead}) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {(\k v -> List (Tuple2 k v)) bytestring integer} - unBData - `$fUnsafeFromDataValue` - (headList {data} l)) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} l) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. OutputDatum} - (equalsInteger 0 index) - (/\dead -> NoOutputDatum) - (/\dead -> - ifThenElse - {all dead. OutputDatum} - (equalsInteger 1 index) - (/\dead -> - OutputDatumHash (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. OutputDatum} - (equalsInteger 2 index) - (/\dead -> OutputDatum (headList {data} args)) - (/\dead -> traceError {OutputDatum} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} (tailList {data} l)))) - (/\dead -> traceError {TxOut} "PT1") - {all dead. dead} - data TxInInfo | TxInInfo_match where - TxInInfo : TxOutRef -> TxOut -> TxInInfo - !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> TxInInfo - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxInInfo} - (equalsInteger 0 index) - (/\dead -> - TxInInfo - (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {TxInInfo} "PT1") - {all dead. dead} - data ScriptInfo | ScriptInfo_match where - CertifyingScript : integer -> TxCert -> ScriptInfo - MintingScript : bytestring -> ScriptInfo - ProposingScript : integer -> ProposalProcedure -> ScriptInfo - RewardingScript : Credential -> ScriptInfo - SpendingScript : TxOutRef -> Maybe data -> ScriptInfo - VotingScript : Voter -> ScriptInfo - data (LowerBound :: * -> *) a | LowerBound_match where - LowerBound : Extended a -> Bool -> LowerBound a - data (UpperBound :: * -> *) a | UpperBound_match where - UpperBound : Extended a -> Bool -> UpperBound a - data (Interval :: * -> *) a | Interval_match where - Interval : LowerBound a -> UpperBound a -> Interval a - data ScriptPurpose | ScriptPurpose_match where - Certifying : integer -> TxCert -> ScriptPurpose - Minting : bytestring -> ScriptPurpose - Proposing : integer -> ProposalProcedure -> ScriptPurpose - Rewarding : Credential -> ScriptPurpose - Spending : TxOutRef -> ScriptPurpose - Voting : Voter -> ScriptPurpose - data Vote | Vote_match where - Abstain : Vote - VoteNo : Vote - VoteYes : Vote - data TxInfo | TxInfo_match where - TxInfo : - List TxInInfo -> - List TxInInfo -> - List TxOut -> - integer -> - (\k v -> List (Tuple2 k v)) - bytestring - ((\k v -> List (Tuple2 k v)) bytestring integer) -> - List TxCert -> - (\k v -> List (Tuple2 k v)) Credential integer -> - Interval integer -> - List bytestring -> - (\k v -> List (Tuple2 k v)) ScriptPurpose data -> - (\k v -> List (Tuple2 k v)) bytestring data -> - bytestring -> - (\k v -> List (Tuple2 k v)) - Voter - ((\k v -> List (Tuple2 k v)) GovernanceActionId Vote) -> - List ProposalProcedure -> - Maybe integer -> - Maybe integer -> - TxInfo - data ScriptContext | ScriptContext_match where - ScriptContext : TxInfo -> data -> ScriptInfo -> ScriptContext - in - \(d : data) -> - ScriptContext_match - (let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ScriptContext} - (equalsInteger 0 index) - (/\dead -> + traceError + {Maybe bytestring} + "PT1") + {all dead. dead})) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 6 index) + (/\dead -> InfoAction) + (/\dead -> + traceError + {GovernanceAction} + "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead})) + (/\dead -> traceError {ProposalProcedure} "PT1") + {all dead. dead} + data DRep | DRep_match where + DRep : Credential -> DRep + DRepAlwaysAbstain : DRep + DRepAlwaysNoConfidence : DRep + !`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` : data -> DRep + = \(d : data) -> let - !l : list data = tailList {data} args + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup in - ScriptContext - (let - !tup : pair integer (list data) - = unConstrData (headList {data} args) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxInfo} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - in - TxInfo - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxInInfo} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxInInfo} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxOut} - `$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` - (headList {data} l)) - (unIData (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {(\k v -> List (Tuple2 k v)) bytestring integer} - unBData - `$fUnsafeFromDataValue` - (headList {data} l)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxCert} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Credential} - {integer} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - unIData - (headList {data} l)) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} l) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Interval integer} - (equalsInteger 0 index) - (/\dead -> - Interval - {integer} - (let - !tup : pair integer (list data) - = unConstrData (headList {data} args) - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. LowerBound integer} - (equalsInteger 0 index) - (/\dead -> - LowerBound - {integer} - (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} args)) - (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {LowerBound integer} "PT1") - {all dead. dead}) - (let - !tup : pair integer (list data) - = unConstrData - (headList {data} (tailList {data} args)) - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. UpperBound integer} - (equalsInteger 0 index) - (/\dead -> - UpperBound - {integer} - (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} args)) - (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {UpperBound integer} "PT1") - {all dead. dead})) - (/\dead -> traceError {Interval integer} "PT1") - {all dead. dead}) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {ScriptPurpose} - {data} - (\(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in + ifThenElse + {all dead. DRep} + (equalsInteger 0 index) + (/\dead -> + DRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. DRep} + (equalsInteger 1 index) + (/\dead -> DRepAlwaysAbstain) + (/\dead -> + ifThenElse + {all dead. DRep} + (equalsInteger 2 index) + (/\dead -> DRepAlwaysNoConfidence) + (/\dead -> traceError {DRep} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data Delegatee | Delegatee_match where + DelegStake : bytestring -> Delegatee + DelegStakeVote : bytestring -> DRep -> Delegatee + DelegVote : DRep -> Delegatee + !`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` : data -> Delegatee + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Delegatee} + (equalsInteger 0 index) + (/\dead -> DelegStake (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Delegatee} + (equalsInteger 1 index) + (/\dead -> + DelegVote + (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Delegatee} + (equalsInteger 2 index) + (/\dead -> + DelegStakeVote + (unBData (headList {data} args)) + (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {Delegatee} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data TxCert | TxCert_match where + TxCertAuthHotCommittee : Credential -> Credential -> TxCert + TxCertDelegStaking : Credential -> Delegatee -> TxCert + TxCertPoolRegister : bytestring -> bytestring -> TxCert + TxCertPoolRetire : bytestring -> integer -> TxCert + TxCertRegDRep : Credential -> integer -> TxCert + TxCertRegDeleg : Credential -> Delegatee -> integer -> TxCert + TxCertRegStaking : Credential -> Maybe integer -> TxCert + TxCertResignColdCommittee : Credential -> TxCert + TxCertUnRegDRep : Credential -> integer -> TxCert + TxCertUnRegStaking : Credential -> Maybe integer -> TxCert + TxCertUpdateDRep : Credential -> TxCert + !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : + data -> TxCert + = \(eta : data) -> + let + !tup : pair integer (list data) = unConstrData eta + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxCert} + (equalsInteger 0 index) + (/\dead -> + TxCertRegStaking + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 1 index) + (/\dead -> + TxCertUnRegStaking + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 2 index) + (/\dead -> + TxCertDelegStaking + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 0 index) - (/\dead -> Minting (unBData (headList {data} args))) + {all dead. TxCert} + (equalsInteger 3 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + TxCertRegDeleg + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` + (headList {data} l)) + (unIData + (headList {data} (tailList {data} l)))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 1 index) + {all dead. TxCert} + (equalsInteger 4 index) (/\dead -> - Spending - (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` - (headList {data} args))) + TxCertRegDRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (unIData + (headList + {data} + (tailList {data} args)))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 2 index) + {all dead. TxCert} + (equalsInteger 5 index) (/\dead -> - Rewarding + TxCertUpdateDRep (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` (headList {data} args))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 3 index) + {all dead. TxCert} + (equalsInteger 6 index) (/\dead -> - Certifying - (unIData (headList {data} args)) - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + TxCertUnRegDRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (unIData (headList {data} (tailList {data} args)))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 4 index) + {all dead. TxCert} + (equalsInteger 7 index) (/\dead -> - Voting - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} args))) + TxCertPoolRegister + (unBData + (headList {data} args)) + (unBData + (headList + {data} + (tailList + {data} + args)))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 5 index) + {all dead. TxCert} + (equalsInteger 8 index) (/\dead -> - Proposing - (unIData + TxCertPoolRetire + (unBData (headList {data} args)) - (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (unIData (headList {data} (tailList {data} args)))) (/\dead -> - traceError - {ScriptPurpose} - "PT1") + ifThenElse + {all dead. TxCert} + (equalsInteger + 9 + index) + (/\dead -> + TxCertAuthHotCommittee + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList + {data} + args)) + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + ifThenElse + {all dead. + TxCert} + (equalsInteger + 10 + index) + (/\dead -> + TxCertResignColdCommittee + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList + {data} + args))) + (/\dead -> + traceError + {TxCert} + "PT1") + {all dead. dead}) + {all dead. dead}) {all dead. dead}) {all dead. dead}) {all dead. dead}) {all dead. dead}) {all dead. dead}) {all dead. dead}) - `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {data} - unBData - `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` - (headList {data} l)) - (unBData (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Voter} - {(\k v -> List (Tuple2 k v)) GovernanceActionId Vote} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {GovernanceActionId} - {Vote} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (\(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Vote} - (equalsInteger 0 index) - (/\dead -> VoteNo) - (/\dead -> - ifThenElse - {all dead. Vote} - (equalsInteger 1 index) - (/\dead -> VoteYes) - (/\dead -> - ifThenElse - {all dead. Vote} - (equalsInteger 2 index) - (/\dead -> Abstain) - (/\dead -> traceError {Vote} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead})) - (headList {data} l)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {ProposalProcedure} - `$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} l)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} (tailList {data} l)))) - (/\dead -> traceError {TxInfo} "PT1") - {all dead. dead}) - (headList {data} l) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} (tailList {data} l)) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 0 index) - (/\dead -> MintingScript (unBData (headList {data} args))) - (/\dead -> + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data Voter | Voter_match where + CommitteeVoter : Credential -> Voter + DRepVoter : Credential -> Voter + StakePoolVoter : bytestring -> Voter + !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> Voter + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Voter} + (equalsInteger 0 index) + (/\dead -> + CommitteeVoter + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Voter} + (equalsInteger 1 index) + (/\dead -> + DRepVoter + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Voter} + (equalsInteger 2 index) + (/\dead -> + StakePoolVoter (unBData (headList {data} args))) + (/\dead -> traceError {Voter} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data TxOutRef | TxOutRef_match where + TxOutRef : bytestring -> integer -> TxOutRef + !`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` : data -> TxOutRef + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxOutRef} + (equalsInteger 0 index) + (/\dead -> + TxOutRef + (unBData (headList {data} args)) + (unIData (headList {data} (tailList {data} args)))) + (/\dead -> traceError {TxOutRef} "PT1") + {all dead. dead} + ~`$fUnsafeFromDataValue` : + data -> (\k v -> List (Tuple2 k v)) bytestring integer + = `$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {integer} + unBData + unIData + !`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` : + data -> TxOut + = \(eta : data) -> + let + !tup : pair integer (list data) = unConstrData eta + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxOut} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + !l : list data = tailList {data} l + in + TxOut + (let + !tup : pair integer (list data) + = unConstrData (headList {data} args) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in ifThenElse - {all dead. ScriptInfo} - (equalsInteger 1 index) + {all dead. Address} + (equalsInteger 0 index) (/\dead -> - SpendingScript - (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + Address + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` (headList {data} args)) (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {data} - `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + {StakingCredential} + (\(d : data) -> + let + !tup : pair integer (list data) + = unConstrData d + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. StakingCredential} + (equalsInteger 0 index) + (/\dead -> + StakingHash + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. StakingCredential} + (equalsInteger 1 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + StakingPtr + (unIData (headList {data} args)) + (unIData (headList {data} l)) + (unIData + (headList + {data} + (tailList {data} l)))) + (/\dead -> + traceError {StakingCredential} "PT1") + {all dead. dead}) + {all dead. dead}) (headList {data} (tailList {data} args)))) + (/\dead -> traceError {Address} "PT1") + {all dead. dead}) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {(\k v -> List (Tuple2 k v)) bytestring integer} + unBData + `$fUnsafeFromDataValue` + (headList {data} l)) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} l) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. OutputDatum} + (equalsInteger 0 index) + (/\dead -> NoOutputDatum) (/\dead -> ifThenElse - {all dead. ScriptInfo} - (equalsInteger 2 index) + {all dead. OutputDatum} + (equalsInteger 1 index) (/\dead -> - RewardingScript - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) + OutputDatumHash (unBData (headList {data} args))) (/\dead -> ifThenElse - {all dead. ScriptInfo} - (equalsInteger 3 index) - (/\dead -> - CertifyingScript - (unIData (headList {data} args)) - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 4 index) - (/\dead -> - VotingScript - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 5 index) - (/\dead -> - ProposingScript - (unIData (headList {data} args)) - (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` - (headList - {data} - (tailList {data} args)))) - (/\dead -> - traceError {ScriptInfo} "PT1") - {all dead. dead}) - {all dead. dead}) + {all dead. OutputDatum} + (equalsInteger 2 index) + (/\dead -> OutputDatum (headList {data} args)) + (/\dead -> traceError {OutputDatum} "PT1") {all dead. dead}) {all dead. dead}) {all dead. dead}) - {all dead. dead})) - (/\dead -> traceError {ScriptContext} "PT1") - {all dead. dead}) - {Unit} - (\(ipv : TxInfo) (ipv : data) (ipv : ScriptInfo) -> - ifThenElse - {all dead. Unit} - (equalsInteger - 0 - (modInteger - (go - (TxInfo_match - ipv - {List TxOut} - (\(ds : List TxInInfo) - (ds : List TxInInfo) - (ds : List TxOut) - (ds : integer) - (ds : - (\k v -> List (Tuple2 k v)) - bytestring - ((\k v -> List (Tuple2 k v)) bytestring integer)) - (ds : List TxCert) - (ds : (\k v -> List (Tuple2 k v)) Credential integer) - (ds : Interval integer) - (ds : List bytestring) - (ds : (\k v -> List (Tuple2 k v)) ScriptPurpose data) - (ds : (\k v -> List (Tuple2 k v)) bytestring data) - (ds : bytestring) - (ds : - (\k v -> List (Tuple2 k v)) - Voter - ((\k v -> List (Tuple2 k v)) - GovernanceActionId - Vote)) - (ds : List ProposalProcedure) - (ds : Maybe integer) - (ds : Maybe integer) -> - ds))) - 2)) - (/\dead -> Unit) - (/\dead -> error {Unit}) - {all dead. dead})) - (Constr 0 - [ Constr 0 - [ List [] - , List [] - , List - [ Constr 0 - [ Constr 0 [Constr 0 [B #], Constr 1 []] - , Map [(B #, Map [(B #, I 1)])] - , Constr 0 [] - , Constr 1 [] ] ] - , I 10000 - , Map [] - , List [] - , Map [] - , Constr 0 - [ Constr 0 [Constr 0 [], Constr 1 []] - , Constr 0 [Constr 2 [], Constr 1 []] ] - , List [] - , Map [] - , Map [] - , B # - , Map [] - , List [] - , Constr 1 [] - , Constr 1 [] ] - , I 1 - , Constr 1 [Constr 0 [B #, I 0], Constr 1 []] ]) \ No newline at end of file + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} (tailList {data} l)))) + (/\dead -> traceError {TxOut} "PT1") + {all dead. dead} + data TxInInfo | TxInInfo_match where + TxInInfo : TxOutRef -> TxOut -> TxInInfo + !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> TxInInfo + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxInInfo} + (equalsInteger 0 index) + (/\dead -> + TxInInfo + (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {TxInInfo} "PT1") + {all dead. dead} + data ScriptInfo | ScriptInfo_match where + CertifyingScript : integer -> TxCert -> ScriptInfo + MintingScript : bytestring -> ScriptInfo + ProposingScript : integer -> ProposalProcedure -> ScriptInfo + RewardingScript : Credential -> ScriptInfo + SpendingScript : TxOutRef -> Maybe data -> ScriptInfo + VotingScript : Voter -> ScriptInfo + data (LowerBound :: * -> *) a | LowerBound_match where + LowerBound : Extended a -> Bool -> LowerBound a + data (UpperBound :: * -> *) a | UpperBound_match where + UpperBound : Extended a -> Bool -> UpperBound a + data (Interval :: * -> *) a | Interval_match where + Interval : LowerBound a -> UpperBound a -> Interval a + data ScriptPurpose | ScriptPurpose_match where + Certifying : integer -> TxCert -> ScriptPurpose + Minting : bytestring -> ScriptPurpose + Proposing : integer -> ProposalProcedure -> ScriptPurpose + Rewarding : Credential -> ScriptPurpose + Spending : TxOutRef -> ScriptPurpose + Voting : Voter -> ScriptPurpose + data Vote | Vote_match where + Abstain : Vote + VoteNo : Vote + VoteYes : Vote + data TxInfo | TxInfo_match where + TxInfo : + List TxInInfo -> + List TxInInfo -> + List TxOut -> + integer -> + (\k v -> List (Tuple2 k v)) + bytestring + ((\k v -> List (Tuple2 k v)) bytestring integer) -> + List TxCert -> + (\k v -> List (Tuple2 k v)) Credential integer -> + Interval integer -> + List bytestring -> + (\k v -> List (Tuple2 k v)) ScriptPurpose data -> + (\k v -> List (Tuple2 k v)) bytestring data -> + bytestring -> + (\k v -> List (Tuple2 k v)) + Voter + ((\k v -> List (Tuple2 k v)) GovernanceActionId Vote) -> + List ProposalProcedure -> + Maybe integer -> + Maybe integer -> + TxInfo + data ScriptContext | ScriptContext_match where + ScriptContext : TxInfo -> data -> ScriptInfo -> ScriptContext + in + \(d : data) -> + ScriptContext_match + (let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ScriptContext} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + ScriptContext + (let + !tup : pair integer (list data) + = unConstrData (headList {data} args) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxInfo} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + in + TxInfo + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxInInfo} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxInInfo} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxOut} + `$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` + (headList {data} l)) + (unIData (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {(\k v -> List (Tuple2 k v)) bytestring integer} + unBData + `$fUnsafeFromDataValue` + (headList {data} l)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxCert} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Credential} + {integer} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + unIData + (headList {data} l)) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} l) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Interval integer} + (equalsInteger 0 index) + (/\dead -> + Interval + {integer} + (let + !tup : pair integer (list data) + = unConstrData (headList {data} args) + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. LowerBound integer} + (equalsInteger 0 index) + (/\dead -> + LowerBound + {integer} + (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} args)) + (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {LowerBound integer} "PT1") + {all dead. dead}) + (let + !tup : pair integer (list data) + = unConstrData + (headList {data} (tailList {data} args)) + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. UpperBound integer} + (equalsInteger 0 index) + (/\dead -> + UpperBound + {integer} + (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} args)) + (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {UpperBound integer} "PT1") + {all dead. dead})) + (/\dead -> traceError {Interval integer} "PT1") + {all dead. dead}) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {ScriptPurpose} + {data} + (\(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 0 index) + (/\dead -> + Minting (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 1 index) + (/\dead -> + Spending + (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 2 index) + (/\dead -> + Rewarding + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 3 index) + (/\dead -> + Certifying + (unIData + (headList {data} args)) + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList + {data} + (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 4 index) + (/\dead -> + Voting + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList + {data} + args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 5 index) + (/\dead -> + Proposing + (unIData + (headList + {data} + args)) + (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + traceError + {ScriptPurpose} + "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {data} + unBData + `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + (headList {data} l)) + (unBData (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Voter} + {(\k v -> List (Tuple2 k v)) GovernanceActionId Vote} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {GovernanceActionId} + {Vote} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (\(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Vote} + (equalsInteger 0 index) + (/\dead -> VoteNo) + (/\dead -> + ifThenElse + {all dead. Vote} + (equalsInteger 1 index) + (/\dead -> VoteYes) + (/\dead -> + ifThenElse + {all dead. Vote} + (equalsInteger 2 index) + (/\dead -> Abstain) + (/\dead -> traceError {Vote} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead})) + (headList {data} l)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {ProposalProcedure} + `$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} l)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} (tailList {data} l)))) + (/\dead -> traceError {TxInfo} "PT1") + {all dead. dead}) + (headList {data} l) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} (tailList {data} l)) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 0 index) + (/\dead -> MintingScript (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 1 index) + (/\dead -> + SpendingScript + (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {data} + `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 2 index) + (/\dead -> + RewardingScript + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 3 index) + (/\dead -> + CertifyingScript + (unIData (headList {data} args)) + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList + {data} + (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 4 index) + (/\dead -> + VotingScript + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 5 index) + (/\dead -> + ProposingScript + (unIData (headList {data} args)) + (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (headList + {data} + (tailList {data} args)))) + (/\dead -> + traceError {ScriptInfo} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead})) + (/\dead -> traceError {ScriptContext} "PT1") + {all dead. dead}) + {Unit} + (\(ipv : TxInfo) (ipv : data) (ipv : ScriptInfo) -> + ifThenElse + {all dead. Unit} + (equalsInteger + 0 + (modInteger + (go + (TxInfo_match + ipv + {List TxOut} + (\(ds : List TxInInfo) + (ds : List TxInInfo) + (ds : List TxOut) + (ds : integer) + (ds : + (\k v -> List (Tuple2 k v)) + bytestring + ((\k v -> List (Tuple2 k v)) bytestring integer)) + (ds : List TxCert) + (ds : (\k v -> List (Tuple2 k v)) Credential integer) + (ds : Interval integer) + (ds : List bytestring) + (ds : (\k v -> List (Tuple2 k v)) ScriptPurpose data) + (ds : (\k v -> List (Tuple2 k v)) bytestring data) + (ds : bytestring) + (ds : + (\k v -> List (Tuple2 k v)) + Voter + ((\k v -> List (Tuple2 k v)) + GovernanceActionId + Vote)) + (ds : List ProposalProcedure) + (ds : Maybe integer) + (ds : Maybe integer) -> + ds))) + 2)) + (/\dead -> Unit) + (/\dead -> error {Unit}) + {all dead. dead})) + (Constr 0 + [ Constr 0 + [ List [] + , List [] + , List + [ Constr 0 + [ Constr 0 [Constr 0 [B #], Constr 1 []] + , Map [(B #, Map [(B #, I 1)])] + , Constr 0 [] + , Constr 1 [] ] ] + , I 10000 + , Map [] + , List [] + , Map [] + , Constr 0 + [ Constr 0 [Constr 0 [], Constr 1 []] + , Constr 0 [Constr 2 [], Constr 1 []] ] + , List [] + , Map [] + , Map [] + , B # + , Map [] + , List [] + , Constr 1 [] + , Constr 1 [] ] + , I 1 + , Constr 1 [Constr 0 [B #, I 0], Constr 1 []] ])) \ No newline at end of file diff --git a/plutus-benchmark/script-contexts/test/9.6/checkScriptContext2.pir.golden b/plutus-benchmark/script-contexts/test/9.6/checkScriptContext2.pir.golden index 8bb37946a00..4da236de45b 100644 --- a/plutus-benchmark/script-contexts/test/9.6/checkScriptContext2.pir.golden +++ b/plutus-benchmark/script-contexts/test/9.6/checkScriptContext2.pir.golden @@ -1,1217 +1,841 @@ -(let - !`$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` : data -> data - = \(d : data) -> d - data Bool | Bool_match where - True : Bool - False : Bool - data Unit | Unit_match where - Unit : Unit - !traceError : all a. string -> a - = /\a -> - \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} - !`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` : data -> Bool - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Bool} - (equalsInteger 0 index) - (/\dead -> False) - (/\dead -> - ifThenElse - {all dead. Bool} - (equalsInteger 1 index) - (/\dead -> True) - (/\dead -> traceError {Bool} "PT1") - {all dead. dead}) - {all dead. dead} - data (Extended :: * -> *) a | Extended_match where - Finite : a -> Extended a - NegInf : Extended a - PosInf : Extended a - !`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` : - all a. (\a -> data -> a) a -> data -> Extended a - = /\a -> - \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Extended a} - (equalsInteger 0 index) - (/\dead -> NegInf {a}) - (/\dead -> - ifThenElse - {all dead. Extended a} - (equalsInteger 1 index) - (/\dead -> - Finite {a} (`$dUnsafeFromData` (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Extended a} - (equalsInteger 2 index) - (/\dead -> PosInf {a}) - (/\dead -> traceError {Extended a} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data GovernanceActionId | GovernanceActionId_match where - GovernanceActionId : bytestring -> integer -> GovernanceActionId - !`$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` : - data -> GovernanceActionId - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. GovernanceActionId} - (equalsInteger 0 index) - (/\dead -> - GovernanceActionId - (unBData (headList {data} args)) - (unIData (headList {data} (tailList {data} args)))) - (/\dead -> traceError {GovernanceActionId} "PT1") - {all dead. dead} - in - letrec - data (List :: * -> *) a | List_match where - Nil : List a - Cons : a -> List a -> List a - in - let - !`$fUnsafeFromDataList_$cunsafeFromBuiltinData` : - all a. (\a -> data -> a) a -> data -> List a - = /\a -> - \(`$dUnsafeFromData` : (\a -> data -> a) a) -> - letrec - !go : list data -> List a - = \(l : list data) -> - chooseList - {data} - {Unit -> List a} - l - (\(ds : Unit) -> Nil {a}) - (\(ds : Unit) -> - Cons - {a} - (`$dUnsafeFromData` (headList {data} l)) - (go (tailList {data} l))) - Unit - in - \(d : data) -> go (unListData d) - data Credential | Credential_match where - PubKeyCredential : bytestring -> Credential - ScriptCredential : bytestring -> Credential - !`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` : data -> Credential - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Credential} - (equalsInteger 0 index) - (/\dead -> PubKeyCredential (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Credential} - (equalsInteger 1 index) - (/\dead -> ScriptCredential (unBData (headList {data} args))) - (/\dead -> traceError {Credential} "PT1") - {all dead. dead}) - {all dead. dead} - data (Maybe :: * -> *) a | Maybe_match where - Just : a -> Maybe a - Nothing : Maybe a - !`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` : - all a. (\a -> data -> a) a -> data -> Maybe a - = /\a -> - \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Maybe a} - (equalsInteger 1 index) - (/\dead -> Nothing {a}) - (/\dead -> - ifThenElse - {all dead. Maybe a} - (equalsInteger 0 index) - (/\dead -> - Just {a} (`$dUnsafeFromData` (headList {data} args))) - (/\dead -> traceError {Maybe a} "PT1") - {all dead. dead}) - {all dead. dead} - data (Tuple2 :: * -> * -> *) a b | Tuple2_match where - Tuple2 : a -> b -> Tuple2 a b - !`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` : - all k v. - (\a -> data -> a) k -> - (\a -> data -> a) v -> +((let + !`$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` : data -> data + = \(d : data) -> d + data Bool | Bool_match where + True : Bool + False : Bool + data Unit | Unit_match where + Unit : Unit + !traceError : all a. string -> a + = /\a -> + \(str : string) -> let !x : Unit = trace {Unit} str Unit in error {a} + !`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` : data -> Bool + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Bool} + (equalsInteger 0 index) + (/\dead -> False) + (/\dead -> + ifThenElse + {all dead. Bool} + (equalsInteger 1 index) + (/\dead -> True) + (/\dead -> traceError {Bool} "PT1") + {all dead. dead}) + {all dead. dead} + data (Extended :: * -> *) a | Extended_match where + Finite : a -> Extended a + NegInf : Extended a + PosInf : Extended a + !`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` : + all a. (\a -> data -> a) a -> data -> Extended a + = /\a -> + \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Extended a} + (equalsInteger 0 index) + (/\dead -> NegInf {a}) + (/\dead -> + ifThenElse + {all dead. Extended a} + (equalsInteger 1 index) + (/\dead -> + Finite {a} (`$dUnsafeFromData` (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Extended a} + (equalsInteger 2 index) + (/\dead -> PosInf {a}) + (/\dead -> traceError {Extended a} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data GovernanceActionId | GovernanceActionId_match where + GovernanceActionId : bytestring -> integer -> GovernanceActionId + !`$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` : + data -> GovernanceActionId + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. GovernanceActionId} + (equalsInteger 0 index) + (/\dead -> + GovernanceActionId + (unBData (headList {data} args)) + (unIData (headList {data} (tailList {data} args)))) + (/\dead -> traceError {GovernanceActionId} "PT1") + {all dead. dead} + in + letrec + data (List :: * -> *) a | List_match where + Nil : List a + Cons : a -> List a -> List a + in + let + !`$fUnsafeFromDataList_$cunsafeFromBuiltinData` : + all a. (\a -> data -> a) a -> data -> List a + = /\a -> + \(`$dUnsafeFromData` : (\a -> data -> a) a) -> + letrec + !go : list data -> List a + = \(l : list data) -> + chooseList + {data} + {Unit -> List a} + l + (\(ds : Unit) -> Nil {a}) + (\(ds : Unit) -> + Cons + {a} + (`$dUnsafeFromData` (headList {data} l)) + (go (tailList {data} l))) + Unit + in + \(d : data) -> go (unListData d) + data Credential | Credential_match where + PubKeyCredential : bytestring -> Credential + ScriptCredential : bytestring -> Credential + !`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` : data -> Credential + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Credential} + (equalsInteger 0 index) + (/\dead -> PubKeyCredential (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Credential} + (equalsInteger 1 index) + (/\dead -> ScriptCredential (unBData (headList {data} args))) + (/\dead -> traceError {Credential} "PT1") + {all dead. dead}) + {all dead. dead} + data (Maybe :: * -> *) a | Maybe_match where + Just : a -> Maybe a + Nothing : Maybe a + !`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` : + all a. (\a -> data -> a) a -> data -> Maybe a + = /\a -> + \(`$dUnsafeFromData` : (\a -> data -> a) a) (d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Maybe a} + (equalsInteger 1 index) + (/\dead -> Nothing {a}) + (/\dead -> + ifThenElse + {all dead. Maybe a} + (equalsInteger 0 index) + (/\dead -> + Just {a} (`$dUnsafeFromData` (headList {data} args))) + (/\dead -> traceError {Maybe a} "PT1") + {all dead. dead}) + {all dead. dead} + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + !`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` : + all k v. + (\a -> data -> a) k -> + (\a -> data -> a) v -> + data -> + (\k v -> List (Tuple2 k v)) k v + = /\k v -> + \(`$dUnsafeFromData` : (\a -> data -> a) k) + (`$dUnsafeFromData` : (\a -> data -> a) v) -> + letrec + !go : list (pair data data) -> List (Tuple2 k v) + = \(l : list (pair data data)) -> + chooseList + {pair data data} + {Unit -> List (Tuple2 k v)} + l + (\(ds : Unit) -> Nil {Tuple2 k v}) + (\(ds : Unit) -> + let + !tup : pair data data = headList {pair data data} l + in + Cons + {Tuple2 k v} + (Tuple2 + {k} + {v} + (`$dUnsafeFromData` (fstPair {data} {data} tup)) + (`$dUnsafeFromData` (sndPair {data} {data} tup))) + (go (tailList {pair data data} l))) + Unit + in + \(d : data) -> go (unMapData d) + data ProtocolVersion | ProtocolVersion_match where + ProtocolVersion : integer -> integer -> ProtocolVersion + data Rational | Rational_match where + Rational : integer -> integer -> Rational + data GovernanceAction | GovernanceAction_match where + HardForkInitiation : + Maybe GovernanceActionId -> ProtocolVersion -> GovernanceAction + InfoAction : GovernanceAction + NewConstitution : + Maybe GovernanceActionId -> Maybe bytestring -> GovernanceAction + NoConfidence : Maybe GovernanceActionId -> GovernanceAction + ParameterChange : + Maybe GovernanceActionId -> data -> - (\k v -> List (Tuple2 k v)) k v - = /\k v -> - \(`$dUnsafeFromData` : (\a -> data -> a) k) - (`$dUnsafeFromData` : (\a -> data -> a) v) -> - letrec - !go : list (pair data data) -> List (Tuple2 k v) - = \(l : list (pair data data)) -> - chooseList - {pair data data} - {Unit -> List (Tuple2 k v)} - l - (\(ds : Unit) -> Nil {Tuple2 k v}) - (\(ds : Unit) -> - let - !tup : pair data data = headList {pair data data} l - in - Cons - {Tuple2 k v} - (Tuple2 - {k} - {v} - (`$dUnsafeFromData` (fstPair {data} {data} tup)) - (`$dUnsafeFromData` (sndPair {data} {data} tup))) - (go (tailList {pair data data} l))) - Unit - in - \(d : data) -> go (unMapData d) - data ProtocolVersion | ProtocolVersion_match where - ProtocolVersion : integer -> integer -> ProtocolVersion - data Rational | Rational_match where - Rational : integer -> integer -> Rational - data GovernanceAction | GovernanceAction_match where - HardForkInitiation : - Maybe GovernanceActionId -> ProtocolVersion -> GovernanceAction - InfoAction : GovernanceAction - NewConstitution : - Maybe GovernanceActionId -> Maybe bytestring -> GovernanceAction - NoConfidence : Maybe GovernanceActionId -> GovernanceAction - ParameterChange : - Maybe GovernanceActionId -> data -> Maybe bytestring -> GovernanceAction - TreasuryWithdrawals : - (\k v -> List (Tuple2 k v)) Credential integer -> - Maybe bytestring -> - GovernanceAction - UpdateCommittee : - Maybe GovernanceActionId -> - List Credential -> - (\k v -> List (Tuple2 k v)) Credential integer -> - Rational -> - GovernanceAction - data ProposalProcedure | ProposalProcedure_match where - ProposalProcedure : - integer -> Credential -> GovernanceAction -> ProposalProcedure - in - letrec - !euclid : integer -> integer -> integer - = \(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (equalsInteger 0 y) - (/\dead -> x) - (/\dead -> euclid y (modInteger x y)) - {all dead. dead} - in - letrec - !unsafeRatio : integer -> integer -> Rational - = \(n : integer) (d : integer) -> - ifThenElse - {all dead. Rational} - (equalsInteger 0 d) - (/\dead -> traceError {Rational} "PT3") - (/\dead -> - ifThenElse - {all dead. Rational} - (lessThanInteger d 0) - (/\dead -> - unsafeRatio (subtractInteger 0 n) (subtractInteger 0 d)) - (/\dead -> - let - !gcd' : integer = euclid n d - in - Rational (quotientInteger n gcd') (quotientInteger d gcd')) - {all dead. dead}) - {all dead. dead} - in - let - !`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` : - data -> ProposalProcedure - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ProposalProcedure} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - ProposalProcedure - (unIData (headList {data} args)) - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} l)) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} (tailList {data} l)) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - ParameterChange - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (headList {data} l) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} (tailList {data} l)))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 1 index) - (/\dead -> - HardForkInitiation - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (let - !tup : pair integer (list data) - = unConstrData - (headList {data} (tailList {data} args)) - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ProtocolVersion} - (equalsInteger 0 index) - (/\dead -> - ProtocolVersion - (unIData (headList {data} args)) - (unIData - (headList - {data} - (tailList {data} args)))) - (/\dead -> traceError {ProtocolVersion} "PT1") - {all dead. dead})) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 2 index) - (/\dead -> - TreasuryWithdrawals - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Credential} - {integer} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - unIData - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 3 index) - (/\dead -> - NoConfidence - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 4 index) - (/\dead -> - let - !l : list data - = tailList {data} args - !l : list data = tailList {data} l - in - UpdateCommittee - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {Credential} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Credential} - {integer} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - unIData - (headList {data} l)) - (let - !x : data - = headList - {data} - (tailList {data} l) - in - Tuple2_match - {integer} - {integer} - (let - !tup : pair integer (list data) - = unConstrData x - !index : integer - = fstPair - {integer} - {list data} - tup - !args : list data - = sndPair - {integer} - {list data} - tup - in - ifThenElse - {all dead. - Tuple2 integer integer} - (equalsInteger 0 index) - (/\dead -> - Tuple2 - {integer} - {integer} - (unIData - (headList {data} args)) - (unIData - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - traceError - {Tuple2 integer integer} - "PT1") - {all dead. dead}) - {Rational} - (\(a : integer) (b : integer) -> - unsafeRatio a b))) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 5 index) - (/\dead -> - NewConstitution - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {GovernanceActionId} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` - (headList {data} args)) - (let - !tup : - pair integer (list data) - = unConstrData - (headList - {data} - (tailList - {data} - args)) - !index : integer - = fstPair - {integer} - {list data} - tup - !args : list data - = sndPair - {integer} - {list data} - tup - in - ifThenElse - {all dead. Maybe bytestring} - (equalsInteger 0 index) - (/\dead -> - `$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} args)) - (/\dead -> - traceError - {Maybe bytestring} - "PT1") - {all dead. dead})) - (/\dead -> - ifThenElse - {all dead. GovernanceAction} - (equalsInteger 6 index) - (/\dead -> InfoAction) - (/\dead -> - traceError - {GovernanceAction} - "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead})) - (/\dead -> traceError {ProposalProcedure} "PT1") - {all dead. dead} - data DRep | DRep_match where - DRep : Credential -> DRep - DRepAlwaysAbstain : DRep - DRepAlwaysNoConfidence : DRep - !`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` : data -> DRep - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. DRep} - (equalsInteger 0 index) - (/\dead -> - DRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. DRep} - (equalsInteger 1 index) - (/\dead -> DRepAlwaysAbstain) - (/\dead -> - ifThenElse - {all dead. DRep} - (equalsInteger 2 index) - (/\dead -> DRepAlwaysNoConfidence) - (/\dead -> traceError {DRep} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data Delegatee | Delegatee_match where - DelegStake : bytestring -> Delegatee - DelegStakeVote : bytestring -> DRep -> Delegatee - DelegVote : DRep -> Delegatee - !`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` : data -> Delegatee - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Delegatee} - (equalsInteger 0 index) - (/\dead -> DelegStake (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Delegatee} - (equalsInteger 1 index) - (/\dead -> - DelegVote - (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Delegatee} - (equalsInteger 2 index) - (/\dead -> - DelegStakeVote - (unBData (headList {data} args)) - (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {Delegatee} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data TxCert | TxCert_match where - TxCertAuthHotCommittee : Credential -> Credential -> TxCert - TxCertDelegStaking : Credential -> Delegatee -> TxCert - TxCertPoolRegister : bytestring -> bytestring -> TxCert - TxCertPoolRetire : bytestring -> integer -> TxCert - TxCertRegDRep : Credential -> integer -> TxCert - TxCertRegDeleg : Credential -> Delegatee -> integer -> TxCert - TxCertRegStaking : Credential -> Maybe integer -> TxCert - TxCertResignColdCommittee : Credential -> TxCert - TxCertUnRegDRep : Credential -> integer -> TxCert - TxCertUnRegStaking : Credential -> Maybe integer -> TxCert - TxCertUpdateDRep : Credential -> TxCert - !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : - data -> TxCert - = \(eta : data) -> - let - !tup : pair integer (list data) = unConstrData eta - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxCert} - (equalsInteger 0 index) - (/\dead -> - TxCertRegStaking - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 1 index) - (/\dead -> - TxCertUnRegStaking - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 2 index) - (/\dead -> - TxCertDelegStaking - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 3 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - TxCertRegDeleg - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` - (headList {data} l)) - (unIData (headList {data} (tailList {data} l)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 4 index) - (/\dead -> - TxCertRegDRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (unIData - (headList - {data} - (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 5 index) - (/\dead -> - TxCertUpdateDRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 6 index) - (/\dead -> - TxCertUnRegDRep - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (unIData - (headList - {data} - (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 7 index) - (/\dead -> - TxCertPoolRegister - (unBData - (headList {data} args)) - (unBData - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 8 index) - (/\dead -> - TxCertPoolRetire - (unBData - (headList - {data} - args)) - (unIData - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger 9 index) - (/\dead -> - TxCertAuthHotCommittee - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList - {data} - args)) - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - ifThenElse - {all dead. TxCert} - (equalsInteger - 10 - index) - (/\dead -> - TxCertResignColdCommittee - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList - {data} - args))) - (/\dead -> - traceError - {TxCert} - "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data Voter | Voter_match where - CommitteeVoter : Credential -> Voter - DRepVoter : Credential -> Voter - StakePoolVoter : bytestring -> Voter - !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> Voter - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Voter} - (equalsInteger 0 index) - (/\dead -> - CommitteeVoter - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Voter} - (equalsInteger 1 index) - (/\dead -> - DRepVoter - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. Voter} - (equalsInteger 2 index) - (/\dead -> - StakePoolVoter (unBData (headList {data} args))) - (/\dead -> traceError {Voter} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead} - data TxOutRef | TxOutRef_match where - TxOutRef : bytestring -> integer -> TxOutRef - !`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` : data -> TxOutRef - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxOutRef} - (equalsInteger 0 index) - (/\dead -> - TxOutRef - (unBData (headList {data} args)) - (unIData (headList {data} (tailList {data} args)))) - (/\dead -> traceError {TxOutRef} "PT1") - {all dead. dead} - ~`$fUnsafeFromDataValue` : - data -> (\k v -> List (Tuple2 k v)) bytestring integer - = `$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {integer} - unBData - unIData - data StakingCredential | StakingCredential_match where - StakingHash : Credential -> StakingCredential - StakingPtr : integer -> integer -> integer -> StakingCredential - data Address | Address_match where - Address : Credential -> Maybe StakingCredential -> Address - data OutputDatum | OutputDatum_match where - NoOutputDatum : OutputDatum - OutputDatum : data -> OutputDatum - OutputDatumHash : bytestring -> OutputDatum - data TxOut | TxOut_match where - TxOut : - Address -> - (\k v -> List (Tuple2 k v)) - bytestring - ((\k v -> List (Tuple2 k v)) bytestring integer) -> - OutputDatum -> - Maybe bytestring -> - TxOut - !`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` : - data -> TxOut - = \(eta : data) -> - let - !tup : pair integer (list data) = unConstrData eta - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxOut} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - !l : list data = tailList {data} l - in - TxOut - (let - !tup : pair integer (list data) - = unConstrData (headList {data} args) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Address} - (equalsInteger 0 index) - (/\dead -> - Address - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {StakingCredential} - (\(d : data) -> - let - !tup : pair integer (list data) = unConstrData d + Maybe bytestring -> + GovernanceAction + TreasuryWithdrawals : + (\k v -> List (Tuple2 k v)) Credential integer -> + Maybe bytestring -> + GovernanceAction + UpdateCommittee : + Maybe GovernanceActionId -> + List Credential -> + (\k v -> List (Tuple2 k v)) Credential integer -> + Rational -> + GovernanceAction + data ProposalProcedure | ProposalProcedure_match where + ProposalProcedure : + integer -> Credential -> GovernanceAction -> ProposalProcedure + in + letrec + !euclid : integer -> integer -> integer + = \(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (equalsInteger 0 y) + (/\dead -> x) + (/\dead -> euclid y (modInteger x y)) + {all dead. dead} + in + letrec + !unsafeRatio : integer -> integer -> Rational + = \(n : integer) (d : integer) -> + ifThenElse + {all dead. Rational} + (equalsInteger 0 d) + (/\dead -> traceError {Rational} "PT3") + (/\dead -> + ifThenElse + {all dead. Rational} + (lessThanInteger d 0) + (/\dead -> + unsafeRatio (subtractInteger 0 n) (subtractInteger 0 d)) + (/\dead -> + let + !gcd' : integer = euclid n d + in + Rational (quotientInteger n gcd') (quotientInteger d gcd')) + {all dead. dead}) + {all dead. dead} + in + let + !`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` : + data -> ProposalProcedure + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ProposalProcedure} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + ProposalProcedure + (unIData (headList {data} args)) + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} l)) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} (tailList {data} l)) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + ParameterChange + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (headList {data} l) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} (tailList {data} l)))) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 1 index) + (/\dead -> + HardForkInitiation + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (let + !tup : pair integer (list data) + = unConstrData + (headList {data} (tailList {data} args)) !index : integer = fstPair {integer} {list data} tup !args : list data = sndPair {integer} {list data} tup in ifThenElse - {all dead. StakingCredential} + {all dead. ProtocolVersion} (equalsInteger 0 index) (/\dead -> - StakingHash - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. StakingCredential} - (equalsInteger 1 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - StakingPtr - (unIData (headList {data} args)) - (unIData (headList {data} l)) - (unIData - (headList - {data} - (tailList {data} l)))) - (/\dead -> - traceError {StakingCredential} "PT1") - {all dead. dead}) - {all dead. dead}) - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {Address} "PT1") - {all dead. dead}) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {(\k v -> List (Tuple2 k v)) bytestring integer} - unBData - `$fUnsafeFromDataValue` - (headList {data} l)) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} l) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. OutputDatum} - (equalsInteger 0 index) - (/\dead -> NoOutputDatum) - (/\dead -> - ifThenElse - {all dead. OutputDatum} - (equalsInteger 1 index) - (/\dead -> - OutputDatumHash (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. OutputDatum} - (equalsInteger 2 index) - (/\dead -> OutputDatum (headList {data} args)) - (/\dead -> traceError {OutputDatum} "PT1") - {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} (tailList {data} l)))) - (/\dead -> traceError {TxOut} "PT1") - {all dead. dead} - data TxInInfo | TxInInfo_match where - TxInInfo : TxOutRef -> TxOut -> TxInInfo - !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> TxInInfo - = \(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxInInfo} - (equalsInteger 0 index) - (/\dead -> - TxInInfo - (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> traceError {TxInInfo} "PT1") - {all dead. dead} - data ScriptInfo | ScriptInfo_match where - CertifyingScript : integer -> TxCert -> ScriptInfo - MintingScript : bytestring -> ScriptInfo - ProposingScript : integer -> ProposalProcedure -> ScriptInfo - RewardingScript : Credential -> ScriptInfo - SpendingScript : TxOutRef -> Maybe data -> ScriptInfo - VotingScript : Voter -> ScriptInfo - data (LowerBound :: * -> *) a | LowerBound_match where - LowerBound : Extended a -> Bool -> LowerBound a - data (UpperBound :: * -> *) a | UpperBound_match where - UpperBound : Extended a -> Bool -> UpperBound a - data (Interval :: * -> *) a | Interval_match where - Interval : LowerBound a -> UpperBound a -> Interval a - data ScriptPurpose | ScriptPurpose_match where - Certifying : integer -> TxCert -> ScriptPurpose - Minting : bytestring -> ScriptPurpose - Proposing : integer -> ProposalProcedure -> ScriptPurpose - Rewarding : Credential -> ScriptPurpose - Spending : TxOutRef -> ScriptPurpose - Voting : Voter -> ScriptPurpose - data Vote | Vote_match where - Abstain : Vote - VoteNo : Vote - VoteYes : Vote - data TxInfo | TxInfo_match where - TxInfo : - List TxInInfo -> - List TxInInfo -> - List TxOut -> - integer -> - (\k v -> List (Tuple2 k v)) - bytestring - ((\k v -> List (Tuple2 k v)) bytestring integer) -> - List TxCert -> - (\k v -> List (Tuple2 k v)) Credential integer -> - Interval integer -> - List bytestring -> - (\k v -> List (Tuple2 k v)) ScriptPurpose data -> - (\k v -> List (Tuple2 k v)) bytestring data -> - bytestring -> - (\k v -> List (Tuple2 k v)) - Voter - ((\k v -> List (Tuple2 k v)) GovernanceActionId Vote) -> - List ProposalProcedure -> - Maybe integer -> - Maybe integer -> - TxInfo - data ScriptContext | ScriptContext_match where - ScriptContext : TxInfo -> data -> ScriptInfo -> ScriptContext - in - \(d : data) -> - let - !ds : - ScriptContext - = let - !tup : pair integer (list data) = unConstrData d - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ScriptContext} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - in - ScriptContext - (let - !tup : pair integer (list data) - = unConstrData (headList {data} args) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. TxInfo} - (equalsInteger 0 index) - (/\dead -> - let - !l : list data = tailList {data} args - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - !l : list data = tailList {data} l - in - TxInfo - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxInInfo} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxInInfo} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxOut} - `$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` - (headList {data} l)) - (unIData (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {(\k v -> List (Tuple2 k v)) bytestring integer} - unBData - `$fUnsafeFromDataValue` - (headList {data} l)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {TxCert} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Credential} - {integer} - `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - unIData - (headList {data} l)) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} l) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. Interval integer} - (equalsInteger 0 index) - (/\dead -> - Interval - {integer} - (let - !tup : pair integer (list data) - = unConstrData (headList {data} args) - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. LowerBound integer} - (equalsInteger 0 index) - (/\dead -> - LowerBound - {integer} - (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} args)) - (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` - (headList - {data} - (tailList {data} args)))) - (/\dead -> traceError {LowerBound integer} "PT1") - {all dead. dead}) - (let - !tup : pair integer (list data) - = unConstrData - (headList {data} (tailList {data} args)) - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. UpperBound integer} - (equalsInteger 0 index) - (/\dead -> - UpperBound - {integer} - (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} args)) - (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` - (headList - {data} - (tailList {data} args)))) - (/\dead -> traceError {UpperBound integer} "PT1") - {all dead. dead})) - (/\dead -> traceError {Interval integer} "PT1") - {all dead. dead}) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {bytestring} - unBData - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {ScriptPurpose} - {data} - (\(d : data) -> - let - !tup : pair integer (list data) = unConstrData d - !index : integer - = fstPair {integer} {list data} tup - !args : list data - = sndPair {integer} {list data} tup - in + ProtocolVersion + (unIData (headList {data} args)) + (unIData + (headList + {data} + (tailList {data} args)))) + (/\dead -> traceError {ProtocolVersion} "PT1") + {all dead. dead})) + (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 0 index) + {all dead. GovernanceAction} + (equalsInteger 2 index) (/\dead -> - Minting (unBData (headList {data} args))) + TreasuryWithdrawals + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Credential} + {integer} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + unIData + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} (tailList {data} args)))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 1 index) + {all dead. GovernanceAction} + (equalsInteger 3 index) (/\dead -> - Spending - (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + NoConfidence + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` (headList {data} args))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 2 index) + {all dead. GovernanceAction} + (equalsInteger 4 index) (/\dead -> - Rewarding - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) + let + !l : list data + = tailList {data} args + !l : list data = tailList {data} l + in + UpdateCommittee + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {Credential} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Credential} + {integer} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + unIData + (headList {data} l)) + (let + !x : data + = headList + {data} + (tailList {data} l) + in + Tuple2_match + {integer} + {integer} + (let + !tup : pair integer (list data) + = unConstrData x + !index : integer + = fstPair + {integer} + {list data} + tup + !args : list data + = sndPair + {integer} + {list data} + tup + in + ifThenElse + {all dead. + Tuple2 integer integer} + (equalsInteger 0 index) + (/\dead -> + Tuple2 + {integer} + {integer} + (unIData + (headList {data} args)) + (unIData + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + traceError + {Tuple2 integer integer} + "PT1") + {all dead. dead}) + {Rational} + (\(a : integer) (b : integer) -> + unsafeRatio a b))) (/\dead -> ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 3 index) + {all dead. GovernanceAction} + (equalsInteger 5 index) (/\dead -> - Certifying - (unIData + NewConstitution + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {GovernanceActionId} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` (headList {data} args)) - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 4 index) - (/\dead -> - Voting - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (let + !tup : + pair integer (list data) + = unConstrData (headList {data} - args))) + (tailList + {data} + args)) + !index : integer + = fstPair + {integer} + {list data} + tup + !args : list data + = sndPair + {integer} + {list data} + tup + in + ifThenElse + {all dead. Maybe bytestring} + (equalsInteger 0 index) + (/\dead -> + `$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} args)) + (/\dead -> + traceError + {Maybe bytestring} + "PT1") + {all dead. dead})) + (/\dead -> + ifThenElse + {all dead. GovernanceAction} + (equalsInteger 6 index) + (/\dead -> InfoAction) (/\dead -> - ifThenElse - {all dead. ScriptPurpose} - (equalsInteger 5 index) - (/\dead -> - Proposing - (unIData - (headList - {data} - args)) - (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` - (headList - {data} - (tailList - {data} - args)))) - (/\dead -> - traceError - {ScriptPurpose} - "PT1") - {all dead. dead}) + traceError + {GovernanceAction} + "PT1") {all dead. dead}) {all dead. dead}) {all dead. dead}) {all dead. dead}) {all dead. dead}) - `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {bytestring} - {data} - unBData - `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` - (headList {data} l)) - (unBData (headList {data} l)) - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {Voter} - {(\k v -> List (Tuple2 k v)) GovernanceActionId Vote} - `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` - {GovernanceActionId} - {Vote} - `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + {all dead. dead}) + {all dead. dead})) + (/\dead -> traceError {ProposalProcedure} "PT1") + {all dead. dead} + data DRep | DRep_match where + DRep : Credential -> DRep + DRepAlwaysAbstain : DRep + DRepAlwaysNoConfidence : DRep + !`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` : data -> DRep + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. DRep} + (equalsInteger 0 index) + (/\dead -> + DRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. DRep} + (equalsInteger 1 index) + (/\dead -> DRepAlwaysAbstain) + (/\dead -> + ifThenElse + {all dead. DRep} + (equalsInteger 2 index) + (/\dead -> DRepAlwaysNoConfidence) + (/\dead -> traceError {DRep} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data Delegatee | Delegatee_match where + DelegStake : bytestring -> Delegatee + DelegStakeVote : bytestring -> DRep -> Delegatee + DelegVote : DRep -> Delegatee + !`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` : data -> Delegatee + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Delegatee} + (equalsInteger 0 index) + (/\dead -> DelegStake (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Delegatee} + (equalsInteger 1 index) + (/\dead -> + DelegVote + (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Delegatee} + (equalsInteger 2 index) + (/\dead -> + DelegStakeVote + (unBData (headList {data} args)) + (`$fUnsafeFromDataDRep_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {Delegatee} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data TxCert | TxCert_match where + TxCertAuthHotCommittee : Credential -> Credential -> TxCert + TxCertDelegStaking : Credential -> Delegatee -> TxCert + TxCertPoolRegister : bytestring -> bytestring -> TxCert + TxCertPoolRetire : bytestring -> integer -> TxCert + TxCertRegDRep : Credential -> integer -> TxCert + TxCertRegDeleg : Credential -> Delegatee -> integer -> TxCert + TxCertRegStaking : Credential -> Maybe integer -> TxCert + TxCertResignColdCommittee : Credential -> TxCert + TxCertUnRegDRep : Credential -> integer -> TxCert + TxCertUnRegStaking : Credential -> Maybe integer -> TxCert + TxCertUpdateDRep : Credential -> TxCert + !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : + data -> TxCert + = \(eta : data) -> + let + !tup : pair integer (list data) = unConstrData eta + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxCert} + (equalsInteger 0 index) + (/\dead -> + TxCertRegStaking + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 1 index) + (/\dead -> + TxCertUnRegStaking + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 2 index) + (/\dead -> + TxCertDelegStaking + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 3 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + TxCertRegDeleg + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataDelegatee_$cunsafeFromBuiltinData` + (headList {data} l)) + (unIData + (headList {data} (tailList {data} l)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 4 index) + (/\dead -> + TxCertRegDRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (unIData + (headList + {data} + (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 5 index) + (/\dead -> + TxCertUpdateDRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 6 index) + (/\dead -> + TxCertUnRegDRep + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (unIData + (headList + {data} + (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 7 index) + (/\dead -> + TxCertPoolRegister + (unBData + (headList {data} args)) + (unBData + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger 8 index) + (/\dead -> + TxCertPoolRetire + (unBData + (headList + {data} + args)) + (unIData + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + ifThenElse + {all dead. TxCert} + (equalsInteger + 9 + index) + (/\dead -> + TxCertAuthHotCommittee + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList + {data} + args)) + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + ifThenElse + {all dead. + TxCert} + (equalsInteger + 10 + index) + (/\dead -> + TxCertResignColdCommittee + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList + {data} + args))) + (/\dead -> + traceError + {TxCert} + "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data Voter | Voter_match where + CommitteeVoter : Credential -> Voter + DRepVoter : Credential -> Voter + StakePoolVoter : bytestring -> Voter + !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> Voter + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Voter} + (equalsInteger 0 index) + (/\dead -> + CommitteeVoter + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Voter} + (equalsInteger 1 index) + (/\dead -> + DRepVoter + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. Voter} + (equalsInteger 2 index) + (/\dead -> + StakePoolVoter (unBData (headList {data} args))) + (/\dead -> traceError {Voter} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead} + data TxOutRef | TxOutRef_match where + TxOutRef : bytestring -> integer -> TxOutRef + !`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` : data -> TxOutRef + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxOutRef} + (equalsInteger 0 index) + (/\dead -> + TxOutRef + (unBData (headList {data} args)) + (unIData (headList {data} (tailList {data} args)))) + (/\dead -> traceError {TxOutRef} "PT1") + {all dead. dead} + ~`$fUnsafeFromDataValue` : + data -> (\k v -> List (Tuple2 k v)) bytestring integer + = `$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {integer} + unBData + unIData + data StakingCredential | StakingCredential_match where + StakingHash : Credential -> StakingCredential + StakingPtr : integer -> integer -> integer -> StakingCredential + data Address | Address_match where + Address : Credential -> Maybe StakingCredential -> Address + data OutputDatum | OutputDatum_match where + NoOutputDatum : OutputDatum + OutputDatum : data -> OutputDatum + OutputDatumHash : bytestring -> OutputDatum + data TxOut | TxOut_match where + TxOut : + Address -> + (\k v -> List (Tuple2 k v)) + bytestring + ((\k v -> List (Tuple2 k v)) bytestring integer) -> + OutputDatum -> + Maybe bytestring -> + TxOut + !`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` : + data -> TxOut + = \(eta : data) -> + let + !tup : pair integer (list data) = unConstrData eta + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxOut} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + !l : list data = tailList {data} l + in + TxOut + (let + !tup : pair integer (list data) + = unConstrData (headList {data} args) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Address} + (equalsInteger 0 index) + (/\dead -> + Address + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {StakingCredential} (\(d : data) -> let !tup : pair integer (list data) @@ -1222,135 +846,522 @@ = sndPair {integer} {list data} tup in ifThenElse - {all dead. Vote} + {all dead. StakingCredential} (equalsInteger 0 index) - (/\dead -> VoteNo) + (/\dead -> + StakingHash + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) (/\dead -> ifThenElse - {all dead. Vote} + {all dead. StakingCredential} (equalsInteger 1 index) - (/\dead -> VoteYes) (/\dead -> - ifThenElse - {all dead. Vote} - (equalsInteger 2 index) - (/\dead -> Abstain) - (/\dead -> traceError {Vote} "PT1") - {all dead. dead}) + let + !l : list data = tailList {data} args + in + StakingPtr + (unIData (headList {data} args)) + (unIData (headList {data} l)) + (unIData + (headList + {data} + (tailList {data} l)))) + (/\dead -> + traceError {StakingCredential} "PT1") {all dead. dead}) - {all dead. dead})) - (headList {data} l)) - (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` - {ProposalProcedure} - `$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` - (headList {data} l)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} l)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {integer} - unIData - (headList {data} (tailList {data} l)))) - (/\dead -> traceError {TxInfo} "PT1") - {all dead. dead}) - (headList {data} l) - (let - !tup : pair integer (list data) - = unConstrData (headList {data} (tailList {data} l)) - !index : integer = fstPair {integer} {list data} tup - !args : list data = sndPair {integer} {list data} tup - in - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 0 index) - (/\dead -> MintingScript (unBData (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 1 index) - (/\dead -> - SpendingScript - (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` - (headList {data} args)) - (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` - {data} - `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` - (headList {data} (tailList {data} args)))) - (/\dead -> - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 2 index) - (/\dead -> - RewardingScript - (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> + {all dead. dead}) + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {Address} "PT1") + {all dead. dead}) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {(\k v -> List (Tuple2 k v)) bytestring integer} + unBData + `$fUnsafeFromDataValue` + (headList {data} l)) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} l) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. OutputDatum} + (equalsInteger 0 index) + (/\dead -> NoOutputDatum) + (/\dead -> + ifThenElse + {all dead. OutputDatum} + (equalsInteger 1 index) + (/\dead -> + OutputDatumHash (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. OutputDatum} + (equalsInteger 2 index) + (/\dead -> OutputDatum (headList {data} args)) + (/\dead -> traceError {OutputDatum} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} (tailList {data} l)))) + (/\dead -> traceError {TxOut} "PT1") + {all dead. dead} + data TxInInfo | TxInInfo_match where + TxInInfo : TxOutRef -> TxOut -> TxInInfo + !`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` : data -> TxInInfo + = \(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxInInfo} + (equalsInteger 0 index) + (/\dead -> + TxInInfo + (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> traceError {TxInInfo} "PT1") + {all dead. dead} + data ScriptInfo | ScriptInfo_match where + CertifyingScript : integer -> TxCert -> ScriptInfo + MintingScript : bytestring -> ScriptInfo + ProposingScript : integer -> ProposalProcedure -> ScriptInfo + RewardingScript : Credential -> ScriptInfo + SpendingScript : TxOutRef -> Maybe data -> ScriptInfo + VotingScript : Voter -> ScriptInfo + data (LowerBound :: * -> *) a | LowerBound_match where + LowerBound : Extended a -> Bool -> LowerBound a + data (UpperBound :: * -> *) a | UpperBound_match where + UpperBound : Extended a -> Bool -> UpperBound a + data (Interval :: * -> *) a | Interval_match where + Interval : LowerBound a -> UpperBound a -> Interval a + data ScriptPurpose | ScriptPurpose_match where + Certifying : integer -> TxCert -> ScriptPurpose + Minting : bytestring -> ScriptPurpose + Proposing : integer -> ProposalProcedure -> ScriptPurpose + Rewarding : Credential -> ScriptPurpose + Spending : TxOutRef -> ScriptPurpose + Voting : Voter -> ScriptPurpose + data Vote | Vote_match where + Abstain : Vote + VoteNo : Vote + VoteYes : Vote + data TxInfo | TxInfo_match where + TxInfo : + List TxInInfo -> + List TxInInfo -> + List TxOut -> + integer -> + (\k v -> List (Tuple2 k v)) + bytestring + ((\k v -> List (Tuple2 k v)) bytestring integer) -> + List TxCert -> + (\k v -> List (Tuple2 k v)) Credential integer -> + Interval integer -> + List bytestring -> + (\k v -> List (Tuple2 k v)) ScriptPurpose data -> + (\k v -> List (Tuple2 k v)) bytestring data -> + bytestring -> + (\k v -> List (Tuple2 k v)) + Voter + ((\k v -> List (Tuple2 k v)) GovernanceActionId Vote) -> + List ProposalProcedure -> + Maybe integer -> + Maybe integer -> + TxInfo + data ScriptContext | ScriptContext_match where + ScriptContext : TxInfo -> data -> ScriptInfo -> ScriptContext + in + \(d : data) -> + let + !ds : + ScriptContext + = let + !tup : pair integer (list data) = unConstrData d + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ScriptContext} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + in + ScriptContext + (let + !tup : pair integer (list data) + = unConstrData (headList {data} args) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. TxInfo} + (equalsInteger 0 index) + (/\dead -> + let + !l : list data = tailList {data} args + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + !l : list data = tailList {data} l + in + TxInfo + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxInInfo} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxInInfo} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxOut} + `$fUnsafeFromDataTxOut_$cunsafeFromBuiltinData` + (headList {data} l)) + (unIData (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {(\k v -> List (Tuple2 k v)) bytestring integer} + unBData + `$fUnsafeFromDataValue` + (headList {data} l)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {TxCert} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Credential} + {integer} + `$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + unIData + (headList {data} l)) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} l) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Interval integer} + (equalsInteger 0 index) + (/\dead -> + Interval + {integer} + (let + !tup : pair integer (list data) + = unConstrData (headList {data} args) + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in ifThenElse - {all dead. ScriptInfo} - (equalsInteger 3 index) + {all dead. LowerBound integer} + (equalsInteger 0 index) (/\dead -> - CertifyingScript - (unIData (headList {data} args)) - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + LowerBound + {integer} + (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} args)) + (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` (headList {data} (tailList {data} args)))) (/\dead -> - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 4 index) - (/\dead -> - VotingScript - (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` - (headList {data} args))) - (/\dead -> - ifThenElse - {all dead. ScriptInfo} - (equalsInteger 5 index) - (/\dead -> - ProposingScript - (unIData (headList {data} args)) - (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` - (headList - {data} - (tailList {data} args)))) - (/\dead -> - traceError {ScriptInfo} "PT1") - {all dead. dead}) - {all dead. dead}) + traceError {LowerBound integer} "PT1") {all dead. dead}) - {all dead. dead}) - {all dead. dead}) - {all dead. dead})) - (/\dead -> traceError {ScriptContext} "PT1") - {all dead. dead} - in - Unit) - (Constr 0 - [ Constr 0 - [ List [] - , List [] - , List - [ Constr 0 - [ Constr 0 [Constr 0 [B #], Constr 1 []] - , Map [(B #, Map [(B #, I 1)])] - , Constr 0 [] - , Constr 1 [] ] ] - , I 10000 - , Map [] - , List [] - , Map [] - , Constr 0 - [ Constr 0 [Constr 0 [], Constr 1 []] - , Constr 0 [Constr 2 [], Constr 1 []] ] - , List [] - , Map [] - , Map [] - , B # - , Map [] - , List [] - , Constr 1 [] - , Constr 1 [] ] - , I 1 - , Constr 1 [Constr 0 [B #, I 0], Constr 1 []] ]) \ No newline at end of file + (let + !tup : pair integer (list data) + = unConstrData + (headList {data} (tailList {data} args)) + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. UpperBound integer} + (equalsInteger 0 index) + (/\dead -> + UpperBound + {integer} + (`$fUnsafeFromDataExtended_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} args)) + (`$fUnsafeFromDataBool_$cunsafeFromBuiltinData` + (headList + {data} + (tailList {data} args)))) + (/\dead -> + traceError {UpperBound integer} "PT1") + {all dead. dead})) + (/\dead -> traceError {Interval integer} "PT1") + {all dead. dead}) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {bytestring} + unBData + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {ScriptPurpose} + {data} + (\(d : data) -> + let + !tup : pair integer (list data) = unConstrData d + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 0 index) + (/\dead -> + Minting (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 1 index) + (/\dead -> + Spending + (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 2 index) + (/\dead -> + Rewarding + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 3 index) + (/\dead -> + Certifying + (unIData + (headList {data} args)) + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + ifThenElse + {all dead. ScriptPurpose} + (equalsInteger 4 index) + (/\dead -> + Voting + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList + {data} + args))) + (/\dead -> + ifThenElse + {all dead. + ScriptPurpose} + (equalsInteger 5 index) + (/\dead -> + Proposing + (unIData + (headList + {data} + args)) + (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (headList + {data} + (tailList + {data} + args)))) + (/\dead -> + traceError + {ScriptPurpose} + "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {bytestring} + {data} + unBData + `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + (headList {data} l)) + (unBData (headList {data} l)) + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {Voter} + {(\k v -> List (Tuple2 k v)) GovernanceActionId Vote} + `$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (`$fUnsafeFromDataMap_$cunsafeFromBuiltinData` + {GovernanceActionId} + {Vote} + `$fUnsafeFromDataGovernanceAction_$cunsafeFromBuiltinData` + (\(d : data) -> + let + !tup : pair integer (list data) + = unConstrData d + !index : integer + = fstPair {integer} {list data} tup + !args : list data + = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. Vote} + (equalsInteger 0 index) + (/\dead -> VoteNo) + (/\dead -> + ifThenElse + {all dead. Vote} + (equalsInteger 1 index) + (/\dead -> VoteYes) + (/\dead -> + ifThenElse + {all dead. Vote} + (equalsInteger 2 index) + (/\dead -> Abstain) + (/\dead -> traceError {Vote} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead})) + (headList {data} l)) + (`$fUnsafeFromDataList_$cunsafeFromBuiltinData` + {ProposalProcedure} + `$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (headList {data} l)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} l)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {integer} + unIData + (headList {data} (tailList {data} l)))) + (/\dead -> traceError {TxInfo} "PT1") + {all dead. dead}) + (headList {data} l) + (let + !tup : pair integer (list data) + = unConstrData (headList {data} (tailList {data} l)) + !index : integer = fstPair {integer} {list data} tup + !args : list data = sndPair {integer} {list data} tup + in + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 0 index) + (/\dead -> MintingScript (unBData (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 1 index) + (/\dead -> + SpendingScript + (`$fUnsafeFromDataTxOutRef_$cunsafeFromBuiltinData` + (headList {data} args)) + (`$fUnsafeFromDataMaybe_$cunsafeFromBuiltinData` + {data} + `$fUnsafeFromDataBuiltinData_$cunsafeFromBuiltinData` + (headList {data} (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 2 index) + (/\dead -> + RewardingScript + (`$fUnsafeFromDataCredential_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 3 index) + (/\dead -> + CertifyingScript + (unIData (headList {data} args)) + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList + {data} + (tailList {data} args)))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 4 index) + (/\dead -> + VotingScript + (`$fUnsafeFromDataScriptContext_$cunsafeFromBuiltinData` + (headList {data} args))) + (/\dead -> + ifThenElse + {all dead. ScriptInfo} + (equalsInteger 5 index) + (/\dead -> + ProposingScript + (unIData (headList {data} args)) + (`$fUnsafeFromDataProposalProcedure_$cunsafeFromBuiltinData` + (headList + {data} + (tailList {data} args)))) + (/\dead -> + traceError {ScriptInfo} "PT1") + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead}) + {all dead. dead})) + (/\dead -> traceError {ScriptContext} "PT1") + {all dead. dead} + in + Unit) + (Constr 0 + [ Constr 0 + [ List [] + , List [] + , List + [ Constr 0 + [ Constr 0 [Constr 0 [B #], Constr 1 []] + , Map [(B #, Map [(B #, I 1)])] + , Constr 0 [] + , Constr 1 [] ] ] + , I 10000 + , Map [] + , List [] + , Map [] + , Constr 0 + [ Constr 0 [Constr 0 [], Constr 1 []] + , Constr 0 [Constr 2 [], Constr 1 []] ] + , List [] + , Map [] + , Map [] + , B # + , Map [] + , List [] + , Constr 1 [] + , Constr 1 [] ] + , I 1 + , Constr 1 [Constr 0 [B #, I 0], Constr 1 []] ])) \ No newline at end of file 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..155634b2578 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..fed7f2717ae 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,51 @@ (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 + 1.1.0 + ((/\(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 - ]] - ) + [] + [ a + , ((\a -> ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) + a) ]) 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 + [])) + (/\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 - ]] - ) + [] + [ a + , ((\a -> + ifix (\(List :: * -> *) a -> sop [] [a, (List a)]) a) + a) ]) 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 + [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..47b15c4473d 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..3eaf9a72b84 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 - 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 + 1.1.0 + ((/\(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..ba345878256 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 - 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 + 1.1.0 + ((/\(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..9cde35aad3d 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 - 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 + 1.1.0 + ((/\(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..829be9904c2 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..7eee80ec3c7 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..5a6341484eb 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 - 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 + 1.1.0 + ((/\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..0b70f08e89e 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..7fc4be94fb6 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 - 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 + 1.1.0 + ((\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..9bb8217855b 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,78 @@ (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 + 1.1.0 + ((\(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..d8ab97316e9 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 - 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 + 1.1.0 + ((/\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])) - )] - ) + [] + [ (ifix + (\(rec :: (* -> *) -> *) (f :: * -> *) -> f (rec f)) + (\Nat -> sop [] [Nat])) ]) 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) - ) - ) - ) - ) - ] -) \ No newline at end of file + [])) + (\(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]))) \ 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..8c0cab58a3e 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..436bbb712e4 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 + 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..b80270e9c38 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..c027cfb31d5 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 +(letrec + !x : integer = error {integer} + ~y : integer = x in -1 \ No newline at end of file +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..29962c674c9 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 +(letrec + 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..cd12f1b6e70 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 +(let + 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..8cdfa47e475 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 +(let + !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..ea55f17058b 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 +(let + !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..e98f5bfe406 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 +(letrec + 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..2ca2973ad4e 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 +(let + 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..8f9aa6a36a3 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 +(letrec + !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..30f66dc33a1 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 +(letrec + 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..5c4a4603858 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 +(let + 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..3059348aa74 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 +(letrec + 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..8c0cab58a3e 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..05fd5a112e8 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..744f2054ef1 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..436bbb712e4 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 + 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/letFun.golden b/plutus-core/plutus-ir/test/PlutusIR/Purity/letFun.golden index a38098993a5..215e17c4c70 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 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..026b6dcac71 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..e7e749dca65 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 + !x-0 : integer = 2 in 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..1bd01c61dcf 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..43e0fc301a4 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..ac795988a83 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 + !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..ab534bfa415 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 + !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..f59814a9e11 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 + !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..20f2041d36c 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 + 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..27ef8528dab 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 + 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..5b0be0f4e94 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 + 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..4affe52ed37 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 + 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..e9eae7f6769 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 + 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..663496cd603 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..8f57028f0ec 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..363297d59b6 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 + 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..06ba8c9aafa 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 + 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..2e7b0ff85a0 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 + 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..d20ecdd43f3 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..7556e473c50 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 + !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..42d1af24b44 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 + 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..745b3984d66 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 + !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..65f61a8f49f 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 + 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..87467609f51 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..bb50d558d19 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..7556e473c50 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 + !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..05ae15cdcb5 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 + !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..bb50d558d19 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..a27f0f49683 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..b334c557280 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..7850d6cb709 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 + !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..3df1583408a 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..d47155b71d5 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..6c3d9d144d7 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..73e28c89a23 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..73e28c89a23 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..65131a3bd6d 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..d38b3cd8b52 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..c2c398cf912 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 + !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..40862e425a6 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 + !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..62002c97b37 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..8de7bd6e6d3 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 + !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..9f2ebf22cdf 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..5b3145cc753 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..2a14d930ee0 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 + !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..4d5894a7ee3 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..a2d84066534 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..14c0e793a2a 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 + !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..dcc340b66f3 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 + 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..3aa1a179ba2 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..1cb5aa6604e 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 + !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..52bff61118e 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..b7e18f38d0d 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 + !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..c568365a891 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 + !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..6be29ae7a7f 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 + ~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..422fa489472 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 + !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..854424c9e46 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..19076faed7b 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 + !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..5ea7b8b5a2e 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 + !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..19b1b327ecd 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..3c96be32043 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 + !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..894360506ca 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 + !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..2eceef8fcdd 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 + !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..3519e457c9d 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 + !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..3186f333516 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..e38a0679c08 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 + !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..ebba7c78a7c 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 + !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..5739052057e 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 + !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..9a775c3caeb 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 + !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..41ffb929933 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..9ae38d0be85 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..298791cc8ba 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 + 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..f8a22bdc82e 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 + 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..cca83752711 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..cbcf62d62c1 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 + 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..2f81708d84f 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 + 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..c5b7a62f8a4 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 + 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..d42d1c3ba82 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 + 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..f200df8bfe7 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 + !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..7310c002a02 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 + !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..c939c878b3a 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 + ~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..ba58fd99aec 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 + !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..f64c7b1fe87 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 + ~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..28a1106fe7a 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..e1c37e16541 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..a42ddd383a4 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..4f2826881b1 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 + 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..c66d28e9bef 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 + 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..471932cb720 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)]) - 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 + (sop [integer, integer, integer]) + 0 + [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..cb5825edff3 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..65dd73bd9aa 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) - [ +(addInteger + ((let + !f-4 : integer -> integer = \(y-3 : integer) -> addInteger y-3 3 + in + f-4) (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 + ~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..af55aa9a9d4 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..1e1092360cc 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 + !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..39f324c86b3 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 - ] - (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 +(/\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 + ~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..108d3a4442d 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 + !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..3bc87cd8962 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) - [ - (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 +(\(n-15 : integer) -> + (let + int-14 = integer + in + (let + !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..0c1d9ec862e 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 + 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..1d9af9e1275 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..9387940522a 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,5 @@ -(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..4acc25c5087 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 + !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..e89d0c96015 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..9ba98cae541 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 + 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..bb5c4104985 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..e192f6256ad 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..413639cffe2 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 + !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..1b9d1b35d39 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 + !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..2276b94c116 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..38531cfa0d2 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 + !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..84dc07192cb 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..ebb350002b6 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 + !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..38809ee1d4b 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 + !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..49b3725fa6c 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 + !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..27d5faf716c 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..f6c1d0eff2b 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..49b3725fa6c 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 + !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..a92cf1bf762 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..6fe21bfd5be 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 + ~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..9ea2a19840a 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..53a5b460e11 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 + !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..5ebb79c92a6 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 + !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..fb31eee07e1 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..130fcddeab7 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..43abbb3b4dd 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..3e22756f587 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 + ~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..252ed93a3a4 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 + ~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..24d4404bca1 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..061644704bb 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..ce8881b6468 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 + !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..93e93494ef8 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..675e6de398f 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 + !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..8ec1ca0a59e 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 + !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..bf1e850867b 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 + 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..6afbf09efaa 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..e0e1bd7ff52 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..7fa159bf1bf 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..49a3b37a96f 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 + 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..c643e104f68 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 + 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..8a5a5de0f6f 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 + 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..88a0f5ad7b1 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..a84b8893533 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 + 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..c318cc1dd41 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..26906dedc9b 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..1e1258611ed 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..443df231046 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 + !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..5cbb2ac9cd7 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..4b55628741b 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 + 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..c06310aeaa2 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 + 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..2c7b5fa4adc 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..a14f914a806 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 + !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..62ee572f14a 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..3d21d80bcd9 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 + !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..ee5dc21d1b3 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..3abcf37e22c 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..7aef35d406c 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..1e01bae6cf3 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..95985c7ade7 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..abf2d8b83e3 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..63655514045 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..fde3ec469c3 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..0766e471e6c 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..8de33fedf8d 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..fccca97b4c8 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..f79b4492a88 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..1492c5e149d 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..34b88641af6 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..0766e471e6c 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..42beb042bbe 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..42beb042bbe 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..0766e471e6c 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..42beb042bbe 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..30a8cbd9456 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..0766e471e6c 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..42beb042bbe 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..42beb042bbe 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..0766e471e6c 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..42beb042bbe 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..0766e471e6c 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..1512d123891 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: (\n-0 -> n-0 1 1) pure work-free: (addInteger) -pure maybe work?: ((\n -> n 1 1) addInteger) -pure work-free: n +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..61dc28c6fea 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..a07cbe3c502 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..371ff9a65ae 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..0863fb57311 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..713b45186c2 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..a07cbe3c502 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..6d056d9157e 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..77a71806734 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..77619acb617 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..f6666a9de2a 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..33361840577 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 + (\z-0 + f-1 -> + f-1 (delay - (\z - f -> - f + (\z-2 + f-3 -> + f-3 (delay - (\z - f -> - f + (\z-4 + f-5 -> + f-5 (delay - (\z - f -> - f + (\z-6 + f-7 -> + f-7 (delay - (\z - f -> - f + (\z-8 + f-9 -> + f-9 (delay - (\z - f -> - f + (\z-10 + f-11 -> + f-11 (delay - (\z - f -> - f + (\z-12 + f-13 -> + f-13 (delay - (\z - f -> - f + (\z-14 + f-15 -> + f-15 (delay - (\z - f -> - f + (\z-16 + f-17 -> + f-17 (delay - (\z - f -> - f + (\z-18 + f-19 -> + f-19 (delay - (\z - f -> - z))))))))))))))))))))))) + (\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..637a5362a21 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..2d67f456481 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 -> +(\x y -> + (\cse -> + (\cse -> addInteger - cse_9 + cse (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 + 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..8ab65499cec 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/cse2.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/cse2.uplc.golden @@ -2,5 +2,5 @@ (force (ifThenElse (lessThanInteger 0 0) - (delay ((\cse_2 -> addInteger cse_2 cse_2) (addInteger 1 2))) + (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..06086eed0a1 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..1f426ef5699 100644 --- a/plutus-core/untyped-plutus-core/test/Transform/cseExpensive.uplc.golden +++ b/plutus-core/untyped-plutus-core/test/Transform/cseExpensive.uplc.golden @@ -1,208 +1,208 @@ -((\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 -> +((\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\cse -> + (\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_802 - cse_802) + cse + cse) (addInteger (addInteger (addInteger @@ -403,207 +403,207 @@ (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)) + cse + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + cse) + 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)) 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..ea750d15ea6 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/forceDelayComplex.uplc.golden b/plutus-core/untyped-plutus-core/test/Transform/forceDelayComplex.uplc.golden index 50a3d500b30..f2ac9611c60 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..41c7529a1c7 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..5eacccdd698 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..5eacccdd698 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..5eacccdd698 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..18c195ec2b1 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..163cfa6cfb6 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..163cfa6cfb6 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..741e9aa14d6 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..c9299deb294 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-ledger-api/test-plugin/Spec/Budget/9.6/currencySymbolValueOf.pir.golden b/plutus-ledger-api/test-plugin/Spec/Budget/9.6/currencySymbolValueOf.pir.golden index c4bc8a51820..a60fb48c1ba 100644 --- a/plutus-ledger-api/test-plugin/Spec/Budget/9.6/currencySymbolValueOf.pir.golden +++ b/plutus-ledger-api/test-plugin/Spec/Budget/9.6/currencySymbolValueOf.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple2 :: * -> * -> *) a b | Tuple2_match where Tuple2 : a -> b -> Tuple2 a b in @@ -76,4 +76,4 @@ in {all dead. dead})) {all dead. dead} in - go ds \ No newline at end of file + go ds) \ No newline at end of file diff --git a/plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt.pir.golden b/plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt.pir.golden index 018211f9b60..ab121d71f6e 100644 --- a/plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt.pir.golden +++ b/plutus-ledger-api/test-plugin/Spec/Budget/9.6/gt.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple2 :: * -> * -> *) a b | Tuple2_match where Tuple2 : a -> b -> Tuple2 a b data Bool | Bool_match where @@ -803,4 +803,4 @@ in (/\dead -> True) {all dead. dead}) (/\dead -> False) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ No newline at end of file diff --git a/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.pir.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.pir.golden index 08d123a2cfc..a46f79ec00f 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.pir.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/onlyUseFirstField.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -22,4 +22,4 @@ in in ds) (/\dead -> error {integer}) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ 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.pir.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.pir.golden index a76bbe3cda6..c32a90aed5a 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.pir.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/patternMatching.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data (Tuple4 :: * -> * -> * -> * -> *) a b c d | Tuple4_match where @@ -100,4 +100,4 @@ in {all dead. integer} (/\dead -> addInteger z x) (/\dead -> addInteger w y) - {all dead. dead}) \ No newline at end of file + {all dead. dead})) \ 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.pir.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.pir.golden index 0329d28fd34..2dec2297c82 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.pir.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields-manual.pir.golden @@ -1,4 +1,4 @@ -let +(let !addInteger : integer -> integer -> integer = \(x : integer) (y : integer) -> addInteger x y !int1Manual : data -> integer @@ -98,4 +98,4 @@ in {all dead. integer} (/\dead -> addInteger (int3Manual d) (int1Manual d)) (/\dead -> addInteger (int4Manual d) (int2Manual d)) - {all dead. dead}) \ No newline at end of file + {all dead. dead})) \ 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.pir.golden b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.pir.golden index 5b0ee58b863..7fdfe833ef6 100644 --- a/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.pir.golden +++ b/plutus-tx-plugin/test/AsData/Budget/9.6/recordFields.pir.golden @@ -1,4 +1,4 @@ -let +(let !addInteger : integer -> integer -> integer = \(x : integer) (y : integer) -> addInteger x y !`$mInts` : @@ -88,4 +88,4 @@ in {all dead. integer} (/\dead -> addInteger (int d) (int d)) (/\dead -> addInteger (int d) (int d)) - {all dead. dead}) \ No newline at end of file + {all dead. dead})) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/allCheap.pir.golden index 3e2dd3c6447..b0618f0977d 100644 --- a/plutus-tx-plugin/test/Budget/9.6/allCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/allCheap.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/allEmptyList.pir.golden index 710a5d747ff..f79b761651f 100644 --- a/plutus-tx-plugin/test/Budget/9.6/allEmptyList.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/allEmptyList.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -26,4 +26,4 @@ letrec {all dead. dead}) {all dead. dead} in -go (Nil {integer}) \ No newline at end of file +go (Nil {integer})) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/allExpensive.pir.golden index a43c5736bdb..c0332683499 100644 --- a/plutus-tx-plugin/test/Budget/9.6/allExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/allExpensive.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/andCheap.pir.golden index b0a5fc1a2a9..72f4fae89fb 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andCheap.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -41,4 +41,4 @@ and True (c True (c True (c True (c True (c True (c True n)))))))))) (\(ds : Bool) (ds : List Bool) -> Cons {Bool} ds ds) - (Nil {Bool})) \ No newline at end of file + (Nil {Bool}))) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/andExpensive.pir.golden index a8be86f76c4..8dea2605e34 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andExpensive.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -41,4 +41,4 @@ and True (c True (c True (c True (c True (c True (c True n)))))))))) (\(ds : Bool) (ds : List Bool) -> Cons {Bool} ds ds) - (Nil {Bool})) \ No newline at end of file + (Nil {Bool}))) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.pir.golden index 76ba46d434e..adb83d07cba 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andWithGHCOpts.pir.golden @@ -1,14 +1,14 @@ -(let - data Bool | Bool_match where - True : Bool - False : Bool - in - \(x : integer) (y : integer) -> - ifThenElse - {all dead. Bool} - (lessThanInteger x 3) - (/\dead -> ifThenElse {Bool} (lessThanInteger y 3) True False) - (/\dead -> False) - {all dead. dead}) - 4 - 4 \ No newline at end of file +((let + data Bool | Bool_match where + True : Bool + False : Bool + in + \(x : integer) (y : integer) -> + ifThenElse + {all dead. Bool} + (lessThanInteger x 3) + (/\dead -> ifThenElse {Bool} (lessThanInteger y 3) True False) + (/\dead -> False) + {all dead. dead}) + 4 + 4) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/andWithLocal.pir.golden index 805dfd6aed2..6d5cc89b641 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andWithLocal.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andWithLocal.pir.golden @@ -1,17 +1,17 @@ -(let - data Bool | Bool_match where - True : Bool - False : Bool - !lessThanInteger : integer -> integer -> Bool - = \(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) True False - in - \(x : integer) (y : integer) -> - Bool_match - (lessThanInteger x 3) - {all dead. Bool} - (/\dead -> lessThanInteger y 3) - (/\dead -> False) - {all dead. dead}) - 4 - 4 \ No newline at end of file +((let + data Bool | Bool_match where + True : Bool + False : Bool + !lessThanInteger : integer -> integer -> Bool + = \(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) True False + in + \(x : integer) (y : integer) -> + Bool_match + (lessThanInteger x 3) + {all dead. Bool} + (/\dead -> lessThanInteger y 3) + (/\dead -> False) + {all dead. dead}) + 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.pir.golden index 640e976e461..458ddde5ade 100644 --- a/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/andWithoutGHCOpts.pir.golden @@ -1,85 +1,85 @@ -(let - data Ordering | Ordering_match where - EQ : Ordering - GT : Ordering - LT : Ordering - data Bool | Bool_match where - True : Bool - False : Bool - 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} - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (equalsInteger x y) True False) - (\(eta : integer) (eta : integer) -> - ifThenElse - {all dead. Ordering} - (equalsInteger eta eta) - (/\dead -> EQ) - (/\dead -> - ifThenElse - {all dead. Ordering} - (lessThanEqualsInteger eta eta) - (/\dead -> LT) - (/\dead -> GT) - {all dead. dead}) - {all dead. dead}) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) True False) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanEqualsInteger x y) True False) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanEqualsInteger x y) False True) - (\(x : integer) (y : integer) -> - ifThenElse {Bool} (lessThanInteger x y) False True) - (\(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (lessThanEqualsInteger x y) - (/\dead -> y) - (/\dead -> x) - {all dead. dead}) - (\(x : integer) (y : integer) -> - ifThenElse - {all dead. integer} - (lessThanEqualsInteger x y) - (/\dead -> x) - (/\dead -> y) - {all dead. dead}) - !`<` : all a. Ord a -> a -> a -> Bool - = /\a -> - \(v : Ord a) -> - Ord_match - {a} - v - {a -> a -> Bool} - (\(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) - in - \(x : integer) (y : integer) -> - Bool_match - (`<` {integer} `$fOrdInteger` x 3) - {all dead. Bool} - (/\dead -> `<` {integer} `$fOrdInteger` y 3) - (/\dead -> False) - {all dead. dead}) - 4 - 4 \ No newline at end of file +((let + data Ordering | Ordering_match where + EQ : Ordering + GT : Ordering + LT : Ordering + data Bool | Bool_match where + True : Bool + False : Bool + 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} + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (equalsInteger x y) True False) + (\(eta : integer) (eta : integer) -> + ifThenElse + {all dead. Ordering} + (equalsInteger eta eta) + (/\dead -> EQ) + (/\dead -> + ifThenElse + {all dead. Ordering} + (lessThanEqualsInteger eta eta) + (/\dead -> LT) + (/\dead -> GT) + {all dead. dead}) + {all dead. dead}) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) True False) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanEqualsInteger x y) True False) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanEqualsInteger x y) False True) + (\(x : integer) (y : integer) -> + ifThenElse {Bool} (lessThanInteger x y) False True) + (\(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (lessThanEqualsInteger x y) + (/\dead -> y) + (/\dead -> x) + {all dead. dead}) + (\(x : integer) (y : integer) -> + ifThenElse + {all dead. integer} + (lessThanEqualsInteger x y) + (/\dead -> x) + (/\dead -> y) + {all dead. dead}) + !`<` : all a. Ord a -> a -> a -> Bool + = /\a -> + \(v : Ord a) -> + Ord_match + {a} + v + {a -> a -> Bool} + (\(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) + in + \(x : integer) (y : integer) -> + Bool_match + (`<` {integer} `$fOrdInteger` x 3) + {all dead. Bool} + (/\dead -> `<` {integer} `$fOrdInteger` y 3) + (/\dead -> False) + {all dead. dead}) + 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/anyCheap.pir.golden index 0feb5c64a3d..57836de79e5 100644 --- a/plutus-tx-plugin/test/Budget/9.6/anyCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/anyCheap.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.pir.golden index ec8ba5d9116..a1b025bce86 100644 --- a/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/anyEmptyList.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -26,4 +26,4 @@ letrec {all dead. dead}) {all dead. dead} in -go (Nil {integer}) \ No newline at end of file +go (Nil {integer})) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/anyExpensive.pir.golden index a5a24c07be7..62222b68301 100644 --- a/plutus-tx-plugin/test/Budget/9.6/anyExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/anyExpensive.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/applicative.pir.golden index cac5bde10b2..1eba73afb39 100644 --- a/plutus-tx-plugin/test/Budget/9.6/applicative.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/applicative.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Maybe :: * -> *) a | Maybe_match where Just : a -> Maybe a Nothing : Maybe a @@ -23,4 +23,4 @@ Maybe_match {all dead. Maybe integer} (\(ipv : integer -> integer) -> /\dead -> Just {integer} (ipv 2)) (/\dead -> Nothing {integer}) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.pir.golden index f1593ac7d9f..fbcd4ebccc2 100644 --- a/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/builtinListIndexing.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit in @@ -29,4 +29,4 @@ let True : Bool False : Bool in -\(d : data) -> let !xs : list data = unListData d in go xs 5 \ No newline at end of file +\(d : data) -> let !xs : list data = unListData d in go xs 5) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/constAccL.pir.golden index f34f07ae56e..3edcd418ecc 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constAccL.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constAccL.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -30,4 +30,4 @@ let False : Bool !ls : List integer = go 1000 in -go 42 ls \ No newline at end of file +go 42 ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/constAccR.pir.golden index 619a75b2a6a..9d1e57de07b 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constAccR.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constAccR.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -30,4 +30,4 @@ let False : Bool !ls : List integer = go 1000 in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/constElL.pir.golden index b89b2214ee3..b76e48fe9c3 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constElL.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constElL.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -30,4 +30,4 @@ let False : Bool !ls : List integer = go 1000 in -go 42 ls \ No newline at end of file +go 42 ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/constElR.pir.golden index cd7e1fa820d..9afd45dc38d 100644 --- a/plutus-tx-plugin/test/Budget/9.6/constElR.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/constElR.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -31,4 +31,4 @@ let False : Bool !ls : List integer = go 1000 in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/elemCheap.pir.golden index ea49cc44536..12c16550b81 100644 --- a/plutus-tx-plugin/test/Budget/9.6/elemCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/elemCheap.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/elemExpensive.pir.golden index 290495ad8f8..3469cea3755 100644 --- a/plutus-tx-plugin/test/Budget/9.6/elemExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/elemExpensive.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/filter.pir.golden index a6ff41feb9c..7a544330c2c 100644 --- a/plutus-tx-plugin/test/Budget/9.6/filter.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/filter.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -37,4 +37,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/findCheap.pir.golden index 4dedb64513c..7cb8ed404dd 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findCheap.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -39,4 +39,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/findEmptyList.pir.golden index 4d24f27b211..8e967512957 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findEmptyList.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findEmptyList.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -31,4 +31,4 @@ let True : Bool False : Bool in -go (Nil {integer}) \ No newline at end of file +go (Nil {integer})) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/findExpensive.pir.golden index f1a72dc139f..7903bbfa7d0 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findExpensive.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -39,4 +39,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.pir.golden index 37d9f97d5d4..4e848666ad6 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findIndexCheap.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -39,4 +39,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go 0 ls \ No newline at end of file +go 0 ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.pir.golden index 60417dfede4..a2a2b59054a 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findIndexEmptyList.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -31,4 +31,4 @@ let True : Bool False : Bool in -go 0 (Nil {integer}) \ No newline at end of file +go 0 (Nil {integer})) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.pir.golden index d6db198e012..d1f933da3ac 100644 --- a/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/findIndexExpensive.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -39,4 +39,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go 0 ls \ No newline at end of file +go 0 ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/gte0.pir.golden index 5958cbad318..a73818e026e 100644 --- a/plutus-tx-plugin/test/Budget/9.6/gte0.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/gte0.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -39,4 +39,4 @@ in let !ls : List integer = go 1000 in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.pir.golden index e6188c08835..fbe8cde1120 100644 --- a/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/ifThenElse1.pir.golden @@ -1,6 +1,6 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool in -5 \ No newline at end of file +5) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.pir.golden index b3157fea137..ae3b3be23fe 100644 --- a/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/ifThenElse2.pir.golden @@ -1,6 +1,6 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool in -18 \ No newline at end of file +18) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/listIndexing.pir.golden index fa5d613e7f7..f16e273ea6e 100644 --- a/plutus-tx-plugin/test/Budget/9.6/listIndexing.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/listIndexing.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -28,4 +28,4 @@ let data Unit | Unit_match where Unit : Unit in -\(xs : List data) -> go 5 xs \ No newline at end of file +\(xs : List data) -> go 5 xs) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/lte0.pir.golden index bb9f7e60419..048e27063f6 100644 --- a/plutus-tx-plugin/test/Budget/9.6/lte0.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/lte0.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -39,4 +39,4 @@ in let !ls : List integer = go 1000 in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/map1.pir.golden index dc42876c182..ec66f072495 100644 --- a/plutus-tx-plugin/test/Budget/9.6/map1.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/map1.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -401,4 +401,4 @@ in (\(i : integer) -> iData i) unBData (addInteger 5 n) - nt) \ No newline at end of file + nt)) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/map2.pir.golden index c735c68c517..0bb00ab4e09 100644 --- a/plutus-tx-plugin/test/Budget/9.6/map2.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/map2.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data (Tuple2 :: * -> * -> *) a b | Tuple2_match where @@ -335,4 +335,4 @@ in {Tuple2 integer string} (\(k : integer) (v : bytestring) -> Tuple2 {integer} {string} k (decodeUtf8 v))) - (go nt) \ No newline at end of file + (go nt)) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/map3.pir.golden index c735c68c517..0bb00ab4e09 100644 --- a/plutus-tx-plugin/test/Budget/9.6/map3.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/map3.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data (Tuple2 :: * -> * -> *) a b | Tuple2_match where @@ -335,4 +335,4 @@ in {Tuple2 integer string} (\(k : integer) (v : bytestring) -> Tuple2 {integer} {string} k (decodeUtf8 v))) - (go nt) \ No newline at end of file + (go nt)) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/monadicDo.pir.golden index db402efe82f..ce20acc0ffd 100644 --- a/plutus-tx-plugin/test/Budget/9.6/monadicDo.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/monadicDo.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Maybe :: * -> *) a | Maybe_match where Just : a -> Maybe a Nothing : Maybe a @@ -22,4 +22,4 @@ in {integer} {integer} (Just {integer} 2) - (\(y' : integer) -> Just {integer} (addInteger x' y'))) \ No newline at end of file + (\(y' : integer) -> Just {integer} (addInteger x' y')))) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/not-not.pir.golden index 2ac1632e85d..ca8e1eee2ab 100644 --- a/plutus-tx-plugin/test/Budget/9.6/not-not.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/not-not.pir.golden @@ -1,18 +1,18 @@ -(let - data Bool | Bool_match where - True : Bool - False : Bool - in - \(x : integer) -> - Bool_match - (ifThenElse - {all dead. Bool} - (lessThanInteger 0 x) - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - {all dead. Bool} - (/\dead -> False) - (/\dead -> True) - {all dead. dead}) - 1 \ No newline at end of file +((let + data Bool | Bool_match where + True : Bool + False : Bool + in + \(x : integer) -> + Bool_match + (ifThenElse + {all dead. Bool} + (lessThanInteger 0 x) + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + {all dead. Bool} + (/\dead -> False) + (/\dead -> True) + {all dead. dead}) + 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/notElemCheap.pir.golden index bdd5e4cec37..235e46a8303 100644 --- a/plutus-tx-plugin/test/Budget/9.6/notElemCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/notElemCheap.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.pir.golden index 54f7122473e..1f9d3199e35 100644 --- a/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/notElemExpensive.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -36,4 +36,4 @@ let (\(ds : integer) (ds : List integer) -> Cons {integer} ds ds) (Nil {integer}) in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/null.pir.golden index f804809da4a..63e98bb2f3a 100644 --- a/plutus-tx-plugin/test/Budget/9.6/null.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/null.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -24,4 +24,4 @@ List_match {all dead. Bool} (/\dead -> True) (\(ipv : integer) (ipv : List integer) -> /\dead -> False) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/orCheap.pir.golden index 74ef395007a..21707f9d3ef 100644 --- a/plutus-tx-plugin/test/Budget/9.6/orCheap.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/orCheap.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -43,4 +43,4 @@ or False (c False (c False (c False (c False (c False n)))))))))) (\(ds : Bool) (ds : List Bool) -> Cons {Bool} ds ds) - (Nil {Bool})) \ No newline at end of file + (Nil {Bool}))) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/orExpensive.pir.golden index 59b575d042b..04a6fc8ffd7 100644 --- a/plutus-tx-plugin/test/Budget/9.6/orExpensive.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/orExpensive.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -43,4 +43,4 @@ or False (c False (c False (c False (c False (c False n)))))))))) (\(ds : Bool) (ds : List Bool) -> Cons {Bool} ds ds) - (Nil {Bool})) \ No newline at end of file + (Nil {Bool}))) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/patternMatch.pir.golden index aa1ba37a5d3..8a0afd5fab1 100644 --- a/plutus-tx-plugin/test/Budget/9.6/patternMatch.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/patternMatch.pir.golden @@ -1,6 +1,6 @@ -let +(let data (Maybe :: * -> *) a | Maybe_match where Just : a -> Maybe a Nothing : Maybe a in -Just {integer} 3 \ No newline at end of file +Just {integer} 3) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.pir.golden index 92c43aa65c4..acce47fe7b3 100644 --- a/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/recursiveGte0.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -43,4 +43,4 @@ in recursiveAll {integer} (\(v : integer) -> ifThenElse {Bool} (lessThanInteger v 0) False True) - ls \ No newline at end of file + ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.pir.golden index c85b1d34584..7341a1cd0ac 100644 --- a/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/recursiveLte0.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -43,4 +43,4 @@ in recursiveAll {integer} (\(v : integer) -> ifThenElse {Bool} (lessThanEqualsInteger v 0) True False) - ls \ No newline at end of file + ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/show.pir.golden index 96772727afe..e8b63066875 100644 --- a/plutus-tx-plugin/test/Budget/9.6/show.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/show.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -427,4 +427,4 @@ multiplyInteger {string} ")" (Nil {string}))))))))))))) - e) \ No newline at end of file + e)) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/sum.pir.golden index bd997d2182f..7b2e805b71b 100644 --- a/plutus-tx-plugin/test/Budget/9.6/sum.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/sum.pir.golden @@ -1,4 +1,4 @@ -let +(let data (AdditiveMonoid :: * -> *) a | AdditiveMonoid_match where CConsAdditiveMonoid : (\a -> a -> a -> a) a -> a -> AdditiveMonoid a !`$dAdditiveMonoid` : AdditiveMonoid integer @@ -48,4 +48,4 @@ in {all dead. dead} in \(eta : List integer) -> go eta) - ls \ No newline at end of file + ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/sumL.pir.golden index 06a5b10c150..14f08c5727f 100644 --- a/plutus-tx-plugin/test/Budget/9.6/sumL.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/sumL.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -32,4 +32,4 @@ let False : Bool !ls : List integer = `$fEnumBool_$cenumFromTo` 1 1000 in -go 0 ls \ No newline at end of file +go 0 ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/sumR.pir.golden index 707a9373795..4e6fdb9dab2 100644 --- a/plutus-tx-plugin/test/Budget/9.6/sumR.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/sumR.pir.golden @@ -1,4 +1,4 @@ -letrec +(letrec data (List :: * -> *) a | List_match where Nil : List a Cons : a -> List a -> List a @@ -31,4 +31,4 @@ let False : Bool !ls : List integer = `$fEnumBool_$cenumFromTo` 1 1000 in -go ls \ No newline at end of file +go ls) \ 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.pir.golden b/plutus-tx-plugin/test/Budget/9.6/toFromData.pir.golden index 8acd60f2798..b073b1e4e59 100644 --- a/plutus-tx-plugin/test/Budget/9.6/toFromData.pir.golden +++ b/plutus-tx-plugin/test/Budget/9.6/toFromData.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple3 :: * -> * -> * -> *) a b c | Tuple3_match where Tuple3 : a -> b -> c -> Tuple3 a b c data Bool | Bool_match where @@ -182,4 +182,4 @@ in {all dead. dead})) (/\dead -> traceError {Tuple3 Bool integer Bool} "PT1") {all dead. dead})) - d \ No newline at end of file + d) \ 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..d5b49856163 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 - 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 + 1.1.0 + (\(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..d5b49856163 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 - 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 + 1.1.0 + (\(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..d5b49856163 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 - 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 + 1.1.0 + (\(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..d5b49856163 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 - 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 + 1.1.0 + (\(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..65cf7d44dac 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/dataToData.pir.golden b/plutus-tx-plugin/test/IsData/9.6/dataToData.pir.golden index 7d6381721b6..c7cf68ae2f3 100644 --- a/plutus-tx-plugin/test/IsData/9.6/dataToData.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/dataToData.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit !mkConstr : integer -> list data -> data = constrData @@ -160,4 +160,4 @@ in {all dead. dead}) (/\dead -> fail ()) {all dead. dead}) - (\(void : unit) -> fail ()) \ No newline at end of file + (\(void : unit) -> fail ())) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/deconstructData.pir.golden b/plutus-tx-plugin/test/IsData/9.6/deconstructData.pir.golden index 062833a95eb..81dc78e2d84 100644 --- a/plutus-tx-plugin/test/IsData/9.6/deconstructData.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/deconstructData.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple2 :: * -> * -> *) a b | Tuple2_match where Tuple2 : a -> b -> Tuple2 a b data Bool | Bool_match where @@ -215,4 +215,4 @@ in let !ds : data = ds in - fromBuiltinData {Tuple2 integer integer} `$dFromData` ds \ No newline at end of file + fromBuiltinData {Tuple2 integer integer} `$dFromData` ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/equalityAsData.pir.golden b/plutus-tx-plugin/test/IsData/9.6/equalityAsData.pir.golden index a1c84036ed3..108ed356470 100644 --- a/plutus-tx-plugin/test/IsData/9.6/equalityAsData.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/equalityAsData.pir.golden @@ -1,4 +1,4 @@ -let +(let data Bool | Bool_match where True : Bool False : Bool @@ -25,4 +25,4 @@ in let !nt : data = x in - \(y : data) -> let !nt : data = y in `==` {data} `$fEqSecretlyData` nt nt \ No newline at end of file + \(y : data) -> let !nt : data = y in `==` {data} `$fEqSecretlyData` nt nt) \ No newline at end of file diff --git a/plutus-tx-plugin/test/IsData/9.6/fieldAccessor.pir.golden b/plutus-tx-plugin/test/IsData/9.6/fieldAccessor.pir.golden index e09cbc8f17f..511321ab5f0 100644 --- a/plutus-tx-plugin/test/IsData/9.6/fieldAccessor.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/fieldAccessor.pir.golden @@ -1,4 +1,4 @@ -let +(let !mkI : integer -> data = iData ~`$fToDataInteger_$ctoBuiltinData` : integer -> data = \(i : integer) -> let !i : integer = i in mkI i @@ -116,4 +116,4 @@ in let !nt : data = r in - x {integer} `$fToDataInteger` `$fUnsafeFromDataInteger` nt \ No newline at end of file + x {integer} `$fToDataInteger` `$fUnsafeFromDataInteger` nt) \ 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..65cf7d44dac 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..65cf7d44dac 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/matchAsData.pir.golden b/plutus-tx-plugin/test/IsData/9.6/matchAsData.pir.golden index 613a44ba630..ea88887f57d 100644 --- a/plutus-tx-plugin/test/IsData/9.6/matchAsData.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/matchAsData.pir.golden @@ -1,4 +1,4 @@ -let +(let ~defaultBody : data = (/\e -> error {e}) {data} data Unit | Unit_match where Unit : Unit @@ -153,4 +153,4 @@ in nt (\(void : unit) -> `$bFirstC` Unit) (\(void : unit) -> - Unit_match ((/\e -> error {e}) {Unit}) {data} defaultBody)) \ No newline at end of file + Unit_match ((/\e -> error {e}) {Unit}) {data} defaultBody))) \ 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..1cdebf0156d 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..65cf7d44dac 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..65cf7d44dac 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..65cf7d44dac 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..65cf7d44dac 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/recordAsData.pir.golden b/plutus-tx-plugin/test/IsData/9.6/recordAsData.pir.golden index 5647ccda5a4..10b40e0d95d 100644 --- a/plutus-tx-plugin/test/IsData/9.6/recordAsData.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/recordAsData.pir.golden @@ -1,4 +1,4 @@ -let +(let !mkI : integer -> data = iData ~`$fToDataInteger_$ctoBuiltinData` : integer -> data = \(i : integer) -> let !i : integer = i in mkI i @@ -40,4 +40,4 @@ let !unsafeDataAsI : data -> integer = unIData ~`$fUnsafeFromDataInteger` : (\a -> data -> a) integer = unsafeDataAsI in -`$bRecordConstructor` {integer} `$fToDataInteger` `$fUnsafeFromDataInteger` 1 2 \ No newline at end of file +`$bRecordConstructor` {integer} `$fToDataInteger` `$fUnsafeFromDataInteger` 1 2) \ 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..65cf7d44dac 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..65cf7d44dac 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..65cf7d44dac 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..65cf7d44dac 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/unsafeDeconstructData.pir.golden b/plutus-tx-plugin/test/IsData/9.6/unsafeDeconstructData.pir.golden index b2d0ddd432b..75ea1c68899 100644 --- a/plutus-tx-plugin/test/IsData/9.6/unsafeDeconstructData.pir.golden +++ b/plutus-tx-plugin/test/IsData/9.6/unsafeDeconstructData.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple2 :: * -> * -> *) a b | Tuple2_match where Tuple2 : a -> b -> Tuple2 a b data Bool | Bool_match where @@ -104,4 +104,4 @@ in let !ds : data = ds in - unsafeFromBuiltinData {Maybe (Tuple2 integer integer)} `$dUnsafeFromData` ds \ No newline at end of file + unsafeFromBuiltinData {Maybe (Tuple2 integer integer)} `$dUnsafeFromData` ds) \ 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..65cf7d44dac 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..65cf7d44dac 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..77757bf4f52 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 - 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 + 1.1.0 + (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..28a4aa3cbf7 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..1e6e580aa4a 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 - 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 + 1.1.0 + (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..dec49ee2e92 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 - 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 + 1.1.0 + (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..967b6254393 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,39 @@ (program - 1.1.0 - [ - [ - (force - (delay - (lam - `GHC.Tuple.Prim.Tuple2_i0` - (lam - `match_GHC.Tuple.Prim.Tuple2_i0` - [ - [ - [ - (force + 1.1.0 + (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 - (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 + (\`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 - (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 + (delay + (\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..28a4aa3cbf7 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..28a4aa3cbf7 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..28a4aa3cbf7 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..08524893341 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 - 1.1.0 - [ - [ + 1.1.0 + (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)))) - ] + (force (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 + (\`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 + (\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..426fb3a9b54 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 - 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 + 1.1.0 + (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..80a462ba3dd 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 - 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 + 1.1.0 + (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..57b61270a17 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 - 1.1.0 - [ - [ + 1.1.0 + (force (force - (force - [ - [ - (force - (delay - (lam - `GHC.Tuple.Prim.Tuple2_i0` - (lam - `match_GHC.Tuple.Prim.Tuple2_i0` - `GHC.Tuple.Prim.Tuple2_i2` - ) - ) - ) - ) - (delay - (delay - (lam arg_0_i0 (lam arg_1_i0 (constr 0 arg_0_i2 arg_1_i1))) - ) - ) - ] + (force (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 + (\`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 + (\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/matchAsData.pir.golden b/plutus-tx-plugin/test/Optimization/9.6/matchAsData.pir.golden index f81ada46cfa..3aef3cc2acd 100644 --- a/plutus-tx-plugin/test/Optimization/9.6/matchAsData.pir.golden +++ b/plutus-tx-plugin/test/Optimization/9.6/matchAsData.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data Bool | Bool_match where @@ -57,4 +57,4 @@ in (/\dead -> Unit_match (error {Unit}) {integer} (error {integer})) {all dead. dead})) - {all dead. dead}) \ No newline at end of file + {all dead. dead})) \ 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..a2a1d571df2 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 - 1.1.0 - (lam - ds_i0 - (lam - ds_i0 - (force + 1.1.0 + (\ds ds -> + 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 + [ (\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/Optimization/9.6/unsafeDeconstructData.pir.golden b/plutus-tx-plugin/test/Optimization/9.6/unsafeDeconstructData.pir.golden index 86b101ec447..2a3eb929e37 100644 --- a/plutus-tx-plugin/test/Optimization/9.6/unsafeDeconstructData.pir.golden +++ b/plutus-tx-plugin/test/Optimization/9.6/unsafeDeconstructData.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple2 :: * -> * -> *) a b | Tuple2_match where Tuple2 : a -> b -> Tuple2 a b data Bool | Bool_match where @@ -52,4 +52,4 @@ in (unIData (headList {data} (tailList {data} args)))) (/\dead -> traceError {Tuple2 integer integer} "PT1") {all dead. dead}) - ds \ No newline at end of file + ds) \ 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..8b14bda0fc2 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 - 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 - 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 + 1.1.0 + (let + ~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 + {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..3a4a6a9f2b0 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 - 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 + 1.1.0 + (let + ~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..b74688f5ade 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 - 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 + 1.1.0 + (let + !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/letFun.pir.golden b/plutus-tx-plugin/test/Plugin/Basic/9.6/letFun.pir.golden index bc35ea6a6bd..6ebbea7ea2d 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 - 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 + 1.1.0 + (let + 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..cd065c09dea 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 - 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 + 1.1.0 + (let + 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..7a14d3f0a05 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..2d274548973 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 - 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 + 1.1.0 + (\(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..a35c728fea2 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 - 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 + 1.1.0 + (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 + \(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..ecc99b873be 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 - 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 + 1.1.0 + (let + 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..a35c728fea2 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 - 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 + 1.1.0 + (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 + \(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..028e3942342 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 - 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 + 1.1.0 + (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 + \(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..d842cf27c12 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 - 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 + 1.1.0 + (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 + \(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..cfe3969b3e9 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..7a14d3f0a05 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..8eb59497900 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 - 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 + 1.1.0 + (let + 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..7a14d3f0a05 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..c68a9d32f5d 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 - 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 + 1.1.0 + (let + 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..7a14d3f0a05 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..59f5f84e44d 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..630ab6faf84 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 - 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 - 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 + 1.1.0 + (let + ~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 + {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..10237e38885 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 - 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 + 1.1.0 + (let + 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..9fe7e6b029b 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 - 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 - 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 + 1.1.0 + (let + ~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 + {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..109c8489e2b 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..109c8489e2b 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..def48ab58eb 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 - 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 + 1.1.0 + (let + 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..b7f833d1f12 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 - 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 + 1.1.0 + (let + 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..2bf8ed2c53d 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 - 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 - 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 + 1.1.0 + (let + ~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 + {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..7aff717cd35 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 - 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 + 1.1.0 + (let + 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..5b9d935ea35 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..22b84173e9b 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 - 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 + 1.1.0 + (let + 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..f86c7946010 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 - 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 + 1.1.0 + (let + 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..778c9301d3f 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 - 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 + 1.1.0 + (let + 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..28a4aa3cbf7 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..60c93251ac5 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 - 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 + 1.1.0 + (let + 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..7a14d3f0a05 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..7a14d3f0a05 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..7a14d3f0a05 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..28a4aa3cbf7 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..7a14d3f0a05 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..7a14d3f0a05 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..2176dbde5ec 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 - 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 + 1.1.0 + (let + 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..35a40bf20fa 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..892914c1af5 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 - 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 + 1.1.0 + (let + 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..00865884a9c 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..ca9fc2c65e8 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 - 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 + 1.1.0 + (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..f31d317bf13 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 - 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 + 1.1.0 + (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..4ecccad725a 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 - 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 + 1.1.0 + (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..5e296328b3e 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 - 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 - 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 + 1.1.0 + (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 + {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..6fd2d2c4280 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 - 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 + 1.1.0 + (let + 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..f7b9494d62b 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 - 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 + 1.1.0 + (let + 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..30eae5ff5dd 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,182 @@ (program - 1.1.0 - [ - (lam - fixBy_i0 - [ - (lam - fix3_i0 - [ - (lam - fix1_i0 - [ - [ - [ - (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 + 1.1.0 + ((\fixBy -> + (\fix3 -> + (\fix1 -> + force + (delay + (\Nil + Cons + List_match -> + force + (delay + (\EmptyRose + EmptyRose_match -> + (\g -> + (\f -> + (\tup -> + (\map -> + (\map -> + (\tup -> + (\go -> + (\g -> + (\f -> + (\go -> + (\g -> + (\f -> force go) + (f + (delay + (\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 + (force + (force fix3))))) + (delay + (\choose + go + g + f -> + choose + (\arg -> + delay + (\x -> + (\x -> + force + g (force - (force - (force - (force - fix3_i12 - ) - ) - ) - ) - ) - ) - (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 + (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 - (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 - [ - (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 + (force Nil)) + (\x + xs -> + delay + (force + Cons + (ds x) + (force + (map + (delay + (\x -> + x))) + ds + xs))))) + ds)))))) (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)) - ) - ) - ) - ) - ] - ) + (\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 + (\x -> + delay + (\case_Nil case_Cons -> case x [case_Nil, case_Cons])))) (delay - (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 + (\f -> + force (delay (\s -> s s)) + (\s -> f (\x -> force (delay (\s -> s s)) s x)))))) + (delay (delay - (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 - (delay - (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 (delay - (lam - fq_i0 - [ (force [ rec_i4 h_i3 ]) [ (force h_i3) fq_i1 ] ] - ) - ) - ] - ) - fr_i1 - ] - ) - ) - ) - ) - ] - ) - ) - ] -) \ No newline at end of file + (\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 + (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..77782e1bf58 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..15bfce8b739 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 - 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 + 1.1.0 + (\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..af43b19b59b 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 - 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 + 1.1.0 + (let + 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..0b70f08e89e 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..65cf7d44dac 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..bcc22bb17a7 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 - 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 + 1.1.0 + (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 + 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..084f9264b6d 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 - 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 + 1.1.0 + (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..a10a943aa94 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 - 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 + 1.1.0 + (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..9e7e38b9aa1 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 - 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 - 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 + 1.1.0 + (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 + {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..9732bfc1ade 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,88 @@ (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 + 1.1.0 + (let + 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..48268e2305e 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 - 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 + 1.1.0 + (let + 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..0dcc1c6a3b9 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 - 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 + 1.1.0 + (let + 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..cbcde0f990a 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 - 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 + 1.1.0 + (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 + ~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..3be18aca76d 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 - 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 + 1.1.0 + (let + 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..bab40472dd6 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 - 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 + 1.1.0 + (let + 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..49b476d9a4f 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,49 @@ (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 + 1.1.0 + (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 + 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..7b6de1bdf85 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,13 @@ (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 + 1.1.0 + (let + 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..20552215676 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,14 @@ (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 + 1.1.0 + (let + 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..560ff5997c5 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 - 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 + 1.1.0 + (let + 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..79acfd68ac7 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,69 @@ (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 - [ - [ - 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 + 1.1.0 + (let + 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 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..66c0ffd2559 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 - 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 + 1.1.0 + (let + 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..fb541bdab8c 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,77 @@ (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 + 1.1.0 + (let + 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..4706b21e020 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 - 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 + 1.1.0 + (let + 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..2f2afcc5f98 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,36 @@ (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 + 1.1.0 + (let + 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..2ed40a1ac44 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 - 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 + 1.1.0 + (let + 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..65cf7d44dac 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..ceac8a5d500 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 - 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 + 1.1.0 + (let + !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..02349dc2acf 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..5cb471c8005 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/Patterns/9.6/psym1.pir.golden b/plutus-tx-plugin/test/Plugin/Patterns/9.6/psym1.pir.golden index 35fdfeb099e..a68fdecb1b6 100644 --- a/plutus-tx-plugin/test/Plugin/Patterns/9.6/psym1.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Patterns/9.6/psym1.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Example :: * -> *) a | Example_match where EInt : integer -> Example a ETwo : a -> a -> Example a @@ -58,4 +58,4 @@ in {string} ds (\(s : string) -> 1) - (\(void : unit) -> 0)) \ No newline at end of file + (\(void : unit) -> 0))) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Patterns/9.6/psymRec.pir.golden b/plutus-tx-plugin/test/Plugin/Patterns/9.6/psymRec.pir.golden index 0e17322bb1b..714aa2717da 100644 --- a/plutus-tx-plugin/test/Plugin/Patterns/9.6/psymRec.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Patterns/9.6/psymRec.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Example :: * -> *) a | Example_match where EInt : integer -> Example a ETwo : a -> a -> Example a @@ -43,4 +43,4 @@ in {string} r (\(ds : string) (ds : string) -> ds) - (\(void : unit) -> "no") \ No newline at end of file + (\(void : unit) -> "no")) \ 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..4265c0ea999 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 - 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 + 1.1.0 + (let + 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..0b70f08e89e 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..e743750ca6c 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 - 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 + 1.1.0 + (let + 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..4fa2467d27d 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..75427ebddcf 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..af640661891 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..4cb5f8aab38 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..0fd76abe085 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 - 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 + 1.1.0 + (let + !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..ebfe523a71b 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 - 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 - 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) - (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 + 1.1.0 + (let + 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 + (\(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 + !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..4fa2467d27d 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..f8fa253a7d0 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 - 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 + 1.1.0 + (let + !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..65cf7d44dac 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..65cf7d44dac 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..e353de882a5 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 - 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 + 1.1.0 + (let + !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..29b3f374777 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 - 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 + 1.1.0 + (let + 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..28a4aa3cbf7 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..914f44f6330 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..7c5a2a8a778 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 - 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 + 1.1.0 + (let + 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..88e72fedd5b 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 - 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 + 1.1.0 + (let + !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..6ebbea7ea2d 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 - 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 + 1.1.0 + (let + 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..65cf7d44dac 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..f155d7b8954 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 - 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 + 1.1.0 + (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 + \(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..65cf7d44dac 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..cb6d6043bf0 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..62a0e1b89de 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 - 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 + 1.1.0 + (let + !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..d5ceaa2e931 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..abf29e9f5a7 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..31659dba535 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 - 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 + 1.1.0 + (let + 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..442a6164185 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 - 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 - 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 + 1.1.0 + (let + 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 + {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..a94157653eb 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 - 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 + 1.1.0 + (let + 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..79784ed5ccb 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 - 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 - 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 + 1.1.0 + (let + data (Tuple2 :: * -> * -> *) a b | Tuple2_match where + Tuple2 : a -> b -> Tuple2 a b + in + \(ds : Tuple2 integer integer) -> + Tuple2_match + {integer} + {integer} + ds + {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..12b3a60b43d 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 - 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 + 1.1.0 + (let + 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..ac3cb58966e 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 - 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 + 1.1.0 + (let + 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..c4166293dc7 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 - 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 + 1.1.0 + (let + !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..a4f472b50d5 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 - 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 + 1.1.0 + (let + !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..59a908cd52d 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 - 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 + 1.1.0 + (let + ~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/Strict/9.6/issue4645.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/issue4645.pir.golden index 93bceee4a57..d2759004373 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/issue4645.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/issue4645.pir.golden @@ -1,4 +1,4 @@ -let +(let data (Tuple2 :: * -> * -> *) a b | Tuple2_match where Tuple2 : a -> b -> Tuple2 a b data Bool | Bool_match where @@ -19,4 +19,4 @@ Tuple2_match let !t : integer = trace {integer} "t" zz in - ifThenElse {Bool} (equalsInteger (trace {integer} "x" 0) t) True False) \ No newline at end of file + ifThenElse {Bool} (equalsInteger (trace {integer} "x" 0) t) True False)) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAdd.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAdd.pir.golden index 8bfaee814a3..6aa15f7908f 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAdd.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAdd.pir.golden @@ -1 +1 @@ -\(x : integer) (y : integer) -> addInteger x y \ No newline at end of file +(\(x : integer) (y : integer) -> addInteger x y) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend.pir.golden index d39f0a87841..c916cb7e630 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend.pir.golden @@ -1 +1 @@ -\(x : bytestring) (y : bytestring) -> appendByteString x y \ No newline at end of file +(\(x : bytestring) (y : bytestring) -> appendByteString x y) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend2.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend2.pir.golden index 4b2f6f9db25..e54a4aa348e 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend2.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppend2.pir.golden @@ -1 +1 @@ -\(ds : bytestring) (ds : bytestring) -> appendByteString ds ds \ No newline at end of file +(\(ds : bytestring) (ds : bytestring) -> appendByteString ds ds) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppendString.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppendString.pir.golden index 19965f015af..01d0c470600 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppendString.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictAppendString.pir.golden @@ -1 +1 @@ -\(x : string) (y : string) -> appendString x y \ No newline at end of file +(\(x : string) (y : string) -> appendString x y) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictData.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictData.pir.golden index 98c8f4bb61c..dfacad8171c 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictData.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictData.pir.golden @@ -1 +1 @@ -\(d : data) -> unIData d \ No newline at end of file +(\(d : data) -> unIData d) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictITE.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictITE.pir.golden index 4b1fdeb4cfb..3d463c07802 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictITE.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictITE.pir.golden @@ -1 +1 @@ -\(x : bool) (y : integer) (z : integer) -> ifThenElse {integer} x y z \ No newline at end of file +(\(x : bool) (y : integer) (z : integer) -> ifThenElse {integer} x y z) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictList.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictList.pir.golden index ed1e7dff0c4..7720097e7c7 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictList.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictList.pir.golden @@ -1 +1 @@ -\(p : list integer) -> headList {integer} p \ No newline at end of file +(\(p : list integer) -> headList {integer} p) \ No newline at end of file diff --git a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictPair.pir.golden b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictPair.pir.golden index 4e017c622e9..cc0f28d03ef 100644 --- a/plutus-tx-plugin/test/Plugin/Strict/9.6/strictPair.pir.golden +++ b/plutus-tx-plugin/test/Plugin/Strict/9.6/strictPair.pir.golden @@ -1 +1 @@ -\(p : pair integer integer) -> fstPair {integer} {integer} p \ No newline at end of file +(\(p : pair integer integer) -> fstPair {integer} {integer} p) \ 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..24072175474 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 - 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 - ] - `$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 - 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 + 1.1.0 + (let + !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` + ~compare : all a. Ord a -> a -> a -> Ordering + = /\a -> + \(v : Ord a) -> + Ord_match + {a} + v + {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..fd74538a2a3 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 - 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 + 1.1.0 + (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..4bb95495489 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,37 @@ (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) } - `$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 + 1.1.0 + (let + 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` + 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..416a6ef67cf 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 - 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 - 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))) - 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 - 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 - 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 - 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))) - 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 - 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 + 1.1.0 + (let + ~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 + {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 + {f} + v + {(\(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 + {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 + {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 + {t} + v + {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..f9230965297 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 - 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 + 1.1.0 + (let + 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..34afdb40141 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 - 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 + 1.1.0 + (let + 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..d8853e37cd3 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 - 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 - 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 - 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` ] - `$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 - 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 - 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 - 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 - 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))) - 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 - 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 + 1.1.0 + (let + 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 + {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 + {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<*>` + 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 + ~`$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 + {(\(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 + {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 + {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 + {t} + v + {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..406bdb82481 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 - 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 + 1.1.0 + (let + ~`$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..24de8a26e64 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 - 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 - `$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 + 1.1.0 + (let + 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` + (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..02aeaecac3b 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 - 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 - 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 - 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 + 1.1.0 + (let + ~`$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 + {(\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 + {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..207fe41a7f2 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 - 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 + 1.1.0 + (let + 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.pir.golden b/plutus-tx-plugin/test/Strictness/9.6/lambda-default.pir.golden index 5023b7c54eb..316b5230818 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/lambda-default.pir.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/lambda-default.pir.golden @@ -1 +1 @@ -\(n : integer) (m : integer) -> addInteger n m \ No newline at end of file +(\(n : integer) (m : integer) -> addInteger n m) \ 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.pir.golden b/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.pir.golden index 5023b7c54eb..316b5230818 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.pir.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/lambda-nonstrict.pir.golden @@ -1 +1 @@ -\(n : integer) (m : integer) -> addInteger n m \ No newline at end of file +(\(n : integer) (m : integer) -> 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.pir.golden b/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.pir.golden index 5023b7c54eb..316b5230818 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.pir.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/lambda-strict.pir.golden @@ -1 +1 @@ -\(n : integer) (m : integer) -> addInteger n m \ No newline at end of file +(\(n : integer) (m : integer) -> 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.pir.golden b/plutus-tx-plugin/test/Strictness/9.6/let-default.pir.golden index 0b153475ff1..4fb1a4ee812 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/let-default.pir.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/let-default.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data Bool | Bool_match where @@ -14,4 +14,4 @@ in (lessThanInteger m 0) (/\dead -> addInteger (n {integer}) (n {integer})) (/\dead -> m) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ 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.pir.golden b/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.pir.golden index 0b153475ff1..4fb1a4ee812 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.pir.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/let-nonstrict.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data Bool | Bool_match where @@ -14,4 +14,4 @@ in (lessThanInteger m 0) (/\dead -> addInteger (n {integer}) (n {integer})) (/\dead -> m) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ 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.pir.golden b/plutus-tx-plugin/test/Strictness/9.6/let-strict.pir.golden index 0b153475ff1..4fb1a4ee812 100644 --- a/plutus-tx-plugin/test/Strictness/9.6/let-strict.pir.golden +++ b/plutus-tx-plugin/test/Strictness/9.6/let-strict.pir.golden @@ -1,4 +1,4 @@ -let +(let data Unit | Unit_match where Unit : Unit data Bool | Bool_match where @@ -14,4 +14,4 @@ in (lessThanInteger m 0) (/\dead -> addInteger (n {integer}) (n {integer})) (/\dead -> m) - {all dead. dead} \ No newline at end of file + {all dead. dead}) \ 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