aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/synthesis
diff options
context:
space:
mode:
authorEduardo Julian2018-04-06 08:32:41 -0400
committerEduardo Julian2018-04-06 08:32:41 -0400
commitca238f9c89d3156842b0a3d5fe24a5d69b2eedb0 (patch)
tree50ba106541f2357daf27393df28e8b263f7311e1 /new-luxc/source/luxc/lang/synthesis
parent84d7e87817cd2c074653b34d028c8fa807febc7f (diff)
- Adapted new-luxc's code to latest stdlib changes.
Diffstat (limited to 'new-luxc/source/luxc/lang/synthesis')
-rw-r--r--new-luxc/source/luxc/lang/synthesis/case.lux6
-rw-r--r--new-luxc/source/luxc/lang/synthesis/expression.lux6
-rw-r--r--new-luxc/source/luxc/lang/synthesis/loop.lux6
3 files changed, 9 insertions, 9 deletions
diff --git a/new-luxc/source/luxc/lang/synthesis/case.lux b/new-luxc/source/luxc/lang/synthesis/case.lux
index 3e57de337..968c35561 100644
--- a/new-luxc/source/luxc/lang/synthesis/case.lux
+++ b/new-luxc/source/luxc/lang/synthesis/case.lux
@@ -28,7 +28,7 @@
(#.Cons _)
(let [last-idx (n/dec (list.size membersP))
[_ output] (list/fold (: (-> la.Pattern [Nat [Nat (List ls.Path)]] [Nat [Nat (List ls.Path)]])
- (function [current-pattern [current-idx num-locals' next]]
+ (function (_ current-pattern [current-idx num-locals' next])
(let [[num-locals'' current-path] (path' arity num-locals' current-pattern)]
[(n/dec current-idx)
num-locals''
@@ -64,7 +64,7 @@
(-> (List ls.Path) (List ls.Path))
(case paths
(#.Cons path paths')
- (if (is popPS path)
+ (if (is? popPS path)
(clean-unnecessary-pops paths')
paths)
@@ -76,7 +76,7 @@
(let [[num-locals' pieces] (path' arity num-locals pattern)]
(|> pieces
clean-unnecessary-pops
- (list/fold (function [pre post]
+ (list/fold (function (_ pre post)
(` ("lux case seq" (~ pre) (~ post))))
(` ("lux case exec" (~ (synthesize num-locals' bodyA))))))))
diff --git a/new-luxc/source/luxc/lang/synthesis/expression.lux b/new-luxc/source/luxc/lang/synthesis/expression.lux
index b17af14d2..c05f1daf9 100644
--- a/new-luxc/source/luxc/lang/synthesis/expression.lux
+++ b/new-luxc/source/luxc/lang/synthesis/expression.lux
@@ -149,7 +149,7 @@
(let [function-arity (if direct?
(n/inc arity)
+1)
- env (list/map (function [closure]
+ env (list/map (function (_ closure)
(case (dict.get closure resolver)
(#.Some resolved)
(if (and (variableL.local? resolved)
@@ -170,11 +170,11 @@
_ (|> (list.size raw-env) n/dec (list.n/range +0) (list/map variableL.captured))))
resolver' (if (and (functionS.nested? function-arity)
direct?)
- (list/fold (function [[from to] resolver']
+ (list/fold (function (_ [from to] resolver')
(dict.put from to resolver'))
init-resolver
(list.zip2 env-vars env))
- (list/fold (function [var resolver']
+ (list/fold (function (_ var resolver')
(dict.put var var resolver'))
init-resolver
env-vars))]
diff --git a/new-luxc/source/luxc/lang/synthesis/loop.lux b/new-luxc/source/luxc/lang/synthesis/loop.lux
index 762032a59..c00d5626b 100644
--- a/new-luxc/source/luxc/lang/synthesis/loop.lux
+++ b/new-luxc/source/luxc/lang/synthesis/loop.lux
@@ -37,7 +37,7 @@
false)))
(^ [_ (#.Form (list [_ (#.Text "lux function")] arity [_ (#.Tuple environment)] bodyS))])
- (list.any? (function [captured]
+ (list.any? (function (_ captured)
(case captured
(^ [_ (#.Form (list [_ (#.Int var)]))])
(variableL.self? var)
@@ -111,7 +111,7 @@
(def: #export (adjust env offset exprS)
(-> (List Variable) Register ls.Synthesis ls.Synthesis)
(let [resolve-captured (: (-> Variable Variable)
- (function [var]
+ (function (_ var)
(let [idx (|> var (i/* -1) int-to-nat n/dec)]
(|> env (list.nth idx) maybe.assume))))]
(loop [exprS exprS]
@@ -144,7 +144,7 @@
(^code ("lux function" (~ arity) [(~+ environment)] (~ bodyS)))
(` ("lux function" (~ arity)
- [(~+ (list/map (function [_var]
+ [(~+ (list/map (function (_ _var)
(case _var
(^ [_ (#.Form (list [_ (#.Int var)]))])
(` ((~ (code.int (resolve-captured var)))))