From f4ca44d9e155da79632415dbbf9c4ca9eb210f56 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 31 Oct 2017 18:09:58 -0400 Subject: - Re-named "expr" module to "expression". --- new-luxc/source/luxc/eval.lux | 4 +- new-luxc/source/luxc/generator.lux | 8 +- new-luxc/source/luxc/generator/expr.jvm.lux | 78 -------------- new-luxc/source/luxc/generator/expression.jvm.lux | 78 ++++++++++++++ new-luxc/source/luxc/generator/statement.jvm.lux | 4 +- new-luxc/test/test/luxc/generator/case.lux | 6 +- new-luxc/test/test/luxc/generator/function.lux | 12 +-- new-luxc/test/test/luxc/generator/primitive.lux | 6 +- .../test/luxc/generator/procedure/common.jvm.lux | 42 ++++---- .../test/luxc/generator/procedure/host.jvm.lux | 112 ++++++++++----------- new-luxc/test/test/luxc/generator/reference.lux | 6 +- new-luxc/test/test/luxc/generator/structure.lux | 6 +- 12 files changed, 180 insertions(+), 182 deletions(-) delete mode 100644 new-luxc/source/luxc/generator/expr.jvm.lux create mode 100644 new-luxc/source/luxc/generator/expression.jvm.lux (limited to 'new-luxc') diff --git a/new-luxc/source/luxc/eval.lux b/new-luxc/source/luxc/eval.lux index 59c31abc7..91195fbfd 100644 --- a/new-luxc/source/luxc/eval.lux +++ b/new-luxc/source/luxc/eval.lux @@ -5,7 +5,7 @@ [../base] (.. [analyser] [synthesizer] - (generator [expr] + (generator [";G" expression] [eval]))) (def: #export (eval type exprC) @@ -14,5 +14,5 @@ [exprA (../base;with-expected-type type (analyser;analyser eval exprC)) #let [exprS (synthesizer;synthesize exprA)] - exprI (expr;generate exprS)] + exprI (expressionG;generate exprS)] (eval;eval exprI))) diff --git a/new-luxc/source/luxc/generator.lux b/new-luxc/source/luxc/generator.lux index ad5f578e3..90e0ca4cf 100644 --- a/new-luxc/source/luxc/generator.lux +++ b/new-luxc/source/luxc/generator.lux @@ -22,7 +22,7 @@ (generator ["&&;" runtime] ["&&;" statement] ["&&;" common] - ["&&;" expr] + [";G" expression] ["&&;" eval]) )) @@ -41,7 +41,7 @@ [[_ metaA] (&;with-scope (&;with-expected-type Code (analyse metaC))) - metaI (&&expr;generate (&synthesizer;synthesize metaA)) + metaI (expressionG;generate (&synthesizer;synthesize metaA)) metaV (&&eval;eval metaI) [_ valueT valueA] (&;with-scope (if (meta;type? (:! Code metaV)) @@ -51,7 +51,7 @@ (wrap [Type valueA]))) (&analyser/common;with-unknown-type (analyse valueC)))) - valueI (&&expr;generate (&synthesizer;synthesize valueA)) + valueI (expressionG;generate (&synthesizer;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 (&&expr;generate (&synthesizer;synthesize programA))] + programI (expressionG;generate (&synthesizer;synthesize programA))] (&&statement;generate-program program-args programI)) _ diff --git a/new-luxc/source/luxc/generator/expr.jvm.lux b/new-luxc/source/luxc/generator/expr.jvm.lux deleted file mode 100644 index 61120ef86..000000000 --- a/new-luxc/source/luxc/generator/expr.jvm.lux +++ /dev/null @@ -1,78 +0,0 @@ -(;module: - lux - (lux (control monad - ["ex" exception #+ exception:] - ["p" parser]) - (data ["e" error] - text/format) - [meta] - (meta ["s" syntax])) - (luxc ["&" base] - (lang ["ls" synthesis]) - ["&;" analyser] - ["&;" synthesizer] - (synthesizer [";S" function]) - (generator ["&;" common] - ["&;" primitive] - ["&;" structure] - ["&;" eval] - ["&;" procedure] - ["&;" function] - ["&;" reference] - [";G" case] - (host ["$" jvm])))) - -(exception: #export Unrecognized-Synthesis) - -(def: #export (generate synthesis) - (-> ls;Synthesis (Meta $;Inst)) - (case synthesis - (^code []) - &primitive;generate-unit - - (^code [(~ singleton)]) - (generate singleton) - - (^template [ ] - [_ ( value)] - ( value)) - ([#;Bool &primitive;generate-bool] - [#;Nat &primitive;generate-nat] - [#;Int &primitive;generate-int] - [#;Deg &primitive;generate-deg] - [#;Frac &primitive;generate-frac] - [#;Text &primitive;generate-text]) - - (^code ((~ [_ (#;Nat tag)]) (~ [_ (#;Bool last?)]) (~ valueS))) - (&structure;generate-variant generate tag last? valueS) - - (^code [(~@ members)]) - (&structure;generate-tuple generate members) - - (^ [_ (#;Form (list [_ (#;Int var)]))]) - (if (functionS;captured? var) - (&reference;generate-captured var) - (&reference;generate-variable var)) - - [_ (#;Symbol definition)] - (&reference;generate-definition definition) - - (^code ("lux let" (~ [_ (#;Nat register)]) (~ inputS) (~ exprS))) - (caseG;generate-let generate register inputS exprS) - - (^code ("lux case" (~ inputS) (~ pathPS))) - (caseG;generate-case generate inputS pathPS) - - (^multi (^code ("lux function" (~ [_ (#;Nat arity)]) [(~@ environment)] (~ bodyS))) - [(s;run environment (p;some s;int)) (#e;Success environment)]) - (&function;generate-function generate environment arity bodyS) - - (^code ("lux call" (~ functionS) (~@ argsS))) - (&function;generate-call generate functionS argsS) - - (^code ((~ [_ (#;Text procedure)]) (~@ argsS))) - (&procedure;generate-procedure generate procedure argsS) - - _ - (&;throw Unrecognized-Synthesis (%code synthesis)) - )) diff --git a/new-luxc/source/luxc/generator/expression.jvm.lux b/new-luxc/source/luxc/generator/expression.jvm.lux new file mode 100644 index 000000000..61120ef86 --- /dev/null +++ b/new-luxc/source/luxc/generator/expression.jvm.lux @@ -0,0 +1,78 @@ +(;module: + lux + (lux (control monad + ["ex" exception #+ exception:] + ["p" parser]) + (data ["e" error] + text/format) + [meta] + (meta ["s" syntax])) + (luxc ["&" base] + (lang ["ls" synthesis]) + ["&;" analyser] + ["&;" synthesizer] + (synthesizer [";S" function]) + (generator ["&;" common] + ["&;" primitive] + ["&;" structure] + ["&;" eval] + ["&;" procedure] + ["&;" function] + ["&;" reference] + [";G" case] + (host ["$" jvm])))) + +(exception: #export Unrecognized-Synthesis) + +(def: #export (generate synthesis) + (-> ls;Synthesis (Meta $;Inst)) + (case synthesis + (^code []) + &primitive;generate-unit + + (^code [(~ singleton)]) + (generate singleton) + + (^template [ ] + [_ ( value)] + ( value)) + ([#;Bool &primitive;generate-bool] + [#;Nat &primitive;generate-nat] + [#;Int &primitive;generate-int] + [#;Deg &primitive;generate-deg] + [#;Frac &primitive;generate-frac] + [#;Text &primitive;generate-text]) + + (^code ((~ [_ (#;Nat tag)]) (~ [_ (#;Bool last?)]) (~ valueS))) + (&structure;generate-variant generate tag last? valueS) + + (^code [(~@ members)]) + (&structure;generate-tuple generate members) + + (^ [_ (#;Form (list [_ (#;Int var)]))]) + (if (functionS;captured? var) + (&reference;generate-captured var) + (&reference;generate-variable var)) + + [_ (#;Symbol definition)] + (&reference;generate-definition definition) + + (^code ("lux let" (~ [_ (#;Nat register)]) (~ inputS) (~ exprS))) + (caseG;generate-let generate register inputS exprS) + + (^code ("lux case" (~ inputS) (~ pathPS))) + (caseG;generate-case generate inputS pathPS) + + (^multi (^code ("lux function" (~ [_ (#;Nat arity)]) [(~@ environment)] (~ bodyS))) + [(s;run environment (p;some s;int)) (#e;Success environment)]) + (&function;generate-function generate environment arity bodyS) + + (^code ("lux call" (~ functionS) (~@ argsS))) + (&function;generate-call generate functionS argsS) + + (^code ((~ [_ (#;Text procedure)]) (~@ argsS))) + (&procedure;generate-procedure generate procedure argsS) + + _ + (&;throw Unrecognized-Synthesis (%code synthesis)) + )) diff --git a/new-luxc/source/luxc/generator/statement.jvm.lux b/new-luxc/source/luxc/generator/statement.jvm.lux index 830935dda..6df522fb8 100644 --- a/new-luxc/source/luxc/generator/statement.jvm.lux +++ b/new-luxc/source/luxc/generator/statement.jvm.lux @@ -2,7 +2,6 @@ lux (lux (control monad ["ex" exception #+ exception:]) - (concurrency ["T" task]) (data ["e" error] [maybe] [text "text/" Monoid] @@ -14,8 +13,7 @@ ["&;" scope] ["&;" module] ["&;" io] - (generator ["&;" expr] - ["&;" eval] + (generator ["&;" eval] ["&;" common] (host ["$" jvm] (jvm ["$t" type] diff --git a/new-luxc/test/test/luxc/generator/case.lux b/new-luxc/test/test/luxc/generator/case.lux index ff0e017aa..cfbe31de8 100644 --- a/new-luxc/test/test/luxc/generator/case.lux +++ b/new-luxc/test/test/luxc/generator/case.lux @@ -14,7 +14,7 @@ [analyser] [synthesizer] (generator ["@" case] - [";G" expr] + [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -73,7 +73,7 @@ (test "Can generate pattern-matching." (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate-case exprG;generate + sampleI (@;generate-case expressionG;generate valueS (` ("lux case alt" ("lux case seq" (~ pathS) @@ -90,7 +90,7 @@ (test "Can bind values." (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate-case exprG;generate + sampleI (@;generate-case expressionG;generate (code;nat to-bind) (` ("lux case seq" ("lux case bind" +0) ("lux case exec" (0)))))] diff --git a/new-luxc/test/test/luxc/generator/function.lux b/new-luxc/test/test/luxc/generator/function.lux index 1f922706c..5620996b5 100644 --- a/new-luxc/test/test/luxc/generator/function.lux +++ b/new-luxc/test/test/luxc/generator/function.lux @@ -16,7 +16,7 @@ (luxc (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@;" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -51,7 +51,7 @@ (test "Can read arguments." (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@expr;generate (` ("lux call" (~ functionS) (~@ argsS))))] + sampleI (expressionG;generate (` ("lux call" (~ functionS) (~@ argsS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -66,9 +66,9 @@ preS (list;take partial-arity argsS) postS (list;drop partial-arity argsS)] runtime-bytecode @runtime;generate - sampleI (@expr;generate (` ("lux call" - ("lux call" (~ functionS) (~@ preS)) - (~@ postS))))] + sampleI (expressionG;generate (` ("lux call" + ("lux call" (~ functionS) (~@ preS)) + (~@ postS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -90,7 +90,7 @@ ("lux function" (~ (code;nat sub-arity)) [(~@ (list/map code;int env))] ((~ (code;int arg-var))))))] runtime-bytecode @runtime;generate - sampleI (@expr;generate (` ("lux call" (~ functionS) (~@ argsS))))] + sampleI (expressionG;generate (` ("lux call" (~ functionS) (~@ argsS))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) diff --git a/new-luxc/test/test/luxc/generator/primitive.lux b/new-luxc/test/test/luxc/generator/primitive.lux index 37f87829b..84f47f146 100644 --- a/new-luxc/test/test/luxc/generator/primitive.lux +++ b/new-luxc/test/test/luxc/generator/primitive.lux @@ -15,7 +15,7 @@ (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" runtime] ["@;" eval] ["@;" common])) @@ -34,7 +34,7 @@ [ (do-template [ ] [(test (format "Can generate " ".") (|> (do meta;Monad - [sampleI (@;generate ( ))] + [sampleI (expressionG;generate ( ))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -52,7 +52,7 @@ ($_ seq (test "Can generate unit." (|> (do meta;Monad - [sampleI (@;generate (' []))] + [sampleI (expressionG;generate (' []))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) 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 7e36575d8..79829672d 100644 --- a/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/common.jvm.lux @@ -19,7 +19,7 @@ (luxc (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -33,8 +33,8 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ( (~ (code;nat subject)) - (~ (code;nat param)))))] + [sampleI (expressionG;generate (` ( (~ (code;nat subject)) + (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -52,7 +52,7 @@ ($_ seq (test "bit count" (|> (do meta;Monad - [sampleI (@;generate (` ("bit count" (~ (code;nat subject)))))] + [sampleI (expressionG;generate (` ("bit count" (~ (code;nat subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -64,9 +64,9 @@ (test "bit shift-right" (|> (do meta;Monad - [sampleI (@;generate (` ("bit shift-right" - (~ (code;int (nat-to-int subject))) - (~ (code;nat param)))))] + [sampleI (expressionG;generate (` ("bit shift-right" + (~ (code;int (nat-to-int subject))) + (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -86,7 +86,7 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ()))] + [sampleI (expressionG;generate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -101,7 +101,7 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ( (~ (code;nat subject)))))] + [sampleI (expressionG;generate (` ( (~ (code;nat subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -117,7 +117,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;nat subject)) (~ (code;nat param)))))] + sampleI (expressionG;generate (` ( (~ (code;nat subject)) (~ (code;nat param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -144,7 +144,7 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ()))] + [sampleI (expressionG;generate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -159,7 +159,7 @@ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ( (~ (code;int subject)))))] + [sampleI (expressionG;generate (` ( (~ (code;int subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -175,7 +175,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;int subject)) (~ (code;int param)))))] + sampleI (expressionG;generate (` ( (~ (code;int subject)) (~ (code;int param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -207,7 +207,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;frac subject)) (~ (code;frac param)))))] + sampleI (expressionG;generate (` ( (~ (code;frac subject)) (~ (code;frac param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -236,7 +236,7 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ()))] + [sampleI (expressionG;generate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -256,7 +256,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;frac subject)))))] + sampleI (expressionG;generate (` ( (~ (code;frac subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -274,7 +274,7 @@ (test "frac encode|decode" (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))] + sampleI (expressionG;generate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (^multi (#e;Success valueG) @@ -302,7 +302,7 @@ (~~ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ()))] + [sampleI (expressionG;generate (` ()))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -318,7 +318,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;deg subject)))))] + sampleI (expressionG;generate (` ( (~ (code;deg subject)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -333,7 +333,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;deg subject)) (~ (code;deg param)))))] + sampleI (expressionG;generate (` ( (~ (code;deg subject)) (~ (code;deg param)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -354,7 +354,7 @@ [(test (|> (do meta;Monad [runtime-bytecode @runtime;generate - sampleI (@;generate (` ( (~ (code;deg subject)) (~ (code;nat special)))))] + sampleI (expressionG;generate (` ( (~ (code;deg subject)) (~ (code;nat special)))))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) 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 153f276cc..8db98ed37 100644 --- a/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/generator/procedure/host.jvm.lux @@ -20,7 +20,7 @@ (lang ["ls" synthesis]) [analyser] [synthesizer] - (generator ["@" expr] + (generator [";G" expression] ["@;" eval] ["@;" runtime] ["@;" common])) @@ -34,7 +34,7 @@ (with-expansions [<2step> (do-template [ ] [(test (format " / " ) (|> (do meta;Monad - [sampleI (@;generate (|> (~ ( )) (`)))] + [sampleI (expressionG;generate (|> (~ ( )) (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -65,7 +65,7 @@ (~~ (do-template [ ] [(test (format " / " " / " ) (|> (do meta;Monad - [sampleI (@;generate (|> (~ ( )) (`)))] + [sampleI (expressionG;generate (|> (~ ( )) (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -91,7 +91,7 @@ (~~ (do-template [ ] [(test (format " / " " / " ) (|> (do meta;Monad - [sampleI (@;generate (|> (~ ( )) (`)))] + [sampleI (expressionG;generate (|> (~ ( )) (`)))] (@eval;eval sampleI)) (meta;run (init-compiler [])) (case> (#e;Success valueG) @@ -129,9 +129,9 @@ (with-expansions [ (do-template [ ] [(test (|> (do meta;Monad - [sampleI (@;generate (` ( ((~ (code;text )) - (
 (~ ( subject)))
