From ec1f31b5a1492d5e0ab260397291d4449483bbd9 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 23 Aug 2021 02:30:53 -0400 Subject: The Python compiler can now be compiled by the new JVM compiler. --- lux-jvm/source/luxc/lang/translation/jvm/case.lux | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'lux-jvm/source/luxc/lang/translation/jvm/case.lux') diff --git a/lux-jvm/source/luxc/lang/translation/jvm/case.lux b/lux-jvm/source/luxc/lang/translation/jvm/case.lux index 3a6291036..eb1f37f0b 100644 --- a/lux-jvm/source/luxc/lang/translation/jvm/case.lux +++ b/lux-jvm/source/luxc/lang/translation/jvm/case.lux @@ -8,7 +8,7 @@ ["ex" exception (#+ exception:)]] [data [collection - ["." list ("#@." fold)]]] + ["." list ("#@." mix)]]] [math [number ["n" nat]]] @@ -132,21 +132,21 @@ [( cons) (do {@ phase.monad} [forkG (: (Operation Inst) - (monad.fold @ (function (_ [test thenP] elseG) - (do @ - [thenG (path' stack_depth @else @end phase archive thenP)] - (in (<| _.with_label (function (_ @else)) - (|>> - ( test) - - ( @else) - - thenG - (_.label @else) - elseG))))) - (|>> - (_.GOTO @else)) - (#.Item cons)))] + (monad.mix @ (function (_ [test thenP] elseG) + (do @ + [thenG (path' stack_depth @else @end phase archive thenP)] + (in (<| _.with_label (function (_ @else)) + (|>> + ( test) + + ( @else) + + thenG + (_.label @else) + elseG))))) + (|>> + (_.GOTO @else)) + (#.Item cons)))] (in (|>> peekI forkG)))]) @@ -266,16 +266,16 @@ (Generator [(List synthesis.Member) Synthesis]) (do phase.monad [recordG (phase archive recordS)] - (in (list@fold (function (_ step so_far) - (.let [next (.case step - (#.Left lefts) - (..left_projection lefts) - - (#.Right lefts) - (..right_projection lefts))] - (|>> so_far next))) - recordG - (list.reversed path))))) + (in (list@mix (function (_ step so_far) + (.let [next (.case step + (#.Left lefts) + (..left_projection lefts) + + (#.Right lefts) + (..right_projection lefts))] + (|>> so_far next))) + recordG + (list.reversed path))))) (def: .public (case phase archive [valueS path]) (Generator [Synthesis Path]) -- cgit v1.2.3