From a72e34d30eaf3557f9b76ced9605a95759ce8eca Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 24 Feb 2019 12:26:17 -0400 Subject: Got new-luxc to compile/build again. --- new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux') 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 Monoid)]]] - [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 + (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 + (do phase.monad [@begin _.make-label initsI+ (monad.map @ translate initsS+) iterationI (translation.with-anchor [@begin start] -- cgit v1.2.3