-                                                                                     (
 (~ ( param)))))))]
+                                                    [sampleI (expressionG;generate (` ( ((~ (code;text ))
+                                                                                               (
 (~ ( subject)))
+                                                                                               (
 (~ ( param)))))))]
                                                     (@eval;eval sampleI))
                                                   (meta;run (init-compiler []))
                                                   (case> (#e;Success valueG)
@@ -167,9 +167,9 @@
                    (~~ (do-template [ ]
                          [(test 
                                 (|> (do meta;Monad
-                                      [sampleI (@;generate (` ( ((~ (code;text ))
-                                                                       ( (~ (code;nat subject)))
-                                                                       ( (~ (code;nat param)))))))]
+                                      [sampleI (expressionG;generate (` ( ((~ (code;text ))
+                                                                                 ( (~ (code;nat subject)))
+                                                                                 ( (~ (code;nat param)))))))]
                                       (@eval;eval sampleI))
                                     (meta;run (init-compiler []))
                                     (case> (#e;Success valueG)
@@ -200,9 +200,9 @@
                    (~~ (do-template [     
]
                          [(test 
                                 (|> (do meta;Monad
-                                      [sampleI (@;generate (` ( ((~ (code;text ))
-                                                                       ( (~ (
 subject)))
-                                                                       ("jvm convert long-to-int" (~ (code;nat shift)))))))]
+                                      [sampleI (expressionG;generate (` ( ((~ (code;text ))
+                                                                                 ( (~ (
 subject)))
+                                                                                 ("jvm convert long-to-int" (~ (code;nat shift)))))))]
                                       (@eval;eval sampleI))
                                     (meta;run (init-compiler []))
                                     (case> (#e;Success valueG)
@@ -231,9 +231,9 @@
            (with-expansions [ (do-template [ ]
                                        [(test 
                                               (|> (do meta;Monad
-                                                    [sampleI (@;generate (` ((~ (code;text ))
-                                                                             (
 (~ ( subject)))
-                                                                             (
 (~ ( param))))))]
