From 19c589edc2c1dd77550e26d4f5cf78ec772da337 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 31 Oct 2017 22:26:13 -0400 Subject: - Migrated the format of analysis nodes from a custom data-type, to just Code nodes. --- new-luxc/source/luxc/synthesizer/loop.lux | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'new-luxc/source/luxc/synthesizer/loop.lux') diff --git a/new-luxc/source/luxc/synthesizer/loop.lux b/new-luxc/source/luxc/synthesizer/loop.lux index 8599db981..0070fcd5d 100644 --- a/new-luxc/source/luxc/synthesizer/loop.lux +++ b/new-luxc/source/luxc/synthesizer/loop.lux @@ -6,8 +6,8 @@ (coll [list "list/" Functor])) (meta [code] [syntax])) - (luxc (lang ["ls" synthesis]) - (synthesizer ["&&;" function]))) + (luxc (lang ["ls" synthesis] + [";L" variable #+ Variable Register]))) (def: #export (contains-self-reference? exprS) (-> ls;Synthesis Bool) @@ -19,7 +19,7 @@ (list;any? contains-self-reference? membersS) (^ [_ (#;Form (list [_ (#;Int var)]))]) - (&&function;self? var) + (variableL;self? var) (^ [_ (#;Form (list [_ (#;Text "lux case")] inputS pathS))]) (or (contains-self-reference? inputS) @@ -40,7 +40,7 @@ (list;any? (function [captured] (case captured (^ [_ (#;Form (list [_ (#;Int var)]))]) - (&&function;self? var) + (variableL;self? var) _ false)) @@ -109,8 +109,8 @@ ))) (def: #export (adjust env outer-offset exprS) - (-> (List ls;Variable) ls;Register ls;Synthesis ls;Synthesis) - (let [resolve-captured (: (-> ls;Variable ls;Variable) + (-> (List Variable) Register ls;Synthesis ls;Synthesis) + (let [resolve-captured (: (-> Variable Variable) (function [var] (let [idx (|> var (i.* -1) int-to-nat n.dec)] (|> env (list;nth idx) maybe;assume))))] @@ -161,7 +161,7 @@ (` ((~ (code;text procedure)) (~@ (list/map recur argsS)))) (^ [_ (#;Form (list [_ (#;Int var)]))]) - (if (&&function;captured? var) + (if (variableL;captured? var) (` ((~ (code;int (resolve-captured var))))) (` ((~ (code;int (|> outer-offset nat-to-int (i.+ var))))))) -- cgit v1.2.3