diff options
author | Eduardo Julian | 2018-06-17 00:27:21 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-06-17 00:27:21 -0400 |
commit | b6ccfc87c52e1a98ead3b04b45bccc119418a4dc (patch) | |
tree | db13d4605a0a3041de6ef2ef5ddc92b766f1a7f3 /new-luxc/source/luxc/lang/translation/scheme/loop.jvm.lux | |
parent | bcd3d9ee8f6797f758a2abea98d5cb6a74cc7df0 (diff) |
- Migrated Scheme back-end to stdlib.
Diffstat (limited to '')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/scheme/loop.jvm.lux | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/new-luxc/source/luxc/lang/translation/scheme/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/scheme/loop.jvm.lux deleted file mode 100644 index c64973d8f..000000000 --- a/new-luxc/source/luxc/lang/translation/scheme/loop.jvm.lux +++ /dev/null @@ -1,37 +0,0 @@ -(.module: - lux - (lux (control [monad #+ do]) - (data [text] - text/format - (coll [list "list/" Functor<List>])) - [macro]) - (luxc [lang] - (lang ["ls" synthesis] - (host [r #+ Expression @@]))) - [//] - (// [".T" reference])) - -(def: #export (translate-loop translate offset initsS+ bodyS) - (-> (-> ls.Synthesis (Meta Expression)) Nat (List ls.Synthesis) ls.Synthesis - (Meta Expression)) - (do macro.Monad<Meta> - [loop-name (|> (macro.gensym "loop") - (:: @ map (|>> %code lang.normalize-name))) - initsO+ (monad.map @ translate initsS+) - bodyO (//.with-anchor [loop-name offset] - (translate bodyS)) - #let [$loop-name (r.var loop-name) - @loop-name (@@ $loop-name)] - _ (//.save (r.set! $loop-name - (r.function (|> (list.n/range +0 (dec (list.size initsS+))) - (list/map (|>> (n/+ offset) referenceT.variable))) - bodyO)))] - (wrap (r.apply initsO+ @loop-name)))) - -(def: #export (translate-recur translate argsS+) - (-> (-> ls.Synthesis (Meta Expression)) (List ls.Synthesis) - (Meta Expression)) - (do macro.Monad<Meta> - [[loop-name offset] //.anchor - argsO+ (monad.map @ translate argsS+)] - (wrap (r.apply argsO+ (r.global loop-name))))) |