+                                                    [sampleI (expressionG;generate (` ((~ (code;text ))
+                                                                                       (
 (~ ( subject)))
+                                                                                       (
 (~ ( param))))))]
                                                     (@eval;eval sampleI))
                                                   (meta;run (init-compiler []))
                                                   (case> (#e;Success valueG)
@@ -285,12 +285,12 @@
         (with-expansions [ (do-template [     ]
                                     [(test 
                                            (|> (do meta;Monad
-                                                 [sampleI (@;generate (|> (jvm//array//new +0  size)
-                                                                          (jvm//array//write  idx )
-                                                                          (jvm//array//read  idx)
-                                                                          (~)
-                                                                          
-                                                                          (`)))]
+                                                 [sampleI (expressionG;generate (|> (jvm//array//new +0  size)
+                                                                                    (jvm//array//write  idx )
+                                                                                    (jvm//array//read  idx)
+                                                                                    (~)
+                                                                                    
+                                                                                    (`)))]
                                                  (@eval;eval sampleI))
                                                (meta;run (init-compiler []))
                                                (case> (#e;Success outputZ)
@@ -334,12 +334,12 @@
         (with-expansions [ (do-template [     ]
                                     [(test 
                                            (|> (do meta;Monad
-                                                 [sampleI (@;generate (|> (jvm//array//new +0  size)
-                                                                          (jvm//array//write  idx )
-                                                                          (jvm//array//read  idx)
-                                                                          (~)
-                                                                          
-                                                                          (`)))]
+                                                 [sampleI (expressionG;generate (|> (jvm//array//new +0  size)
+                                                                                    (jvm//array//write  idx )
+                                                                                    (jvm//array//read  idx)
+                                                                                    (~)
+                                                                                    
+                                                                                    (`)))]
                                                  (@eval;eval sampleI))
                                                (meta;run (init-compiler []))
                                                (case> (#e;Success outputG)
@@ -362,11 +362,11 @@
                           [#let [inner (|> ("jvm array new" +0 "java.lang.Double" (~ (code;nat size)))
                                            ("jvm array write" "java.lang.Double" (~ (code;nat idx)) (~ (code;frac valueD)))
                                            (`))]
-                           sampleI (@;generate (|> ("jvm array new" +1 "java.lang.Double" (~ (code;nat size)))
-                                                   ("jvm array write" "#Array" (~ (code;nat idx)) (~ inner))
-                                                   ("jvm array read" "#Array" (~ (code;nat idx)))
-                                                   ("jvm array read" "java.lang.Double" (~ (code;nat idx)))
-                                                   (`)))]
+                           sampleI (expressionG;generate (|> ("jvm array new" +1 "java.lang.Double" (~ (code;nat size)))
+                                                             ("jvm array write" "#Array" (~ (code;nat idx)) (~ inner))
+                                                             ("jvm array read" "#Array" (~ (code;nat idx)))
+                                                             ("jvm array read" "java.lang.Double" (~ (code;nat idx)))
+                                                             (`)))]
                           (@eval;eval sampleI))
                         (meta;run (init-compiler []))
                         (case> (#e;Success outputG)
@@ -376,7 +376,7 @@
                                false)))
               (test "jvm array length"
                     (|> (do meta;Monad
-                          [sampleI (@;generate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
+                          [sampleI (expressionG;generate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
                           (@eval;eval sampleI))
                         (meta;run (init-compiler []))
                         (case> (#e;Success outputG)
@@ -426,7 +426,7 @@
         ($_ seq
             (test "jvm object null"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm object null?" ("jvm object null"))))]
+                        [sampleI (expressionG;generate (` ("jvm object null?" ("jvm object null"))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -436,7 +436,7 @@
                              false)))
             (test "jvm object null?"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm object null?" (~ (code;int sample)))))]
+                        [sampleI (expressionG;generate (` ("jvm object null?" (~ (code;int sample)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -446,7 +446,7 @@
                              false)))
             (test "jvm object synchronized"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
+                        [sampleI (expressionG;generate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -457,10 +457,10 @@
             (test "jvm object throw"
                   (|> (do meta;Monad
                         [_ @runtime;generate
-                         sampleI (@;generate (` ("lux try" ("lux function" +1 []
-                                                            ("jvm object throw" ("jvm member invoke constructor"
-                                                                                 "java.lang.Throwable"
-                                                                                 (~ exception-message$)))))))]
+                         sampleI (expressionG;generate (` ("lux try" ("lux function" +1 []
+                                                                      ("jvm object throw" ("jvm member invoke constructor"
+                                                                                           "java.lang.Throwable"
+                                                                                           (~ exception-message$)))))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -475,7 +475,7 @@
                              false)))
             (test "jvm object class"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm object class" (~ (code;text class)))))]
+                        [sampleI (expressionG;generate (` ("jvm object class" (~ (code;text class)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -485,7 +485,7 @@
                              false)))
             (test "jvm object instance?"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
+                        [sampleI (expressionG;generate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -515,7 +515,7 @@
         ($_ seq
             (test "jvm member static get"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
+                        [sampleI (expressionG;generate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -525,8 +525,8 @@
                              false)))
             (test "jvm member static put"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"
-                                                 ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))]
+                        [sampleI (expressionG;generate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"
+                                                           ("jvm member static get" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -536,7 +536,7 @@
                              false)))
             (test "jvm member virtual get"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
+                        [sampleI (expressionG;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -546,9 +546,9 @@
                              false)))
             (test "jvm member virtual put"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
-                                                 ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
-                                                  (~ (code;text other-sample-string)) (~ value-memberS)))))]
+                        [sampleI (expressionG;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
+                                                           ("jvm member virtual put" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
+                                                            (~ (code;text other-sample-string)) (~ value-memberS)))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -573,7 +573,7 @@
         ($_ seq
             (test "jvm member invoke static"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
+                        [sampleI (expressionG;generate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -583,8 +583,8 @@
                              false)))
             (test "jvm member invoke virtual"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
-                                                 (~ (code;int sample)) (~ object-longS))))]
+                        [sampleI (expressionG;generate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
+                                                           (~ (code;int sample)) (~ object-longS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -594,8 +594,8 @@
                              false)))
             (test "jvm member invoke interface"
                   (|> (do meta;Monad
-                        [sampleI (@;generate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
-                                                 (~ array-listS) (~ object-longS))))]
+                        [sampleI (expressionG;generate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
+                                                           (~ array-listS) (~ object-longS))))]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
@@ -605,7 +605,7 @@
                              false)))
             (test "jvm member invoke constructor"
                   (|> (do meta;Monad
-                        [sampleI (@;generate array-listS)]
+                        [sampleI (expressionG;generate array-listS)]
                         (@eval;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success outputG)
diff --git a/new-luxc/test/test/luxc/generator/reference.lux b/new-luxc/test/test/luxc/generator/reference.lux
index 0e6f9ada5..9df6d8b10 100644
--- a/new-luxc/test/test/luxc/generator/reference.lux
+++ b/new-luxc/test/test/luxc/generator/reference.lux
@@ -12,7 +12,7 @@
         ["_;" module]
         (generator [";G" statement]
                    [";G" eval]
-                   [";G" expr]
+                   [";G" expression]
                    [";G" case]
                    [";G" runtime]
                    (host ["$" jvm]
@@ -47,7 +47,7 @@
                   (|> (do meta;Monad
                         [_ (_module;with-module +0 module-name
                              (statementG;generate-def def-name Int valueI empty-metaI (' {})))
-                         sampleI (exprG;generate (code;symbol [module-name def-name]))]
+                         sampleI (expressionG;generate (code;symbol [module-name def-name]))]
                         (evalG;eval sampleI))
                       (meta;run (init-compiler []))
                       (case> (#e;Success valueG)
@@ -65,7 +65,7 @@
         ($_ seq
             (test "Can refer to local variables/registers."
                   (|> (do meta;Monad
-                        [sampleI (caseG;generate-let exprG;generate
+                        [sampleI (caseG;generate-let expressionG;generate
                                                      register
                                                      (code;int value)
                                                      (` ((~ (code;int (nat-to-int register))))))]
diff --git a/new-luxc/test/test/luxc/generator/structure.lux b/new-luxc/test/test/luxc/generator/structure.lux
index 3157d85d9..9143ba5c8 100644
--- a/new-luxc/test/test/luxc/generator/structure.lux
+++ b/new-luxc/test/test/luxc/generator/structure.lux
@@ -19,7 +19,7 @@
         (lang ["ls" synthesis])
         [analyser]
         [synthesizer]
-        (generator ["@" expr]
+        (generator [";G" expression]
                    ["@;" eval]
                    ["@;" runtime]
                    ["@;" common]))
@@ -69,7 +69,7 @@
          members (r;list size gen-primitive)]
         (test "Can generate tuple."
               (|> (do meta;Monad
-                    [sampleI (@;generate (code;tuple members))]
+                    [sampleI (expressionG;generate (code;tuple members))]
                     (@eval;eval sampleI))
                   (meta;run (init-compiler []))
                   (case> (#e;Success valueG)
@@ -90,7 +90,7 @@
         (test "Can generate variant."
               (|> (do meta;Monad
                     [runtime-bytecode @runtime;generate
-                     sampleI (@;generate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
+                     sampleI (expressionG;generate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
                     (@eval;eval sampleI))
                   (meta;run (init-compiler []))
                   (case> (#e;Success valueG)
-- 
cgit v1.2.3