aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/synthesizer
diff options
context:
space:
mode:
authorEduardo Julian2017-10-11 18:57:44 -0400
committerEduardo Julian2017-10-11 18:57:44 -0400
commit74a835634fc9ee5457f3cc7109af069dad9f2d2f (patch)
treedec444467ecde32ac165627f782f315ac41567e8 /new-luxc/source/luxc/synthesizer
parentccabfc6a5e41650788199cb8fd5d87731f094bcd (diff)
- Migrated new-luxc to latest version of stdlib.
- Some refactoring.
Diffstat (limited to 'new-luxc/source/luxc/synthesizer')
-rw-r--r--new-luxc/source/luxc/synthesizer/loop.lux7
-rw-r--r--new-luxc/source/luxc/synthesizer/variable.lux4
2 files changed, 6 insertions, 5 deletions
diff --git a/new-luxc/source/luxc/synthesizer/loop.lux b/new-luxc/source/luxc/synthesizer/loop.lux
index 9f4d09a49..ad4504f41 100644
--- a/new-luxc/source/luxc/synthesizer/loop.lux
+++ b/new-luxc/source/luxc/synthesizer/loop.lux
@@ -1,7 +1,8 @@
(;module:
lux
- (lux (data (coll [list "L/" Functor<List>])
- text/format))
+ (lux (data [maybe]
+ text/format
+ (coll [list "L/" Functor<List>])))
(luxc (lang ["ls" synthesis])
(synthesizer ["&&;" function])))
@@ -105,7 +106,7 @@
(let [resolve-captured (: (-> ls;Variable ls;Variable)
(function [var]
(let [idx (|> var (i.* -1) int-to-nat n.dec)]
- (|> env (list;nth idx) assume))))]
+ (|> env (list;nth idx) maybe;assume))))]
(loop [exprS exprS]
(case exprS
(#ls;Variant tag last? valueS)
diff --git a/new-luxc/source/luxc/synthesizer/variable.lux b/new-luxc/source/luxc/synthesizer/variable.lux
index 3a48cb3f2..01ad101fa 100644
--- a/new-luxc/source/luxc/synthesizer/variable.lux
+++ b/new-luxc/source/luxc/synthesizer/variable.lux
@@ -16,7 +16,7 @@
(list (nat-to-int register))
(^or (#ls;SeqP pre post) (#ls;AltP pre post))
- (L/append (bound-vars pre) (bound-vars post))
+ (L/compose (bound-vars pre) (bound-vars post))
_
(list)))
@@ -31,7 +31,7 @@
(path-bodies post)
(#ls;AltP pre post)
- (L/append (path-bodies pre) (path-bodies post))
+ (L/compose (path-bodies pre) (path-bodies post))
_
(list)))