aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/synthesizer
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/synthesizer/case.lux24
-rw-r--r--new-luxc/source/luxc/synthesizer/function.lux18
2 files changed, 21 insertions, 21 deletions
diff --git a/new-luxc/source/luxc/synthesizer/case.lux b/new-luxc/source/luxc/synthesizer/case.lux
index 8221b4f8d..02b1bfba5 100644
--- a/new-luxc/source/luxc/synthesizer/case.lux
+++ b/new-luxc/source/luxc/synthesizer/case.lux
@@ -49,17 +49,17 @@
(#ls;VariantP (if last? (#;Right tag) (#;Left tag))
(path memberP)))))
-(def: #export (weave nextP prevP)
+(def: #export (weave leftP rightP)
(-> ls;Path ls;Path ls;Path)
- (with-expansions [<default> (as-is (#ls;AltP prevP nextP))]
- (case [nextP prevP]
+ (with-expansions [<default> (as-is (#ls;AltP leftP rightP))]
+ (case [leftP rightP]
[#ls;UnitP #ls;UnitP]
#ls;UnitP
(^template [<tag> <test>]
- [(<tag> next) (<tag> prev)]
- (if (<test> next prev)
- prevP
+ [(<tag> left) (<tag> right)]
+ (if (<test> left right)
+ leftP
<default>))
([#ls;BindP n.=]
[#ls;BoolP B/=]
@@ -70,22 +70,22 @@
[#ls;TextP T/=])
(^template [<tag> <side>]
- [(<tag> (<side> next-idx) next-then) (<tag> (<side> prev-idx) prev-then)]
- (if (n.= next-idx prev-idx)
- (weave next-then prev-then)
+ [(<tag> (<side> left-idx) left-then) (<tag> (<side> right-idx) right-then)]
+ (if (n.= left-idx right-idx)
+ (weave left-then right-then)
<default>))
([#ls;TupleP #;Left]
[#ls;TupleP #;Right]
[#ls;VariantP #;Left]
[#ls;VariantP #;Right])
- [(#ls;SeqP next-pre next-post) (#ls;SeqP prev-pre prev-post)]
- (case (weave next-pre prev-pre)
+ [(#ls;SeqP left-pre left-post) (#ls;SeqP right-pre right-post)]
+ (case (weave left-pre right-pre)
(#ls;AltP _ _)
<default>
weavedP
- (#ls;SeqP weavedP (weave next-post prev-post)))
+ (#ls;SeqP weavedP (weave left-post right-post)))
_
<default>)))
diff --git a/new-luxc/source/luxc/synthesizer/function.lux b/new-luxc/source/luxc/synthesizer/function.lux
index e8b2a7ec4..4d9970a3f 100644
--- a/new-luxc/source/luxc/synthesizer/function.lux
+++ b/new-luxc/source/luxc/synthesizer/function.lux
@@ -1,6 +1,6 @@
(;module:
lux
- (lux (data (coll [list "L/" Functor<List> Fold<List>])))
+ (lux (data (coll [list "list/" Functor<List>])))
(luxc (lang ["la" analysis]
["ls" synthesis])))
@@ -8,14 +8,14 @@
(-> Scope (List ls;Variable))
(|> scope
(get@ [#;captured #;mappings])
- (L/map (function [[_ _ ref]]
- (case ref
- (#;Local idx)
- (nat-to-int idx)
-
- (#;Captured idx)
- (|> idx n.inc nat-to-int (i.* -1))
- )))))
+ (list/map (function [[_ _ ref]]
+ (case ref
+ (#;Local idx)
+ (nat-to-int idx)
+
+ (#;Captured idx)
+ (|> idx n.inc nat-to-int (i.* -1))
+ )))))
(do-template [<name> <comp>]
[(def: #export (<name> var)