diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js/loop.jvm.lux')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/js/loop.jvm.lux | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/js/loop.jvm.lux index 9315508e8..657982556 100644 --- a/new-luxc/source/luxc/lang/translation/js/loop.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/js/loop.jvm.lux @@ -6,13 +6,14 @@ (coll [list "list/" Functor<List>])) [macro]) (luxc [lang] - (lang ["ls" synthesis])) + (lang ["ls" synthesis] + (host [js #+ JS Expression Statement]))) [//] (// [".T" reference])) (def: #export (translate-loop translate offset initsS+ bodyS) - (-> (-> ls.Synthesis (Meta //.Expression)) Nat (List ls.Synthesis) ls.Synthesis - (Meta //.Expression)) + (-> (-> ls.Synthesis (Meta Expression)) Nat (List ls.Synthesis) ls.Synthesis + (Meta Expression)) (do macro.Monad<Meta> [loop-name (:: @ map (|>> %code lang.normalize-name) (macro.gensym "loop")) @@ -26,8 +27,8 @@ "})(" (text.join-with "," initsJS+) ")")))) (def: #export (translate-recur translate argsS+) - (-> (-> ls.Synthesis (Meta //.Expression)) (List ls.Synthesis) - (Meta //.Expression)) + (-> (-> ls.Synthesis (Meta Expression)) (List ls.Synthesis) + (Meta Expression)) (do macro.Monad<Meta> [[loop-name offset] //.anchor argsJS+ (monad.map @ translate argsS+)] |