diff options
Diffstat (limited to '')
29 files changed, 60 insertions, 74 deletions
diff --git a/new-luxc/source/luxc/eval.lux b/new-luxc/source/luxc/eval.lux index fdbf8e781..baac56c64 100644 --- a/new-luxc/source/luxc/eval.lux +++ b/new-luxc/source/luxc/eval.lux @@ -2,10 +2,10 @@ lux (lux (control [monad #+ do]) [meta]) - (luxc (lang (analysis [";A" expression]))) + (luxc (lang (analysis [";A" expression]) + (synthesis [";S" expression]))) [../base] - (.. [synthesizer] - (generator [";G" expression] + (.. (generator [";G" expression] [eval]))) (def: #export (eval type exprC) @@ -13,6 +13,6 @@ (do meta;Monad<Meta> [exprA (../base;with-expected-type type (expressionA;analyser eval exprC)) - #let [exprS (synthesizer;synthesize exprA)] + #let [exprS (expressionS;synthesize exprA)] exprI (expressionG;generate exprS)] (eval;eval exprI))) diff --git a/new-luxc/source/luxc/generator.lux b/new-luxc/source/luxc/generator.lux index e4d4317fe..e9b6c4d3f 100644 --- a/new-luxc/source/luxc/generator.lux +++ b/new-luxc/source/luxc/generator.lux @@ -14,11 +14,11 @@ [";L" host] ["&;" io] ["&;" module] - ["&;" synthesizer] ["&;" eval] (lang ["&;" syntax] (analysis [";A" expression] - [";A" common])) + [";A" common]) + (synthesis [";S" expression])) (generator ["&&;" runtime] ["&&;" statement] ["&&;" common] @@ -41,7 +41,7 @@ [[_ metaA] (&;with-scope (&;with-expected-type Code (analyse metaC))) - metaI (expressionG;generate (&synthesizer;synthesize metaA)) + metaI (expressionG;generate (expressionS;synthesize metaA)) metaV (&&eval;eval metaI) [_ valueT valueA] (&;with-scope (if (meta;type? (:! Code metaV)) @@ -51,7 +51,7 @@ (wrap [Type valueA]))) (commonA;with-unknown-type (analyse valueC)))) - valueI (expressionG;generate (&synthesizer;synthesize valueA)) + valueI (expressionG;generate (expressionS;synthesize valueA)) _ (&;with-scope (&&statement;generate-def def-name valueT valueI metaI (:! Code metaV)))] (wrap [])) @@ -63,7 +63,7 @@ [[_ programA] (&;with-scope (&;with-expected-type (type (io;IO Unit)) (analyse programC))) - programI (expressionG;generate (&synthesizer;synthesize programA))] + programI (expressionG;generate (expressionS;synthesize programA))] (&&statement;generate-program program-args programI)) _ diff --git a/new-luxc/source/luxc/generator/eval.jvm.lux b/new-luxc/source/luxc/generator/eval.jvm.lux index 86bede8cd..2f0ce1c24 100644 --- a/new-luxc/source/luxc/generator/eval.jvm.lux +++ b/new-luxc/source/luxc/generator/eval.jvm.lux @@ -12,7 +12,6 @@ ["$i" inst])) (lang ["la" analysis] ["ls" synthesis]) - ["&;" synthesizer] (generator ["&;" common]) )) diff --git a/new-luxc/source/luxc/generator/expression.jvm.lux b/new-luxc/source/luxc/generator/expression.jvm.lux index e0f95b48b..798998510 100644 --- a/new-luxc/source/luxc/generator/expression.jvm.lux +++ b/new-luxc/source/luxc/generator/expression.jvm.lux @@ -11,7 +11,6 @@ (host ["$" jvm]) (lang ["ls" synthesis] [";L" variable #+ Variable Register]) - ["&;" synthesizer] (generator ["&;" common] ["&;" primitive] ["&;" structure] diff --git a/new-luxc/source/luxc/generator/function.jvm.lux b/new-luxc/source/luxc/generator/function.jvm.lux index 70b892d41..310f4d7a0 100644 --- a/new-luxc/source/luxc/generator/function.jvm.lux +++ b/new-luxc/source/luxc/generator/function.jvm.lux @@ -13,7 +13,6 @@ (lang ["la" analysis] ["ls" synthesis] [";L" variable #+ Variable]) - ["&;" synthesizer] (generator ["&;" common] ["&;" runtime]))) diff --git a/new-luxc/source/luxc/generator/primitive.jvm.lux b/new-luxc/source/luxc/generator/primitive.jvm.lux index f772383d1..637f46a85 100644 --- a/new-luxc/source/luxc/generator/primitive.jvm.lux +++ b/new-luxc/source/luxc/generator/primitive.jvm.lux @@ -10,7 +10,6 @@ ["$t" type])) (lang ["la" analysis] ["ls" synthesis]) - ["&;" synthesizer] (generator ["&;" common])) [../runtime]) diff --git a/new-luxc/source/luxc/generator/procedure/common.jvm.lux b/new-luxc/source/luxc/generator/procedure/common.jvm.lux index a8fa81f81..dffbcb64e 100644 --- a/new-luxc/source/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/generator/procedure/common.jvm.lux @@ -17,7 +17,6 @@ ["$i" inst])) (lang ["la" analysis] ["ls" synthesis]) - ["&;" synthesizer] (generator ["&;" common] ["&;" runtime]))) diff --git a/new-luxc/source/luxc/generator/procedure/host.jvm.lux b/new-luxc/source/luxc/generator/procedure/host.jvm.lux index 97c8fb87e..9222b2e4a 100644 --- a/new-luxc/source/luxc/generator/procedure/host.jvm.lux +++ b/new-luxc/source/luxc/generator/procedure/host.jvm.lux @@ -23,7 +23,6 @@ (lang ["la" analysis] (analysis (procedure ["&;" host])) ["ls" synthesis]) - ["&;" synthesizer] (generator ["&;" common] ["&;" runtime])) ["@" ../common]) diff --git a/new-luxc/source/luxc/generator/runtime.jvm.lux b/new-luxc/source/luxc/generator/runtime.jvm.lux index fd8fbf74a..4b57e802e 100644 --- a/new-luxc/source/luxc/generator/runtime.jvm.lux +++ b/new-luxc/source/luxc/generator/runtime.jvm.lux @@ -14,7 +14,6 @@ ["$i" inst])) (lang ["la" analysis] ["ls" synthesis]) - ["&;" synthesizer] (generator ["&;" common]))) (host;import java.lang.Object) diff --git a/new-luxc/source/luxc/generator/structure.jvm.lux b/new-luxc/source/luxc/generator/structure.jvm.lux index b9dced077..96d5767c6 100644 --- a/new-luxc/source/luxc/generator/structure.jvm.lux +++ b/new-luxc/source/luxc/generator/structure.jvm.lux @@ -13,7 +13,6 @@ ["$i" inst])) (lang ["la" analysis] ["ls" synthesis]) - ["&;" synthesizer] (generator ["&;" common])) [../runtime]) diff --git a/new-luxc/source/luxc/synthesizer/case.lux b/new-luxc/source/luxc/lang/synthesis/case.lux index 15cb6eca3..15cb6eca3 100644 --- a/new-luxc/source/luxc/synthesizer/case.lux +++ b/new-luxc/source/luxc/lang/synthesis/case.lux diff --git a/new-luxc/source/luxc/synthesizer.lux b/new-luxc/source/luxc/lang/synthesis/expression.lux index c43958890..05b99923b 100644 --- a/new-luxc/source/luxc/synthesizer.lux +++ b/new-luxc/source/luxc/lang/synthesis/expression.lux @@ -13,10 +13,10 @@ (luxc ["&" base] (lang ["la" analysis] ["ls" synthesis] + (synthesis [";S" case] + [";S" function] + [";S" loop]) [";L" variable #+ Variable]) - (synthesizer ["&&;" case] - ["&&;" function] - ["&&;" loop]) )) (def: init-env (List Variable) (list)) @@ -24,9 +24,9 @@ (def: (prepare-body inner-arity arity body) (-> Nat Nat ls;Synthesis ls;Synthesis) - (if (&&function;nested? inner-arity) + (if (functionS;nested? inner-arity) body - (&&loop;reify-recursion arity body))) + (loopS;reify-recursion arity body))) (def: (let$ register inputS bodyS) (-> Nat ls;Synthesis ls;Synthesis ls;Synthesis) @@ -84,10 +84,10 @@ (function [pattern expr] (|> (synthesize expr) (~) ("lux case exec") - ("lux case seq" (~ (&&case;path pattern))) + ("lux case seq" (~ (caseS;path pattern))) (`))))] (` ("lux case" (~ inputS) - (~ (list/fold &&case;weave + (~ (list/fold caseS;weave (transform-branch lastP lastA) (list/map (product;uncurry transform-branch) prevsPA)))))) @@ -97,19 +97,19 @@ (def: (synthesize-apply synthesize outer-arity num-locals exprA) (-> (-> la;Analysis ls;Synthesis) ls;Arity Nat la;Analysis ls;Synthesis) - (let [[funcA argsA] (&&function;unfold-apply exprA) + (let [[funcA argsA] (functionS;unfold-apply exprA) funcS (synthesize funcA) argsS (list/map synthesize argsA)] (case funcS (^multi (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat _arity)] [_ (#;Tuple _env)] _bodyS))]) (and (n.= _arity (list;size argsS)) - (not (&&loop;contains-self-reference? _bodyS))) + (not (loopS;contains-self-reference? _bodyS))) [(s;run _env (p;some s;int)) (#e;Success _env)]) - (let [register-offset (if (&&function;top? outer-arity) + (let [register-offset (if (functionS;top? outer-arity) num-locals (|> outer-arity n.inc (n.+ num-locals)))] (` ("lux loop" (~ (code;nat register-offset)) [(~@ argsS)] - (~ (&&loop;adjust _env register-offset _bodyS))))) + (~ (loopS;adjust _env register-offset _bodyS))))) (^ [_ (#;Form (list& [_ (#;Text "lux call")] funcS' argsS'))]) (call$ funcS' (list/compose argsS' argsS)) @@ -135,11 +135,11 @@ (^code ((~ [_ (#;Int var)]))) (if (variableL;local? var) (let [register (variableL;local-register var)] - (if (&&function;nested? outer-arity) + (if (functionS;nested? outer-arity) (if (n.= +0 register) (call$ (var$ 0) (|> (list;n.range +1 (n.dec outer-arity)) (list/map (|>. variableL;local code;int (~) () (`))))) - (var$ (&&function;adjust-var outer-arity (variableL;local register)))) + (var$ (functionS;adjust-var outer-arity (variableL;local register)))) (var$ (variableL;local register)))) (let [register (variableL;captured-register var)] (var$ (let [var (variableL;captured register)] @@ -157,7 +157,7 @@ (case env-size +0 (list) _ (list/map variableL;captured (list;n.range +0 (n.dec env-size)))))) - resolver' (if (&&function;nested? inner-arity) + resolver' (if (functionS;nested? inner-arity) (list/fold (function [[from to] resolver'] (dict;put from to resolver')) init-resolver diff --git a/new-luxc/source/luxc/synthesizer/function.lux b/new-luxc/source/luxc/lang/synthesis/function.lux index 52aee9a49..52aee9a49 100644 --- a/new-luxc/source/luxc/synthesizer/function.lux +++ b/new-luxc/source/luxc/lang/synthesis/function.lux diff --git a/new-luxc/source/luxc/synthesizer/loop.lux b/new-luxc/source/luxc/lang/synthesis/loop.lux index 0070fcd5d..0070fcd5d 100644 --- a/new-luxc/source/luxc/synthesizer/loop.lux +++ b/new-luxc/source/luxc/lang/synthesis/loop.lux diff --git a/new-luxc/source/luxc/synthesizer/variable.lux b/new-luxc/source/luxc/lang/synthesis/variable.lux index 3ce9f2678..3ce9f2678 100644 --- a/new-luxc/source/luxc/synthesizer/variable.lux +++ b/new-luxc/source/luxc/lang/synthesis/variable.lux diff --git a/new-luxc/test/test/luxc/generator/case.lux b/new-luxc/test/test/luxc/generator/case.lux index 7763cd852..e4201a30b 100644 --- a/new-luxc/test/test/luxc/generator/case.lux +++ b/new-luxc/test/test/luxc/generator/case.lux @@ -11,7 +11,6 @@ (meta [code]) test) (luxc (lang ["ls" synthesis]) - [synthesizer] (generator ["@" case] [";G" expression] ["@;" eval] diff --git a/new-luxc/test/test/luxc/generator/function.lux b/new-luxc/test/test/luxc/generator/function.lux index e7a0e7d61..2db2719b7 100644 --- a/new-luxc/test/test/luxc/generator/function.lux +++ b/new-luxc/test/test/luxc/generator/function.lux @@ -14,7 +14,6 @@ [host] test) (luxc (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/generator/primitive.lux b/new-luxc/test/test/luxc/generator/primitive.lux index 6de14d0e5..1ce93cee9 100644 --- a/new-luxc/test/test/luxc/generator/primitive.lux +++ b/new-luxc/test/test/luxc/generator/primitive.lux @@ -13,7 +13,6 @@ test) (luxc [";L" host] (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" runtime] ["@;" eval] diff --git a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux index 5e3c07bea..0c24a4020 100644 --- a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux @@ -17,7 +17,6 @@ [host] test) (luxc (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux index d571c578b..91b20d3d4 100644 --- a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux @@ -18,7 +18,6 @@ test) (luxc [";L" host] (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/generator/structure.lux b/new-luxc/test/test/luxc/generator/structure.lux index 37320fa99..7c342dbc4 100644 --- a/new-luxc/test/test/luxc/generator/structure.lux +++ b/new-luxc/test/test/luxc/generator/structure.lux @@ -17,7 +17,6 @@ test) (luxc [";L" host] (lang ["ls" synthesis]) - [synthesizer] (generator [";G" expression] ["@;" eval] ["@;" runtime] diff --git a/new-luxc/test/test/luxc/synthesizer/case/special.lux b/new-luxc/test/test/luxc/lang/synthesis/case/special.lux index 30e64fc77..585c7d349 100644 --- a/new-luxc/test/test/luxc/synthesizer/case/special.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/case/special.lux @@ -8,8 +8,8 @@ test) (luxc (lang ["la" analysis] ["ls" synthesis] - [";L" variable #+ Variable]) - [synthesizer]) + (synthesis [";S" expression]) + [";L" variable #+ Variable])) (../.. common)) (context: "Dummy variables." @@ -21,7 +21,7 @@ {("lux case bind" (~ (code;nat temp))) (~ (la;var (variableL;local temp)))}))]] (test "Dummy variables created to mask expressions get eliminated during synthesis." - (|> (synthesizer;synthesize maskA) + (|> (expressionS;synthesize maskA) (corresponds? maskedA)))))) (context: "Let expressions." @@ -34,7 +34,7 @@ {("lux case bind" (~ (code;nat registerA))) (~ outputA)}))]] (test "Can detect and reify simple 'let' expressions." - (|> (synthesizer;synthesize letA) + (|> (expressionS;synthesize letA) (case> (^ [_ (#;Form (list [_ (#;Text "lux let")] [_ (#;Nat registerS)] inputS outputS))]) (and (n.= registerA registerS) (corresponds? inputA inputS) @@ -58,7 +58,7 @@ {false (~ elseA) true (~ thenA)})))]] (test "Can detect and reify simple 'if' expressions." - (|> (synthesizer;synthesize ifA) + (|> (expressionS;synthesize ifA) (case> (^ [_ (#;Form (list [_ (#;Text "lux if")] inputS thenS elseS))]) (and (corresponds? inputA inputS) (corresponds? thenA thenS) diff --git a/new-luxc/test/test/luxc/synthesizer/common.lux b/new-luxc/test/test/luxc/lang/synthesis/common.lux index a74c64402..a74c64402 100644 --- a/new-luxc/test/test/luxc/synthesizer/common.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/common.lux diff --git a/new-luxc/test/test/luxc/synthesizer/function.lux b/new-luxc/test/test/luxc/lang/synthesis/function.lux index cab0da847..f364536cb 100644 --- a/new-luxc/test/test/luxc/synthesizer/function.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/function.lux @@ -15,8 +15,8 @@ test) (luxc (lang ["la" analysis] ["ls" synthesis] - [";L" variable #+ Variable]) - [synthesizer]) + (synthesis [";S" expression]) + [";L" variable #+ Variable])) (.. common)) (def: gen-function//constant @@ -101,7 +101,7 @@ [args3 prediction3 function3] gen-function//local] ($_ seq (test "Nested functions will get folded together." - (|> (synthesizer;synthesize function1) + (|> (expressionS;synthesize function1) (case> (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat args)] [_ (#;Tuple captured)] output))]) (and (n.= args1 args) (corresponds? prediction1 output)) @@ -109,7 +109,7 @@ _ (n.= +0 args1)))) (test "Folded functions provide direct access to captured variables." - (|> (synthesizer;synthesize function2) + (|> (expressionS;synthesize function2) (case> (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat args)] [_ (#;Tuple captured)] [_ (#;Form (list [_ (#;Int output)]))]))]) (and (n.= args2 args) @@ -118,7 +118,7 @@ _ false))) (test "Folded functions properly offset local variables." - (|> (synthesizer;synthesize function3) + (|> (expressionS;synthesize function3) (case> (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat args)] [_ (#;Tuple captured)] [_ (#;Form (list [_ (#;Int output)]))]))]) (and (n.= args3 args) @@ -136,7 +136,7 @@ argsA (r;list num-args gen-primitive)] ($_ seq (test "Can synthesize function application." - (|> (synthesizer;synthesize (la;apply argsA funcA)) + (|> (expressionS;synthesize (la;apply argsA funcA)) (case> (^ [_ (#;Form (list& [_ (#;Text "lux call")] funcS argsS))]) (and (corresponds? funcA funcS) (list;every? (product;uncurry corresponds?) @@ -145,6 +145,6 @@ _ false))) (test "Function application on no arguments just synthesizes to the function itself." - (|> (synthesizer;synthesize (la;apply (list) funcA)) + (|> (expressionS;synthesize (la;apply (list) funcA)) (corresponds? funcA))) )))) diff --git a/new-luxc/test/test/luxc/synthesizer/loop.lux b/new-luxc/test/test/luxc/lang/synthesis/loop.lux index fd8c95ce1..90b303857 100644 --- a/new-luxc/test/test/luxc/synthesizer/loop.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/loop.lux @@ -11,9 +11,9 @@ ["r" math/random "r/" Monad<Random>] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer] - (synthesizer ["&&;" loop])) + ["ls" synthesis] + (synthesis [";S" expression] + [";S" loop]))) (.. common)) (def: (does-recursion? arity exprS) @@ -129,7 +129,7 @@ [[prediction arity analysis] gen-recursion] ($_ seq (test "Can accurately identify (and then reify) tail recursion." - (case (synthesizer;synthesize analysis) + (case (expressionS;synthesize analysis) (^ [_ (#;Form (list [_ (#;Text "lux function")] [_ (#;Nat _arity)] [_ (#;Tuple _env)] _body))]) (|> _body (does-recursion? arity) @@ -145,15 +145,15 @@ [[prediction arity analysis] gen-recursion] ($_ seq (test "Can reify loops." - (case (synthesizer;synthesize (la;apply (list;repeat arity (' [])) analysis)) + (case (expressionS;synthesize (la;apply (list;repeat arity (' [])) analysis)) (^ [_ (#;Form (list [_ (#;Text "lux loop")] [_ (#;Nat in_register)] [_ (#;Tuple _inits)] _body))]) (and (n.= arity (list;size _inits)) - (not (&&loop;contains-self-reference? _body))) + (not (loopS;contains-self-reference? _body))) (^ [_ (#;Form (list& [_ (#;Text "lux call")] [_ (#;Form (list [_ (#;Text "lux function")] _arity _env _bodyS))] argsS))]) - (&&loop;contains-self-reference? _bodyS) + (loopS;contains-self-reference? _bodyS) _ false)))))) diff --git a/new-luxc/test/test/luxc/synthesizer/primitive.lux b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux index 2a1490193..d907a4c04 100644 --- a/new-luxc/test/test/luxc/synthesizer/primitive.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux @@ -8,8 +8,8 @@ ["r" math/random] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer])) + ["ls" synthesis] + (synthesis [";S" expression])))) (context: "Primitives" (<| (times +100) @@ -22,7 +22,7 @@ %text% (r;text +5)] (`` ($_ seq (test (format "Can synthesize unit.") - (|> (synthesizer;synthesize (' [])) + (|> (expressionS;synthesize (' [])) (case> (^code []) true @@ -30,7 +30,7 @@ false))) (~~ (do-template [<desc> <analysis> <synthesis> <sample>] [(test (format "Can synthesize " <desc> ".") - (|> (synthesizer;synthesize (<analysis> <sample>)) + (|> (expressionS;synthesize (<analysis> <sample>)) (case> [_ (<synthesis> value)] (is <sample> value) diff --git a/new-luxc/test/test/luxc/synthesizer/procedure.lux b/new-luxc/test/test/luxc/lang/synthesis/procedure.lux index c659c5e34..2263a1616 100644 --- a/new-luxc/test/test/luxc/synthesizer/procedure.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/procedure.lux @@ -9,8 +9,8 @@ ["r" math/random "r/" Monad<Random>] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer]) + ["ls" synthesis] + (synthesis [";S" expression]))) (.. common)) (context: "Procedures" @@ -21,7 +21,7 @@ argsA (r;list num-args gen-primitive)] ($_ seq (test "Can synthesize procedure calls." - (|> (synthesizer;synthesize (la;procedure nameA argsA)) + (|> (expressionS;synthesize (la;procedure nameA argsA)) (case> (^ [_ (#;Form (list& [_ (#;Text procedure)] argsS))]) (and (text/= nameA procedure) (list;every? (product;uncurry corresponds?) diff --git a/new-luxc/test/test/luxc/synthesizer/structure.lux b/new-luxc/test/test/luxc/lang/synthesis/structure.lux index 517f087d1..eab568bbe 100644 --- a/new-luxc/test/test/luxc/synthesizer/structure.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/structure.lux @@ -9,8 +9,8 @@ ["r" math/random "r/" Monad<Random>] test) (luxc (lang ["la" analysis] - ["ls" synthesis]) - [synthesizer]) + ["ls" synthesis] + (synthesis [";S" expression]))) (.. common)) (context: "Variants" @@ -21,7 +21,7 @@ memberA gen-primitive] ($_ seq (test "Can synthesize variants." - (|> (synthesizer;synthesize (la;sum tagA size +0 memberA)) + (|> (expressionS;synthesize (la;sum tagA size +0 memberA)) (case> (^ [_ (#;Form (list [_ (#;Nat tagS)] [_ (#;Bool last?S)] memberS))]) (and (n.= tagA tagS) (B/= (n.= (n.dec size) tagA) @@ -39,7 +39,7 @@ membersA (r;list size gen-primitive)] ($_ seq (test "Can synthesize tuple." - (|> (synthesizer;synthesize (la;product membersA)) + (|> (expressionS;synthesize (la;product membersA)) (case> [_ (#;Tuple membersS)] (and (n.= size (list;size membersS)) (list;every? (product;uncurry corresponds?) (list;zip2 membersA membersS))) diff --git a/new-luxc/test/tests.lux b/new-luxc/test/tests.lux index f96d5bdfc..5ec79d1e5 100644 --- a/new-luxc/test/tests.lux +++ b/new-luxc/test/tests.lux @@ -13,13 +13,13 @@ ["_;A" function] ["_;A" type] (procedure ["_;A" common] - ["_;A" host]))) - (synthesizer ["_;S" primitive] - ["_;S" structure] - (case ["_;S" special]) - ["_;S" function] - ["_;S" procedure] - ["_;S" loop]) + ["_;A" host])) + (synthesis ["_;S" primitive] + ["_;S" structure] + (case ["_;S" special]) + ["_;S" function] + ["_;S" procedure] + ["_;S" loop])) (generator ["_;G" primitive] ["_;G" structure] ["_;G" case] |