From 5c55f880e0d5f6aa5ad27c9825be0b9c706b144c Mon Sep 17 00:00:00 2001 From: Yura Lazarev Date: Sun, 26 Jul 2026 15:45:01 +0200 Subject: [PATCH 1/2] test(golden): pin the pre-#236 shapes of Record.Unsafe surgery RecordSurgery is a new golden module exercising Record.Unsafe's unsafeGet/unsafeSet/unsafeDelete/unsafeHas over manifest record literals and over a record read from a Ref (opaque to the optimizer), plus an applied Unsafe.Coerce.unsafeCoerce. Every surgery is pinned as a curried foreign call against the emitted copy-loop FFI table; the eval oracle pins the runtime semantics the folds must preserve. Bench.RecordSet is a new macro benchmark building a record per element through unsafeSet on a manifest two-field literal, read back across a function boundary. Its committed counters pin the pre-fold allocation cost: 4 function-body TNEW+TDUP sites and 14 function-body FNEW sites. --- bench/goldens/fnew_Bench.RecordSet.txt | 21 + bench/goldens/tnew_Bench.RecordSet.txt | 11 + bench/goldens/trace_record_set.txt | 31 ++ bench/macro/record_set.lua | 27 ++ .../Golden.RecordSurgery.Test/corefn.json | 1 + .../Golden.RecordSurgery.Test/eval/.gitignore | 1 + .../Golden.RecordSurgery.Test/eval/golden.txt | 9 + .../Golden.RecordSurgery.Test/golden.ir | 384 ++++++++++++++++++ .../Golden.RecordSurgery.Test/golden.lua | 72 ++++ test/ps/src/Bench/RecordSet.purs | 22 + test/ps/src/Golden/RecordSurgery/Test.purs | 49 +++ 11 files changed, 628 insertions(+) create mode 100644 bench/goldens/fnew_Bench.RecordSet.txt create mode 100644 bench/goldens/tnew_Bench.RecordSet.txt create mode 100644 bench/goldens/trace_record_set.txt create mode 100644 bench/macro/record_set.lua create mode 100644 test/ps/output/Golden.RecordSurgery.Test/corefn.json create mode 100644 test/ps/output/Golden.RecordSurgery.Test/eval/.gitignore create mode 100644 test/ps/output/Golden.RecordSurgery.Test/eval/golden.txt create mode 100644 test/ps/output/Golden.RecordSurgery.Test/golden.ir create mode 100644 test/ps/output/Golden.RecordSurgery.Test/golden.lua create mode 100644 test/ps/src/Bench/RecordSet.purs create mode 100644 test/ps/src/Golden/RecordSurgery/Test.purs diff --git a/bench/goldens/fnew_Bench.RecordSet.txt b/bench/goldens/fnew_Bench.RecordSet.txt new file mode 100644 index 00000000..2cddd443 --- /dev/null +++ b/bench/goldens/fnew_Bench.RecordSet.txt @@ -0,0 +1,21 @@ +chunk: Bench.RecordSet.lua +runtime: LuaJIT 2.1.1741730670 +main-chunk FNEW: 8 +function-body FNEW: 14 +total FNEW: 22 +prototypes: 23 +function-body FNEW sites: + Bench.RecordSet.lua:2 + Bench.RecordSet.lua:11 + Bench.RecordSet.lua:10 + Bench.RecordSet.lua:21 + Bench.RecordSet.lua:33 + Bench.RecordSet.lua:32 + Bench.RecordSet.lua:43 + Bench.RecordSet.lua:42 + Bench.RecordSet.lua:67 + Bench.RecordSet.lua:66 + Bench.RecordSet.lua:65 + Bench.RecordSet.lua:76 + Bench.RecordSet.lua:81 + Bench.RecordSet.lua:75 diff --git a/bench/goldens/tnew_Bench.RecordSet.txt b/bench/goldens/tnew_Bench.RecordSet.txt new file mode 100644 index 00000000..5f306f3f --- /dev/null +++ b/bench/goldens/tnew_Bench.RecordSet.txt @@ -0,0 +1,11 @@ +chunk: Bench.RecordSet.lua +runtime: LuaJIT 2.1.1741730670 +main-chunk TNEW+TDUP: 6 +function-body TNEW+TDUP: 4 +total TNEW+TDUP: 10 +prototypes: 23 +function-body TNEW+TDUP sites: + Bench.RecordSet.lua:6 TNEW + Bench.RecordSet.lua:18 TNEW + Bench.RecordSet.lua:49 TNEW + Bench.RecordSet.lua:77 TDUP diff --git a/bench/goldens/trace_record_set.txt b/bench/goldens/trace_record_set.txt new file mode 100644 index 00000000..ad4d7954 --- /dev/null +++ b/bench/goldens/trace_record_set.txt @@ -0,0 +1,31 @@ +spec: record_set +runtime: LuaJIT 2.1.1741730670 +workload: n=1000000 reps=4 result=15000450000 +aborts (distinct site -- reason): + Bench.RecordSet.lua:10 -- NYI: bytecode FNEW + Bench.RecordSet.lua:11 -- NYI: bytecode FNEW + Bench.RecordSet.lua:2 -- NYI: bytecode FNEW + Bench.RecordSet.lua:21 -- NYI: bytecode FNEW + Bench.RecordSet.lua:42 -- NYI: bytecode FNEW + Bench.RecordSet.lua:43 -- NYI: bytecode FNEW + Bench.RecordSet.lua:51 -- inner loop in root trace + Bench.RecordSet.lua:7 -- inner loop in root trace + Bench.RecordSet.lua:75 -- NYI: bytecode FNEW + Bench.RecordSet.lua:76 -- NYI: bytecode FNEW +bytecode end state (J*=compiled, I*=blacklisted): + Bench.RecordSet.lua:19 IFORL + Bench.RecordSet.lua:2 IFUNCF + Bench.RecordSet.lua:2 JFUNCF + Bench.RecordSet.lua:3 IFUNCF + Bench.RecordSet.lua:4 IFUNCF + Bench.RecordSet.lua:40 IFORL + Bench.RecordSet.lua:5 IFUNCF + Bench.RecordSet.lua:51 JLOOP + Bench.RecordSet.lua:7 JLOOP + Bench.RecordSet.lua:72 IFUNCF + Bench.RecordSet.lua:73 IFUNCF + Bench.RecordSet.lua:76 IFUNCF + record_set.lua:19 JFUNCF + record_set.lua:21 JFORI + record_set.lua:21 JFORL +counts: aborts=10 compiled=6 blacklisted=9 diff --git a/bench/macro/record_set.lua b/bench/macro/record_set.lua new file mode 100644 index 00000000..385fbadf --- /dev/null +++ b/bench/macro/record_set.lua @@ -0,0 +1,27 @@ +-- Record surgery on a manifest literal per element: each element builds a +-- two-field record literal and unsafeSet copies it into a three-field +-- record, which the fold step reads back field by field. The ideal +-- variant builds the three-field table inline, so the gap isolates what +-- the compiled surgery still pays per element on top of the raw build. +return { + artifact = "Bench.RecordSet", + n = 1e6, + -- Ten calls of n/10 rather than one call of n: the same total work for + -- the timing runners, but keeps each hot-counter's bumps within one + -- recording attempt. See the note in array_foldl.lua. + drive = function(mod, n) + local acc + for _ = 1, 10 do + acc = mod.run(n / 10) + end + return acc + end, + ideal = function(n) + local acc = 0 + for i = 1, n do + local r = { a = i, b = i + 1, c = i + 2 } + acc = acc + r.a + r.b + r.c + end + return acc + end, +} diff --git a/test/ps/output/Golden.RecordSurgery.Test/corefn.json b/test/ps/output/Golden.RecordSurgery.Test/corefn.json new file mode 100644 index 00000000..a48a8a50 --- /dev/null +++ b/test/ps/output/Golden.RecordSurgery.Test/corefn.json @@ -0,0 +1 @@ +{"builtWith":"0.15.16","comments":[{"LineComment":" Record surgery (Record.Unsafe) over statically-known and unknown"},{"LineComment":" records, and the identity foreign (Unsafe.Coerce.unsafeCoerce)."}],"decls":[{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[37,32],"start":[37,3]}},"type":"Var","value":{"identifier":"bind","moduleName":["Control","Bind"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[37,32],"start":[37,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"bindEffect","moduleName":["Effect"]}},"type":"App"},"identifier":"bind"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[39,36],"start":[39,3]}},"type":"Var","value":{"identifier":"discard","moduleName":["Control","Bind"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discardUnit","moduleName":["Control","Bind"]}},"type":"App"},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"bindEffect","moduleName":["Effect"]}},"type":"App"},"identifier":"discard"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[39,10],"start":[39,3]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Effect","Console"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"showInt","moduleName":["Data","Show"]}},"type":"App"},"identifier":"logShow"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[39,24],"start":[39,23]}},"type":"Var","value":{"identifier":"add","moduleName":["Data","Semiring"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[39,35],"start":[39,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"semiringInt","moduleName":["Data","Semiring"]}},"type":"App"},"identifier":"add"},{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[43,10],"start":[43,3]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Effect","Console"]}},"annotation":{"meta":{"metaType":"IsSyntheticApp"},"sourceSpan":{"end":[43,18],"start":[43,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"showBoolean","moduleName":["Data","Show"]}},"type":"App"},"identifier":"logShow1"},{"annotation":{"meta":null,"sourceSpan":{"end":[17,25],"start":[17,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[18,21],"start":[18,12]}},"type":"Var","value":{"identifier":"unsafeSet","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[18,25],"start":[18,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[18,25],"start":[18,22]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"a"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[18,27],"start":[18,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[18,27],"start":[18,26]}},"type":"Literal","value":{"literalType":"IntLiteral","value":3}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[18,36],"start":[18,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[18,36],"start":[18,28]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["a",{"annotation":{"meta":null,"sourceSpan":{"end":[18,34],"start":[18,33]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}}]]}},"type":"App"},"identifier":"replaced"},{"annotation":{"meta":null,"sourceSpan":{"end":[26,19],"start":[26,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[27,20],"start":[27,11]}},"type":"Var","value":{"identifier":"unsafeHas","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[27,24],"start":[27,11]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[27,24],"start":[27,21]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"a"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[27,33],"start":[27,11]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[27,33],"start":[27,25]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["a",{"annotation":{"meta":null,"sourceSpan":{"end":[27,31],"start":[27,30]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}}]]}},"type":"App"},"identifier":"present"},{"annotation":{"meta":null,"sourceSpan":{"end":[14,35],"start":[14,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[15,21],"start":[15,12]}},"type":"Var","value":{"identifier":"unsafeSet","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[15,25],"start":[15,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[15,25],"start":[15,22]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"b"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[15,27],"start":[15,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[15,27],"start":[15,26]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[15,36],"start":[15,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[15,36],"start":[15,28]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["a",{"annotation":{"meta":null,"sourceSpan":{"end":[15,34],"start":[15,33]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}}]]}},"type":"App"},"identifier":"inserted"},{"annotation":{"meta":null,"sourceSpan":{"end":[23,11],"start":[23,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[24,16],"start":[24,7]}},"type":"Var","value":{"identifier":"unsafeGet","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[24,20],"start":[24,7]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[24,20],"start":[24,17]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"a"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[24,30],"start":[24,7]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[24,30],"start":[24,21]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["a",{"annotation":{"meta":null,"sourceSpan":{"end":[24,28],"start":[24,26]}},"type":"Literal","value":{"literalType":"IntLiteral","value":42}}]]}},"type":"App"},"identifier":"got"},{"annotation":{"meta":null,"sourceSpan":{"end":[20,24],"start":[20,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[21,23],"start":[21,11]}},"type":"Var","value":{"identifier":"unsafeDelete","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[21,27],"start":[21,11]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[21,27],"start":[21,24]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"a"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[21,42],"start":[21,11]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[21,42],"start":[21,28]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["a",{"annotation":{"meta":null,"sourceSpan":{"end":[21,34],"start":[21,33]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}}],["b",{"annotation":{"meta":null,"sourceSpan":{"end":[21,40],"start":[21,39]}},"type":"Literal","value":{"literalType":"IntLiteral","value":2}}]]}},"type":"App"},"identifier":"deleted"},{"annotation":{"meta":null,"sourceSpan":{"end":[32,15],"start":[32,1]}},"bindType":"NonRec","expression":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[33,23],"start":[33,11]}},"type":"Var","value":{"identifier":"unsafeCoerce","moduleName":["Unsafe","Coerce"]}},"annotation":{"meta":null,"sourceSpan":{"end":[33,25],"start":[33,11]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[33,25],"start":[33,24]}},"type":"Literal","value":{"literalType":"IntLiteral","value":7}},"type":"App"},"identifier":"coerced"},{"annotation":{"meta":null,"sourceSpan":{"end":[29,18],"start":[29,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[30,19],"start":[30,10]}},"type":"Var","value":{"identifier":"unsafeHas","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[30,23],"start":[30,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[30,23],"start":[30,20]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"z"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[30,32],"start":[30,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[30,32],"start":[30,24]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["a",{"annotation":{"meta":null,"sourceSpan":{"end":[30,30],"start":[30,29]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}}]]}},"type":"App"},"identifier":"absent"},{"annotation":{"meta":null,"sourceSpan":{"end":[35,20],"start":[35,1]}},"bindType":"NonRec","expression":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"bind","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,32],"start":[37,3]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[37,17],"start":[37,10]}},"type":"Var","value":{"identifier":"new","moduleName":["Effect","Ref"]}},"annotation":{"meta":null,"sourceSpan":{"end":[37,32],"start":[37,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,32],"start":[37,18]}},"type":"Literal","value":{"literalType":"ObjectLiteral","value":[["k",{"annotation":{"meta":null,"sourceSpan":{"end":[37,24],"start":[37,23]}},"type":"Literal","value":{"literalType":"IntLiteral","value":9}}],["n",{"annotation":{"meta":null,"sourceSpan":{"end":[37,30],"start":[37,29]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}}]]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[37,32],"start":[37,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[37,32],"start":[37,3]}},"argument":"ref","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"bind","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,22],"start":[38,3]}},"argument":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[38,18],"start":[38,10]}},"type":"Var","value":{"identifier":"read","moduleName":["Effect","Ref"]}},"annotation":{"meta":null,"sourceSpan":{"end":[38,22],"start":[38,10]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,22],"start":[38,19]}},"type":"Var","value":{"identifier":"ref","sourcePos":[37,3]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[38,22],"start":[38,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[38,22],"start":[38,3]}},"argument":"dyn","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[39,35],"start":[39,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[39,22],"start":[39,12]}},"expression":{"annotation":{"meta":null,"sourceSpan":{"end":[39,20],"start":[39,12]}},"type":"Var","value":{"identifier":"inserted","moduleName":["Golden","RecordSurgery","Test"]}},"fieldName":"a","type":"Accessor"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[39,35],"start":[39,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[39,35],"start":[39,25]}},"expression":{"annotation":{"meta":null,"sourceSpan":{"end":[39,33],"start":[39,25]}},"type":"Var","value":{"identifier":"inserted","moduleName":["Golden","RecordSurgery","Test"]}},"fieldName":"b","type":"Accessor"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[39,36],"start":[39,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[40,21],"start":[40,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[40,21],"start":[40,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[40,21],"start":[40,11]}},"expression":{"annotation":{"meta":null,"sourceSpan":{"end":[40,19],"start":[40,11]}},"type":"Var","value":{"identifier":"replaced","moduleName":["Golden","RecordSurgery","Test"]}},"fieldName":"a","type":"Accessor"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[40,21],"start":[40,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[40,21],"start":[40,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[41,20],"start":[41,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[41,20],"start":[41,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[41,20],"start":[41,11]}},"expression":{"annotation":{"meta":null,"sourceSpan":{"end":[41,18],"start":[41,11]}},"type":"Var","value":{"identifier":"deleted","moduleName":["Golden","RecordSurgery","Test"]}},"fieldName":"b","type":"Accessor"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[41,20],"start":[41,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[41,20],"start":[41,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[42,14],"start":[42,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[42,14],"start":[42,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[42,14],"start":[42,11]}},"type":"Var","value":{"identifier":"got","moduleName":["Golden","RecordSurgery","Test"]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[42,14],"start":[42,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[42,14],"start":[42,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[43,18],"start":[43,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow1","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[43,18],"start":[43,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[43,18],"start":[43,11]}},"type":"Var","value":{"identifier":"present","moduleName":["Golden","RecordSurgery","Test"]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[43,18],"start":[43,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[43,18],"start":[43,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[44,17],"start":[44,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow1","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[44,17],"start":[44,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[44,17],"start":[44,11]}},"type":"Var","value":{"identifier":"absent","moduleName":["Golden","RecordSurgery","Test"]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[44,17],"start":[44,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[44,17],"start":[44,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[47,77],"start":[47,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[47,77],"start":[47,3]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[47,21],"start":[47,12]}},"type":"Var","value":{"identifier":"unsafeGet","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[47,25],"start":[47,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,25],"start":[47,22]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"k"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[47,69],"start":[47,12]}},"argument":{"abstraction":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[47,36],"start":[47,27]}},"type":"Var","value":{"identifier":"unsafeSet","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[47,40],"start":[47,27]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,40],"start":[47,37]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"k"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[47,64],"start":[47,27]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"add","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[47,63],"start":[47,42]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[47,51],"start":[47,42]}},"type":"Var","value":{"identifier":"unsafeGet","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[47,55],"start":[47,42]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,55],"start":[47,52]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"k"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[47,59],"start":[47,42]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,59],"start":[47,56]}},"type":"Var","value":{"identifier":"dyn","sourcePos":[38,3]}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[47,63],"start":[47,42]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,63],"start":[47,62]}},"type":"Literal","value":{"literalType":"IntLiteral","value":1}},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[47,68],"start":[47,27]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,68],"start":[47,65]}},"type":"Var","value":{"identifier":"dyn","sourcePos":[38,3]}},"type":"App"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[47,77],"start":[47,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[47,77],"start":[47,3]}},"argument":"$__unused","body":{"abstraction":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"discard","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[48,49],"start":[48,3]}},"argument":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow1","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[48,49],"start":[48,3]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[48,21],"start":[48,12]}},"type":"Var","value":{"identifier":"unsafeHas","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[48,25],"start":[48,12]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[48,25],"start":[48,22]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"k"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[48,48],"start":[48,12]}},"argument":{"abstraction":{"abstraction":{"annotation":{"meta":{"metaType":"IsForeign"},"sourceSpan":{"end":[48,39],"start":[48,27]}},"type":"Var","value":{"identifier":"unsafeDelete","moduleName":["Record","Unsafe"]}},"annotation":{"meta":null,"sourceSpan":{"end":[48,43],"start":[48,27]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[48,43],"start":[48,40]}},"type":"Literal","value":{"literalType":"StringLiteral","value":"k"}},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[48,47],"start":[48,27]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[48,47],"start":[48,44]}},"type":"Var","value":{"identifier":"dyn","sourcePos":[38,3]}},"type":"App"},"type":"App"},"type":"App"},"type":"App"},"annotation":{"meta":null,"sourceSpan":{"end":[48,49],"start":[48,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[48,49],"start":[48,3]}},"argument":"$__unused","body":{"abstraction":{"annotation":{"meta":null,"sourceSpan":{"end":[0,0],"start":[0,0]}},"type":"Var","value":{"identifier":"logShow","moduleName":["Golden","RecordSurgery","Test"]}},"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[49,3]}},"argument":{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[49,11]}},"type":"Var","value":{"identifier":"coerced","moduleName":["Golden","RecordSurgery","Test"]}},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"type":"Abs"},"type":"App"},"identifier":"main"}],"exports":["inserted","replaced","deleted","got","present","absent","coerced","main"],"foreign":[],"imports":[{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Control","Bind"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Data","Semiring"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Data","Show"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Effect"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Effect","Console"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Effect","Ref"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Golden","RecordSurgery","Test"]},{"annotation":{"meta":null,"sourceSpan":{"end":[5,15],"start":[5,1]}},"moduleName":["Prelude"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Prim"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Record","Unsafe"]},{"annotation":{"meta":null,"sourceSpan":{"end":[49,18],"start":[3,1]}},"moduleName":["Unsafe","Coerce"]}],"moduleName":["Golden","RecordSurgery","Test"],"modulePath":"src/Golden/RecordSurgery/Test.purs","reExports":{},"sourceSpan":{"end":[49,18],"start":[3,1]}} \ No newline at end of file diff --git a/test/ps/output/Golden.RecordSurgery.Test/eval/.gitignore b/test/ps/output/Golden.RecordSurgery.Test/eval/.gitignore new file mode 100644 index 00000000..d2dc29bb --- /dev/null +++ b/test/ps/output/Golden.RecordSurgery.Test/eval/.gitignore @@ -0,0 +1 @@ +actual.txt diff --git a/test/ps/output/Golden.RecordSurgery.Test/eval/golden.txt b/test/ps/output/Golden.RecordSurgery.Test/eval/golden.txt new file mode 100644 index 00000000..1a3c7ae8 --- /dev/null +++ b/test/ps/output/Golden.RecordSurgery.Test/eval/golden.txt @@ -0,0 +1,9 @@ +3 +3 +2 +42 +true +false +10 +false +7 diff --git a/test/ps/output/Golden.RecordSurgery.Test/golden.ir b/test/ps/output/Golden.RecordSurgery.Test/golden.ir new file mode 100644 index 00000000..1beff834 --- /dev/null +++ b/test/ps/output/Golden.RecordSurgery.Test/golden.ir @@ -0,0 +1,384 @@ +UberModule + { uberModuleBindings = + [ Standalone + ( QName + { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Record.Unsafe" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Record/Unsafe.purs" + [ + ( Nothing, Name "unsafeHas" ), + ( Nothing, Name "unsafeGet" ), + ( Nothing, Name "unsafeSet" ), + ( Nothing, Name "unsafeDelete" ) + ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeDelete" + }, ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) + ( PropName "unsafeDelete" ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeGet" + }, ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) + ( PropName "unsafeGet" ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeHas" + }, ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) + ( PropName "unsafeHas" ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeSet" + }, ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) + ( PropName "unsafeSet" ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Data.Show", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Data.Show" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Data/Show.purs" + [ ( Nothing, Name "showIntImpl" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Effect.Console" ) ".spago/p/console/f82835a0b873aafe6bd7b14dd30cc150553d4ab9/src/Effect/Console.purs" + [ ( Nothing, Name "log" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "log" + }, ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) + ( PropName "log" ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Effect.Ref", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Effect.Ref" ) ".spago/p/refs/ee6e959ec21b752622e105a14816e7983b21b9a5/src/Effect/Ref.purs" + [ ( Nothing, Name "_new" ), ( Nothing, Name "read" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" + }, ForeignImport Nothing + ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" + [ ( Nothing, Name "unsafeCoerce" ) ] + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "logShow" + }, AbsN Nothing + ( ParamNamed Nothing ( Name "a$223" ) :| [] ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "log" ) ) ) + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) + ( PropName "showIntImpl" ) + ) + ( Ref Nothing ( Local ( Name "a$223" ) ) :| [] ) :| [] + ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "logShow1" + }, AbsN Nothing + ( ParamNamed Nothing ( Name "a$221" ) :| [] ) + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "log" ) ) ) + ( IfThenElse Nothing + ( Ref Nothing ( Local ( Name "a$221" ) ) ) + ( LiteralString Nothing "true" ) + ( LiteralString Nothing "false" ) :| [] + ) + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "replaced" + }, AppN Nothing + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeSet" ) ) ) + ( LiteralString Nothing "a" :| [] ) + ) + ( LiteralInt Nothing 3 :| [] ) + ) + ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "present" + }, AppN Nothing + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeHas" ) ) ) + ( LiteralString Nothing "a" :| [] ) + ) + ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "inserted" + }, AppN Nothing + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeSet" ) ) ) + ( LiteralString Nothing "b" :| [] ) + ) + ( LiteralInt Nothing 2 :| [] ) + ) + ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "got" + }, AppN Nothing + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeGet" ) ) ) + ( LiteralString Nothing "a" :| [] ) + ) + ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 42 ) ] :| [] ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "deleted" + }, AppN Nothing + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeDelete" ) ) ) + ( LiteralString Nothing "a" :| [] ) + ) + ( LiteralObject Nothing + [ ( PropName "a", LiteralInt Nothing 1 ), ( PropName "b", LiteralInt Nothing 2 ) ] :| [] + ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "coerced" + }, AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) + ( PropName "unsafeCoerce" ) + ) + ( LiteralInt Nothing 7 :| [] ) + ), Standalone + ( QName + { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "absent" + }, AppN Nothing + ( AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeHas" ) ) ) + ( LiteralString Nothing "z" :| [] ) + ) + ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) + ) + ], uberModuleForeigns = [], uberModuleExports = + [ + ( Name "inserted", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "inserted" ) ) + ), + ( Name "replaced", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "replaced" ) ) + ), + ( Name "deleted", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "deleted" ) ) + ), + ( Name "got", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "got" ) ) + ), + ( Name "present", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "present" ) ) + ), + ( Name "absent", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "absent" ) ) + ), + ( Name "coerced", Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "coerced" ) ) + ), + ( Name "main", AbsN Nothing + ( ParamUnused Nothing :| [] ) + ( Let Nothing + ( Standalone + ( Nothing, Name "ref$0", AppN Nothing + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Effect.Ref" ) ( Name "foreign" ) ) ) + ( PropName "_new" ) + ) + ( LiteralObject Nothing + [ + ( PropName "k", LiteralInt Nothing 9 ), + ( PropName "n", LiteralInt Nothing 1 ) + ] :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) :| + [ Standalone + ( Nothing, Name "dyn$1", AppN Nothing + ( AppN Nothing + ( ObjectProp Nothing + ( Ref Nothing ( Imported ( ModuleName "Effect.Ref" ) ( Name "foreign" ) ) ) + ( PropName "read" ) + ) + ( Ref Nothing ( Local ( Name "ref$0" ) ) :| [] ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) + ) + ( PrimBinOp Nothing PrimAdd + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "inserted" ) ) + ) + ( PropName "a" ) + ) + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "inserted" ) ) + ) + ( PropName "b" ) + ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) + ) + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "replaced" ) ) + ) + ( PropName "a" ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) + ) + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "deleted" ) ) + ) + ( PropName "b" ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "got" ) ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow1" ) ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "present" ) ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow1" ) ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "absent" ) ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) + ) + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeGet" ) ) + ) + ( LiteralString Nothing "k" :| [] ) + ) + ( AppN Nothing + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeSet" ) ) + ) + ( LiteralString Nothing "k" :| [] ) + ) + ( PrimBinOp Nothing PrimAdd + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeGet" ) ) + ) + ( LiteralString Nothing "k" :| [] ) + ) + ( Ref Nothing ( Local ( Name "dyn$1" ) ) :| [] ) + ) + ( LiteralInt Nothing 1 ) :| [] + ) + ) + ( Ref Nothing ( Local ( Name "dyn$1" ) ) :| [] ) :| [] + ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ), Standalone + ( Nothing, Name "_", AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow1" ) ) + ) + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeHas" ) ) + ) + ( LiteralString Nothing "k" :| [] ) + ) + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeDelete" ) ) + ) + ( LiteralString Nothing "k" :| [] ) + ) + ( Ref Nothing ( Local ( Name "dyn$1" ) ) :| [] ) :| [] + ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) + ] + ) + ( AppN Nothing + ( AppN Nothing + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) + ) + ( Ref Nothing + ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "coerced" ) ) :| [] + ) + ) + ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) + ) + ) + ) + ] + } \ No newline at end of file diff --git a/test/ps/output/Golden.RecordSurgery.Test/golden.lua b/test/ps/output/Golden.RecordSurgery.Test/golden.lua new file mode 100644 index 00000000..6ed87459 --- /dev/null +++ b/test/ps/output/Golden.RecordSurgery.Test/golden.lua @@ -0,0 +1,72 @@ +local Record_Unsafe_foreign = { + unsafeHas = function(l) return function(r) return r[l] ~= nil end end, + unsafeGet = function(l) return function(r) return r[l] end end, + unsafeSet = function(l) + return function(value) + return function(r) + local copy = {} + for key, val in pairs(r) do copy[key] = val end + copy[l] = value + return copy + end + end + end, + unsafeDelete = function(l) + return function(r) + local copy = {} + for key, val in pairs(r) do if key ~= l then copy[key] = val end end + return copy + end + end +} +local Record_Unsafe_unsafeDelete = Record_Unsafe_foreign.unsafeDelete +local Record_Unsafe_unsafeGet = Record_Unsafe_foreign.unsafeGet +local Record_Unsafe_unsafeHas = Record_Unsafe_foreign.unsafeHas +local Record_Unsafe_unsafeSet = Record_Unsafe_foreign.unsafeSet +local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } +local Effect_Console_foreign = { + log = function(s) return function() print(s) end end +} +local Effect_Console_log = Effect_Console_foreign.log +local Effect_Ref_foreign = { + _new = function(val) return function() return { value = val } end end, + read = function(ref) return function() return ref.value end end +} +local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } +local Golden_RecordSurgery_Test_logShow = function(a_S_223) + return Effect_Console_log(Data_Show_foreign.showIntImpl(a_S_223)) +end +local Golden_RecordSurgery_Test_logShow1 = function(a_S_221) + return Effect_Console_log((function() + if a_S_221 then return "true" else return "false" end + end)()) +end +local Golden_RecordSurgery_Test_replaced = Record_Unsafe_unsafeSet("a")(3)({ + a = 1 +}) +local Golden_RecordSurgery_Test_present = Record_Unsafe_unsafeHas("a")({ + a = 1 +}) +local Golden_RecordSurgery_Test_inserted = Record_Unsafe_unsafeSet("b")(2)({ + a = 1 +}) +local Golden_RecordSurgery_Test_got = Record_Unsafe_unsafeGet("a")({ a = 42 }) +local Golden_RecordSurgery_Test_deleted = Record_Unsafe_unsafeDelete("a")({ + a = 1, + b = 2 +}) +local Golden_RecordSurgery_Test_coerced = Unsafe_Coerce_foreign.unsafeCoerce(7) +local Golden_RecordSurgery_Test_absent = Record_Unsafe_unsafeHas("z")({ a = 1 }) +return (function() + local ref_S_0 = Effect_Ref_foreign._new({ k = 9, n = 1 })() + local dyn_S_1 = Effect_Ref_foreign.read(ref_S_0)() + local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_inserted.a + Golden_RecordSurgery_Test_inserted.b)() + local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_replaced.a)() + local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_deleted.b)() + local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_got)() + local _ = Golden_RecordSurgery_Test_logShow1(Golden_RecordSurgery_Test_present)() + local _ = Golden_RecordSurgery_Test_logShow1(Golden_RecordSurgery_Test_absent)() + local _ = Golden_RecordSurgery_Test_logShow(Record_Unsafe_unsafeGet("k")(Record_Unsafe_unsafeSet("k")(Record_Unsafe_unsafeGet("k")(dyn_S_1) + 1)(dyn_S_1)))() + local _ = Golden_RecordSurgery_Test_logShow1(Record_Unsafe_unsafeHas("k")(Record_Unsafe_unsafeDelete("k")(dyn_S_1)))() + return Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_coerced)() +end)() diff --git a/test/ps/src/Bench/RecordSet.purs b/test/ps/src/Bench/RecordSet.purs new file mode 100644 index 00000000..05ce6601 --- /dev/null +++ b/test/ps/src/Bench/RecordSet.purs @@ -0,0 +1,22 @@ +-- Building a record per element through Record.Unsafe surgery on a +-- manifest literal, read back across a function boundary. The map/foldl +-- pair keeps the built record live (the same anchoring as +-- Bench.CtorBuild), so folding the surgery can at best replace the +-- copy-per-step with a single literal build — one table allocation per +-- element instead of two. +module Bench.RecordSet where + +import Prelude + +import Data.Array (range) +import Data.Foldable (foldl) +import Record.Unsafe (unsafeGet, unsafeSet) + +run :: Int -> Int +run n = foldl step 0 (map build (range 1 n)) + where + build :: Int -> { a :: Int, b :: Int, c :: Int } + build i = unsafeSet "c" (i + 2) { a: i, b: i + 1 } + + step :: Int -> { a :: Int, b :: Int, c :: Int } -> Int + step acc r = acc + r.a + r.b + unsafeGet "c" r diff --git a/test/ps/src/Golden/RecordSurgery/Test.purs b/test/ps/src/Golden/RecordSurgery/Test.purs new file mode 100644 index 00000000..9021d2d6 --- /dev/null +++ b/test/ps/src/Golden/RecordSurgery/Test.purs @@ -0,0 +1,49 @@ +-- Record surgery (Record.Unsafe) over statically-known and unknown +-- records, and the identity foreign (Unsafe.Coerce.unsafeCoerce). +module Golden.RecordSurgery.Test where + +import Prelude + +import Effect (Effect) +import Effect.Console (logShow) +import Effect.Ref as Ref +import Record.Unsafe (unsafeDelete, unsafeGet, unsafeHas, unsafeSet) +import Unsafe.Coerce (unsafeCoerce) + +-- Surgery on manifest record literals. +inserted :: { a :: Int, b :: Int } +inserted = unsafeSet "b" 2 { a: 1 } + +replaced :: { a :: Int } +replaced = unsafeSet "a" 3 { a: 1 } + +deleted :: { b :: Int } +deleted = unsafeDelete "a" { a: 1, b: 2 } + +got :: Int +got = unsafeGet "a" { a: 42 } + +present :: Boolean +present = unsafeHas "a" { a: 1 } + +absent :: Boolean +absent = unsafeHas "z" { a: 1 } + +coerced :: Int +coerced = unsafeCoerce 7 + +main :: Effect Unit +main = do + ref <- Ref.new { k: 9, n: 1 } + dyn <- Ref.read ref + logShow (inserted.a + inserted.b) + logShow replaced.a + logShow deleted.b + logShow got + logShow present + logShow absent + -- A record the optimizer cannot see through: get reads the field + -- directly, while the copying surgeries stay foreign calls. + logShow (unsafeGet "k" (unsafeSet "k" (unsafeGet "k" dyn + 1) dyn) :: Int) + logShow (unsafeHas "k" (unsafeDelete "k" dyn)) + logShow coerced From e5ced275e83d2f6fddaafbd0adc655527502227b Mon Sep 17 00:00:00 2001 From: Yura Lazarev Date: Sun, 26 Jul 2026 15:55:15 +0200 Subject: [PATCH 2/2] feat(optimizer): fold Record.Unsafe surgery and lift unsafeCoerce MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A handwritten semantic layer for foreign record operations (Language.PureScript.Backend.IR.RecordSurgery), complementary to the source-derived ForeignLift: Record.Unsafe's bodies are outside the liftable subset (dynamic table indexing, pairs copy loops), so their semantics are restated as a rewrite rule keyed by qualified name and application-spine shape, registered in the optimize fixpoints. With a static plain label, unsafeGet becomes a direct ObjectProp read for any record operand — the read is the call's entire body — and the existing projection folds collapse it further on manifest operands. unsafeSet/unsafeDelete/unsafeHas fold only on a manifest record literal, where the fork FFI's fresh copy is the rewritten literal itself: one table allocation replaces two, and membership is decided at compile time. A label the Lua lowering would mangle (reserved word, non-identifier, non-ASCII) declines, since generated tables key by the makeSafe spelling while the foreign call looks up the raw string. Unsafe.Coerce.unsafeCoerce joins the ForeignLift allowlist: its body lifts to an inline-always identity lambda, so beta reduction erases the coercion at every applied site and the module's FFI table drops out of the output entirely. Bench.RecordSet counters: function-body TNEW+TDUP 4 -> 3, FNEW 14 -> 11, prototypes 23 -> 18. Wall-clock on the same spec (median, n=1e6): LuaJIT 0.374s -> 0.089s, PUC Lua 5.1 0.552s -> 0.169s. Closes #236 --- bench/goldens/fnew_Bench.RecordSet.txt | 31 ++- bench/goldens/tnew_Bench.RecordSet.txt | 15 +- bench/goldens/trace_record_set.txt | 40 ++-- ...0726_150000_unisay_record_surgery_folds.md | 11 + .../PureScript/Backend/IR/Optimizer.hs | 2 + .../PureScript/Backend/IR/RecordSurgery.hs | 159 +++++++++++++ .../PureScript/Backend/Lua/ForeignLift.hs | 11 +- pslua.cabal | 1 + .../PureScript/Backend/IR/Optimizer/Spec.hs | 116 ++++++++++ .../output/Golden.ArrayOfUnits.Test/golden.ir | 38 ++-- .../Golden.ArrayOfUnits.Test/golden.lua | 28 +-- .../ps/output/Golden.CprResult.Test/golden.ir | 44 ++-- .../output/Golden.CprResult.Test/golden.lua | 32 +-- test/ps/output/Golden.CprState.Test/golden.ir | 62 ++--- .../ps/output/Golden.CprState.Test/golden.lua | 36 +-- .../Golden.LongApplyChain.Test/golden.ir | 44 ++-- .../Golden.LongApplyChain.Test/golden.lua | 28 +-- .../Golden.LongBindFlipped.Test/golden.ir | 36 +-- .../Golden.LongBindFlipped.Test/golden.lua | 12 +- .../Golden.LongEitherBind.Test/golden.ir | 6 +- .../Golden.LongEitherBind.Test/golden.lua | 6 +- .../Golden.LongExceptBind.Test/golden.ir | 144 ++++++------ .../Golden.LongExceptBind.Test/golden.lua | 85 ++++--- .../Golden.LongMaybeBind.Test/golden.ir | 92 ++++---- .../Golden.LongMaybeBind.Test/golden.lua | 50 ++-- .../Golden.LongMaybeBindModule.Test/golden.ir | 92 ++++---- .../golden.lua | 50 ++-- .../Golden.LongReaderBind.Test/golden.ir | 21 +- .../Golden.LongReaderBind.Test/golden.lua | 7 +- .../Golden.LongStackBind.Test/golden.ir | 196 ++++++++-------- .../Golden.LongStackBind.Test/golden.lua | 103 +++++---- .../Golden.LongStateBind.Test/golden.ir | 130 +++++------ .../Golden.LongStateBind.Test/golden.lua | 66 +++--- .../Golden.LongWriterBind.Test/golden.ir | 108 ++++----- .../Golden.LongWriterBind.Test/golden.lua | 61 +++-- .../output/Golden.MaybeChain.Test/golden.ir | 18 +- .../output/Golden.MaybeChain.Test/golden.lua | 14 +- .../Golden.MaybeChainModule.Test/golden.ir | 12 +- .../Golden.MaybeChainModule.Test/golden.lua | 10 +- .../Golden.NativeLoopsGuard.Test/golden.ir | 66 +++--- .../Golden.NativeLoopsGuard.Test/golden.lua | 24 +- .../Golden.NativeLoopsST.Test/golden.ir | 40 ++-- .../Golden.NativeLoopsST.Test/golden.lua | 24 +- .../Golden.ProfunctorDictLens.Test/golden.ir | 34 +-- .../Golden.ProfunctorDictLens.Test/golden.lua | 7 +- .../Golden.RecordSurgery.Test/golden.ir | 213 ++++-------------- .../Golden.RecordSurgery.Test/golden.lua | 52 ++--- .../ps/output/Golden.STDoBlock.Test/golden.ir | 16 +- .../output/Golden.STDoBlock.Test/golden.lua | 10 +- .../output/Golden.SpecConstr.Test/golden.ir | 52 ++--- .../output/Golden.SpecConstr.Test/golden.lua | 36 +-- .../Golden.StringCodePoints.Test/golden.ir | 156 ++++++------- .../Golden.StringCodePoints.Test/golden.lua | 126 +++++------ .../Golden.TailRecM2Shadow.Test/golden.ir | 18 +- .../Golden.TailRecM2Shadow.Test/golden.lua | 12 +- .../output/Golden.UncurryCtor.Test/golden.ir | 42 ++-- .../output/Golden.UncurryCtor.Test/golden.lua | 26 +-- 57 files changed, 1517 insertions(+), 1454 deletions(-) create mode 100644 changelog.d/20260726_150000_unisay_record_surgery_folds.md create mode 100644 lib/Language/PureScript/Backend/IR/RecordSurgery.hs diff --git a/bench/goldens/fnew_Bench.RecordSet.txt b/bench/goldens/fnew_Bench.RecordSet.txt index 2cddd443..39295c27 100644 --- a/bench/goldens/fnew_Bench.RecordSet.txt +++ b/bench/goldens/fnew_Bench.RecordSet.txt @@ -1,21 +1,18 @@ chunk: Bench.RecordSet.lua runtime: LuaJIT 2.1.1741730670 -main-chunk FNEW: 8 -function-body FNEW: 14 -total FNEW: 22 -prototypes: 23 +main-chunk FNEW: 6 +function-body FNEW: 11 +total FNEW: 17 +prototypes: 18 function-body FNEW sites: - Bench.RecordSet.lua:2 - Bench.RecordSet.lua:11 - Bench.RecordSet.lua:10 - Bench.RecordSet.lua:21 - Bench.RecordSet.lua:33 - Bench.RecordSet.lua:32 - Bench.RecordSet.lua:43 - Bench.RecordSet.lua:42 - Bench.RecordSet.lua:67 - Bench.RecordSet.lua:66 + Bench.RecordSet.lua:8 + Bench.RecordSet.lua:20 + Bench.RecordSet.lua:19 + Bench.RecordSet.lua:30 + Bench.RecordSet.lua:29 + Bench.RecordSet.lua:54 + Bench.RecordSet.lua:53 + Bench.RecordSet.lua:52 + Bench.RecordSet.lua:63 Bench.RecordSet.lua:65 - Bench.RecordSet.lua:76 - Bench.RecordSet.lua:81 - Bench.RecordSet.lua:75 + Bench.RecordSet.lua:62 diff --git a/bench/goldens/tnew_Bench.RecordSet.txt b/bench/goldens/tnew_Bench.RecordSet.txt index 5f306f3f..7657154c 100644 --- a/bench/goldens/tnew_Bench.RecordSet.txt +++ b/bench/goldens/tnew_Bench.RecordSet.txt @@ -1,11 +1,10 @@ chunk: Bench.RecordSet.lua runtime: LuaJIT 2.1.1741730670 -main-chunk TNEW+TDUP: 6 -function-body TNEW+TDUP: 4 -total TNEW+TDUP: 10 -prototypes: 23 +main-chunk TNEW+TDUP: 5 +function-body TNEW+TDUP: 3 +total TNEW+TDUP: 8 +prototypes: 18 function-body TNEW+TDUP sites: - Bench.RecordSet.lua:6 TNEW - Bench.RecordSet.lua:18 TNEW - Bench.RecordSet.lua:49 TNEW - Bench.RecordSet.lua:77 TDUP + Bench.RecordSet.lua:5 TNEW + Bench.RecordSet.lua:36 TNEW + Bench.RecordSet.lua:64 TDUP diff --git a/bench/goldens/trace_record_set.txt b/bench/goldens/trace_record_set.txt index ad4d7954..407e7548 100644 --- a/bench/goldens/trace_record_set.txt +++ b/bench/goldens/trace_record_set.txt @@ -2,30 +2,22 @@ spec: record_set runtime: LuaJIT 2.1.1741730670 workload: n=1000000 reps=4 result=15000450000 aborts (distinct site -- reason): - Bench.RecordSet.lua:10 -- NYI: bytecode FNEW - Bench.RecordSet.lua:11 -- NYI: bytecode FNEW - Bench.RecordSet.lua:2 -- NYI: bytecode FNEW - Bench.RecordSet.lua:21 -- NYI: bytecode FNEW - Bench.RecordSet.lua:42 -- NYI: bytecode FNEW - Bench.RecordSet.lua:43 -- NYI: bytecode FNEW - Bench.RecordSet.lua:51 -- inner loop in root trace - Bench.RecordSet.lua:7 -- inner loop in root trace - Bench.RecordSet.lua:75 -- NYI: bytecode FNEW - Bench.RecordSet.lua:76 -- NYI: bytecode FNEW + Bench.RecordSet.lua:29 -- NYI: bytecode FNEW + Bench.RecordSet.lua:30 -- NYI: bytecode FNEW + Bench.RecordSet.lua:38 -- inner loop in root trace + Bench.RecordSet.lua:62 -- NYI: bytecode FNEW + Bench.RecordSet.lua:63 -- NYI: bytecode FNEW + Bench.RecordSet.lua:65 -- NYI: bytecode UCLO + Bench.RecordSet.lua:8 -- NYI: bytecode FNEW bytecode end state (J*=compiled, I*=blacklisted): - Bench.RecordSet.lua:19 IFORL - Bench.RecordSet.lua:2 IFUNCF - Bench.RecordSet.lua:2 JFUNCF - Bench.RecordSet.lua:3 IFUNCF - Bench.RecordSet.lua:4 IFUNCF - Bench.RecordSet.lua:40 IFORL - Bench.RecordSet.lua:5 IFUNCF - Bench.RecordSet.lua:51 JLOOP - Bench.RecordSet.lua:7 JLOOP - Bench.RecordSet.lua:72 IFUNCF - Bench.RecordSet.lua:73 IFUNCF - Bench.RecordSet.lua:76 IFUNCF - record_set.lua:19 JFUNCF + Bench.RecordSet.lua:27 IFORL + Bench.RecordSet.lua:3 JFUNCF + Bench.RecordSet.lua:38 JLOOP + Bench.RecordSet.lua:59 IFUNCF + Bench.RecordSet.lua:6 JFORI + Bench.RecordSet.lua:6 JFORL + Bench.RecordSet.lua:60 JFUNCF + Bench.RecordSet.lua:63 JFUNCF record_set.lua:21 JFORI record_set.lua:21 JFORL -counts: aborts=10 compiled=6 blacklisted=9 +counts: aborts=7 compiled=8 blacklisted=2 diff --git a/changelog.d/20260726_150000_unisay_record_surgery_folds.md b/changelog.d/20260726_150000_unisay_record_surgery_folds.md new file mode 100644 index 00000000..2e9ca1ff --- /dev/null +++ b/changelog.d/20260726_150000_unisay_record_surgery_folds.md @@ -0,0 +1,11 @@ +### Added + +- The IR optimizer folds `Record.Unsafe` surgery over statically-known + records, through a small handwritten registry of foreign semantics + complementary to the source-derived foreign lift: with a static label, + `unsafeGet` becomes a direct field read (collapsing to the field's value on + a manifest literal), and `unsafeSet`/`unsafeDelete`/`unsafeHas` on a + manifest record literal fold into the resulting literal or boolean — one + table allocation instead of two per folded copy. `Unsafe.Coerce.unsafeCoerce` + joins the foreign-lift allowlist, so the identity coercion beta-reduces away + at every applied site and its FFI table disappears from the output (#236). diff --git a/lib/Language/PureScript/Backend/IR/Optimizer.hs b/lib/Language/PureScript/Backend/IR/Optimizer.hs index d4a695f3..d4bfa142 100644 --- a/lib/Language/PureScript/Backend/IR/Optimizer.hs +++ b/lib/Language/PureScript/Backend/IR/Optimizer.hs @@ -46,6 +46,7 @@ import Language.PureScript.Backend.IR.Query , resolveKnownCtorApp ) import Language.PureScript.Backend.IR.Query qualified as Query +import Language.PureScript.Backend.IR.RecordSurgery (foldRecordSurgery) import Language.PureScript.Backend.IR.SpecConstr (specConstr) import Language.PureScript.Backend.IR.Supply (SupplyM, freshName, runSupply) import Language.PureScript.Backend.IR.Types @@ -1064,6 +1065,7 @@ optimizedExpressionWithPastes ctorTags canon pastes policy env = ( canonicalizeEffectHead canon `thenRewrite` constantFolding `thenRewrite` reassociateConstants + `thenRewrite` foldRecordSurgery `thenRewrite` reduceObjectProp `thenRewrite` reduceArrayRead `thenRewrite` sinkProjectionIntoLet diff --git a/lib/Language/PureScript/Backend/IR/RecordSurgery.hs b/lib/Language/PureScript/Backend/IR/RecordSurgery.hs new file mode 100644 index 00000000..d6dfa8c9 --- /dev/null +++ b/lib/Language/PureScript/Backend/IR/RecordSurgery.hs @@ -0,0 +1,159 @@ +{- | Fold @Record.Unsafe@ surgery over statically-known records +(issue #236). + +A handwritten semantic layer for foreign record operations, +complementary to the source-derived lift +("Language.PureScript.Backend.Lua.ForeignLift"): the bodies of +@Record.Unsafe@'s exports are outside the liftable subset — +@unsafeGet@\/@unsafeHas@ index a table by a /dynamic/ key, which has no +IR form (a field read needs a static 'PropName'), and +@unsafeSet@\/@unsafeDelete@ copy their record with a @pairs@ loop — so +their semantics cannot be derived from the FFI source and are restated +here, keyed by qualified name and application-spine shape. Unlike the +lift, a handwritten registry /can/ drift from the package set, which is +why it is kept this small; the golden eval oracles pin the shipped +prelude's behaviour. + +Each fold restates the fork FFI +(@purescript-lua-prelude@, @src/Record/Unsafe.lua@) at a site where +enough is static to decide it: + + * @unsafeGet l r@ /is/ @r[l]@ — with a static plain label that is + exactly 'ObjectProp', for any record operand: the read is the + call's entire body, so nothing about @r@ needs to be known. On a + manifest operand the sibling fold then collapses the read to the + field's value ('Language.PureScript.Backend.IR.Optimizer.reduceObjectProp'). + * @unsafeSet l v r@ copies @r@ and sets @l@; on a manifest literal + the copy of the fresh table /is/ the extended literal, so one + allocation replaces two. + * @unsafeDelete l r@ copies @r@ dropping @l@ — on a manifest + literal, the literal without the field. + * @unsafeHas l r@ is @r[l] ~= nil@ — decidable on a manifest + literal, whose fields are exactly known and whose values are never + represented as @nil@ (the ecosystem-wide invariant that keeps + PureScript values storable in Lua tables; see the @unit@ entry in + docs\/QUIRKS.md). + +A record operand that is not statically known leaves the copying +surgeries as calls. A label folds only when it is a string literal the +Lua lowering keeps verbatim (see 'plainLabel'). + +Like magic-do's canonical heads (Note [Canonical Effect\/ST heads]), +recognition is by qualified name alone: a build whose @Record.Unsafe@ +is not the prelude's would be rewritten with the prelude's semantics. +-} +module Language.PureScript.Backend.IR.RecordSurgery + ( foldRecordSurgery + ) where + +import Data.Char qualified as Char +import Data.Map.Strict qualified as Map +import Data.Text qualified as Text +import Language.PureScript.Backend.IR.Linker (foreignAccessorQName) +import Language.PureScript.Backend.IR.Names + ( ModuleName + , Name (..) + , PropName (..) + , QName (..) + , Qualified (Imported) + , moduleNameFromString + ) +import Language.PureScript.Backend.IR.Types + ( Ann + , RawExp (..) + , RewriteRuleM + , unwindApp + ) +import Language.PureScript.Backend.Lua.Name qualified as Lua + +{- | The rewrite rule. Strictly shrinking in every arm (an application +spine collapses into one of its operands or a literal), so it is +fixpoint-safe; it duplicates no subexpression, preserving unique +binders. Fires on both head shapes a foreign call has during +optimization: a reference to the accessor binding, and the dissolved +accessor itself — a field read off the module's @foreign@ import +(Note [Foreign bindings structure emitted by the Linker]). +-} +foldRecordSurgery ∷ Applicative m ⇒ RewriteRuleM m Ann +foldRecordSurgery = + pure . \case + expr@(AppN ann _ _) + | (fn, args) ← unwindApp expr + , Just surgery ← surgeryOf fn → + case (surgery, args) of + (Get, [label, r]) → + plainLabel label <&> ObjectProp ann r + (Set, [label, v, LiteralObject _ props]) → + plainLabel label <&> \prop → + LiteralObject ann (setField prop v props) + (Delete, [label, LiteralObject _ props]) → + plainLabel label <&> \prop → + LiteralObject ann (filter ((/= prop) . fst) props) + (Has, [label, LiteralObject _ props]) → + plainLabel label <&> \prop → + LiteralBool ann (any ((== prop) . fst) props) + _ → Nothing + _ → Nothing + +data Surgery = Get | Set | Delete | Has + +surgeryOf ∷ RawExp ann → Maybe Surgery +surgeryOf = \case + Ref _ann (Imported modname name) → entryFor (QName modname name) + expr → foreignAccessorQName expr >>= entryFor + where + entryFor ∷ QName → Maybe Surgery + entryFor = (`Map.lookup` registry) + + registry ∷ Map QName Surgery + registry = + Map.fromList + [ (QName recordUnsafe (Name "unsafeGet"), Get) + , (QName recordUnsafe (Name "unsafeSet"), Set) + , (QName recordUnsafe (Name "unsafeDelete"), Delete) + , (QName recordUnsafe (Name "unsafeHas"), Has) + ] + + recordUnsafe ∷ ModuleName + recordUnsafe = moduleNameFromString "Record.Unsafe" + +{- | The label, when it is a string literal the Lua lowering keeps +verbatim. Two conditions, both required: + + * Table keys pass through 'Language.PureScript.Backend.Lua.Name.makeSafe' + at literal construction and at 'ObjectProp' reads, so a label + @makeSafe@ would rewrite (a reserved word, a non-identifier) names + a different key in generated tables than the raw string the + foreign call looks up at runtime — folding such a label would + change which key is read. 'Lua.fromText' succeeds exactly on the + labels @makeSafe@ keeps. + * A string literal's text is the escaped rendering + ('Language.PureScript.PSString.decodeStringEscaping'), while a + 'PropName' carries the raw label; the two spellings coincide only + when escaping is the identity. ASCII alphanumerics and @_@ are + never escaped ('Lua.fromText' alone also admits non-ASCII + letters, which are). +-} +plainLabel ∷ RawExp ann → Maybe PropName +plainLabel = \case + LiteralString _ann label + | Text.all plainChar label + , isJust (Lua.fromText label) → + Just (PropName label) + _ → Nothing + where + plainChar ∷ Char → Bool + plainChar c = Char.isAscii c && (Char.isAlphaNum c || c == '_') + +{- | Replace the field in place when the label is present (keeping the +literal's field order), append it otherwise. +-} +setField + ∷ PropName + → RawExp ann + → [(PropName, RawExp ann)] + → [(PropName, RawExp ann)] +setField prop v props + | any ((== prop) . fst) props = + [(p, if p == prop then v else e) | (p, e) ← props] + | otherwise = props <> [(prop, v)] diff --git a/lib/Language/PureScript/Backend/Lua/ForeignLift.hs b/lib/Language/PureScript/Backend/Lua/ForeignLift.hs index 1f63ede9..a88753c1 100644 --- a/lib/Language/PureScript/Backend/Lua/ForeignLift.hs +++ b/lib/Language/PureScript/Backend/Lua/ForeignLift.hs @@ -140,11 +140,13 @@ import Prelude hiding (show) -- Allowlist ------------------------------------------------------------------- {- | The foreign exports lifted into the IR: the arithmetic, comparison, -boolean, and concatenation core of the prelude (issue #178), plus both +boolean, and concatenation core of the prelude (issue #178), both halves of the @*.Uncurried@ wrappers — @run@ (issue #198) and @mk@ -(issue #227). Membership is a hard contract (see the module header): a -listed export that fails to lift is a compile error. A broader allowlist -is follow-up work (issue #187). +(issue #227) — and the identity coercion @Unsafe.Coerce.unsafeCoerce@ +(issue #236), whose lifted @λx. x@ beta-reduces away at every applied +site. Membership is a hard contract (see the module header): a listed +export that fails to lift is a compile error. A broader allowlist is +follow-up work (issue #187). A warning to that follow-up: do /not/ list the Effect\/ST core — @Effect.bindE@\/@pureE@, @Control.Monad.ST.Internal.bind_@\/@pure_@ — @@ -183,6 +185,7 @@ allowlist = ] ) , ("Data.Semigroup", ["concatString"]) + , ("Unsafe.Coerce", ["unsafeCoerce"]) , -- Both halves of the uncurried FFI wrappers: @run@ (issue #198) -- and @mk@ (issue #227). @runFn0@/@mkFn0@ are absent by policy, -- not liftability: their bodies force a /pure/ @Fn0@ with a diff --git a/pslua.cabal b/pslua.cabal index 78118e00..a627f372 100644 --- a/pslua.cabal +++ b/pslua.cabal @@ -142,6 +142,7 @@ library Language.PureScript.Backend.IR.Optimizer Language.PureScript.Backend.IR.Pass Language.PureScript.Backend.IR.Query + Language.PureScript.Backend.IR.RecordSurgery Language.PureScript.Backend.IR.SpecConstr Language.PureScript.Backend.IR.Supply Language.PureScript.Backend.IR.Types diff --git a/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs b/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs index 98b1e3bf..63e95066 100644 --- a/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs +++ b/test/Language/PureScript/Backend/IR/Optimizer/Spec.hs @@ -460,6 +460,122 @@ spec = describe "IR Optimizer" do annotateShow optimized addKept === [QName mainModule (Name "add")] + describe "folds Record.Unsafe surgery on manifest records (#236)" do + let recordUnsafe = moduleNameFromString "Record.Unsafe" + surgery ∷ Text → [Exp] → Exp + surgery fn = foldl' application (refImported recordUnsafe (Name fn)) + a = PropName "a" + b = PropName "b" + + it "unsafeGet with a static label reads the field directly" do + let original = + surgery "unsafeGet" [literalString "a", refLocal (Name "r")] + optimizedExpression original + `shouldBe` objectProp (refLocal (Name "r")) a + + it "unsafeGet on a record literal folds to the field value" do + let original = + surgery + "unsafeGet" + [literalString "a", literalObject [(a, literalInt 42)]] + optimizedExpression original `shouldBe` literalInt 42 + + it "unsafeSet adds a field to a record literal" do + let original = + surgery + "unsafeSet" + [ literalString "b" + , literalInt 2 + , literalObject [(a, literalInt 1)] + ] + optimizedExpression original + `shouldBe` literalObject [(a, literalInt 1), (b, literalInt 2)] + + it "unsafeSet replaces a present field in place" do + let original = + surgery + "unsafeSet" + [ literalString "a" + , literalInt 3 + , literalObject [(a, literalInt 1), (b, literalInt 2)] + ] + optimizedExpression original + `shouldBe` literalObject [(a, literalInt 3), (b, literalInt 2)] + + it "unsafeDelete removes a present field from a record literal" do + let original = + surgery + "unsafeDelete" + [ literalString "a" + , literalObject [(a, literalInt 1), (b, literalInt 2)] + ] + optimizedExpression original + `shouldBe` literalObject [(b, literalInt 2)] + + it "unsafeDelete of an absent field folds to the record itself" do + let original = + surgery + "unsafeDelete" + [literalString "z", literalObject [(a, literalInt 1)]] + optimizedExpression original + `shouldBe` literalObject [(a, literalInt 1)] + + it "unsafeHas answers membership on a record literal" do + let has ∷ Text → Exp + has label = + surgery + "unsafeHas" + [literalString label, literalObject [(a, literalInt 1)]] + optimizedExpression (has "a") `shouldBe` literalBool True + optimizedExpression (has "z") `shouldBe` literalBool False + + it "fires on a dissolved foreign-accessor head" do + -- Mid-pipeline the accessor binding dissolves into its use sites, + -- so the head is a field read off the module's @foreign@ import + -- rather than a reference to the accessor name. + let accessor = + objectProp + (refImported recordUnsafe (Name "foreign")) + (PropName "unsafeGet") + original = + application + (application accessor (literalString "a")) + (literalObject [(a, literalInt 42)]) + optimizedExpression original `shouldBe` literalInt 42 + + it "leaves copying surgery on an unknown record as a call" do + for_ ["unsafeDelete", "unsafeHas"] \fn → do + let original = + surgery fn [literalString "a", refLocal (Name "r")] + optimizedExpression original `shouldBe` original + let original = + surgery + "unsafeSet" + [literalString "a", literalInt 1, refLocal (Name "r")] + optimizedExpression original `shouldBe` original + + it "declines a label the Lua lowering would mangle" do + -- makeSafe rewrites these labels on the way into a table key, so + -- a folded read would use a different key than the foreign call's + -- raw-string lookup. + for_ ["not a name", "end", "wr@ng", ""] \label → do + let original = + surgery + "unsafeGet" + [literalString label, refLocal (Name "r")] + optimizedExpression original `shouldBe` original + + it "declines a dynamic label" do + let original = + surgery + "unsafeGet" + [refLocal (Name "l"), literalObject [(a, literalInt 1)]] + optimizedExpression original `shouldBe` original + + it "declines a partially applied surgery" do + let original = surgery "unsafeSet" [literalString "a", literalInt 1] + optimizedExpression original `shouldBe` original + describe "folds case-of-known-constructor (#177)" do let maybeMod = moduleNameFromString "Data.Maybe" maybeTy = TyName "Maybe" diff --git a/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir b/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir index 99530dda..c58517c5 100644 --- a/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir +++ b/test/ps/output/Golden.ArrayOfUnits.Test/golden.ir @@ -58,7 +58,7 @@ UberModule ( PropName "foldMap", AbsN Nothing ( ParamNamed Nothing ( Name "dictMonoid" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$916" ) :| [] ) + ( ParamNamed Nothing ( Name "f$919" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -68,9 +68,9 @@ UberModule ( PropName "foldr" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "x$917" ) :| [] ) + ( ParamNamed Nothing ( Name "x$920" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "acc$918" ) :| [] ) + ( ParamNamed Nothing ( Name "acc$921" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -86,11 +86,11 @@ UberModule ( PropName "append" ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$916" ) ) ) - ( Ref Nothing ( Local ( Name "x$917" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "f$919" ) ) ) + ( Ref Nothing ( Local ( Name "x$920" ) ) :| [] ) :| [] ) ) - ( Ref Nothing ( Local ( Name "acc$918" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "acc$921" ) ) :| [] ) ) ) :| [] ) @@ -337,11 +337,11 @@ UberModule ( PropName "foldr" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "x$940" ) :| [] ) + ( ParamNamed Nothing ( Name "x$943" ) :| [] ) ( AppN Nothing ( Let Nothing ( Standalone - ( Nothing, Name "dictApply$925", AppN Nothing + ( Nothing, Name "dictApply$928", AppN Nothing ( ObjectProp Nothing ( Ref Nothing ( Imported @@ -357,13 +357,13 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a$926" ) :| [] ) + ( ParamNamed Nothing ( Name "a$929" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "b$927" ) :| [] ) + ( ParamNamed Nothing ( Name "b$930" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApply$925" ) ) ) + ( Ref Nothing ( Local ( Name "dictApply$928" ) ) ) ( PropName "apply" ) ) ( AppN Nothing @@ -371,7 +371,7 @@ UberModule ( ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictApply$925" ) ) ) + ( Ref Nothing ( Local ( Name "dictApply$928" ) ) ) ( PropName "Functor0" ) ) ( Ref Nothing @@ -386,15 +386,15 @@ UberModule ( AbsN Nothing ( ParamUnused Nothing :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "x$934" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$934" ) ) ) + ( ParamNamed Nothing ( Name "x$937" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$937" ) ) ) ) :| [] ) ) - ( Ref Nothing ( Local ( Name "a$926" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "a$929" ) ) :| [] ) :| [] ) ) - ( Ref Nothing ( Local ( Name "b$927" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "b$930" ) ) :| [] ) ) ) ) @@ -410,7 +410,7 @@ UberModule ( LiteralString Nothing "unit" ) ) ] :| - [ Ref Nothing ( Local ( Name "x$940" ) ) ] + [ Ref Nothing ( Local ( Name "x$943" ) ) ] ) :| [] ) ) :| [] @@ -448,12 +448,12 @@ UberModule ( PropName "foldl" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "c$913" ) :| [] ) + ( ParamNamed Nothing ( Name "c$916" ) :| [] ) ( AbsN Nothing ( ParamUnused Nothing :| [] ) ( PrimBinOp Nothing PrimAdd ( LiteralInt Nothing 1 ) - ( Ref Nothing ( Local ( Name "c$913" ) ) ) + ( Ref Nothing ( Local ( Name "c$916" ) ) ) ) ) :| [] ) diff --git a/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua b/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua index 93d211c6..02cf92a4 100644 --- a/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua +++ b/test/ps/output/Golden.ArrayOfUnits.Test/golden.lua @@ -56,10 +56,10 @@ Data_Foldable_foldableArray = { foldr = Data_Foldable_foreign.foldrArray, foldl = Data_Foldable_foreign.foldlArray, foldMap = function(dictMonoid) - return function(f_S_916) - return Data_Foldable_foldableArray.foldr(function(x_S_917) - return function(acc_S_918) - return (dictMonoid.Semigroup0()).append(f_S_916(x_S_917))(acc_S_918) + return function(f_S_919) + return Data_Foldable_foldableArray.foldr(function(x_S_920) + return function(acc_S_921) + return (dictMonoid.Semigroup0()).append(f_S_919(x_S_920))(acc_S_921) end end)(dictMonoid.mempty) end @@ -115,20 +115,20 @@ return (function() [2] = Data_Unit_unit, [3] = Data_Unit_unit } - local _ = Data_Foldable_foldableArray.foldr(function(x_S_940) - local dictApply_S_925 = Effect_applicativeEffect.Apply0() - local a_S_926 = Effect_Console_logShow_S_w({ + local _ = Data_Foldable_foldableArray.foldr(function(x_S_943) + local dictApply_S_928 = Effect_applicativeEffect.Apply0() + local a_S_929 = Effect_Console_logShow_S_w({ show = function() return "unit" end - }, x_S_940) - return function(b_S_927) - return dictApply_S_925.apply((dictApply_S_925.Functor0()).map(function() - return function(x_S_934) return x_S_934 end - end)(a_S_926))(b_S_927) + }, x_S_943) + return function(b_S_930) + return dictApply_S_928.apply((dictApply_S_928.Functor0()).map(function() + return function(x_S_937) return x_S_937 end + end)(a_S_929))(b_S_930) end end)(Effect_pureE(Data_Unit_unit))(arr_S_0)() return Effect_Console_logShow_S_w({ show = Data_Show_foreign.showIntImpl - }, Data_Foldable_foldableArray.foldl(function(c_S_913) - return function() return 1 + c_S_913 end + }, Data_Foldable_foldableArray.foldl(function(c_S_916) + return function() return 1 + c_S_916 end end)(0)(arr_S_0))() end)() diff --git a/test/ps/output/Golden.CprResult.Test/golden.ir b/test/ps/output/Golden.CprResult.Test/golden.ir index 38f82bb7..d90b44b2 100644 --- a/test/ps/output/Golden.CprResult.Test/golden.ir +++ b/test/ps/output/Golden.CprResult.Test/golden.ir @@ -38,28 +38,28 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.CprResult.Test", qnameName = Name "sub$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$524" ) :| [ ParamNamed Nothing ( Name "y$525" ) ] ) + ( ParamNamed Nothing ( Name "x$525" ) :| [ ParamNamed Nothing ( Name "y$526" ) ] ) ( PrimBinOp Nothing PrimSub - ( Ref Nothing ( Local ( Name "x$524" ) ) ) - ( Ref Nothing ( Local ( Name "y$525" ) ) ) + ( Ref Nothing ( Local ( Name "x$525" ) ) ) + ( Ref Nothing ( Local ( Name "y$526" ) ) ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.CprResult.Test", qnameName = Name "logShow" }, AbsN Nothing - ( ParamNamed Nothing ( Name "a$521" ) :| [] ) + ( ParamNamed Nothing ( Name "a$522" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "log" ) ) ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "showIntImpl" ) ) ) - ( Ref Nothing ( Local ( Name "a$521" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "a$522" ) ) :| [] ) :| [] ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.CprResult.Test", qnameName = Name "logShow1" }, AbsN Nothing - ( ParamNamed Nothing ( Name "a$518" ) :| [] ) + ( ParamNamed Nothing ( Name "a$519" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "log" ) ) ) ( PrimBinOp Nothing PrimConcat @@ -68,7 +68,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "showIntImpl" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "a$518" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "a$519" ) ) ) :| [] ) ) ( PrimBinOp Nothing PrimConcat @@ -77,7 +77,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "showIntImpl" ) ) ) ( DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "a$518" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "a$519" ) ) ) :| [] ) ) ( LiteralString Nothing ")" ) @@ -297,7 +297,7 @@ UberModule }, AbsN Nothing ( ParamNamed Nothing ( Name "n" ) :| [] ) ( LetValues Nothing - ( ParamNamed Nothing ( Name "$v595" ) :| [ ParamNamed Nothing ( Name "$v596" ) ] ) + ( ParamNamed Nothing ( Name "$v596" ) :| [ ParamNamed Nothing ( Name "$v597" ) ] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.CprResult.Test" ) ( Name "branchy$r" ) ) @@ -305,8 +305,8 @@ UberModule ( Ref Nothing ( Local ( Name "n" ) ) :| [] ) ) ( PrimBinOp Nothing PrimSub - ( Ref Nothing ( Local ( Name "$v595" ) ) ) ( Ref Nothing ( Local ( Name "$v596" ) ) ) + ( Ref Nothing ( Local ( Name "$v597" ) ) ) ) ) ), Standalone @@ -453,14 +453,14 @@ UberModule }, AbsN Nothing ( ParamNamed Nothing ( Name "n" ) :| [] ) ( LetValues Nothing - ( ParamNamed Nothing ( Name "$v597" ) :| [ ParamNamed Nothing ( Name "$v598" ) ] ) + ( ParamNamed Nothing ( Name "$v598" ) :| [ ParamNamed Nothing ( Name "$v599" ) ] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.CprResult.Test" ) ( Name "big$r" ) ) ) ( Ref Nothing ( Local ( Name "n" ) ) :| [] ) ) ( PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "$v597" ) ) ) ( Ref Nothing ( Local ( Name "$v598" ) ) ) + ( Ref Nothing ( Local ( Name "$v599" ) ) ) ) ) ) @@ -522,8 +522,8 @@ UberModule ) ( LetValues Nothing ( ParamNamed Nothing - ( Name "$v599" ) :| - [ ParamNamed Nothing ( Name "$v600" ) ] + ( Name "$v600" ) :| + [ ParamNamed Nothing ( Name "$v601" ) ] ) ( AppN Nothing ( Ref Nothing @@ -536,8 +536,8 @@ UberModule ( Imported ( ModuleName "Golden.CprResult.Test" ) ( Name "sub$w" ) ) ) ( Ref Nothing - ( Local ( Name "$v599" ) ) :| - [ Ref Nothing ( Local ( Name "$v600" ) ) ] + ( Local ( Name "$v600" ) ) :| + [ Ref Nothing ( Local ( Name "$v601" ) ) ] ) ) :| [] ) @@ -551,8 +551,8 @@ UberModule ) ( LetValues Nothing ( ParamNamed Nothing - ( Name "$v601" ) :| - [ ParamNamed Nothing ( Name "$v602" ) ] + ( Name "$v602" ) :| + [ ParamNamed Nothing ( Name "$v603" ) ] ) ( AppN Nothing ( Ref Nothing @@ -565,8 +565,8 @@ UberModule ( Imported ( ModuleName "Golden.CprResult.Test" ) ( Name "sub$w" ) ) ) ( Ref Nothing - ( Local ( Name "$v601" ) ) :| - [ Ref Nothing ( Local ( Name "$v602" ) ) ] + ( Local ( Name "$v602" ) ) :| + [ Ref Nothing ( Local ( Name "$v603" ) ) ] ) ) :| [] ) @@ -592,7 +592,7 @@ UberModule ( Imported ( ModuleName "Golden.CprResult.Test" ) ( Name "logShow" ) ) ) ( LetValues Nothing - ( ParamNamed Nothing ( Name "$v603" ) :| [ ParamNamed Nothing ( Name "$v604" ) ] ) + ( ParamNamed Nothing ( Name "$v604" ) :| [ ParamNamed Nothing ( Name "$v605" ) ] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.CprResult.Test" ) ( Name "big$r" ) ) @@ -600,8 +600,8 @@ UberModule ( LiteralInt Nothing 3 :| [] ) ) ( PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "$v603" ) ) ) ( Ref Nothing ( Local ( Name "$v604" ) ) ) + ( Ref Nothing ( Local ( Name "$v605" ) ) ) ) :| [] ) ) diff --git a/test/ps/output/Golden.CprResult.Test/golden.lua b/test/ps/output/Golden.CprResult.Test/golden.lua index a46fc22f..8a535f23 100644 --- a/test/ps/output/Golden.CprResult.Test/golden.lua +++ b/test/ps/output/Golden.CprResult.Test/golden.lua @@ -8,14 +8,14 @@ local Effect_Console_log = Effect_Console_foreign.log local Data_Tuple_Tuple_S_w = function(value0, value1) return { value0, value1 } end -local Golden_CprResult_Test_sub_S_w = function(x_S_524, y_S_525) - return x_S_524 - y_S_525 +local Golden_CprResult_Test_sub_S_w = function(x_S_525, y_S_526) + return x_S_525 - y_S_526 end -local Golden_CprResult_Test_logShow = function(a_S_521) - return Effect_Console_log(Data_Show_showIntImpl(a_S_521)) +local Golden_CprResult_Test_logShow = function(a_S_522) + return Effect_Console_log(Data_Show_showIntImpl(a_S_522)) end -local Golden_CprResult_Test_logShow1 = function(a_S_518) - return Effect_Console_log("(Tuple " .. Data_Show_showIntImpl(a_S_518[1]) .. " " .. Data_Show_showIntImpl(a_S_518[2]) .. ")") +local Golden_CprResult_Test_logShow1 = function(a_S_519) + return Effect_Console_log("(Tuple " .. Data_Show_showIntImpl(a_S_519[1]) .. " " .. Data_Show_showIntImpl(a_S_519[2]) .. ")") end M.Golden_CprResult_Test_step = function(s) return Data_Tuple_Tuple_S_w(s * 2, s + 1) @@ -49,8 +49,8 @@ local Golden_CprResult_Test_branchy = function(branchy_S_p1) end local Golden_CprResult_Test_keepBranchy = Golden_CprResult_Test_branchy(3) M.Golden_CprResult_Test_useBranchy = function(n) - local _S_v595, _S_v596 = Golden_CprResult_Test_branchy_S_r(n) - return _S_v595 - _S_v596 + local _S_v596, _S_v597 = Golden_CprResult_Test_branchy_S_r(n) + return _S_v596 - _S_v597 end local Golden_CprResult_Test_big_S_r = function(n) local a1 = n + 1 @@ -75,23 +75,23 @@ M.Golden_CprResult_Test_big = function(big_S_p1) return { big_S_v1, big_S_v2 } end M.Golden_CprResult_Test_useBig = function(n) - local _S_v597, _S_v598 = Golden_CprResult_Test_big_S_r(n) - return _S_v597 + _S_v598 + local _S_v598, _S_v599 = Golden_CprResult_Test_big_S_r(n) + return _S_v598 + _S_v599 end return (function() local _ = Golden_CprResult_Test_logShow(16)() local _ = Golden_CprResult_Test_logShow1(Golden_CprResult_Test_pair)() local _ = Golden_CprResult_Test_logShow((function() - local _S_v599, _S_v600 = Golden_CprResult_Test_branchy_S_r(7) - return Golden_CprResult_Test_sub_S_w(_S_v599, _S_v600) + local _S_v600, _S_v601 = Golden_CprResult_Test_branchy_S_r(7) + return Golden_CprResult_Test_sub_S_w(_S_v600, _S_v601) end)())() local _ = Golden_CprResult_Test_logShow((function() - local _S_v601, _S_v602 = Golden_CprResult_Test_branchy_S_r(-7) - return Golden_CprResult_Test_sub_S_w(_S_v601, _S_v602) + local _S_v602, _S_v603 = Golden_CprResult_Test_branchy_S_r(-7) + return Golden_CprResult_Test_sub_S_w(_S_v602, _S_v603) end)())() local _ = Golden_CprResult_Test_logShow1(Golden_CprResult_Test_keepBranchy)() return Golden_CprResult_Test_logShow((function() - local _S_v603, _S_v604 = Golden_CprResult_Test_big_S_r(3) - return _S_v603 + _S_v604 + local _S_v604, _S_v605 = Golden_CprResult_Test_big_S_r(3) + return _S_v604 + _S_v605 end)())() end)() diff --git a/test/ps/output/Golden.CprState.Test/golden.ir b/test/ps/output/Golden.CprState.Test/golden.ir index 69e93736..fbe99850 100644 --- a/test/ps/output/Golden.CprState.Test/golden.ir +++ b/test/ps/output/Golden.CprState.Test/golden.ir @@ -54,12 +54,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$521" ) :| [] ) + ( ParamNamed Nothing ( Name "f$523" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$522" ) :| [] ) + ( ParamNamed Nothing ( Name "m$524" ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$521" ) ) ) - ( Ref Nothing ( Local ( Name "m$522" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$523" ) ) ) + ( Ref Nothing ( Local ( Name "m$524" ) ) :| [] ) ) ) ) @@ -77,8 +77,8 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$523" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$523" ) ) ) + ( ParamNamed Nothing ( Name "x$525" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$525" ) ) ) ), ( PropName "Apply0", AbsN Nothing ( ParamUnused Nothing :| [] ) @@ -215,7 +215,7 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "dictMonad$524", AppN Nothing + ( Nothing, Name "dictMonad$526", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Monad.State.Trans" ) @@ -227,10 +227,10 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "bind$525", ObjectProp Nothing + ( Nothing, Name "bind$527", ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$524" ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad$526" ) ) ) ( PropName "Bind1" ) ) ( Ref Nothing @@ -241,28 +241,28 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$526" ) :| [] ) + ( ParamNamed Nothing ( Name "f$528" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a$527" ) :| [] ) + ( ParamNamed Nothing ( Name "a$529" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$525" ) ) ) - ( Ref Nothing ( Local ( Name "f$526" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$527" ) ) ) + ( Ref Nothing ( Local ( Name "f$528" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f'$528" ) :| [] ) + ( ParamNamed Nothing ( Name "f'$530" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$525" ) ) ) - ( Ref Nothing ( Local ( Name "a$527" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$527" ) ) ) + ( Ref Nothing ( Local ( Name "a$529" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a'$529" ) :| [] ) + ( ParamNamed Nothing ( Name "a'$531" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$524" ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad$526" ) ) ) ( PropName "Applicative0" ) ) ( Ref Nothing @@ -275,8 +275,8 @@ UberModule ( PropName "pure" ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f'$528" ) ) ) - ( Ref Nothing ( Local ( Name "a'$529" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "f'$530" ) ) ) + ( Ref Nothing ( Local ( Name "a'$531" ) ) :| [] ) :| [] ) ) :| [] ) @@ -292,11 +292,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$517" ) :| [] ) + ( ParamNamed Nothing ( Name "f$519" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$518" ) :| [] ) + ( ParamNamed Nothing ( Name "v$520" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$519" ) :| [] ) + ( ParamNamed Nothing ( Name "s$521" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -334,26 +334,26 @@ UberModule ( PropName "map" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$520" ) :| [] ) + ( ParamNamed Nothing ( Name "v1$522" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$517" ) ) ) + ( Ref Nothing ( Local ( Name "f$519" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v1$520" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$522" ) ) ) :| [] ) :| [ DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v1$520" ) ) ) + ( Ref Nothing ( Local ( Name "v1$522" ) ) ) ] ) ) :| [] ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$518" ) ) ) - ( Ref Nothing ( Local ( Name "s$519" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "v$520" ) ) ) + ( Ref Nothing ( Local ( Name "s$521" ) ) :| [] ) :| [] ) ) ) @@ -429,10 +429,10 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.CprState.Test", qnameName = Name "get" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$636" ) :| [] ) + ( ParamNamed Nothing ( Name "x$638" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) - ( Ref Nothing ( Local ( Name "x$636" ) ) :| [ Ref Nothing ( Local ( Name "x$636" ) ) ] ) + ( Ref Nothing ( Local ( Name "x$638" ) ) :| [ Ref Nothing ( Local ( Name "x$638" ) ) ] ) ) ), Standalone ( QName diff --git a/test/ps/output/Golden.CprState.Test/golden.lua b/test/ps/output/Golden.CprState.Test/golden.lua index 0b3a5c63..88931cd7 100644 --- a/test/ps/output/Golden.CprState.Test/golden.lua +++ b/test/ps/output/Golden.CprState.Test/golden.lua @@ -11,8 +11,8 @@ local Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_521) - return function(m_S_522) return f_S_521(m_S_522) end + map = function(f_S_523) + return function(m_S_524) return f_S_523(m_S_524) end end } end @@ -20,7 +20,7 @@ local Data_Identity_applyIdentity = { local Data_Identity_monadIdentity = { Applicative0 = function() return { - pure = function(x_S_523) return x_S_523 end, + pure = function(x_S_525) return x_S_525 end, Apply0 = function() return Data_Identity_applyIdentity end } end, @@ -65,13 +65,13 @@ end Control_Monad_State_Trans_applyStateT = function(dictMonad) return { apply = (function() - local dictMonad_S_524 = Control_Monad_State_Trans_monadStateT(dictMonad) - local bind_S_525 = (dictMonad_S_524.Bind1()).bind - return function(f_S_526) - return function(a_S_527) - return bind_S_525(f_S_526)(function(fPrime_S_528) - return bind_S_525(a_S_527)(function(aPrime_S_529) - return (dictMonad_S_524.Applicative0()).pure(fPrime_S_528(aPrime_S_529)) + local dictMonad_S_526 = Control_Monad_State_Trans_monadStateT(dictMonad) + local bind_S_527 = (dictMonad_S_526.Bind1()).bind + return function(f_S_528) + return function(a_S_529) + return bind_S_527(f_S_528)(function(fPrime_S_530) + return bind_S_527(a_S_529)(function(aPrime_S_531) + return (dictMonad_S_526.Applicative0()).pure(fPrime_S_530(aPrime_S_531)) end) end) end @@ -79,12 +79,12 @@ Control_Monad_State_Trans_applyStateT = function(dictMonad) end)(), Functor0 = function() return { - map = function(f_S_517) - return function(v_S_518) - return function(s_S_519) - return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( v1_S_520 ) - return Data_Tuple_Tuple_S_w(f_S_517(v1_S_520[1]), v1_S_520[2]) - end)(v_S_518(s_S_519)) + map = function(f_S_519) + return function(v_S_520) + return function(s_S_521) + return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( v1_S_522 ) + return Data_Tuple_Tuple_S_w(f_S_519(v1_S_522[1]), v1_S_522[2]) + end)(v_S_520(s_S_521)) end end end @@ -106,8 +106,8 @@ Control_Monad_State_Trans_applicativeStateT = function(dictMonad) end local Golden_CprState_Test_bindStateT = Control_Monad_State_Trans_bindStateT(Data_Identity_monadIdentity) local Golden_CprState_Test_bind = Golden_CprState_Test_bindStateT.bind -local Golden_CprState_Test_get = function(x_S_636) - return Data_Tuple_Tuple_S_w(x_S_636, x_S_636) +local Golden_CprState_Test_get = function(x_S_638) + return Data_Tuple_Tuple_S_w(x_S_638, x_S_638) end local Golden_CprState_Test_discard = Golden_CprState_Test_bindStateT.bind local Golden_CprState_Test_go = Golden_CprState_Test_bind(Golden_CprState_Test_get)(function( x1 ) diff --git a/test/ps/output/Golden.LongApplyChain.Test/golden.ir b/test/ps/output/Golden.LongApplyChain.Test/golden.ir index 4e6195cf..3d059fe7 100644 --- a/test/ps/output/Golden.LongApplyChain.Test/golden.ir +++ b/test/ps/output/Golden.LongApplyChain.Test/golden.ir @@ -27,7 +27,7 @@ UberModule ( AppN Nothing ( Let Nothing ( Standalone - ( Nothing, Name "v$625", IfThenElse Nothing + ( Nothing, Name "v$626", IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$133" ) ) ) ) @@ -37,24 +37,24 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ AbsN Nothing - ( ParamNamed Nothing ( Name "x$318" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$318" ) ) ) + ( ParamNamed Nothing ( Name "x$319" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$319" ) ) ) ] ) ( Ref Nothing ( Imported ( ModuleName "Data.Maybe" ) ( Name "Nothing" ) ) ) ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$626" ) :| [] ) + ( ParamNamed Nothing ( Name "v1$627" ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$625" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$626" ) ) ) ) ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$626" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$627" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -62,10 +62,10 @@ UberModule ( CtorName "Just" ) [ AppN Nothing ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$625" ) ) ) + ( Ref Nothing ( Local ( Name "v$626" ) ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$626" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$627" ) ) ) :| [] ) ] ) @@ -82,7 +82,7 @@ UberModule { qnameModuleName = ModuleName "Golden.LongApplyChain.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$tmp646", AppN Nothing + ( Nothing, Name "$tmp647", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -640,7 +640,7 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$tmp647", AppN Nothing + ( Nothing, Name "$tmp648", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -916,7 +916,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp646" ) + ( Name "$tmp647" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1199,7 +1199,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp648", AppN Nothing + ( Nothing, Name "$tmp649", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -1475,7 +1475,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp647" ) + ( Name "$tmp648" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1758,7 +1758,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp649", AppN Nothing + ( Nothing, Name "$tmp650", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -2034,7 +2034,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp648" ) + ( Name "$tmp649" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -2317,7 +2317,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp650", AppN Nothing + ( Nothing, Name "$tmp651", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -2593,7 +2593,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp649" ) + ( Name "$tmp650" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -2876,7 +2876,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp651", AppN Nothing + ( Nothing, Name "$tmp652", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -3152,7 +3152,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp650" ) + ( Name "$tmp651" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -3435,7 +3435,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp652", AppN Nothing + ( Nothing, Name "$tmp653", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongApplyChain.Test" ) ( Name "applySecond$w" ) ) ) @@ -3711,7 +3711,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "$tmp651" ) + ( Name "$tmp652" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -4118,7 +4118,7 @@ UberModule ) ) ( Ref Nothing - ( Local ( Name "$tmp652" ) ) :| + ( Local ( Name "$tmp653" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) ( TyName "Maybe" ) diff --git a/test/ps/output/Golden.LongApplyChain.Test/golden.lua b/test/ps/output/Golden.LongApplyChain.Test/golden.lua index 3376cb52..4ba25319 100644 --- a/test/ps/output/Golden.LongApplyChain.Test/golden.lua +++ b/test/ps/output/Golden.LongApplyChain.Test/golden.lua @@ -4,17 +4,17 @@ local Effect_Console_foreign = { } local Data_Maybe_Nothing = { "Data.Maybe∷Maybe.Nothing" } local Golden_LongApplyChain_Test_applySecond_S_w = function(a_S_133, b_S_134) - local v_S_625 = (function() + local v_S_626 = (function() if "Data.Maybe∷Maybe.Just" == a_S_133[1] then - return { "Data.Maybe∷Maybe.Just", function(x_S_318) return x_S_318 end } + return { "Data.Maybe∷Maybe.Just", function(x_S_319) return x_S_319 end } else return Data_Maybe_Nothing end end)() - local v1_S_626 = b_S_134 - if "Data.Maybe∷Maybe.Just" == v_S_625[1] then - if "Data.Maybe∷Maybe.Just" == v1_S_626[1] then - return { "Data.Maybe∷Maybe.Just", (v_S_625[2](v1_S_626[2])) } + local v1_S_627 = b_S_134 + if "Data.Maybe∷Maybe.Just" == v_S_626[1] then + if "Data.Maybe∷Maybe.Just" == v1_S_627[1] then + return { "Data.Maybe∷Maybe.Just", (v_S_626[2](v1_S_627[2])) } else return Data_Maybe_Nothing end @@ -23,7 +23,7 @@ local Golden_LongApplyChain_Test_applySecond_S_w = function(a_S_133, b_S_134) end end local Golden_LongApplyChain_Test_compute = (function() - local _S_tmp646 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w({ + local _S_tmp647 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w({ "Data.Maybe∷Maybe.Just", 1 }, { "Data.Maybe∷Maybe.Just", 2 }), { "Data.Maybe∷Maybe.Just", 3 }), { @@ -66,7 +66,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 40 }), { "Data.Maybe∷Maybe.Just", 41 }) - local _S_tmp647 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp646, { + local _S_tmp648 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp647, { "Data.Maybe∷Maybe.Just", 42 }), { "Data.Maybe∷Maybe.Just", 43 }), { "Data.Maybe∷Maybe.Just", 44 }), { @@ -109,7 +109,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 81 }) - local _S_tmp648 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp647, { + local _S_tmp649 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp648, { "Data.Maybe∷Maybe.Just", 82 }), { "Data.Maybe∷Maybe.Just", 83 }), { "Data.Maybe∷Maybe.Just", 84 }), { @@ -152,7 +152,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 121 }) - local _S_tmp649 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp648, { + local _S_tmp650 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp649, { "Data.Maybe∷Maybe.Just", 122 }), { "Data.Maybe∷Maybe.Just", 123 }), { "Data.Maybe∷Maybe.Just", 124 }), { @@ -195,7 +195,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 161 }) - local _S_tmp650 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp649, { + local _S_tmp651 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp650, { "Data.Maybe∷Maybe.Just", 162 }), { "Data.Maybe∷Maybe.Just", 163 }), { "Data.Maybe∷Maybe.Just", 164 }), { @@ -238,7 +238,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 201 }) - local _S_tmp651 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp650, { + local _S_tmp652 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp651, { "Data.Maybe∷Maybe.Just", 202 }), { "Data.Maybe∷Maybe.Just", 203 }), { "Data.Maybe∷Maybe.Just", 204 }), { @@ -281,7 +281,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 241 }) - local _S_tmp652 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp651, { + local _S_tmp653 = Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp652, { "Data.Maybe∷Maybe.Just", 242 }), { "Data.Maybe∷Maybe.Just", 243 }), { "Data.Maybe∷Maybe.Just", 244 }), { @@ -324,7 +324,7 @@ local Golden_LongApplyChain_Test_compute = (function() "Data.Maybe∷Maybe.Just", 281 }) - return Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp652, { + return Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(Golden_LongApplyChain_Test_applySecond_S_w(_S_tmp653, { "Data.Maybe∷Maybe.Just", 282 }), { "Data.Maybe∷Maybe.Just", 283 }), { "Data.Maybe∷Maybe.Just", 284 }), { diff --git a/test/ps/output/Golden.LongBindFlipped.Test/golden.ir b/test/ps/output/Golden.LongBindFlipped.Test/golden.ir index fddee9ab..93e7f76f 100644 --- a/test/ps/output/Golden.LongBindFlipped.Test/golden.ir +++ b/test/ps/output/Golden.LongBindFlipped.Test/golden.ir @@ -16,16 +16,16 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongBindFlipped.Test", qnameName = Name "bindFlipped$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "b$310" ) :| [ ParamNamed Nothing ( Name "a$311" ) ] ) + ( ParamNamed Nothing ( Name "b$311" ) :| [ ParamNamed Nothing ( Name "a$312" ) ] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$311" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "a$312" ) ) ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "b$310" ) ) ) + ( Ref Nothing ( Local ( Name "b$311" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "a$311" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "a$312" ) ) ) :| [] ) ) ( Ctor Nothing SumType @@ -53,7 +53,7 @@ UberModule { qnameModuleName = ModuleName "Golden.LongBindFlipped.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$tmp332", AppN Nothing + ( Nothing, Name "$tmp333", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -605,7 +605,7 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$tmp333", AppN Nothing + ( Nothing, Name "$tmp334", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -1075,7 +1075,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp332" ) + ( Name "$tmp333" ) ) ] ) @@ -1158,7 +1158,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp334", AppN Nothing + ( Nothing, Name "$tmp335", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -1628,7 +1628,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp333" ) + ( Name "$tmp334" ) ) ] ) @@ -1711,7 +1711,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp335", AppN Nothing + ( Nothing, Name "$tmp336", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -2181,7 +2181,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp334" ) + ( Name "$tmp335" ) ) ] ) @@ -2264,7 +2264,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp336", AppN Nothing + ( Nothing, Name "$tmp337", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -2734,7 +2734,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp335" ) + ( Name "$tmp336" ) ) ] ) @@ -2817,7 +2817,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp337", AppN Nothing + ( Nothing, Name "$tmp338", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -3287,7 +3287,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp336" ) + ( Name "$tmp337" ) ) ] ) @@ -3370,7 +3370,7 @@ UberModule ] ) ), Standalone - ( Nothing, Name "$tmp338", AppN Nothing + ( Nothing, Name "$tmp339", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongBindFlipped.Test" ) ( Name "bindFlipped$w" ) ) ) @@ -3840,7 +3840,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp337" ) + ( Name "$tmp338" ) ) ] ) @@ -4149,7 +4149,7 @@ UberModule ) :| [ Ref Nothing ( Local - ( Name "$tmp338" ) + ( Name "$tmp339" ) ) ] ) diff --git a/test/ps/output/Golden.LongBindFlipped.Test/golden.lua b/test/ps/output/Golden.LongBindFlipped.Test/golden.lua index f4032feb..6e055190 100644 --- a/test/ps/output/Golden.LongBindFlipped.Test/golden.lua +++ b/test/ps/output/Golden.LongBindFlipped.Test/golden.lua @@ -2,9 +2,9 @@ local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } -local Golden_LongBindFlipped_Test_bindFlipped_S_w = function(b_S_310, a_S_311) - if "Data.Maybe∷Maybe.Just" == a_S_311[1] then - return b_S_310(a_S_311[2]) +local Golden_LongBindFlipped_Test_bindFlipped_S_w = function(b_S_311, a_S_312) + if "Data.Maybe∷Maybe.Just" == a_S_312[1] then + return b_S_311(a_S_312[2]) else return { "Data.Maybe∷Maybe.Nothing" } end @@ -13,17 +13,17 @@ local Golden_LongBindFlipped_Test_inc = function(x) return { "Data.Maybe∷Maybe.Just", x + 1 } end local Golden_LongBindFlipped_Test_compute = (function() - local _S_tmp332 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, { + local _S_tmp333 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, { "Data.Maybe∷Maybe.Just", 1 })))))))))))))))))))))))))))))))))))))))) - local _S_tmp333 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp332)))))))))))))))))))))))))))))))))))))))) local _S_tmp334 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp333)))))))))))))))))))))))))))))))))))))))) local _S_tmp335 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp334)))))))))))))))))))))))))))))))))))))))) local _S_tmp336 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp335)))))))))))))))))))))))))))))))))))))))) local _S_tmp337 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp336)))))))))))))))))))))))))))))))))))))))) local _S_tmp338 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp337)))))))))))))))))))))))))))))))))))))))) - return Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp338)))))))))))))))))))) + local _S_tmp339 = Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp338)))))))))))))))))))))))))))))))))))))))) + return Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, Golden_LongBindFlipped_Test_bindFlipped_S_w(Golden_LongBindFlipped_Test_inc, _S_tmp339)))))))))))))))))))) end)() return Effect_Console_foreign.log((function() if "Data.Maybe∷Maybe.Just" == Golden_LongBindFlipped_Test_compute[1] then diff --git a/test/ps/output/Golden.LongEitherBind.Test/golden.ir b/test/ps/output/Golden.LongEitherBind.Test/golden.ir index 6e561447..063886a7 100644 --- a/test/ps/output/Golden.LongEitherBind.Test/golden.ir +++ b/test/ps/output/Golden.LongEitherBind.Test/golden.ir @@ -28,7 +28,7 @@ UberModule ), ( Name "main", Let Nothing ( Standalone - ( Nothing, Name "$cse2149", DataArgumentByIndex Nothing SumType 0 + ( Nothing, Name "$cse2150", DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Imported ( ModuleName "Golden.LongEitherBind.Test" ) ( Name "compute" ) ) ) @@ -56,7 +56,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showStringImpl" ) ) - ( Ref Nothing ( Local ( Name "$cse2149" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse2150" ) ) :| [] ) ) ( LiteralString Nothing ")" ) ) @@ -69,7 +69,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showIntImpl" ) ) - ( Ref Nothing ( Local ( Name "$cse2149" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse2150" ) ) :| [] ) ) ( LiteralString Nothing ")" ) ) diff --git a/test/ps/output/Golden.LongEitherBind.Test/golden.lua b/test/ps/output/Golden.LongEitherBind.Test/golden.lua index d440f679..aa773c17 100644 --- a/test/ps/output/Golden.LongEitherBind.Test/golden.lua +++ b/test/ps/output/Golden.LongEitherBind.Test/golden.lua @@ -45,12 +45,12 @@ local Effect_Console_foreign = { } local Golden_LongEitherBind_Test_compute = { "Data.Either∷Either.Right", 451 } return (function() - local _S_cse2149 = Golden_LongEitherBind_Test_compute[2] + local _S_cse2150 = Golden_LongEitherBind_Test_compute[2] return Effect_Console_foreign.log((function() if "Data.Either∷Either.Left" == Golden_LongEitherBind_Test_compute[1] then - return "(Left " .. Data_Show_foreign.showStringImpl(_S_cse2149) .. ")" + return "(Left " .. Data_Show_foreign.showStringImpl(_S_cse2150) .. ")" else - return "(Right " .. Data_Show_foreign.showIntImpl(_S_cse2149) .. ")" + return "(Right " .. Data_Show_foreign.showIntImpl(_S_cse2150) .. ")" end end)())() end)() diff --git a/test/ps/output/Golden.LongExceptBind.Test/golden.ir b/test/ps/output/Golden.LongExceptBind.Test/golden.ir index 867e5db6..2b6a7f73 100644 --- a/test/ps/output/Golden.LongExceptBind.Test/golden.ir +++ b/test/ps/output/Golden.LongExceptBind.Test/golden.ir @@ -7,12 +7,6 @@ UberModule ( ModuleName "Data.Show" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Data/Show.purs" [ ( Nothing, Name "showIntImpl" ), ( Nothing, Name "showStringImpl" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" - }, ForeignImport Nothing - ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" - [ ( Nothing, Name "unsafeCoerce" ) ] - ), Standalone ( QName { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" }, ForeignImport Nothing @@ -38,12 +32,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$539" ) :| [] ) + ( ParamNamed Nothing ( Name "f$541" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$540" ) :| [] ) + ( ParamNamed Nothing ( Name "m$542" ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$539" ) ) ) - ( Ref Nothing ( Local ( Name "m$540" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$541" ) ) ) + ( Ref Nothing ( Local ( Name "m$542" ) ) :| [] ) ) ) ) @@ -57,8 +51,8 @@ UberModule }, LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$541" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$541" ) ) ) + ( ParamNamed Nothing ( Name "x$543" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$543" ) ) ) ), ( PropName "Apply0", AbsN Nothing ( ParamUnused Nothing :| [] ) @@ -160,17 +154,17 @@ UberModule ( Ref Nothing ( Local ( Name "v" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v2$544" ) :| [] ) + ( ParamNamed Nothing ( Name "v2$546" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse1410", DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v2$544" ) ) ) + ( Nothing, Name "$cse1413", DataArgumentByIndex Nothing SumType 0 + ( Ref Nothing ( Local ( Name "v2$546" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$544" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$546" ) ) ) ) ) ( AppN Nothing ( ObjectProp Nothing @@ -189,12 +183,12 @@ UberModule ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Left" ) - [ Ref Nothing ( Local ( Name "$cse1410" ) ) ] :| [] + [ Ref Nothing ( Local ( Name "$cse1413" ) ) ] :| [] ) ) ( AppN Nothing ( Ref Nothing ( Local ( Name "k" ) ) ) - ( Ref Nothing ( Local ( Name "$cse1410" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse1413" ) ) :| [] ) ) ) ) :| [] @@ -225,7 +219,7 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "dictMonad$547", AppN Nothing + ( Nothing, Name "dictMonad$550", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Monad.Except.Trans" ) @@ -237,10 +231,10 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "bind$548", ObjectProp Nothing + ( Nothing, Name "bind$551", ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$547" ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad$550" ) ) ) ( PropName "Bind1" ) ) ( Ref Nothing @@ -251,28 +245,28 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$549" ) :| [] ) + ( ParamNamed Nothing ( Name "f$552" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a$550" ) :| [] ) + ( ParamNamed Nothing ( Name "a$553" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$548" ) ) ) - ( Ref Nothing ( Local ( Name "f$549" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$551" ) ) ) + ( Ref Nothing ( Local ( Name "f$552" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f'$551" ) :| [] ) + ( ParamNamed Nothing ( Name "f'$554" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$548" ) ) ) - ( Ref Nothing ( Local ( Name "a$550" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$551" ) ) ) + ( Ref Nothing ( Local ( Name "a$553" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a'$552" ) :| [] ) + ( ParamNamed Nothing ( Name "a'$555" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$547" ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad$550" ) ) ) ( PropName "Applicative0" ) ) ( Ref Nothing @@ -285,8 +279,8 @@ UberModule ( PropName "pure" ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f'$551" ) ) ) - ( Ref Nothing ( Local ( Name "a'$552" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "f'$554" ) ) ) + ( Ref Nothing ( Local ( Name "a'$555" ) ) :| [] ) :| [] ) ) :| [] ) @@ -302,9 +296,9 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$536" ) :| [] ) + ( ParamNamed Nothing ( Name "f$538" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$538" ) :| [] ) + ( ParamNamed Nothing ( Name "v$540" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -342,40 +336,40 @@ UberModule ( PropName "map" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$546" ) :| [] ) + ( ParamNamed Nothing ( Name "m$548" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse1411", DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "m$546" ) ) ) + ( Nothing, Name "$cse1414", DataArgumentByIndex Nothing SumType 0 + ( Ref Nothing ( Local ( Name "m$548" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "m$546" ) ) ) + ( Ref Nothing ( Local ( Name "m$548" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Left" ) - [ Ref Nothing ( Local ( Name "$cse1411" ) ) ] + [ Ref Nothing ( Local ( Name "$cse1414" ) ) ] ) ( Ctor Nothing SumType ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Right" ) [ AppN Nothing - ( Ref Nothing ( Local ( Name "f$536" ) ) ) - ( Ref Nothing ( Local ( Name "$cse1411" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$538" ) ) ) + ( Ref Nothing ( Local ( Name "$cse1414" ) ) :| [] ) ] ) ) ) :| [] ) ) - ( Ref Nothing ( Local ( Name "v$538" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "v$540" ) ) :| [] ) ) ) ) @@ -392,7 +386,7 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$1204" ) :| [] ) + ( ParamNamed Nothing ( Name "x$1207" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing @@ -410,7 +404,7 @@ UberModule ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Right" ) - [ Ref Nothing ( Local ( Name "x$1204" ) ) ] :| [] + [ Ref Nothing ( Local ( Name "x$1207" ) ) ] :| [] ) ) ), @@ -446,10 +440,10 @@ UberModule { qnameModuleName = ModuleName "Golden.LongExceptBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont1413$w", AbsN Nothing + ( Nothing, Name "$kont1416$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1414" ) :| - [ ParamNamed Nothing ( Name "x160$1415" ) ] + ( Name "x1$1417" ) :| + [ ParamNamed Nothing ( Name "x160$1418" ) ] ) ( AppN Nothing ( AppN Nothing @@ -461,7 +455,7 @@ UberModule ( TyName "Either" ) ( CtorName "Right" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x160$1415" ) ) ) + ( Ref Nothing ( Local ( Name "x160$1418" ) ) ) ( LiteralInt Nothing 1 ) ] :| [] ) @@ -1435,7 +1429,7 @@ UberModule ( PrimBinOp Nothing PrimAdd ( Ref Nothing ( Local - ( Name "x1$1414" ) + ( Name "x1$1417" ) ) ) ( Ref Nothing @@ -1527,10 +1521,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont1416$w", AbsN Nothing + ( Nothing, Name "$kont1419$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1417" ) :| - [ ParamNamed Nothing ( Name "x120$1418" ) ] + ( Name "x1$1420" ) :| + [ ParamNamed Nothing ( Name "x120$1421" ) ] ) ( AppN Nothing ( AppN Nothing @@ -1542,7 +1536,7 @@ UberModule ( TyName "Either" ) ( CtorName "Right" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x120$1418" ) ) ) + ( Ref Nothing ( Local ( Name "x120$1421" ) ) ) ( LiteralInt Nothing 1 ) ] :| [] ) @@ -2500,12 +2494,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1413$w" ) + ( Name "$kont1416$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1417" ) + ( Name "x1$1420" ) ) :| [ Ref Nothing ( Local @@ -2595,10 +2589,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1419$w", AbsN Nothing + ( Nothing, Name "$kont1422$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1420" ) :| - [ ParamNamed Nothing ( Name "x80$1421" ) ] + ( Name "x1$1423" ) :| + [ ParamNamed Nothing ( Name "x80$1424" ) ] ) ( AppN Nothing ( AppN Nothing @@ -2610,7 +2604,7 @@ UberModule ( TyName "Either" ) ( CtorName "Right" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x80$1421" ) ) ) + ( Ref Nothing ( Local ( Name "x80$1424" ) ) ) ( LiteralInt Nothing 1 ) ] :| [] ) @@ -3566,12 +3560,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1416$w" ) + ( Name "$kont1419$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1420" ) + ( Name "x1$1423" ) ) :| [ Ref Nothing ( Local @@ -3661,10 +3655,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1422$w", AbsN Nothing + ( Nothing, Name "$kont1425$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1423" ) :| - [ ParamNamed Nothing ( Name "x40$1424" ) ] + ( Name "x1$1426" ) :| + [ ParamNamed Nothing ( Name "x40$1427" ) ] ) ( AppN Nothing ( AppN Nothing @@ -3676,7 +3670,7 @@ UberModule ( TyName "Either" ) ( CtorName "Right" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x40$1424" ) ) ) + ( Ref Nothing ( Local ( Name "x40$1427" ) ) ) ( LiteralInt Nothing 1 ) ] :| [] ) @@ -4632,12 +4626,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1419$w" ) + ( Name "$kont1422$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1423" ) + ( Name "x1$1426" ) ) :| [ Ref Nothing ( Local @@ -5681,7 +5675,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1422$w" ) + ( Name "$kont1425$w" ) ) ) ( Ref Nothing @@ -5778,12 +5772,8 @@ UberModule ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongExceptBind.Test", qnameName = Name "compute" - }, AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) - ( PropName "unsafeCoerce" ) - ) - ( Ref Nothing ( Imported ( ModuleName "Golden.LongExceptBind.Test" ) ( Name "go" ) ) :| [] ) + }, Ref Nothing + ( Imported ( ModuleName "Golden.LongExceptBind.Test" ) ( Name "go" ) ) ) ], uberModuleForeigns = [], uberModuleExports = [ @@ -5795,7 +5785,7 @@ UberModule ), ( Name "main", Let Nothing ( Standalone - ( Nothing, Name "$cse1412", DataArgumentByIndex Nothing SumType 0 + ( Nothing, Name "$cse1415", DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Imported ( ModuleName "Golden.LongExceptBind.Test" ) ( Name "compute" ) ) ) @@ -5823,7 +5813,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showStringImpl" ) ) - ( Ref Nothing ( Local ( Name "$cse1412" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse1415" ) ) :| [] ) ) ( LiteralString Nothing ")" ) ) @@ -5836,7 +5826,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showIntImpl" ) ) - ( Ref Nothing ( Local ( Name "$cse1412" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse1415" ) ) :| [] ) ) ( LiteralString Nothing ")" ) ) diff --git a/test/ps/output/Golden.LongExceptBind.Test/golden.lua b/test/ps/output/Golden.LongExceptBind.Test/golden.lua index 7fd5e47d..9914e613 100644 --- a/test/ps/output/Golden.LongExceptBind.Test/golden.lua +++ b/test/ps/output/Golden.LongExceptBind.Test/golden.lua @@ -40,7 +40,6 @@ local Data_Show_foreign = { return table.concat(out) end } -local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } @@ -48,14 +47,14 @@ local Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_539) - return function(m_S_540) return f_S_539(m_S_540) end + map = function(f_S_541) + return function(m_S_542) return f_S_541(m_S_542) end end } end } local Data_Identity_applicativeIdentity = { - pure = function(x_S_541) return x_S_541 end, + pure = function(x_S_543) return x_S_543 end, Apply0 = function() return Data_Identity_applyIdentity end } local Data_Identity_monadIdentity = { @@ -86,15 +85,15 @@ Control_Monad_Except_Trans_bindExceptT = function(dictMonad) return { bind = function(v) return function(k) - return (dictMonad.Bind1()).bind(v)(function(v2_S_544) - local _S_cse1410 = v2_S_544[2] - if "Data.Either∷Either.Left" == v2_S_544[1] then + return (dictMonad.Bind1()).bind(v)(function(v2_S_546) + local _S_cse1413 = v2_S_546[2] + if "Data.Either∷Either.Left" == v2_S_546[1] then return (dictMonad.Applicative0()).pure({ "Data.Either∷Either.Left", - _S_cse1410 + _S_cse1413 }) else - return k(_S_cse1410) + return k(_S_cse1413) end end) end @@ -107,13 +106,13 @@ end Control_Monad_Except_Trans_applyExceptT = function(dictMonad) return { apply = (function() - local dictMonad_S_547 = Control_Monad_Except_Trans_monadExceptT(dictMonad) - local bind_S_548 = (dictMonad_S_547.Bind1()).bind - return function(f_S_549) - return function(a_S_550) - return bind_S_548(f_S_549)(function(fPrime_S_551) - return bind_S_548(a_S_550)(function(aPrime_S_552) - return (dictMonad_S_547.Applicative0()).pure(fPrime_S_551(aPrime_S_552)) + local dictMonad_S_550 = Control_Monad_Except_Trans_monadExceptT(dictMonad) + local bind_S_551 = (dictMonad_S_550.Bind1()).bind + return function(f_S_552) + return function(a_S_553) + return bind_S_551(f_S_552)(function(fPrime_S_554) + return bind_S_551(a_S_553)(function(aPrime_S_555) + return (dictMonad_S_550.Applicative0()).pure(fPrime_S_554(aPrime_S_555)) end) end) end @@ -121,16 +120,16 @@ Control_Monad_Except_Trans_applyExceptT = function(dictMonad) end)(), Functor0 = function() return { - map = function(f_S_536) - return function(v_S_538) - return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( m_S_546 ) - local _S_cse1411 = m_S_546[2] - if "Data.Either∷Either.Left" == m_S_546[1] then - return { "Data.Either∷Either.Left", _S_cse1411 } + map = function(f_S_538) + return function(v_S_540) + return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( m_S_548 ) + local _S_cse1414 = m_S_548[2] + if "Data.Either∷Either.Left" == m_S_548[1] then + return { "Data.Either∷Either.Left", _S_cse1414 } else - return { "Data.Either∷Either.Right", (f_S_536(_S_cse1411)) } + return { "Data.Either∷Either.Right", (f_S_538(_S_cse1414)) } end - end)(v_S_538) + end)(v_S_540) end end } @@ -139,10 +138,10 @@ Control_Monad_Except_Trans_applyExceptT = function(dictMonad) end Control_Monad_Except_Trans_applicativeExceptT = function(dictMonad) return { - pure = function(x_S_1204) + pure = function(x_S_1207) return (dictMonad.Applicative0()).pure({ "Data.Either∷Either.Right", - x_S_1204 + x_S_1207 }) end, Apply0 = function() @@ -152,10 +151,10 @@ Control_Monad_Except_Trans_applicativeExceptT = function(dictMonad) end local Golden_LongExceptBind_Test_bind = (Control_Monad_Except_Trans_bindExceptT(Data_Identity_monadIdentity)).bind local Golden_LongExceptBind_Test_go = (function() - local _S_kont1413_S_w = function(x1_S_1414, x160_S_1415) + local _S_kont1416_S_w = function(x1_S_1417, x160_S_1418) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", - x160_S_1415 + 1 + x160_S_1418 + 1 })(function(x161) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", @@ -313,7 +312,7 @@ local Golden_LongExceptBind_Test_go = (function() "Data.Either∷Either.Right", x199 + 1 })(function( x200 ) - return (Control_Monad_Except_Trans_applicativeExceptT(Data_Identity_monadIdentity)).pure(x1_S_1414 + x200) + return (Control_Monad_Except_Trans_applicativeExceptT(Data_Identity_monadIdentity)).pure(x1_S_1417 + x200) end) end) end) @@ -355,10 +354,10 @@ local Golden_LongExceptBind_Test_go = (function() end) end) end - local _S_kont1416_S_w = function(x1_S_1417, x120_S_1418) + local _S_kont1419_S_w = function(x1_S_1420, x120_S_1421) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", - x120_S_1418 + 1 + x120_S_1421 + 1 })(function(x121) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", @@ -516,7 +515,7 @@ local Golden_LongExceptBind_Test_go = (function() "Data.Either∷Either.Right", x159 + 1 })(function( x160 ) - return _S_kont1413_S_w(x1_S_1417, x160) + return _S_kont1416_S_w(x1_S_1420, x160) end) end) end) @@ -558,10 +557,10 @@ local Golden_LongExceptBind_Test_go = (function() end) end) end - local _S_kont1419_S_w = function(x1_S_1420, x80_S_1421) + local _S_kont1422_S_w = function(x1_S_1423, x80_S_1424) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", - x80_S_1421 + 1 + x80_S_1424 + 1 })(function(x81) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", @@ -719,7 +718,7 @@ local Golden_LongExceptBind_Test_go = (function() "Data.Either∷Either.Right", x119 + 1 })(function( x120 ) - return _S_kont1416_S_w(x1_S_1420, x120) + return _S_kont1419_S_w(x1_S_1423, x120) end) end) end) @@ -761,10 +760,10 @@ local Golden_LongExceptBind_Test_go = (function() end) end) end - local _S_kont1422_S_w = function(x1_S_1423, x40_S_1424) + local _S_kont1425_S_w = function(x1_S_1426, x40_S_1427) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", - x40_S_1424 + 1 + x40_S_1427 + 1 })(function(x41) return Golden_LongExceptBind_Test_bind({ "Data.Either∷Either.Right", @@ -922,7 +921,7 @@ local Golden_LongExceptBind_Test_go = (function() "Data.Either∷Either.Right", x79 + 1 })(function( x80 ) - return _S_kont1419_S_w(x1_S_1423, x80) + return _S_kont1422_S_w(x1_S_1426, x80) end) end) end) @@ -1124,7 +1123,7 @@ local Golden_LongExceptBind_Test_go = (function() "Data.Either∷Either.Right", x39 + 1 })(function( x40 ) - return _S_kont1422_S_w(x1, x40) + return _S_kont1425_S_w(x1, x40) end) end) end) @@ -1166,14 +1165,14 @@ local Golden_LongExceptBind_Test_go = (function() end) end) end)() -local Golden_LongExceptBind_Test_compute = Unsafe_Coerce_foreign.unsafeCoerce(Golden_LongExceptBind_Test_go) +local Golden_LongExceptBind_Test_compute = Golden_LongExceptBind_Test_go return (function() - local _S_cse1412 = Golden_LongExceptBind_Test_compute[2] + local _S_cse1415 = Golden_LongExceptBind_Test_compute[2] return Effect_Console_foreign.log((function() if "Data.Either∷Either.Left" == Golden_LongExceptBind_Test_compute[1] then - return "(Left " .. Data_Show_foreign.showStringImpl(_S_cse1412) .. ")" + return "(Left " .. Data_Show_foreign.showStringImpl(_S_cse1415) .. ")" else - return "(Right " .. Data_Show_foreign.showIntImpl(_S_cse1412) .. ")" + return "(Right " .. Data_Show_foreign.showIntImpl(_S_cse1415) .. ")" end end)())() end)() diff --git a/test/ps/output/Golden.LongMaybeBind.Test/golden.ir b/test/ps/output/Golden.LongMaybeBind.Test/golden.ir index 36324eef..cdeaf577 100644 --- a/test/ps/output/Golden.LongMaybeBind.Test/golden.ir +++ b/test/ps/output/Golden.LongMaybeBind.Test/golden.ir @@ -28,16 +28,16 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongMaybeBind.Test", qnameName = Name "bind$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "v$305" ) :| [ ParamNamed Nothing ( Name "v1$306" ) ] ) + ( ParamNamed Nothing ( Name "v$306" ) :| [ ParamNamed Nothing ( Name "v1$307" ) ] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$305" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$306" ) ) ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "v1$306" ) ) ) + ( Ref Nothing ( Local ( Name "v1$307" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$305" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v$306" ) ) ) :| [] ) ) ( Ctor Nothing SumType @@ -51,10 +51,10 @@ UberModule { qnameModuleName = ModuleName "Golden.LongMaybeBind.Test", qnameName = Name "compute" }, Let Nothing ( Standalone - ( Nothing, Name "$kont1230$w", AbsN Nothing + ( Nothing, Name "$kont1231$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1231" ) :| - [ ParamNamed Nothing ( Name "x277$1232" ) ] + ( Name "x1$1232" ) :| + [ ParamNamed Nothing ( Name "x277$1233" ) ] ) ( AppN Nothing ( Ref Nothing @@ -65,7 +65,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x277$1232" ) ) ) + ( Ref Nothing ( Local ( Name "x277$1233" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -538,7 +538,7 @@ UberModule [ PrimBinOp Nothing PrimAdd ( Ref Nothing ( Local - ( Name "x1$1231" ) + ( Name "x1$1232" ) ) ) ( Ref Nothing @@ -619,10 +619,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont1233$w", AbsN Nothing + ( Nothing, Name "$kont1234$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1234" ) :| - [ ParamNamed Nothing ( Name "x238$1235" ) ] + ( Name "x1$1235" ) :| + [ ParamNamed Nothing ( Name "x238$1236" ) ] ) ( AppN Nothing ( Ref Nothing @@ -633,7 +633,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x238$1235" ) ) ) + ( Ref Nothing ( Local ( Name "x238$1236" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -1493,12 +1493,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1230$w" ) + ( Name "$kont1231$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1234" ) + ( Name "x1$1235" ) ) :| [ Ref Nothing ( Local @@ -1628,10 +1628,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1236$w", AbsN Nothing + ( Nothing, Name "$kont1237$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1237" ) :| - [ ParamNamed Nothing ( Name "x198$1238" ) ] + ( Name "x1$1238" ) :| + [ ParamNamed Nothing ( Name "x198$1239" ) ] ) ( AppN Nothing ( Ref Nothing @@ -1642,7 +1642,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x198$1238" ) ) ) + ( Ref Nothing ( Local ( Name "x198$1239" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -2506,12 +2506,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1233$w" ) + ( Name "$kont1234$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1237" ) + ( Name "x1$1238" ) ) :| [ Ref Nothing ( Local @@ -2641,10 +2641,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1239$w", AbsN Nothing + ( Nothing, Name "$kont1240$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1240" ) :| - [ ParamNamed Nothing ( Name "x158$1241" ) ] + ( Name "x1$1241" ) :| + [ ParamNamed Nothing ( Name "x158$1242" ) ] ) ( AppN Nothing ( Ref Nothing @@ -2655,7 +2655,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x158$1241" ) ) ) + ( Ref Nothing ( Local ( Name "x158$1242" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -3519,12 +3519,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1236$w" ) + ( Name "$kont1237$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1240" ) + ( Name "x1$1241" ) ) :| [ Ref Nothing ( Local @@ -3654,10 +3654,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1242$w", AbsN Nothing + ( Nothing, Name "$kont1243$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1243" ) :| - [ ParamNamed Nothing ( Name "x119$1244" ) ] + ( Name "x1$1244" ) :| + [ ParamNamed Nothing ( Name "x119$1245" ) ] ) ( AppN Nothing ( Ref Nothing @@ -3668,7 +3668,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x119$1244" ) ) ) + ( Ref Nothing ( Local ( Name "x119$1245" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -4528,12 +4528,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1239$w" ) + ( Name "$kont1240$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1243" ) + ( Name "x1$1244" ) ) :| [ Ref Nothing ( Local @@ -4663,10 +4663,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1245$w", AbsN Nothing + ( Nothing, Name "$kont1246$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1246" ) :| - [ ParamNamed Nothing ( Name "x79$1247" ) ] + ( Name "x1$1247" ) :| + [ ParamNamed Nothing ( Name "x79$1248" ) ] ) ( AppN Nothing ( Ref Nothing @@ -4677,7 +4677,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x79$1247" ) ) ) + ( Ref Nothing ( Local ( Name "x79$1248" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -5537,12 +5537,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1242$w" ) + ( Name "$kont1243$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1246" ) + ( Name "x1$1247" ) ) :| [ Ref Nothing ( Local @@ -5672,10 +5672,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1248$w", AbsN Nothing + ( Nothing, Name "$kont1249$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1249" ) :| - [ ParamNamed Nothing ( Name "x40$1250" ) ] + ( Name "x1$1250" ) :| + [ ParamNamed Nothing ( Name "x40$1251" ) ] ) ( AppN Nothing ( Ref Nothing @@ -5686,7 +5686,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x40$1250" ) ) ) + ( Ref Nothing ( Local ( Name "x40$1251" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -6542,12 +6542,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1245$w" ) + ( Name "$kont1246$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1249" ) + ( Name "x1$1250" ) ) :| [ Ref Nothing ( Local @@ -7534,7 +7534,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1248$w" ) + ( Name "$kont1249$w" ) ) ) ( Ref Nothing diff --git a/test/ps/output/Golden.LongMaybeBind.Test/golden.lua b/test/ps/output/Golden.LongMaybeBind.Test/golden.lua index 6b810d31..b3de865a 100644 --- a/test/ps/output/Golden.LongMaybeBind.Test/golden.lua +++ b/test/ps/output/Golden.LongMaybeBind.Test/golden.lua @@ -4,18 +4,18 @@ local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } -local Golden_LongMaybeBind_Test_bind_S_w = function(v_S_305, v1_S_306) - if "Data.Maybe∷Maybe.Just" == v_S_305[1] then - return v1_S_306(v_S_305[2]) +local Golden_LongMaybeBind_Test_bind_S_w = function(v_S_306, v1_S_307) + if "Data.Maybe∷Maybe.Just" == v_S_306[1] then + return v1_S_307(v_S_306[2]) else return { "Data.Maybe∷Maybe.Nothing" } end end local Golden_LongMaybeBind_Test_compute = (function() - local _S_kont1230_S_w = function(x1_S_1231, x277_S_1232) + local _S_kont1231_S_w = function(x1_S_1232, x277_S_1233) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x277_S_1232 + 1 + x277_S_1233 + 1 }, function(x278) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -107,7 +107,7 @@ local Golden_LongMaybeBind_Test_compute = (function() }, function(x300) return { "Data.Maybe∷Maybe.Just", - x1_S_1231 + x300 + x1_S_1232 + x300 } end) end) @@ -133,10 +133,10 @@ local Golden_LongMaybeBind_Test_compute = (function() end) end) end - local _S_kont1233_S_w = function(x1_S_1234, x238_S_1235) + local _S_kont1234_S_w = function(x1_S_1235, x238_S_1236) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x238_S_1235 + 1 + x238_S_1236 + 1 }, function(x239) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -294,7 +294,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x276 + 1 }, function( x277 ) - return _S_kont1230_S_w(x1_S_1234, x277) + return _S_kont1231_S_w(x1_S_1235, x277) end) end) end) @@ -336,10 +336,10 @@ local Golden_LongMaybeBind_Test_compute = (function() end) end) end - local _S_kont1236_S_w = function(x1_S_1237, x198_S_1238) + local _S_kont1237_S_w = function(x1_S_1238, x198_S_1239) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x198_S_1238 + 1 + x198_S_1239 + 1 }, function(x199) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -497,7 +497,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x237 + 1 }, function( x238 ) - return _S_kont1233_S_w(x1_S_1237, x238) + return _S_kont1234_S_w(x1_S_1238, x238) end) end) end) @@ -539,10 +539,10 @@ local Golden_LongMaybeBind_Test_compute = (function() end) end) end - local _S_kont1239_S_w = function(x1_S_1240, x158_S_1241) + local _S_kont1240_S_w = function(x1_S_1241, x158_S_1242) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x158_S_1241 + 1 + x158_S_1242 + 1 }, function(x159) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -700,7 +700,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x197 + 1 }, function( x198 ) - return _S_kont1236_S_w(x1_S_1240, x198) + return _S_kont1237_S_w(x1_S_1241, x198) end) end) end) @@ -742,10 +742,10 @@ local Golden_LongMaybeBind_Test_compute = (function() end) end) end - local _S_kont1242_S_w = function(x1_S_1243, x119_S_1244) + local _S_kont1243_S_w = function(x1_S_1244, x119_S_1245) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x119_S_1244 + 1 + x119_S_1245 + 1 }, function(x120) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -903,7 +903,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x157 + 1 }, function( x158 ) - return _S_kont1239_S_w(x1_S_1243, x158) + return _S_kont1240_S_w(x1_S_1244, x158) end) end) end) @@ -945,10 +945,10 @@ local Golden_LongMaybeBind_Test_compute = (function() end) end) end - local _S_kont1245_S_w = function(x1_S_1246, x79_S_1247) + local _S_kont1246_S_w = function(x1_S_1247, x79_S_1248) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x79_S_1247 + 1 + x79_S_1248 + 1 }, function(x80) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -1106,7 +1106,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x118 + 1 }, function( x119 ) - return _S_kont1242_S_w(x1_S_1246, x119) + return _S_kont1243_S_w(x1_S_1247, x119) end) end) end) @@ -1148,10 +1148,10 @@ local Golden_LongMaybeBind_Test_compute = (function() end) end) end - local _S_kont1248_S_w = function(x1_S_1249, x40_S_1250) + local _S_kont1249_S_w = function(x1_S_1250, x40_S_1251) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x40_S_1250 + 1 + x40_S_1251 + 1 }, function(x41) return Golden_LongMaybeBind_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -1309,7 +1309,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x78 + 1 }, function( x79 ) - return _S_kont1245_S_w(x1_S_1249, x79) + return _S_kont1246_S_w(x1_S_1250, x79) end) end) end) @@ -1511,7 +1511,7 @@ local Golden_LongMaybeBind_Test_compute = (function() "Data.Maybe∷Maybe.Just", x39 + 1 }, function( x40 ) - return _S_kont1248_S_w(x1, x40) + return _S_kont1249_S_w(x1, x40) end) end) end) diff --git a/test/ps/output/Golden.LongMaybeBindModule.Test/golden.ir b/test/ps/output/Golden.LongMaybeBindModule.Test/golden.ir index b7571580..2ec97f69 100644 --- a/test/ps/output/Golden.LongMaybeBindModule.Test/golden.ir +++ b/test/ps/output/Golden.LongMaybeBindModule.Test/golden.ir @@ -16,16 +16,16 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongMaybeBindModule.Test", qnameName = Name "bind$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "v$580" ) :| [ ParamNamed Nothing ( Name "v1$581" ) ] ) + ( ParamNamed Nothing ( Name "v$581" ) :| [ ParamNamed Nothing ( Name "v1$582" ) ] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$580" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$581" ) ) ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "v1$581" ) ) ) + ( Ref Nothing ( Local ( Name "v1$582" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$580" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v$581" ) ) ) :| [] ) ) ( Ctor Nothing SumType @@ -39,10 +39,10 @@ UberModule [ ( Name "compute", Let Nothing ( Standalone - ( Nothing, Name "$kont1494$w", AbsN Nothing + ( Nothing, Name "$kont1495$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1495" ) :| - [ ParamNamed Nothing ( Name "x277$276$1496" ) ] + ( Name "x1$0$1496" ) :| + [ ParamNamed Nothing ( Name "x277$276$1497" ) ] ) ( AppN Nothing ( Ref Nothing @@ -53,7 +53,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x277$276$1496" ) ) ) + ( Ref Nothing ( Local ( Name "x277$276$1497" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -533,7 +533,7 @@ UberModule [ PrimBinOp Nothing PrimAdd ( Ref Nothing ( Local - ( Name "x1$0$1495" ) + ( Name "x1$0$1496" ) ) ) ( Ref Nothing @@ -614,10 +614,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont1497$w", AbsN Nothing + ( Nothing, Name "$kont1498$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1498" ) :| - [ ParamNamed Nothing ( Name "x238$237$1499" ) ] + ( Name "x1$0$1499" ) :| + [ ParamNamed Nothing ( Name "x238$237$1500" ) ] ) ( AppN Nothing ( Ref Nothing @@ -628,7 +628,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x238$237$1499" ) ) ) + ( Ref Nothing ( Local ( Name "x238$237$1500" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -1493,12 +1493,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1494$w" ) + ( Name "$kont1495$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$0$1498" ) + ( Name "x1$0$1499" ) ) :| [ Ref Nothing ( Local @@ -1628,10 +1628,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1500$w", AbsN Nothing + ( Nothing, Name "$kont1501$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1501" ) :| - [ ParamNamed Nothing ( Name "x198$197$1502" ) ] + ( Name "x1$0$1502" ) :| + [ ParamNamed Nothing ( Name "x198$197$1503" ) ] ) ( AppN Nothing ( Ref Nothing @@ -1642,7 +1642,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x198$197$1502" ) ) ) + ( Ref Nothing ( Local ( Name "x198$197$1503" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -2511,12 +2511,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1497$w" ) + ( Name "$kont1498$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$0$1501" ) + ( Name "x1$0$1502" ) ) :| [ Ref Nothing ( Local @@ -2646,10 +2646,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1503$w", AbsN Nothing + ( Nothing, Name "$kont1504$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1504" ) :| - [ ParamNamed Nothing ( Name "x158$157$1505" ) ] + ( Name "x1$0$1505" ) :| + [ ParamNamed Nothing ( Name "x158$157$1506" ) ] ) ( AppN Nothing ( Ref Nothing @@ -2660,7 +2660,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x158$157$1505" ) ) ) + ( Ref Nothing ( Local ( Name "x158$157$1506" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -3529,12 +3529,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1500$w" ) + ( Name "$kont1501$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$0$1504" ) + ( Name "x1$0$1505" ) ) :| [ Ref Nothing ( Local @@ -3664,10 +3664,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1506$w", AbsN Nothing + ( Nothing, Name "$kont1507$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1507" ) :| - [ ParamNamed Nothing ( Name "x119$118$1508" ) ] + ( Name "x1$0$1508" ) :| + [ ParamNamed Nothing ( Name "x119$118$1509" ) ] ) ( AppN Nothing ( Ref Nothing @@ -3678,7 +3678,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x119$118$1508" ) ) ) + ( Ref Nothing ( Local ( Name "x119$118$1509" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -4543,12 +4543,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1503$w" ) + ( Name "$kont1504$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$0$1507" ) + ( Name "x1$0$1508" ) ) :| [ Ref Nothing ( Local @@ -4678,10 +4678,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1509$w", AbsN Nothing + ( Nothing, Name "$kont1510$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1510" ) :| - [ ParamNamed Nothing ( Name "x79$78$1511" ) ] + ( Name "x1$0$1511" ) :| + [ ParamNamed Nothing ( Name "x79$78$1512" ) ] ) ( AppN Nothing ( Ref Nothing @@ -4692,7 +4692,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x79$78$1511" ) ) ) + ( Ref Nothing ( Local ( Name "x79$78$1512" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -5559,12 +5559,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1506$w" ) + ( Name "$kont1507$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$0$1510" ) + ( Name "x1$0$1511" ) ) :| [ Ref Nothing ( Local @@ -5694,10 +5694,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1512$w", AbsN Nothing + ( Nothing, Name "$kont1513$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$0$1513" ) :| - [ ParamNamed Nothing ( Name "x40$39$1514" ) ] + ( Name "x1$0$1514" ) :| + [ ParamNamed Nothing ( Name "x40$39$1515" ) ] ) ( AppN Nothing ( Ref Nothing @@ -5708,7 +5708,7 @@ UberModule ( TyName "Maybe" ) ( CtorName "Just" ) [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x40$39$1514" ) ) ) + ( Ref Nothing ( Local ( Name "x40$39$1515" ) ) ) ( LiteralInt Nothing 1 ) ] :| [ AbsN Nothing @@ -6571,12 +6571,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1509$w" ) + ( Name "$kont1510$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$0$1513" ) + ( Name "x1$0$1514" ) ) :| [ Ref Nothing ( Local @@ -7572,7 +7572,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1512$w" ) + ( Name "$kont1513$w" ) ) ) ( Ref Nothing diff --git a/test/ps/output/Golden.LongMaybeBindModule.Test/golden.lua b/test/ps/output/Golden.LongMaybeBindModule.Test/golden.lua index c3f997b9..84966b9a 100644 --- a/test/ps/output/Golden.LongMaybeBindModule.Test/golden.lua +++ b/test/ps/output/Golden.LongMaybeBindModule.Test/golden.lua @@ -1,18 +1,18 @@ local Data_Unit_foreign = { unit = {} } local Data_Unit_unit = Data_Unit_foreign.unit -local Golden_LongMaybeBindModule_Test_bind_S_w = function(v_S_580, v1_S_581) - if "Data.Maybe∷Maybe.Just" == v_S_580[1] then - return v1_S_581(v_S_580[2]) +local Golden_LongMaybeBindModule_Test_bind_S_w = function(v_S_581, v1_S_582) + if "Data.Maybe∷Maybe.Just" == v_S_581[1] then + return v1_S_582(v_S_581[2]) else return { "Data.Maybe∷Maybe.Nothing" } end end return { compute = (function() - local _S_kont1494_S_w = function(x1_S_0_S_1495, x277_S_276_S_1496) + local _S_kont1495_S_w = function(x1_S_0_S_1496, x277_S_276_S_1497) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x277_S_276_S_1496 + 1 + x277_S_276_S_1497 + 1 }, function(x278_S_277) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -104,7 +104,7 @@ return { }, function(x300_S_299) return { "Data.Maybe∷Maybe.Just", - x1_S_0_S_1495 + x300_S_299 + x1_S_0_S_1496 + x300_S_299 } end) end) @@ -130,10 +130,10 @@ return { end) end) end - local _S_kont1497_S_w = function(x1_S_0_S_1498, x238_S_237_S_1499) + local _S_kont1498_S_w = function(x1_S_0_S_1499, x238_S_237_S_1500) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x238_S_237_S_1499 + 1 + x238_S_237_S_1500 + 1 }, function(x239_S_238) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -291,7 +291,7 @@ return { "Data.Maybe∷Maybe.Just", x276_S_275 + 1 }, function( x277_S_276 ) - return _S_kont1494_S_w(x1_S_0_S_1498, x277_S_276) + return _S_kont1495_S_w(x1_S_0_S_1499, x277_S_276) end) end) end) @@ -333,10 +333,10 @@ return { end) end) end - local _S_kont1500_S_w = function(x1_S_0_S_1501, x198_S_197_S_1502) + local _S_kont1501_S_w = function(x1_S_0_S_1502, x198_S_197_S_1503) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x198_S_197_S_1502 + 1 + x198_S_197_S_1503 + 1 }, function(x199_S_198) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -494,7 +494,7 @@ return { "Data.Maybe∷Maybe.Just", x237_S_236 + 1 }, function( x238_S_237 ) - return _S_kont1497_S_w(x1_S_0_S_1501, x238_S_237) + return _S_kont1498_S_w(x1_S_0_S_1502, x238_S_237) end) end) end) @@ -536,10 +536,10 @@ return { end) end) end - local _S_kont1503_S_w = function(x1_S_0_S_1504, x158_S_157_S_1505) + local _S_kont1504_S_w = function(x1_S_0_S_1505, x158_S_157_S_1506) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x158_S_157_S_1505 + 1 + x158_S_157_S_1506 + 1 }, function(x159_S_158) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -697,7 +697,7 @@ return { "Data.Maybe∷Maybe.Just", x197_S_196 + 1 }, function( x198_S_197 ) - return _S_kont1500_S_w(x1_S_0_S_1504, x198_S_197) + return _S_kont1501_S_w(x1_S_0_S_1505, x198_S_197) end) end) end) @@ -739,10 +739,10 @@ return { end) end) end - local _S_kont1506_S_w = function(x1_S_0_S_1507, x119_S_118_S_1508) + local _S_kont1507_S_w = function(x1_S_0_S_1508, x119_S_118_S_1509) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x119_S_118_S_1508 + 1 + x119_S_118_S_1509 + 1 }, function(x120_S_119) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -900,7 +900,7 @@ return { "Data.Maybe∷Maybe.Just", x157_S_156 + 1 }, function( x158_S_157 ) - return _S_kont1503_S_w(x1_S_0_S_1507, x158_S_157) + return _S_kont1504_S_w(x1_S_0_S_1508, x158_S_157) end) end) end) @@ -942,10 +942,10 @@ return { end) end) end - local _S_kont1509_S_w = function(x1_S_0_S_1510, x79_S_78_S_1511) + local _S_kont1510_S_w = function(x1_S_0_S_1511, x79_S_78_S_1512) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x79_S_78_S_1511 + 1 + x79_S_78_S_1512 + 1 }, function(x80_S_79) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -1103,7 +1103,7 @@ return { "Data.Maybe∷Maybe.Just", x118_S_117 + 1 }, function( x119_S_118 ) - return _S_kont1506_S_w(x1_S_0_S_1510, x119_S_118) + return _S_kont1507_S_w(x1_S_0_S_1511, x119_S_118) end) end) end) @@ -1145,10 +1145,10 @@ return { end) end) end - local _S_kont1512_S_w = function(x1_S_0_S_1513, x40_S_39_S_1514) + local _S_kont1513_S_w = function(x1_S_0_S_1514, x40_S_39_S_1515) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", - x40_S_39_S_1514 + 1 + x40_S_39_S_1515 + 1 }, function(x41_S_40) return Golden_LongMaybeBindModule_Test_bind_S_w({ "Data.Maybe∷Maybe.Just", @@ -1306,7 +1306,7 @@ return { "Data.Maybe∷Maybe.Just", x78_S_77 + 1 }, function( x79_S_78 ) - return _S_kont1509_S_w(x1_S_0_S_1513, x79_S_78) + return _S_kont1510_S_w(x1_S_0_S_1514, x79_S_78) end) end) end) @@ -1508,7 +1508,7 @@ return { "Data.Maybe∷Maybe.Just", x39_S_38 + 1 }, function( x40_S_39 ) - return _S_kont1512_S_w(x1_S_0, x40_S_39) + return _S_kont1513_S_w(x1_S_0, x40_S_39) end) end) end) diff --git a/test/ps/output/Golden.LongReaderBind.Test/golden.ir b/test/ps/output/Golden.LongReaderBind.Test/golden.ir index 479f6a88..197c5a4d 100644 --- a/test/ps/output/Golden.LongReaderBind.Test/golden.ir +++ b/test/ps/output/Golden.LongReaderBind.Test/golden.ir @@ -7,12 +7,6 @@ UberModule ( ModuleName "Data.Show" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Data/Show.purs" [ ( Nothing, Name "showIntImpl" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" - }, ForeignImport Nothing - ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" - [ ( Nothing, Name "unsafeCoerce" ) ] - ), Standalone ( QName { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" }, ForeignImport Nothing @@ -22,23 +16,18 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "go" }, AbsN Nothing - ( ParamNamed Nothing ( Name "r$560" ) :| [] ) + ( ParamNamed Nothing ( Name "r$563" ) :| [] ) ( PrimBinOp Nothing PrimAdd ( PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "r$560" ) ) ) - ( Ref Nothing ( Local ( Name "r$560" ) ) ) + ( Ref Nothing ( Local ( Name "r$563" ) ) ) + ( Ref Nothing ( Local ( Name "r$563" ) ) ) ) - ( Ref Nothing ( Local ( Name "r$560" ) ) ) + ( Ref Nothing ( Local ( Name "r$563" ) ) ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongReaderBind.Test", qnameName = Name "compute" - }, AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) - ( PropName "unsafeCoerce" ) - ) - ( LiteralInt Nothing 9 :| [] ) + }, LiteralInt Nothing 9 ) ], uberModuleForeigns = [], uberModuleExports = [ diff --git a/test/ps/output/Golden.LongReaderBind.Test/golden.lua b/test/ps/output/Golden.LongReaderBind.Test/golden.lua index aee19099..d3b17dd1 100644 --- a/test/ps/output/Golden.LongReaderBind.Test/golden.lua +++ b/test/ps/output/Golden.LongReaderBind.Test/golden.lua @@ -1,11 +1,10 @@ local M = {} local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } -local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } -M.Golden_LongReaderBind_Test_go = function(r_S_560) - return r_S_560 + r_S_560 + r_S_560 +M.Golden_LongReaderBind_Test_go = function(r_S_563) + return r_S_563 + r_S_563 + r_S_563 end -local Golden_LongReaderBind_Test_compute = Unsafe_Coerce_foreign.unsafeCoerce(9) +local Golden_LongReaderBind_Test_compute = 9 return Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(Golden_LongReaderBind_Test_compute))() diff --git a/test/ps/output/Golden.LongStackBind.Test/golden.ir b/test/ps/output/Golden.LongStackBind.Test/golden.ir index 15586271..aa015997 100644 --- a/test/ps/output/Golden.LongStackBind.Test/golden.ir +++ b/test/ps/output/Golden.LongStackBind.Test/golden.ir @@ -19,12 +19,6 @@ UberModule ( ModuleName "Data.Show" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Data/Show.purs" [ ( Nothing, Name "showIntImpl" ), ( Nothing, Name "showStringImpl" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" - }, ForeignImport Nothing - ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" - [ ( Nothing, Name "unsafeCoerce" ) ] - ), Standalone ( QName { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" }, ForeignImport Nothing @@ -157,7 +151,7 @@ UberModule ( PropName "map", AbsN Nothing ( ParamNamed Nothing ( Name "f" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$577" ) :| [] ) + ( ParamNamed Nothing ( Name "v$579" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -165,23 +159,23 @@ UberModule ( PropName "map" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$587" ) :| [] ) + ( ParamNamed Nothing ( Name "m$589" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse6551", DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "m$587" ) ) ) + ( Nothing, Name "$cse6554", DataArgumentByIndex Nothing SumType 0 + ( Ref Nothing ( Local ( Name "m$589" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "m$587" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "m$589" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Left" ) - [ Ref Nothing ( Local ( Name "$cse6551" ) ) ] + [ Ref Nothing ( Local ( Name "$cse6554" ) ) ] ) ( Ctor Nothing SumType ( ModuleName "Data.Either" ) @@ -189,14 +183,14 @@ UberModule ( CtorName "Right" ) [ AppN Nothing ( Ref Nothing ( Local ( Name "f" ) ) ) - ( Ref Nothing ( Local ( Name "$cse6551" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse6554" ) ) :| [] ) ] ) ) ) :| [] ) ) - ( Ref Nothing ( Local ( Name "v$577" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "v$579" ) ) :| [] ) ) ) ) @@ -262,17 +256,17 @@ UberModule ( Ref Nothing ( Local ( Name "v" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v2$585" ) :| [] ) + ( ParamNamed Nothing ( Name "v2$587" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse6552", DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v2$585" ) ) ) + ( Nothing, Name "$cse6555", DataArgumentByIndex Nothing SumType 0 + ( Ref Nothing ( Local ( Name "v2$587" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$585" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$587" ) ) ) ) ) ( AppN Nothing ( ObjectProp Nothing @@ -291,12 +285,12 @@ UberModule ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Left" ) - [ Ref Nothing ( Local ( Name "$cse6552" ) ) ] :| [] + [ Ref Nothing ( Local ( Name "$cse6555" ) ) ] :| [] ) ) ( AppN Nothing ( Ref Nothing ( Local ( Name "k" ) ) ) - ( Ref Nothing ( Local ( Name "$cse6552" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse6555" ) ) :| [] ) ) ) ) :| [] @@ -383,7 +377,7 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$4196" ) :| [] ) + ( ParamNamed Nothing ( Name "x$4199" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing @@ -401,7 +395,7 @@ UberModule ( ModuleName "Data.Either" ) ( TyName "Either" ) ( CtorName "Right" ) - [ Ref Nothing ( Local ( Name "x$4196" ) ) ] :| [] + [ Ref Nothing ( Local ( Name "x$4199" ) ) ] :| [] ) ) ), @@ -535,11 +529,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$572" ) :| [] ) + ( ParamNamed Nothing ( Name "f$574" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$573" ) :| [] ) + ( ParamNamed Nothing ( Name "v$575" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$574" ) :| [] ) + ( ParamNamed Nothing ( Name "s$576" ) :| [] ) ( AppN Nothing ( AppN Nothing ( AppN Nothing @@ -579,26 +573,26 @@ UberModule ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$575" ) :| [] ) + ( ParamNamed Nothing ( Name "v1$577" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$572" ) ) ) + ( Ref Nothing ( Local ( Name "f$574" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v1$575" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$577" ) ) ) :| [] ) :| [ DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v1$575" ) ) ) + ( Ref Nothing ( Local ( Name "v1$577" ) ) ) ] ) ) :| [] ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$573" ) ) ) - ( Ref Nothing ( Local ( Name "s$574" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "v$575" ) ) ) + ( Ref Nothing ( Local ( Name "s$576" ) ) :| [] ) :| [] ) ) ) @@ -670,8 +664,8 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$581" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$581" ) ) ) + ( ParamNamed Nothing ( Name "x$583" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$583" ) ) ) ), ( PropName "Apply0", AbsN Nothing ( ParamUnused Nothing :| [] ) @@ -687,12 +681,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "bind", AbsN Nothing - ( ParamNamed Nothing ( Name "v$579" ) :| [] ) + ( ParamNamed Nothing ( Name "v$581" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$580" ) :| [] ) + ( ParamNamed Nothing ( Name "f$582" ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$580" ) ) ) - ( Ref Nothing ( Local ( Name "v$579" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$582" ) ) ) + ( Ref Nothing ( Local ( Name "v$581" ) ) :| [] ) ) ) ), @@ -729,7 +723,7 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongStackBind.Test", qnameName = Name "get" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$2131" ) :| [] ) + ( ParamNamed Nothing ( Name "x$2134" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing @@ -746,8 +740,8 @@ UberModule ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) ( Ref Nothing - ( Local ( Name "x$2131" ) ) :| - [ Ref Nothing ( Local ( Name "x$2131" ) ) ] + ( Local ( Name "x$2134" ) ) :| + [ Ref Nothing ( Local ( Name "x$2134" ) ) ] ) :| [] ) ) @@ -792,18 +786,18 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongStackBind.Test", qnameName = Name "add$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$591" ) :| [ ParamNamed Nothing ( Name "y$592" ) ] ) + ( ParamNamed Nothing ( Name "x$594" ) :| [ ParamNamed Nothing ( Name "y$595" ) ] ) ( PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "x$591" ) ) ) - ( Ref Nothing ( Local ( Name "y$592" ) ) ) + ( Ref Nothing ( Local ( Name "x$594" ) ) ) + ( Ref Nothing ( Local ( Name "y$595" ) ) ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongStackBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont6554", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6555" ) :| [] ) + ( Nothing, Name "$kont6557", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6558" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -1332,7 +1326,7 @@ UberModule ) ( Ref Nothing ( Local - ( Name "x1$6555" ) + ( Name "x1$6558" ) ) :| [ Ref Nothing ( Local @@ -1386,8 +1380,8 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont6556", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6557" ) :| [] ) + ( Nothing, Name "$kont6559", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6560" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -2391,12 +2385,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6554" ) + ( Name "$kont6557" ) ) ) ( Ref Nothing ( Local - ( Name "x1$6557" ) + ( Name "x1$6560" ) ) :| [] ) ) :| [] @@ -2481,8 +2475,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont6558", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6559" ) :| [] ) + ( Nothing, Name "$kont6561", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6562" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -3486,12 +3480,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6556" ) + ( Name "$kont6559" ) ) ) ( Ref Nothing ( Local - ( Name "x1$6559" ) + ( Name "x1$6562" ) ) :| [] ) ) :| [] @@ -3576,8 +3570,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont6560", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6561" ) :| [] ) + ( Nothing, Name "$kont6563", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6564" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -4578,12 +4572,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6558" ) + ( Name "$kont6561" ) ) ) ( Ref Nothing ( Local - ( Name "x1$6561" ) + ( Name "x1$6564" ) ) :| [] ) ) :| [] @@ -4668,8 +4662,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont6562", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6563" ) :| [] ) + ( Nothing, Name "$kont6565", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6566" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -5670,12 +5664,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6560" ) + ( Name "$kont6563" ) ) ) ( Ref Nothing ( Local - ( Name "x1$6563" ) + ( Name "x1$6566" ) ) :| [] ) ) :| [] @@ -5760,8 +5754,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont6564", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6565" ) :| [] ) + ( Nothing, Name "$kont6567", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6568" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -6762,12 +6756,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6562" ) + ( Name "$kont6565" ) ) ) ( Ref Nothing ( Local - ( Name "x1$6565" ) + ( Name "x1$6568" ) ) :| [] ) ) :| [] @@ -6852,8 +6846,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont6566", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$6567" ) :| [] ) + ( Nothing, Name "$kont6569", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$6570" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -7854,12 +7848,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6564" ) + ( Name "$kont6567" ) ) ) ( Ref Nothing ( Local - ( Name "x1$6567" ) + ( Name "x1$6570" ) ) :| [] ) ) :| [] @@ -8931,7 +8925,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont6566" ) + ( Name "$kont6569" ) ) ) ( Ref Nothing @@ -9023,38 +9017,32 @@ UberModule ), Standalone ( QName { qnameModuleName = ModuleName "Golden.LongStackBind.Test", qnameName = Name "compute" - }, AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) - ( PropName "unsafeCoerce" ) + }, Let Nothing + ( Standalone + ( Nothing, Name "v$608", AppN Nothing + ( Ref Nothing ( Imported ( ModuleName "Golden.LongStackBind.Test" ) ( Name "go" ) ) ) + ( LiteralInt Nothing 0 :| [] ) + ) :| [] ) - ( Let Nothing - ( Standalone - ( Nothing, Name "v$605", AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Golden.LongStackBind.Test" ) ( Name "go" ) ) ) - ( LiteralInt Nothing 0 :| [] ) - ) :| [] + ( IfThenElse Nothing + ( Eq Nothing + ( LiteralString Nothing "Data.Either∷Either.Left" ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$608" ) ) ) ) + ) + ( Ctor Nothing SumType + ( ModuleName "Data.Either" ) + ( TyName "Either" ) + ( CtorName "Left" ) + [ DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Local ( Name "v$608" ) ) ) ] + ) + ( Ctor Nothing SumType + ( ModuleName "Data.Either" ) + ( TyName "Either" ) + ( CtorName "Right" ) + [ DataArgumentByIndex Nothing ProductType 0 + ( DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Local ( Name "v$608" ) ) ) ) + ] ) - ( IfThenElse Nothing - ( Eq Nothing - ( LiteralString Nothing "Data.Either∷Either.Left" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$605" ) ) ) ) - ) - ( Ctor Nothing SumType - ( ModuleName "Data.Either" ) - ( TyName "Either" ) - ( CtorName "Left" ) - [ DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Local ( Name "v$605" ) ) ) ] - ) - ( Ctor Nothing SumType - ( ModuleName "Data.Either" ) - ( TyName "Either" ) - ( CtorName "Right" ) - [ DataArgumentByIndex Nothing ProductType 0 - ( DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Local ( Name "v$605" ) ) ) ) - ] - ) - ) :| [] ) ) ], uberModuleForeigns = [], uberModuleExports = @@ -9067,7 +9055,7 @@ UberModule ), ( Name "main", Let Nothing ( Standalone - ( Nothing, Name "$cse6553", DataArgumentByIndex Nothing SumType 0 + ( Nothing, Name "$cse6556", DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Imported ( ModuleName "Golden.LongStackBind.Test" ) ( Name "compute" ) ) ) @@ -9095,7 +9083,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showStringImpl" ) ) - ( Ref Nothing ( Local ( Name "$cse6553" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse6556" ) ) :| [] ) ) ( LiteralString Nothing ")" ) ) @@ -9108,7 +9096,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showIntImpl" ) ) - ( Ref Nothing ( Local ( Name "$cse6553" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse6556" ) ) :| [] ) ) ( LiteralString Nothing ")" ) ) diff --git a/test/ps/output/Golden.LongStackBind.Test/golden.lua b/test/ps/output/Golden.LongStackBind.Test/golden.lua index 785ccc9c..b6f35a0d 100644 --- a/test/ps/output/Golden.LongStackBind.Test/golden.lua +++ b/test/ps/output/Golden.LongStackBind.Test/golden.lua @@ -42,7 +42,6 @@ local Data_Show_foreign = { return table.concat(out) end } -local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } @@ -73,15 +72,15 @@ local Data_Identity_applyIdentity = { local Control_Monad_Except_Trans_functorExceptT = function(dictFunctor) return { map = function(f) - return function(v_S_577) - return dictFunctor.map(function(m_S_587) - local _S_cse6551 = m_S_587[2] - if "Data.Either∷Either.Left" == m_S_587[1] then - return { "Data.Either∷Either.Left", _S_cse6551 } + return function(v_S_579) + return dictFunctor.map(function(m_S_589) + local _S_cse6554 = m_S_589[2] + if "Data.Either∷Either.Left" == m_S_589[1] then + return { "Data.Either∷Either.Left", _S_cse6554 } else - return { "Data.Either∷Either.Right", (f(_S_cse6551)) } + return { "Data.Either∷Either.Right", (f(_S_cse6554)) } end - end)(v_S_577) + end)(v_S_579) end end } @@ -103,15 +102,15 @@ Control_Monad_Except_Trans_bindExceptT = function(dictMonad) return { bind = function(v) return function(k) - return (dictMonad.Bind1()).bind(v)(function(v2_S_585) - local _S_cse6552 = v2_S_585[2] - if "Data.Either∷Either.Left" == v2_S_585[1] then + return (dictMonad.Bind1()).bind(v)(function(v2_S_587) + local _S_cse6555 = v2_S_587[2] + if "Data.Either∷Either.Left" == v2_S_587[1] then return (dictMonad.Applicative0()).pure({ "Data.Either∷Either.Left", - _S_cse6552 + _S_cse6555 }) else - return k(_S_cse6552) + return k(_S_cse6555) end end) end @@ -131,10 +130,10 @@ Control_Monad_Except_Trans_applyExceptT = function(dictMonad) end Control_Monad_Except_Trans_applicativeExceptT = function(dictMonad) return { - pure = function(x_S_4196) + pure = function(x_S_4199) return (dictMonad.Applicative0()).pure({ "Data.Either∷Either.Right", - x_S_4196 + x_S_4199 }) end, Apply0 = function() @@ -176,12 +175,12 @@ Control_Monad_State_Trans_applyStateT = function(dictMonad) apply = Control_Monad_ap(Control_Monad_State_Trans_monadStateT(dictMonad)), Functor0 = function() return { - map = function(f_S_572) - return function(v_S_573) - return function(s_S_574) - return Data_Functor_map(((dictMonad.Bind1()).Apply0()).Functor0())(function( v1_S_575 ) - return Data_Tuple_Tuple_S_w(f_S_572(v1_S_575[1]), v1_S_575[2]) - end)(v_S_573(s_S_574)) + map = function(f_S_574) + return function(v_S_575) + return function(s_S_576) + return Data_Functor_map(((dictMonad.Bind1()).Apply0()).Functor0())(function( v1_S_577 ) + return Data_Tuple_Tuple_S_w(f_S_574(v1_S_577[1]), v1_S_577[2]) + end)(v_S_575(s_S_576)) end end end @@ -204,14 +203,14 @@ end local Golden_LongStackBind_Test_monadExceptT = Control_Monad_Except_Trans_monadExceptT({ Applicative0 = function() return { - pure = function(x_S_581) return x_S_581 end, + pure = function(x_S_583) return x_S_583 end, Apply0 = function() return Data_Identity_applyIdentity end } end, Bind1 = function() return { - bind = function(v_S_579) - return function(f_S_580) return f_S_580(v_S_579) end + bind = function(v_S_581) + return function(f_S_582) return f_S_582(v_S_581) end end, Apply0 = function() return Data_Identity_applyIdentity end } @@ -219,8 +218,8 @@ local Golden_LongStackBind_Test_monadExceptT = Control_Monad_Except_Trans_monadE }) local Golden_LongStackBind_Test_bindStateT = Control_Monad_State_Trans_bindStateT(Golden_LongStackBind_Test_monadExceptT) local Golden_LongStackBind_Test_bind = Golden_LongStackBind_Test_bindStateT.bind -local Golden_LongStackBind_Test_get = function(x_S_2131) - return (Golden_LongStackBind_Test_monadExceptT.Applicative0()).pure(Data_Tuple_Tuple_S_w(x_S_2131, x_S_2131)) +local Golden_LongStackBind_Test_get = function(x_S_2134) + return (Golden_LongStackBind_Test_monadExceptT.Applicative0()).pure(Data_Tuple_Tuple_S_w(x_S_2134, x_S_2134)) end local Golden_LongStackBind_Test_discard = Golden_LongStackBind_Test_bindStateT.bind local Golden_LongStackBind_Test_put = function(s_S_109) @@ -228,11 +227,11 @@ local Golden_LongStackBind_Test_put = function(s_S_109) return (Golden_LongStackBind_Test_monadExceptT.Applicative0()).pure(Data_Tuple_Tuple_S_w(Data_Unit_unit, s_S_109)) end end -local Golden_LongStackBind_Test_add_S_w = function(x_S_591, y_S_592) - return x_S_591 + y_S_592 +local Golden_LongStackBind_Test_add_S_w = function(x_S_594, y_S_595) + return x_S_594 + y_S_595 end local Golden_LongStackBind_Test_go = (function() - local _S_kont6554 = function(x1_S_6555) + local _S_kont6557 = function(x1_S_6558) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x141 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x141, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x142 ) @@ -254,7 +253,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x150 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x150, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( final ) - return Control_Applicative_pure(Control_Monad_State_Trans_applicativeStateT(Golden_LongStackBind_Test_monadExceptT))(Golden_LongStackBind_Test_add_S_w(x1_S_6555, final)) + return Control_Applicative_pure(Control_Monad_State_Trans_applicativeStateT(Golden_LongStackBind_Test_monadExceptT))(Golden_LongStackBind_Test_add_S_w(x1_S_6558, final)) end) end) end) @@ -277,7 +276,7 @@ local Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont6556 = function(x1_S_6557) + local _S_kont6559 = function(x1_S_6560) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x121 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x121, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x122 ) @@ -318,7 +317,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x139, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x140 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x140, 1)))(function( ) - return _S_kont6554(x1_S_6557) + return _S_kont6557(x1_S_6560) end) end) end) @@ -360,7 +359,7 @@ local Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont6558 = function(x1_S_6559) + local _S_kont6561 = function(x1_S_6562) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x101 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x101, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x102 ) @@ -401,7 +400,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x119, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x120 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x120, 1)))(function( ) - return _S_kont6556(x1_S_6559) + return _S_kont6559(x1_S_6562) end) end) end) @@ -443,7 +442,7 @@ local Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont6560 = function(x1_S_6561) + local _S_kont6563 = function(x1_S_6564) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x81 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x81, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x82 ) @@ -484,7 +483,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x99, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x100 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x100, 1)))(function( ) - return _S_kont6558(x1_S_6561) + return _S_kont6561(x1_S_6564) end) end) end) @@ -526,7 +525,7 @@ local Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont6562 = function(x1_S_6563) + local _S_kont6565 = function(x1_S_6566) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x61 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x61, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x62 ) @@ -567,7 +566,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x79, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x80 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x80, 1)))(function( ) - return _S_kont6560(x1_S_6563) + return _S_kont6563(x1_S_6566) end) end) end) @@ -609,7 +608,7 @@ local Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont6564 = function(x1_S_6565) + local _S_kont6567 = function(x1_S_6568) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x41 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x41, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x42 ) @@ -650,7 +649,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x59, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x60 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x60, 1)))(function( ) - return _S_kont6562(x1_S_6565) + return _S_kont6565(x1_S_6568) end) end) end) @@ -692,7 +691,7 @@ local Golden_LongStackBind_Test_go = (function() end) end) end - local _S_kont6566 = function(x1_S_6567) + local _S_kont6569 = function(x1_S_6570) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x21 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x21, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x22 ) @@ -733,7 +732,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x39, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x40 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x40, 1)))(function( ) - return _S_kont6564(x1_S_6567) + return _S_kont6567(x1_S_6570) end) end) end) @@ -815,7 +814,7 @@ local Golden_LongStackBind_Test_go = (function() return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x19, 1)))(function( ) return Golden_LongStackBind_Test_bind(Golden_LongStackBind_Test_get)(function( x20 ) return Golden_LongStackBind_Test_discard(Golden_LongStackBind_Test_put(Golden_LongStackBind_Test_add_S_w(x20, 1)))(function( ) - return _S_kont6566(x1) + return _S_kont6569(x1) end) end) end) @@ -857,21 +856,21 @@ local Golden_LongStackBind_Test_go = (function() end) end) end)() -local Golden_LongStackBind_Test_compute = Unsafe_Coerce_foreign.unsafeCoerce((function( ) - local v_S_605 = Golden_LongStackBind_Test_go(0) - if "Data.Either∷Either.Left" == v_S_605[1] then - return { "Data.Either∷Either.Left", v_S_605[2] } +local Golden_LongStackBind_Test_compute = (function() + local v_S_608 = Golden_LongStackBind_Test_go(0) + if "Data.Either∷Either.Left" == v_S_608[1] then + return { "Data.Either∷Either.Left", v_S_608[2] } else - return { "Data.Either∷Either.Right", v_S_605[2][1] } + return { "Data.Either∷Either.Right", v_S_608[2][1] } end -end)()) +end)() return (function() - local _S_cse6553 = Golden_LongStackBind_Test_compute[2] + local _S_cse6556 = Golden_LongStackBind_Test_compute[2] return Effect_Console_foreign.log((function() if "Data.Either∷Either.Left" == Golden_LongStackBind_Test_compute[1] then - return "(Left " .. Data_Show_foreign.showStringImpl(_S_cse6553) .. ")" + return "(Left " .. Data_Show_foreign.showStringImpl(_S_cse6556) .. ")" else - return "(Right " .. Data_Show_foreign.showIntImpl(_S_cse6553) .. ")" + return "(Right " .. Data_Show_foreign.showIntImpl(_S_cse6556) .. ")" end end)())() end)() diff --git a/test/ps/output/Golden.LongStateBind.Test/golden.ir b/test/ps/output/Golden.LongStateBind.Test/golden.ir index 98e3dd6e..766f0848 100644 --- a/test/ps/output/Golden.LongStateBind.Test/golden.ir +++ b/test/ps/output/Golden.LongStateBind.Test/golden.ir @@ -54,12 +54,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$521" ) :| [] ) + ( ParamNamed Nothing ( Name "f$523" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$522" ) :| [] ) + ( ParamNamed Nothing ( Name "m$524" ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$521" ) ) ) - ( Ref Nothing ( Local ( Name "m$522" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$523" ) ) ) + ( Ref Nothing ( Local ( Name "m$524" ) ) :| [] ) ) ) ) @@ -77,8 +77,8 @@ UberModule ( LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$523" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$523" ) ) ) + ( ParamNamed Nothing ( Name "x$525" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$525" ) ) ) ), ( PropName "Apply0", AbsN Nothing ( ParamUnused Nothing :| [] ) @@ -215,7 +215,7 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "dictMonad$524", AppN Nothing + ( Nothing, Name "dictMonad$526", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Control.Monad.State.Trans" ) @@ -227,10 +227,10 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "bind$525", ObjectProp Nothing + ( Nothing, Name "bind$527", ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$524" ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad$526" ) ) ) ( PropName "Bind1" ) ) ( Ref Nothing @@ -241,28 +241,28 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$526" ) :| [] ) + ( ParamNamed Nothing ( Name "f$528" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a$527" ) :| [] ) + ( ParamNamed Nothing ( Name "a$529" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$525" ) ) ) - ( Ref Nothing ( Local ( Name "f$526" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$527" ) ) ) + ( Ref Nothing ( Local ( Name "f$528" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f'$528" ) :| [] ) + ( ParamNamed Nothing ( Name "f'$530" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$525" ) ) ) - ( Ref Nothing ( Local ( Name "a$527" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$527" ) ) ) + ( Ref Nothing ( Local ( Name "a$529" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a'$529" ) :| [] ) + ( ParamNamed Nothing ( Name "a'$531" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictMonad$524" ) ) ) + ( Ref Nothing ( Local ( Name "dictMonad$526" ) ) ) ( PropName "Applicative0" ) ) ( Ref Nothing @@ -275,8 +275,8 @@ UberModule ( PropName "pure" ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f'$528" ) ) ) - ( Ref Nothing ( Local ( Name "a'$529" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "f'$530" ) ) ) + ( Ref Nothing ( Local ( Name "a'$531" ) ) :| [] ) :| [] ) ) :| [] ) @@ -292,11 +292,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$517" ) :| [] ) + ( ParamNamed Nothing ( Name "f$519" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$518" ) :| [] ) + ( ParamNamed Nothing ( Name "v$520" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$519" ) :| [] ) + ( ParamNamed Nothing ( Name "s$521" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -334,26 +334,26 @@ UberModule ( PropName "map" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$520" ) :| [] ) + ( ParamNamed Nothing ( Name "v1$522" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$517" ) ) ) + ( Ref Nothing ( Local ( Name "f$519" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v1$520" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$522" ) ) ) :| [] ) :| [ DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v1$520" ) ) ) + ( Ref Nothing ( Local ( Name "v1$522" ) ) ) ] ) ) :| [] ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "v$518" ) ) ) - ( Ref Nothing ( Local ( Name "s$519" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "v$520" ) ) ) + ( Ref Nothing ( Local ( Name "s$521" ) ) :| [] ) :| [] ) ) ) @@ -431,10 +431,10 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongStateBind.Test", qnameName = Name "get" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$1756" ) :| [] ) + ( ParamNamed Nothing ( Name "x$1758" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) - ( Ref Nothing ( Local ( Name "x$1756" ) ) :| [ Ref Nothing ( Local ( Name "x$1756" ) ) ] ) + ( Ref Nothing ( Local ( Name "x$1758" ) ) :| [ Ref Nothing ( Local ( Name "x$1758" ) ) ] ) ) ), Standalone ( QName @@ -449,10 +449,10 @@ UberModule { qnameModuleName = ModuleName "Golden.LongStateBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont1766$w", AbsN Nothing + ( Nothing, Name "$kont1768$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1767" ) :| - [ ParamNamed Nothing ( Name "x100$1768" ) ] + ( Name "x1$1769" ) :| + [ ParamNamed Nothing ( Name "x100$1770" ) ] ) ( AppN Nothing ( AppN Nothing @@ -989,12 +989,12 @@ UberModule ( PrimBinOp Nothing PrimAdd ( Ref Nothing ( Local - ( Name "x1$1767" ) + ( Name "x1$1769" ) ) ) ( Ref Nothing ( Local - ( Name "x100$1768" ) + ( Name "x100$1770" ) ) ) ) @@ -1049,10 +1049,10 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont1769$w", AbsN Nothing + ( Nothing, Name "$kont1771$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1770" ) :| - [ ParamNamed Nothing ( Name "x100$1771" ) ] + ( Name "x1$1772" ) :| + [ ParamNamed Nothing ( Name "x100$1773" ) ] ) ( AppN Nothing ( AppN Nothing @@ -2103,16 +2103,16 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1766$w" ) + ( Name "$kont1768$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1770" ) + ( Name "x1$1772" ) ) :| [ Ref Nothing ( Local - ( Name "x100$1771" ) + ( Name "x100$1773" ) ) ] ) @@ -2198,10 +2198,10 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1772$w", AbsN Nothing + ( Nothing, Name "$kont1774$w", AbsN Nothing ( ParamNamed Nothing - ( Name "x1$1773" ) :| - [ ParamNamed Nothing ( Name "x100$1774" ) ] + ( Name "x1$1775" ) :| + [ ParamNamed Nothing ( Name "x100$1776" ) ] ) ( AppN Nothing ( AppN Nothing @@ -3252,16 +3252,16 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1769$w" ) + ( Name "$kont1771$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1773" ) + ( Name "x1$1775" ) ) :| [ Ref Nothing ( Local - ( Name "x100$1774" ) + ( Name "x100$1776" ) ) ] ) @@ -3347,8 +3347,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1775", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$1776" ) :| [] ) + ( Nothing, Name "$kont1777", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$1778" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -4398,12 +4398,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1772$w" ) + ( Name "$kont1774$w" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1776" ) + ( Name "x1$1778" ) ) :| [ Ref Nothing ( Local @@ -4493,8 +4493,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1777", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$1778" ) :| [] ) + ( Nothing, Name "$kont1779", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$1780" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -5544,12 +5544,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1775" ) + ( Name "$kont1777" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1778" ) + ( Name "x1$1780" ) ) :| [] ) ) :| [] @@ -5634,8 +5634,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1779", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$1780" ) :| [] ) + ( Nothing, Name "$kont1781", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$1782" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -6685,12 +6685,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1777" ) + ( Name "$kont1779" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1780" ) + ( Name "x1$1782" ) ) :| [] ) ) :| [] @@ -6775,8 +6775,8 @@ UberModule ) ) ), Standalone - ( Nothing, Name "$kont1781", AbsN Nothing - ( ParamNamed Nothing ( Name "x1$1782" ) :| [] ) + ( Nothing, Name "$kont1783", AbsN Nothing + ( ParamNamed Nothing ( Name "x1$1784" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing @@ -7826,12 +7826,12 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1779" ) + ( Name "$kont1781" ) ) ) ( Ref Nothing ( Local - ( Name "x1$1782" ) + ( Name "x1$1784" ) ) :| [] ) ) :| [] @@ -8945,7 +8945,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local - ( Name "$kont1781" ) + ( Name "$kont1783" ) ) ) ( Ref Nothing diff --git a/test/ps/output/Golden.LongStateBind.Test/golden.lua b/test/ps/output/Golden.LongStateBind.Test/golden.lua index 6d4723db..9329b8a4 100644 --- a/test/ps/output/Golden.LongStateBind.Test/golden.lua +++ b/test/ps/output/Golden.LongStateBind.Test/golden.lua @@ -11,8 +11,8 @@ local Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_521) - return function(m_S_522) return f_S_521(m_S_522) end + map = function(f_S_523) + return function(m_S_524) return f_S_523(m_S_524) end end } end @@ -20,7 +20,7 @@ local Data_Identity_applyIdentity = { local Data_Identity_monadIdentity = { Applicative0 = function() return { - pure = function(x_S_523) return x_S_523 end, + pure = function(x_S_525) return x_S_525 end, Apply0 = function() return Data_Identity_applyIdentity end } end, @@ -65,13 +65,13 @@ end Control_Monad_State_Trans_applyStateT = function(dictMonad) return { apply = (function() - local dictMonad_S_524 = Control_Monad_State_Trans_monadStateT(dictMonad) - local bind_S_525 = (dictMonad_S_524.Bind1()).bind - return function(f_S_526) - return function(a_S_527) - return bind_S_525(f_S_526)(function(fPrime_S_528) - return bind_S_525(a_S_527)(function(aPrime_S_529) - return (dictMonad_S_524.Applicative0()).pure(fPrime_S_528(aPrime_S_529)) + local dictMonad_S_526 = Control_Monad_State_Trans_monadStateT(dictMonad) + local bind_S_527 = (dictMonad_S_526.Bind1()).bind + return function(f_S_528) + return function(a_S_529) + return bind_S_527(f_S_528)(function(fPrime_S_530) + return bind_S_527(a_S_529)(function(aPrime_S_531) + return (dictMonad_S_526.Applicative0()).pure(fPrime_S_530(aPrime_S_531)) end) end) end @@ -79,12 +79,12 @@ Control_Monad_State_Trans_applyStateT = function(dictMonad) end)(), Functor0 = function() return { - map = function(f_S_517) - return function(v_S_518) - return function(s_S_519) - return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( v1_S_520 ) - return Data_Tuple_Tuple_S_w(f_S_517(v1_S_520[1]), v1_S_520[2]) - end)(v_S_518(s_S_519)) + map = function(f_S_519) + return function(v_S_520) + return function(s_S_521) + return (((dictMonad.Bind1()).Apply0()).Functor0()).map(function( v1_S_522 ) + return Data_Tuple_Tuple_S_w(f_S_519(v1_S_522[1]), v1_S_522[2]) + end)(v_S_520(s_S_521)) end end end @@ -106,12 +106,12 @@ Control_Monad_State_Trans_applicativeStateT = function(dictMonad) end local Golden_LongStateBind_Test_bindStateT = Control_Monad_State_Trans_bindStateT(Data_Identity_monadIdentity) local Golden_LongStateBind_Test_bind = Golden_LongStateBind_Test_bindStateT.bind -local Golden_LongStateBind_Test_get = function(x_S_1756) - return Data_Tuple_Tuple_S_w(x_S_1756, x_S_1756) +local Golden_LongStateBind_Test_get = function(x_S_1758) + return Data_Tuple_Tuple_S_w(x_S_1758, x_S_1758) end local Golden_LongStateBind_Test_discard = Golden_LongStateBind_Test_bindStateT.bind local Golden_LongStateBind_Test_go = (function() - local _S_kont1766_S_w = function(x1_S_1767, x100_S_1768) + local _S_kont1768_S_w = function(x1_S_1769, x100_S_1770) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x141 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x141 + 1) @@ -153,7 +153,7 @@ local Golden_LongStateBind_Test_go = (function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x150 + 1) end)(function() return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( final ) - return (Control_Monad_State_Trans_applicativeStateT(Data_Identity_monadIdentity)).pure(x1_S_1767 + x100_S_1768 + final) + return (Control_Monad_State_Trans_applicativeStateT(Data_Identity_monadIdentity)).pure(x1_S_1769 + x100_S_1770 + final) end) end) end) @@ -176,7 +176,7 @@ local Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont1769_S_w = function(x1_S_1770, x100_S_1771) + local _S_kont1771_S_w = function(x1_S_1772, x100_S_1773) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x121 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x121 + 1) @@ -257,7 +257,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x140 + 1) end)(function( ) - return _S_kont1766_S_w(x1_S_1770, x100_S_1771) + return _S_kont1768_S_w(x1_S_1772, x100_S_1773) end) end) end) @@ -299,7 +299,7 @@ local Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont1772_S_w = function(x1_S_1773, x100_S_1774) + local _S_kont1774_S_w = function(x1_S_1775, x100_S_1776) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x101 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x101 + 1) @@ -380,7 +380,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x120 + 1) end)(function( ) - return _S_kont1769_S_w(x1_S_1773, x100_S_1774) + return _S_kont1771_S_w(x1_S_1775, x100_S_1776) end) end) end) @@ -422,7 +422,7 @@ local Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont1775 = function(x1_S_1776) + local _S_kont1777 = function(x1_S_1778) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x81 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x81 + 1) @@ -503,7 +503,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x100 + 1) end)(function( ) - return _S_kont1772_S_w(x1_S_1776, x100) + return _S_kont1774_S_w(x1_S_1778, x100) end) end) end) @@ -545,7 +545,7 @@ local Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont1777 = function(x1_S_1778) + local _S_kont1779 = function(x1_S_1780) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x61 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x61 + 1) @@ -626,7 +626,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x80 + 1) end)(function( ) - return _S_kont1775(x1_S_1778) + return _S_kont1777(x1_S_1780) end) end) end) @@ -668,7 +668,7 @@ local Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont1779 = function(x1_S_1780) + local _S_kont1781 = function(x1_S_1782) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x41 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x41 + 1) @@ -749,7 +749,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x60 + 1) end)(function( ) - return _S_kont1777(x1_S_1780) + return _S_kont1779(x1_S_1782) end) end) end) @@ -791,7 +791,7 @@ local Golden_LongStateBind_Test_go = (function() end) end) end - local _S_kont1781 = function(x1_S_1782) + local _S_kont1783 = function(x1_S_1784) return Golden_LongStateBind_Test_bind(Golden_LongStateBind_Test_get)(function( x21 ) return Golden_LongStateBind_Test_discard(function() return Data_Tuple_Tuple_S_w(Data_Unit_unit, x21 + 1) @@ -872,7 +872,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x40 + 1) end)(function( ) - return _S_kont1779(x1_S_1782) + return _S_kont1781(x1_S_1784) end) end) end) @@ -994,7 +994,7 @@ local Golden_LongStateBind_Test_go = (function() return Golden_LongStateBind_Test_discard(function( ) return Data_Tuple_Tuple_S_w(Data_Unit_unit, x20 + 1) end)(function( ) - return _S_kont1781(x1) + return _S_kont1783(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 a3140167..7d8bedc9 100644 --- a/test/ps/output/Golden.LongWriterBind.Test/golden.ir +++ b/test/ps/output/Golden.LongWriterBind.Test/golden.ir @@ -31,12 +31,6 @@ UberModule ( ModuleName "Data.Show" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Data/Show.purs" [ ( Nothing, Name "showIntImpl" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" - }, ForeignImport Nothing - ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" - [ ( Nothing, Name "unsafeCoerce" ) ] - ), Standalone ( QName { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" }, ForeignImport Nothing @@ -81,12 +75,12 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$503" ) :| [] ) + ( ParamNamed Nothing ( Name "f$505" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "m$504" ) :| [] ) + ( ParamNamed Nothing ( Name "m$506" ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$503" ) ) ) - ( Ref Nothing ( Local ( Name "m$504" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$505" ) ) ) + ( Ref Nothing ( Local ( Name "m$506" ) ) :| [] ) ) ) ) @@ -100,8 +94,8 @@ UberModule }, LiteralObject Nothing [ ( PropName "pure", AbsN Nothing - ( ParamNamed Nothing ( Name "x$505" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$505" ) ) ) + ( ParamNamed Nothing ( Name "x$507" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$507" ) ) ) ), ( PropName "Apply0", AbsN Nothing ( ParamUnused Nothing :| [] ) @@ -190,9 +184,9 @@ UberModule ( LiteralObject Nothing [ ( PropName "map", AbsN Nothing - ( ParamNamed Nothing ( Name "f$498" ) :| [] ) + ( ParamNamed Nothing ( Name "f$500" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$501" ) :| [] ) + ( ParamNamed Nothing ( Name "v$503" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -200,24 +194,24 @@ UberModule ( PropName "map" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$499" ) :| [] ) + ( ParamNamed Nothing ( Name "v$501" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$498" ) ) ) + ( Ref Nothing ( Local ( Name "f$500" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v$499" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v$501" ) ) ) :| [] ) :| [ DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v$499" ) ) ) + ( Ref Nothing ( Local ( Name "v$501" ) ) ) ] ) ) :| [] ) ) - ( Ref Nothing ( Local ( Name "v$501" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "v$503" ) ) :| [] ) ) ) ) @@ -232,15 +226,15 @@ UberModule { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "discard" }, Let Nothing ( Standalone - ( Nothing, Name "dictBind$521", LiteralObject Nothing + ( Nothing, Name "dictBind$524", LiteralObject Nothing [ ( PropName "bind", AbsN Nothing - ( ParamNamed Nothing ( Name "v$527" ) :| [] ) + ( ParamNamed Nothing ( Name "v$530" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$528" ) :| [] ) + ( ParamNamed Nothing ( Name "f$531" ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f$528" ) ) ) - ( Ref Nothing ( Local ( Name "v$527" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "f$531" ) ) ) + ( Ref Nothing ( Local ( Name "v$530" ) ) :| [] ) ) ) ), @@ -252,19 +246,19 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$523" ) :| [] ) + ( ParamNamed Nothing ( Name "v$526" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "k$524" ) :| [] ) + ( ParamNamed Nothing ( Name "k$527" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictBind$521" ) ) ) + ( Ref Nothing ( Local ( Name "dictBind$524" ) ) ) ( PropName "bind" ) ) - ( Ref Nothing ( Local ( Name "v$523" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "v$526" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v1$525" ) :| [] ) + ( ParamNamed Nothing ( Name "v1$528" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -272,7 +266,7 @@ UberModule ( ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing - ( Ref Nothing ( Local ( Name "dictBind$521" ) ) ) + ( Ref Nothing ( Local ( Name "dictBind$524" ) ) ) ( PropName "Apply0" ) ) ( Ref Nothing @@ -288,22 +282,22 @@ UberModule ( PropName "map" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v3$526" ) :| [] ) + ( ParamNamed Nothing ( Name "v3$529" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Tuple" ) ( Name "Tuple$w" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v3$526" ) ) ) :| + ( Ref Nothing ( Local ( Name "v3$529" ) ) ) :| [ AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Semigroup" ) ( Name "concatArray" ) ) ) ( DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v1$525" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$528" ) ) ) :| [] ) ) ( DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v3$526" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v3$529" ) ) ) :| [] ) ] ) @@ -311,9 +305,9 @@ UberModule ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "k$524" ) ) ) + ( Ref Nothing ( Local ( Name "k$527" ) ) ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v1$525" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$528" ) ) ) :| [] ) :| [] ) ) :| [] @@ -326,7 +320,7 @@ UberModule { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "go" }, Let Nothing ( Standalone - ( Nothing, Name "$kont756", AppN Nothing + ( Nothing, Name "$kont759", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -1384,7 +1378,7 @@ UberModule ( AppN Nothing ( Let Nothing ( Standalone - ( Nothing, Name "dictMonoid$517", LiteralObject Nothing + ( Nothing, Name "dictMonoid$520", LiteralObject Nothing [ ( PropName "mempty", LiteralArray Nothing [] ), @@ -1402,19 +1396,19 @@ UberModule ) ( AbsN Nothing ( ParamNamed Nothing - ( Name "dictApplicative$518" ) :| [] + ( Name "dictApplicative$521" ) :| [] ) ( LiteralObject Nothing [ ( PropName "pure", AbsN Nothing ( ParamNamed Nothing - ( Name "a$519" ) :| [] + ( Name "a$522" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( Ref Nothing ( Local - ( Name "dictApplicative$518" ) + ( Name "dictApplicative$521" ) ) ) ( PropName "pure" ) @@ -1428,12 +1422,12 @@ UberModule ) ( Ref Nothing ( Local - ( Name "a$519" ) + ( Name "a$522" ) ) :| [ ObjectProp Nothing ( Ref Nothing ( Local - ( Name "dictMonoid$517" ) + ( Name "dictMonoid$520" ) ) ) ( PropName "mempty" ) @@ -1455,7 +1449,7 @@ UberModule ( ObjectProp Nothing ( Ref Nothing ( Local - ( Name "dictMonoid$517" ) + ( Name "dictMonoid$520" ) ) ) ( PropName "Semigroup0" ) @@ -1470,7 +1464,7 @@ UberModule ( ObjectProp Nothing ( Ref Nothing ( Local - ( Name "dictApplicative$518" ) + ( Name "dictApplicative$521" ) ) ) ( PropName "Apply0" ) @@ -1581,7 +1575,7 @@ UberModule ) ) :| [ Standalone - ( Nothing, Name "$kont757", AppN Nothing + ( Nothing, Name "$kont760", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -2641,7 +2635,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont756" ) + ( Name "$kont759" ) ) ) :| [] ) @@ -2724,7 +2718,7 @@ UberModule ) :| [] ) ), Standalone - ( Nothing, Name "$kont758", AppN Nothing + ( Nothing, Name "$kont761", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -3784,7 +3778,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont757" ) + ( Name "$kont760" ) ) ) :| [] ) @@ -3867,7 +3861,7 @@ UberModule ) :| [] ) ), Standalone - ( Nothing, Name "$kont759", AppN Nothing + ( Nothing, Name "$kont762", AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "discard" ) ) @@ -4927,7 +4921,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont758" ) + ( Name "$kont761" ) ) ) :| [] ) @@ -6059,7 +6053,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Ref Nothing ( Local - ( Name "$kont759" ) + ( Name "$kont762" ) ) ) :| [] ) @@ -6146,15 +6140,7 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.LongWriterBind.Test", qnameName = Name "compute" }, DataArgumentByIndex Nothing ProductType 0 - ( AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) - ( PropName "unsafeCoerce" ) - ) - ( Ref Nothing - ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "go" ) ) :| [] - ) - ) + ( Ref Nothing ( Imported ( ModuleName "Golden.LongWriterBind.Test" ) ( Name "go" ) ) ) ) ], uberModuleForeigns = [], uberModuleExports = [ diff --git a/test/ps/output/Golden.LongWriterBind.Test/golden.lua b/test/ps/output/Golden.LongWriterBind.Test/golden.lua index 446c6027..1485bcb2 100644 --- a/test/ps/output/Golden.LongWriterBind.Test/golden.lua +++ b/test/ps/output/Golden.LongWriterBind.Test/golden.lua @@ -16,7 +16,6 @@ local Data_Semigroup_foreign = { } local Data_Semigroup_concatArray = Data_Semigroup_foreign.concatArray local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } -local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end } @@ -28,14 +27,14 @@ local Data_Identity_applyIdentity = { apply = function(v) return function(v1) return v(v1) end end, Functor0 = function() return { - map = function(f_S_503) - return function(m_S_504) return f_S_503(m_S_504) end + map = function(f_S_505) + return function(m_S_506) return f_S_505(m_S_506) end end } end } local Data_Identity_applicativeIdentity = { - pure = function(x_S_505) return x_S_505 end, + pure = function(x_S_507) return x_S_507 end, Apply0 = function() return Data_Identity_applyIdentity end } M.Control_Monad_Writer_Trans_applyWriterT_S_w = function( dictSemigroup @@ -53,11 +52,11 @@ M.Control_Monad_Writer_Trans_applyWriterT_S_w = function( dictSemigroup end, Functor0 = function() return { - map = function(f_S_498) - return function(v_S_501) - return Functor0.map(function(v_S_499) - return Data_Tuple_Tuple_S_w(f_S_498(v_S_499[1]), v_S_499[2]) - end)(v_S_501) + map = function(f_S_500) + return function(v_S_503) + return Functor0.map(function(v_S_501) + return Data_Tuple_Tuple_S_w(f_S_500(v_S_501[1]), v_S_501[2]) + end)(v_S_503) end end } @@ -65,24 +64,24 @@ M.Control_Monad_Writer_Trans_applyWriterT_S_w = function( dictSemigroup } end local Golden_LongWriterBind_Test_discard = (function() - local dictBind_S_521 = { - bind = function(v_S_527) - return function(f_S_528) return f_S_528(v_S_527) end + local dictBind_S_524 = { + bind = function(v_S_530) + return function(f_S_531) return f_S_531(v_S_530) end end, Apply0 = function() return Data_Identity_applyIdentity end } - return function(v_S_523) - return function(k_S_524) - return dictBind_S_521.bind(v_S_523)(function(v1_S_525) - return ((dictBind_S_521.Apply0()).Functor0()).map(function(v3_S_526) - return Data_Tuple_Tuple_S_w(v3_S_526[1], Data_Semigroup_concatArray(v1_S_525[2])(v3_S_526[2])) - end)(k_S_524(v1_S_525[1])) + return function(v_S_526) + return function(k_S_527) + return dictBind_S_524.bind(v_S_526)(function(v1_S_528) + return ((dictBind_S_524.Apply0()).Functor0()).map(function(v3_S_529) + return Data_Tuple_Tuple_S_w(v3_S_529[1], Data_Semigroup_concatArray(v1_S_528[2])(v3_S_529[2])) + end)(k_S_527(v1_S_528[1])) end) end end end)() local Golden_LongWriterBind_Test_go = (function() - local _S_kont756 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { + local _S_kont759 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 161 }))(function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { @@ -202,15 +201,15 @@ local Golden_LongWriterBind_Test_go = (function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 200 }))(function( ) - local dictMonoid_S_517 = { + local dictMonoid_S_520 = { mempty = {}, Semigroup0 = function( ) return Data_Semigroup_semigroupArray end } - local dictApplicative_S_518 = Data_Identity_applicativeIdentity - local a_S_519 = 42 - return dictApplicative_S_518.pure(Data_Tuple_Tuple_S_w(a_S_519, dictMonoid_S_517.mempty)) + local dictApplicative_S_521 = Data_Identity_applicativeIdentity + local a_S_522 = 42 + return dictApplicative_S_521.pure(Data_Tuple_Tuple_S_w(a_S_522, dictMonoid_S_520.mempty)) end) end) end) @@ -251,7 +250,7 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont757 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { + local _S_kont760 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 121 }))(function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { @@ -371,7 +370,7 @@ local Golden_LongWriterBind_Test_go = (function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 160 }))(function( ) - return _S_kont756 + return _S_kont759 end) end) end) @@ -412,7 +411,7 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont758 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { + local _S_kont761 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 81 }))(function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { @@ -532,7 +531,7 @@ local Golden_LongWriterBind_Test_go = (function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 120 }))(function( ) - return _S_kont757 + return _S_kont760 end) end) end) @@ -573,7 +572,7 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end) - local _S_kont759 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { + local _S_kont762 = Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 41 }))(function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { @@ -693,7 +692,7 @@ local Golden_LongWriterBind_Test_go = (function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 80 }))(function( ) - return _S_kont758 + return _S_kont761 end) end) end) @@ -854,7 +853,7 @@ local Golden_LongWriterBind_Test_go = (function() return Golden_LongWriterBind_Test_discard(Data_Tuple_Tuple_S_w(Data_Unit_unit, { [1] = 40 }))(function( ) - return _S_kont759 + return _S_kont762 end) end) end) @@ -896,5 +895,5 @@ local Golden_LongWriterBind_Test_go = (function() end) end) end)() -local Golden_LongWriterBind_Test_compute = (Unsafe_Coerce_foreign.unsafeCoerce(Golden_LongWriterBind_Test_go))[1] +local Golden_LongWriterBind_Test_compute = Golden_LongWriterBind_Test_go[1] return Effect_Console_foreign.log(Data_Show_foreign.showIntImpl(Golden_LongWriterBind_Test_compute))() diff --git a/test/ps/output/Golden.MaybeChain.Test/golden.ir b/test/ps/output/Golden.MaybeChain.Test/golden.ir index af4ff49a..34a7ba40 100644 --- a/test/ps/output/Golden.MaybeChain.Test/golden.ir +++ b/test/ps/output/Golden.MaybeChain.Test/golden.ir @@ -63,26 +63,26 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.MaybeChain.Test", qnameName = Name "identity" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$311" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$311" ) ) ) + ( ParamNamed Nothing ( Name "x$312" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$312" ) ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.MaybeChain.Test", qnameName = Name "map$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "v$307" ) :| [ ParamNamed Nothing ( Name "v1$308" ) ] ) + ( ParamNamed Nothing ( Name "v$308" ) :| [ ParamNamed Nothing ( Name "v1$309" ) ] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$308" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$309" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) ( TyName "Maybe" ) ( CtorName "Just" ) [ AppN Nothing - ( Ref Nothing ( Local ( Name "v$307" ) ) ) + ( Ref Nothing ( Local ( Name "v$308" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$308" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$309" ) ) ) :| [] ) ] ) @@ -95,7 +95,7 @@ UberModule ( ParamUnused Nothing :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse320", AbsN Nothing + ( Nothing, Name "$cse321", AbsN Nothing ( ParamNamed Nothing ( Name "x$0" ) :| [] ) ( Ref Nothing ( Local ( Name "x$0" ) ) ) ) :| [] @@ -132,7 +132,7 @@ UberModule ) ) ( Ref Nothing - ( Local ( Name "$cse320" ) ) :| + ( Local ( Name "$cse321" ) ) :| [ Ref Nothing ( Imported ( ModuleName "Data.Maybe" ) ( Name "Nothing" ) ) ] @@ -169,7 +169,7 @@ UberModule ( Imported ( ModuleName "Golden.MaybeChain.Test" ) ( Name "map$w" ) ) ) ( Ref Nothing - ( Local ( Name "$cse320" ) ) :| + ( Local ( Name "$cse321" ) ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) ( TyName "Maybe" ) diff --git a/test/ps/output/Golden.MaybeChain.Test/golden.lua b/test/ps/output/Golden.MaybeChain.Test/golden.lua index 02dcc49a..ccd8d22a 100644 --- a/test/ps/output/Golden.MaybeChain.Test/golden.lua +++ b/test/ps/output/Golden.MaybeChain.Test/golden.lua @@ -11,18 +11,18 @@ end local Data_Maybe_maybe_S_w = function(v, v1, v2) if "Data.Maybe∷Maybe.Nothing" == v2[1] then return v else return v1(v2[2]) end end -local Golden_MaybeChain_Test_identity = function(x_S_311) return x_S_311 end -local Golden_MaybeChain_Test_map_S_w = function(v_S_307, v1_S_308) - if "Data.Maybe∷Maybe.Just" == v1_S_308[1] then - return { "Data.Maybe∷Maybe.Just", (v_S_307(v1_S_308[2])) } +local Golden_MaybeChain_Test_identity = function(x_S_312) return x_S_312 end +local Golden_MaybeChain_Test_map_S_w = function(v_S_308, v1_S_309) + if "Data.Maybe∷Maybe.Just" == v1_S_309[1] then + return { "Data.Maybe∷Maybe.Just", (v_S_308(v1_S_309[2])) } else return Data_Maybe_Nothing end end return (function() - local _S_cse320 = function(x_S_0) return x_S_0 end - local _ = Effect_Console_log(Data_Show_showIntImpl(Data_Maybe_maybe_S_w(0, Golden_MaybeChain_Test_identity, Data_Maybe_maybe_S_w(Data_Maybe_Nothing, Data_Maybe_Just, Golden_MaybeChain_Test_map_S_w(_S_cse320, Data_Maybe_Nothing)))))() - return Effect_Console_log(Data_Show_showIntImpl(Data_Maybe_maybe_S_w(0, Golden_MaybeChain_Test_identity, Data_Maybe_maybe_S_w(Data_Maybe_Nothing, Data_Maybe_Just, Golden_MaybeChain_Test_map_S_w(_S_cse320, { + local _S_cse321 = function(x_S_0) return x_S_0 end + local _ = Effect_Console_log(Data_Show_showIntImpl(Data_Maybe_maybe_S_w(0, Golden_MaybeChain_Test_identity, Data_Maybe_maybe_S_w(Data_Maybe_Nothing, Data_Maybe_Just, Golden_MaybeChain_Test_map_S_w(_S_cse321, Data_Maybe_Nothing)))))() + return Effect_Console_log(Data_Show_showIntImpl(Data_Maybe_maybe_S_w(0, Golden_MaybeChain_Test_identity, Data_Maybe_maybe_S_w(Data_Maybe_Nothing, Data_Maybe_Just, Golden_MaybeChain_Test_map_S_w(_S_cse321, { "Data.Maybe∷Maybe.Just", 42 })))))() diff --git a/test/ps/output/Golden.MaybeChainModule.Test/golden.ir b/test/ps/output/Golden.MaybeChainModule.Test/golden.ir index 5636e728..f7f8856e 100644 --- a/test/ps/output/Golden.MaybeChainModule.Test/golden.ir +++ b/test/ps/output/Golden.MaybeChainModule.Test/golden.ir @@ -39,26 +39,26 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.MaybeChainModule.Test", qnameName = Name "identity" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$289" ) :| [] ) - ( Ref Nothing ( Local ( Name "x$289" ) ) ) + ( ParamNamed Nothing ( Name "x$290" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$290" ) ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.MaybeChainModule.Test", qnameName = Name "map$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "v$286" ) :| [ ParamNamed Nothing ( Name "v1$287" ) ] ) + ( ParamNamed Nothing ( Name "v$287" ) :| [ ParamNamed Nothing ( Name "v1$288" ) ] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$287" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$288" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) ( TyName "Maybe" ) ( CtorName "Just" ) [ AppN Nothing - ( Ref Nothing ( Local ( Name "v$286" ) ) ) + ( Ref Nothing ( Local ( Name "v$287" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$287" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$288" ) ) ) :| [] ) ] ) diff --git a/test/ps/output/Golden.MaybeChainModule.Test/golden.lua b/test/ps/output/Golden.MaybeChainModule.Test/golden.lua index 727c36d3..198dd85b 100644 --- a/test/ps/output/Golden.MaybeChainModule.Test/golden.lua +++ b/test/ps/output/Golden.MaybeChainModule.Test/golden.lua @@ -5,12 +5,12 @@ end local Data_Maybe_maybe_S_w = function(v, v1, v2) if "Data.Maybe∷Maybe.Nothing" == v2[1] then return v else return v1(v2[2]) end end -local Golden_MaybeChainModule_Test_identity = function(x_S_289) - return x_S_289 +local Golden_MaybeChainModule_Test_identity = function(x_S_290) + return x_S_290 end -local Golden_MaybeChainModule_Test_map_S_w = function(v_S_286, v1_S_287) - if "Data.Maybe∷Maybe.Just" == v1_S_287[1] then - return { "Data.Maybe∷Maybe.Just", (v_S_286(v1_S_287[2])) } +local Golden_MaybeChainModule_Test_map_S_w = function(v_S_287, v1_S_288) + if "Data.Maybe∷Maybe.Just" == v1_S_288[1] then + return { "Data.Maybe∷Maybe.Just", (v_S_287(v1_S_288[2])) } else return Data_Maybe_Nothing end diff --git a/test/ps/output/Golden.NativeLoopsGuard.Test/golden.ir b/test/ps/output/Golden.NativeLoopsGuard.Test/golden.ir index bb93b11a..6d28f84b 100644 --- a/test/ps/output/Golden.NativeLoopsGuard.Test/golden.ir +++ b/test/ps/output/Golden.NativeLoopsGuard.Test/golden.ir @@ -171,7 +171,7 @@ UberModule [ ( PropName "apply", Let Nothing ( Standalone - ( Nothing, Name "bind$1430", ObjectProp Nothing + ( Nothing, Name "bind$1433", ObjectProp Nothing ( AppN Nothing ( ObjectProp Nothing ( Ref Nothing @@ -187,23 +187,23 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f$1431" ) :| [] ) + ( ParamNamed Nothing ( Name "f$1434" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a$1432" ) :| [] ) + ( ParamNamed Nothing ( Name "a$1435" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$1430" ) ) ) - ( Ref Nothing ( Local ( Name "f$1431" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$1433" ) ) ) + ( Ref Nothing ( Local ( Name "f$1434" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "f'$1433" ) :| [] ) + ( ParamNamed Nothing ( Name "f'$1436" ) :| [] ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing ( Local ( Name "bind$1430" ) ) ) - ( Ref Nothing ( Local ( Name "a$1432" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "bind$1433" ) ) ) + ( Ref Nothing ( Local ( Name "a$1435" ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "a'$1434" ) :| [] ) + ( ParamNamed Nothing ( Name "a'$1437" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( AppN Nothing @@ -226,8 +226,8 @@ UberModule ( PropName "pure" ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "f'$1433" ) ) ) - ( Ref Nothing ( Local ( Name "a'$1434" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "f'$1436" ) ) ) + ( Ref Nothing ( Local ( Name "a'$1437" ) ) :| [] ) :| [] ) ) :| [] ) @@ -261,10 +261,10 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.NativeLoopsGuard.Test", qnameName = Name "when$w" }, AbsN Nothing - ( ParamNamed Nothing ( Name "v$1437" ) :| [ ParamNamed Nothing ( Name "v1$1438" ) ] ) + ( ParamNamed Nothing ( Name "v$1440" ) :| [ ParamNamed Nothing ( Name "v1$1441" ) ] ) ( IfThenElse Nothing - ( Ref Nothing ( Local ( Name "v$1437" ) ) ) - ( Ref Nothing ( Local ( Name "v1$1438" ) ) ) + ( Ref Nothing ( Local ( Name "v$1440" ) ) ) + ( Ref Nothing ( Local ( Name "v1$1441" ) ) ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect" ) ( Name "pureE" ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Unit" ) ( Name "unit" ) ) :| [] ) @@ -314,18 +314,18 @@ UberModule ( ParamNamed Nothing ( Name "xs" ) :| [ ParamNamed Nothing ( Name "f" ) ] ) ( Let Nothing ( Standalone - ( Nothing, Name "v2$1427", AppN Nothing + ( Nothing, Name "v2$1430", AppN Nothing ( ObjectProp Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Array" ) ( Name "foreign" ) ) ) ( PropName "indexImpl" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "value0$1428" ) :| [] ) + ( ParamNamed Nothing ( Name "value0$1431" ) :| [] ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) ( TyName "Maybe" ) ( CtorName "Just" ) - [ Ref Nothing ( Local ( Name "value0$1428" ) ) ] + [ Ref Nothing ( Local ( Name "value0$1431" ) ) ] ) :| [ Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -339,7 +339,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$1427" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$1430" ) ) ) ) ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect" ) ( Name "pureE" ) ) ) @@ -348,7 +348,7 @@ UberModule ( AppN Nothing ( Ref Nothing ( Local ( Name "f" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v2$1427" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v2$1430" ) ) ) :| [] ) ) ) @@ -378,20 +378,20 @@ UberModule ], uberModuleForeigns = [], uberModuleExports = [ ( Name "forE", AbsN Nothing - ( ParamNamed Nothing ( Name "forE$p1$1459" ) :| [] ) + ( ParamNamed Nothing ( Name "forE$p1$1462" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "forE$p2$1460" ) :| [] ) + ( ParamNamed Nothing ( Name "forE$p2$1463" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "forE$p3$1461" ) :| [] ) + ( ParamNamed Nothing ( Name "forE$p3$1464" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.NativeLoopsGuard.Test" ) ( Name "forE$w" ) ) ) ( Ref Nothing - ( Local ( Name "forE$p1$1459" ) ) :| + ( Local ( Name "forE$p1$1462" ) ) :| [ Ref Nothing - ( Local ( Name "forE$p2$1460" ) ), Ref Nothing - ( Local ( Name "forE$p3$1461" ) ) + ( Local ( Name "forE$p2$1463" ) ), Ref Nothing + ( Local ( Name "forE$p3$1464" ) ) ] ) ) @@ -399,31 +399,31 @@ UberModule ) ), ( Name "foreachE", AbsN Nothing - ( ParamNamed Nothing ( Name "foreachE$p1$1462" ) :| [] ) + ( ParamNamed Nothing ( Name "foreachE$p1$1465" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "foreachE$p2$1463" ) :| [] ) + ( ParamNamed Nothing ( Name "foreachE$p2$1466" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.NativeLoopsGuard.Test" ) ( Name "foreachE$w" ) ) ) ( Ref Nothing - ( Local ( Name "foreachE$p1$1462" ) ) :| - [ Ref Nothing ( Local ( Name "foreachE$p2$1463" ) ) ] + ( Local ( Name "foreachE$p1$1465" ) ) :| + [ Ref Nothing ( Local ( Name "foreachE$p2$1466" ) ) ] ) ) ) ), ( Name "whileE", AbsN Nothing - ( ParamNamed Nothing ( Name "whileE$p1$1464" ) :| [] ) + ( ParamNamed Nothing ( Name "whileE$p1$1467" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "whileE$p2$1465" ) :| [] ) + ( ParamNamed Nothing ( Name "whileE$p2$1468" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.NativeLoopsGuard.Test" ) ( Name "whileE$w" ) ) ) ( Ref Nothing - ( Local ( Name "whileE$p1$1464" ) ) :| - [ Ref Nothing ( Local ( Name "whileE$p2$1465" ) ) ] + ( Local ( Name "whileE$p1$1467" ) ) :| + [ Ref Nothing ( Local ( Name "whileE$p2$1468" ) ) ] ) ) ) diff --git a/test/ps/output/Golden.NativeLoopsGuard.Test/golden.lua b/test/ps/output/Golden.NativeLoopsGuard.Test/golden.lua index ed64867f..9e7d27a0 100644 --- a/test/ps/output/Golden.NativeLoopsGuard.Test/golden.lua +++ b/test/ps/output/Golden.NativeLoopsGuard.Test/golden.lua @@ -77,12 +77,12 @@ end) Effect_Lazy_applyEffect = PSLUA_runtime_lazy("applyEffect")(function() return { apply = (function() - local bind_S_1430 = (Effect_monadEffect.Bind1()).bind - return function(f_S_1431) - return function(a_S_1432) - return bind_S_1430(f_S_1431)(function(fPrime_S_1433) - return bind_S_1430(a_S_1432)(function(aPrime_S_1434) - return (Effect_monadEffect.Applicative0()).pure(fPrime_S_1433(aPrime_S_1434)) + local bind_S_1433 = (Effect_monadEffect.Bind1()).bind + return function(f_S_1434) + return function(a_S_1435) + return bind_S_1433(f_S_1434)(function(fPrime_S_1436) + return bind_S_1433(a_S_1435)(function(aPrime_S_1437) + return (Effect_monadEffect.Applicative0()).pure(fPrime_S_1436(aPrime_S_1437)) end) end) end @@ -92,8 +92,8 @@ Effect_Lazy_applyEffect = PSLUA_runtime_lazy("applyEffect")(function() } end) local Effect_functorEffect = Effect_Lazy_functorEffect(0) -local Golden_NativeLoopsGuard_Test_when_S_w = function(v_S_1437, v1_S_1438) - if v_S_1437 then return v1_S_1438 else return Effect_pureE(Data_Unit_unit) end +local Golden_NativeLoopsGuard_Test_when_S_w = function(v_S_1440, v1_S_1441) + if v_S_1440 then return v1_S_1441 else return Effect_pureE(Data_Unit_unit) end end local Golden_NativeLoopsGuard_Test_logShow = function(a_S_6) return Effect_Console_log(Data_Show_showIntImpl(a_S_6)) @@ -105,13 +105,13 @@ local Golden_NativeLoopsGuard_Test_whileE_S_w = function(cond, act) end end local Golden_NativeLoopsGuard_Test_foreachE_S_w = function(xs, f) - local v2_S_1427 = Data_Array_foreign.indexImpl(function(value0_S_1428) - return { "Data.Maybe∷Maybe.Just", value0_S_1428 } + local v2_S_1430 = Data_Array_foreign.indexImpl(function(value0_S_1431) + return { "Data.Maybe∷Maybe.Just", value0_S_1431 } end, { "Data.Maybe∷Maybe.Nothing" }, xs, 0) - if "Data.Maybe∷Maybe.Nothing" == v2_S_1427[1] then + if "Data.Maybe∷Maybe.Nothing" == v2_S_1430[1] then return Effect_pureE(Data_Unit_unit) else - return f(v2_S_1427[2]) + return f(v2_S_1430[2]) end end local Golden_NativeLoopsGuard_Test_forE_S_w = function(lo, hi, f) diff --git a/test/ps/output/Golden.NativeLoopsST.Test/golden.ir b/test/ps/output/Golden.NativeLoopsST.Test/golden.ir index 7ad9c887..23f3a9c9 100644 --- a/test/ps/output/Golden.NativeLoopsST.Test/golden.ir +++ b/test/ps/output/Golden.NativeLoopsST.Test/golden.ir @@ -140,18 +140,18 @@ UberModule ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$490" ) :| [] ) + ( ParamNamed Nothing ( Name "s$491" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "s'$491", PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "s$490" ) ) ) + ( Nothing, Name "s'$492", PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "s$491" ) ) ) ( Ref Nothing ( Local ( Name "i" ) ) ) ) :| [] ) ( LiteralObject Nothing [ - ( PropName "state", Ref Nothing ( Local ( Name "s'$491" ) ) ), - ( PropName "value", Ref Nothing ( Local ( Name "s'$491" ) ) ) + ( PropName "state", Ref Nothing ( Local ( Name "s'$492" ) ) ), + ( PropName "value", Ref Nothing ( Local ( Name "s'$492" ) ) ) ] ) ) :| [] @@ -238,20 +238,20 @@ UberModule ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$483" ) :| [] ) + ( ParamNamed Nothing ( Name "s$484" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "s'$484", PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "s$483" ) ) ) + ( Nothing, Name "s'$485", PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "s$484" ) ) ) ( Ref Nothing ( Local ( Name "x" ) ) ) ) :| [] ) ( LiteralObject Nothing [ ( PropName "state", Ref Nothing - ( Local ( Name "s'$484" ) ) + ( Local ( Name "s'$485" ) ) ), - ( PropName "value", Ref Nothing ( Local ( Name "s'$484" ) ) ) + ( PropName "value", Ref Nothing ( Local ( Name "s'$485" ) ) ) ] ) ) :| [] @@ -371,21 +371,21 @@ UberModule ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$472" ) :| [] ) + ( ParamNamed Nothing ( Name "s$473" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "s'$473", PrimBinOp Nothing PrimSub - ( Ref Nothing ( Local ( Name "s$472" ) ) ) + ( Nothing, Name "s'$474", PrimBinOp Nothing PrimSub + ( Ref Nothing ( Local ( Name "s$473" ) ) ) ( LiteralInt Nothing 1 ) ) :| [] ) ( LiteralObject Nothing [ ( PropName "state", Ref Nothing - ( Local ( Name "s'$473" ) ) + ( Local ( Name "s'$474" ) ) ), ( PropName "value", Ref Nothing - ( Local ( Name "s'$473" ) ) + ( Local ( Name "s'$474" ) ) ) ] ) @@ -409,21 +409,21 @@ UberModule ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "s$477" ) :| [] ) + ( ParamNamed Nothing ( Name "s$478" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "s'$478", PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "s$477" ) ) ) + ( Nothing, Name "s'$479", PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "s$478" ) ) ) ( LiteralInt Nothing 1 ) ) :| [] ) ( LiteralObject Nothing [ ( PropName "state", Ref Nothing - ( Local ( Name "s'$478" ) ) + ( Local ( Name "s'$479" ) ) ), ( PropName "value", Ref Nothing - ( Local ( Name "s'$478" ) ) + ( Local ( Name "s'$479" ) ) ) ] ) diff --git a/test/ps/output/Golden.NativeLoopsST.Test/golden.lua b/test/ps/output/Golden.NativeLoopsST.Test/golden.lua index 63837fb3..ade12a6b 100644 --- a/test/ps/output/Golden.NativeLoopsST.Test/golden.lua +++ b/test/ps/output/Golden.NativeLoopsST.Test/golden.lua @@ -51,9 +51,9 @@ local Golden_NativeLoopsST_Test_sumTo = function(n) return Control_Monad_ST_Internal_run(function() local acc = Control_Monad_ST_Internal_new(0)() for i = 0, n + 1 - 1 do - Control_Monad_ST_Internal_modifyImpl(function(s_S_490) - local sPrime_S_491 = s_S_490 + i - return { state = sPrime_S_491, value = sPrime_S_491 } + Control_Monad_ST_Internal_modifyImpl(function(s_S_491) + local sPrime_S_492 = s_S_491 + i + return { state = sPrime_S_492, value = sPrime_S_492 } end)(acc)() end return Control_Monad_ST_Internal_read(acc)() @@ -66,9 +66,9 @@ local Golden_NativeLoopsST_Test_sumArray = function(xs) local x = xs[_S_i0] Control_Monad_ST_Internal_map_(function() return Data_Unit_unit - end)(Control_Monad_ST_Internal_modifyImpl(function(s_S_483) - local sPrime_S_484 = s_S_483 + x - return { state = sPrime_S_484, value = sPrime_S_484 } + end)(Control_Monad_ST_Internal_modifyImpl(function(s_S_484) + local sPrime_S_485 = s_S_484 + x + return { state = sPrime_S_485, value = sPrime_S_485 } end)(acc))() end return Control_Monad_ST_Internal_read(acc)() @@ -83,13 +83,13 @@ local Golden_NativeLoopsST_Test_countDown = function(start) return not(v < 0) and v ~= 0 end)(Control_Monad_ST_Internal_read(value)) while _S_cond1() do - local _ = Control_Monad_ST_Internal_modifyImpl(function(s_S_472) - local sPrime_S_473 = s_S_472 - 1 - return { state = sPrime_S_473, value = sPrime_S_473 } + local _ = Control_Monad_ST_Internal_modifyImpl(function(s_S_473) + local sPrime_S_474 = s_S_473 - 1 + return { state = sPrime_S_474, value = sPrime_S_474 } end)(value)() - Control_Monad_ST_Internal_modifyImpl(function(s_S_477) - local sPrime_S_478 = s_S_477 + 1 - return { state = sPrime_S_478, value = sPrime_S_478 } + Control_Monad_ST_Internal_modifyImpl(function(s_S_478) + local sPrime_S_479 = s_S_478 + 1 + return { state = sPrime_S_479, value = sPrime_S_479 } end)(steps)() end end diff --git a/test/ps/output/Golden.ProfunctorDictLens.Test/golden.ir b/test/ps/output/Golden.ProfunctorDictLens.Test/golden.ir index 16fb7851..c649ac73 100644 --- a/test/ps/output/Golden.ProfunctorDictLens.Test/golden.ir +++ b/test/ps/output/Golden.ProfunctorDictLens.Test/golden.ir @@ -13,18 +13,6 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showIntImpl" ) ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" - }, ForeignImport Nothing - ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" - [ ( Nothing, Name "unsafeCoerce" ) ] - ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "unsafeCoerce" - }, ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) - ( PropName "unsafeCoerce" ) - ), Standalone ( QName { qnameModuleName = ModuleName "Effect.Console", qnameName = Name "foreign" }, ForeignImport Nothing @@ -37,10 +25,15 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "foreign" ) ) ) ( PropName "log" ) ), Standalone + ( QName + { qnameModuleName = ModuleName "Data.Newtype", qnameName = Name "coerce" }, AbsN Nothing + ( ParamNamed Nothing ( Name "x$262" ) :| [] ) + ( Ref Nothing ( Local ( Name "x$262" ) ) ) + ), Standalone ( QName { qnameModuleName = ModuleName "Golden.ProfunctorDictLens.Test", qnameName = Name "unwrap" }, Ref Nothing - ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "unsafeCoerce" ) ) + ( Imported ( ModuleName "Data.Newtype" ) ( Name "coerce" ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.ProfunctorDictLens.Test", qnameName = Name "Wrapped" @@ -146,20 +139,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.ProfunctorDictLens.Test" ) ( Name "unwrap" ) ) ) - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "unsafeCoerce" ) ) - ) - ( PrimBinOp Nothing PrimSub - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "unsafeCoerce" ) ) - ) - ( LiteralInt Nothing 10 :| [] ) - ) - ( LiteralInt Nothing 5 ) :| [] - ) :| [] - ) :| [] + ( LiteralInt Nothing 5 :| [] ) :| [] ) :| [] ) ) diff --git a/test/ps/output/Golden.ProfunctorDictLens.Test/golden.lua b/test/ps/output/Golden.ProfunctorDictLens.Test/golden.lua index df58ea21..7fe5a268 100644 --- a/test/ps/output/Golden.ProfunctorDictLens.Test/golden.lua +++ b/test/ps/output/Golden.ProfunctorDictLens.Test/golden.lua @@ -1,13 +1,12 @@ local M = {} local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } local Data_Show_showIntImpl = Data_Show_foreign.showIntImpl -local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } -local Unsafe_Coerce_unsafeCoerce = Unsafe_Coerce_foreign.unsafeCoerce local Effect_Console_foreign = { log = function(s) return function() print(s) end end } local Effect_Console_log = Effect_Console_foreign.log -local Golden_ProfunctorDictLens_Test_unwrap = Unsafe_Coerce_unsafeCoerce +local Data_Newtype_coerce = function(x_S_262) return x_S_262 end +local Golden_ProfunctorDictLens_Test_unwrap = Data_Newtype_coerce local Golden_ProfunctorDictLens_Test_Wrapped = function(x) return x end M.Golden_ProfunctorDictLens_Test__Wrapped = function(dictProfunctor) return dictProfunctor.dimap(Golden_ProfunctorDictLens_Test_unwrap)(Golden_ProfunctorDictLens_Test_Wrapped) @@ -15,5 +14,5 @@ end return (function() local _ = Effect_Console_log(Data_Show_showIntImpl(Golden_ProfunctorDictLens_Test_unwrap(Golden_ProfunctorDictLens_Test_unwrap(10) + 1)))() local _ = Effect_Console_log(Data_Show_showIntImpl(Golden_ProfunctorDictLens_Test_unwrap(Golden_ProfunctorDictLens_Test_unwrap(10) * 2)))() - return Effect_Console_log(Data_Show_showIntImpl(Golden_ProfunctorDictLens_Test_unwrap(Unsafe_Coerce_unsafeCoerce(Unsafe_Coerce_unsafeCoerce(10) - 5))))() + return Effect_Console_log(Data_Show_showIntImpl(Golden_ProfunctorDictLens_Test_unwrap(5)))() end)() diff --git a/test/ps/output/Golden.RecordSurgery.Test/golden.ir b/test/ps/output/Golden.RecordSurgery.Test/golden.ir index 1beff834..ba9f7688 100644 --- a/test/ps/output/Golden.RecordSurgery.Test/golden.ir +++ b/test/ps/output/Golden.RecordSurgery.Test/golden.ir @@ -7,35 +7,10 @@ UberModule ( ModuleName "Record.Unsafe" ) ".spago/p/prelude/5718c84fdde6247749cb053e816df696c30fe691/src/Record/Unsafe.purs" [ ( Nothing, Name "unsafeHas" ), - ( Nothing, Name "unsafeGet" ), ( Nothing, Name "unsafeSet" ), ( Nothing, Name "unsafeDelete" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeDelete" - }, ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) - ( PropName "unsafeDelete" ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeGet" - }, ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) - ( PropName "unsafeGet" ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeHas" - }, ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) - ( PropName "unsafeHas" ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Record.Unsafe", qnameName = Name "unsafeSet" - }, ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) ) - ( PropName "unsafeSet" ) - ), Standalone ( QName { qnameModuleName = ModuleName "Data.Show", qnameName = Name "foreign" }, ForeignImport Nothing @@ -60,16 +35,10 @@ UberModule ( ModuleName "Effect.Ref" ) ".spago/p/refs/ee6e959ec21b752622e105a14816e7983b21b9a5/src/Effect/Ref.purs" [ ( Nothing, Name "_new" ), ( Nothing, Name "read" ) ] ), Standalone - ( QName - { qnameModuleName = ModuleName "Unsafe.Coerce", qnameName = Name "foreign" - }, ForeignImport Nothing - ( ModuleName "Unsafe.Coerce" ) ".spago/p/unsafe-coerce/7a4c95f14b8118d9fb052e130d6e862fa3f5166a/src/Unsafe/Coerce.purs" - [ ( Nothing, Name "unsafeCoerce" ) ] - ), Standalone ( QName { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "logShow" }, AbsN Nothing - ( ParamNamed Nothing ( Name "a$223" ) :| [] ) + ( ParamNamed Nothing ( Name "a$224" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "log" ) ) ) ( AppN Nothing @@ -77,18 +46,18 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "foreign" ) ) ) ( PropName "showIntImpl" ) ) - ( Ref Nothing ( Local ( Name "a$223" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "a$224" ) ) :| [] ) :| [] ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "logShow1" }, AbsN Nothing - ( ParamNamed Nothing ( Name "a$221" ) :| [] ) + ( ParamNamed Nothing ( Name "a$222" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "log" ) ) ) ( IfThenElse Nothing - ( Ref Nothing ( Local ( Name "a$221" ) ) ) + ( Ref Nothing ( Local ( Name "a$222" ) ) ) ( LiteralString Nothing "true" ) ( LiteralString Nothing "false" ) :| [] ) @@ -96,74 +65,18 @@ UberModule ), Standalone ( QName { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "replaced" - }, AppN Nothing - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeSet" ) ) ) - ( LiteralString Nothing "a" :| [] ) - ) - ( LiteralInt Nothing 3 :| [] ) - ) - ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "present" - }, AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeHas" ) ) ) - ( LiteralString Nothing "a" :| [] ) - ) - ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) + }, LiteralObject Nothing + [ ( PropName "a", LiteralInt Nothing 3 ) ] ), Standalone ( QName { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "inserted" - }, AppN Nothing - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeSet" ) ) ) - ( LiteralString Nothing "b" :| [] ) - ) - ( LiteralInt Nothing 2 :| [] ) - ) - ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "got" - }, AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeGet" ) ) ) - ( LiteralString Nothing "a" :| [] ) - ) - ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 42 ) ] :| [] ) + }, LiteralObject Nothing + [ ( PropName "a", LiteralInt Nothing 1 ), ( PropName "b", LiteralInt Nothing 2 ) ] ), Standalone ( QName { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "deleted" - }, AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeDelete" ) ) ) - ( LiteralString Nothing "a" :| [] ) - ) - ( LiteralObject Nothing - [ ( PropName "a", LiteralInt Nothing 1 ), ( PropName "b", LiteralInt Nothing 2 ) ] :| [] - ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "coerced" - }, AppN Nothing - ( ObjectProp Nothing - ( Ref Nothing ( Imported ( ModuleName "Unsafe.Coerce" ) ( Name "foreign" ) ) ) - ( PropName "unsafeCoerce" ) - ) - ( LiteralInt Nothing 7 :| [] ) - ), Standalone - ( QName - { qnameModuleName = ModuleName "Golden.RecordSurgery.Test", qnameName = Name "absent" - }, AppN Nothing - ( AppN Nothing - ( Ref Nothing ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeHas" ) ) ) - ( LiteralString Nothing "z" :| [] ) - ) - ( LiteralObject Nothing [ ( PropName "a", LiteralInt Nothing 1 ) ] :| [] ) + }, LiteralObject Nothing + [ ( PropName "b", LiteralInt Nothing 2 ) ] ) ], uberModuleForeigns = [], uberModuleExports = [ @@ -176,18 +89,10 @@ UberModule ( Name "deleted", Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "deleted" ) ) ), - ( Name "got", Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "got" ) ) - ), - ( Name "present", Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "present" ) ) - ), - ( Name "absent", Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "absent" ) ) - ), - ( Name "coerced", Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "coerced" ) ) - ), + ( Name "got", LiteralInt Nothing 42 ), + ( Name "present", LiteralBool Nothing True ), + ( Name "absent", LiteralBool Nothing False ), + ( Name "coerced", LiteralInt Nothing 7 ), ( Name "main", AbsN Nothing ( ParamUnused Nothing :| [] ) ( Let Nothing @@ -223,20 +128,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) ) - ( PrimBinOp Nothing PrimAdd - ( ObjectProp Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "inserted" ) ) - ) - ( PropName "a" ) - ) - ( ObjectProp Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "inserted" ) ) - ) - ( PropName "b" ) - ) :| [] - ) + ( LiteralInt Nothing 3 :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ), Standalone @@ -245,12 +137,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) ) - ( ObjectProp Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "replaced" ) ) - ) - ( PropName "a" ) :| [] - ) + ( LiteralInt Nothing 3 :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ), Standalone @@ -259,12 +146,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) ) - ( ObjectProp Nothing - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "deleted" ) ) - ) - ( PropName "b" ) :| [] - ) + ( LiteralInt Nothing 2 :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ), Standalone @@ -273,9 +155,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) ) - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "got" ) ) :| [] - ) + ( LiteralInt Nothing 42 :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ), Standalone @@ -284,9 +164,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow1" ) ) ) - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "present" ) ) :| [] - ) + ( LiteralBool Nothing True :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ), Standalone @@ -295,9 +173,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow1" ) ) ) - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "absent" ) ) :| [] - ) + ( LiteralBool Nothing False :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ), Standalone @@ -306,36 +182,29 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) ) - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeGet" ) ) - ) - ( LiteralString Nothing "k" :| [] ) - ) + ( ObjectProp Nothing ( AppN Nothing ( AppN Nothing ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeSet" ) ) + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) + ) + ( PropName "unsafeSet" ) ) ( LiteralString Nothing "k" :| [] ) ) ( PrimBinOp Nothing PrimAdd - ( AppN Nothing - ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeGet" ) ) - ) - ( LiteralString Nothing "k" :| [] ) - ) - ( Ref Nothing ( Local ( Name "dyn$1" ) ) :| [] ) + ( ObjectProp Nothing + ( Ref Nothing ( Local ( Name "dyn$1" ) ) ) + ( PropName "k" ) ) ( LiteralInt Nothing 1 ) :| [] ) ) - ( Ref Nothing ( Local ( Name "dyn$1" ) ) :| [] ) :| [] - ) :| [] + ( Ref Nothing ( Local ( Name "dyn$1" ) ) :| [] ) + ) + ( PropName "k" ) :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) @@ -347,15 +216,21 @@ UberModule ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeHas" ) ) + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) + ) + ( PropName "unsafeHas" ) ) ( LiteralString Nothing "k" :| [] ) ) ( AppN Nothing ( AppN Nothing - ( Ref Nothing - ( Imported ( ModuleName "Record.Unsafe" ) ( Name "unsafeDelete" ) ) + ( ObjectProp Nothing + ( Ref Nothing + ( Imported ( ModuleName "Record.Unsafe" ) ( Name "foreign" ) ) + ) + ( PropName "unsafeDelete" ) ) ( LiteralString Nothing "k" :| [] ) ) @@ -372,9 +247,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "logShow" ) ) ) - ( Ref Nothing - ( Imported ( ModuleName "Golden.RecordSurgery.Test" ) ( Name "coerced" ) ) :| [] - ) + ( LiteralInt Nothing 7 :| [] ) ) ( Ref Nothing ( Imported ( ModuleName "Prim" ) ( Name "$magicDoRun" ) ) :| [] ) ) diff --git a/test/ps/output/Golden.RecordSurgery.Test/golden.lua b/test/ps/output/Golden.RecordSurgery.Test/golden.lua index 6ed87459..65e99345 100644 --- a/test/ps/output/Golden.RecordSurgery.Test/golden.lua +++ b/test/ps/output/Golden.RecordSurgery.Test/golden.lua @@ -1,6 +1,6 @@ +local M = {} local Record_Unsafe_foreign = { unsafeHas = function(l) return function(r) return r[l] ~= nil end end, - unsafeGet = function(l) return function(r) return r[l] end end, unsafeSet = function(l) return function(value) return function(r) @@ -19,10 +19,6 @@ local Record_Unsafe_foreign = { end end } -local Record_Unsafe_unsafeDelete = Record_Unsafe_foreign.unsafeDelete -local Record_Unsafe_unsafeGet = Record_Unsafe_foreign.unsafeGet -local Record_Unsafe_unsafeHas = Record_Unsafe_foreign.unsafeHas -local Record_Unsafe_unsafeSet = Record_Unsafe_foreign.unsafeSet local Data_Show_foreign = { showIntImpl = function(n) return tostring(n) end } local Effect_Console_foreign = { log = function(s) return function() print(s) end end @@ -32,41 +28,27 @@ local Effect_Ref_foreign = { _new = function(val) return function() return { value = val } end end, read = function(ref) return function() return ref.value end end } -local Unsafe_Coerce_foreign = { unsafeCoerce = function(x) return x end } -local Golden_RecordSurgery_Test_logShow = function(a_S_223) - return Effect_Console_log(Data_Show_foreign.showIntImpl(a_S_223)) +local Golden_RecordSurgery_Test_logShow = function(a_S_224) + return Effect_Console_log(Data_Show_foreign.showIntImpl(a_S_224)) end -local Golden_RecordSurgery_Test_logShow1 = function(a_S_221) +local Golden_RecordSurgery_Test_logShow1 = function(a_S_222) return Effect_Console_log((function() - if a_S_221 then return "true" else return "false" end + if a_S_222 then return "true" else return "false" end end)()) end -local Golden_RecordSurgery_Test_replaced = Record_Unsafe_unsafeSet("a")(3)({ - a = 1 -}) -local Golden_RecordSurgery_Test_present = Record_Unsafe_unsafeHas("a")({ - a = 1 -}) -local Golden_RecordSurgery_Test_inserted = Record_Unsafe_unsafeSet("b")(2)({ - a = 1 -}) -local Golden_RecordSurgery_Test_got = Record_Unsafe_unsafeGet("a")({ a = 42 }) -local Golden_RecordSurgery_Test_deleted = Record_Unsafe_unsafeDelete("a")({ - a = 1, - b = 2 -}) -local Golden_RecordSurgery_Test_coerced = Unsafe_Coerce_foreign.unsafeCoerce(7) -local Golden_RecordSurgery_Test_absent = Record_Unsafe_unsafeHas("z")({ a = 1 }) +M.Golden_RecordSurgery_Test_replaced = { a = 3 } +M.Golden_RecordSurgery_Test_inserted = { a = 1, b = 2 } +M.Golden_RecordSurgery_Test_deleted = { b = 2 } return (function() local ref_S_0 = Effect_Ref_foreign._new({ k = 9, n = 1 })() local dyn_S_1 = Effect_Ref_foreign.read(ref_S_0)() - local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_inserted.a + Golden_RecordSurgery_Test_inserted.b)() - local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_replaced.a)() - local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_deleted.b)() - local _ = Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_got)() - local _ = Golden_RecordSurgery_Test_logShow1(Golden_RecordSurgery_Test_present)() - local _ = Golden_RecordSurgery_Test_logShow1(Golden_RecordSurgery_Test_absent)() - local _ = Golden_RecordSurgery_Test_logShow(Record_Unsafe_unsafeGet("k")(Record_Unsafe_unsafeSet("k")(Record_Unsafe_unsafeGet("k")(dyn_S_1) + 1)(dyn_S_1)))() - local _ = Golden_RecordSurgery_Test_logShow1(Record_Unsafe_unsafeHas("k")(Record_Unsafe_unsafeDelete("k")(dyn_S_1)))() - return Golden_RecordSurgery_Test_logShow(Golden_RecordSurgery_Test_coerced)() + local _ = Golden_RecordSurgery_Test_logShow(3)() + local _ = Golden_RecordSurgery_Test_logShow(3)() + local _ = Golden_RecordSurgery_Test_logShow(2)() + local _ = Golden_RecordSurgery_Test_logShow(42)() + local _ = Golden_RecordSurgery_Test_logShow1(true)() + local _ = Golden_RecordSurgery_Test_logShow1(false)() + local _ = Golden_RecordSurgery_Test_logShow((Record_Unsafe_foreign.unsafeSet("k")(dyn_S_1.k + 1)(dyn_S_1)).k)() + local _ = Golden_RecordSurgery_Test_logShow1(Record_Unsafe_foreign.unsafeHas("k")(Record_Unsafe_foreign.unsafeDelete("k")(dyn_S_1)))() + return Golden_RecordSurgery_Test_logShow(7)() end)() diff --git a/test/ps/output/Golden.STDoBlock.Test/golden.ir b/test/ps/output/Golden.STDoBlock.Test/golden.ir index 310be142..18c312bd 100644 --- a/test/ps/output/Golden.STDoBlock.Test/golden.ir +++ b/test/ps/output/Golden.STDoBlock.Test/golden.ir @@ -47,19 +47,19 @@ UberModule ( ParamUnused Nothing :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse495", AbsN Nothing - ( ParamNamed Nothing ( Name "s$455" ) :| [] ) + ( Nothing, Name "$cse496", AbsN Nothing + ( ParamNamed Nothing ( Name "s$456" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "s'$456", PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "s$455" ) ) ) + ( Nothing, Name "s'$457", PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "s$456" ) ) ) ( Ref Nothing ( Local ( Name "n" ) ) ) ) :| [] ) ( LiteralObject Nothing [ - ( PropName "state", Ref Nothing ( Local ( Name "s'$456" ) ) ), - ( PropName "value", Ref Nothing ( Local ( Name "s'$456" ) ) ) + ( PropName "state", Ref Nothing ( Local ( Name "s'$457" ) ) ), + ( PropName "value", Ref Nothing ( Local ( Name "s'$457" ) ) ) ] ) ) @@ -89,7 +89,7 @@ UberModule ( Name "modifyImpl" ) ) ) - ( Ref Nothing ( Local ( Name "$cse495" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse496" ) ) :| [] ) ) ( Ref Nothing ( Local ( Name "ref" ) ) :| [] ) ) @@ -106,7 +106,7 @@ UberModule ( Name "modifyImpl" ) ) ) - ( Ref Nothing ( Local ( Name "$cse495" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "$cse496" ) ) :| [] ) ) ( Ref Nothing ( Local ( Name "ref" ) ) :| [] ) ) diff --git a/test/ps/output/Golden.STDoBlock.Test/golden.lua b/test/ps/output/Golden.STDoBlock.Test/golden.lua index f1cc36e2..cbd76c68 100644 --- a/test/ps/output/Golden.STDoBlock.Test/golden.lua +++ b/test/ps/output/Golden.STDoBlock.Test/golden.lua @@ -23,13 +23,13 @@ local Effect_Console_foreign = { } local Golden_STDoBlock_Test_sumTwice = function(n) return Control_Monad_ST_Internal_foreign.run(function() - local _S_cse495 = function(s_S_455) - local sPrime_S_456 = s_S_455 + n - return { state = sPrime_S_456, value = sPrime_S_456 } + local _S_cse496 = function(s_S_456) + local sPrime_S_457 = s_S_456 + n + return { state = sPrime_S_457, value = sPrime_S_457 } end local ref = Control_Monad_ST_Internal_foreign.new(0)() - local _ = Control_Monad_ST_Internal_modifyImpl(_S_cse495)(ref)() - local _ = Control_Monad_ST_Internal_modifyImpl(_S_cse495)(ref)() + local _ = Control_Monad_ST_Internal_modifyImpl(_S_cse496)(ref)() + local _ = Control_Monad_ST_Internal_modifyImpl(_S_cse496)(ref)() local total = Control_Monad_ST_Internal_foreign.read(ref)() return total + 1 end) diff --git a/test/ps/output/Golden.SpecConstr.Test/golden.ir b/test/ps/output/Golden.SpecConstr.Test/golden.ir index 33ff9bc9..24d295ec 100644 --- a/test/ps/output/Golden.SpecConstr.Test/golden.ir +++ b/test/ps/output/Golden.SpecConstr.Test/golden.ir @@ -132,7 +132,7 @@ UberModule ( ParamNamed Nothing ( Name "m" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse501", DataArgumentByIndex Nothing SumType 0 + ( Nothing, Name "$cse502", DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Local ( Name "m" ) ) ) ) :| [] ) @@ -144,7 +144,7 @@ UberModule ( LiteralInt Nothing 0 ) ( IfThenElse Nothing ( Eq Nothing - ( Ref Nothing ( Local ( Name "$cse501" ) ) ) + ( Ref Nothing ( Local ( Name "$cse502" ) ) ) ( LiteralInt Nothing 0 ) ) ( LiteralInt Nothing 42 ) @@ -156,7 +156,7 @@ UberModule ) ) ( PrimBinOp Nothing PrimSub - ( Ref Nothing ( Local ( Name "$cse501" ) ) ) + ( Ref Nothing ( Local ( Name "$cse502" ) ) ) ( LiteralInt Nothing 1 ) :| [] ) ) @@ -202,31 +202,31 @@ UberModule ( ParamNamed Nothing ( Name "t" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse503", DataArgumentByIndex Nothing ProductType 1 + ( Nothing, Name "$cse504", DataArgumentByIndex Nothing ProductType 1 ( Ref Nothing ( Local ( Name "t" ) ) ) ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse502", DataArgumentByIndex Nothing ProductType 0 + ( Nothing, Name "$cse503", DataArgumentByIndex Nothing ProductType 0 ( Ref Nothing ( Local ( Name "t" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing - ( Ref Nothing ( Local ( Name "$cse502" ) ) ) + ( Ref Nothing ( Local ( Name "$cse503" ) ) ) ( LiteralInt Nothing 0 ) ) - ( Ref Nothing ( Local ( Name "$cse503" ) ) ) + ( Ref Nothing ( Local ( Name "$cse504" ) ) ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.SpecConstr.Test" ) ( Name "ping$sc1Tuple" ) ) ) ( PrimBinOp Nothing PrimSub - ( Ref Nothing ( Local ( Name "$cse502" ) ) ) + ( Ref Nothing ( Local ( Name "$cse503" ) ) ) ( LiteralInt Nothing 1 ) :| [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "$cse503" ) ) ) + ( Ref Nothing ( Local ( Name "$cse504" ) ) ) ( LiteralInt Nothing 2 ) ] ) @@ -269,31 +269,31 @@ UberModule ( ParamNamed Nothing ( Name "t" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse505", DataArgumentByIndex Nothing ProductType 1 + ( Nothing, Name "$cse506", DataArgumentByIndex Nothing ProductType 1 ( Ref Nothing ( Local ( Name "t" ) ) ) ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse504", DataArgumentByIndex Nothing ProductType 0 + ( Nothing, Name "$cse505", DataArgumentByIndex Nothing ProductType 0 ( Ref Nothing ( Local ( Name "t" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing - ( Ref Nothing ( Local ( Name "$cse504" ) ) ) + ( Ref Nothing ( Local ( Name "$cse505" ) ) ) ( LiteralInt Nothing 0 ) ) - ( Ref Nothing ( Local ( Name "$cse505" ) ) ) + ( Ref Nothing ( Local ( Name "$cse506" ) ) ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.SpecConstr.Test" ) ( Name "pong$sc1Tuple" ) ) ) ( PrimBinOp Nothing PrimSub - ( Ref Nothing ( Local ( Name "$cse504" ) ) ) + ( Ref Nothing ( Local ( Name "$cse505" ) ) ) ( LiteralInt Nothing 1 ) :| [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "$cse505" ) ) ) + ( Ref Nothing ( Local ( Name "$cse506" ) ) ) ( LiteralInt Nothing 1 ) ] ) @@ -407,23 +407,23 @@ UberModule [ Let Nothing ( RecursiveGroup ( - ( Nothing, Name "go$sc1Tuple$494", AbsN Nothing + ( Nothing, Name "go$sc1Tuple$495", AbsN Nothing ( ParamNamed Nothing - ( Name "go$sc1Tuple$f1$495" ) :| - [ ParamNamed Nothing ( Name "go$sc1Tuple$f2$496" ) ] + ( Name "go$sc1Tuple$f1$496" ) :| + [ ParamNamed Nothing ( Name "go$sc1Tuple$f2$497" ) ] ) ( IfThenElse Nothing ( PrimBinOp Nothing PrimLt - ( Ref Nothing ( Local ( Name "go$sc1Tuple$f2$496" ) ) ) + ( Ref Nothing ( Local ( Name "go$sc1Tuple$f2$497" ) ) ) ( LiteralInt Nothing 5 ) ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "go$sc1Tuple$494" ) ) ) + ( Ref Nothing ( Local ( Name "go$sc1Tuple$495" ) ) ) ( PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "go$sc1Tuple$f1$495" ) ) ) - ( Ref Nothing ( Local ( Name "go$sc1Tuple$f2$496" ) ) ) :| + ( Ref Nothing ( Local ( Name "go$sc1Tuple$f1$496" ) ) ) + ( Ref Nothing ( Local ( Name "go$sc1Tuple$f2$497" ) ) ) :| [ PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "go$sc1Tuple$f2$496" ) ) ) + ( Ref Nothing ( Local ( Name "go$sc1Tuple$f2$497" ) ) ) ( LiteralInt Nothing 1 ) ] ) @@ -433,8 +433,8 @@ UberModule ( TyName "Tuple" ) ( CtorName "Tuple" ) [ Ref Nothing - ( Local ( Name "go$sc1Tuple$f1$495" ) ), Ref Nothing - ( Local ( Name "go$sc1Tuple$f2$496" ) ) + ( Local ( Name "go$sc1Tuple$f1$496" ) ), Ref Nothing + ( Local ( Name "go$sc1Tuple$f2$497" ) ) ] ) ) @@ -442,7 +442,7 @@ UberModule ) :| [] ) ( AppN Nothing - ( Ref Nothing ( Local ( Name "go$sc1Tuple$494" ) ) ) + ( Ref Nothing ( Local ( Name "go$sc1Tuple$495" ) ) ) ( LiteralInt Nothing 0 :| [ LiteralInt Nothing 0 ] ) ) ] diff --git a/test/ps/output/Golden.SpecConstr.Test/golden.lua b/test/ps/output/Golden.SpecConstr.Test/golden.lua index 4fc12e80..8f64e295 100644 --- a/test/ps/output/Golden.SpecConstr.Test/golden.lua +++ b/test/ps/output/Golden.SpecConstr.Test/golden.lua @@ -32,13 +32,13 @@ local Golden_SpecConstr_Test_stepDown_S_sc1Just = function( stepDown_S_sc1Just_S end end local Golden_SpecConstr_Test_stepDown = function(m) - local _S_cse501 = m[2] + local _S_cse502 = m[2] if "Data.Maybe∷Maybe.Nothing" == m[1] then return 0 - elseif _S_cse501 == 0 then + elseif _S_cse502 == 0 then return 42 else - return Golden_SpecConstr_Test_stepDown_S_sc1Just(_S_cse501 - 1) + return Golden_SpecConstr_Test_stepDown_S_sc1Just(_S_cse502 - 1) end end local Golden_SpecConstr_Test_pong_S_sc1Tuple_S_loop = function( _S_sel0 @@ -68,12 +68,12 @@ local Golden_SpecConstr_Test_pong_S_sc1Tuple = function( pong_S_sc1Tuple_S_f1 end local Golden_SpecConstr_Test_ping_S_sc1Tuple M.Golden_SpecConstr_Test_pong = function(t) - local _S_cse503 = t[2] - local _S_cse502 = t[1] - if _S_cse502 == 0 then - return _S_cse503 + local _S_cse504 = t[2] + local _S_cse503 = t[1] + if _S_cse503 == 0 then + return _S_cse504 else - return Golden_SpecConstr_Test_ping_S_sc1Tuple(_S_cse502 - 1, _S_cse503 + 2) + return Golden_SpecConstr_Test_ping_S_sc1Tuple(_S_cse503 - 1, _S_cse504 + 2) end end Golden_SpecConstr_Test_ping_S_sc1Tuple = function( ping_S_sc1Tuple_S_f1 @@ -81,12 +81,12 @@ Golden_SpecConstr_Test_ping_S_sc1Tuple = function( ping_S_sc1Tuple_S_f1 return Golden_SpecConstr_Test_pong_S_sc1Tuple_S_loop(2, ping_S_sc1Tuple_S_f1, ping_S_sc1Tuple_S_f2) end M.Golden_SpecConstr_Test_ping = function(t) - local _S_cse505 = t[2] - local _S_cse504 = t[1] - if _S_cse504 == 0 then - return _S_cse505 + local _S_cse506 = t[2] + local _S_cse505 = t[1] + if _S_cse505 == 0 then + return _S_cse506 else - return Golden_SpecConstr_Test_pong_S_sc1Tuple(_S_cse504 - 1, _S_cse505 + 1) + return Golden_SpecConstr_Test_pong_S_sc1Tuple(_S_cse505 - 1, _S_cse506 + 1) end end local Golden_SpecConstr_Test_blind_S_w @@ -108,13 +108,13 @@ return (function() return "(Tuple " .. Data_Show_showIntImpl(v_S_86[1]) .. " " .. Data_Show_showIntImpl(v_S_86[2]) .. ")" end }, (function() - local go_S_sc1Tuple_S_f1_S_495, go_S_sc1Tuple_S_f2_S_496 - go_S_sc1Tuple_S_f1_S_495, go_S_sc1Tuple_S_f2_S_496 = 0, 0 + local go_S_sc1Tuple_S_f1_S_496, go_S_sc1Tuple_S_f2_S_497 + go_S_sc1Tuple_S_f1_S_496, go_S_sc1Tuple_S_f2_S_497 = 0, 0 while true do - if go_S_sc1Tuple_S_f2_S_496 < 5 then - go_S_sc1Tuple_S_f1_S_495, go_S_sc1Tuple_S_f2_S_496 = go_S_sc1Tuple_S_f1_S_495 + go_S_sc1Tuple_S_f2_S_496, go_S_sc1Tuple_S_f2_S_496 + 1 + if go_S_sc1Tuple_S_f2_S_497 < 5 then + go_S_sc1Tuple_S_f1_S_496, go_S_sc1Tuple_S_f2_S_497 = go_S_sc1Tuple_S_f1_S_496 + go_S_sc1Tuple_S_f2_S_497, go_S_sc1Tuple_S_f2_S_497 + 1 else - return { go_S_sc1Tuple_S_f1_S_495, go_S_sc1Tuple_S_f2_S_496 } + return { go_S_sc1Tuple_S_f1_S_496, go_S_sc1Tuple_S_f2_S_497 } end end end)())() diff --git a/test/ps/output/Golden.StringCodePoints.Test/golden.ir b/test/ps/output/Golden.StringCodePoints.Test/golden.ir index 9ae21296..6197a280 100644 --- a/test/ps/output/Golden.StringCodePoints.Test/golden.ir +++ b/test/ps/output/Golden.StringCodePoints.Test/golden.ir @@ -168,28 +168,28 @@ UberModule ) ), ( PropName "conj", AbsN Nothing - ( ParamNamed Nothing ( Name "b1$1500" ) :| [] ) + ( ParamNamed Nothing ( Name "b1$1503" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "b2$1501" ) :| [] ) + ( ParamNamed Nothing ( Name "b2$1504" ) :| [] ) ( PrimBinOp Nothing PrimAnd - ( Ref Nothing ( Local ( Name "b1$1500" ) ) ) - ( Ref Nothing ( Local ( Name "b2$1501" ) ) ) + ( Ref Nothing ( Local ( Name "b1$1503" ) ) ) + ( Ref Nothing ( Local ( Name "b2$1504" ) ) ) ) ) ), ( PropName "disj", AbsN Nothing - ( ParamNamed Nothing ( Name "b1$1498" ) :| [] ) + ( ParamNamed Nothing ( Name "b1$1501" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "b2$1499" ) :| [] ) + ( ParamNamed Nothing ( Name "b2$1502" ) :| [] ) ( PrimBinOp Nothing PrimOr - ( Ref Nothing ( Local ( Name "b1$1498" ) ) ) - ( Ref Nothing ( Local ( Name "b2$1499" ) ) ) + ( Ref Nothing ( Local ( Name "b1$1501" ) ) ) + ( Ref Nothing ( Local ( Name "b2$1502" ) ) ) ) ) ), ( PropName "not", AbsN Nothing - ( ParamNamed Nothing ( Name "b$1497" ) :| [] ) - ( PrimNot Nothing ( Ref Nothing ( Local ( Name "b$1497" ) ) ) ) + ( ParamNamed Nothing ( Name "b$1500" ) :| [] ) + ( PrimNot Nothing ( Ref Nothing ( Local ( Name "b$1500" ) ) ) ) ) ] ) :| [] @@ -198,12 +198,12 @@ UberModule { qnameModuleName = ModuleName "Data.Eq", qnameName = Name "eqInt" }, LiteralObject Nothing [ ( PropName "eq", AbsN Nothing - ( ParamNamed Nothing ( Name "r1$1493" ) :| [] ) + ( ParamNamed Nothing ( Name "r1$1496" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "r2$1494" ) :| [] ) + ( ParamNamed Nothing ( Name "r2$1497" ) :| [] ) ( Eq Nothing - ( Ref Nothing ( Local ( Name "r1$1493" ) ) ) - ( Ref Nothing ( Local ( Name "r2$1494" ) ) ) + ( Ref Nothing ( Local ( Name "r1$1496" ) ) ) + ( Ref Nothing ( Local ( Name "r2$1497" ) ) ) ) ) ) @@ -244,19 +244,19 @@ UberModule }, LiteralObject Nothing [ ( PropName "compare", AbsN Nothing - ( ParamNamed Nothing ( Name "x$1477" ) :| [] ) + ( ParamNamed Nothing ( Name "x$1480" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "y$1478" ) :| [] ) + ( ParamNamed Nothing ( Name "y$1481" ) :| [] ) ( IfThenElse Nothing ( PrimBinOp Nothing PrimLt - ( Ref Nothing ( Local ( Name "x$1477" ) ) ) - ( Ref Nothing ( Local ( Name "y$1478" ) ) ) + ( Ref Nothing ( Local ( Name "x$1480" ) ) ) + ( Ref Nothing ( Local ( Name "y$1481" ) ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Ordering" ) ( Name "LT" ) ) ) ( IfThenElse Nothing ( Eq Nothing - ( Ref Nothing ( Local ( Name "x$1477" ) ) ) - ( Ref Nothing ( Local ( Name "y$1478" ) ) ) + ( Ref Nothing ( Local ( Name "x$1480" ) ) ) + ( Ref Nothing ( Local ( Name "y$1481" ) ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Ordering" ) ( Name "EQ" ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Ordering" ) ( Name "GT" ) ) ) @@ -444,7 +444,7 @@ UberModule ( AppN Nothing ( Let Nothing ( Standalone - ( Nothing, Name "x$1600", AppN Nothing + ( Nothing, Name "x$1603", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodeUnits" ) ( Name "length" ) ) ) @@ -452,19 +452,19 @@ UberModule ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "y$1601" ) :| [] ) + ( ParamNamed Nothing ( Name "y$1604" ) :| [] ) ( IfThenElse Nothing ( PrimBinOp Nothing PrimLt - ( Ref Nothing ( Local ( Name "x$1600" ) ) ) - ( Ref Nothing ( Local ( Name "y$1601" ) ) ) + ( Ref Nothing ( Local ( Name "x$1603" ) ) ) + ( Ref Nothing ( Local ( Name "y$1604" ) ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Ordering" ) ( Name "LT" ) ) ) ( IfThenElse Nothing ( Eq Nothing - ( Ref Nothing ( Local ( Name "x$1600" ) ) ) - ( Ref Nothing ( Local ( Name "y$1601" ) ) ) + ( Ref Nothing ( Local ( Name "x$1603" ) ) ) + ( Ref Nothing ( Local ( Name "y$1604" ) ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Ordering" ) ( Name "EQ" ) ) @@ -551,7 +551,7 @@ UberModule ( QName { qnameModuleName = ModuleName "Data.String.CodePoints", qnameName = Name "fromCharCode" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$1726" ) :| [] ) + ( ParamNamed Nothing ( Name "x$1729" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodeUnits" ) ( Name "foreign" ) ) ) @@ -578,7 +578,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Ord" ) ( Name "ordInt" ) ) :| [ Ref Nothing - ( Local ( Name "x$1726" ) ), AppN Nothing + ( Local ( Name "x$1729" ) ), AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Enum" ) ( Name "toCharCode" ) ) ) @@ -596,7 +596,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Ord" ) ( Name "ordInt" ) ) :| [ Ref Nothing - ( Local ( Name "x$1726" ) ), AppN Nothing + ( Local ( Name "x$1729" ) ), AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Enum" ) ( Name "toCharCode" ) ) ) @@ -616,7 +616,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Enum" ) ( Name "foreign" ) ) ) ( PropName "fromCharCode" ) ) - ( Ref Nothing ( Local ( Name "x$1726" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "x$1729" ) ) :| [] ) ] ) ( Ref Nothing ( Imported ( ModuleName "Data.Maybe" ) ( Name "Nothing" ) ) ) @@ -634,7 +634,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.Ord" ) ( Name "ordInt" ) ) :| [ Ref Nothing - ( Local ( Name "x$1726" ) ), AppN Nothing + ( Local ( Name "x$1729" ) ), AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.Enum" ) ( Name "toCharCode" ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Bounded" ) ( Name "bottomChar" ) ) :| [] @@ -975,10 +975,10 @@ UberModule ( PropName "unfoldrArrayImpl" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v2$1524" ) :| [] ) + ( ParamNamed Nothing ( Name "v2$1527" ) :| [] ) ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$1524" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v2$1527" ) ) ) ) ) :| [] ) ) @@ -989,14 +989,14 @@ UberModule ( AbsN Nothing ( ParamUnused Nothing :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$1574" ) :| [] ) + ( ParamNamed Nothing ( Name "v$1577" ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1574" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1577" ) ) ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$1574" ) ) ) + ( Ref Nothing ( Local ( Name "v$1577" ) ) ) ) ( Exception Nothing "No patterns matched" ) ) @@ -1005,16 +1005,16 @@ UberModule ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$1522" ) :| [] ) + ( ParamNamed Nothing ( Name "v$1525" ) :| [] ) ( DataArgumentByIndex Nothing ProductType 0 - ( Ref Nothing ( Local ( Name "v$1522" ) ) ) + ( Ref Nothing ( Local ( Name "v$1525" ) ) ) ) :| [] ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$1523" ) :| [] ) + ( ParamNamed Nothing ( Name "v$1526" ) :| [] ) ( DataArgumentByIndex Nothing ProductType 1 - ( Ref Nothing ( Local ( Name "v$1523" ) ) ) + ( Ref Nothing ( Local ( Name "v$1526" ) ) ) ) :| [] ) ) @@ -1022,7 +1022,7 @@ UberModule ( ParamNamed Nothing ( Name "s$8" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "v1$1577", AppN Nothing + ( Nothing, Name "v1$1580", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) ( Name "uncons" ) ) ) @@ -1032,7 +1032,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1577" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1580" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1044,11 +1044,11 @@ UberModule ( CtorName "Tuple" ) [ ObjectProp Nothing ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1577" ) ) ) + ( Ref Nothing ( Local ( Name "v1$1580" ) ) ) ) ( PropName "head" ), ObjectProp Nothing ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1577" ) ) ) + ( Ref Nothing ( Local ( Name "v1$1580" ) ) ) ) ( PropName "tail" ) ] @@ -1303,7 +1303,7 @@ UberModule ( LiteralObject Nothing [ ( PropName "succ", AbsN Nothing - ( ParamNamed Nothing ( Name "a$1560" ) :| [] ) + ( ParamNamed Nothing ( Name "a$1563" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( Ref Nothing @@ -1325,14 +1325,14 @@ UberModule ) ( PropName "fromEnum" ) ) - ( Ref Nothing ( Local ( Name "a$1560" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "a$1563" ) ) :| [] ) ) ( LiteralInt Nothing 1 ) :| [] ) ) ), ( PropName "pred", AbsN Nothing - ( ParamNamed Nothing ( Name "a$1568" ) :| [] ) + ( ParamNamed Nothing ( Name "a$1571" ) :| [] ) ( AppN Nothing ( ObjectProp Nothing ( Ref Nothing @@ -1354,7 +1354,7 @@ UberModule ) ( PropName "fromEnum" ) ) - ( Ref Nothing ( Local ( Name "a$1568" ) ) :| [] ) + ( Ref Nothing ( Local ( Name "a$1571" ) ) :| [] ) ) ( LiteralInt Nothing 1 ) :| [] ) @@ -1411,17 +1411,17 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.StringCodePoints.Test", qnameName = Name "logShow2" }, AbsN Nothing - ( ParamNamed Nothing ( Name "logShow$p2$1697" ) :| [] ) + ( ParamNamed Nothing ( Name "logShow$p2$1700" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "logShow$w" ) ) ) ( LiteralObject Nothing [ ( PropName "show", AbsN Nothing - ( ParamNamed Nothing ( Name "v$1691" ) :| [] ) + ( ParamNamed Nothing ( Name "v$1694" ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1691" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1694" ) ) ) ) ) ( PrimBinOp Nothing PrimConcat ( LiteralString Nothing "(Just " ) @@ -1431,7 +1431,7 @@ UberModule ( Imported ( ModuleName "Data.Show" ) ( Name "showIntImpl" ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$1691" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v$1694" ) ) ) :| [] ) ) ( LiteralString Nothing ")" ) @@ -1441,28 +1441,28 @@ UberModule ) ) ] :| - [ Ref Nothing ( Local ( Name "logShow$p2$1697" ) ) ] + [ Ref Nothing ( Local ( Name "logShow$p2$1700" ) ) ] ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.StringCodePoints.Test", qnameName = Name "cp" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$1689" ) :| [] ) + ( ParamNamed Nothing ( Name "x$1692" ) :| [] ) ( AppN Nothing ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Partial.Unsafe" ) ( Name "_unsafePartial" ) ) ) ( AbsN Nothing ( ParamUnused Nothing :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v$1532" ) :| [] ) + ( ParamNamed Nothing ( Name "v$1535" ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1532" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1535" ) ) ) ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$1532" ) ) ) + ( Ref Nothing ( Local ( Name "v$1535" ) ) ) ) ( Exception Nothing "No patterns matched" ) ) @@ -1476,14 +1476,14 @@ UberModule ) ( PropName "toEnum" ) ) - ( Ref Nothing ( Local ( Name "x$1689" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "x$1692" ) ) :| [] ) :| [] ) ) ), Standalone ( QName { qnameModuleName = ModuleName "Golden.StringCodePoints.Test", qnameName = Name "codes" }, AbsN Nothing - ( ParamNamed Nothing ( Name "x$1686" ) :| [] ) + ( ParamNamed Nothing ( Name "x$1689" ) :| [] ) ( AppN Nothing ( AppN Nothing ( ObjectProp Nothing @@ -1498,7 +1498,7 @@ UberModule ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) ( Name "toCodePointArray" ) ) ) - ( Ref Nothing ( Local ( Name "x$1686" ) ) :| [] ) :| [] + ( Ref Nothing ( Local ( Name "x$1689" ) ) :| [] ) :| [] ) ) ) @@ -1623,7 +1623,7 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "v1$1748", AppN Nothing + ( Nothing, Name "v1$1751", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) @@ -1636,7 +1636,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1748" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1751" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1650,7 +1650,7 @@ UberModule ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1748" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$1751" ) ) ) :| [] ) ] ) @@ -1667,7 +1667,7 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "v1$1750", AppN Nothing + ( Nothing, Name "v1$1753", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) @@ -1680,7 +1680,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1750" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1753" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1694,7 +1694,7 @@ UberModule ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1750" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$1753" ) ) ) :| [] ) ] ) @@ -1711,7 +1711,7 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "v1$1752", AppN Nothing + ( Nothing, Name "v1$1755", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) @@ -1724,7 +1724,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1752" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1755" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1738,7 +1738,7 @@ UberModule ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1752" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v1$1755" ) ) ) :| [] ) ] ) @@ -1755,7 +1755,7 @@ UberModule ) ( Let Nothing ( Standalone - ( Nothing, Name "v1$1757", AppN Nothing + ( Nothing, Name "v1$1760", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) ( Name "uncons" ) ) ) @@ -1765,7 +1765,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1757" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1760" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1780,7 +1780,7 @@ UberModule ) ( ObjectProp Nothing ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1757" ) ) ) + ( Ref Nothing ( Local ( Name "v1$1760" ) ) ) ) ( PropName "head" ) :| [] ) @@ -1798,11 +1798,11 @@ UberModule ( LiteralObject Nothing [ ( PropName "show", AbsN Nothing - ( ParamNamed Nothing ( Name "v$1680" ) :| [] ) + ( ParamNamed Nothing ( Name "v$1683" ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1680" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v$1683" ) ) ) ) ) ( PrimBinOp Nothing PrimConcat ( LiteralString Nothing "(Just " ) @@ -1820,7 +1820,7 @@ UberModule ) ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v$1680" ) ) ) :| [] + ( Ref Nothing ( Local ( Name "v$1683" ) ) ) :| [] ) ) ( LiteralString Nothing ")" ) @@ -1832,7 +1832,7 @@ UberModule ] :| [ Let Nothing ( Standalone - ( Nothing, Name "v1$1766", AppN Nothing + ( Nothing, Name "v1$1769", AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Data.String.CodePoints" ) ( Name "uncons" ) ) ) @@ -1842,7 +1842,7 @@ UberModule ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Just" ) - ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1766" ) ) ) ) + ( ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v1$1769" ) ) ) ) ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) @@ -1857,7 +1857,7 @@ UberModule ) ( ObjectProp Nothing ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v1$1766" ) ) ) + ( Ref Nothing ( Local ( Name "v1$1769" ) ) ) ) ( PropName "tail" ) :| [] ) diff --git a/test/ps/output/Golden.StringCodePoints.Test/golden.lua b/test/ps/output/Golden.StringCodePoints.Test/golden.lua index 087c65b3..b9988d47 100644 --- a/test/ps/output/Golden.StringCodePoints.Test/golden.lua +++ b/test/ps/output/Golden.StringCodePoints.Test/golden.lua @@ -266,17 +266,17 @@ Data_HeytingAlgebra_heytingAlgebraBoolean = { return Data_HeytingAlgebra_heytingAlgebraBoolean.disj(Data_HeytingAlgebra_heytingAlgebraBoolean._not_(a))(b) end end, - conj = function(b1_S_1500) - return function(b2_S_1501) return b1_S_1500 and b2_S_1501 end + conj = function(b1_S_1503) + return function(b2_S_1504) return b1_S_1503 and b2_S_1504 end end, - disj = function(b1_S_1498) - return function(b2_S_1499) return b1_S_1498 or b2_S_1499 end + disj = function(b1_S_1501) + return function(b2_S_1502) return b1_S_1501 or b2_S_1502 end end, - _not_ = function(b_S_1497) return not(b_S_1497) end + _not_ = function(b_S_1500) return not(b_S_1500) end } local Data_Eq_eqInt = { - eq = function(r1_S_1493) - return function(r2_S_1494) return r1_S_1493 == r2_S_1494 end + eq = function(r1_S_1496) + return function(r2_S_1497) return r1_S_1496 == r2_S_1497 end end } local Data_Show_showInt = { show = Data_Show_showIntImpl } @@ -284,11 +284,11 @@ local Data_Ordering_LT = { "Data.Ordering∷Ordering.LT" } local Data_Ordering_GT = { "Data.Ordering∷Ordering.GT" } local Data_Ordering_EQ = { "Data.Ordering∷Ordering.EQ" } local Data_Ord_ordInt = { - compare = function(x_S_1477) - return function(y_S_1478) - if x_S_1477 < y_S_1478 then + compare = function(x_S_1480) + return function(y_S_1481) + if x_S_1480 < y_S_1481 then return Data_Ordering_LT - elseif x_S_1477 == y_S_1478 then + elseif x_S_1480 == y_S_1481 then return Data_Ordering_EQ else return Data_Ordering_GT @@ -317,11 +317,11 @@ local Data_String_CodePoints_fromEnum = Data_Enum_toCharCode local Data_String_CodePoints_unsafeCodePointAt0 = Data_String_CodePoints_foreign._unsafeCodePointAt0(function( s_S_24 ) local cu0_S_25 = Data_String_CodePoints_fromEnum(Data_String_Unsafe_charAt(0)(s_S_24)) if Data_String_CodePoints_conj(Data_String_CodePoints_conj(Data_Ord_lessThanOrEq_S_w(Data_Ord_ordInt, 55296, cu0_S_25))(Data_Ord_lessThanOrEq_S_w(Data_Ord_ordInt, cu0_S_25, 56319)))("Data.Ordering∷Ordering.GT" == ((function( ) - local x_S_1600 = Data_String_CodeUnits_length(s_S_24) - local y_S_1601 = 1 - if x_S_1600 < y_S_1601 then + local x_S_1603 = Data_String_CodeUnits_length(s_S_24) + local y_S_1604 = 1 + if x_S_1603 < y_S_1604 then return Data_Ordering_LT - elseif x_S_1600 == y_S_1601 then + elseif x_S_1603 == y_S_1604 then return Data_Ordering_EQ else return Data_Ordering_GT @@ -337,13 +337,13 @@ local Data_String_CodePoints_unsafeCodePointAt0 = Data_String_CodePoints_foreign return cu0_S_25 end end) -local Data_String_CodePoints_fromCharCode = function(x_S_1726) +local Data_String_CodePoints_fromCharCode = function(x_S_1729) return Data_String_CodeUnits_foreign.singleton((function() local v_S_60 = (function() - if Data_HeytingAlgebra_heytingAlgebraBoolean.conj(Data_Ord_greaterThanOrEq_S_w(Data_Ord_ordInt, x_S_1726, Data_Enum_toCharCode(Data_Enum_bottom1)))(Data_Ord_lessThanOrEq_S_w(Data_Ord_ordInt, x_S_1726, Data_Enum_toCharCode(Data_Enum_top1))) then + if Data_HeytingAlgebra_heytingAlgebraBoolean.conj(Data_Ord_greaterThanOrEq_S_w(Data_Ord_ordInt, x_S_1729, Data_Enum_toCharCode(Data_Enum_bottom1)))(Data_Ord_lessThanOrEq_S_w(Data_Ord_ordInt, x_S_1729, Data_Enum_toCharCode(Data_Enum_top1))) then return { "Data.Maybe∷Maybe.Just", - (Data_Enum_foreign.fromCharCode(x_S_1726)) + (Data_Enum_foreign.fromCharCode(x_S_1729)) } else return Data_Maybe_Nothing @@ -351,7 +351,7 @@ local Data_String_CodePoints_fromCharCode = function(x_S_1726) end)() if "Data.Maybe∷Maybe.Just" == v_S_60[1] then return v_S_60[2] - elseif Data_Ord_lessThan_S_w(Data_Ord_ordInt, x_S_1726, Data_Enum_toCharCode(Data_Bounded_bottomChar)) then + elseif Data_Ord_lessThan_S_w(Data_Ord_ordInt, x_S_1729, Data_Enum_toCharCode(Data_Bounded_bottomChar)) then return Data_Bounded_bottomChar else return Data_Bounded_topChar @@ -425,24 +425,24 @@ Data_String_CodePoints_drop_S_w = function(n, s) return Data_String_CodeUnits_foreign.drop(Data_String_CodeUnits_length(Data_String_CodePoints_take_S_w(n, s)))(s) end local Data_String_CodePoints_toCodePointArray = Data_String_CodePoints_foreign._toCodePointArray(function( s_S_7 ) - return Data_Unfoldable_foreign.unfoldrArrayImpl(function(v2_S_1524) - return "Data.Maybe∷Maybe.Nothing" == v2_S_1524[1] + return Data_Unfoldable_foreign.unfoldrArrayImpl(function(v2_S_1527) + return "Data.Maybe∷Maybe.Nothing" == v2_S_1527[1] end)(Partial_Unsafe__unsafePartial(function() - return function(v_S_1574) - if "Data.Maybe∷Maybe.Just" == v_S_1574[1] then - return v_S_1574[2] + return function(v_S_1577) + if "Data.Maybe∷Maybe.Just" == v_S_1577[1] then + return v_S_1577[2] else return error("No patterns matched") end end - end))(function(v_S_1522) return v_S_1522[1] end)(function(v_S_1523) - return v_S_1523[2] + end))(function(v_S_1525) return v_S_1525[1] end)(function(v_S_1526) + return v_S_1526[2] end)(function(s_S_8) - local v1_S_1577 = Data_String_CodePoints_uncons(s_S_8) - if "Data.Maybe∷Maybe.Just" == v1_S_1577[1] then + local v1_S_1580 = Data_String_CodePoints_uncons(s_S_8) + if "Data.Maybe∷Maybe.Just" == v1_S_1580[1] then return { "Data.Maybe∷Maybe.Just", - { v1_S_1577[2].head, v1_S_1577[2].tail } + { v1_S_1580[2].head, v1_S_1580[2].tail } } else return Data_Maybe_Nothing @@ -506,11 +506,11 @@ local Data_String_CodePoints_boundedEnumCodePoint = { } Data_String_CodePoints_Lazy_enumCodePoint = PSLUA_runtime_lazy("enumCodePoint")(function( ) return { - succ = function(a_S_1560) - return Data_String_CodePoints_boundedEnumCodePoint.toEnum(Data_String_CodePoints_boundedEnumCodePoint.fromEnum(a_S_1560) + 1) + succ = function(a_S_1563) + return Data_String_CodePoints_boundedEnumCodePoint.toEnum(Data_String_CodePoints_boundedEnumCodePoint.fromEnum(a_S_1563) + 1) end, - pred = function(a_S_1568) - return Data_String_CodePoints_boundedEnumCodePoint.toEnum(Data_String_CodePoints_boundedEnumCodePoint.fromEnum(a_S_1568) - 1) + pred = function(a_S_1571) + return Data_String_CodePoints_boundedEnumCodePoint.toEnum(Data_String_CodePoints_boundedEnumCodePoint.fromEnum(a_S_1571) - 1) end, Ord0 = function() return Data_String_CodePoints_ordCodePoint end } @@ -522,30 +522,30 @@ local Golden_StringCodePoints_Test_fromEnum = Data_String_CodePoints_boundedEnum local Golden_StringCodePoints_Test_showArray = { show = Data_Show_showArrayImpl(Data_Show_showIntImpl) } -local Golden_StringCodePoints_Test_logShow2 = function(logShow_S_p2_S_1697) +local Golden_StringCodePoints_Test_logShow2 = function(logShow_S_p2_S_1700) return Effect_Console_logShow_S_w({ - show = function(v_S_1691) - if "Data.Maybe∷Maybe.Just" == v_S_1691[1] then - return "(Just " .. Data_Show_showIntImpl(v_S_1691[2]) .. ")" + show = function(v_S_1694) + if "Data.Maybe∷Maybe.Just" == v_S_1694[1] then + return "(Just " .. Data_Show_showIntImpl(v_S_1694[2]) .. ")" else return "Nothing" end end - }, logShow_S_p2_S_1697) + }, logShow_S_p2_S_1700) end -local Golden_StringCodePoints_Test_cp = function(x_S_1689) +local Golden_StringCodePoints_Test_cp = function(x_S_1692) return Partial_Unsafe__unsafePartial(function() - return function(v_S_1532) - if "Data.Maybe∷Maybe.Just" == v_S_1532[1] then - return v_S_1532[2] + return function(v_S_1535) + if "Data.Maybe∷Maybe.Just" == v_S_1535[1] then + return v_S_1535[2] else return error("No patterns matched") end end - end)(Data_String_CodePoints_boundedEnumCodePoint.toEnum(x_S_1689)) + end)(Data_String_CodePoints_boundedEnumCodePoint.toEnum(x_S_1692)) end -local Golden_StringCodePoints_Test_codes = function(x_S_1686) - return Data_Functor_foreign.arrayMap(Golden_StringCodePoints_Test_fromEnum)(Data_String_CodePoints_toCodePointArray(x_S_1686)) +local Golden_StringCodePoints_Test_codes = function(x_S_1689) + return Data_Functor_foreign.arrayMap(Golden_StringCodePoints_Test_fromEnum)(Data_String_CodePoints_toCodePointArray(x_S_1689)) end return (function() local _ = Effect_Console_logShow_S_w(Golden_StringCodePoints_Test_showArray, Golden_StringCodePoints_Test_codes("aéЯ𝐀z"))() @@ -554,63 +554,63 @@ return (function() local _ = Effect_Console_logShow_S_w(Golden_StringCodePoints_Test_showArray, Golden_StringCodePoints_Test_codes(Data_String_CodePoints_take_S_w(2, "aéЯ𝐀z")))() local _ = Effect_Console_logShow_S_w(Golden_StringCodePoints_Test_showArray, Golden_StringCodePoints_Test_codes(Data_String_CodePoints_drop_S_w(2, "aéЯ𝐀z")))() local _ = Golden_StringCodePoints_Test_logShow2((function() - local v1_S_1748 = Data_String_CodePoints_codePointAt_S_w(0, "aéЯ𝐀z") - if "Data.Maybe∷Maybe.Just" == v1_S_1748[1] then + local v1_S_1751 = Data_String_CodePoints_codePointAt_S_w(0, "aéЯ𝐀z") + if "Data.Maybe∷Maybe.Just" == v1_S_1751[1] then return { "Data.Maybe∷Maybe.Just", - (Golden_StringCodePoints_Test_fromEnum(v1_S_1748[2])) + (Golden_StringCodePoints_Test_fromEnum(v1_S_1751[2])) } else return Data_Maybe_Nothing end end)())() local _ = Golden_StringCodePoints_Test_logShow2((function() - local v1_S_1750 = Data_String_CodePoints_codePointAt_S_w(3, "aéЯ𝐀z") - if "Data.Maybe∷Maybe.Just" == v1_S_1750[1] then + local v1_S_1753 = Data_String_CodePoints_codePointAt_S_w(3, "aéЯ𝐀z") + if "Data.Maybe∷Maybe.Just" == v1_S_1753[1] then return { "Data.Maybe∷Maybe.Just", - (Golden_StringCodePoints_Test_fromEnum(v1_S_1750[2])) + (Golden_StringCodePoints_Test_fromEnum(v1_S_1753[2])) } else return Data_Maybe_Nothing end end)())() local _ = Golden_StringCodePoints_Test_logShow2((function() - local v1_S_1752 = Data_String_CodePoints_codePointAt_S_w(5, "aéЯ𝐀z") - if "Data.Maybe∷Maybe.Just" == v1_S_1752[1] then + local v1_S_1755 = Data_String_CodePoints_codePointAt_S_w(5, "aéЯ𝐀z") + if "Data.Maybe∷Maybe.Just" == v1_S_1755[1] then return { "Data.Maybe∷Maybe.Just", - (Golden_StringCodePoints_Test_fromEnum(v1_S_1752[2])) + (Golden_StringCodePoints_Test_fromEnum(v1_S_1755[2])) } else return Data_Maybe_Nothing end end)())() local _ = Golden_StringCodePoints_Test_logShow2((function() - local v1_S_1757 = Data_String_CodePoints_uncons("aéЯ𝐀z") - if "Data.Maybe∷Maybe.Just" == v1_S_1757[1] then + local v1_S_1760 = Data_String_CodePoints_uncons("aéЯ𝐀z") + if "Data.Maybe∷Maybe.Just" == v1_S_1760[1] then return { "Data.Maybe∷Maybe.Just", - (Golden_StringCodePoints_Test_fromEnum(v1_S_1757[2].head)) + (Golden_StringCodePoints_Test_fromEnum(v1_S_1760[2].head)) } else return Data_Maybe_Nothing end end)())() local _ = Effect_Console_logShow_S_w({ - show = function(v_S_1680) - if "Data.Maybe∷Maybe.Just" == v_S_1680[1] then - return "(Just " .. Data_Show_showArrayImpl(Data_Show_showIntImpl)(v_S_1680[2]) .. ")" + show = function(v_S_1683) + if "Data.Maybe∷Maybe.Just" == v_S_1683[1] then + return "(Just " .. Data_Show_showArrayImpl(Data_Show_showIntImpl)(v_S_1683[2]) .. ")" else return "Nothing" end end }, (function() - local v1_S_1766 = Data_String_CodePoints_uncons("aéЯ𝐀z") - if "Data.Maybe∷Maybe.Just" == v1_S_1766[1] then + local v1_S_1769 = Data_String_CodePoints_uncons("aéЯ𝐀z") + if "Data.Maybe∷Maybe.Just" == v1_S_1769[1] then return { "Data.Maybe∷Maybe.Just", - (Golden_StringCodePoints_Test_codes(v1_S_1766[2].tail)) + (Golden_StringCodePoints_Test_codes(v1_S_1769[2].tail)) } else return Data_Maybe_Nothing diff --git a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir index c15e903a..f1b93edc 100644 --- a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir +++ b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.ir @@ -272,24 +272,24 @@ UberModule ( PropName "tailRecM" ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "o$482" ) :| [] ) + ( ParamNamed Nothing ( Name "o$483" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse532", ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$482" ) ) ) + ( Nothing, Name "$cse533", ObjectProp Nothing + ( Ref Nothing ( Local ( Name "o$483" ) ) ) ( PropName "a" ) ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse531", ObjectProp Nothing - ( Ref Nothing ( Local ( Name "o$482" ) ) ) + ( Nothing, Name "$cse532", ObjectProp Nothing + ( Ref Nothing ( Local ( Name "o$483" ) ) ) ( PropName "b" ) ) :| [] ) ( IfThenElse Nothing ( PrimBinOp Nothing PrimLt - ( Ref Nothing ( Local ( Name "$cse531" ) ) ) + ( Ref Nothing ( Local ( Name "$cse532" ) ) ) ( Ref Nothing ( Local ( Name "n" ) ) ) ) ( AppN Nothing @@ -301,11 +301,11 @@ UberModule [ LiteralObject Nothing [ ( PropName "a", PrimBinOp Nothing PrimAdd + ( Ref Nothing ( Local ( Name "$cse533" ) ) ) ( Ref Nothing ( Local ( Name "$cse532" ) ) ) - ( Ref Nothing ( Local ( Name "$cse531" ) ) ) ), ( PropName "b", PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "$cse531" ) ) ) + ( Ref Nothing ( Local ( Name "$cse532" ) ) ) ( LiteralInt Nothing 1 ) ) ] @@ -318,7 +318,7 @@ UberModule ( ModuleName "Control.Monad.Rec.Class" ) ( TyName "Step" ) ( CtorName "Done" ) - [ Ref Nothing ( Local ( Name "$cse532" ) ) ] :| [] + [ Ref Nothing ( Local ( Name "$cse533" ) ) ] :| [] ) ) ) diff --git a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua index 7d6ca6dc..65612a7b 100644 --- a/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua +++ b/test/ps/output/Golden.TailRecM2Shadow.Test/golden.lua @@ -84,16 +84,16 @@ local Golden_TailRecM2Shadow_Test_sumFrom = function(dictMonadRec) local pure = ((dictMonadRec.Monad0()).Applicative0()).pure return function(b) return function(n) - return dictMonadRec.tailRecM(function(o_S_482) - local _S_cse532 = o_S_482.a - local _S_cse531 = o_S_482.b - if _S_cse531 < n then + return dictMonadRec.tailRecM(function(o_S_483) + local _S_cse533 = o_S_483.a + local _S_cse532 = o_S_483.b + if _S_cse532 < n then return pure({ "Control.Monad.Rec.Class∷Step.Loop", - { a = _S_cse532 + _S_cse531, b = _S_cse531 + 1 } + { a = _S_cse533 + _S_cse532, b = _S_cse532 + 1 } }) else - return pure({ "Control.Monad.Rec.Class∷Step.Done", _S_cse532 }) + return pure({ "Control.Monad.Rec.Class∷Step.Done", _S_cse533 }) end end)({ a = b, b = 0 }) end diff --git a/test/ps/output/Golden.UncurryCtor.Test/golden.ir b/test/ps/output/Golden.UncurryCtor.Test/golden.ir index fc0711b5..f153ed66 100644 --- a/test/ps/output/Golden.UncurryCtor.Test/golden.ir +++ b/test/ps/output/Golden.UncurryCtor.Test/golden.ir @@ -61,12 +61,12 @@ UberModule ( QName { qnameModuleName = ModuleName "Golden.UncurryCtor.Test", qnameName = Name "logShow" }, AbsN Nothing - ( ParamNamed Nothing ( Name "logShow$p2$325" ) :| [] ) + ( ParamNamed Nothing ( Name "logShow$p2$326" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Effect.Console" ) ( Name "logShow$w" ) ) ) ( Ref Nothing ( Imported ( ModuleName "Data.Show" ) ( Name "showInt" ) ) :| - [ Ref Nothing ( Local ( Name "logShow$p2$325" ) ) ] + [ Ref Nothing ( Local ( Name "logShow$p2$326" ) ) ] ) ) ), Standalone @@ -290,31 +290,31 @@ UberModule ( ParamNamed Nothing ( Name "v" ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse433", DataArgumentByIndex Nothing SumType 0 + ( Nothing, Name "$cse434", DataArgumentByIndex Nothing SumType 0 ( Ref Nothing ( Local ( Name "v" ) ) ) ) :| [] ) ( Let Nothing ( Standalone - ( Nothing, Name "$cse432", ReflectCtor Nothing + ( Nothing, Name "$cse433", ReflectCtor Nothing ( Ref Nothing ( Local ( Name "v" ) ) ) ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Golden.UncurryCtor.Test∷Shape.Origin" ) - ( Ref Nothing ( Local ( Name "$cse432" ) ) ) + ( Ref Nothing ( Local ( Name "$cse433" ) ) ) ) ( LiteralInt Nothing 0 ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Golden.UncurryCtor.Test∷Shape.Dot" ) - ( Ref Nothing ( Local ( Name "$cse432" ) ) ) + ( Ref Nothing ( Local ( Name "$cse433" ) ) ) ) - ( Ref Nothing ( Local ( Name "$cse433" ) ) ) + ( Ref Nothing ( Local ( Name "$cse434" ) ) ) ( PrimBinOp Nothing PrimAdd ( PrimBinOp Nothing PrimAdd - ( Ref Nothing ( Local ( Name "$cse433" ) ) ) + ( Ref Nothing ( Local ( Name "$cse434" ) ) ) ( DataArgumentByIndex Nothing SumType 1 ( Ref Nothing ( Local ( Name "v" ) ) ) ) ) ( DataArgumentByIndex Nothing SumType 2 ( Ref Nothing ( Local ( Name "v" ) ) ) ) @@ -336,14 +336,14 @@ UberModule ( Imported ( ModuleName "Golden.UncurryCtor.Test" ) ( Name "Tri" ) ) ), ( Name "Pair", AbsN Nothing - ( ParamNamed Nothing ( Name "Pair$p1$322" ) :| [] ) + ( ParamNamed Nothing ( Name "Pair$p1$323" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "Pair$p2$323" ) :| [] ) + ( ParamNamed Nothing ( Name "Pair$p2$324" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.UncurryCtor.Test" ) ( Name "Pair$w" ) ) ) ( Ref Nothing - ( Local ( Name "Pair$p1$322" ) ) :| - [ Ref Nothing ( Local ( Name "Pair$p2$323" ) ) ] + ( Local ( Name "Pair$p1$323" ) ) :| + [ Ref Nothing ( Local ( Name "Pair$p2$324" ) ) ] ) ) ) @@ -356,14 +356,14 @@ UberModule ( Imported ( ModuleName "Golden.UncurryCtor.Test" ) ( Name "Nil" ) ) ), ( Name "Cons", AbsN Nothing - ( ParamNamed Nothing ( Name "Cons$p1$320" ) :| [] ) + ( ParamNamed Nothing ( Name "Cons$p1$321" ) :| [] ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "Cons$p2$321" ) :| [] ) + ( ParamNamed Nothing ( Name "Cons$p2$322" ) :| [] ) ( AppN Nothing ( Ref Nothing ( Imported ( ModuleName "Golden.UncurryCtor.Test" ) ( Name "Cons$w" ) ) ) ( Ref Nothing - ( Local ( Name "Cons$p1$320" ) ) :| - [ Ref Nothing ( Local ( Name "Cons$p2$321" ) ) ] + ( Local ( Name "Cons$p1$321" ) ) :| + [ Ref Nothing ( Local ( Name "Cons$p2$322" ) ) ] ) ) ) @@ -563,17 +563,17 @@ UberModule ( Imported ( ModuleName "Data.Functor" ) ( Name "arrayMap" ) ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "v2$307" ) :| [] ) + ( ParamNamed Nothing ( Name "v2$308" ) :| [] ) ( IfThenElse Nothing ( Eq Nothing ( LiteralString Nothing "Data.Maybe∷Maybe.Nothing" ) ( ReflectCtor Nothing - ( Ref Nothing ( Local ( Name "v2$307" ) ) ) + ( Ref Nothing ( Local ( Name "v2$308" ) ) ) ) ) ( LiteralInt Nothing 0 ) ( DataArgumentByIndex Nothing SumType 0 - ( Ref Nothing ( Local ( Name "v2$307" ) ) ) + ( Ref Nothing ( Local ( Name "v2$308" ) ) ) ) ) :| [] ) @@ -584,12 +584,12 @@ UberModule ( Imported ( ModuleName "Data.Functor" ) ( Name "arrayMap" ) ) ) ( AbsN Nothing - ( ParamNamed Nothing ( Name "value0$308" ) :| [] ) + ( ParamNamed Nothing ( Name "value0$309" ) :| [] ) ( Ctor Nothing SumType ( ModuleName "Data.Maybe" ) ( TyName "Maybe" ) ( CtorName "Just" ) - [ Ref Nothing ( Local ( Name "value0$308" ) ) ] + [ Ref Nothing ( Local ( Name "value0$309" ) ) ] ) :| [] ) ) diff --git a/test/ps/output/Golden.UncurryCtor.Test/golden.lua b/test/ps/output/Golden.UncurryCtor.Test/golden.lua index ad17efb3..ca1c4b0d 100644 --- a/test/ps/output/Golden.UncurryCtor.Test/golden.lua +++ b/test/ps/output/Golden.UncurryCtor.Test/golden.lua @@ -28,8 +28,8 @@ local Data_Show_show = function(dict) return dict.show end local Effect_Console_logShow_S_w = function(dictShow, a) return Effect_Console_foreign.log(dictShow.show(a)) end -local Golden_UncurryCtor_Test_logShow = function(logShow_S_p2_S_325) - return Effect_Console_logShow_S_w(Data_Show_showInt, logShow_S_p2_S_325) +local Golden_UncurryCtor_Test_logShow = function(logShow_S_p2_S_326) + return Effect_Console_logShow_S_w(Data_Show_showInt, logShow_S_p2_S_326) end local Golden_UncurryCtor_Test_Origin = { "Golden.UncurryCtor.Test∷Shape.Origin" @@ -66,14 +66,14 @@ end local Golden_UncurryCtor_Test_range = Golden_UncurryCtor_Test_Cons_S_w(1, Golden_UncurryCtor_Test_Cons_S_w(2, Golden_UncurryCtor_Test_Cons_S_w(3, Golden_UncurryCtor_Test_Cons_S_w(4, Golden_UncurryCtor_Test_Cons_S_w(5, Golden_UncurryCtor_Test_Cons_S_w(6, Golden_UncurryCtor_Test_Cons_S_w(7, Golden_UncurryCtor_Test_Cons_S_w(8, Golden_UncurryCtor_Test_Cons_S_w(9, Golden_UncurryCtor_Test_Cons_S_w(10, Golden_UncurryCtor_Test_Nil)))))))))) local Golden_UncurryCtor_Test_pairSum = function(v) return v[1] + v[2] end local Golden_UncurryCtor_Test_area = function(v) - local _S_cse433 = v[2] - local _S_cse432 = v[1] - if "Golden.UncurryCtor.Test∷Shape.Origin" == _S_cse432 then + local _S_cse434 = v[2] + local _S_cse433 = v[1] + if "Golden.UncurryCtor.Test∷Shape.Origin" == _S_cse433 then return 0 - elseif "Golden.UncurryCtor.Test∷Shape.Dot" == _S_cse432 then - return _S_cse433 + elseif "Golden.UncurryCtor.Test∷Shape.Dot" == _S_cse433 then + return _S_cse434 else - return _S_cse433 + v[3] + v[4] + return _S_cse434 + v[3] + v[4] end end return (function() @@ -87,14 +87,14 @@ return (function() local _ = Golden_UncurryCtor_Test_logShow(Golden_UncurryCtor_Test_area(mk_S_0(30)))() local _ = Effect_Console_logShow_S_w({ show = Data_Show_foreign.showArrayImpl(Data_Show_show(Data_Show_showInt)) - }, Data_Functor_arrayMap(function(v2_S_307) - if "Data.Maybe∷Maybe.Nothing" == v2_S_307[1] then + }, Data_Functor_arrayMap(function(v2_S_308) + if "Data.Maybe∷Maybe.Nothing" == v2_S_308[1] then return 0 else - return v2_S_307[2] + return v2_S_308[2] end - end)(Data_Functor_arrayMap(function(value0_S_308) - return { "Data.Maybe∷Maybe.Just", value0_S_308 } + end)(Data_Functor_arrayMap(function(value0_S_309) + return { "Data.Maybe∷Maybe.Just", value0_S_309 } end)({ [1] = 1, [2] = 2, [3] = 3 })))() return Golden_UncurryCtor_Test_logShow(Golden_UncurryCtor_Test_total(Golden_UncurryCtor_Test_range))() end)()