diff options
Diffstat (limited to 'stdlib/source/lux/tool/compiler/phase/synthesis/case.lux')
-rw-r--r-- | stdlib/source/lux/tool/compiler/phase/synthesis/case.lux | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux index 94a2637fe..52d7b09a7 100644 --- a/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux +++ b/stdlib/source/lux/tool/compiler/phase/synthesis/case.lux @@ -14,9 +14,9 @@ [collection ["." list ("#/." fold monoid)]]]] ["." /// ("#/." monad) - [// - ["." reference] - ["." analysis (#+ Pattern Match Analysis)] + ["#/" // + ["#." reference] + ["#." analysis (#+ Pattern Match Analysis)] ["/" synthesis (#+ Path Synthesis Operation Phase)]]]) (def: clean-up @@ -26,28 +26,28 @@ (def: (path' pattern end? thenC) (-> Pattern Bit (Operation Path) (Operation Path)) (case pattern - (#analysis.Simple simple) + (#////analysis.Simple simple) (case simple - #analysis.Unit + #////analysis.Unit thenC (^template [<from> <to>] (<from> value) (////map (|>> (#/.Seq (#/.Test (|> value <to>)))) thenC)) - ([#analysis.Bit #/.Bit] - [#analysis.Nat (<| #/.I64 .i64)] - [#analysis.Int (<| #/.I64 .i64)] - [#analysis.Rev (<| #/.I64 .i64)] - [#analysis.Frac #/.F64] - [#analysis.Text #/.Text])) - - (#analysis.Bind register) + ([#////analysis.Bit #/.Bit] + [#////analysis.Nat (<| #/.I64 .i64)] + [#////analysis.Int (<| #/.I64 .i64)] + [#////analysis.Rev (<| #/.I64 .i64)] + [#////analysis.Frac #/.F64] + [#////analysis.Text #/.Text])) + + (#////analysis.Bind register) (<| (:: ///.monad map (|>> (#/.Seq (#/.Bind register)))) /.with-new-local thenC) - (#analysis.Complex (#analysis.Variant [lefts right? value-pattern])) + (#////analysis.Complex (#////analysis.Variant [lefts right? value-pattern])) (<| (////map (|>> (#/.Seq (#/.Access (#/.Side (if right? (#.Right lefts) (#.Left lefts))))))) @@ -55,7 +55,7 @@ (when> [(new> (not end?) [])] [(////map ..clean-up)]) thenC) - (#analysis.Complex (#analysis.Tuple tuple)) + (#////analysis.Complex (#////analysis.Tuple tuple)) (let [tuple::last (dec (list.size tuple))] (list/fold (function (_ [tuple::lefts tuple::member] nextC) (let [right? (n/= tuple::last tuple::lefts) @@ -125,12 +125,12 @@ (do ///.monad [inputS (synthesize^ inputA)] (with-expansions [<unnecesary-let> - (as-is (^multi (^ (#analysis.Reference (reference.local outputR))) + (as-is (^multi (^ (#////analysis.Reference (////reference.local outputR))) (n/= inputR outputR)) (wrap inputS)) <let> - (as-is [[(#analysis.Bind inputR) headB/bodyA] + (as-is [[(#////analysis.Bind inputR) headB/bodyA] #.Nil] (case headB/bodyA <unnecesary-let> @@ -142,10 +142,10 @@ (wrap (/.branch/let [inputS inputR headB/bodyS]))))) <if> - (as-is (^or (^ [[(analysis.pattern/bit #1) thenA] - (list [(analysis.pattern/bit #0) elseA])]) - (^ [[(analysis.pattern/bit #0) elseA] - (list [(analysis.pattern/bit #1) thenA])])) + (as-is (^or (^ [[(////analysis.pattern/bit #1) thenA] + (list [(////analysis.pattern/bit #0) elseA])]) + (^ [[(////analysis.pattern/bit #0) elseA] + (list [(////analysis.pattern/bit #1) thenA])])) (do @ [thenS (synthesize^ thenA) elseS (synthesize^ elseA)] |