aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/type.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/case.lux28
-rw-r--r--new-luxc/test/test/luxc/lang/translation/function.lux16
-rw-r--r--new-luxc/test/test/luxc/lang/translation/primitive.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux56
-rw-r--r--new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux112
-rw-r--r--new-luxc/test/test/luxc/lang/translation/reference.lux12
-rw-r--r--new-luxc/test/test/luxc/lang/translation/structure.lux10
9 files changed, 124 insertions, 124 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux
index cda281e04..0f8848a21 100644
--- a/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux
@@ -34,7 +34,7 @@
[(def: (<name> procedure params output-type)
(-> Text (List Code) Type Bool)
(|> (do Monad<Meta>
- [runtime-bytecode @runtime;generate]
+ [runtime-bytecode @runtime;translate]
(&;with-scope
(&;with-expected-type output-type
(@;analyse-procedure analyse evalL;eval procedure params))))
diff --git a/new-luxc/test/test/luxc/lang/analysis/type.lux b/new-luxc/test/test/luxc/lang/analysis/type.lux
index 78107ecb6..e93068ea3 100644
--- a/new-luxc/test/test/luxc/lang/analysis/type.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/type.lux
@@ -53,7 +53,7 @@
($_ seq
(test (format "Can analyse type-checking.")
(|> (do Monad<Meta>
- [runtime-bytecode @runtime;generate]
+ [runtime-bytecode @runtime;translate]
(&;with-scope
(@common;with-unknown-type
(@;analyse-check analyse eval;eval typeC exprC))))
@@ -78,7 +78,7 @@
false)))
(test (format "Can analyse type-coercion.")
(|> (do Monad<Meta>
- [runtime-bytecode @runtime;generate]
+ [runtime-bytecode @runtime;translate]
(&;with-scope
(@common;with-unknown-type
(@;analyse-coerce analyse eval;eval typeC exprC))))
diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux
index 3a8608ea7..ace2e0290 100644
--- a/new-luxc/test/test/luxc/lang/translation/case.lux
+++ b/new-luxc/test/test/luxc/lang/translation/case.lux
@@ -68,16 +68,16 @@
[[valueS pathS] gen-case
to-bind r;nat]
($_ seq
- (test "Can generate pattern-matching."
+ (test "Can translate pattern-matching."
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (@;generate-case expressionT;generate
- valueS
- (` ("lux case alt"
- ("lux case seq" (~ pathS)
- ("lux case exec" true))
- ("lux case seq" ("lux case bind" +0)
- ("lux case exec" false)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (@;translate-case expressionT;translate
+ valueS
+ (` ("lux case alt"
+ ("lux case seq" (~ pathS)
+ ("lux case exec" true))
+ ("lux case seq" ("lux case bind" +0)
+ ("lux case exec" false)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -87,11 +87,11 @@
false)))
(test "Can bind values."
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (@;generate-case expressionT;generate
- (code;nat to-bind)
- (` ("lux case seq" ("lux case bind" +0)
- ("lux case exec" (0)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (@;translate-case expressionT;translate
+ (code;nat to-bind)
+ (` ("lux case seq" ("lux case bind" +0)
+ ("lux case exec" (0)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux
index 1896adff3..999f4f432 100644
--- a/new-luxc/test/test/luxc/lang/translation/function.lux
+++ b/new-luxc/test/test/luxc/lang/translation/function.lux
@@ -48,8 +48,8 @@
($_ seq
(test "Can read arguments."
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` ("lux call" (~ functionS) (~@ argsS))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` ("lux call" (~ functionS) (~@ argsS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -63,10 +63,10 @@
[#let [partial-arity (n.inc cut-off)
preS (list;take partial-arity argsS)
postS (list;drop partial-arity argsS)]
- runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` ("lux call"
- ("lux call" (~ functionS) (~@ preS))
- (~@ postS))))]
+ runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` ("lux call"
+ ("lux call" (~ functionS) (~@ preS))
+ (~@ postS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -87,8 +87,8 @@
functionS (` ("lux function" (~ (code;nat super-arity)) []
("lux function" (~ (code;nat sub-arity)) [(~@ (list/map code;int env))]
((~ (code;int arg-var))))))]
- runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` ("lux call" (~ functionS) (~@ argsS))))]
+ runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` ("lux call" (~ functionS) (~@ argsS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux
index 8604ed369..e8aaddb5a 100644
--- a/new-luxc/test/test/luxc/lang/translation/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux
@@ -30,9 +30,9 @@
%text% (r;text +5)]
(with-expansions
[<tests> (do-template [<desc> <type> <synthesis> <sample> <test>]
- [(test (format "Can generate " <desc> ".")
+ [(test (format "Can translate " <desc> ".")
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (<synthesis> <sample>))]
+ [sampleI (expressionT;translate (<synthesis> <sample>))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -48,9 +48,9 @@
["frac" Frac code;frac %frac% f.=]
["text" Text code;text %text% T/=])]
($_ seq
- (test "Can generate unit."
+ (test "Can translate unit."
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (' []))]
+ [sampleI (expressionT;translate (' []))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
diff --git a/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux b/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux
index 8c44007d0..e15627851 100644
--- a/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux
@@ -31,8 +31,8 @@
(with-expansions [<binary> (do-template [<name> <reference>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name> (~ (code;nat subject))
- (~ (code;nat param)))))]
+ [sampleI (expressionT;translate (` (<name> (~ (code;nat subject))
+ (~ (code;nat param)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -50,7 +50,7 @@
($_ seq
(test "bit count"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("bit count" (~ (code;nat subject)))))]
+ [sampleI (expressionT;translate (` ("bit count" (~ (code;nat subject)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -62,9 +62,9 @@
<binary>
(test "bit shift-right"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("bit shift-right"
- (~ (code;int (nat-to-int subject)))
- (~ (code;nat param)))))]
+ [sampleI (expressionT;translate (` ("bit shift-right"
+ (~ (code;int (nat-to-int subject)))
+ (~ (code;nat param)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -84,7 +84,7 @@
(~~ (do-template [<name> <reference>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name>)))]
+ [sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -99,7 +99,7 @@
(~~ (do-template [<name> <type> <prepare> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name> (~ (code;nat subject)))))]
+ [sampleI (expressionT;translate (` (<name> (~ (code;nat subject)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -114,8 +114,8 @@
(~~ (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;nat subject)) (~ (code;nat param)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;nat subject)) (~ (code;nat param)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -142,7 +142,7 @@
(with-expansions [<nullary> (do-template [<name> <reference>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name>)))]
+ [sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -157,7 +157,7 @@
<unary> (do-template [<name> <type> <prepare> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name> (~ (code;int subject)))))]
+ [sampleI (expressionT;translate (` (<name> (~ (code;int subject)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -172,8 +172,8 @@
<binary> (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;int subject)) (~ (code;int param)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;int subject)) (~ (code;int param)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -204,8 +204,8 @@
(with-expansions [<binary> (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;frac subject)) (~ (code;frac param)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;frac subject)) (~ (code;frac param)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -234,7 +234,7 @@
(with-expansions [<nullary> (do-template [<name> <test>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name>)))]
+ [sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -253,8 +253,8 @@
<unary> (do-template [<name> <type> <prepare> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;frac subject)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;frac subject)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -271,8 +271,8 @@
<unary>
(test "frac encode|decode"
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` ("frac decode" ("frac encode" (~ (code;frac subject))))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (^multi (#e;Success valueT)
@@ -300,7 +300,7 @@
(~~ (do-template [<name> <reference>]
[(test <name>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<name>)))]
+ [sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -315,8 +315,8 @@
(~~ (do-template [<name> <type> <prepare> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;deg subject)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;deg subject)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -330,8 +330,8 @@
(~~ (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;deg subject)) (~ (code;deg param)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;deg subject)) (~ (code;deg param)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -351,8 +351,8 @@
(~~ (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` (<name> (~ (code;deg subject)) (~ (code;nat special)))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` (<name> (~ (code;deg subject)) (~ (code;nat special)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
diff --git a/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux b/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux
index 35453c44b..0dd539120 100644
--- a/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux
@@ -32,7 +32,7 @@
(with-expansions [<2step> (do-template [<step1> <step2> <tag> <sample> <cast> <test>]
[(test (format <step1> " / " <step2>)
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))]
+ [sampleI (expressionT;translate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -63,7 +63,7 @@
(~~ (do-template [<step1> <step2> <step3> <tag> <sample> <cast> <test>]
[(test (format <step1> " / " <step2> " / " <step3>)
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))]
+ [sampleI (expressionT;translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -89,7 +89,7 @@
(~~ (do-template [<step1> <step2> <step3> <step4> <tag> <sample> <cast> <test>]
[(test (format <step1> " / " <step2> " / " <step3>)
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))]
+ [sampleI (expressionT;translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -127,9 +127,9 @@
(with-expansions [<tests> (do-template [<procedure> <reference>]
[(test <procedure>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<post> ((~ (code;text <procedure>))
- (<pre> (~ (<tag> subject)))
- (<pre> (~ (<tag> param)))))))]
+ [sampleI (expressionT;translate (` (<post> ((~ (code;text <procedure>))
+ (<pre> (~ (<tag> subject)))
+ (<pre> (~ (<tag> param)))))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -165,9 +165,9 @@
(~~ (do-template [<procedure> <reference>]
[(test <procedure>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<post> ((~ (code;text <procedure>))
- (<convert> (~ (code;nat subject)))
- (<convert> (~ (code;nat param)))))))]
+ [sampleI (expressionT;translate (` (<post> ((~ (code;text <procedure>))
+ (<convert> (~ (code;nat subject)))
+ (<convert> (~ (code;nat param)))))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -198,9 +198,9 @@
(~~ (do-template [<procedure> <reference> <type> <test> <pre-subject> <pre>]
[(test <procedure>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` (<post> ((~ (code;text <procedure>))
- (<convert> (~ (<pre> subject)))
- ("jvm convert long-to-int" (~ (code;nat shift)))))))]
+ [sampleI (expressionT;translate (` (<post> ((~ (code;text <procedure>))
+ (<convert> (~ (<pre> subject)))
+ ("jvm convert long-to-int" (~ (code;nat shift)))))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -229,9 +229,9 @@
(with-expansions [<tests> (do-template [<procedure> <reference>]
[(test <procedure>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ((~ (code;text <procedure>))
- (<pre> (~ (<tag> subject)))
- (<pre> (~ (<tag> param))))))]
+ [sampleI (expressionT;translate (` ((~ (code;text <procedure>))
+ (<pre> (~ (<tag> subject)))
+ (<pre> (~ (<tag> param))))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -283,12 +283,12 @@
(with-expansions [<array> (do-template [<class> <type> <value> <test> <input> <post>]
[(test <class>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (|> (jvm//array//new +0 <class> size)
- (jvm//array//write <class> idx <input>)
- (jvm//array//read <class> idx)
- (~)
- <post>
- (`)))]
+ [sampleI (expressionT;translate (|> (jvm//array//new +0 <class> size)
+ (jvm//array//write <class> idx <input>)
+ (jvm//array//read <class> idx)
+ (~)
+ <post>
+ (`)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputZ)
@@ -332,12 +332,12 @@
(with-expansions [<array> (do-template [<class> <type> <value> <test> <input> <post>]
[(test <class>
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (|> (jvm//array//new +0 <class> size)
- (jvm//array//write <class> idx <input>)
- (jvm//array//read <class> idx)
- (~)
- <post>
- (`)))]
+ [sampleI (expressionT;translate (|> (jvm//array//new +0 <class> size)
+ (jvm//array//write <class> idx <input>)
+ (jvm//array//read <class> idx)
+ (~)
+ <post>
+ (`)))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -360,11 +360,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 (expressionT;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 (expressionT;translate (|> ("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 outputT)
@@ -374,7 +374,7 @@
false)))
(test "jvm array length"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
+ [sampleI (expressionT;translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -424,7 +424,7 @@
($_ seq
(test "jvm object null"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm object null?" ("jvm object null"))))]
+ [sampleI (expressionT;translate (` ("jvm object null?" ("jvm object null"))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -434,7 +434,7 @@
false)))
(test "jvm object null?"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm object null?" (~ (code;int sample)))))]
+ [sampleI (expressionT;translate (` ("jvm object null?" (~ (code;int sample)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -444,7 +444,7 @@
false)))
(test "jvm object synchronized"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
+ [sampleI (expressionT;translate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -454,11 +454,11 @@
false)))
(test "jvm object throw"
(|> (do meta;Monad<Meta>
- [_ @runtime;generate
- sampleI (expressionT;generate (` ("lux try" ("lux function" +1 []
- ("jvm object throw" ("jvm member invoke constructor"
- "java.lang.Throwable"
- (~ exception-message$)))))))]
+ [_ @runtime;translate
+ sampleI (expressionT;translate (` ("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 outputT)
@@ -473,7 +473,7 @@
false)))
(test "jvm object class"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm object class" (~ (code;text class)))))]
+ [sampleI (expressionT;translate (` ("jvm object class" (~ (code;text class)))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -483,7 +483,7 @@
false)))
(test "jvm object instance?"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
+ [sampleI (expressionT;translate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -513,7 +513,7 @@
($_ seq
(test "jvm member static get"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
+ [sampleI (expressionT;translate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -523,8 +523,8 @@
false)))
(test "jvm member static put"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;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 (expressionT;translate (` ("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 outputT)
@@ -534,7 +534,7 @@
false)))
(test "jvm member virtual get"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
+ [sampleI (expressionT;translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -544,9 +544,9 @@
false)))
(test "jvm member virtual put"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;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 (expressionT;translate (` ("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 outputT)
@@ -571,7 +571,7 @@
($_ seq
(test "jvm member invoke static"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
+ [sampleI (expressionT;translate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -581,8 +581,8 @@
false)))
(test "jvm member invoke virtual"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
- (~ (code;int sample)) (~ object-longS))))]
+ [sampleI (expressionT;translate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
+ (~ (code;int sample)) (~ object-longS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -592,8 +592,8 @@
false)))
(test "jvm member invoke interface"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
- (~ array-listS) (~ object-longS))))]
+ [sampleI (expressionT;translate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
+ (~ array-listS) (~ object-longS))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
@@ -603,7 +603,7 @@
false)))
(test "jvm member invoke constructor"
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate array-listS)]
+ [sampleI (expressionT;translate array-listS)]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
index 0bc2bb325..1aee7df46 100644
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ b/new-luxc/test/test/luxc/lang/translation/reference.lux
@@ -47,8 +47,8 @@
(test "Can refer to definitions."
(|> (do meta;Monad<Meta>
[_ (_module;with-module +0 module-name
- (statementT;generate-def def-name Int valueI empty-metaI (' {})))
- sampleI (expressionT;generate (code;symbol [module-name def-name]))]
+ (statementT;translate-def def-name Int valueI empty-metaI (' {})))
+ sampleI (expressionT;translate (code;symbol [module-name def-name]))]
(evalT;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -66,10 +66,10 @@
($_ seq
(test "Can refer to local variables/registers."
(|> (do meta;Monad<Meta>
- [sampleI (caseT;generate-let expressionT;generate
- register
- (code;int value)
- (` ((~ (code;int (nat-to-int register))))))]
+ [sampleI (caseT;translate-let expressionT;translate
+ register
+ (code;int value)
+ (` ((~ (code;int (nat-to-int register))))))]
(evalT;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success outputT)
diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux
index a8f74ec6a..f32ab40e1 100644
--- a/new-luxc/test/test/luxc/lang/translation/structure.lux
+++ b/new-luxc/test/test/luxc/lang/translation/structure.lux
@@ -65,9 +65,9 @@
(do @
[size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2))))
members (r;list size gen-primitive)]
- (test "Can generate tuple."
+ (test "Can translate tuple."
(|> (do meta;Monad<Meta>
- [sampleI (expressionT;generate (code;tuple members))]
+ [sampleI (expressionT;translate (code;tuple members))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)
@@ -85,10 +85,10 @@
tag (|> r;nat (:: @ map (n.% num-tags)))
#let [last? (n.= (n.dec num-tags) tag)]
member gen-primitive]
- (test "Can generate variant."
+ (test "Can translate variant."
(|> (do meta;Monad<Meta>
- [runtime-bytecode @runtime;generate
- sampleI (expressionT;generate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
+ [runtime-bytecode @runtime;translate
+ sampleI (expressionT;translate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
(@eval;eval sampleI))
(meta;run (init-compiler []))
(case> (#e;Success valueT)