From b75f69fd731b7c9631cd7e3080e284135f36c6d6 Mon Sep 17 00:00:00 2001 From: Yura Lazarev Date: Mon, 6 Jul 2026 16:03:06 +0200 Subject: [PATCH] fix: beta reduction let-binds a non-trivial argument (#167) betaReduce rewrote App (Abs (ParamNamed x) body) r by substituting r into every occurrence of x, ignoring the shape of r and the occurrence count. In a strict language that duplicates work: (\x -> ... x ... x ...) (g y) became ... (g y) ... (g y) ..., so g y ran once per occurrence. The inliner puts lambdas into call-head position (used-once bindings, @inline always), so the better the inliner gets, the more such redexes this rule sees. Apply GHC's rule, mirroring inlineLocalBinding: substitute only when the argument is trivial (Ref / literal / @inline-always) or the parameter is used at most once; otherwise rewrite the redex to `let x = r in body` and leave the inline-or-not decision to inlineLocalBindings. The guard is deliberately the mirror of inlineLocalBinding's, so the Let produced here is exactly the one inlineLocalBindings then declines to inline and the rewrite converges in one bottom-up pass. The zero-occurrence discard is unchanged (<= 1 covers it). Tests (IR/Optimizer/Spec.hs, via optimizedExpression): the regression case (non-trivial argument used twice) is red before this change -- it optimised to Eq (g 1) (g 1) -- and green after (let x = g 1 in Eq x x). Three pins guard the substitute path: a trivial ref used twice, a non-trivial argument used once, and a non-trivial argument never used. Structural goldens move toward sharing repeatedly-used non-trivial subexpressions through a local binding instead of pasting them at each use site; the hand-verified eval/golden.txt oracles are unchanged. --- .../PureScript/Backend/IR/Optimizer.hs | 34 +- .../PureScript/Backend/IR/Optimizer/Spec.hs | 31 + .../ps/output/Golden.Annotations.M2/golden.ir | 37 +- .../output/Golden.Annotations.M2/golden.lua | 24 +- .../output/Golden.ArrayOfUnits.Test/golden.ir | 130 +++-- .../Golden.ArrayOfUnits.Test/golden.lua | 31 +- .../Golden.GenericEqTwoTypes.Test/golden.ir | 4 +- .../Golden.GenericEqTwoTypes.Test/golden.lua | 4 +- test/ps/output/Golden.Issue37.Test/golden.ir | 24 +- test/ps/output/Golden.Issue37.Test/golden.lua | 18 +- .../Golden.LongApplyChain.Test/golden.ir | 68 +-- .../Golden.LongApplyChain.Test/golden.lua | 40 +- .../Golden.LongBindFlipped.Test/golden.ir | 48 +- .../Golden.LongBindFlipped.Test/golden.lua | 24 +- .../Golden.LongEitherBind.Test/golden.ir | 124 ++-- .../Golden.LongEitherBind.Test/golden.lua | 86 +-- .../Golden.LongExceptBind.Test/golden.ir | 201 ++++--- .../Golden.LongExceptBind.Test/golden.lua | 91 +-- .../Golden.LongMaybeBind.Test/golden.ir | 104 ++-- .../Golden.LongMaybeBind.Test/golden.lua | 76 +-- .../Golden.LongReaderBind.Test/golden.ir | 367 +++++++----- .../Golden.LongReaderBind.Test/golden.lua | 101 ++-- .../Golden.LongStackBind.Test/golden.ir | 132 ++--- .../Golden.LongStackBind.Test/golden.lua | 92 +-- .../Golden.LongStateBind.Test/golden.ir | 201 ++++--- .../Golden.LongStateBind.Test/golden.lua | 71 +-- .../Golden.LongWriterBind.Test/golden.ir | 543 +++++++++++------- .../Golden.LongWriterBind.Test/golden.lua | 110 ++-- .../output/Golden.MaybeChain.Test/golden.ir | 14 +- .../output/Golden.MaybeChain.Test/golden.lua | 10 +- .../Golden.StringCodePoints.Test/golden.ir | 50 +- .../Golden.StringCodePoints.Test/golden.lua | 34 +- .../Golden.TailRecM2Shadow.Test/golden.ir | 192 ++++--- .../Golden.TailRecM2Shadow.Test/golden.lua | 87 +-- 34 files changed, 1742 insertions(+), 1461 deletions(-) diff --git a/lib/Language/PureScript/Backend/IR/Optimizer.hs b/lib/Language/PureScript/Backend/IR/Optimizer.hs index 722a3b6f..17bf89d1 100644 --- a/lib/Language/PureScript/Backend/IR/Optimizer.hs +++ b/lib/Language/PureScript/Backend/IR/Optimizer.hs @@ -39,6 +39,7 @@ import Language.PureScript.Backend.IR.Types , countFreeRefs , getAnn , isNonRecursiveLiteral + , lets , literalBool , rewriteExpBottomUpM , substituteCopyM @@ -395,14 +396,36 @@ reduceObjectProp = fromMaybe (ObjectProp ann obj prop) (List.lookup prop (toList patches)) _ → Nothing +{- Note [Beta reduction and local inlining share an inlining guard] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +'betaReduce' and 'inlineLocalBinding' decide whether to paste an expression +into its use sites by the same test: paste only when re-evaluating it cannot +multiply work — the expression is trivial ('isInlinableExpr': a Ref, a +literal, or an @inline-always node) or it is used at most once. Otherwise the +expression stays behind a single 'Let' binding. + +The two rules must agree, because they hand work to each other. When +'betaReduce' declines to substitute a redex it rewrites it to +@let param = arg in body@ rather than duplicating @arg@ (in a strict language +that would repeat @arg@'s evaluation at every occurrence). That 'Let' is then +visited by 'inlineLocalBinding', which faces the identical choice for the same +expression. Because the guards match, it declines too, so the pair reaches a +fixpoint in one bottom-up pass instead of oscillating. +-} + -- (λx. M) N ===> M[x := N] -- See Note [IR is assumed well-typed] betaReduce ∷ RewriteRuleM SupplyM Ann betaReduce = \case - App _ (Abs _ (ParamNamed _ param) body) r → - -- The λ is consumed by the rewrite, so the first inserted occurrence - -- of the argument may keep its binder names ('substituteMoveM'). - Just <$> substituteMoveM (Local param) r body + App _ (Abs _ (ParamNamed paramAnn param) body) r + -- See Note [Beta reduction and local inlining share an inlining guard] + | isInlinableExpr r || countFreeRef (Local param) body <= 1 → + -- The λ is consumed by the rewrite, so the first inserted occurrence + -- of the argument may keep its binder names ('substituteMoveM'). + Just <$> substituteMoveM (Local param) r body + | otherwise → + -- Bind the argument once; its evaluation now happens a single time. + pure . Just $ lets (Standalone (paramAnn, param, r) :| []) body _ → pure Nothing {- Note [Eta reduction is unsound] @@ -518,7 +541,8 @@ inlineLocalBinding grouping (body, inlined) = Standalone (_ann, Local → name, inlinee) | occurrences > 0 , countFreeRef name inlinee == 0 -- no self-reference, see above - , isInlinableExpr inlinee || occurrences == 1 → + , -- See Note [Beta reduction and local inlining share an inlining guard] + isInlinableExpr inlinee || occurrences == 1 → -- The binding survives until DCE drops it, so the inserted copy -- must not reuse its binder names ('substituteCopyM'). (,Rewritten) <$> substituteCopyM name inlinee body diff --git a/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs b/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs index 8e8e4952..dda155d1 100644 --- a/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs +++ b/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs @@ -107,6 +107,37 @@ spec = describe "IR Optimizer" do original = abstraction (paramNamed param) (application m (refLocal param)) optimizedExpression original === original + -- Beta reduction must not paste a non-trivial argument into every + -- occurrence of the parameter, repeating its work at each use site in a + -- strict language; it let-binds the argument instead. + -- See Note [Beta reduction and local inlining share an inlining guard] + describe "beta reduction does not duplicate work (#167)" do + let m = moduleNameFromString "M" + x = Name "x" + -- An application: evaluating it twice would repeat the work. + nonTrivial = application (refImported m (Name "g")) (literalInt 1) + + it "let-binds a non-trivial argument used more than once" do + let body = eq (refLocal x) (refLocal x) + original = application (abstraction (paramNamed x) body) nonTrivial + optimizedExpression original `shouldBe` let1 x nonTrivial body + + it "still substitutes a trivial reference used more than once" do + let g = refImported m (Name "g") + body = eq (refLocal x) (refLocal x) + original = application (abstraction (paramNamed x) body) g + optimizedExpression original `shouldBe` eq g g + + it "substitutes a non-trivial argument used exactly once" do + let original = + application (abstraction (paramNamed x) (refLocal x)) nonTrivial + optimizedExpression original `shouldBe` nonTrivial + + it "discards a non-trivial argument that is never used" do + let original = + application (abstraction (paramNamed x) (literalInt 7)) nonTrivial + optimizedExpression original `shouldBe` literalInt 7 + describe "folds record-literal projections" do let foo = PropName "foo" bar = PropName "bar" diff --git a/test/ps/output/Golden.Annotations.M2/golden.ir b/test/ps/output/Golden.Annotations.M2/golden.ir index 1b384881..b982ab48 100644 --- a/test/ps/output/Golden.Annotations.M2/golden.ir +++ b/test/ps/output/Golden.Annotations.M2/golden.ir @@ -11,42 +11,27 @@ UberModule [ ( Name "inlineIntoMe", Abs Nothing ( ParamNamed Nothing ( Name "i$0" ) ) - ( IfThenElse Nothing - ( Eq Nothing - ( LiteralInt Nothing 1 ) - ( IfThenElse Nothing - ( Eq Nothing - ( LiteralInt Nothing 1 ) - ( IfThenElse Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "v$2", Let Nothing + ( Standalone + ( Nothing, Name "v$4", IfThenElse Nothing ( Eq Nothing ( LiteralInt Nothing 1 ) ( Ref Nothing ( Local ( Name "i$0" ) ) ) ) ( LiteralInt Nothing 2 ) ( Ref Nothing ( Local ( Name "i$0" ) ) ) - ) + ) :| [] ) - ( LiteralInt Nothing 2 ) ( IfThenElse Nothing - ( Eq Nothing ( LiteralInt Nothing 1 ) ( Ref Nothing ( Local ( Name "i$0" ) ) ) ) + ( Eq Nothing ( LiteralInt Nothing 1 ) ( Ref Nothing ( Local ( Name "v$4" ) ) ) ) ( LiteralInt Nothing 2 ) - ( Ref Nothing ( Local ( Name "i$0" ) ) ) + ( Ref Nothing ( Local ( Name "v$4" ) ) ) ) - ) + ) :| [] ) - ( LiteralInt Nothing 2 ) ( IfThenElse Nothing - ( Eq Nothing - ( LiteralInt Nothing 1 ) - ( IfThenElse Nothing - ( Eq Nothing ( LiteralInt Nothing 1 ) ( Ref Nothing ( Local ( Name "i$0" ) ) ) ) - ( LiteralInt Nothing 2 ) - ( Ref Nothing ( Local ( Name "i$0" ) ) ) - ) - ) + ( Eq Nothing ( LiteralInt Nothing 1 ) ( Ref Nothing ( Local ( Name "v$2" ) ) ) ) ( LiteralInt Nothing 2 ) - ( IfThenElse Nothing - ( Eq Nothing ( LiteralInt Nothing 1 ) ( Ref Nothing ( Local ( Name "i$0" ) ) ) ) - ( LiteralInt Nothing 2 ) - ( Ref Nothing ( Local ( Name "i$0" ) ) ) - ) + ( Ref Nothing ( Local ( Name "v$2" ) ) ) ) ) ), diff --git a/test/ps/output/Golden.Annotations.M2/golden.lua b/test/ps/output/Golden.Annotations.M2/golden.lua index 4f8d9c7b..694ec158 100644 --- a/test/ps/output/Golden.Annotations.M2/golden.lua +++ b/test/ps/output/Golden.Annotations.M2/golden.lua @@ -12,25 +12,13 @@ M.Golden_Annotations_M1_foreign = (function() end)() return { inlineIntoMe = function(i_S_0) - if 1 == (function() - if 1 == (function() + local v_S_2 = (function() + local v_S_4 = (function() if 1 == i_S_0 then return 2 else return i_S_0 end - end)() then - return 2 - else - if 1 == i_S_0 then return 2 else return i_S_0 end - end - end)() then - return 2 - else - if 1 == (function() - if 1 == i_S_0 then return 2 else return i_S_0 end - end)() then - return 2 - else - if 1 == i_S_0 then return 2 else return i_S_0 end - end - end + end)() + if 1 == v_S_4 then return 2 else return v_S_4 end + end)() + if 1 == v_S_2 then return 2 else return v_S_2 end end, inlineIntoMe2 = M.Golden_Annotations_M1_foreign.dontInlineClosure(M.Golden_Annotations_M1_foreign.inlineMeLambda(M.Golden_Annotations_M1_foreign.inlineMeLambda(17))) } diff --git a/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir b/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir index b92ed2de..77852666 100644 --- a/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir +++ b/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir @@ -78,7 +78,7 @@ UberModule ( PropName "foldMap", Abs Nothing ( ParamNamed Nothing ( Name "dictMonoid" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "f$885" ) ) + ( ParamNamed Nothing ( Name "f$884" ) ) ( App Nothing ( App Nothing ( App Nothing @@ -88,9 +88,9 @@ UberModule ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x$886" ) ) + ( ParamNamed Nothing ( Name "x$885" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "acc$887" ) ) + ( ParamNamed Nothing ( Name "acc$886" ) ) ( App Nothing ( App Nothing ( ObjectProp Nothing @@ -106,11 +106,11 @@ UberModule ( PropName "append" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$885" ) ) ) - ( Ref Nothing ( Local ( Name "x$886" ) ) ) + ( Ref Nothing ( Local ( Name "f$884" ) ) ) + ( Ref Nothing ( Local ( Name "x$885" ) ) ) ) ) - ( Ref Nothing ( Local ( Name "acc$887" ) ) ) + ( Ref Nothing ( Local ( Name "acc$886" ) ) ) ) ) ) @@ -370,84 +370,82 @@ UberModule ) ( Abs Nothing ( ParamNamed Nothing ( Name "x$907" ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "b$895" ) ) - ( App Nothing - ( App Nothing - ( App Nothing + ( App Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "dictApply$892", App Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Effect" ) + ( Name "applicativeEffect" ) + ) + ) + ( PropName "Apply0" ) + ) ( Ref Nothing - ( Imported ( ModuleName "Control.Apply" ) ( Name "apply" ) ) + ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) :| [] + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "a$893" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "b$894" ) ) ( App Nothing - ( ObjectProp Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Effect" ) - ( Name "applicativeEffect" ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Apply" ) ( Name "apply" ) ) ) + ( Ref Nothing ( Local ( Name "dictApply$892" ) ) ) ) - ( PropName "Apply0" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) - ) - ) - ) - ( App Nothing - ( App Nothing - ( ObjectProp Nothing ( App Nothing - ( ObjectProp Nothing - ( App Nothing - ( ObjectProp Nothing + ( App Nothing + ( ObjectProp Nothing + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictApply$892" ) ) ) + ( PropName "Functor0" ) + ) ( Ref Nothing ( Imported - ( ModuleName "Effect" ) - ( Name "applicativeEffect" ) + ( ModuleName "Prim" ) + ( Name "undefined" ) ) ) - ( PropName "Apply0" ) ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) + ( PropName "map" ) + ) + ( Abs Nothing ( ParamUnused Nothing ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "x$901" ) ) + ( Ref Nothing ( Local ( Name "x$901" ) ) ) ) ) - ( PropName "Functor0" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) - ) - ( PropName "map" ) - ) - ( Abs Nothing ( ParamUnused Nothing ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "x$902" ) ) - ( Ref Nothing ( Local ( Name "x$902" ) ) ) + ( Ref Nothing ( Local ( Name "a$893" ) ) ) ) ) + ( Ref Nothing ( Local ( Name "b$894" ) ) ) ) - ( App Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Effect.Console" ) - ( Name "logShow" ) - ) - ) - ( LiteralObject Nothing - [ - ( PropName "show", Abs Nothing ( ParamUnused Nothing ) - ( LiteralString Nothing "unit" ) - ) - ] - ) + ) + ) + ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Effect.Console" ) ( Name "logShow" ) ) + ) + ( LiteralObject Nothing + [ + ( PropName "show", Abs Nothing ( ParamUnused Nothing ) + ( LiteralString Nothing "unit" ) ) - ( Ref Nothing ( Local ( Name "x$907" ) ) ) - ) + ] ) ) - ( Ref Nothing ( Local ( Name "b$895" ) ) ) + ( Ref Nothing ( Local ( Name "x$907" ) ) ) ) ) ) @@ -498,7 +496,7 @@ UberModule ( PropName "foldl" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "c$372$882" ) ) + ( ParamNamed Nothing ( Name "c$372$881" ) ) ( Abs Nothing ( ParamUnused Nothing ) ( App Nothing ( App Nothing @@ -515,7 +513,7 @@ UberModule ( PropName "one" ) ) ) - ( Ref Nothing ( Local ( Name "c$372$882" ) ) ) + ( Ref Nothing ( Local ( Name "c$372$881" ) ) ) ) ) ) diff --git a/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua b/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua index e013c43b..70950708 100644 --- a/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua +++ b/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua @@ -64,10 +64,10 @@ M.Data_Foldable_foldableArray = { foldr = M.Data_Foldable_foreign.foldrArray, foldl = M.Data_Foldable_foreign.foldlArray, foldMap = function(dictMonoid) - return function(f_S_885) - return M.Data_Foldable_foldr(M.Data_Foldable_foldableArray)(function( x_S_886 ) - return function(acc_S_887) - return (dictMonoid.Semigroup0()).append(f_S_885(x_S_886))(acc_S_887) + return function(f_S_884) + return M.Data_Foldable_foldr(M.Data_Foldable_foldableArray)(function( x_S_885 ) + return function(acc_S_886) + return (dictMonoid.Semigroup0()).append(f_S_884(x_S_885))(acc_S_886) end end)(dictMonoid.mempty) end @@ -124,19 +124,24 @@ return (function() } return function() local _ = M.Data_Foldable_foldr(M.Data_Foldable_foldableArray)(function( x_S_907 ) - return function(b_S_895) - return M.Control_Apply_apply(M.Effect_applicativeEffect.Apply0())(((M.Effect_applicativeEffect.Apply0()).Functor0()).map(function( ) - return function(x_S_902) return x_S_902 end - end)(M.Effect_Console_logShow({ - show = function() return "unit" end - })(x_S_907)))(b_S_895) - end + return (function() + local dictApply_S_892 = M.Effect_applicativeEffect.Apply0() + return function(a_S_893) + return function(b_S_894) + return M.Control_Apply_apply(dictApply_S_892)((dictApply_S_892.Functor0()).map(function( ) + return function(x_S_901) return x_S_901 end + end)(a_S_893))(b_S_894) + end + end + end)()(M.Effect_Console_logShow({ + show = function() return "unit" end + })(x_S_907)) end)(M.Control_Applicative_pure(M.Effect_applicativeEffect)(M.Data_Unit_foreign.unit))(arr_S_0)() return M.Effect_Console_logShow({ show = function(n) return tostring(n) end - })(M.Data_Foldable_foldableArray.foldl(function(c_S_372_S_882) + })(M.Data_Foldable_foldableArray.foldl(function(c_S_372_S_881) return function() - return M.Data_Semiring_semiringInt.add(M.Data_Semiring_semiringInt.one)(c_S_372_S_882) + return M.Data_Semiring_semiringInt.add(M.Data_Semiring_semiringInt.one)(c_S_372_S_881) end end)(M.Data_Semiring_semiringInt.zero)(arr_S_0))() end diff --git a/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.ir b/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.ir index f6c01e8e..330438e5 100644 --- a/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.ir +++ b/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.ir @@ -605,13 +605,13 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.GenericEqTwoTypes.Test", qnameName = Name "eqRec" }, Abs Nothing - ( ParamNamed Nothing ( Name "dictEqRecord$195" ) ) + ( ParamNamed Nothing ( Name "dictEqRecord$193" ) ) ( LiteralObject Nothing [ ( PropName "eq", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Eq" ) ( Name "eqRecord" ) ) ) - ( Ref Nothing ( Local ( Name "dictEqRecord$195" ) ) ) + ( Ref Nothing ( Local ( Name "dictEqRecord$193" ) ) ) ) ( Ref Nothing ( Imported ( ModuleName "Type.Proxy" ) ( Name "Proxy" ) ) ) ) diff --git a/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.lua b/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.lua index 281b9a23..fb8a88da 100644 --- a/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.lua +++ b/test/ps/output/Golden.GenericEqTwoTypes.Test/golden.lua @@ -171,8 +171,8 @@ M.Golden_GenericEqTwoTypes_Test_genericEqSum = function(dictGenericEq1_S_5) end } end -M.Golden_GenericEqTwoTypes_Test_eqRec = function(dictEqRecord_S_195) - return { eq = M.Data_Eq_eqRecord(dictEqRecord_S_195)(M.Type_Proxy_Proxy) } +M.Golden_GenericEqTwoTypes_Test_eqRec = function(dictEqRecord_S_193) + return { eq = M.Data_Eq_eqRecord(dictEqRecord_S_193)(M.Type_Proxy_Proxy) } end M.Golden_GenericEqTwoTypes_Test_eqRowCons = M.Data_Eq_eqRowCons({ eqRecord = function() diff --git a/test/ps/output/Golden.Issue37.Test/golden.ir b/test/ps/output/Golden.Issue37.Test/golden.ir index f72b20bd..770e8d3b 100644 --- a/test/ps/output/Golden.Issue37.Test/golden.ir +++ b/test/ps/output/Golden.Issue37.Test/golden.ir @@ -215,10 +215,10 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.Issue37.Test", qnameName = Name "discard" }, Abs Nothing - ( ParamNamed Nothing ( Name "dictBind$17$182" ) ) + ( ParamNamed Nothing ( Name "dictBind$17$186" ) ) ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) - ( Ref Nothing ( Local ( Name "dictBind$17$182" ) ) ) + ( Ref Nothing ( Local ( Name "dictBind$17$186" ) ) ) ) ) ], uberModuleForeigns = [], uberModuleExports = @@ -271,7 +271,7 @@ UberModule [ App Nothing ( Let Nothing ( Standalone - ( Nothing, Name "Bind1$184", App Nothing + ( Nothing, Name "Bind1$183", App Nothing ( ObjectProp Nothing ( Ref Nothing ( Imported ( ModuleName "Effect" ) ( Name "monadEffect" ) ) @@ -283,19 +283,19 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "discard1$185", App Nothing + ( Nothing, Name "discard1$184", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.Issue37.Test" ) ( Name "discard" ) ) ) - ( Ref Nothing ( Local ( Name "Bind1$184" ) ) ) + ( Ref Nothing ( Local ( Name "Bind1$183" ) ) ) ) ] ) ( Abs Nothing - ( ParamNamed Nothing ( Name "fn1$186" ) ) + ( ParamNamed Nothing ( Name "fn1$185" ) ) ( App Nothing ( App Nothing ( App Nothing @@ -317,22 +317,22 @@ UberModule ) ) ) - ( Ref Nothing ( Local ( Name "fn1$186" ) ) ) + ( Ref Nothing ( Local ( Name "fn1$185" ) ) ) ) ( Abs Nothing ( ParamUnused Nothing ) ( App Nothing ( App Nothing - ( Ref Nothing ( Local ( Name "discard1$185" ) ) ) - ( Ref Nothing ( Local ( Name "fn1$186" ) ) ) + ( Ref Nothing ( Local ( Name "discard1$184" ) ) ) + ( Ref Nothing ( Local ( Name "fn1$185" ) ) ) ) ( Abs Nothing ( ParamUnused Nothing ) ( App Nothing ( App Nothing - ( Ref Nothing ( Local ( Name "discard1$185" ) ) ) - ( Ref Nothing ( Local ( Name "fn1$186" ) ) ) + ( Ref Nothing ( Local ( Name "discard1$184" ) ) ) + ( Ref Nothing ( Local ( Name "fn1$185" ) ) ) ) ( Abs Nothing ( ParamUnused Nothing ) - ( Ref Nothing ( Local ( Name "fn1$186" ) ) ) + ( Ref Nothing ( Local ( Name "fn1$185" ) ) ) ) ) ) diff --git a/test/ps/output/Golden.Issue37.Test/golden.lua b/test/ps/output/Golden.Issue37.Test/golden.lua index 66d268e6..c1cb1129 100644 --- a/test/ps/output/Golden.Issue37.Test/golden.lua +++ b/test/ps/output/Golden.Issue37.Test/golden.lua @@ -64,8 +64,8 @@ M.Effect_Lazy_applyEffect = PSLUA_runtime_lazy("applyEffect")(function() Functor0 = function() return M.Effect_Lazy_functorEffect(0) end } end) -M.Golden_Issue37_Test_discard = function(dictBind_S_17_S_182) - return M.Control_Bind_bind(dictBind_S_17_S_182) +M.Golden_Issue37_Test_discard = function(dictBind_S_17_S_186) + return M.Control_Bind_bind(dictBind_S_17_S_186) end return { baz = (function() @@ -75,13 +75,13 @@ return { return M.Golden_Issue37_Test_discard(Bind1_S_1)(f_S_6)(function() return M.Control_Bind_bind(Bind1_S_1)(pure_S_4({ [1] = (function() - local Bind1_S_184 = M.Effect_monadEffect.Bind1() - local discard1_S_185 = M.Golden_Issue37_Test_discard(Bind1_S_184) - return function(fn1_S_186) - return M.Control_Bind_bind(M.Effect_monadEffect.Bind1())(fn1_S_186)(function( ) - return discard1_S_185(fn1_S_186)(function() - return discard1_S_185(fn1_S_186)(function() - return fn1_S_186 + local Bind1_S_183 = M.Effect_monadEffect.Bind1() + local discard1_S_184 = M.Golden_Issue37_Test_discard(Bind1_S_183) + return function(fn1_S_185) + return M.Control_Bind_bind(M.Effect_monadEffect.Bind1())(fn1_S_185)(function( ) + return discard1_S_184(fn1_S_185)(function() + return discard1_S_184(fn1_S_185)(function() + return fn1_S_185 end) end) end) diff --git a/test/ps/output/Golden.LongApplyChain.Test/golden.ir b/test/ps/output/Golden.LongApplyChain.Test/golden.ir index 1406e315..4aad5761 100644 --- a/test/ps/output/Golden.LongApplyChain.Test/golden.ir +++ b/test/ps/output/Golden.LongApplyChain.Test/golden.ir @@ -133,8 +133,8 @@ UberModule ) ( Abs Nothing ( ParamUnused Nothing ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x$284" ) ) - ( Ref Nothing ( Local ( Name "x$284" ) ) ) + ( ParamNamed Nothing ( Name "x$281" ) ) + ( Ref Nothing ( Local ( Name "x$281" ) ) ) ) ) ) @@ -149,7 +149,7 @@ UberModule { qnameModuleName = ModuleName "Golden.LongApplyChain.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$tmp289", App Nothing + ( Nothing, Name "$tmp288", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -495,7 +495,7 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$tmp290", App Nothing + ( Nothing, Name "$tmp289", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -651,7 +651,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp289" ) + ( Name "$tmp288" ) ) ) ( App Nothing @@ -847,7 +847,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp291", App Nothing + ( Nothing, Name "$tmp290", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -1003,7 +1003,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp290" ) + ( Name "$tmp289" ) ) ) ( App Nothing @@ -1199,7 +1199,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp292", App Nothing + ( Nothing, Name "$tmp291", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -1355,7 +1355,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp291" ) + ( Name "$tmp290" ) ) ) ( App Nothing @@ -1551,7 +1551,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp293", App Nothing + ( Nothing, Name "$tmp292", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -1707,7 +1707,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp292" ) + ( Name "$tmp291" ) ) ) ( App Nothing @@ -1903,7 +1903,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp294", App Nothing + ( Nothing, Name "$tmp293", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -2059,7 +2059,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp293" ) + ( Name "$tmp292" ) ) ) ( App Nothing @@ -2255,7 +2255,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp295", App Nothing + ( Nothing, Name "$tmp294", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -2411,7 +2411,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp294" ) + ( Name "$tmp293" ) ) ) ( App Nothing @@ -2607,7 +2607,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp296", App Nothing + ( Nothing, Name "$tmp295", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -2763,7 +2763,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp295" ) + ( Name "$tmp294" ) ) ) ( App Nothing @@ -2959,7 +2959,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp297", App Nothing + ( Nothing, Name "$tmp296", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -3115,7 +3115,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp296" ) + ( Name "$tmp295" ) ) ) ( App Nothing @@ -3311,7 +3311,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp298", App Nothing + ( Nothing, Name "$tmp297", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -3467,7 +3467,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp297" ) + ( Name "$tmp296" ) ) ) ( App Nothing @@ -3663,7 +3663,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp299", App Nothing + ( Nothing, Name "$tmp298", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -3819,7 +3819,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp298" ) + ( Name "$tmp297" ) ) ) ( App Nothing @@ -4015,7 +4015,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp300", App Nothing + ( Nothing, Name "$tmp299", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -4171,7 +4171,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp299" ) + ( Name "$tmp298" ) ) ) ( App Nothing @@ -4367,7 +4367,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp301", App Nothing + ( Nothing, Name "$tmp300", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -4523,7 +4523,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp300" ) + ( Name "$tmp299" ) ) ) ( App Nothing @@ -4719,7 +4719,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp302", App Nothing + ( Nothing, Name "$tmp301", App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond" ) ) ) @@ -4875,7 +4875,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp301" ) + ( Name "$tmp300" ) ) ) ( App Nothing @@ -5222,7 +5222,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$tmp302" ) + ( Name "$tmp301" ) ) ) ( App Nothing @@ -5432,11 +5432,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$20$280" ) ) + ( ParamNamed Nothing ( Name "v$20$287" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$20$280" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$20$287" ) ) ) ) ) ( App Nothing ( App Nothing @@ -5474,7 +5474,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$20$280" ) ) ) + ( Ref Nothing ( Local ( Name "v$20$287" ) ) ) ( PropName "value0" ) ) ) @@ -5485,7 +5485,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$20$280" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$20$287" ) ) ) ) ) ( LiteralString Nothing "Nothing" ) ( Exception Nothing "No patterns matched" ) diff --git a/test/ps/output/Golden.LongApplyChain.Test/golden.lua b/test/ps/output/Golden.LongApplyChain.Test/golden.lua index f91729a1..a7f8c613 100644 --- a/test/ps/output/Golden.LongApplyChain.Test/golden.lua +++ b/test/ps/output/Golden.LongApplyChain.Test/golden.lua @@ -38,35 +38,35 @@ M.Data_Maybe_applyMaybe = { M.Golden_LongApplyChain_Test_applySecond = function(a_S_131) return function(b_S_132) return M.Data_Maybe_applyMaybe.apply(M.Data_Functor_map(M.Data_Maybe_applyMaybe.Functor0())(function( ) - return function(x_S_284) return x_S_284 end + return function(x_S_281) return x_S_281 end end)(a_S_131))(b_S_132) end end M.Golden_LongApplyChain_Test_compute = (function() - local _S_tmp289 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Data_Maybe_Just(1))(M.Data_Maybe_Just(2)))(M.Data_Maybe_Just(3)))(M.Data_Maybe_Just(4)))(M.Data_Maybe_Just(5)))(M.Data_Maybe_Just(6)))(M.Data_Maybe_Just(7)))(M.Data_Maybe_Just(8)))(M.Data_Maybe_Just(9)))(M.Data_Maybe_Just(10)))(M.Data_Maybe_Just(11)))(M.Data_Maybe_Just(12)))(M.Data_Maybe_Just(13)))(M.Data_Maybe_Just(14)))(M.Data_Maybe_Just(15)))(M.Data_Maybe_Just(16)))(M.Data_Maybe_Just(17)))(M.Data_Maybe_Just(18)))(M.Data_Maybe_Just(19)))(M.Data_Maybe_Just(20))) - local _S_tmp290 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp289(M.Data_Maybe_Just(21)))(M.Data_Maybe_Just(22)))(M.Data_Maybe_Just(23)))(M.Data_Maybe_Just(24)))(M.Data_Maybe_Just(25)))(M.Data_Maybe_Just(26)))(M.Data_Maybe_Just(27)))(M.Data_Maybe_Just(28)))(M.Data_Maybe_Just(29)))(M.Data_Maybe_Just(30)))(M.Data_Maybe_Just(31)))(M.Data_Maybe_Just(32)))(M.Data_Maybe_Just(33)))(M.Data_Maybe_Just(34)))(M.Data_Maybe_Just(35)))(M.Data_Maybe_Just(36)))(M.Data_Maybe_Just(37)))(M.Data_Maybe_Just(38)))(M.Data_Maybe_Just(39)))(M.Data_Maybe_Just(40))) - local _S_tmp291 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp290(M.Data_Maybe_Just(41)))(M.Data_Maybe_Just(42)))(M.Data_Maybe_Just(43)))(M.Data_Maybe_Just(44)))(M.Data_Maybe_Just(45)))(M.Data_Maybe_Just(46)))(M.Data_Maybe_Just(47)))(M.Data_Maybe_Just(48)))(M.Data_Maybe_Just(49)))(M.Data_Maybe_Just(50)))(M.Data_Maybe_Just(51)))(M.Data_Maybe_Just(52)))(M.Data_Maybe_Just(53)))(M.Data_Maybe_Just(54)))(M.Data_Maybe_Just(55)))(M.Data_Maybe_Just(56)))(M.Data_Maybe_Just(57)))(M.Data_Maybe_Just(58)))(M.Data_Maybe_Just(59)))(M.Data_Maybe_Just(60))) - local _S_tmp292 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp291(M.Data_Maybe_Just(61)))(M.Data_Maybe_Just(62)))(M.Data_Maybe_Just(63)))(M.Data_Maybe_Just(64)))(M.Data_Maybe_Just(65)))(M.Data_Maybe_Just(66)))(M.Data_Maybe_Just(67)))(M.Data_Maybe_Just(68)))(M.Data_Maybe_Just(69)))(M.Data_Maybe_Just(70)))(M.Data_Maybe_Just(71)))(M.Data_Maybe_Just(72)))(M.Data_Maybe_Just(73)))(M.Data_Maybe_Just(74)))(M.Data_Maybe_Just(75)))(M.Data_Maybe_Just(76)))(M.Data_Maybe_Just(77)))(M.Data_Maybe_Just(78)))(M.Data_Maybe_Just(79)))(M.Data_Maybe_Just(80))) - local _S_tmp293 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp292(M.Data_Maybe_Just(81)))(M.Data_Maybe_Just(82)))(M.Data_Maybe_Just(83)))(M.Data_Maybe_Just(84)))(M.Data_Maybe_Just(85)))(M.Data_Maybe_Just(86)))(M.Data_Maybe_Just(87)))(M.Data_Maybe_Just(88)))(M.Data_Maybe_Just(89)))(M.Data_Maybe_Just(90)))(M.Data_Maybe_Just(91)))(M.Data_Maybe_Just(92)))(M.Data_Maybe_Just(93)))(M.Data_Maybe_Just(94)))(M.Data_Maybe_Just(95)))(M.Data_Maybe_Just(96)))(M.Data_Maybe_Just(97)))(M.Data_Maybe_Just(98)))(M.Data_Maybe_Just(99)))(M.Data_Maybe_Just(100))) - local _S_tmp294 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp293(M.Data_Maybe_Just(101)))(M.Data_Maybe_Just(102)))(M.Data_Maybe_Just(103)))(M.Data_Maybe_Just(104)))(M.Data_Maybe_Just(105)))(M.Data_Maybe_Just(106)))(M.Data_Maybe_Just(107)))(M.Data_Maybe_Just(108)))(M.Data_Maybe_Just(109)))(M.Data_Maybe_Just(110)))(M.Data_Maybe_Just(111)))(M.Data_Maybe_Just(112)))(M.Data_Maybe_Just(113)))(M.Data_Maybe_Just(114)))(M.Data_Maybe_Just(115)))(M.Data_Maybe_Just(116)))(M.Data_Maybe_Just(117)))(M.Data_Maybe_Just(118)))(M.Data_Maybe_Just(119)))(M.Data_Maybe_Just(120))) - local _S_tmp295 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp294(M.Data_Maybe_Just(121)))(M.Data_Maybe_Just(122)))(M.Data_Maybe_Just(123)))(M.Data_Maybe_Just(124)))(M.Data_Maybe_Just(125)))(M.Data_Maybe_Just(126)))(M.Data_Maybe_Just(127)))(M.Data_Maybe_Just(128)))(M.Data_Maybe_Just(129)))(M.Data_Maybe_Just(130)))(M.Data_Maybe_Just(131)))(M.Data_Maybe_Just(132)))(M.Data_Maybe_Just(133)))(M.Data_Maybe_Just(134)))(M.Data_Maybe_Just(135)))(M.Data_Maybe_Just(136)))(M.Data_Maybe_Just(137)))(M.Data_Maybe_Just(138)))(M.Data_Maybe_Just(139)))(M.Data_Maybe_Just(140))) - local _S_tmp296 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp295(M.Data_Maybe_Just(141)))(M.Data_Maybe_Just(142)))(M.Data_Maybe_Just(143)))(M.Data_Maybe_Just(144)))(M.Data_Maybe_Just(145)))(M.Data_Maybe_Just(146)))(M.Data_Maybe_Just(147)))(M.Data_Maybe_Just(148)))(M.Data_Maybe_Just(149)))(M.Data_Maybe_Just(150)))(M.Data_Maybe_Just(151)))(M.Data_Maybe_Just(152)))(M.Data_Maybe_Just(153)))(M.Data_Maybe_Just(154)))(M.Data_Maybe_Just(155)))(M.Data_Maybe_Just(156)))(M.Data_Maybe_Just(157)))(M.Data_Maybe_Just(158)))(M.Data_Maybe_Just(159)))(M.Data_Maybe_Just(160))) - local _S_tmp297 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp296(M.Data_Maybe_Just(161)))(M.Data_Maybe_Just(162)))(M.Data_Maybe_Just(163)))(M.Data_Maybe_Just(164)))(M.Data_Maybe_Just(165)))(M.Data_Maybe_Just(166)))(M.Data_Maybe_Just(167)))(M.Data_Maybe_Just(168)))(M.Data_Maybe_Just(169)))(M.Data_Maybe_Just(170)))(M.Data_Maybe_Just(171)))(M.Data_Maybe_Just(172)))(M.Data_Maybe_Just(173)))(M.Data_Maybe_Just(174)))(M.Data_Maybe_Just(175)))(M.Data_Maybe_Just(176)))(M.Data_Maybe_Just(177)))(M.Data_Maybe_Just(178)))(M.Data_Maybe_Just(179)))(M.Data_Maybe_Just(180))) - local _S_tmp298 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp297(M.Data_Maybe_Just(181)))(M.Data_Maybe_Just(182)))(M.Data_Maybe_Just(183)))(M.Data_Maybe_Just(184)))(M.Data_Maybe_Just(185)))(M.Data_Maybe_Just(186)))(M.Data_Maybe_Just(187)))(M.Data_Maybe_Just(188)))(M.Data_Maybe_Just(189)))(M.Data_Maybe_Just(190)))(M.Data_Maybe_Just(191)))(M.Data_Maybe_Just(192)))(M.Data_Maybe_Just(193)))(M.Data_Maybe_Just(194)))(M.Data_Maybe_Just(195)))(M.Data_Maybe_Just(196)))(M.Data_Maybe_Just(197)))(M.Data_Maybe_Just(198)))(M.Data_Maybe_Just(199)))(M.Data_Maybe_Just(200))) - local _S_tmp299 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp298(M.Data_Maybe_Just(201)))(M.Data_Maybe_Just(202)))(M.Data_Maybe_Just(203)))(M.Data_Maybe_Just(204)))(M.Data_Maybe_Just(205)))(M.Data_Maybe_Just(206)))(M.Data_Maybe_Just(207)))(M.Data_Maybe_Just(208)))(M.Data_Maybe_Just(209)))(M.Data_Maybe_Just(210)))(M.Data_Maybe_Just(211)))(M.Data_Maybe_Just(212)))(M.Data_Maybe_Just(213)))(M.Data_Maybe_Just(214)))(M.Data_Maybe_Just(215)))(M.Data_Maybe_Just(216)))(M.Data_Maybe_Just(217)))(M.Data_Maybe_Just(218)))(M.Data_Maybe_Just(219)))(M.Data_Maybe_Just(220))) - local _S_tmp300 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp299(M.Data_Maybe_Just(221)))(M.Data_Maybe_Just(222)))(M.Data_Maybe_Just(223)))(M.Data_Maybe_Just(224)))(M.Data_Maybe_Just(225)))(M.Data_Maybe_Just(226)))(M.Data_Maybe_Just(227)))(M.Data_Maybe_Just(228)))(M.Data_Maybe_Just(229)))(M.Data_Maybe_Just(230)))(M.Data_Maybe_Just(231)))(M.Data_Maybe_Just(232)))(M.Data_Maybe_Just(233)))(M.Data_Maybe_Just(234)))(M.Data_Maybe_Just(235)))(M.Data_Maybe_Just(236)))(M.Data_Maybe_Just(237)))(M.Data_Maybe_Just(238)))(M.Data_Maybe_Just(239)))(M.Data_Maybe_Just(240))) - local _S_tmp301 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp300(M.Data_Maybe_Just(241)))(M.Data_Maybe_Just(242)))(M.Data_Maybe_Just(243)))(M.Data_Maybe_Just(244)))(M.Data_Maybe_Just(245)))(M.Data_Maybe_Just(246)))(M.Data_Maybe_Just(247)))(M.Data_Maybe_Just(248)))(M.Data_Maybe_Just(249)))(M.Data_Maybe_Just(250)))(M.Data_Maybe_Just(251)))(M.Data_Maybe_Just(252)))(M.Data_Maybe_Just(253)))(M.Data_Maybe_Just(254)))(M.Data_Maybe_Just(255)))(M.Data_Maybe_Just(256)))(M.Data_Maybe_Just(257)))(M.Data_Maybe_Just(258)))(M.Data_Maybe_Just(259)))(M.Data_Maybe_Just(260))) - local _S_tmp302 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp301(M.Data_Maybe_Just(261)))(M.Data_Maybe_Just(262)))(M.Data_Maybe_Just(263)))(M.Data_Maybe_Just(264)))(M.Data_Maybe_Just(265)))(M.Data_Maybe_Just(266)))(M.Data_Maybe_Just(267)))(M.Data_Maybe_Just(268)))(M.Data_Maybe_Just(269)))(M.Data_Maybe_Just(270)))(M.Data_Maybe_Just(271)))(M.Data_Maybe_Just(272)))(M.Data_Maybe_Just(273)))(M.Data_Maybe_Just(274)))(M.Data_Maybe_Just(275)))(M.Data_Maybe_Just(276)))(M.Data_Maybe_Just(277)))(M.Data_Maybe_Just(278)))(M.Data_Maybe_Just(279)))(M.Data_Maybe_Just(280))) - return M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp302(M.Data_Maybe_Just(281)))(M.Data_Maybe_Just(282)))(M.Data_Maybe_Just(283)))(M.Data_Maybe_Just(284)))(M.Data_Maybe_Just(285)))(M.Data_Maybe_Just(286)))(M.Data_Maybe_Just(287)))(M.Data_Maybe_Just(288)))(M.Data_Maybe_Just(289)))(M.Data_Maybe_Just(290)))(M.Data_Maybe_Just(291)))(M.Data_Maybe_Just(292)))(M.Data_Maybe_Just(293)))(M.Data_Maybe_Just(294)))(M.Data_Maybe_Just(295)))(M.Data_Maybe_Just(296)))(M.Data_Maybe_Just(297)))(M.Data_Maybe_Just(298)))(M.Data_Maybe_Just(299)))(M.Data_Maybe_Just(300)) + local _S_tmp288 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Data_Maybe_Just(1))(M.Data_Maybe_Just(2)))(M.Data_Maybe_Just(3)))(M.Data_Maybe_Just(4)))(M.Data_Maybe_Just(5)))(M.Data_Maybe_Just(6)))(M.Data_Maybe_Just(7)))(M.Data_Maybe_Just(8)))(M.Data_Maybe_Just(9)))(M.Data_Maybe_Just(10)))(M.Data_Maybe_Just(11)))(M.Data_Maybe_Just(12)))(M.Data_Maybe_Just(13)))(M.Data_Maybe_Just(14)))(M.Data_Maybe_Just(15)))(M.Data_Maybe_Just(16)))(M.Data_Maybe_Just(17)))(M.Data_Maybe_Just(18)))(M.Data_Maybe_Just(19)))(M.Data_Maybe_Just(20))) + local _S_tmp289 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp288(M.Data_Maybe_Just(21)))(M.Data_Maybe_Just(22)))(M.Data_Maybe_Just(23)))(M.Data_Maybe_Just(24)))(M.Data_Maybe_Just(25)))(M.Data_Maybe_Just(26)))(M.Data_Maybe_Just(27)))(M.Data_Maybe_Just(28)))(M.Data_Maybe_Just(29)))(M.Data_Maybe_Just(30)))(M.Data_Maybe_Just(31)))(M.Data_Maybe_Just(32)))(M.Data_Maybe_Just(33)))(M.Data_Maybe_Just(34)))(M.Data_Maybe_Just(35)))(M.Data_Maybe_Just(36)))(M.Data_Maybe_Just(37)))(M.Data_Maybe_Just(38)))(M.Data_Maybe_Just(39)))(M.Data_Maybe_Just(40))) + local _S_tmp290 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp289(M.Data_Maybe_Just(41)))(M.Data_Maybe_Just(42)))(M.Data_Maybe_Just(43)))(M.Data_Maybe_Just(44)))(M.Data_Maybe_Just(45)))(M.Data_Maybe_Just(46)))(M.Data_Maybe_Just(47)))(M.Data_Maybe_Just(48)))(M.Data_Maybe_Just(49)))(M.Data_Maybe_Just(50)))(M.Data_Maybe_Just(51)))(M.Data_Maybe_Just(52)))(M.Data_Maybe_Just(53)))(M.Data_Maybe_Just(54)))(M.Data_Maybe_Just(55)))(M.Data_Maybe_Just(56)))(M.Data_Maybe_Just(57)))(M.Data_Maybe_Just(58)))(M.Data_Maybe_Just(59)))(M.Data_Maybe_Just(60))) + local _S_tmp291 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp290(M.Data_Maybe_Just(61)))(M.Data_Maybe_Just(62)))(M.Data_Maybe_Just(63)))(M.Data_Maybe_Just(64)))(M.Data_Maybe_Just(65)))(M.Data_Maybe_Just(66)))(M.Data_Maybe_Just(67)))(M.Data_Maybe_Just(68)))(M.Data_Maybe_Just(69)))(M.Data_Maybe_Just(70)))(M.Data_Maybe_Just(71)))(M.Data_Maybe_Just(72)))(M.Data_Maybe_Just(73)))(M.Data_Maybe_Just(74)))(M.Data_Maybe_Just(75)))(M.Data_Maybe_Just(76)))(M.Data_Maybe_Just(77)))(M.Data_Maybe_Just(78)))(M.Data_Maybe_Just(79)))(M.Data_Maybe_Just(80))) + local _S_tmp292 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp291(M.Data_Maybe_Just(81)))(M.Data_Maybe_Just(82)))(M.Data_Maybe_Just(83)))(M.Data_Maybe_Just(84)))(M.Data_Maybe_Just(85)))(M.Data_Maybe_Just(86)))(M.Data_Maybe_Just(87)))(M.Data_Maybe_Just(88)))(M.Data_Maybe_Just(89)))(M.Data_Maybe_Just(90)))(M.Data_Maybe_Just(91)))(M.Data_Maybe_Just(92)))(M.Data_Maybe_Just(93)))(M.Data_Maybe_Just(94)))(M.Data_Maybe_Just(95)))(M.Data_Maybe_Just(96)))(M.Data_Maybe_Just(97)))(M.Data_Maybe_Just(98)))(M.Data_Maybe_Just(99)))(M.Data_Maybe_Just(100))) + local _S_tmp293 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp292(M.Data_Maybe_Just(101)))(M.Data_Maybe_Just(102)))(M.Data_Maybe_Just(103)))(M.Data_Maybe_Just(104)))(M.Data_Maybe_Just(105)))(M.Data_Maybe_Just(106)))(M.Data_Maybe_Just(107)))(M.Data_Maybe_Just(108)))(M.Data_Maybe_Just(109)))(M.Data_Maybe_Just(110)))(M.Data_Maybe_Just(111)))(M.Data_Maybe_Just(112)))(M.Data_Maybe_Just(113)))(M.Data_Maybe_Just(114)))(M.Data_Maybe_Just(115)))(M.Data_Maybe_Just(116)))(M.Data_Maybe_Just(117)))(M.Data_Maybe_Just(118)))(M.Data_Maybe_Just(119)))(M.Data_Maybe_Just(120))) + local _S_tmp294 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp293(M.Data_Maybe_Just(121)))(M.Data_Maybe_Just(122)))(M.Data_Maybe_Just(123)))(M.Data_Maybe_Just(124)))(M.Data_Maybe_Just(125)))(M.Data_Maybe_Just(126)))(M.Data_Maybe_Just(127)))(M.Data_Maybe_Just(128)))(M.Data_Maybe_Just(129)))(M.Data_Maybe_Just(130)))(M.Data_Maybe_Just(131)))(M.Data_Maybe_Just(132)))(M.Data_Maybe_Just(133)))(M.Data_Maybe_Just(134)))(M.Data_Maybe_Just(135)))(M.Data_Maybe_Just(136)))(M.Data_Maybe_Just(137)))(M.Data_Maybe_Just(138)))(M.Data_Maybe_Just(139)))(M.Data_Maybe_Just(140))) + local _S_tmp295 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp294(M.Data_Maybe_Just(141)))(M.Data_Maybe_Just(142)))(M.Data_Maybe_Just(143)))(M.Data_Maybe_Just(144)))(M.Data_Maybe_Just(145)))(M.Data_Maybe_Just(146)))(M.Data_Maybe_Just(147)))(M.Data_Maybe_Just(148)))(M.Data_Maybe_Just(149)))(M.Data_Maybe_Just(150)))(M.Data_Maybe_Just(151)))(M.Data_Maybe_Just(152)))(M.Data_Maybe_Just(153)))(M.Data_Maybe_Just(154)))(M.Data_Maybe_Just(155)))(M.Data_Maybe_Just(156)))(M.Data_Maybe_Just(157)))(M.Data_Maybe_Just(158)))(M.Data_Maybe_Just(159)))(M.Data_Maybe_Just(160))) + local _S_tmp296 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp295(M.Data_Maybe_Just(161)))(M.Data_Maybe_Just(162)))(M.Data_Maybe_Just(163)))(M.Data_Maybe_Just(164)))(M.Data_Maybe_Just(165)))(M.Data_Maybe_Just(166)))(M.Data_Maybe_Just(167)))(M.Data_Maybe_Just(168)))(M.Data_Maybe_Just(169)))(M.Data_Maybe_Just(170)))(M.Data_Maybe_Just(171)))(M.Data_Maybe_Just(172)))(M.Data_Maybe_Just(173)))(M.Data_Maybe_Just(174)))(M.Data_Maybe_Just(175)))(M.Data_Maybe_Just(176)))(M.Data_Maybe_Just(177)))(M.Data_Maybe_Just(178)))(M.Data_Maybe_Just(179)))(M.Data_Maybe_Just(180))) + local _S_tmp297 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp296(M.Data_Maybe_Just(181)))(M.Data_Maybe_Just(182)))(M.Data_Maybe_Just(183)))(M.Data_Maybe_Just(184)))(M.Data_Maybe_Just(185)))(M.Data_Maybe_Just(186)))(M.Data_Maybe_Just(187)))(M.Data_Maybe_Just(188)))(M.Data_Maybe_Just(189)))(M.Data_Maybe_Just(190)))(M.Data_Maybe_Just(191)))(M.Data_Maybe_Just(192)))(M.Data_Maybe_Just(193)))(M.Data_Maybe_Just(194)))(M.Data_Maybe_Just(195)))(M.Data_Maybe_Just(196)))(M.Data_Maybe_Just(197)))(M.Data_Maybe_Just(198)))(M.Data_Maybe_Just(199)))(M.Data_Maybe_Just(200))) + local _S_tmp298 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp297(M.Data_Maybe_Just(201)))(M.Data_Maybe_Just(202)))(M.Data_Maybe_Just(203)))(M.Data_Maybe_Just(204)))(M.Data_Maybe_Just(205)))(M.Data_Maybe_Just(206)))(M.Data_Maybe_Just(207)))(M.Data_Maybe_Just(208)))(M.Data_Maybe_Just(209)))(M.Data_Maybe_Just(210)))(M.Data_Maybe_Just(211)))(M.Data_Maybe_Just(212)))(M.Data_Maybe_Just(213)))(M.Data_Maybe_Just(214)))(M.Data_Maybe_Just(215)))(M.Data_Maybe_Just(216)))(M.Data_Maybe_Just(217)))(M.Data_Maybe_Just(218)))(M.Data_Maybe_Just(219)))(M.Data_Maybe_Just(220))) + local _S_tmp299 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp298(M.Data_Maybe_Just(221)))(M.Data_Maybe_Just(222)))(M.Data_Maybe_Just(223)))(M.Data_Maybe_Just(224)))(M.Data_Maybe_Just(225)))(M.Data_Maybe_Just(226)))(M.Data_Maybe_Just(227)))(M.Data_Maybe_Just(228)))(M.Data_Maybe_Just(229)))(M.Data_Maybe_Just(230)))(M.Data_Maybe_Just(231)))(M.Data_Maybe_Just(232)))(M.Data_Maybe_Just(233)))(M.Data_Maybe_Just(234)))(M.Data_Maybe_Just(235)))(M.Data_Maybe_Just(236)))(M.Data_Maybe_Just(237)))(M.Data_Maybe_Just(238)))(M.Data_Maybe_Just(239)))(M.Data_Maybe_Just(240))) + local _S_tmp300 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp299(M.Data_Maybe_Just(241)))(M.Data_Maybe_Just(242)))(M.Data_Maybe_Just(243)))(M.Data_Maybe_Just(244)))(M.Data_Maybe_Just(245)))(M.Data_Maybe_Just(246)))(M.Data_Maybe_Just(247)))(M.Data_Maybe_Just(248)))(M.Data_Maybe_Just(249)))(M.Data_Maybe_Just(250)))(M.Data_Maybe_Just(251)))(M.Data_Maybe_Just(252)))(M.Data_Maybe_Just(253)))(M.Data_Maybe_Just(254)))(M.Data_Maybe_Just(255)))(M.Data_Maybe_Just(256)))(M.Data_Maybe_Just(257)))(M.Data_Maybe_Just(258)))(M.Data_Maybe_Just(259)))(M.Data_Maybe_Just(260))) + local _S_tmp301 = M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp300(M.Data_Maybe_Just(261)))(M.Data_Maybe_Just(262)))(M.Data_Maybe_Just(263)))(M.Data_Maybe_Just(264)))(M.Data_Maybe_Just(265)))(M.Data_Maybe_Just(266)))(M.Data_Maybe_Just(267)))(M.Data_Maybe_Just(268)))(M.Data_Maybe_Just(269)))(M.Data_Maybe_Just(270)))(M.Data_Maybe_Just(271)))(M.Data_Maybe_Just(272)))(M.Data_Maybe_Just(273)))(M.Data_Maybe_Just(274)))(M.Data_Maybe_Just(275)))(M.Data_Maybe_Just(276)))(M.Data_Maybe_Just(277)))(M.Data_Maybe_Just(278)))(M.Data_Maybe_Just(279)))(M.Data_Maybe_Just(280))) + return M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(M.Golden_LongApplyChain_Test_applySecond(_S_tmp301(M.Data_Maybe_Just(281)))(M.Data_Maybe_Just(282)))(M.Data_Maybe_Just(283)))(M.Data_Maybe_Just(284)))(M.Data_Maybe_Just(285)))(M.Data_Maybe_Just(286)))(M.Data_Maybe_Just(287)))(M.Data_Maybe_Just(288)))(M.Data_Maybe_Just(289)))(M.Data_Maybe_Just(290)))(M.Data_Maybe_Just(291)))(M.Data_Maybe_Just(292)))(M.Data_Maybe_Just(293)))(M.Data_Maybe_Just(294)))(M.Data_Maybe_Just(295)))(M.Data_Maybe_Just(296)))(M.Data_Maybe_Just(297)))(M.Data_Maybe_Just(298)))(M.Data_Maybe_Just(299)))(M.Data_Maybe_Just(300)) end)() return (function(s) return function() print(s) end end)(M.Data_Show_show({ - show = function(v_S_20_S_280) - if "Data.Maybe∷Maybe.Just" == v_S_20_S_280["$ctor"] then + show = function(v_S_20_S_287) + if "Data.Maybe∷Maybe.Just" == v_S_20_S_287["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Just ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = function(n) return tostring(n) end - })(v_S_20_S_280.value0))(")")) + })(v_S_20_S_287.value0))(")")) else - if "Data.Maybe∷Maybe.Nothing" == v_S_20_S_280["$ctor"] then + if "Data.Maybe∷Maybe.Nothing" == v_S_20_S_287["$ctor"] then return "Nothing" else return error("No patterns matched") diff --git a/test/ps/output/Golden.LongBindFlipped.Test/golden.ir b/test/ps/output/Golden.LongBindFlipped.Test/golden.ir index 775b5f27..f4c8f99d 100644 --- a/test/ps/output/Golden.LongBindFlipped.Test/golden.ir +++ b/test/ps/output/Golden.LongBindFlipped.Test/golden.ir @@ -23,25 +23,25 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongBindFlipped.Test", qnameName = Name "bindFlipped" }, Abs Nothing - ( ParamNamed Nothing ( Name "b$135$278" ) ) + ( ParamNamed Nothing ( Name "b$135$275" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "a$136$279" ) ) + ( ParamNamed Nothing ( Name "a$136$276" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$136$279" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$136$276" ) ) ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "b$135$278" ) ) ) + ( Ref Nothing ( Local ( Name "b$135$275" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "a$136$279" ) ) ) + ( Ref Nothing ( Local ( Name "a$136$276" ) ) ) ( PropName "value0" ) ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$136$279" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$136$276" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -78,7 +78,7 @@ UberModule { qnameModuleName = ModuleName "Golden.LongBindFlipped.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$tmp284", App Nothing + ( Nothing, Name "$tmp283", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -682,7 +682,7 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$tmp285", App Nothing + ( Nothing, Name "$tmp284", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -1260,7 +1260,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp284" ) + ( Name "$tmp283" ) ) ) ) @@ -1303,7 +1303,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp286", App Nothing + ( Nothing, Name "$tmp285", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -1881,7 +1881,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp285" ) + ( Name "$tmp284" ) ) ) ) @@ -1924,7 +1924,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp287", App Nothing + ( Nothing, Name "$tmp286", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -2502,7 +2502,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp286" ) + ( Name "$tmp285" ) ) ) ) @@ -2545,7 +2545,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp288", App Nothing + ( Nothing, Name "$tmp287", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -3123,7 +3123,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp287" ) + ( Name "$tmp286" ) ) ) ) @@ -3166,7 +3166,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp289", App Nothing + ( Nothing, Name "$tmp288", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -3744,7 +3744,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp288" ) + ( Name "$tmp287" ) ) ) ) @@ -3787,7 +3787,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$tmp290", App Nothing + ( Nothing, Name "$tmp289", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped" ) ) @@ -4365,7 +4365,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp289" ) + ( Name "$tmp288" ) ) ) ) @@ -4687,7 +4687,7 @@ UberModule ) ) ) - ( Ref Nothing ( Local ( Name "$tmp290" ) ) ) + ( Ref Nothing ( Local ( Name "$tmp289" ) ) ) ) ) ) @@ -4732,11 +4732,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$16$271" ) ) + ( ParamNamed Nothing ( Name "v$16$282" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$271" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$282" ) ) ) ) ) ( App Nothing ( App Nothing @@ -4774,7 +4774,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$16$271" ) ) ) + ( Ref Nothing ( Local ( Name "v$16$282" ) ) ) ( PropName "value0" ) ) ) @@ -4785,7 +4785,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$271" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$282" ) ) ) ) ) ( LiteralString Nothing "Nothing" ) ( Exception Nothing "No patterns matched" ) diff --git a/test/ps/output/Golden.LongBindFlipped.Test/golden.lua b/test/ps/output/Golden.LongBindFlipped.Test/golden.lua index 052c17a2..2614ca2a 100644 --- a/test/ps/output/Golden.LongBindFlipped.Test/golden.lua +++ b/test/ps/output/Golden.LongBindFlipped.Test/golden.lua @@ -6,12 +6,12 @@ M.Data_Show_show = function(dict) return dict.show end M.Data_Maybe_Just = function(value0) return { ["$ctor"] = "Data.Maybe∷Maybe.Just", value0 = value0 } end -M.Golden_LongBindFlipped_Test_bindFlipped = function(b_S_135_S_278) - return function(a_S_136_S_279) - if "Data.Maybe∷Maybe.Just" == a_S_136_S_279["$ctor"] then - return b_S_135_S_278(a_S_136_S_279.value0) +M.Golden_LongBindFlipped_Test_bindFlipped = function(b_S_135_S_275) + return function(a_S_136_S_276) + if "Data.Maybe∷Maybe.Just" == a_S_136_S_276["$ctor"] then + return b_S_135_S_275(a_S_136_S_276.value0) else - if "Data.Maybe∷Maybe.Nothing" == a_S_136_S_279["$ctor"] then + if "Data.Maybe∷Maybe.Nothing" == a_S_136_S_276["$ctor"] then return { ["$ctor"] = "Data.Maybe∷Maybe.Nothing" } else return error("No patterns matched") @@ -23,23 +23,23 @@ M.Golden_LongBindFlipped_Test_inc = function(x) return M.Data_Maybe_Just((function(x) return function(y) return x + y end end)(x)(1)) end M.Golden_LongBindFlipped_Test_compute = (function() - local _S_tmp284 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Data_Maybe_Just(1)))))))))))))))))))))))))))))))))))))))) + local _S_tmp283 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Data_Maybe_Just(1)))))))))))))))))))))))))))))))))))))))) + local _S_tmp284 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp283)))))))))))))))))))))))))))))))))))))))) local _S_tmp285 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp284)))))))))))))))))))))))))))))))))))))))) local _S_tmp286 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp285)))))))))))))))))))))))))))))))))))))))) local _S_tmp287 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp286)))))))))))))))))))))))))))))))))))))))) local _S_tmp288 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp287)))))))))))))))))))))))))))))))))))))))) local _S_tmp289 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp288)))))))))))))))))))))))))))))))))))))))) - local _S_tmp290 = M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp289)))))))))))))))))))))))))))))))))))))))) - return M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp290))))))))))))))))))))) + return M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(M.Golden_LongBindFlipped_Test_bindFlipped(M.Golden_LongBindFlipped_Test_inc)(_S_tmp289))))))))))))))))))))) end)() return (function(s) return function() print(s) end end)(M.Data_Show_show({ - show = function(v_S_16_S_271) - if "Data.Maybe∷Maybe.Just" == v_S_16_S_271["$ctor"] then + show = function(v_S_16_S_282) + if "Data.Maybe∷Maybe.Just" == v_S_16_S_282["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Just ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = function(n) return tostring(n) end - })(v_S_16_S_271.value0))(")")) + })(v_S_16_S_282.value0))(")")) else - if "Data.Maybe∷Maybe.Nothing" == v_S_16_S_271["$ctor"] then + if "Data.Maybe∷Maybe.Nothing" == v_S_16_S_282["$ctor"] then return "Nothing" else return error("No patterns matched") diff --git a/test/ps/output/Golden.LongEitherBind.Test/golden.ir b/test/ps/output/Golden.LongEitherBind.Test/golden.ir index 93a4cd24..51c4823c 100644 --- a/test/ps/output/Golden.LongEitherBind.Test/golden.ir +++ b/test/ps/output/Golden.LongEitherBind.Test/golden.ir @@ -35,11 +35,11 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongEitherBind.Test", qnameName = Name "bind" }, Abs Nothing - ( ParamNamed Nothing ( Name "v2$294" ) ) + ( ParamNamed Nothing ( Name "v2$288" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$294" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$288" ) ) ) ) ) ( Abs Nothing ( ParamUnused Nothing ) ( App Nothing @@ -50,7 +50,7 @@ UberModule [ FieldName "value0" ] ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v2$294" ) ) ) + ( Ref Nothing ( Local ( Name "v2$288" ) ) ) ( PropName "value0" ) ) ) @@ -58,14 +58,14 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$294" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$288" ) ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "f$291" ) ) + ( ParamNamed Nothing ( Name "f$285" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$291" ) ) ) + ( Ref Nothing ( Local ( Name "f$285" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v2$294" ) ) ) + ( Ref Nothing ( Local ( Name "v2$288" ) ) ) ( PropName "value0" ) ) ) @@ -78,12 +78,12 @@ UberModule { qnameModuleName = ModuleName "Golden.LongEitherBind.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$kont300", Abs Nothing - ( ParamNamed Nothing ( Name "x1$301" ) ) + ( Nothing, Name "$kont295", Abs Nothing + ( ParamNamed Nothing ( Name "x1$296" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x150$302" ) ) + ( ParamNamed Nothing ( Name "x150$297" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x280$303" ) ) + ( ParamNamed Nothing ( Name "x280$298" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -99,7 +99,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x280$303" ) ) ) + ( Ref Nothing ( Local ( Name "x280$298" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -819,13 +819,13 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$301" ) + ( Name "x1$296" ) ) ) ) ( Ref Nothing ( Local - ( Name "x150$302" ) + ( Name "x150$297" ) ) ) ) @@ -881,12 +881,12 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont304", Abs Nothing - ( ParamNamed Nothing ( Name "x1$305" ) ) + ( Nothing, Name "$kont299", Abs Nothing + ( ParamNamed Nothing ( Name "x1$300" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x150$306" ) ) + ( ParamNamed Nothing ( Name "x150$301" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x240$307" ) ) + ( ParamNamed Nothing ( Name "x240$302" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -902,7 +902,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x240$307" ) ) ) + ( Ref Nothing ( Local ( Name "x240$302" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -2403,18 +2403,18 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont300" ) + ( Name "$kont295" ) ) ) ( Ref Nothing ( Local - ( Name "x1$305" ) + ( Name "x1$300" ) ) ) ) ( Ref Nothing ( Local - ( Name "x150$306" ) + ( Name "x150$301" ) ) ) ) @@ -2507,12 +2507,12 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont308", Abs Nothing - ( ParamNamed Nothing ( Name "x1$309" ) ) + ( Nothing, Name "$kont303", Abs Nothing + ( ParamNamed Nothing ( Name "x1$304" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x150$310" ) ) + ( ParamNamed Nothing ( Name "x150$305" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x200$311" ) ) + ( ParamNamed Nothing ( Name "x200$306" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -2528,7 +2528,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x200$311" ) ) ) + ( Ref Nothing ( Local ( Name "x200$306" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -4029,18 +4029,18 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont304" ) + ( Name "$kont299" ) ) ) ( Ref Nothing ( Local - ( Name "x1$309" ) + ( Name "x1$304" ) ) ) ) ( Ref Nothing ( Local - ( Name "x150$310" ) + ( Name "x150$305" ) ) ) ) @@ -4133,12 +4133,12 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont312", Abs Nothing - ( ParamNamed Nothing ( Name "x1$313" ) ) + ( Nothing, Name "$kont307", Abs Nothing + ( ParamNamed Nothing ( Name "x1$308" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x150$314" ) ) + ( ParamNamed Nothing ( Name "x150$309" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x160$315" ) ) + ( ParamNamed Nothing ( Name "x160$310" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -4154,7 +4154,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x160$315" ) ) ) + ( Ref Nothing ( Local ( Name "x160$310" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -5655,18 +5655,18 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont308" ) + ( Name "$kont303" ) ) ) ( Ref Nothing ( Local - ( Name "x1$313" ) + ( Name "x1$308" ) ) ) ) ( Ref Nothing ( Local - ( Name "x150$314" ) + ( Name "x150$309" ) ) ) ) @@ -5759,10 +5759,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont316", Abs Nothing - ( ParamNamed Nothing ( Name "x1$317" ) ) + ( Nothing, Name "$kont311", Abs Nothing + ( ParamNamed Nothing ( Name "x1$312" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x120$318" ) ) + ( ParamNamed Nothing ( Name "x120$313" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -5778,7 +5778,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x120$318" ) ) ) + ( Ref Nothing ( Local ( Name "x120$313" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -7272,12 +7272,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont312" ) + ( Name "$kont307" ) ) ) ( Ref Nothing ( Local - ( Name "x1$317" ) + ( Name "x1$312" ) ) ) ) @@ -7375,10 +7375,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont319", Abs Nothing - ( ParamNamed Nothing ( Name "x1$320" ) ) + ( Nothing, Name "$kont314", Abs Nothing + ( ParamNamed Nothing ( Name "x1$315" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x80$321" ) ) + ( ParamNamed Nothing ( Name "x80$316" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -7394,7 +7394,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x80$321" ) ) ) + ( Ref Nothing ( Local ( Name "x80$316" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -8885,12 +8885,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont316" ) + ( Name "$kont311" ) ) ) ( Ref Nothing ( Local - ( Name "x1$320" ) + ( Name "x1$315" ) ) ) ) @@ -8982,10 +8982,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont322", Abs Nothing - ( ParamNamed Nothing ( Name "x1$323" ) ) + ( Nothing, Name "$kont317", Abs Nothing + ( ParamNamed Nothing ( Name "x1$318" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x40$324" ) ) + ( ParamNamed Nothing ( Name "x40$319" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -9001,7 +9001,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x40$324" ) ) ) + ( Ref Nothing ( Local ( Name "x40$319" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -10492,12 +10492,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont319" ) + ( Name "$kont314" ) ) ) ( Ref Nothing ( Local - ( Name "x1$323" ) + ( Name "x1$318" ) ) ) ) @@ -12052,7 +12052,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont322" ) + ( Name "$kont317" ) ) ) ( Ref Nothing @@ -12167,11 +12167,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$7$286" ) ) + ( ParamNamed Nothing ( Name "v$7$294" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$7$286" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$7$294" ) ) ) ) ) ( App Nothing ( App Nothing @@ -12208,7 +12208,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$7$286" ) ) ) + ( Ref Nothing ( Local ( Name "v$7$294" ) ) ) ( PropName "value0" ) ) ) @@ -12219,7 +12219,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$7$286" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$7$294" ) ) ) ) ) ( App Nothing ( App Nothing @@ -12256,7 +12256,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$7$286" ) ) ) + ( Ref Nothing ( Local ( Name "v$7$294" ) ) ) ( PropName "value0" ) ) ) diff --git a/test/ps/output/Golden.LongEitherBind.Test/golden.lua b/test/ps/output/Golden.LongEitherBind.Test/golden.lua index 6e863ce0..dc7e2240 100644 --- a/test/ps/output/Golden.LongEitherBind.Test/golden.lua +++ b/test/ps/output/Golden.LongEitherBind.Test/golden.lua @@ -51,26 +51,26 @@ M.Data_Show_show = function(dict) return dict.show end M.Data_Either_Right = function(value0) return { ["$ctor"] = "Data.Either∷Either.Right", value0 = value0 } end -M.Golden_LongEitherBind_Test_bind = function(v2_S_294) - if "Data.Either∷Either.Left" == v2_S_294["$ctor"] then +M.Golden_LongEitherBind_Test_bind = function(v2_S_288) + if "Data.Either∷Either.Left" == v2_S_288["$ctor"] then return function() return (function(value0) return { ["$ctor"] = "Data.Either∷Either.Left", value0 = value0 } - end)(v2_S_294.value0) + end)(v2_S_288.value0) end else - if "Data.Either∷Either.Right" == v2_S_294["$ctor"] then - return function(f_S_291) return f_S_291(v2_S_294.value0) end + if "Data.Either∷Either.Right" == v2_S_288["$ctor"] then + return function(f_S_285) return f_S_285(v2_S_288.value0) end else return error("No patterns matched") end end end M.Golden_LongEitherBind_Test_compute = (function() - local _S_kont300 = function(x1_S_301) - return function(x150_S_302) - return function(x280_S_303) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x280_S_303)(1)))(function( x281 ) + local _S_kont295 = function(x1_S_296) + return function(x150_S_297) + return function(x280_S_298) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x280_S_298)(1)))(function( x281 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x281)(1)))(function( x282 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x282)(1)))(function( x283 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x283)(1)))(function( x284 ) @@ -90,7 +90,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x297)(1)))(function( x298 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x298)(1)))(function( x299 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x299)(1)))(function( x300 ) - return M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(M.Data_Semiring_foreign.intAdd(x1_S_301)(x150_S_302))(x300)) + return M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(M.Data_Semiring_foreign.intAdd(x1_S_296)(x150_S_297))(x300)) end) end) end) @@ -114,10 +114,10 @@ M.Golden_LongEitherBind_Test_compute = (function() end end end - local _S_kont304 = function(x1_S_305) - return function(x150_S_306) - return function(x240_S_307) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x240_S_307)(1)))(function( x241 ) + local _S_kont299 = function(x1_S_300) + return function(x150_S_301) + return function(x240_S_302) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x240_S_302)(1)))(function( x241 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x241)(1)))(function( x242 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x242)(1)))(function( x243 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x243)(1)))(function( x244 ) @@ -157,7 +157,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x277)(1)))(function( x278 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x278)(1)))(function( x279 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x279)(1)))(function( x280 ) - return _S_kont300(x1_S_305)(x150_S_306)(x280) + return _S_kont295(x1_S_300)(x150_S_301)(x280) end) end) end) @@ -201,10 +201,10 @@ M.Golden_LongEitherBind_Test_compute = (function() end end end - local _S_kont308 = function(x1_S_309) - return function(x150_S_310) - return function(x200_S_311) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x200_S_311)(1)))(function( x201 ) + local _S_kont303 = function(x1_S_304) + return function(x150_S_305) + return function(x200_S_306) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x200_S_306)(1)))(function( x201 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x201)(1)))(function( x202 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x202)(1)))(function( x203 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x203)(1)))(function( x204 ) @@ -244,7 +244,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x237)(1)))(function( x238 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x238)(1)))(function( x239 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x239)(1)))(function( x240 ) - return _S_kont304(x1_S_309)(x150_S_310)(x240) + return _S_kont299(x1_S_304)(x150_S_305)(x240) end) end) end) @@ -288,10 +288,10 @@ M.Golden_LongEitherBind_Test_compute = (function() end end end - local _S_kont312 = function(x1_S_313) - return function(x150_S_314) - return function(x160_S_315) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x160_S_315)(1)))(function( x161 ) + local _S_kont307 = function(x1_S_308) + return function(x150_S_309) + return function(x160_S_310) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x160_S_310)(1)))(function( x161 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x161)(1)))(function( x162 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x162)(1)))(function( x163 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x163)(1)))(function( x164 ) @@ -331,7 +331,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x197)(1)))(function( x198 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x198)(1)))(function( x199 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x199)(1)))(function( x200 ) - return _S_kont308(x1_S_313)(x150_S_314)(x200) + return _S_kont303(x1_S_308)(x150_S_309)(x200) end) end) end) @@ -375,9 +375,9 @@ M.Golden_LongEitherBind_Test_compute = (function() end end end - local _S_kont316 = function(x1_S_317) - return function(x120_S_318) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x120_S_318)(1)))(function( x121 ) + local _S_kont311 = function(x1_S_312) + return function(x120_S_313) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x120_S_313)(1)))(function( x121 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x121)(1)))(function( x122 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x122)(1)))(function( x123 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x123)(1)))(function( x124 ) @@ -417,7 +417,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x157)(1)))(function( x158 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x158)(1)))(function( x159 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x159)(1)))(function( x160 ) - return _S_kont312(x1_S_317)(x150)(x160) + return _S_kont307(x1_S_312)(x150)(x160) end) end) end) @@ -460,9 +460,9 @@ M.Golden_LongEitherBind_Test_compute = (function() end) end end - local _S_kont319 = function(x1_S_320) - return function(x80_S_321) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x80_S_321)(1)))(function( x81 ) + local _S_kont314 = function(x1_S_315) + return function(x80_S_316) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x80_S_316)(1)))(function( x81 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x81)(1)))(function( x82 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x82)(1)))(function( x83 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x83)(1)))(function( x84 ) @@ -502,7 +502,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x117)(1)))(function( x118 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x118)(1)))(function( x119 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x119)(1)))(function( x120 ) - return _S_kont316(x1_S_320)(x120) + return _S_kont311(x1_S_315)(x120) end) end) end) @@ -545,9 +545,9 @@ M.Golden_LongEitherBind_Test_compute = (function() end) end end - local _S_kont322 = function(x1_S_323) - return function(x40_S_324) - return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x40_S_324)(1)))(function( x41 ) + local _S_kont317 = function(x1_S_318) + return function(x40_S_319) + return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x40_S_319)(1)))(function( x41 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x41)(1)))(function( x42 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x42)(1)))(function( x43 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x43)(1)))(function( x44 ) @@ -587,7 +587,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x77)(1)))(function( x78 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x78)(1)))(function( x79 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x79)(1)))(function( x80 ) - return _S_kont319(x1_S_323)(x80) + return _S_kont314(x1_S_318)(x80) end) end) end) @@ -670,7 +670,7 @@ M.Golden_LongEitherBind_Test_compute = (function() return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x37)(1)))(function( x38 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x38)(1)))(function( x39 ) return M.Golden_LongEitherBind_Test_bind(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x39)(1)))(function( x40 ) - return _S_kont322(x1)(x40) + return _S_kont317(x1)(x40) end) end) end) @@ -713,16 +713,16 @@ M.Golden_LongEitherBind_Test_compute = (function() end) end)() return (function(s) return function() print(s) end end)(M.Data_Show_show({ - show = function(v_S_7_S_286) - if "Data.Either∷Either.Left" == v_S_7_S_286["$ctor"] then + show = function(v_S_7_S_294) + if "Data.Either∷Either.Left" == v_S_7_S_294["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Left ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = M.Data_Show_foreign.showStringImpl - })(v_S_7_S_286.value0))(")")) + })(v_S_7_S_294.value0))(")")) else - if "Data.Either∷Either.Right" == v_S_7_S_286["$ctor"] then + if "Data.Either∷Either.Right" == v_S_7_S_294["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Right ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = M.Data_Show_foreign.showIntImpl - })(v_S_7_S_286.value0))(")")) + })(v_S_7_S_294.value0))(")")) else return error("No patterns matched") end diff --git a/test/ps/output/Golden.LongExceptBind.Test/golden.ir b/test/ps/output/Golden.LongExceptBind.Test/golden.ir index 896aea14..6588f730 100644 --- a/test/ps/output/Golden.LongExceptBind.Test/golden.ir +++ b/test/ps/output/Golden.LongExceptBind.Test/golden.ir @@ -102,12 +102,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$512" ) ) + ( ParamNamed Nothing ( Name "f$501" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "m$513" ) ) + ( ParamNamed Nothing ( Name "m$502" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$512" ) ) ) - ( Ref Nothing ( Local ( Name "m$513" ) ) ) + ( Ref Nothing ( Local ( Name "f$501" ) ) ) + ( Ref Nothing ( Local ( Name "m$502" ) ) ) ) ) ) @@ -121,8 +121,8 @@ UberModule }, LiteralObject Nothing [ ( PropName "pure", Abs Nothing - ( ParamNamed Nothing ( Name "x$514" ) ) - ( Ref Nothing ( Local ( Name "x$514" ) ) ) + ( ParamNamed Nothing ( Name "x$503" ) ) + ( Ref Nothing ( Local ( Name "x$503" ) ) ) ), ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) @@ -230,11 +230,11 @@ UberModule ( Ref Nothing ( Local ( Name "v" ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v2$517" ) ) + ( ParamNamed Nothing ( Name "v2$506" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$517" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$506" ) ) ) ) ) ( App Nothing ( App Nothing @@ -268,19 +268,19 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v2$517" ) ) ) + ( Ref Nothing ( Local ( Name "v2$506" ) ) ) ( PropName "value0" ) ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$517" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$506" ) ) ) ) ) ( App Nothing ( Ref Nothing ( Local ( Name "k" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v2$517" ) ) ) + ( Ref Nothing ( Local ( Name "v2$506" ) ) ) ( PropName "value0" ) ) ) @@ -313,72 +313,69 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "bind$521", App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) - ( App Nothing - ( ObjectProp Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Except.Trans" ) - ( Name "monadExceptT" ) - ) - ) - ( Ref Nothing ( Local ( Name "dictMonad" ) ) ) - ) - ( PropName "Bind1" ) + ( Nothing, Name "dictMonad$509", App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Except.Trans" ) + ( Name "monadExceptT" ) ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad" ) ) ) ) :| [] ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "f$522" ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "a$523" ) ) - ( App Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "bind$510", App Nothing + ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "bind$521" ) ) ) - ( Ref Nothing ( Local ( Name "f$522" ) ) ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$509" ) ) ) + ( PropName "Bind1" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "f'$524" ) ) + ) :| [] + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "f$511" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "a$512" ) ) + ( App Nothing ( App Nothing + ( Ref Nothing ( Local ( Name "bind$510" ) ) ) + ( Ref Nothing ( Local ( Name "f$511" ) ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "f'$513" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "bind$521" ) ) ) - ( Ref Nothing ( Local ( Name "a$523" ) ) ) - ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "a'$525" ) ) ( App Nothing + ( Ref Nothing ( Local ( Name "bind$510" ) ) ) + ( Ref Nothing ( Local ( Name "a$512" ) ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "a'$514" ) ) ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Applicative" ) - ( Name "pure" ) - ) - ) ( App Nothing - ( ObjectProp Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Except.Trans" ) - ( Name "monadExceptT" ) - ) - ) - ( Ref Nothing ( Local ( Name "dictMonad" ) ) ) + ( Ref Nothing + ( Imported + ( ModuleName "Control.Applicative" ) + ( Name "pure" ) ) - ( PropName "Applicative0" ) ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$509" ) ) ) + ( PropName "Applicative0" ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) + ) ) ) - ) - ( App Nothing - ( Ref Nothing ( Local ( Name "f'$524" ) ) ) - ( Ref Nothing ( Local ( Name "a'$525" ) ) ) + ( App Nothing + ( Ref Nothing ( Local ( Name "f'$513" ) ) ) + ( Ref Nothing ( Local ( Name "a'$514" ) ) ) + ) ) ) ) @@ -392,9 +389,9 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$509" ) ) + ( ParamNamed Nothing ( Name "f$498" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$511" ) ) + ( ParamNamed Nothing ( Name "v$500" ) ) ( App Nothing ( App Nothing ( App Nothing @@ -435,14 +432,14 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$518" ) ) + ( ParamNamed Nothing ( Name "f$507" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "m$519" ) ) + ( ParamNamed Nothing ( Name "m$508" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "m$519" ) ) ) + ( Ref Nothing ( Local ( Name "m$508" ) ) ) ) ) ( App Nothing @@ -453,7 +450,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "m$519" ) ) ) + ( Ref Nothing ( Local ( Name "m$508" ) ) ) ( PropName "value0" ) ) ) @@ -461,7 +458,7 @@ UberModule ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "m$519" ) ) ) + ( Ref Nothing ( Local ( Name "m$508" ) ) ) ) ) ( App Nothing @@ -472,9 +469,9 @@ UberModule ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$518" ) ) ) + ( Ref Nothing ( Local ( Name "f$507" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "m$519" ) ) ) + ( Ref Nothing ( Local ( Name "m$508" ) ) ) ( PropName "value0" ) ) ) @@ -487,10 +484,10 @@ UberModule ] ) ) - ( Ref Nothing ( Local ( Name "f$509" ) ) ) + ( Ref Nothing ( Local ( Name "f$498" ) ) ) ) ) - ( Ref Nothing ( Local ( Name "v$511" ) ) ) + ( Ref Nothing ( Local ( Name "v$500" ) ) ) ) ) ) @@ -583,10 +580,10 @@ UberModule { qnameModuleName = ModuleName "Golden.LongExceptBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont528", Abs Nothing - ( ParamNamed Nothing ( Name "x1$529" ) ) + ( Nothing, Name "$kont518", Abs Nothing + ( ParamNamed Nothing ( Name "x1$519" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x160$530" ) ) + ( ParamNamed Nothing ( Name "x160$520" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -606,7 +603,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x160$530" ) ) ) + ( Ref Nothing ( Local ( Name "x160$520" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -2438,7 +2435,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$529" ) + ( Name "x1$519" ) ) ) ) @@ -2532,10 +2529,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont531", Abs Nothing - ( ParamNamed Nothing ( Name "x1$532" ) ) + ( Nothing, Name "$kont521", Abs Nothing + ( ParamNamed Nothing ( Name "x1$522" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x120$533" ) ) + ( ParamNamed Nothing ( Name "x120$523" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -2555,7 +2552,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x120$533" ) ) ) + ( Ref Nothing ( Local ( Name "x120$523" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -4366,12 +4363,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont528" ) + ( Name "$kont518" ) ) ) ( Ref Nothing ( Local - ( Name "x1$532" ) + ( Name "x1$522" ) ) ) ) @@ -4463,10 +4460,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont534", Abs Nothing - ( ParamNamed Nothing ( Name "x1$535" ) ) + ( Nothing, Name "$kont524", Abs Nothing + ( ParamNamed Nothing ( Name "x1$525" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x80$536" ) ) + ( ParamNamed Nothing ( Name "x80$526" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -4486,7 +4483,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x80$536" ) ) ) + ( Ref Nothing ( Local ( Name "x80$526" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -6295,12 +6292,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont531" ) + ( Name "$kont521" ) ) ) ( Ref Nothing ( Local - ( Name "x1$535" ) + ( Name "x1$525" ) ) ) ) @@ -6392,10 +6389,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont537", Abs Nothing - ( ParamNamed Nothing ( Name "x1$538" ) ) + ( Nothing, Name "$kont527", Abs Nothing + ( ParamNamed Nothing ( Name "x1$528" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x40$539" ) ) + ( ParamNamed Nothing ( Name "x40$529" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -6415,7 +6412,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x40$539" ) ) ) + ( Ref Nothing ( Local ( Name "x40$529" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -8224,12 +8221,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont534" ) + ( Name "$kont524" ) ) ) ( Ref Nothing ( Local - ( Name "x1$538" ) + ( Name "x1$528" ) ) ) ) @@ -10100,7 +10097,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont537" ) + ( Name "$kont527" ) ) ) ( Ref Nothing @@ -10244,11 +10241,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$189$505" ) ) + ( ParamNamed Nothing ( Name "v$189$517" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$189$505" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$189$517" ) ) ) ) ) ( App Nothing ( App Nothing @@ -10285,7 +10282,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$189$505" ) ) ) + ( Ref Nothing ( Local ( Name "v$189$517" ) ) ) ( PropName "value0" ) ) ) @@ -10296,7 +10293,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$189$505" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$189$517" ) ) ) ) ) ( App Nothing ( App Nothing @@ -10333,7 +10330,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$189$505" ) ) ) + ( Ref Nothing ( Local ( Name "v$189$517" ) ) ) ( PropName "value0" ) ) ) diff --git a/test/ps/output/Golden.LongExceptBind.Test/golden.lua b/test/ps/output/Golden.LongExceptBind.Test/golden.lua index cf7f8275..61b05737 100644 --- a/test/ps/output/Golden.LongExceptBind.Test/golden.lua +++ b/test/ps/output/Golden.LongExceptBind.Test/golden.lua @@ -67,14 +67,14 @@ M.Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_512) - return function(m_S_513) return f_S_512(m_S_513) end + map = function(f_S_501) + return function(m_S_502) return f_S_501(m_S_502) end end } end } M.Data_Identity_applicativeIdentity = { - pure = function(x_S_514) return x_S_514 end, + pure = function(x_S_503) return x_S_503 end, Apply0 = function() return M.Data_Identity_applyIdentity end } M.Data_Identity_monadIdentity = { @@ -104,12 +104,12 @@ M.Control_Monad_Except_Trans_bindExceptT = function(dictMonad) return { bind = function(v) return function(k) - return M.Control_Bind_bind(dictMonad.Bind1())(v)(function(v2_S_517) - if "Data.Either∷Either.Left" == v2_S_517["$ctor"] then - return M.Control_Monad_Except_Trans_compose(M.Control_Applicative_pure(dictMonad.Applicative0()))(M.Data_Either_Left)(v2_S_517.value0) + return M.Control_Bind_bind(dictMonad.Bind1())(v)(function(v2_S_506) + if "Data.Either∷Either.Left" == v2_S_506["$ctor"] then + return M.Control_Monad_Except_Trans_compose(M.Control_Applicative_pure(dictMonad.Applicative0()))(M.Data_Either_Left)(v2_S_506.value0) else - if "Data.Either∷Either.Right" == v2_S_517["$ctor"] then - return k(v2_S_517.value0) + if "Data.Either∷Either.Right" == v2_S_506["$ctor"] then + return k(v2_S_506.value0) else return error("No patterns matched") end @@ -125,12 +125,13 @@ end M.Control_Monad_Except_Trans_applyExceptT = function(dictMonad) return { apply = (function() - local bind_S_521 = M.Control_Bind_bind((M.Control_Monad_Except_Trans_monadExceptT(dictMonad)).Bind1()) - return function(f_S_522) - return function(a_S_523) - return bind_S_521(f_S_522)(function(fPrime_S_524) - return bind_S_521(a_S_523)(function(aPrime_S_525) - return M.Control_Applicative_pure((M.Control_Monad_Except_Trans_monadExceptT(dictMonad)).Applicative0())(fPrime_S_524(aPrime_S_525)) + local dictMonad_S_509 = M.Control_Monad_Except_Trans_monadExceptT(dictMonad) + local bind_S_510 = M.Control_Bind_bind(dictMonad_S_509.Bind1()) + return function(f_S_511) + return function(a_S_512) + return bind_S_510(f_S_511)(function(fPrime_S_513) + return bind_S_510(a_S_512)(function(aPrime_S_514) + return M.Control_Applicative_pure(dictMonad_S_509.Applicative0())(fPrime_S_513(aPrime_S_514)) end) end) end @@ -138,23 +139,23 @@ M.Control_Monad_Except_Trans_applyExceptT = function(dictMonad) end)(), Functor0 = function() return { - map = function(f_S_509) - return function(v_S_511) + map = function(f_S_498) + return function(v_S_500) return M.Data_Functor_map(((dictMonad.Bind1()).Apply0()).Functor0())(M.Data_Functor_map({ - map = function(f_S_518) - return function(m_S_519) - if "Data.Either∷Either.Left" == m_S_519["$ctor"] then - return M.Data_Either_Left(m_S_519.value0) + map = function(f_S_507) + return function(m_S_508) + if "Data.Either∷Either.Left" == m_S_508["$ctor"] then + return M.Data_Either_Left(m_S_508.value0) else - if "Data.Either∷Either.Right" == m_S_519["$ctor"] then - return M.Data_Either_Right(f_S_518(m_S_519.value0)) + if "Data.Either∷Either.Right" == m_S_508["$ctor"] then + return M.Data_Either_Right(f_S_507(m_S_508.value0)) else return error("No patterns matched") end end end end - })(f_S_509))(v_S_511) + })(f_S_498))(v_S_500) end end } @@ -172,9 +173,9 @@ end M.Golden_LongExceptBind_Test_bind = M.Control_Bind_bind(M.Control_Monad_Except_Trans_bindExceptT(M.Data_Identity_monadIdentity)) M.Golden_LongExceptBind_Test_except = M.Control_Monad_Except_Trans_compose(M.Control_Monad_Except_Trans_ExceptT)(M.Control_Applicative_pure(M.Data_Identity_applicativeIdentity)) M.Golden_LongExceptBind_Test_go = (function() - local _S_kont528 = function(x1_S_529) - return function(x160_S_530) - return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x160_S_530)(1))))(function( x161 ) + local _S_kont518 = function(x1_S_519) + return function(x160_S_520) + return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x160_S_520)(1))))(function( x161 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x161)(1))))(function( x162 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x162)(1))))(function( x163 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x163)(1))))(function( x164 ) @@ -214,7 +215,7 @@ M.Golden_LongExceptBind_Test_go = (function() return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x197)(1))))(function( x198 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x198)(1))))(function( x199 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x199)(1))))(function( x200 ) - return M.Control_Applicative_pure(M.Control_Monad_Except_Trans_applicativeExceptT(M.Data_Identity_monadIdentity))(M.Data_Semiring_foreign.intAdd(x1_S_529)(x200)) + return M.Control_Applicative_pure(M.Control_Monad_Except_Trans_applicativeExceptT(M.Data_Identity_monadIdentity))(M.Data_Semiring_foreign.intAdd(x1_S_519)(x200)) end) end) end) @@ -257,9 +258,9 @@ M.Golden_LongExceptBind_Test_go = (function() end) end end - local _S_kont531 = function(x1_S_532) - return function(x120_S_533) - return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x120_S_533)(1))))(function( x121 ) + local _S_kont521 = function(x1_S_522) + return function(x120_S_523) + return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x120_S_523)(1))))(function( x121 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x121)(1))))(function( x122 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x122)(1))))(function( x123 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x123)(1))))(function( x124 ) @@ -299,7 +300,7 @@ M.Golden_LongExceptBind_Test_go = (function() return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x157)(1))))(function( x158 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x158)(1))))(function( x159 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x159)(1))))(function( x160 ) - return _S_kont528(x1_S_532)(x160) + return _S_kont518(x1_S_522)(x160) end) end) end) @@ -342,9 +343,9 @@ M.Golden_LongExceptBind_Test_go = (function() end) end end - local _S_kont534 = function(x1_S_535) - return function(x80_S_536) - return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x80_S_536)(1))))(function( x81 ) + local _S_kont524 = function(x1_S_525) + return function(x80_S_526) + return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x80_S_526)(1))))(function( x81 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x81)(1))))(function( x82 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x82)(1))))(function( x83 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x83)(1))))(function( x84 ) @@ -384,7 +385,7 @@ M.Golden_LongExceptBind_Test_go = (function() return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x117)(1))))(function( x118 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x118)(1))))(function( x119 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x119)(1))))(function( x120 ) - return _S_kont531(x1_S_535)(x120) + return _S_kont521(x1_S_525)(x120) end) end) end) @@ -427,9 +428,9 @@ M.Golden_LongExceptBind_Test_go = (function() end) end end - local _S_kont537 = function(x1_S_538) - return function(x40_S_539) - return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x40_S_539)(1))))(function( x41 ) + local _S_kont527 = function(x1_S_528) + return function(x40_S_529) + return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x40_S_529)(1))))(function( x41 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x41)(1))))(function( x42 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x42)(1))))(function( x43 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x43)(1))))(function( x44 ) @@ -469,7 +470,7 @@ M.Golden_LongExceptBind_Test_go = (function() return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x77)(1))))(function( x78 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x78)(1))))(function( x79 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x79)(1))))(function( x80 ) - return _S_kont534(x1_S_538)(x80) + return _S_kont524(x1_S_528)(x80) end) end) end) @@ -552,7 +553,7 @@ M.Golden_LongExceptBind_Test_go = (function() return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x37)(1))))(function( x38 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x38)(1))))(function( x39 ) return M.Golden_LongExceptBind_Test_bind(M.Golden_LongExceptBind_Test_except(M.Data_Either_Right(M.Data_Semiring_foreign.intAdd(x39)(1))))(function( x40 ) - return _S_kont537(x1)(x40) + return _S_kont527(x1)(x40) end) end) end) @@ -598,16 +599,16 @@ M.Golden_LongExceptBind_Test_compute = M.Control_Semigroupoid_compose(M.Control_ return v_S_39 end)(M.Golden_LongExceptBind_Test_go) return (function(s) return function() print(s) end end)(M.Data_Show_show({ - show = function(v_S_189_S_505) - if "Data.Either∷Either.Left" == v_S_189_S_505["$ctor"] then + show = function(v_S_189_S_517) + if "Data.Either∷Either.Left" == v_S_189_S_517["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Left ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = M.Data_Show_foreign.showStringImpl - })(v_S_189_S_505.value0))(")")) + })(v_S_189_S_517.value0))(")")) else - if "Data.Either∷Either.Right" == v_S_189_S_505["$ctor"] then + if "Data.Either∷Either.Right" == v_S_189_S_517["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Right ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = M.Data_Show_foreign.showIntImpl - })(v_S_189_S_505.value0))(")")) + })(v_S_189_S_517.value0))(")")) else return error("No patterns matched") end diff --git a/test/ps/output/Golden.LongMaybeBind.Test/golden.ir b/test/ps/output/Golden.LongMaybeBind.Test/golden.ir index ea31a9f4..d22f6f39 100644 --- a/test/ps/output/Golden.LongMaybeBind.Test/golden.ir +++ b/test/ps/output/Golden.LongMaybeBind.Test/golden.ir @@ -35,25 +35,25 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongMaybeBind.Test", qnameName = Name "bind" }, Abs Nothing - ( ParamNamed Nothing ( Name "v$273" ) ) + ( ParamNamed Nothing ( Name "v$270" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v1$274" ) ) + ( ParamNamed Nothing ( Name "v1$271" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$273" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$270" ) ) ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "v1$274" ) ) ) + ( Ref Nothing ( Local ( Name "v1$271" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$273" ) ) ) + ( Ref Nothing ( Local ( Name "v$270" ) ) ) ( PropName "value0" ) ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$273" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$270" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -69,10 +69,10 @@ UberModule { qnameModuleName = ModuleName "Golden.LongMaybeBind.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$kont280", Abs Nothing - ( ParamNamed Nothing ( Name "x1$281" ) ) + ( Nothing, Name "$kont279", Abs Nothing + ( ParamNamed Nothing ( Name "x1$280" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x277$282" ) ) + ( ParamNamed Nothing ( Name "x277$281" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -88,7 +88,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x277$282" ) ) ) + ( Ref Nothing ( Local ( Name "x277$281" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -907,7 +907,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$281" ) + ( Name "x1$280" ) ) ) ) @@ -967,10 +967,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont283", Abs Nothing - ( ParamNamed Nothing ( Name "x1$284" ) ) + ( Nothing, Name "$kont282", Abs Nothing + ( ParamNamed Nothing ( Name "x1$283" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x238$285" ) ) + ( ParamNamed Nothing ( Name "x238$284" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -986,7 +986,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x238$285" ) ) ) + ( Ref Nothing ( Local ( Name "x238$284" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -2461,12 +2461,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont280" ) + ( Name "$kont279" ) ) ) ( Ref Nothing ( Local - ( Name "x1$284" ) + ( Name "x1$283" ) ) ) ) @@ -2558,10 +2558,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont286", Abs Nothing - ( ParamNamed Nothing ( Name "x1$287" ) ) + ( Nothing, Name "$kont285", Abs Nothing + ( ParamNamed Nothing ( Name "x1$286" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x198$288" ) ) + ( ParamNamed Nothing ( Name "x198$287" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -2577,7 +2577,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x198$288" ) ) ) + ( Ref Nothing ( Local ( Name "x198$287" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -4065,12 +4065,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont283" ) + ( Name "$kont282" ) ) ) ( Ref Nothing ( Local - ( Name "x1$287" ) + ( Name "x1$286" ) ) ) ) @@ -4162,10 +4162,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont289", Abs Nothing - ( ParamNamed Nothing ( Name "x1$290" ) ) + ( Nothing, Name "$kont288", Abs Nothing + ( ParamNamed Nothing ( Name "x1$289" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x158$291" ) ) + ( ParamNamed Nothing ( Name "x158$290" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -4181,7 +4181,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x158$291" ) ) ) + ( Ref Nothing ( Local ( Name "x158$290" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -5669,12 +5669,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont286" ) + ( Name "$kont285" ) ) ) ( Ref Nothing ( Local - ( Name "x1$290" ) + ( Name "x1$289" ) ) ) ) @@ -5766,10 +5766,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont292", Abs Nothing - ( ParamNamed Nothing ( Name "x1$293" ) ) + ( Nothing, Name "$kont291", Abs Nothing + ( ParamNamed Nothing ( Name "x1$292" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x119$294" ) ) + ( ParamNamed Nothing ( Name "x119$293" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -5785,7 +5785,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x119$294" ) ) ) + ( Ref Nothing ( Local ( Name "x119$293" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -7260,12 +7260,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont289" ) + ( Name "$kont288" ) ) ) ( Ref Nothing ( Local - ( Name "x1$293" ) + ( Name "x1$292" ) ) ) ) @@ -7357,10 +7357,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont295", Abs Nothing - ( ParamNamed Nothing ( Name "x1$296" ) ) + ( Nothing, Name "$kont294", Abs Nothing + ( ParamNamed Nothing ( Name "x1$295" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x79$297" ) ) + ( ParamNamed Nothing ( Name "x79$296" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -7376,7 +7376,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x79$297" ) ) ) + ( Ref Nothing ( Local ( Name "x79$296" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -8862,12 +8862,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont292" ) + ( Name "$kont291" ) ) ) ( Ref Nothing ( Local - ( Name "x1$296" ) + ( Name "x1$295" ) ) ) ) @@ -8959,10 +8959,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont298", Abs Nothing - ( ParamNamed Nothing ( Name "x1$299" ) ) + ( Nothing, Name "$kont297", Abs Nothing + ( ParamNamed Nothing ( Name "x1$298" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x40$300" ) ) + ( ParamNamed Nothing ( Name "x40$299" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -8978,7 +8978,7 @@ UberModule ) ( PropName "intAdd" ) ) - ( Ref Nothing ( Local ( Name "x40$300" ) ) ) + ( Ref Nothing ( Local ( Name "x40$299" ) ) ) ) ( LiteralInt Nothing 1 ) ) @@ -10455,12 +10455,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont295" ) + ( Name "$kont294" ) ) ) ( Ref Nothing ( Local - ( Name "x1$299" ) + ( Name "x1$298" ) ) ) ) @@ -12008,7 +12008,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont298" ) + ( Name "$kont297" ) ) ) ( Ref Nothing @@ -12123,11 +12123,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$16$271" ) ) + ( ParamNamed Nothing ( Name "v$16$278" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$271" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$278" ) ) ) ) ) ( App Nothing ( App Nothing @@ -12165,7 +12165,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$16$271" ) ) ) + ( Ref Nothing ( Local ( Name "v$16$278" ) ) ) ( PropName "value0" ) ) ) @@ -12176,7 +12176,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$271" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$16$278" ) ) ) ) ) ( LiteralString Nothing "Nothing" ) ( Exception Nothing "No patterns matched" ) diff --git a/test/ps/output/Golden.LongMaybeBind.Test/golden.lua b/test/ps/output/Golden.LongMaybeBind.Test/golden.lua index 7242519f..33b59daf 100644 --- a/test/ps/output/Golden.LongMaybeBind.Test/golden.lua +++ b/test/ps/output/Golden.LongMaybeBind.Test/golden.lua @@ -10,12 +10,12 @@ M.Data_Show_show = function(dict) return dict.show end M.Data_Maybe_Just = function(value0) return { ["$ctor"] = "Data.Maybe∷Maybe.Just", value0 = value0 } end -M.Golden_LongMaybeBind_Test_bind = function(v_S_273) - return function(v1_S_274) - if "Data.Maybe∷Maybe.Just" == v_S_273["$ctor"] then - return v1_S_274(v_S_273.value0) +M.Golden_LongMaybeBind_Test_bind = function(v_S_270) + return function(v1_S_271) + if "Data.Maybe∷Maybe.Just" == v_S_270["$ctor"] then + return v1_S_271(v_S_270.value0) else - if "Data.Maybe∷Maybe.Nothing" == v_S_273["$ctor"] then + if "Data.Maybe∷Maybe.Nothing" == v_S_270["$ctor"] then return { ["$ctor"] = "Data.Maybe∷Maybe.Nothing" } else return error("No patterns matched") @@ -24,9 +24,9 @@ M.Golden_LongMaybeBind_Test_bind = function(v_S_273) end end M.Golden_LongMaybeBind_Test_compute = (function() - local _S_kont280 = function(x1_S_281) - return function(x277_S_282) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x277_S_282)(1)))(function( x278 ) + local _S_kont279 = function(x1_S_280) + return function(x277_S_281) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x277_S_281)(1)))(function( x278 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x278)(1)))(function( x279 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x279)(1)))(function( x280 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x280)(1)))(function( x281 ) @@ -49,7 +49,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x297)(1)))(function( x298 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x298)(1)))(function( x299 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x299)(1)))(function( x300 ) - return M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x1_S_281)(x300)) + return M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x1_S_280)(x300)) end) end) end) @@ -75,9 +75,9 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end end - local _S_kont283 = function(x1_S_284) - return function(x238_S_285) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x238_S_285)(1)))(function( x239 ) + local _S_kont282 = function(x1_S_283) + return function(x238_S_284) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x238_S_284)(1)))(function( x239 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x239)(1)))(function( x240 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x240)(1)))(function( x241 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x241)(1)))(function( x242 ) @@ -117,7 +117,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x274)(1)))(function( x275 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x275)(1)))(function( x276 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x276)(1)))(function( x277 ) - return _S_kont280(x1_S_284)(x277) + return _S_kont279(x1_S_283)(x277) end) end) end) @@ -160,9 +160,9 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end end - local _S_kont286 = function(x1_S_287) - return function(x198_S_288) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x198_S_288)(1)))(function( x199 ) + local _S_kont285 = function(x1_S_286) + return function(x198_S_287) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x198_S_287)(1)))(function( x199 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x199)(1)))(function( x200 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x200)(1)))(function( x201 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x201)(1)))(function( x202 ) @@ -202,7 +202,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x235)(1)))(function( x236 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x236)(1)))(function( x237 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x237)(1)))(function( x238 ) - return _S_kont283(x1_S_287)(x238) + return _S_kont282(x1_S_286)(x238) end) end) end) @@ -245,9 +245,9 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end end - local _S_kont289 = function(x1_S_290) - return function(x158_S_291) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x158_S_291)(1)))(function( x159 ) + local _S_kont288 = function(x1_S_289) + return function(x158_S_290) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x158_S_290)(1)))(function( x159 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x159)(1)))(function( x160 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x160)(1)))(function( x161 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x161)(1)))(function( x162 ) @@ -287,7 +287,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x195)(1)))(function( x196 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x196)(1)))(function( x197 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x197)(1)))(function( x198 ) - return _S_kont286(x1_S_290)(x198) + return _S_kont285(x1_S_289)(x198) end) end) end) @@ -330,9 +330,9 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end end - local _S_kont292 = function(x1_S_293) - return function(x119_S_294) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x119_S_294)(1)))(function( x120 ) + local _S_kont291 = function(x1_S_292) + return function(x119_S_293) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x119_S_293)(1)))(function( x120 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x120)(1)))(function( x121 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x121)(1)))(function( x122 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x122)(1)))(function( x123 ) @@ -372,7 +372,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x155)(1)))(function( x156 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x156)(1)))(function( x157 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x157)(1)))(function( x158 ) - return _S_kont289(x1_S_293)(x158) + return _S_kont288(x1_S_292)(x158) end) end) end) @@ -415,9 +415,9 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end end - local _S_kont295 = function(x1_S_296) - return function(x79_S_297) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x79_S_297)(1)))(function( x80 ) + local _S_kont294 = function(x1_S_295) + return function(x79_S_296) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x79_S_296)(1)))(function( x80 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x80)(1)))(function( x81 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x81)(1)))(function( x82 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x82)(1)))(function( x83 ) @@ -457,7 +457,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x116)(1)))(function( x117 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x117)(1)))(function( x118 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x118)(1)))(function( x119 ) - return _S_kont292(x1_S_296)(x119) + return _S_kont291(x1_S_295)(x119) end) end) end) @@ -500,9 +500,9 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end end - local _S_kont298 = function(x1_S_299) - return function(x40_S_300) - return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x40_S_300)(1)))(function( x41 ) + local _S_kont297 = function(x1_S_298) + return function(x40_S_299) + return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x40_S_299)(1)))(function( x41 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x41)(1)))(function( x42 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x42)(1)))(function( x43 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x43)(1)))(function( x44 ) @@ -542,7 +542,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x76)(1)))(function( x77 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x77)(1)))(function( x78 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x78)(1)))(function( x79 ) - return _S_kont295(x1_S_299)(x79) + return _S_kont294(x1_S_298)(x79) end) end) end) @@ -625,7 +625,7 @@ M.Golden_LongMaybeBind_Test_compute = (function() return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x37)(1)))(function( x38 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x38)(1)))(function( x39 ) return M.Golden_LongMaybeBind_Test_bind(M.Data_Maybe_Just(M.Data_Semiring_foreign.intAdd(x39)(1)))(function( x40 ) - return _S_kont298(x1)(x40) + return _S_kont297(x1)(x40) end) end) end) @@ -668,13 +668,13 @@ M.Golden_LongMaybeBind_Test_compute = (function() end) end)() return (function(s) return function() print(s) end end)(M.Data_Show_show({ - show = function(v_S_16_S_271) - if "Data.Maybe∷Maybe.Just" == v_S_16_S_271["$ctor"] then + show = function(v_S_16_S_278) + if "Data.Maybe∷Maybe.Just" == v_S_16_S_278["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Just ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = function(n) return tostring(n) end - })(v_S_16_S_271.value0))(")")) + })(v_S_16_S_278.value0))(")")) else - if "Data.Maybe∷Maybe.Nothing" == v_S_16_S_271["$ctor"] then + if "Data.Maybe∷Maybe.Nothing" == v_S_16_S_278["$ctor"] then return "Nothing" else return error("No patterns matched") diff --git a/test/ps/output/Golden.LongReaderBind.Test/golden.ir b/test/ps/output/Golden.LongReaderBind.Test/golden.ir index b3bd4a0a..a3d1a4f0 100644 --- a/test/ps/output/Golden.LongReaderBind.Test/golden.ir +++ b/test/ps/output/Golden.LongReaderBind.Test/golden.ir @@ -64,12 +64,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$464" ) ) + ( ParamNamed Nothing ( Name "f$461" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "m$465" ) ) + ( ParamNamed Nothing ( Name "m$462" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$464" ) ) ) - ( Ref Nothing ( Local ( Name "m$465" ) ) ) + ( Ref Nothing ( Local ( Name "f$461" ) ) ) + ( Ref Nothing ( Local ( Name "m$462" ) ) ) ) ) ) @@ -78,13 +78,32 @@ UberModule ) ] ), Standalone + ( QName + { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "bindIdentity" + }, LiteralObject Nothing + [ + ( PropName "bind", Abs Nothing + ( ParamNamed Nothing ( Name "v" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "f" ) ) + ( App Nothing + ( Ref Nothing ( Local ( Name "f" ) ) ) + ( Ref Nothing ( Local ( Name "v" ) ) ) + ) + ) + ), + ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) + ) + ] + ), Standalone ( QName { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "applicativeIdentity" }, LiteralObject Nothing [ ( PropName "pure", Abs Nothing - ( ParamNamed Nothing ( Name "x$466" ) ) - ( Ref Nothing ( Local ( Name "x$466" ) ) ) + ( ParamNamed Nothing ( Name "x$463" ) ) + ( Ref Nothing ( Local ( Name "x$463" ) ) ) ), ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) @@ -137,9 +156,9 @@ UberModule ( Imported ( ModuleName "Control.Monad.Reader.Trans" ) ( Name "compose" ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "f$461" ) ) + ( ParamNamed Nothing ( Name "f$458" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$462" ) ) + ( ParamNamed Nothing ( Name "v$459" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -148,9 +167,9 @@ UberModule ( Name "compose" ) ) ) - ( Ref Nothing ( Local ( Name "f$461" ) ) ) + ( Ref Nothing ( Local ( Name "f$458" ) ) ) ) - ( Ref Nothing ( Local ( Name "v$462" ) ) ) + ( Ref Nothing ( Local ( Name "v$459" ) ) ) ) ) ) @@ -173,54 +192,36 @@ UberModule ) ), Standalone ( QName - { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "bind" - }, App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) + { qnameModuleName = ModuleName "Control.Monad.Reader.Trans", qnameName = Name "bindReaderT" + }, Abs Nothing + ( ParamNamed Nothing ( Name "dictBind" ) ) ( LiteralObject Nothing [ ( PropName "bind", Abs Nothing - ( ParamNamed Nothing ( Name "v$476" ) ) + ( ParamNamed Nothing ( Name "v" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "k$477" ) ) + ( ParamNamed Nothing ( Name "k" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "r$478" ) ) + ( ParamNamed Nothing ( Name "r" ) ) ( App Nothing ( App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) - ( LiteralObject Nothing - [ - ( PropName "bind", Abs Nothing - ( ParamNamed Nothing ( Name "v$480" ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "f$481" ) ) - ( App Nothing - ( Ref Nothing ( Local ( Name "f$481" ) ) ) - ( Ref Nothing ( Local ( Name "v$480" ) ) ) - ) - ) - ), - ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) - ) - ) - ] - ) + ( Ref Nothing ( Local ( Name "dictBind" ) ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "v$476" ) ) ) - ( Ref Nothing ( Local ( Name "r$478" ) ) ) + ( Ref Nothing ( Local ( Name "v" ) ) ) + ( Ref Nothing ( Local ( Name "r" ) ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "a$479" ) ) + ( ParamNamed Nothing ( Name "a" ) ) ( App Nothing ( App Nothing - ( Ref Nothing ( Local ( Name "k$477" ) ) ) - ( Ref Nothing ( Local ( Name "a$479" ) ) ) + ( Ref Nothing ( Local ( Name "k" ) ) ) + ( Ref Nothing ( Local ( Name "a" ) ) ) ) - ( Ref Nothing ( Local ( Name "r$478" ) ) ) + ( Ref Nothing ( Local ( Name "r" ) ) ) ) ) ) @@ -232,26 +233,165 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Control.Monad.Reader.Trans" ) ( Name "applyReaderT" ) ) ) - ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictBind" ) ) ) + ( PropName "Apply0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) ) ) ] ) ), Standalone ( QName - { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "ask" + { qnameModuleName = ModuleName "Control.Monad.Reader.Trans", qnameName = Name "applicativeReaderT" + }, Abs Nothing + ( ParamNamed Nothing ( Name "dictApplicative" ) ) + ( LiteralObject Nothing + [ + ( PropName "pure", App Nothing + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Monad.Reader.Trans" ) ( Name "compose" ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "x$460" ) ) + ( Ref Nothing ( Local ( Name "x$460" ) ) ) + ) + ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Monad.Reader.Trans" ) ( Name "compose" ) ) + ) + ( Abs ( Just Always ) + ( ParamNamed Nothing ( Name "a$306" ) ) + ( Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing ( Local ( Name "a$306" ) ) ) + ) + ) + ) + ( App Nothing + ( Ref Nothing ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) ) + ( Ref Nothing ( Local ( Name "dictApplicative" ) ) ) + ) + ) + ), + ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Monad.Reader.Trans" ) ( Name "applyReaderT" ) ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictApplicative" ) ) ) + ( PropName "Apply0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ) + ] + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "bind" }, App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) ) - ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applicativeIdentity" ) ) ) + ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Monad.Reader.Trans" ) ( Name "bindReaderT" ) ) + ) + ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "ask" + }, ObjectProp Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "dictMonad$455", LiteralObject Nothing + [ + ( PropName "Applicative0", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Identity" ) ( Name "applicativeIdentity" ) ) + ) + ), + ( PropName "Bind1", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) + ) + ) + ] + ) :| [] + ) + ( LiteralObject Nothing + [ + ( PropName "ask", App Nothing + ( Ref Nothing ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$455" ) ) ) + ( PropName "Applicative0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ), + ( PropName "Monad0", Abs Nothing ( ParamUnused Nothing ) + ( LiteralObject Nothing + [ + ( PropName "Applicative0", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Reader.Trans" ) + ( Name "applicativeReaderT" ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$455" ) ) ) + ( PropName "Applicative0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ), + ( PropName "Bind1", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Reader.Trans" ) + ( Name "bindReaderT" ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$455" ) ) ) + ( PropName "Bind1" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ) + ] + ) + ) + ] + ) + ) + ( PropName "ask" ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont484", Abs Nothing - ( ParamNamed Nothing ( Name "x1$485" ) ) + ( Nothing, Name "$kont469", Abs Nothing + ( ParamNamed Nothing ( Name "x1$470" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x100$486" ) ) + ( ParamNamed Nothing ( Name "x100$471" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -885,92 +1025,19 @@ UberModule ( Name "pure" ) ) ) - ( LiteralObject Nothing - [ - ( PropName "pure", App Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Reader.Trans" ) - ( Name "compose" ) - ) - ) - ( Abs Nothing - ( ParamNamed Nothing - ( Name "x$463$473" ) - ) - ( Ref Nothing - ( Local - ( Name "x$463$473" ) - ) - ) - ) - ) - ( App Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Reader.Trans" ) - ( Name "compose" ) - ) - ) - ( Abs ( Just Always ) - ( ParamNamed Nothing - ( Name "a$306$474" ) - ) - ( Abs Nothing ( ParamUnused Nothing ) - ( Ref Nothing - ( Local - ( Name "a$306$474" ) - ) - ) - ) - ) - ) - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Applicative" ) - ( Name "pure" ) - ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Data.Identity" ) - ( Name "applicativeIdentity" ) - ) - ) - ) - ) - ), - ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Reader.Trans" ) - ( Name "applyReaderT" ) - ) - ) - ( App Nothing - ( ObjectProp Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Data.Identity" ) - ( Name "applicativeIdentity" ) - ) - ) - ( PropName "Apply0" ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Prim" ) - ( Name "undefined" ) - ) - ) - ) - ) + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Reader.Trans" ) + ( Name "applicativeReaderT" ) ) - ] + ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Identity" ) + ( Name "applicativeIdentity" ) + ) + ) ) ) ( App Nothing @@ -997,13 +1064,13 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$485" ) + ( Name "x1$470" ) ) ) ) ( Ref Nothing ( Local - ( Name "x100$486" ) + ( Name "x100$471" ) ) ) ) @@ -1098,10 +1165,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont487", Abs Nothing - ( ParamNamed Nothing ( Name "x1$488" ) ) + ( Nothing, Name "$kont472", Abs Nothing + ( ParamNamed Nothing ( Name "x1$473" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x100$489" ) ) + ( ParamNamed Nothing ( Name "x100$474" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -1734,18 +1801,18 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont484" ) + ( Name "$kont469" ) ) ) ( Ref Nothing ( Local - ( Name "x1$488" ) + ( Name "x1$473" ) ) ) ) ( Ref Nothing ( Local - ( Name "x100$489" ) + ( Name "x100$474" ) ) ) ) @@ -1831,8 +1898,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont490", Abs Nothing - ( ParamNamed Nothing ( Name "x1$491" ) ) + ( Nothing, Name "$kont475", Abs Nothing + ( ParamNamed Nothing ( Name "x1$476" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -2462,12 +2529,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont487" ) + ( Name "$kont472" ) ) ) ( Ref Nothing ( Local - ( Name "x1$491" ) + ( Name "x1$476" ) ) ) ) @@ -2558,8 +2625,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont492", Abs Nothing - ( ParamNamed Nothing ( Name "x1$493" ) ) + ( Nothing, Name "$kont477", Abs Nothing + ( ParamNamed Nothing ( Name "x1$478" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -3185,12 +3252,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont490" ) + ( Name "$kont475" ) ) ) ( Ref Nothing ( Local - ( Name "x1$493" ) + ( Name "x1$478" ) ) ) ) @@ -3895,7 +3962,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont492" ) + ( Name "$kont477" ) ) ) ( Ref Nothing diff --git a/test/ps/output/Golden.LongReaderBind.Test/golden.lua b/test/ps/output/Golden.LongReaderBind.Test/golden.lua index d42cf65d..6aed3fbe 100644 --- a/test/ps/output/Golden.LongReaderBind.Test/golden.lua +++ b/test/ps/output/Golden.LongReaderBind.Test/golden.lua @@ -14,14 +14,18 @@ M.Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_464) - return function(m_S_465) return f_S_464(m_S_465) end + map = function(f_S_461) + return function(m_S_462) return f_S_461(m_S_462) end end } end } +M.Data_Identity_bindIdentity = { + bind = function(v) return function(f) return f(v) end end, + Apply0 = function() return M.Data_Identity_applyIdentity end +} M.Data_Identity_applicativeIdentity = { - pure = function(x_S_466) return x_S_466 end, + pure = function(x_S_463) return x_S_463 end, Apply0 = function() return M.Data_Identity_applyIdentity end } M.Control_Monad_Reader_Trans_compose = M.Control_Semigroupoid_compose(M.Control_Semigroupoid_semigroupoidFn) @@ -34,38 +38,54 @@ M.Control_Monad_Reader_Trans_applyReaderT = function(dictApply) end, Functor0 = function() return { - map = M.Control_Monad_Reader_Trans_compose(function(f_S_461) - return function(v_S_462) - return M.Control_Monad_Reader_Trans_compose(f_S_461)(v_S_462) + map = M.Control_Monad_Reader_Trans_compose(function(f_S_458) + return function(v_S_459) + return M.Control_Monad_Reader_Trans_compose(f_S_458)(v_S_459) end end)((dictApply.Functor0()).map) } end } end -M.Golden_LongReaderBind_Test_bind = M.Control_Bind_bind({ - bind = function(v_S_476) - return function(k_S_477) - return function(r_S_478) - return M.Control_Bind_bind({ - bind = function(v_S_480) - return function(f_S_481) return f_S_481(v_S_480) end - end, - Apply0 = function() return M.Data_Identity_applyIdentity end - })(v_S_476(r_S_478))(function(a_S_479) - return k_S_477(a_S_479)(r_S_478) - end) +M.Control_Monad_Reader_Trans_bindReaderT = function(dictBind) + return { + bind = function(v) + return function(k) + return function(r) + return M.Control_Bind_bind(dictBind)(v(r))(function(a) + return k(a)(r) + end) + end end + end, + Apply0 = function() + return M.Control_Monad_Reader_Trans_applyReaderT(dictBind.Apply0()) end - end, - Apply0 = function() - return M.Control_Monad_Reader_Trans_applyReaderT(M.Data_Identity_applyIdentity) - end -}) -M.Golden_LongReaderBind_Test_ask = M.Control_Applicative_pure(M.Data_Identity_applicativeIdentity) + } +end +M.Control_Monad_Reader_Trans_applicativeReaderT = function(dictApplicative) + return { + pure = M.Control_Monad_Reader_Trans_compose(function(x_S_460) + return x_S_460 + end)(M.Control_Monad_Reader_Trans_compose(function(a_S_306) + return function() return a_S_306 end + end)(M.Control_Applicative_pure(dictApplicative))), + Apply0 = function() + return M.Control_Monad_Reader_Trans_applyReaderT(dictApplicative.Apply0()) + end + } +end +M.Golden_LongReaderBind_Test_bind = M.Control_Bind_bind(M.Control_Monad_Reader_Trans_bindReaderT(M.Data_Identity_bindIdentity)) +M.Golden_LongReaderBind_Test_ask = (function() + local dictMonad_S_455 = { + Applicative0 = function() return M.Data_Identity_applicativeIdentity end, + Bind1 = function() return M.Data_Identity_bindIdentity end + } + return M.Control_Applicative_pure(dictMonad_S_455.Applicative0()) +end)() M.Golden_LongReaderBind_Test_go = (function() - local _S_kont484 = function(x1_S_485) - return function(x100_S_486) + local _S_kont469 = function(x1_S_470) + return function(x100_S_471) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) @@ -106,18 +126,7 @@ M.Golden_LongReaderBind_Test_go = (function() return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( x200 ) - return M.Control_Applicative_pure({ - pure = M.Control_Monad_Reader_Trans_compose(function( x_S_463_S_473 ) - return x_S_463_S_473 - end)(M.Control_Monad_Reader_Trans_compose(function( a_S_306_S_474 ) - return function( ) - return a_S_306_S_474 - end - end)(M.Control_Applicative_pure(M.Data_Identity_applicativeIdentity))), - Apply0 = function( ) - return M.Control_Monad_Reader_Trans_applyReaderT(M.Data_Identity_applicativeIdentity.Apply0()) - end - })(M.Data_Semiring_foreign.intAdd(M.Data_Semiring_foreign.intAdd(x1_S_485)(x100_S_486))(x200)) + return M.Control_Applicative_pure(M.Control_Monad_Reader_Trans_applicativeReaderT(M.Data_Identity_applicativeIdentity))(M.Data_Semiring_foreign.intAdd(M.Data_Semiring_foreign.intAdd(x1_S_470)(x100_S_471))(x200)) end) end) end) @@ -160,8 +169,8 @@ M.Golden_LongReaderBind_Test_go = (function() end) end end - local _S_kont487 = function(x1_S_488) - return function(x100_S_489) + local _S_kont472 = function(x1_S_473) + return function(x100_S_474) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) @@ -202,7 +211,7 @@ M.Golden_LongReaderBind_Test_go = (function() return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) - return _S_kont484(x1_S_488)(x100_S_489) + return _S_kont469(x1_S_473)(x100_S_474) end) end) end) @@ -245,7 +254,7 @@ M.Golden_LongReaderBind_Test_go = (function() end) end end - local _S_kont490 = function(x1_S_491) + local _S_kont475 = function(x1_S_476) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) @@ -286,7 +295,7 @@ M.Golden_LongReaderBind_Test_go = (function() return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) - return _S_kont487(x1_S_491)(x100) + return _S_kont472(x1_S_476)(x100) end) end) end) @@ -328,7 +337,7 @@ M.Golden_LongReaderBind_Test_go = (function() end) end) end - local _S_kont492 = function(x1_S_493) + local _S_kont477 = function(x1_S_478) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) @@ -369,7 +378,7 @@ M.Golden_LongReaderBind_Test_go = (function() return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) - return _S_kont490(x1_S_493) + return _S_kont475(x1_S_478) end) end) end) @@ -451,7 +460,7 @@ M.Golden_LongReaderBind_Test_go = (function() return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) return M.Golden_LongReaderBind_Test_bind(M.Golden_LongReaderBind_Test_ask)(function( ) - return _S_kont492(x1) + return _S_kont477(x1) end) end) end) diff --git a/test/ps/output/Golden.LongStackBind.Test/golden.ir b/test/ps/output/Golden.LongStackBind.Test/golden.ir index a1010f5d..2f7943ba 100644 --- a/test/ps/output/Golden.LongStackBind.Test/golden.ir +++ b/test/ps/output/Golden.LongStackBind.Test/golden.ir @@ -208,7 +208,7 @@ UberModule ( PropName "map", Abs Nothing ( ParamNamed Nothing ( Name "f" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$548" ) ) + ( ParamNamed Nothing ( Name "v$542" ) ) ( App Nothing ( App Nothing ( App Nothing @@ -221,14 +221,14 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$557" ) ) + ( ParamNamed Nothing ( Name "f$551" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "m$558" ) ) + ( ParamNamed Nothing ( Name "m$552" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "m$558" ) ) ) + ( Ref Nothing ( Local ( Name "m$552" ) ) ) ) ) ( App Nothing @@ -236,7 +236,7 @@ UberModule ( Imported ( ModuleName "Data.Either" ) ( Name "Left" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "m$558" ) ) ) + ( Ref Nothing ( Local ( Name "m$552" ) ) ) ( PropName "value0" ) ) ) @@ -244,7 +244,7 @@ UberModule ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "m$558" ) ) ) + ( Ref Nothing ( Local ( Name "m$552" ) ) ) ) ) ( App Nothing @@ -252,9 +252,9 @@ UberModule ( Imported ( ModuleName "Data.Either" ) ( Name "Right" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$557" ) ) ) + ( Ref Nothing ( Local ( Name "f$551" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "m$558" ) ) ) + ( Ref Nothing ( Local ( Name "m$552" ) ) ) ( PropName "value0" ) ) ) @@ -270,7 +270,7 @@ UberModule ( Ref Nothing ( Local ( Name "f" ) ) ) ) ) - ( Ref Nothing ( Local ( Name "v$548" ) ) ) + ( Ref Nothing ( Local ( Name "v$542" ) ) ) ) ) ) @@ -334,11 +334,11 @@ UberModule ( Ref Nothing ( Local ( Name "v" ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v2$556" ) ) + ( ParamNamed Nothing ( Name "v2$550" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$556" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$550" ) ) ) ) ) ( App Nothing ( App Nothing @@ -372,19 +372,19 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v2$556" ) ) ) + ( Ref Nothing ( Local ( Name "v2$550" ) ) ) ( PropName "value0" ) ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$556" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$550" ) ) ) ) ) ( App Nothing ( Ref Nothing ( Local ( Name "k" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v2$556" ) ) ) + ( Ref Nothing ( Local ( Name "v2$550" ) ) ) ( PropName "value0" ) ) ) @@ -473,8 +473,8 @@ UberModule ( Imported ( ModuleName "Control.Monad.Except.Trans" ) ( Name "compose" ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x$549" ) ) - ( Ref Nothing ( Local ( Name "x$549" ) ) ) + ( ParamNamed Nothing ( Name "x$543" ) ) + ( Ref Nothing ( Local ( Name "x$543" ) ) ) ) ) ( App Nothing @@ -627,11 +627,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$543" ) ) + ( ParamNamed Nothing ( Name "f$537" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$544" ) ) + ( ParamNamed Nothing ( Name "v$538" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "s$545" ) ) + ( ParamNamed Nothing ( Name "s$539" ) ) ( App Nothing ( App Nothing ( App Nothing @@ -668,30 +668,30 @@ UberModule ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v1$546" ) ) + ( ParamNamed Nothing ( Name "v1$540" ) ) ( App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$543" ) ) ) + ( Ref Nothing ( Local ( Name "f$537" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$546" ) ) ) + ( Ref Nothing ( Local ( Name "v1$540" ) ) ) ( PropName "value0" ) ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$546" ) ) ) + ( Ref Nothing ( Local ( Name "v1$540" ) ) ) ( PropName "value1" ) ) ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "v$544" ) ) ) - ( Ref Nothing ( Local ( Name "s$545" ) ) ) + ( Ref Nothing ( Local ( Name "v$538" ) ) ) + ( Ref Nothing ( Local ( Name "s$539" ) ) ) ) ) ) @@ -761,8 +761,8 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", Abs Nothing - ( ParamNamed Nothing ( Name "x$552" ) ) - ( Ref Nothing ( Local ( Name "x$552" ) ) ) + ( ParamNamed Nothing ( Name "x$546" ) ) + ( Ref Nothing ( Local ( Name "x$546" ) ) ) ), ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing @@ -776,12 +776,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "bind", Abs Nothing - ( ParamNamed Nothing ( Name "v$128$550" ) ) + ( ParamNamed Nothing ( Name "v$128$544" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "f$129$551" ) ) + ( ParamNamed Nothing ( Name "f$129$545" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$129$551" ) ) ) - ( Ref Nothing ( Local ( Name "v$128$550" ) ) ) + ( Ref Nothing ( Local ( Name "f$129$545" ) ) ) + ( Ref Nothing ( Local ( Name "v$128$544" ) ) ) ) ) ), @@ -923,8 +923,8 @@ UberModule { qnameModuleName = ModuleName "Golden.LongStackBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont563", Abs Nothing - ( ParamNamed Nothing ( Name "x1$564" ) ) + ( Nothing, Name "$kont558", Abs Nothing + ( ParamNamed Nothing ( Name "x1$559" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -1482,7 +1482,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$564" ) + ( Name "x1$559" ) ) ) ) @@ -1537,8 +1537,8 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont565", Abs Nothing - ( ParamNamed Nothing ( Name "x1$566" ) ) + ( Nothing, Name "$kont560", Abs Nothing + ( ParamNamed Nothing ( Name "x1$561" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -2609,12 +2609,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont563" ) + ( Name "$kont558" ) ) ) ( Ref Nothing ( Local - ( Name "x1$566" ) + ( Name "x1$561" ) ) ) ) @@ -2699,8 +2699,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont567", Abs Nothing - ( ParamNamed Nothing ( Name "x1$568" ) ) + ( Nothing, Name "$kont562", Abs Nothing + ( ParamNamed Nothing ( Name "x1$563" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -3771,12 +3771,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont565" ) + ( Name "$kont560" ) ) ) ( Ref Nothing ( Local - ( Name "x1$568" ) + ( Name "x1$563" ) ) ) ) @@ -3861,8 +3861,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont569", Abs Nothing - ( ParamNamed Nothing ( Name "x1$570" ) ) + ( Nothing, Name "$kont564", Abs Nothing + ( ParamNamed Nothing ( Name "x1$565" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -4931,12 +4931,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont567" ) + ( Name "$kont562" ) ) ) ( Ref Nothing ( Local - ( Name "x1$570" ) + ( Name "x1$565" ) ) ) ) @@ -5021,8 +5021,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont571", Abs Nothing - ( ParamNamed Nothing ( Name "x1$572" ) ) + ( Nothing, Name "$kont566", Abs Nothing + ( ParamNamed Nothing ( Name "x1$567" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -6091,12 +6091,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont569" ) + ( Name "$kont564" ) ) ) ( Ref Nothing ( Local - ( Name "x1$572" ) + ( Name "x1$567" ) ) ) ) @@ -6181,8 +6181,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont573", Abs Nothing - ( ParamNamed Nothing ( Name "x1$574" ) ) + ( Nothing, Name "$kont568", Abs Nothing + ( ParamNamed Nothing ( Name "x1$569" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -7251,12 +7251,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont571" ) + ( Name "$kont566" ) ) ) ( Ref Nothing ( Local - ( Name "x1$574" ) + ( Name "x1$569" ) ) ) ) @@ -7341,8 +7341,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont575", Abs Nothing - ( ParamNamed Nothing ( Name "x1$576" ) ) + ( Nothing, Name "$kont570", Abs Nothing + ( ParamNamed Nothing ( Name "x1$571" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -8411,12 +8411,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont573" ) + ( Name "$kont568" ) ) ) ( Ref Nothing ( Local - ( Name "x1$576" ) + ( Name "x1$571" ) ) ) ) @@ -9551,7 +9551,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont575" ) + ( Name "$kont570" ) ) ) ( Ref Nothing @@ -9679,9 +9679,9 @@ UberModule ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$553" ) ) + ( ParamNamed Nothing ( Name "v$547" ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$553" ) ) ) + ( Ref Nothing ( Local ( Name "v$547" ) ) ) ( PropName "value0" ) ) ) @@ -9714,11 +9714,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$228$539" ) ) + ( ParamNamed Nothing ( Name "v$228$557" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$228$539" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$228$557" ) ) ) ) ) ( App Nothing ( App Nothing @@ -9755,7 +9755,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$228$539" ) ) ) + ( Ref Nothing ( Local ( Name "v$228$557" ) ) ) ( PropName "value0" ) ) ) @@ -9766,7 +9766,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Right" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$228$539" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$228$557" ) ) ) ) ) ( App Nothing ( App Nothing @@ -9803,7 +9803,7 @@ UberModule ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$228$539" ) ) ) + ( Ref Nothing ( Local ( Name "v$228$557" ) ) ) ( PropName "value0" ) ) ) diff --git a/test/ps/output/Golden.LongStackBind.Test/golden.lua b/test/ps/output/Golden.LongStackBind.Test/golden.lua index c60f4a00..2ba03eb5 100644 --- a/test/ps/output/Golden.LongStackBind.Test/golden.lua +++ b/test/ps/output/Golden.LongStackBind.Test/golden.lua @@ -96,22 +96,22 @@ M.Control_Monad_Except_Trans_compose = M.Control_Semigroupoid_compose(M.Control_ M.Control_Monad_Except_Trans_functorExceptT = function(dictFunctor) return { map = function(f) - return function(v_S_548) + return function(v_S_542) return M.Data_Functor_map(dictFunctor)(M.Data_Functor_map({ - map = function(f_S_557) - return function(m_S_558) - if "Data.Either∷Either.Left" == m_S_558["$ctor"] then - return M.Data_Either_Left(m_S_558.value0) + map = function(f_S_551) + return function(m_S_552) + if "Data.Either∷Either.Left" == m_S_552["$ctor"] then + return M.Data_Either_Left(m_S_552.value0) else - if "Data.Either∷Either.Right" == m_S_558["$ctor"] then - return M.Data_Either_Right(f_S_557(m_S_558.value0)) + if "Data.Either∷Either.Right" == m_S_552["$ctor"] then + return M.Data_Either_Right(f_S_551(m_S_552.value0)) else return error("No patterns matched") end end end end - })(f))(v_S_548) + })(f))(v_S_542) end end } @@ -130,12 +130,12 @@ M.Control_Monad_Except_Trans_bindExceptT = function(dictMonad) return { bind = function(v) return function(k) - return M.Control_Bind_bind(dictMonad.Bind1())(v)(function(v2_S_556) - if "Data.Either∷Either.Left" == v2_S_556["$ctor"] then - return M.Control_Monad_Except_Trans_compose(M.Control_Applicative_pure(dictMonad.Applicative0()))(M.Data_Either_Left)(v2_S_556.value0) + return M.Control_Bind_bind(dictMonad.Bind1())(v)(function(v2_S_550) + if "Data.Either∷Either.Left" == v2_S_550["$ctor"] then + return M.Control_Monad_Except_Trans_compose(M.Control_Applicative_pure(dictMonad.Applicative0()))(M.Data_Either_Left)(v2_S_550.value0) else - if "Data.Either∷Either.Right" == v2_S_556["$ctor"] then - return k(v2_S_556.value0) + if "Data.Either∷Either.Right" == v2_S_550["$ctor"] then + return k(v2_S_550.value0) else return error("No patterns matched") end @@ -158,8 +158,8 @@ M.Control_Monad_Except_Trans_applyExceptT = function(dictMonad) end M.Control_Monad_Except_Trans_applicativeExceptT = function(dictMonad) return { - pure = M.Control_Monad_Except_Trans_compose(function(x_S_549) - return x_S_549 + pure = M.Control_Monad_Except_Trans_compose(function(x_S_543) + return x_S_543 end)(M.Control_Monad_Except_Trans_compose(M.Control_Applicative_pure(dictMonad.Applicative0()))(M.Data_Either_Right)), Apply0 = function() return M.Control_Monad_Except_Trans_applyExceptT(dictMonad) @@ -197,12 +197,12 @@ M.Control_Monad_State_Trans_applyStateT = function(dictMonad) apply = M.Control_Monad_ap(M.Control_Monad_State_Trans_monadStateT(dictMonad)), Functor0 = function() return { - map = function(f_S_543) - return function(v_S_544) - return function(s_S_545) - return M.Data_Functor_map(((dictMonad.Bind1()).Apply0()).Functor0())(function( v1_S_546 ) - return M.Data_Tuple_Tuple(f_S_543(v1_S_546.value0))(v1_S_546.value1) - end)(v_S_544(s_S_545)) + map = function(f_S_537) + return function(v_S_538) + return function(s_S_539) + return M.Data_Functor_map(((dictMonad.Bind1()).Apply0()).Functor0())(function( v1_S_540 ) + return M.Data_Tuple_Tuple(f_S_537(v1_S_540.value0))(v1_S_540.value1) + end)(v_S_538(s_S_539)) end end end @@ -225,14 +225,14 @@ end M.Golden_LongStackBind_Test_monadExceptT = M.Control_Monad_Except_Trans_monadExceptT({ Applicative0 = function() return { - pure = function(x_S_552) return x_S_552 end, + pure = function(x_S_546) return x_S_546 end, Apply0 = function() return M.Data_Identity_applyIdentity end } end, Bind1 = function() return { - bind = function(v_S_128_S_550) - return function(f_S_129_S_551) return f_S_129_S_551(v_S_128_S_550) end + bind = function(v_S_128_S_544) + return function(f_S_129_S_545) return f_S_129_S_545(v_S_128_S_544) end end, Apply0 = function() return M.Data_Identity_applyIdentity end } @@ -258,7 +258,7 @@ M.Golden_LongStackBind_Test_put = function(s_S_109) end) end M.Golden_LongStackBind_Test_go = (function() - local _S_kont563 = function(x1_S_564) + local _S_kont558 = function(x1_S_559) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x141 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x141)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x142 ) @@ -280,7 +280,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x150 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x150)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( final ) - return M.Control_Applicative_pure(M.Control_Monad_State_Trans_applicativeStateT(M.Golden_LongStackBind_Test_monadExceptT))(M.Data_Semiring_foreign.intAdd(x1_S_564)(final)) + return M.Control_Applicative_pure(M.Control_Monad_State_Trans_applicativeStateT(M.Golden_LongStackBind_Test_monadExceptT))(M.Data_Semiring_foreign.intAdd(x1_S_559)(final)) end) end) end) @@ -303,7 +303,7 @@ M.Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont565 = function(x1_S_566) + local _S_kont560 = function(x1_S_561) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x121 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x121)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x122 ) @@ -344,7 +344,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x139)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x140 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x140)(1)))(function( ) - return _S_kont563(x1_S_566) + return _S_kont558(x1_S_561) end) end) end) @@ -386,7 +386,7 @@ M.Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont567 = function(x1_S_568) + local _S_kont562 = function(x1_S_563) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x101 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x101)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x102 ) @@ -427,7 +427,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x119)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x120 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x120)(1)))(function( ) - return _S_kont565(x1_S_568) + return _S_kont560(x1_S_563) end) end) end) @@ -469,7 +469,7 @@ M.Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont569 = function(x1_S_570) + local _S_kont564 = function(x1_S_565) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x81 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x81)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x82 ) @@ -510,7 +510,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x99)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x100 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x100)(1)))(function( ) - return _S_kont567(x1_S_570) + return _S_kont562(x1_S_565) end) end) end) @@ -552,7 +552,7 @@ M.Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont571 = function(x1_S_572) + local _S_kont566 = function(x1_S_567) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x61 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x61)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x62 ) @@ -593,7 +593,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x79)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x80 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x80)(1)))(function( ) - return _S_kont569(x1_S_572) + return _S_kont564(x1_S_567) end) end) end) @@ -635,7 +635,7 @@ M.Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont573 = function(x1_S_574) + local _S_kont568 = function(x1_S_569) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x41 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x41)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x42 ) @@ -676,7 +676,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x59)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x60 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x60)(1)))(function( ) - return _S_kont571(x1_S_574) + return _S_kont566(x1_S_569) end) end) end) @@ -718,7 +718,7 @@ M.Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont575 = function(x1_S_576) + local _S_kont570 = function(x1_S_571) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x21 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x21)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x22 ) @@ -759,7 +759,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x39)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x40 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x40)(1)))(function( ) - return _S_kont573(x1_S_576) + return _S_kont568(x1_S_571) end) end) end) @@ -841,7 +841,7 @@ M.Golden_LongStackBind_Test_go = (function() return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x19)(1)))(function( ) return M.Golden_LongStackBind_Test_bind(M.Golden_LongStackBind_Test_get)(function( x20 ) return M.Golden_LongStackBind_Test_discard(M.Golden_LongStackBind_Test_put(M.Data_Semiring_foreign.intAdd(x20)(1)))(function( ) - return _S_kont575(x1) + return _S_kont570(x1) end) end) end) @@ -885,20 +885,20 @@ M.Golden_LongStackBind_Test_go = (function() end)() M.Golden_LongStackBind_Test_compute = M.Control_Semigroupoid_compose(M.Control_Semigroupoid_semigroupoidFn)(function(x) return x end)(function( v_S_82 ) return v_S_82 -end)(M.Data_Functor_map(M.Control_Monad_Except_Trans_functorExceptT(M.Data_Identity_functorIdentity))(function( v_S_553 ) - return v_S_553.value0 +end)(M.Data_Functor_map(M.Control_Monad_Except_Trans_functorExceptT(M.Data_Identity_functorIdentity))(function( v_S_547 ) + return v_S_547.value0 end)(M.Golden_LongStackBind_Test_go(0))) return (function(s) return function() print(s) end end)(M.Data_Show_show({ - show = function(v_S_228_S_539) - if "Data.Either∷Either.Left" == v_S_228_S_539["$ctor"] then + show = function(v_S_228_S_557) + if "Data.Either∷Either.Left" == v_S_228_S_557["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Left ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = M.Data_Show_foreign.showStringImpl - })(v_S_228_S_539.value0))(")")) + })(v_S_228_S_557.value0))(")")) else - if "Data.Either∷Either.Right" == v_S_228_S_539["$ctor"] then + if "Data.Either∷Either.Right" == v_S_228_S_557["$ctor"] then return M.Data_Semigroup_foreign.concatString("(Right ")(M.Data_Semigroup_foreign.concatString(M.Data_Show_show({ show = M.Data_Show_foreign.showIntImpl - })(v_S_228_S_539.value0))(")")) + })(v_S_228_S_557.value0))(")")) else return error("No patterns matched") end diff --git a/test/ps/output/Golden.LongStateBind.Test/golden.ir b/test/ps/output/Golden.LongStateBind.Test/golden.ir index bab31c18..6e29004a 100644 --- a/test/ps/output/Golden.LongStateBind.Test/golden.ir +++ b/test/ps/output/Golden.LongStateBind.Test/golden.ir @@ -44,12 +44,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$492" ) ) + ( ParamNamed Nothing ( Name "f$486" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "m$493" ) ) + ( ParamNamed Nothing ( Name "m$487" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$492" ) ) ) - ( Ref Nothing ( Local ( Name "m$493" ) ) ) + ( Ref Nothing ( Local ( Name "f$486" ) ) ) + ( Ref Nothing ( Local ( Name "m$487" ) ) ) ) ) ) @@ -66,8 +66,8 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", Abs Nothing - ( ParamNamed Nothing ( Name "x$494" ) ) - ( Ref Nothing ( Local ( Name "x$494" ) ) ) + ( ParamNamed Nothing ( Name "x$488" ) ) + ( Ref Nothing ( Local ( Name "x$488" ) ) ) ), ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing @@ -208,72 +208,69 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "bind$496", App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) - ( App Nothing - ( ObjectProp Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.State.Trans" ) - ( Name "monadStateT" ) - ) - ) - ( Ref Nothing ( Local ( Name "dictMonad" ) ) ) - ) - ( PropName "Bind1" ) + ( Nothing, Name "dictMonad$489", App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.State.Trans" ) + ( Name "monadStateT" ) ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad" ) ) ) ) :| [] ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "f$497" ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "a$498" ) ) - ( App Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "bind$490", App Nothing + ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "bind$496" ) ) ) - ( Ref Nothing ( Local ( Name "f$497" ) ) ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$489" ) ) ) + ( PropName "Bind1" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "f'$499" ) ) + ) :| [] + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "f$491" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "a$492" ) ) + ( App Nothing ( App Nothing + ( Ref Nothing ( Local ( Name "bind$490" ) ) ) + ( Ref Nothing ( Local ( Name "f$491" ) ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "f'$493" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "bind$496" ) ) ) - ( Ref Nothing ( Local ( Name "a$498" ) ) ) - ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "a'$500" ) ) ( App Nothing + ( Ref Nothing ( Local ( Name "bind$490" ) ) ) + ( Ref Nothing ( Local ( Name "a$492" ) ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "a'$494" ) ) ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Applicative" ) - ( Name "pure" ) - ) - ) ( App Nothing - ( ObjectProp Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.State.Trans" ) - ( Name "monadStateT" ) - ) - ) - ( Ref Nothing ( Local ( Name "dictMonad" ) ) ) + ( Ref Nothing + ( Imported + ( ModuleName "Control.Applicative" ) + ( Name "pure" ) ) - ( PropName "Applicative0" ) ) - ( Ref Nothing - ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$489" ) ) ) + ( PropName "Applicative0" ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) + ) ) ) - ) - ( App Nothing - ( Ref Nothing ( Local ( Name "f'$499" ) ) ) - ( Ref Nothing ( Local ( Name "a'$500" ) ) ) + ( App Nothing + ( Ref Nothing ( Local ( Name "f'$493" ) ) ) + ( Ref Nothing ( Local ( Name "a'$494" ) ) ) + ) ) ) ) @@ -287,11 +284,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$488" ) ) + ( ParamNamed Nothing ( Name "f$482" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$489" ) ) + ( ParamNamed Nothing ( Name "v$483" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "s$490" ) ) + ( ParamNamed Nothing ( Name "s$484" ) ) ( App Nothing ( App Nothing ( ObjectProp Nothing @@ -326,30 +323,30 @@ UberModule ( PropName "map" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v1$491" ) ) + ( ParamNamed Nothing ( Name "v1$485" ) ) ( App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$488" ) ) ) + ( Ref Nothing ( Local ( Name "f$482" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$491" ) ) ) + ( Ref Nothing ( Local ( Name "v1$485" ) ) ) ( PropName "value0" ) ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$491" ) ) ) + ( Ref Nothing ( Local ( Name "v1$485" ) ) ) ( PropName "value1" ) ) ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "v$489" ) ) ) - ( Ref Nothing ( Local ( Name "s$490" ) ) ) + ( Ref Nothing ( Local ( Name "v$483" ) ) ) + ( Ref Nothing ( Local ( Name "s$484" ) ) ) ) ) ) @@ -430,7 +427,7 @@ UberModule ( PropName "state", Abs Nothing ( ParamNamed Nothing ( Name "f$27" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x$509" ) ) + ( ParamNamed Nothing ( Name "x$503" ) ) ( App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) ) @@ -446,7 +443,7 @@ UberModule ) ( App Nothing ( Ref Nothing ( Local ( Name "f$27" ) ) ) - ( Ref Nothing ( Local ( Name "x$509" ) ) ) + ( Ref Nothing ( Local ( Name "x$503" ) ) ) ) ) ) @@ -523,10 +520,10 @@ UberModule { qnameModuleName = ModuleName "Golden.LongStateBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont510", Abs Nothing - ( ParamNamed Nothing ( Name "x1$511" ) ) + ( Nothing, Name "$kont504", Abs Nothing + ( ParamNamed Nothing ( Name "x1$505" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x100$512" ) ) + ( ParamNamed Nothing ( Name "x100$506" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -1100,13 +1097,13 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$511" ) + ( Name "x1$505" ) ) ) ) ( Ref Nothing ( Local - ( Name "x100$512" ) + ( Name "x100$506" ) ) ) ) @@ -1163,10 +1160,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont513", Abs Nothing - ( ParamNamed Nothing ( Name "x1$514" ) ) + ( Nothing, Name "$kont507", Abs Nothing + ( ParamNamed Nothing ( Name "x1$508" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x100$515" ) ) + ( ParamNamed Nothing ( Name "x100$509" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -2241,18 +2238,18 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont510" ) + ( Name "$kont504" ) ) ) ( Ref Nothing ( Local - ( Name "x1$514" ) + ( Name "x1$508" ) ) ) ) ( Ref Nothing ( Local - ( Name "x100$515" ) + ( Name "x100$509" ) ) ) ) @@ -2338,10 +2335,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont516", Abs Nothing - ( ParamNamed Nothing ( Name "x1$517" ) ) + ( Nothing, Name "$kont510", Abs Nothing + ( ParamNamed Nothing ( Name "x1$511" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "x100$518" ) ) + ( ParamNamed Nothing ( Name "x100$512" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -3416,18 +3413,18 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont513" ) + ( Name "$kont507" ) ) ) ( Ref Nothing ( Local - ( Name "x1$517" ) + ( Name "x1$511" ) ) ) ) ( Ref Nothing ( Local - ( Name "x100$518" ) + ( Name "x100$512" ) ) ) ) @@ -3513,8 +3510,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont519", Abs Nothing - ( ParamNamed Nothing ( Name "x1$520" ) ) + ( Nothing, Name "$kont513", Abs Nothing + ( ParamNamed Nothing ( Name "x1$514" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -4584,12 +4581,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont516" ) + ( Name "$kont510" ) ) ) ( Ref Nothing ( Local - ( Name "x1$520" ) + ( Name "x1$514" ) ) ) ) @@ -4680,8 +4677,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont521", Abs Nothing - ( ParamNamed Nothing ( Name "x1$522" ) ) + ( Nothing, Name "$kont515", Abs Nothing + ( ParamNamed Nothing ( Name "x1$516" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -5750,12 +5747,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont519" ) + ( Name "$kont513" ) ) ) ( Ref Nothing ( Local - ( Name "x1$522" ) + ( Name "x1$516" ) ) ) ) @@ -5840,8 +5837,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont523", Abs Nothing - ( ParamNamed Nothing ( Name "x1$524" ) ) + ( Nothing, Name "$kont517", Abs Nothing + ( ParamNamed Nothing ( Name "x1$518" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -6910,12 +6907,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont521" ) + ( Name "$kont515" ) ) ) ( Ref Nothing ( Local - ( Name "x1$524" ) + ( Name "x1$518" ) ) ) ) @@ -7000,8 +6997,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont525", Abs Nothing - ( ParamNamed Nothing ( Name "x1$526" ) ) + ( Nothing, Name "$kont519", Abs Nothing + ( ParamNamed Nothing ( Name "x1$520" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -8070,12 +8067,12 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont523" ) + ( Name "$kont517" ) ) ) ( Ref Nothing ( Local - ( Name "x1$526" ) + ( Name "x1$520" ) ) ) ) @@ -9210,7 +9207,7 @@ UberModule ( App Nothing ( Ref Nothing ( Local - ( Name "$kont525" ) + ( Name "$kont519" ) ) ) ( Ref Nothing diff --git a/test/ps/output/Golden.LongStateBind.Test/golden.lua b/test/ps/output/Golden.LongStateBind.Test/golden.lua index c3078f5d..bc95d586 100644 --- a/test/ps/output/Golden.LongStateBind.Test/golden.lua +++ b/test/ps/output/Golden.LongStateBind.Test/golden.lua @@ -17,8 +17,8 @@ M.Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_492) - return function(m_S_493) return f_S_492(m_S_493) end + map = function(f_S_486) + return function(m_S_487) return f_S_486(m_S_487) end end } end @@ -26,7 +26,7 @@ M.Data_Identity_applyIdentity = { M.Data_Identity_monadIdentity = { Applicative0 = function() return { - pure = function(x_S_494) return x_S_494 end, + pure = function(x_S_488) return x_S_488 end, Apply0 = function() return M.Data_Identity_applyIdentity end } end, @@ -69,12 +69,13 @@ end M.Control_Monad_State_Trans_applyStateT = function(dictMonad) return { apply = (function() - local bind_S_496 = M.Control_Bind_bind((M.Control_Monad_State_Trans_monadStateT(dictMonad)).Bind1()) - return function(f_S_497) - return function(a_S_498) - return bind_S_496(f_S_497)(function(fPrime_S_499) - return bind_S_496(a_S_498)(function(aPrime_S_500) - return M.Control_Applicative_pure((M.Control_Monad_State_Trans_monadStateT(dictMonad)).Applicative0())(fPrime_S_499(aPrime_S_500)) + local dictMonad_S_489 = M.Control_Monad_State_Trans_monadStateT(dictMonad) + local bind_S_490 = M.Control_Bind_bind(dictMonad_S_489.Bind1()) + return function(f_S_491) + return function(a_S_492) + return bind_S_490(f_S_491)(function(fPrime_S_493) + return bind_S_490(a_S_492)(function(aPrime_S_494) + return M.Control_Applicative_pure(dictMonad_S_489.Applicative0())(fPrime_S_493(aPrime_S_494)) end) end) end @@ -82,12 +83,12 @@ M.Control_Monad_State_Trans_applyStateT = function(dictMonad) end)(), Functor0 = function() return { - map = function(f_S_488) - return function(v_S_489) - return function(s_S_490) - return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( v1_S_491 ) - return M.Data_Tuple_Tuple(f_S_488(v1_S_491.value0))(v1_S_491.value1) - end)(v_S_489(s_S_490)) + map = function(f_S_482) + return function(v_S_483) + return function(s_S_484) + return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( v1_S_485 ) + return M.Data_Tuple_Tuple(f_S_482(v1_S_485.value0))(v1_S_485.value1) + end)(v_S_483(s_S_484)) end end end @@ -111,8 +112,8 @@ M.Golden_LongStateBind_Test_bindStateT = M.Control_Monad_State_Trans_bindStateT( M.Golden_LongStateBind_Test_bind = M.Control_Bind_bind(M.Golden_LongStateBind_Test_bindStateT) M.Golden_LongStateBind_Test_monadStateStateT = { state = function(f_S_27) - return function(x_S_509) - return M.Control_Applicative_pure(M.Data_Identity_monadIdentity.Applicative0())(f_S_27(x_S_509)) + return function(x_S_503) + return M.Control_Applicative_pure(M.Data_Identity_monadIdentity.Applicative0())(f_S_27(x_S_503)) end end, Monad0 = function() @@ -129,8 +130,8 @@ M.Golden_LongStateBind_Test_put = function(s_S_57) end) end M.Golden_LongStateBind_Test_go = (function() - local _S_kont510 = function(x1_S_511) - return function(x100_S_512) + local _S_kont504 = function(x1_S_505) + return function(x100_S_506) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x141 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x141)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x142 ) @@ -152,7 +153,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x150 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x150)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( final ) - return M.Control_Applicative_pure(M.Control_Monad_State_Trans_applicativeStateT(M.Data_Identity_monadIdentity))(M.Data_Semiring_foreign.intAdd(M.Data_Semiring_foreign.intAdd(x1_S_511)(x100_S_512))(final)) + return M.Control_Applicative_pure(M.Control_Monad_State_Trans_applicativeStateT(M.Data_Identity_monadIdentity))(M.Data_Semiring_foreign.intAdd(M.Data_Semiring_foreign.intAdd(x1_S_505)(x100_S_506))(final)) end) end) end) @@ -176,8 +177,8 @@ M.Golden_LongStateBind_Test_go = (function() end) end end - local _S_kont513 = function(x1_S_514) - return function(x100_S_515) + local _S_kont507 = function(x1_S_508) + return function(x100_S_509) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x121 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x121)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x122 ) @@ -218,7 +219,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x139)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x140 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x140)(1)))(function( ) - return _S_kont510(x1_S_514)(x100_S_515) + return _S_kont504(x1_S_508)(x100_S_509) end) end) end) @@ -261,8 +262,8 @@ M.Golden_LongStateBind_Test_go = (function() end) end end - local _S_kont516 = function(x1_S_517) - return function(x100_S_518) + local _S_kont510 = function(x1_S_511) + return function(x100_S_512) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x101 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x101)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x102 ) @@ -303,7 +304,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x119)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x120 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x120)(1)))(function( ) - return _S_kont513(x1_S_517)(x100_S_518) + return _S_kont507(x1_S_511)(x100_S_512) end) end) end) @@ -346,7 +347,7 @@ M.Golden_LongStateBind_Test_go = (function() end) end end - local _S_kont519 = function(x1_S_520) + local _S_kont513 = function(x1_S_514) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x81 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x81)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x82 ) @@ -387,7 +388,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x99)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x100 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x100)(1)))(function( ) - return _S_kont516(x1_S_520)(x100) + return _S_kont510(x1_S_514)(x100) end) end) end) @@ -429,7 +430,7 @@ M.Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont521 = function(x1_S_522) + local _S_kont515 = function(x1_S_516) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x61 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x61)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x62 ) @@ -470,7 +471,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x79)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x80 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x80)(1)))(function( ) - return _S_kont519(x1_S_522) + return _S_kont513(x1_S_516) end) end) end) @@ -512,7 +513,7 @@ M.Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont523 = function(x1_S_524) + local _S_kont517 = function(x1_S_518) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x41 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x41)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x42 ) @@ -553,7 +554,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x59)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x60 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x60)(1)))(function( ) - return _S_kont521(x1_S_524) + return _S_kont515(x1_S_518) end) end) end) @@ -595,7 +596,7 @@ M.Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont525 = function(x1_S_526) + local _S_kont519 = function(x1_S_520) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x21 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x21)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x22 ) @@ -636,7 +637,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x39)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x40 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x40)(1)))(function( ) - return _S_kont523(x1_S_526) + return _S_kont517(x1_S_520) end) end) end) @@ -718,7 +719,7 @@ M.Golden_LongStateBind_Test_go = (function() return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x19)(1)))(function( ) return M.Golden_LongStateBind_Test_bind(M.Golden_LongStateBind_Test_get)(function( x20 ) return M.Golden_LongStateBind_Test_discard(M.Golden_LongStateBind_Test_put(M.Data_Semiring_foreign.intAdd(x20)(1)))(function( ) - return _S_kont525(x1) + return _S_kont519(x1) end) end) end) diff --git a/test/ps/output/Golden.LongWriterBind.Test/golden.ir b/test/ps/output/Golden.LongWriterBind.Test/golden.ir index 609a96e5..c81a71ab 100644 --- a/test/ps/output/Golden.LongWriterBind.Test/golden.ir +++ b/test/ps/output/Golden.LongWriterBind.Test/golden.ir @@ -63,6 +63,16 @@ UberModule ( ParamNamed Nothing ( Name "dict" ) ) ( ObjectProp Nothing ( Ref Nothing ( Local ( Name "dict" ) ) ) ( PropName "bind" ) ) ), Standalone + ( QName + { qnameModuleName = ModuleName "Data.Monoid", qnameName = Name "monoidArray" + }, LiteralObject Nothing + [ + ( PropName "mempty", LiteralArray Nothing [] ), + ( PropName "Semigroup0", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) ) + ) + ] + ), Standalone ( QName { qnameModuleName = ModuleName "Data.Tuple", qnameName = Name "Tuple" }, Ctor Nothing ProductType @@ -89,12 +99,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$471" ) ) + ( ParamNamed Nothing ( Name "f$468" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "m$472" ) ) + ( ParamNamed Nothing ( Name "m$469" ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$471" ) ) ) - ( Ref Nothing ( Local ( Name "m$472" ) ) ) + ( Ref Nothing ( Local ( Name "f$468" ) ) ) + ( Ref Nothing ( Local ( Name "m$469" ) ) ) ) ) ) @@ -103,13 +113,32 @@ UberModule ) ] ), Standalone + ( QName + { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "bindIdentity" + }, LiteralObject Nothing + [ + ( PropName "bind", Abs Nothing + ( ParamNamed Nothing ( Name "v" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "f" ) ) + ( App Nothing + ( Ref Nothing ( Local ( Name "f" ) ) ) + ( Ref Nothing ( Local ( Name "v" ) ) ) + ) + ) + ), + ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) + ) + ] + ), Standalone ( QName { qnameModuleName = ModuleName "Data.Identity", qnameName = Name "applicativeIdentity" }, LiteralObject Nothing [ ( PropName "pure", Abs Nothing - ( ParamNamed Nothing ( Name "x$473" ) ) - ( Ref Nothing ( Local ( Name "x$473" ) ) ) + ( ParamNamed Nothing ( Name "x$470" ) ) + ( Ref Nothing ( Local ( Name "x$470" ) ) ) ), ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) @@ -214,9 +243,9 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$466" ) ) + ( ParamNamed Nothing ( Name "f$463" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$469" ) ) + ( ParamNamed Nothing ( Name "v$466" ) ) ( App Nothing ( App Nothing ( App Nothing @@ -226,28 +255,28 @@ UberModule ( Ref Nothing ( Local ( Name "Functor0" ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$467" ) ) + ( ParamNamed Nothing ( Name "v$464" ) ) ( App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f$466" ) ) ) + ( Ref Nothing ( Local ( Name "f$463" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$467" ) ) ) + ( Ref Nothing ( Local ( Name "v$464" ) ) ) ( PropName "value0" ) ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$467" ) ) ) + ( Ref Nothing ( Local ( Name "v$464" ) ) ) ( PropName "value1" ) ) ) ) ) - ( Ref Nothing ( Local ( Name "v$469" ) ) ) + ( Ref Nothing ( Local ( Name "v$466" ) ) ) ) ) ) @@ -260,164 +289,334 @@ UberModule ) ), Standalone ( QName - { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "discard" - }, App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) - ( LiteralObject Nothing - [ - ( PropName "bind", Abs Nothing - ( ParamNamed Nothing ( Name "v$488" ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "k$489" ) ) - ( App Nothing - ( App Nothing - ( App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) - ( LiteralObject Nothing - [ - ( PropName "bind", Abs Nothing - ( ParamNamed Nothing ( Name "v$480$492" ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "f$481$493" ) ) - ( App Nothing - ( Ref Nothing ( Local ( Name "f$481$493" ) ) ) - ( Ref Nothing ( Local ( Name "v$480$492" ) ) ) - ) - ) - ), - ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) - ) - ) - ] - ) - ) - ( Ref Nothing ( Local ( Name "v$488" ) ) ) - ) + { qnameModuleName = ModuleName "Control.Monad.Writer.Trans", qnameName = Name "bindWriterT" + }, Abs Nothing + ( ParamNamed Nothing ( Name "dictSemigroup" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "dictBind" ) ) + ( Let Nothing + ( Standalone + ( Nothing, Name "Apply0", App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictBind" ) ) ) + ( PropName "Apply0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) :| [] + ) + ( LiteralObject Nothing + [ + ( PropName "bind", Abs Nothing + ( ParamNamed Nothing ( Name "v" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v1$490" ) ) + ( ParamNamed Nothing ( Name "k" ) ) ( App Nothing ( App Nothing ( App Nothing - ( Ref Nothing ( Imported ( ModuleName "Data.Functor" ) ( Name "map" ) ) ) - ( App Nothing - ( ObjectProp Nothing - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) - ) - ( PropName "Functor0" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ( Ref Nothing + ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) + ( Ref Nothing ( Local ( Name "dictBind" ) ) ) ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "v3$491" ) ) + ( Ref Nothing ( Local ( Name "v" ) ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "v1" ) ) + ( App Nothing ( App Nothing ( App Nothing ( Ref Nothing - ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) + ( Imported ( ModuleName "Data.Functor" ) ( Name "map" ) ) ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v3$491" ) ) ) - ( PropName "value0" ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "Apply0" ) ) ) + ( PropName "Functor0" ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) + ) ) ) - ( App Nothing + ( Abs Nothing + ( ParamNamed Nothing ( Name "v3" ) ) ( App Nothing ( App Nothing ( Ref Nothing - ( Imported ( ModuleName "Data.Semigroup" ) ( Name "append" ) ) + ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) - ( Ref Nothing - ( Imported - ( ModuleName "Data.Semigroup" ) - ( Name "semigroupArray" ) - ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v3" ) ) ) + ( PropName "value0" ) ) ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$490" ) ) ) - ( PropName "value1" ) + ( App Nothing + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Data.Semigroup" ) + ( Name "append" ) + ) + ) + ( Ref Nothing ( Local ( Name "dictSemigroup" ) ) ) + ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v1" ) ) ) + ( PropName "value1" ) + ) + ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v3" ) ) ) + ( PropName "value1" ) + ) ) ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v3$491" ) ) ) - ( PropName "value1" ) - ) + ) + ) + ( App Nothing + ( Ref Nothing ( Local ( Name "k" ) ) ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "v1" ) ) ) + ( PropName "value0" ) ) ) ) ) - ( App Nothing - ( Ref Nothing ( Local ( Name "k$489" ) ) ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$490" ) ) ) - ( PropName "value0" ) + ) + ) + ), + ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Writer.Trans" ) + ( Name "applyWriterT" ) ) ) + ( Ref Nothing ( Local ( Name "dictSemigroup" ) ) ) ) + ( Ref Nothing ( Local ( Name "Apply0" ) ) ) ) ) - ) - ), - ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) - ( App Nothing + ] + ) + ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Control.Monad.Writer.Trans", qnameName = Name "applicativeWriterT" + }, Abs Nothing + ( ParamNamed Nothing ( Name "dictMonoid" ) ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "dictApplicative" ) ) + ( LiteralObject Nothing + [ + ( PropName "pure", Abs Nothing + ( ParamNamed Nothing ( Name "a" ) ) ( App Nothing - ( Ref Nothing - ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "applyWriterT" ) ) + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) + ) + ( Ref Nothing ( Local ( Name "dictApplicative" ) ) ) ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) + ( App Nothing + ( App Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( Ref Nothing ( Local ( Name "a" ) ) ) + ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonoid" ) ) ) + ( PropName "mempty" ) + ) + ) + ) + ), + ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Writer.Trans" ) + ( Name "applyWriterT" ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonoid" ) ) ) + ( PropName "Semigroup0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictApplicative" ) ) ) + ( PropName "Apply0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) ) ) - ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "applyIdentity" ) ) ) ) - ) - ] + ] + ) ) ), Standalone ( QName - { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "tell" + { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "discard" }, App Nothing - ( App Nothing - ( Ref Nothing - ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "compose" ) ) - ) - ( Abs Nothing - ( ParamNamed Nothing ( Name "x$470" ) ) - ( Ref Nothing ( Local ( Name "x$470" ) ) ) - ) - ) + ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) ( App Nothing ( App Nothing ( Ref Nothing - ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "compose" ) ) - ) - ( App Nothing - ( Ref Nothing ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Identity" ) ( Name "applicativeIdentity" ) ) - ) + ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "bindWriterT" ) ) ) + ( Ref Nothing ( Imported ( ModuleName "Data.Semigroup" ) ( Name "semigroupArray" ) ) ) ) - ( App Nothing - ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) - ( ObjectProp ( Just Always ) - ( ForeignImport Nothing - ( ModuleName "Data.Unit" ) ".spago/p/prelude/26c058c2a053cf4dd7240f0d822ec096c0fecbe1/src/Data/Unit.purs" - [ ( Just Always, Name "unit" ) ] + ( Ref Nothing ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "tell" + }, ObjectProp Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "dictMonad$478", LiteralObject Nothing + [ + ( PropName "Applicative0", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Identity" ) ( Name "applicativeIdentity" ) ) + ) + ), + ( PropName "Bind1", Abs Nothing ( ParamUnused Nothing ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Identity" ) ( Name "bindIdentity" ) ) + ) + ) + ] + ) :| [] + ) + ( LiteralObject Nothing + [ + ( PropName "tell", App Nothing + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "compose" ) ) + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "x$467$479" ) ) + ( Ref Nothing ( Local ( Name "x$467$479" ) ) ) + ) + ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Monad.Writer.Trans" ) ( Name "compose" ) ) + ) + ( App Nothing + ( Ref Nothing + ( Imported ( ModuleName "Control.Applicative" ) ( Name "pure" ) ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$478" ) ) ) + ( PropName "Applicative0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ) + ( App Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple" ) ) ) + ( ObjectProp ( Just Always ) + ( ForeignImport Nothing + ( ModuleName "Data.Unit" ) ".spago/p/prelude/26c058c2a053cf4dd7240f0d822ec096c0fecbe1/src/Data/Unit.purs" + [ ( Just Always, Name "unit" ) ] + ) + ( PropName "unit" ) + ) + ) + ) + ), + ( PropName "Semigroup0", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Monoid" ) ( Name "monoidArray" ) ) + ) + ( PropName "Semigroup0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ), + ( PropName "Monad1", Abs Nothing ( ParamUnused Nothing ) + ( LiteralObject Nothing + [ + ( PropName "Applicative0", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Writer.Trans" ) + ( Name "applicativeWriterT" ) + ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Data.Monoid" ) ( Name "monoidArray" ) ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$478" ) ) ) + ( PropName "Applicative0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ), + ( PropName "Bind1", Abs Nothing ( ParamUnused Nothing ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Writer.Trans" ) + ( Name "bindWriterT" ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Data.Monoid" ) ( Name "monoidArray" ) ) + ) + ( PropName "Semigroup0" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ( App Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dictMonad$478" ) ) ) + ( PropName "Bind1" ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "undefined" ) ) ) + ) + ) + ) + ] + ) ) - ( PropName "unit" ) - ) + ] ) ) + ( PropName "tell" ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont494", App Nothing + ( Nothing, Name "$kont482", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -1229,81 +1428,27 @@ UberModule ( Name "pure" ) ) ) - ( LiteralObject Nothing - [ - ( PropName "pure", Abs Nothing - ( ParamNamed Nothing - ( Name "a$484" ) + ( App Nothing + ( App Nothing + ( Ref Nothing + ( Imported + ( ModuleName "Control.Monad.Writer.Trans" ) + ( Name "applicativeWriterT" ) ) - ( App Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Applicative" ) - ( Name "pure" ) - ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Data.Identity" ) - ( Name "applicativeIdentity" ) - ) - ) - ) - ( App Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Data.Tuple" ) - ( Name "Tuple" ) - ) - ) - ( Ref Nothing - ( Local - ( Name "a$484" ) - ) - ) - ) - ( LiteralArray Nothing [] ) - ) - ) - ), - ( PropName "Apply0", Abs Nothing ( ParamUnused Nothing ) - ( App Nothing - ( App Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Control.Monad.Writer.Trans" ) - ( Name "applyWriterT" ) - ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Data.Semigroup" ) - ( Name "semigroupArray" ) - ) - ) - ) - ( App Nothing - ( ObjectProp Nothing - ( Ref Nothing - ( Imported - ( ModuleName "Data.Identity" ) - ( Name "applicativeIdentity" ) - ) - ) - ( PropName "Apply0" ) - ) - ( Ref Nothing - ( Imported - ( ModuleName "Prim" ) - ( Name "undefined" ) - ) - ) - ) + ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Monoid" ) + ( Name "monoidArray" ) ) ) - ] + ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Identity" ) + ( Name "applicativeIdentity" ) + ) + ) ) ) ( LiteralInt Nothing 42 ) @@ -1389,7 +1534,7 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont495", App Nothing + ( Nothing, Name "$kont483", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -2200,7 +2345,7 @@ UberModule ( Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Local - ( Name "$kont494" ) + ( Name "$kont482" ) ) ) ) @@ -2283,7 +2428,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont496", App Nothing + ( Nothing, Name "$kont484", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -3092,7 +3237,7 @@ UberModule ( Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Local - ( Name "$kont495" ) + ( Name "$kont483" ) ) ) ) @@ -3175,7 +3320,7 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont497", App Nothing + ( Nothing, Name "$kont485", App Nothing ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -3984,7 +4129,7 @@ UberModule ( Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Local - ( Name "$kont496" ) + ( Name "$kont484" ) ) ) ) @@ -4870,7 +5015,7 @@ UberModule ( Abs Nothing ( ParamUnused Nothing ) ( Ref Nothing ( Local - ( Name "$kont497" ) + ( Name "$kont485" ) ) ) ) diff --git a/test/ps/output/Golden.LongWriterBind.Test/golden.lua b/test/ps/output/Golden.LongWriterBind.Test/golden.lua index fe249e82..99d862f4 100644 --- a/test/ps/output/Golden.LongWriterBind.Test/golden.lua +++ b/test/ps/output/Golden.LongWriterBind.Test/golden.lua @@ -22,6 +22,10 @@ M.Data_Semigroup_append = function(dict) return dict.append end M.Data_Functor_map = function(dict) return dict.map end M.Control_Applicative_pure = function(dict) return dict.pure end M.Control_Bind_bind = function(dict) return dict.bind end +M.Data_Monoid_monoidArray = { + mempty = {}, + Semigroup0 = function() return M.Data_Semigroup_semigroupArray end +} M.Data_Tuple_Tuple = function(value0) return function(value1) return { @@ -35,14 +39,18 @@ M.Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_471) - return function(m_S_472) return f_S_471(m_S_472) end + map = function(f_S_468) + return function(m_S_469) return f_S_468(m_S_469) end end } end } +M.Data_Identity_bindIdentity = { + bind = function(v) return function(f) return f(v) end end, + Apply0 = function() return M.Data_Identity_applyIdentity end +} M.Data_Identity_applicativeIdentity = { - pure = function(x_S_473) return x_S_473 end, + pure = function(x_S_470) return x_S_470 end, Apply0 = function() return M.Data_Identity_applyIdentity end } M.Control_Monad_Writer_Trans_compose = M.Control_Semigroupoid_compose(M.Control_Semigroupoid_semigroupoidFn) @@ -61,11 +69,11 @@ M.Control_Monad_Writer_Trans_applyWriterT = function(dictSemigroup) end, Functor0 = function() return { - map = function(f_S_466) - return function(v_S_469) - return M.Data_Functor_map(Functor0)(function(v_S_467) - return M.Data_Tuple_Tuple(f_S_466(v_S_467.value0))(v_S_467.value1) - end)(v_S_469) + map = function(f_S_463) + return function(v_S_466) + return M.Data_Functor_map(Functor0)(function(v_S_464) + return M.Data_Tuple_Tuple(f_S_463(v_S_464.value0))(v_S_464.value1) + end)(v_S_466) end end } @@ -73,30 +81,49 @@ M.Control_Monad_Writer_Trans_applyWriterT = function(dictSemigroup) } end end -M.Golden_LongWriterBind_Test_discard = M.Control_Bind_bind({ - bind = function(v_S_488) - return function(k_S_489) - return M.Control_Bind_bind({ - bind = function(v_S_480_S_492) - return function(f_S_481_S_493) return f_S_481_S_493(v_S_480_S_492) end - end, - Apply0 = function() return M.Data_Identity_applyIdentity end - })(v_S_488)(function(v1_S_490) - return M.Data_Functor_map(M.Data_Identity_applyIdentity.Functor0())(function( v3_S_491 ) - return M.Data_Tuple_Tuple(v3_S_491.value0)(M.Data_Semigroup_append(M.Data_Semigroup_semigroupArray)(v1_S_490.value1)(v3_S_491.value1)) - end)(k_S_489(v1_S_490.value0)) - end) - end - end, - Apply0 = function() - return M.Control_Monad_Writer_Trans_applyWriterT(M.Data_Semigroup_semigroupArray)(M.Data_Identity_applyIdentity) +M.Control_Monad_Writer_Trans_bindWriterT = function(dictSemigroup) + return function(dictBind) + local Apply0 = dictBind.Apply0() + return { + bind = function(v) + return function(k) + return M.Control_Bind_bind(dictBind)(v)(function(v1) + return M.Data_Functor_map(Apply0.Functor0())(function(v3) + return M.Data_Tuple_Tuple(v3.value0)(M.Data_Semigroup_append(dictSemigroup)(v1.value1)(v3.value1)) + end)(k(v1.value0)) + end) + end + end, + Apply0 = function() + return M.Control_Monad_Writer_Trans_applyWriterT(dictSemigroup)(Apply0) + end + } end -}) -M.Golden_LongWriterBind_Test_tell = M.Control_Monad_Writer_Trans_compose(function( x_S_470 ) - return x_S_470 -end)(M.Control_Monad_Writer_Trans_compose(M.Control_Applicative_pure(M.Data_Identity_applicativeIdentity))(M.Data_Tuple_Tuple({}))) +end +M.Control_Monad_Writer_Trans_applicativeWriterT = function(dictMonoid) + return function(dictApplicative) + return { + pure = function(a) + return M.Control_Applicative_pure(dictApplicative)(M.Data_Tuple_Tuple(a)(dictMonoid.mempty)) + end, + Apply0 = function() + return M.Control_Monad_Writer_Trans_applyWriterT(dictMonoid.Semigroup0())(dictApplicative.Apply0()) + end + } + end +end +M.Golden_LongWriterBind_Test_discard = M.Control_Bind_bind(M.Control_Monad_Writer_Trans_bindWriterT(M.Data_Semigroup_semigroupArray)(M.Data_Identity_bindIdentity)) +M.Golden_LongWriterBind_Test_tell = (function() + local dictMonad_S_478 = { + Applicative0 = function() return M.Data_Identity_applicativeIdentity end, + Bind1 = function() return M.Data_Identity_bindIdentity end + } + return M.Control_Monad_Writer_Trans_compose(function(x_S_467_S_479) + return x_S_467_S_479 + end)(M.Control_Monad_Writer_Trans_compose(M.Control_Applicative_pure(dictMonad_S_478.Applicative0()))(M.Data_Tuple_Tuple({}))) +end)() M.Golden_LongWriterBind_Test_go = (function() - local _S_kont494 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ + local _S_kont482 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 161 }))(function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ @@ -216,14 +243,7 @@ M.Golden_LongWriterBind_Test_go = (function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 200 }))(function( ) - return M.Control_Applicative_pure({ - pure = function( a_S_484 ) - return M.Control_Applicative_pure(M.Data_Identity_applicativeIdentity)(M.Data_Tuple_Tuple(a_S_484)({})) - end, - Apply0 = function( ) - return M.Control_Monad_Writer_Trans_applyWriterT(M.Data_Semigroup_semigroupArray)(M.Data_Identity_applicativeIdentity.Apply0()) - end - })(42) + return M.Control_Applicative_pure(M.Control_Monad_Writer_Trans_applicativeWriterT(M.Data_Monoid_monoidArray)(M.Data_Identity_applicativeIdentity))(42) end) end) end) @@ -264,7 +284,7 @@ M.Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont495 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ + local _S_kont483 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 121 }))(function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ @@ -384,7 +404,7 @@ M.Golden_LongWriterBind_Test_go = (function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 160 }))(function( ) - return _S_kont494 + return _S_kont482 end) end) end) @@ -425,7 +445,7 @@ M.Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont496 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ + local _S_kont484 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 81 }))(function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ @@ -545,7 +565,7 @@ M.Golden_LongWriterBind_Test_go = (function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 120 }))(function( ) - return _S_kont495 + return _S_kont483 end) end) end) @@ -586,7 +606,7 @@ M.Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont497 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ + local _S_kont485 = M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 41 }))(function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ @@ -706,7 +726,7 @@ M.Golden_LongWriterBind_Test_go = (function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 80 }))(function( ) - return _S_kont496 + return _S_kont484 end) end) end) @@ -867,7 +887,7 @@ M.Golden_LongWriterBind_Test_go = (function() return M.Golden_LongWriterBind_Test_discard(M.Golden_LongWriterBind_Test_tell({ [1] = 40 }))(function( ) - return _S_kont497 + return _S_kont485 end) end) end) diff --git a/test/ps/output/Golden.MaybeChain.Test/golden.ir b/test/ps/output/Golden.MaybeChain.Test/golden.ir index 9abbed68..2d1232ca 100644 --- a/test/ps/output/Golden.MaybeChain.Test/golden.ir +++ b/test/ps/output/Golden.MaybeChain.Test/golden.ir @@ -279,26 +279,26 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.MaybeChain.Test", qnameName = Name "identity" }, Abs Nothing - ( ParamNamed Nothing ( Name "x$281" ) ) - ( Ref Nothing ( Local ( Name "x$281" ) ) ) + ( ParamNamed Nothing ( Name "x$280" ) ) + ( Ref Nothing ( Local ( Name "x$280" ) ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.MaybeChain.Test", qnameName = Name "map" }, Abs Nothing - ( ParamNamed Nothing ( Name "v$276" ) ) + ( ParamNamed Nothing ( Name "v$275" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v1$277" ) ) + ( ParamNamed Nothing ( Name "v1$276" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$277" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$276" ) ) ) ) ) ( App Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Maybe" ) ( Name "Just" ) ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "v$276" ) ) ) + ( Ref Nothing ( Local ( Name "v$275" ) ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v1$277" ) ) ) + ( Ref Nothing ( Local ( Name "v1$276" ) ) ) ( PropName "value0" ) ) ) diff --git a/test/ps/output/Golden.MaybeChain.Test/golden.lua b/test/ps/output/Golden.MaybeChain.Test/golden.lua index 3b87e068..1d342e61 100644 --- a/test/ps/output/Golden.MaybeChain.Test/golden.lua +++ b/test/ps/output/Golden.MaybeChain.Test/golden.lua @@ -85,11 +85,11 @@ end) M.Golden_MaybeChain_Test_logShow = function(a_S_4) return (function(s) return function() print(s) end end)((function(n) return tostring(n) end)(a_S_4)) end -M.Golden_MaybeChain_Test_identity = function(x_S_281) return x_S_281 end -M.Golden_MaybeChain_Test_map = function(v_S_276) - return function(v1_S_277) - if "Data.Maybe∷Maybe.Just" == v1_S_277["$ctor"] then - return M.Data_Maybe_Just(v_S_276(v1_S_277.value0)) +M.Golden_MaybeChain_Test_identity = function(x_S_280) return x_S_280 end +M.Golden_MaybeChain_Test_map = function(v_S_275) + return function(v1_S_276) + if "Data.Maybe∷Maybe.Just" == v1_S_276["$ctor"] then + return M.Data_Maybe_Just(v_S_275(v1_S_276.value0)) else return M.Data_Maybe_Nothing end diff --git a/test/ps/output/Golden.StringCodePoints.Test/golden.ir b/test/ps/output/Golden.StringCodePoints.Test/golden.ir index 60eafe9d..8fea4c5c 100644 --- a/test/ps/output/Golden.StringCodePoints.Test/golden.ir +++ b/test/ps/output/Golden.StringCodePoints.Test/golden.ir @@ -664,9 +664,9 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", Abs Nothing - ( ParamNamed Nothing ( Name "f$998" ) ) + ( ParamNamed Nothing ( Name "f$997" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "a$999" ) ) + ( ParamNamed Nothing ( Name "a$998" ) ) ( App Nothing ( App Nothing ( ObjectProp Nothing @@ -692,10 +692,10 @@ UberModule ( Imported ( ModuleName "Effect" ) ( Name "applicativeEffect" ) ) ) ) - ( Ref Nothing ( Local ( Name "f$998" ) ) ) + ( Ref Nothing ( Local ( Name "f$997" ) ) ) ) ) - ( Ref Nothing ( Local ( Name "a$999" ) ) ) + ( Ref Nothing ( Local ( Name "a$998" ) ) ) ) ) ) @@ -715,7 +715,7 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "bind$1334", App Nothing + ( Nothing, Name "bind$1317", App Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Bind" ) ( Name "bind" ) ) ) ( App Nothing ( ObjectProp Nothing @@ -729,23 +729,23 @@ UberModule ) :| [] ) ( Abs Nothing - ( ParamNamed Nothing ( Name "f$1335" ) ) + ( ParamNamed Nothing ( Name "f$1318" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "a$1336" ) ) + ( ParamNamed Nothing ( Name "a$1319" ) ) ( App Nothing ( App Nothing - ( Ref Nothing ( Local ( Name "bind$1334" ) ) ) - ( Ref Nothing ( Local ( Name "f$1335" ) ) ) + ( Ref Nothing ( Local ( Name "bind$1317" ) ) ) + ( Ref Nothing ( Local ( Name "f$1318" ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "f'$1337" ) ) + ( ParamNamed Nothing ( Name "f'$1320" ) ) ( App Nothing ( App Nothing - ( Ref Nothing ( Local ( Name "bind$1334" ) ) ) - ( Ref Nothing ( Local ( Name "a$1336" ) ) ) + ( Ref Nothing ( Local ( Name "bind$1317" ) ) ) + ( Ref Nothing ( Local ( Name "a$1319" ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "a'$1338" ) ) + ( ParamNamed Nothing ( Name "a'$1321" ) ) ( App Nothing ( App Nothing ( Ref Nothing @@ -770,8 +770,8 @@ UberModule ) ) ( App Nothing - ( Ref Nothing ( Local ( Name "f'$1337" ) ) ) - ( Ref Nothing ( Local ( Name "a'$1338" ) ) ) + ( Ref Nothing ( Local ( Name "f'$1320" ) ) ) + ( Ref Nothing ( Local ( Name "a'$1321" ) ) ) ) ) ) @@ -1721,19 +1721,19 @@ UberModule ( PropName "unfoldrArrayImpl" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v2$1330$1352" ) ) + ( ParamNamed Nothing ( Name "v2$1313$1335" ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "v2$1330$1352" ) ) ) + ( Ref Nothing ( Local ( Name "v2$1313$1335" ) ) ) ) ) ( LiteralBool Nothing True ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "v2$1330$1352" ) ) ) + ( Ref Nothing ( Local ( Name "v2$1313$1335" ) ) ) ) ) ( LiteralBool Nothing False ) ( Exception Nothing "No patterns matched" ) @@ -1759,17 +1759,17 @@ UberModule ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$1350" ) ) + ( ParamNamed Nothing ( Name "v$1333" ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$1350" ) ) ) + ( Ref Nothing ( Local ( Name "v$1333" ) ) ) ( PropName "value0" ) ) ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "v$1351" ) ) + ( ParamNamed Nothing ( Name "v$1334" ) ) ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "v$1351" ) ) ) + ( Ref Nothing ( Local ( Name "v$1334" ) ) ) ( PropName "value1" ) ) ) @@ -2644,13 +2644,13 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", Abs Nothing - ( ParamNamed Nothing ( Name "v$1236" ) ) + ( ParamNamed Nothing ( Name "v$1235" ) ) ( IfThenElse Nothing - ( Ref Nothing ( Local ( Name "v$1236" ) ) ) + ( Ref Nothing ( Local ( Name "v$1235" ) ) ) ( LiteralString Nothing "true" ) ( IfThenElse Nothing ( Eq Nothing ( LiteralBool Nothing False ) - ( Ref Nothing ( Local ( Name "v$1236" ) ) ) + ( Ref Nothing ( Local ( Name "v$1235" ) ) ) ) ( LiteralString Nothing "false" ) ( Exception Nothing "No patterns matched" ) diff --git a/test/ps/output/Golden.StringCodePoints.Test/golden.lua b/test/ps/output/Golden.StringCodePoints.Test/golden.lua index 0f11b8aa..bfd555da 100644 --- a/test/ps/output/Golden.StringCodePoints.Test/golden.lua +++ b/test/ps/output/Golden.StringCodePoints.Test/golden.lua @@ -428,9 +428,9 @@ M.Effect_applicativeEffect = { } M.Effect_Lazy_functorEffect = PSLUA_runtime_lazy("functorEffect")(function() return { - map = function(f_S_998) - return function(a_S_999) - return (M.Effect_applicativeEffect.Apply0()).apply(M.Control_Applicative_pure(M.Effect_applicativeEffect)(f_S_998))(a_S_999) + map = function(f_S_997) + return function(a_S_998) + return (M.Effect_applicativeEffect.Apply0()).apply(M.Control_Applicative_pure(M.Effect_applicativeEffect)(f_S_997))(a_S_998) end end } @@ -438,12 +438,12 @@ end) M.Effect_Lazy_applyEffect = PSLUA_runtime_lazy("applyEffect")(function() return { apply = (function() - local bind_S_1334 = M.Control_Bind_bind(M.Effect_monadEffect.Bind1()) - return function(f_S_1335) - return function(a_S_1336) - return bind_S_1334(f_S_1335)(function(fPrime_S_1337) - return bind_S_1334(a_S_1336)(function(aPrime_S_1338) - return M.Control_Applicative_pure(M.Effect_monadEffect.Applicative0())(fPrime_S_1337(aPrime_S_1338)) + local bind_S_1317 = M.Control_Bind_bind(M.Effect_monadEffect.Bind1()) + return function(f_S_1318) + return function(a_S_1319) + return bind_S_1317(f_S_1318)(function(fPrime_S_1320) + return bind_S_1317(a_S_1319)(function(aPrime_S_1321) + return M.Control_Applicative_pure(M.Effect_monadEffect.Applicative0())(fPrime_S_1320(aPrime_S_1321)) end) end) end @@ -614,11 +614,11 @@ M.Data_String_CodePoints_toCodePointArray = M.Data_String_CodePoints_foreign._to end end end - end)(function(v2_S_1330_S_1352) - if "Data.Maybe∷Maybe.Nothing" == v2_S_1330_S_1352["$ctor"] then + end)(function(v2_S_1313_S_1335) + if "Data.Maybe∷Maybe.Nothing" == v2_S_1313_S_1335["$ctor"] then return true else - if "Data.Maybe∷Maybe.Just" == v2_S_1330_S_1352["$ctor"] then + if "Data.Maybe∷Maybe.Just" == v2_S_1313_S_1335["$ctor"] then return false else return error("No patterns matched") @@ -626,8 +626,8 @@ M.Data_String_CodePoints_toCodePointArray = M.Data_String_CodePoints_foreign._to end end)(M.Partial_Unsafe_foreign._unsafePartial(function() return M.Data_Maybe_fromJust() - end))(function(v_S_1350) return v_S_1350.value0 end)(function(v_S_1351) - return v_S_1351.value1 + end))(function(v_S_1333) return v_S_1333.value0 end)(function(v_S_1334) + return v_S_1334.value1 end)(function(s_S_11) return M.Data_Functor_map(M.Data_Maybe_functorMaybe)(function(v_S_12) return (function(value0) @@ -751,11 +751,11 @@ return (function() return v0_S_1.tail end))(M.Data_String_CodePoints_uncons("aéЯ𝐀z")))() local _ = M.Effect_Console_logShow({ - show = function(v_S_1236) - if v_S_1236 then + show = function(v_S_1235) + if v_S_1235 then return "true" else - if false == v_S_1236 then + if false == v_S_1235 then return "false" else return error("No patterns matched") diff --git a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir index e216abfc..2625ae65 100644 --- a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir +++ b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir @@ -270,115 +270,123 @@ UberModule ( PropName "tailRecM" ) ) ( Abs Nothing - ( ParamNamed Nothing ( Name "o$451" ) ) - ( IfThenElse Nothing - ( IfThenElse Nothing - ( Eq Nothing - ( LiteralString Nothing "Data.Ordering∷Ordering.LT" ) - ( ReflectCtor Nothing - ( App Nothing - ( App Nothing - ( App Nothing + ( ParamNamed Nothing ( Name "o$450" ) ) + ( App Nothing + ( Let Nothing + ( Standalone + ( Nothing, Name "acc$1", ObjectProp Nothing + ( Ref Nothing ( Local ( Name "o$450" ) ) ) + ( PropName "a" ) + ) :| [] + ) + ( Abs Nothing + ( ParamNamed Nothing ( Name "i$2" ) ) + ( IfThenElse Nothing + ( IfThenElse Nothing + ( Eq Nothing + ( LiteralString Nothing "Data.Ordering∷Ordering.LT" ) + ( ReflectCtor Nothing ( App Nothing ( App Nothing - ( ObjectProp ( Just Always ) - ( ForeignImport Nothing - ( ModuleName "Data.Ord" ) ".spago/p/prelude/26c058c2a053cf4dd7240f0d822ec096c0fecbe1/src/Data/Ord.purs" - [ ( Nothing, Name "ordIntImpl" ) ] + ( App Nothing + ( App Nothing + ( App Nothing + ( ObjectProp ( Just Always ) + ( ForeignImport Nothing + ( ModuleName "Data.Ord" ) ".spago/p/prelude/26c058c2a053cf4dd7240f0d822ec096c0fecbe1/src/Data/Ord.purs" + [ ( Nothing, Name "ordIntImpl" ) ] + ) + ( PropName "ordIntImpl" ) + ) + ( Ctor Nothing SumType + ( ModuleName "Data.Ordering" ) + ( TyName "Ordering" ) + ( CtorName "LT" ) [] + ) + ) + ( Ctor Nothing SumType + ( ModuleName "Data.Ordering" ) + ( TyName "Ordering" ) + ( CtorName "EQ" ) [] + ) + ) + ( Ctor Nothing SumType + ( ModuleName "Data.Ordering" ) + ( TyName "Ordering" ) + ( CtorName "GT" ) [] ) - ( PropName "ordIntImpl" ) - ) - ( Ctor Nothing SumType - ( ModuleName "Data.Ordering" ) - ( TyName "Ordering" ) - ( CtorName "LT" ) [] ) + ( Ref Nothing ( Local ( Name "i$2" ) ) ) ) - ( Ctor Nothing SumType - ( ModuleName "Data.Ordering" ) - ( TyName "Ordering" ) - ( CtorName "EQ" ) [] - ) - ) - ( Ctor Nothing SumType - ( ModuleName "Data.Ordering" ) - ( TyName "Ordering" ) - ( CtorName "GT" ) [] + ( Ref Nothing ( Local ( Name "n" ) ) ) ) ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$451" ) ) ) - ( PropName "b" ) + ) ( LiteralBool Nothing False ) ( LiteralBool Nothing True ) + ) + ( App Nothing + ( Ref Nothing ( Local ( Name "pure" ) ) ) + ( App Nothing + ( Ctor Nothing SumType + ( ModuleName "Control.Monad.Rec.Class" ) + ( TyName "Step" ) + ( CtorName "Done" ) + [ FieldName "value0" ] ) + ( Ref Nothing ( Local ( Name "acc$1" ) ) ) ) - ( Ref Nothing ( Local ( Name "n" ) ) ) ) - ) - ) ( LiteralBool Nothing False ) ( LiteralBool Nothing True ) - ) - ( App Nothing - ( Ref Nothing ( Local ( Name "pure" ) ) ) - ( App Nothing - ( Ctor Nothing SumType - ( ModuleName "Control.Monad.Rec.Class" ) - ( TyName "Step" ) - ( CtorName "Done" ) - [ FieldName "value0" ] - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$451" ) ) ) - ( PropName "a" ) - ) - ) - ) - ( App Nothing - ( Ref Nothing ( Local ( Name "pure" ) ) ) - ( App Nothing - ( Ctor Nothing SumType - ( ModuleName "Control.Monad.Rec.Class" ) - ( TyName "Step" ) - ( CtorName "Loop" ) - [ FieldName "value0" ] - ) - ( LiteralObject Nothing - [ - ( PropName "a", App Nothing - ( App Nothing - ( ObjectProp ( Just Always ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Semiring" ) ( Name "foreign" ) ) - ) - ( PropName "intAdd" ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$451" ) ) ) - ( PropName "a" ) - ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$451" ) ) ) - ( PropName "b" ) + ( App Nothing + ( Ref Nothing ( Local ( Name "pure" ) ) ) + ( App Nothing + ( Ctor Nothing SumType + ( ModuleName "Control.Monad.Rec.Class" ) + ( TyName "Step" ) + ( CtorName "Loop" ) + [ FieldName "value0" ] ) - ), - ( PropName "b", App Nothing - ( App Nothing - ( ObjectProp ( Just Always ) - ( Ref Nothing - ( Imported ( ModuleName "Data.Semiring" ) ( Name "foreign" ) ) + ( LiteralObject Nothing + [ + ( PropName "a", App Nothing + ( App Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Semiring" ) + ( Name "foreign" ) + ) + ) + ( PropName "intAdd" ) + ) + ( Ref Nothing ( Local ( Name "acc$1" ) ) ) + ) + ( Ref Nothing ( Local ( Name "i$2" ) ) ) + ), + ( PropName "b", App Nothing + ( App Nothing + ( ObjectProp ( Just Always ) + ( Ref Nothing + ( Imported + ( ModuleName "Data.Semiring" ) + ( Name "foreign" ) + ) + ) + ( PropName "intAdd" ) + ) + ( Ref Nothing ( Local ( Name "i$2" ) ) ) + ) + ( LiteralInt Nothing 1 ) ) - ( PropName "intAdd" ) - ) - ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$451" ) ) ) - ( PropName "b" ) - ) + ] ) - ( LiteralInt Nothing 1 ) ) - ] + ) ) ) ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "o$450" ) ) ) + ( PropName "b" ) + ) ) ) ) diff --git a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua index d26d6b9b..ff9ca41a 100644 --- a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua +++ b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua @@ -81,54 +81,59 @@ M.Golden_TailRecM2Shadow_Test_sumFrom = function(dictMonadRec) local pure = M.Control_Applicative_pure((dictMonadRec.Monad0()).Applicative0()) return function(b) return function(n) - return dictMonadRec.tailRecM(function(o_S_451) - if (function() - if "Data.Ordering∷Ordering.LT" == ((function() - local unsafeCoerceImpl = function(lt) - return function(eq) - return function(gt) - return function(x) - return function(y) - if x < y then - return lt - elseif x == y then - return eq - else - return gt + return dictMonadRec.tailRecM(function(o_S_450) + return (function() + local acc_S_1 = o_S_450.a + return function(i_S_2) + if (function() + if "Data.Ordering∷Ordering.LT" == ((function() + local unsafeCoerceImpl = function(lt) + return function(eq) + return function(gt) + return function(x) + return function(y) + if x < y then + return lt + elseif x == y then + return eq + else + return gt + end + end end end end end + return unsafeCoerceImpl + end)()({ ["$ctor"] = "Data.Ordering∷Ordering.LT" })({ + ["$ctor"] = "Data.Ordering∷Ordering.EQ" + })({ + ["$ctor"] = "Data.Ordering∷Ordering.GT" + })(i_S_2)(n))["$ctor"] then + return false + else + return true end + end)() then + return pure((function(value0) + return { + ["$ctor"] = "Control.Monad.Rec.Class∷Step.Done", + value0 = value0 + } + end)(acc_S_1)) + else + return pure((function(value0) + return { + ["$ctor"] = "Control.Monad.Rec.Class∷Step.Loop", + value0 = value0 + } + end)({ + a = M.Data_Semiring_foreign.intAdd(acc_S_1)(i_S_2), + b = M.Data_Semiring_foreign.intAdd(i_S_2)(1) + })) end - return unsafeCoerceImpl - end)()({ ["$ctor"] = "Data.Ordering∷Ordering.LT" })({ - ["$ctor"] = "Data.Ordering∷Ordering.EQ" - })({ - ["$ctor"] = "Data.Ordering∷Ordering.GT" - })(o_S_451.b)(n))["$ctor"] then - return false - else - return true end - end)() then - return pure((function(value0) - return { - ["$ctor"] = "Control.Monad.Rec.Class∷Step.Done", - value0 = value0 - } - end)(o_S_451.a)) - else - return pure((function(value0) - return { - ["$ctor"] = "Control.Monad.Rec.Class∷Step.Loop", - value0 = value0 - } - end)({ - a = M.Data_Semiring_foreign.intAdd(o_S_451.a)(o_S_451.b), - b = M.Data_Semiring_foreign.intAdd(o_S_451.b)(1) - })) - end + end)()(o_S_450.b) end)({ a = b, b = 0 }) end end