aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-02-24 12:26:17 -0400
committerEduardo Julian2019-02-24 12:26:17 -0400
commita72e34d30eaf3557f9b76ced9605a95759ce8eca (patch)
tree5fd88f66ac3b2b0abb5561521f806afb93c5134e /new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
parent950ac7c3311ad8ff4499164a30610fca2e57d5c9 (diff)
Got new-luxc to compile/build again.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux13
1 files changed, 7 insertions, 6 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 40f4decd9..5e01a4ea0 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
@@ -1,13 +1,14 @@
(.module:
[lux #*
+ ["." function]
[control
["." monad (#+ do)]]
[data
["." text
format]
[collection
- ["." list ("list/." Functor<List> Monoid<List>)]]]
- [platform
+ ["." list ("#/." functor monoid)]]]
+ [tool
[compiler
[reference (#+ Register)]
["." phase
@@ -31,7 +32,7 @@
(def: #export (recur translate argsS)
(-> Phase (List Synthesis) (Operation Inst))
- (do phase.Monad<Operation>
+ (do phase.monad
[[@begin start] translation.anchor
#let [end (|> argsS list.size dec (n/+ start))
pairs (list.zip2 (list.n/range start end)
@@ -47,13 +48,13 @@
valuesI+ (monad.map @ (function (_ [register argS])
(: (Operation Inst)
(if (constant? register argS)
- (wrap id)
+ (wrap function.identity)
(translate argS))))
pairs)
#let [storesI+ (list/map (function (_ [register argS])
(: Inst
(if (constant? register argS)
- id
+ function.identity
(_.ASTORE register))))
(list.reverse pairs))]]
(wrap (|>> (_.fuse valuesI+)
@@ -62,7 +63,7 @@
(def: #export (scope translate [start initsS+ iterationS])
(-> Phase [Nat (List Synthesis) Synthesis] (Operation Inst))
- (do phase.Monad<Operation>
+ (do phase.monad
[@begin _.make-label
initsI+ (monad.map @ translate initsS+)
iterationI (translation.with-anchor [@begin start]