diff options
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux index ac356aebb..20be62066 100644 --- a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux @@ -1,21 +1,22 @@ (.module: [lux #* [control - [monad (#+ do)]] + ["." monad (#+ do)]] [data ["." text format] [collection - [list ("list/" Functor<List> Monoid<List>)]]] - [language - [reference (#+ Register)] - ["." compiler - ["." synthesis (#+ Synthesis)] - ["." translation]]]] + ["." list ("list/." Functor<List> Monoid<List>)]]] + [compiler + [default + [reference (#+ Register)] + ["." phase + ["." synthesis (#+ Synthesis)] + ["." translation]]]]] [luxc [lang [host - [jvm (#+ Inst Operation Compiler) + [jvm (#+ Inst Operation Phase) ["_" inst]]]]] ["." //]) @@ -29,8 +30,8 @@ #0)) (def: #export (recur translate argsS) - (-> Compiler (List Synthesis) (Operation Inst)) - (do compiler.Monad<Operation> + (-> Phase (List Synthesis) (Operation Inst)) + (do phase.Monad<Operation> [[@begin start] translation.anchor #let [end (|> argsS list.size dec (n/+ start)) pairs (list.zip2 (list.n/range start end) @@ -60,8 +61,8 @@ (_.GOTO @begin))))) (def: #export (scope translate [start initsS+ iterationS]) - (-> Compiler [Nat (List Synthesis) Synthesis] (Operation Inst)) - (do compiler.Monad<Operation> + (-> Phase [Nat (List Synthesis) Synthesis] (Operation Inst)) + (do phase.Monad<Operation> [@begin _.make-label initsI+ (monad.map @ translate initsS+) iterationI (translation.with-anchor [@begin start] |