aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/test')
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/case.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/common.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/function.lux18
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/primitive.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/procedure/common.lux18
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/procedure/host.jvm.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/reference.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/structure.lux54
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/type.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/case/special.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/common.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/function.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/loop.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/primitive.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/translation/case.lux15
-rw-r--r--new-luxc/test/test/luxc/lang/translation/function.lux16
-rw-r--r--new-luxc/test/test/luxc/lang/translation/primitive.lux12
-rw-r--r--new-luxc/test/test/luxc/lang/translation/procedure/common.jvm.lux72
-rw-r--r--new-luxc/test/test/luxc/lang/translation/procedure/host.jvm.lux104
-rw-r--r--new-luxc/test/test/luxc/lang/translation/reference.lux12
-rw-r--r--new-luxc/test/test/luxc/lang/translation/structure.lux12
21 files changed, 191 insertions, 190 deletions
diff --git a/new-luxc/test/test/luxc/lang/analysis/case.lux b/new-luxc/test/test/luxc/lang/analysis/case.lux
index bffa99bce..f99c034e8 100644
--- a/new-luxc/test/test/luxc/lang/analysis/case.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/case.lux
@@ -12,8 +12,8 @@
(coll [list "L/" Monad<List>]
["S" set]))
["r" math/random "r/" Monad<Random>]
- [meta #+ Monad<Meta>]
- (meta [code])
+ [macro #+ Monad<Meta>]
+ (macro [code])
(lang [type "type/" Eq<Type>]
(type ["tc" check]))
test)
diff --git a/new-luxc/test/test/luxc/lang/analysis/common.lux b/new-luxc/test/test/luxc/lang/analysis/common.lux
index 086a0bd31..e7b9dc486 100644
--- a/new-luxc/test/test/luxc/lang/analysis/common.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/common.lux
@@ -3,8 +3,8 @@
(lux (control pipe)
["r" math/random "r/" Monad<Random>]
(data ["e" error])
- [meta]
- (meta [code]))
+ [macro]
+ (macro [code]))
(luxc ["&" lang]
(lang (analysis [";A" expression])
[eval]))
@@ -40,7 +40,7 @@
[(def: #export (<name> analysis)
(All [a] (-> (Meta a) Bool))
(|> analysis
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
<on-success>
diff --git a/new-luxc/test/test/luxc/lang/analysis/function.lux b/new-luxc/test/test/luxc/lang/analysis/function.lux
index 5b84d3dd0..b99e5e2ee 100644
--- a/new-luxc/test/test/luxc/lang/analysis/function.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/function.lux
@@ -10,8 +10,8 @@
text/format
(coll [list "list/" Functor<List>]))
["r" math/random "r/" Monad<Random>]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
(lang [type "type/" Eq<Type>])
test)
(luxc ["&" lang]
@@ -54,7 +54,7 @@
(def: (check-apply expectedT num-args analysis)
(-> Type Nat (Meta [Type la;Analysis]) Bool)
(|> analysis
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [applyT applyA])
(let [[funcA argsA] (flatten-apply applyA)]
(and (type/= expectedT applyT)
@@ -74,31 +74,31 @@
(test "Can analyse function."
(|> (&;with-type (type (All [a] (-> a outputT)))
(@;analyse-function analyse func-name arg-name outputC))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
succeeds?))
(test "Generic functions can always be specialized."
(and (|> (&;with-type (-> inputT outputT)
(@;analyse-function analyse func-name arg-name outputC))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
succeeds?)
(|> (&;with-type (-> inputT inputT)
(@;analyse-function analyse func-name arg-name (code;symbol ["" arg-name])))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
succeeds?)))
(test "Can infer function (constant output and unused input)."
(|> (@common;with-unknown-type
(@;analyse-function analyse func-name arg-name outputC))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(check-type (type (All [a] (-> a outputT))))))
(test "Can infer function (output = input)."
(|> (@common;with-unknown-type
(@;analyse-function analyse func-name arg-name (code;symbol ["" arg-name])))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(check-type (type (All [a] (-> a a))))))
(test "The function's name is bound to the function's type."
(|> (&;with-type (type (Rec self (-> inputT self)))
(@;analyse-function analyse func-name arg-name (code;symbol ["" func-name])))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
succeeds?))
))))
diff --git a/new-luxc/test/test/luxc/lang/analysis/primitive.lux b/new-luxc/test/test/luxc/lang/analysis/primitive.lux
index 7c2e8b123..cf60d64fe 100644
--- a/new-luxc/test/test/luxc/lang/analysis/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/primitive.lux
@@ -6,8 +6,8 @@
(data (text format)
["e" error])
["r" math/random]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
(lang [type "type/" Eq<Type>])
test)
(luxc ["&" lang]
@@ -32,7 +32,7 @@
(test "Can analyse unit."
(|> (@common;with-unknown-type
@;analyse-unit)
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^ (#e;Success [_type (^code [])]))
(type/= Unit _type)
@@ -43,7 +43,7 @@
[(test (format "Can analyse " <desc> ".")
(|> (@common;with-unknown-type
(<analyser> <value>))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [_type [_ (<tag> value)]])
(and (type/= <type> _type)
(is <value> value))
diff --git a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
index f5b1feb71..91e5267f8 100644
--- a/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/procedure/common.lux
@@ -9,8 +9,8 @@
[product]
(coll [array]))
["r" math/random "r/" Monad<Random>]
- [meta #+ Monad<Meta>]
- (meta [code])
+ [macro #+ Monad<Meta>]
+ (macro [code])
(lang [type "type/" Eq<Type>])
test)
(luxc ["&" lang]
@@ -30,7 +30,7 @@
(|> (&;with-scope
(&;with-type output-type
(@;analyse-procedure analyse evalL;eval procedure params)))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
<success>
@@ -266,7 +266,7 @@
(@;analyse-procedure analyse evalL;eval "lux array get"
(list idxC
(code;symbol ["" var-name]))))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -280,7 +280,7 @@
(list idxC
elemC
(code;symbol ["" var-name]))))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -293,7 +293,7 @@
(@;analyse-procedure analyse evalL;eval "lux array remove"
(list idxC
(code;symbol ["" var-name]))))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -305,7 +305,7 @@
(&;with-type Nat
(@;analyse-procedure analyse evalL;eval "lux array size"
(list (code;symbol ["" var-name]))))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -365,7 +365,7 @@
(&;with-type elemT
(@;analyse-procedure analyse evalL;eval "lux atom read"
(list (code;symbol ["" var-name]))))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -379,7 +379,7 @@
(list elemC
elemC
(code;symbol ["" var-name]))))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
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 b82eb8206..13645840e 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
@@ -13,8 +13,8 @@
[list "list/" Fold<List>]
[dict]))
["r" math/random "r/" Monad<Random>]
- [meta #+ Monad<Meta>]
- (meta [code])
+ [macro #+ Monad<Meta>]
+ (macro [code])
(lang [type])
test)
(luxc ["&" lang]
@@ -38,7 +38,7 @@
(&;with-scope
(&;with-type output-type
(@;analyse-procedure analyse evalL;eval procedure params))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
<success>
diff --git a/new-luxc/test/test/luxc/lang/analysis/reference.lux b/new-luxc/test/test/luxc/lang/analysis/reference.lux
index 16cfb9a38..14079c6b8 100644
--- a/new-luxc/test/test/luxc/lang/analysis/reference.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/reference.lux
@@ -5,7 +5,7 @@
pipe)
(data ["e" error])
["r" math/random]
- [meta #+ Monad<Meta>]
+ [macro #+ Monad<Meta>]
(lang [type "type/" Eq<Type>])
test)
(luxc (lang ["&;" scope]
@@ -30,7 +30,7 @@
(&scope;with-local [var-name ref-type]
(@common;with-unknown-type
(@;analyse-reference ["" var-name]))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^ (#e;Success [_type (^code ((~ [_ (#;Int var)])))]))
(type/= ref-type _type)
@@ -43,7 +43,7 @@
[ref-type (' {}) (:! Void [])])]
(@common;with-unknown-type
(@;analyse-reference [module-name var-name])))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [_type [_ (#;Symbol def-name)]])
(type/= ref-type _type)
diff --git a/new-luxc/test/test/luxc/lang/analysis/structure.lux b/new-luxc/test/test/luxc/lang/analysis/structure.lux
index cc31622a1..58212359e 100644
--- a/new-luxc/test/test/luxc/lang/analysis/structure.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/structure.lux
@@ -12,8 +12,8 @@
(coll [list "list/" Functor<List>]
["S" set]))
["r" math/random "r/" Monad<Random>]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
(lang [type "type/" Eq<Type>]
(type ["tc" check]))
test)
@@ -47,7 +47,7 @@
(|> (&;with-scope
(&;with-type variantT
(@;analyse-sum analyse choice valueC)))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success [_ sumA])
[(la;unfold-variant sumA)
(#;Some [tag last? valueA])])
@@ -58,13 +58,13 @@
false)))
(test "Can analyse sum through bound type-vars."
(|> (&;with-scope
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[[_ varT] (&;with-type-env tc;var)
_ (&;with-type-env
(tc;check varT variantT))]
(&;with-type varT
(@;analyse-sum analyse choice valueC))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success [_ sumA])
[(la;unfold-variant sumA)
(#;Some [tag last? valueA])])
@@ -75,11 +75,11 @@
false)))
(test "Cannot analyse sum through unbound type-vars."
(|> (&;with-scope
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[[_ varT] (&;with-type-env tc;var)]
(&;with-type varT
(@;analyse-sum analyse choice valueC))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
false
@@ -89,7 +89,7 @@
(|> (&;with-scope
(&;with-type (type;ex-q +1 +variantT)
(@;analyse-sum analyse +choice +valueC)))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -99,7 +99,7 @@
(|> (&;with-scope
(&;with-type (type;univ-q +1 +variantT)
(@;analyse-sum analyse +choice +valueC)))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
(not (n.= choice +choice))
@@ -123,7 +123,7 @@
(test "Can analyse product."
(|> (&;with-type (type;tuple (list/map product;left primitives))
(@;analyse-product analyse (list/map product;right primitives)))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success tupleA)
(n.= size (list;size (la;unfold-tuple tupleA)))
@@ -132,7 +132,7 @@
(test "Can infer product."
(|> (@common;with-unknown-type
(@;analyse-product analyse (list/map product;right primitives)))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [_type tupleA])
(and (type/= (type;tuple (list/map product;left primitives))
_type)
@@ -143,7 +143,7 @@
(test "Can analyse pseudo-product (singleton tuple)"
(|> (&;with-type singletonT
(analyse (` [(~ singletonC)])))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success singletonA)
true
@@ -151,13 +151,13 @@
false)))
(test "Can analyse product through bound type-vars."
(|> (&;with-scope
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[[_ varT] (&;with-type-env tc;var)
_ (&;with-type-env
(tc;check varT (type;tuple (list/map product;left primitives))))]
(&;with-type varT
(@;analyse-product analyse (list/map product;right primitives)))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [_ tupleA])
(n.= size (list;size (la;unfold-tuple tupleA)))
@@ -167,7 +167,7 @@
(|> (&;with-scope
(&;with-type (type;ex-q +1 +tupleT)
(@;analyse-product analyse (list/map product;right +primitives))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
true
@@ -177,7 +177,7 @@
(|> (&;with-scope
(&;with-type (type;univ-q +1 +tupleT)
(@;analyse-product analyse (list/map product;right +primitives))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success _)
false
@@ -188,7 +188,7 @@
(def: (check-variant-inference variantT choice size analysis)
(-> Type Nat Nat (Meta [Module Scope Type la;Analysis]) Bool)
(|> analysis
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success [_ _ sumT sumA])
[(la;unfold-variant sumA)
(#;Some [tag last? valueA])])
@@ -202,7 +202,7 @@
(def: (check-record-inference tupleT size analysis)
(-> Type Nat (Meta [Module Scope Type la;Analysis]) Bool)
(|> analysis
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success [_ _ productT productA])
[(la;unfold-tuple productA)
membersA])
@@ -238,7 +238,7 @@
($_ seq
(test "Can infer tagged sum."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false namedT)]
(&;with-scope
(@common;with-unknown-type
@@ -246,7 +246,7 @@
(check-variant-inference variantT choice size)))
(test "Tagged sums specialize when type-vars get bound."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false named-polyT)]
(&;with-scope
(@common;with-unknown-type
@@ -254,7 +254,7 @@
(check-variant-inference variantT choice size)))
(test "Tagged sum inference retains universal quantification when type-vars are not bound."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false named-polyT)]
(&;with-scope
(@common;with-unknown-type
@@ -262,12 +262,12 @@
(check-variant-inference polyT other-choice size)))
(test "Can specialize generic tagged sums."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false named-polyT)]
(&;with-scope
(&;with-type variantT
(@;analyse-tagged-sum analyse [module-name other-choice-tag] other-choiceC)))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success [_ _ sumA])
[(la;unfold-variant sumA)
(#;Some [tag last? valueA])])
@@ -302,7 +302,7 @@
($_ seq
(test "Can infer record."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false namedT)]
(&;with-scope
(@common;with-unknown-type
@@ -310,7 +310,7 @@
(check-record-inference tupleT size)))
(test "Records specialize when type-vars get bound."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false named-polyT)]
(&;with-scope
(@common;with-unknown-type
@@ -318,12 +318,12 @@
(check-record-inference tupleT size)))
(test "Can specialize generic records."
(|> (@module;with-module +0 module-name
- (do meta;Monad<Meta>
+ (do macro;Monad<Meta>
[_ (@module;declare-tags tags false named-polyT)]
(&;with-scope
(&;with-type tupleT
(@;analyse-record analyse recordC)))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success [_ _ productA])
[(la;unfold-tuple productA)
membersA])
diff --git a/new-luxc/test/test/luxc/lang/analysis/type.lux b/new-luxc/test/test/luxc/lang/analysis/type.lux
index ed75f4d6c..b159870c8 100644
--- a/new-luxc/test/test/luxc/lang/analysis/type.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/type.lux
@@ -12,8 +12,8 @@
[product]
(coll [list "list/" Functor<List> Fold<List>]))
["r" math/random "r/" Monad<Random>]
- [meta #+ Monad<Meta>]
- (meta [code])
+ [macro #+ Monad<Meta>]
+ (macro [code])
(lang [type "type/" Eq<Type>])
test)
(luxc ["&" lang]
@@ -57,7 +57,7 @@
(&;with-scope
(@common;with-unknown-type
(@;analyse-check analyse eval;eval typeC exprC))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [_ [analysisT analysisA]])
(and (type/= codeT analysisT)
(case [exprC analysisA]
@@ -82,7 +82,7 @@
(&;with-scope
(@common;with-unknown-type
(@;analyse-coerce analyse eval;eval typeC exprC))))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success [_ [analysisT analysisA]])
(type/= codeT analysisT)
diff --git a/new-luxc/test/test/luxc/lang/synthesis/case/special.lux b/new-luxc/test/test/luxc/lang/synthesis/case/special.lux
index 585c7d349..1ae6ad030 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/case/special.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/case/special.lux
@@ -3,7 +3,7 @@
(lux [io]
(control [monad #+ do]
pipe)
- (meta [code])
+ (macro [code])
["r" math/random "r/" Monad<Random>]
test)
(luxc (lang ["la" analysis]
diff --git a/new-luxc/test/test/luxc/lang/synthesis/common.lux b/new-luxc/test/test/luxc/lang/synthesis/common.lux
index a74c64402..caa2d09dc 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/common.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/common.lux
@@ -2,7 +2,7 @@
lux
(lux (data [bool "bool/" Eq<Bool>]
[text "text/" Eq<Text>])
- (meta [code])
+ (macro [code])
["r" math/random "r/" Monad<Random>])
(luxc (lang ["la" analysis]
["ls" synthesis])))
diff --git a/new-luxc/test/test/luxc/lang/synthesis/function.lux b/new-luxc/test/test/luxc/lang/synthesis/function.lux
index f364536cb..259bf5a4e 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/function.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/function.lux
@@ -10,7 +10,7 @@
(coll [list "list/" Functor<List> Fold<List>]
[dict #+ Dict]
[set]))
- (meta [code])
+ (macro [code])
["r" math/random "r/" Monad<Random>]
test)
(luxc (lang ["la" analysis]
diff --git a/new-luxc/test/test/luxc/lang/synthesis/loop.lux b/new-luxc/test/test/luxc/lang/synthesis/loop.lux
index 90b303857..386b06dcd 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/loop.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/loop.lux
@@ -7,7 +7,7 @@
(coll [list "list/" Functor<List> Fold<List>]
["s" set])
text/format)
- (meta [code])
+ (macro [code])
["r" math/random "r/" Monad<Random>]
test)
(luxc (lang ["la" analysis]
diff --git a/new-luxc/test/test/luxc/lang/synthesis/primitive.lux b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux
index d907a4c04..47f394117 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/primitive.lux
@@ -4,7 +4,7 @@
(control [monad #+ do]
pipe)
(data text/format)
- (meta [code])
+ (macro [code])
["r" math/random]
test)
(luxc (lang ["la" analysis]
diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux
index ace2e0290..d843e6e1c 100644
--- a/new-luxc/test/test/luxc/lang/translation/case.lux
+++ b/new-luxc/test/test/luxc/lang/translation/case.lux
@@ -7,8 +7,8 @@
text/format
(coll [list]))
["r" math/random "r/" Monad<Random>]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
test)
(luxc (lang ["ls" synthesis]
(translation ["@" case]
@@ -63,13 +63,14 @@
))))
(context: "Pattern-matching."
- (<| (times +100)
+ (<| (seed +517905247826)
+ ## (times +100)
(do @
[[valueS pathS] gen-case
to-bind r;nat]
($_ seq
(test "Can translate pattern-matching."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (@;translate-case expressionT;translate
valueS
@@ -79,21 +80,21 @@
("lux case seq" ("lux case bind" +0)
("lux case exec" false)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(:! Bool valueT)
(#e;Error error)
false)))
(test "Can bind values."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[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 []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= to-bind (:! Nat valueT))
diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux
index 999f4f432..726b51b58 100644
--- a/new-luxc/test/test/luxc/lang/translation/function.lux
+++ b/new-luxc/test/test/luxc/lang/translation/function.lux
@@ -9,8 +9,8 @@
(coll ["a" array]
[list "list/" Functor<List>]))
["r" math/random "r/" Monad<Random>]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
[host]
test)
(luxc (lang ["ls" synthesis]
@@ -47,11 +47,11 @@
cut-off (|> cut-off (n.min (n.dec last-arg)))]]
($_ seq
(test "Can read arguments."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` ("lux call" (~ functionS) (~@ argsS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= arg-value (:! Nat valueT))
@@ -59,7 +59,7 @@
false)))
(test "Can partially apply functions."
(or (n.= +1 arity)
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[#let [partial-arity (n.inc cut-off)
preS (list;take partial-arity argsS)
postS (list;drop partial-arity argsS)]
@@ -68,7 +68,7 @@
("lux call" (~ functionS) (~@ preS))
(~@ postS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= arg-value (:! Nat valueT))
@@ -76,7 +76,7 @@
false))))
(test "Can read environment."
(or (n.= +1 arity)
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[#let [env (|> (list;n.range +0 cut-off)
(list/map (|>. n.inc nat-to-int)))
super-arity (n.inc cut-off)
@@ -90,7 +90,7 @@
runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` ("lux call" (~ functionS) (~@ argsS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= arg-value (:! Nat valueT))
diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux
index 40e98f109..ad4f57107 100644
--- a/new-luxc/test/test/luxc/lang/translation/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux
@@ -8,8 +8,8 @@
[bool "B/" Eq<Bool>]
[text "T/" Eq<Text>])
["r" math/random]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
test)
(luxc (lang [";L" host]
["ls" synthesis]
@@ -31,10 +31,10 @@
(with-expansions
[<tests> (do-template [<desc> <type> <synthesis> <sample> <test>]
[(test (format "Can translate " <desc> ".")
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (<synthesis> <sample>))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> <sample> (:! <type> valueT))
@@ -49,10 +49,10 @@
["text" Text code;text %text% T/=])]
($_ seq
(test "Can translate unit."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (' []))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(is hostL;unit (:! Text 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 38036e420..9eb5050bb 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
@@ -12,8 +12,8 @@
(coll ["a" array]
[list]))
["r" math/random]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
[host]
test)
(luxc (lang ["ls" synthesis]
@@ -30,11 +30,11 @@
subject r;nat]
(with-expansions [<binary> (do-template [<name> <reference>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name> (~ (code;nat subject))
(~ (code;nat param)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= (<reference> param subject) (:! Nat valueT))
@@ -49,10 +49,10 @@
)]
($_ seq
(test "bit count"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("lux bit count" (~ (code;nat subject)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= (bit;count subject) (:! Nat valueT))
@@ -61,12 +61,12 @@
<binary>
(test "bit shift-right"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("lux bit shift-right"
(~ (code;int (nat-to-int subject)))
(~ (code;nat param)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(i.= (bit;signed-shift-right param (nat-to-int subject))
(:! Int valueT))
@@ -83,10 +83,10 @@
(`` ($_ seq
(~~ (do-template [<name> <reference>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= <reference> (:! Nat valueT))
@@ -98,10 +98,10 @@
))
(~~ (do-template [<name> <type> <prepare> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name> (~ (code;nat subject)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<prepare> subject) (:! <type> valueT))
@@ -113,11 +113,11 @@
))
(~~ (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;nat subject)) (~ (code;nat param)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<reference> param subject) (:! <outputT> valueT))
@@ -141,10 +141,10 @@
subject r;int]
(with-expansions [<nullary> (do-template [<name> <reference>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(i.= <reference> (:! Int valueT))
@@ -156,10 +156,10 @@
)
<unary> (do-template [<name> <type> <prepare> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name> (~ (code;int subject)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<prepare> subject) (:! <type> valueT))
@@ -171,11 +171,11 @@
)
<binary> (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;int subject)) (~ (code;int param)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<reference> param subject) (:! <outputT> valueT))
@@ -203,11 +203,11 @@
subject r;frac]
(with-expansions [<binary> (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;frac subject)) (~ (code;frac param)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<reference> param subject) (:! <outputT> valueT))
@@ -233,10 +233,10 @@
subject r;frac]
(with-expansions [<nullary> (do-template [<name> <test>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> (:! Frac valueT))
@@ -252,11 +252,11 @@
)
<unary> (do-template [<name> <type> <prepare> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;frac subject)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<prepare> subject) (:! <type> valueT))
@@ -270,11 +270,11 @@
<nullary>
<unary>
(test "frac encode|decode"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` ("lux frac decode" ("lux frac encode" (~ (code;frac subject))))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (^multi (#e;Success valueT)
[(:! (Maybe Frac) valueT) (#;Some value)])
(f.= subject value)
@@ -299,10 +299,10 @@
(`` ($_ seq
(~~ (do-template [<name> <reference>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<name>)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(d.= <reference> (:! Deg valueT))
@@ -314,11 +314,11 @@
))
(~~ (do-template [<name> <type> <prepare> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;deg subject)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<prepare> subject) (:! <type> valueT))
@@ -329,11 +329,11 @@
))
(~~ (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;deg subject)) (~ (code;deg param)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<reference> param subject) (:! <outputT> valueT))
@@ -350,11 +350,11 @@
))
(~~ (do-template [<name> <reference> <outputT> <comp>]
[(test <name>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` (<name> (~ (code;deg subject)) (~ (code;nat special)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<comp> (<reference> special subject) (:! <outputT> 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 c2b699ff2..f5b1e97df 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
@@ -12,8 +12,8 @@
text/format
(coll [list]))
["r" math/random "r/" Monad<Random>]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
[host]
test)
(luxc (lang [";L" host]
@@ -31,10 +31,10 @@
#let [frac-sample (int-to-frac int-sample)]]
(with-expansions [<2step> (do-template [<step1> <step2> <tag> <sample> <cast> <test>]
[(test (format <step1> " / " <step2>)
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (|> (~ (<tag> <sample>)) <step1> <step2> (`)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> <sample> (:! <cast> valueT))
@@ -62,10 +62,10 @@
(`` ($_ seq
(~~ (do-template [<step1> <step2> <step3> <tag> <sample> <cast> <test>]
[(test (format <step1> " / " <step2> " / " <step3>)
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> (`)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> <sample> (:! <cast> valueT))
@@ -88,10 +88,10 @@
(`` ($_ seq
(~~ (do-template [<step1> <step2> <step3> <step4> <tag> <sample> <cast> <test>]
[(test (format <step1> " / " <step2> " / " <step3>)
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (|> (~ (<tag> <sample>)) <step1> <step2> <step3> <step4> (`)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> <sample> (:! <cast> valueT))
@@ -126,12 +126,12 @@
#let [subject (<augmentation> param)]]
(with-expansions [<tests> (do-template [<procedure> <reference>]
[(test <procedure>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<post> ((~ (code;text <procedure>))
(<pre> (~ (<tag> subject)))
(<pre> (~ (<tag> param)))))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> (<reference> param subject)
(:! <type> valueT))
@@ -164,12 +164,12 @@
(`` ($_ seq
(~~ (do-template [<procedure> <reference>]
[(test <procedure>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` (<post> ((~ (code;text <procedure>))
(<convert> (~ (code;nat subject)))
(<convert> (~ (code;nat param)))))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(n.= (<reference> param subject)
(:! Nat valueT))
@@ -197,12 +197,12 @@
(`` ($_ seq
(~~ (do-template [<procedure> <reference> <type> <test> <pre-subject> <pre>]
[(test <procedure>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[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 []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(<test> (<reference> shift (<pre-subject> subject))
(:! <type> valueT))
@@ -228,12 +228,12 @@
subject <generator>]
(with-expansions [<tests> (do-template [<procedure> <reference>]
[(test <procedure>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ((~ (code;text <procedure>))
(<pre> (~ (<tag> subject)))
(<pre> (~ (<tag> param))))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(bool/= (<reference> param subject)
(:! Bool valueT))
@@ -282,7 +282,7 @@
valueC gen-int]
(with-expansions [<array> (do-template [<class> <type> <value> <test> <input> <post>]
[(test <class>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (|> (jvm//array//new +0 <class> size)
(jvm//array//write <class> idx <input>)
(jvm//array//read <class> idx)
@@ -290,7 +290,7 @@
<post>
(`)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputZ)
(<test> <value> (:! <type> outputZ))
@@ -331,7 +331,7 @@
valueC gen-int]
(with-expansions [<array> (do-template [<class> <type> <value> <test> <input> <post>]
[(test <class>
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (|> (jvm//array//new +0 <class> size)
(jvm//array//write <class> idx <input>)
(jvm//array//read <class> idx)
@@ -339,7 +339,7 @@
<post>
(`)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(<test> <value> (:! <type> outputT))
@@ -356,7 +356,7 @@
($_ seq
<array>
(test "java.lang.Double (level 1)"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[#let [inner (|> ("jvm array new" +0 "java.lang.Double" (~ (code;nat size)))
("jvm array write" "java.lang.Double" (~ (code;nat idx)) (~ (code;frac valueD)))
(`))]
@@ -366,17 +366,17 @@
("jvm array read" "java.lang.Double" (~ (code;nat idx)))
(`)))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(f.= valueD (:! Frac outputT))
(#e;Error error)
false)))
(test "jvm array length"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code;nat size))))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(n.= size (:! Nat outputT))
@@ -423,44 +423,44 @@
instance instance-gen]
($_ seq
(test "jvm object null"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm object null?" ("jvm object null"))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(:! Bool outputT)
(#e;Error error)
false)))
(test "jvm object null?"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm object null?" (~ (code;int sample)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(not (:! Bool outputT))
(#e;Error error)
false)))
(test "jvm object synchronized"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm object synchronized" (~ (code;int monitor)) (~ (code;int sample)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(i.= sample (:! Int outputT))
(#e;Error error)
false)))
(test "jvm object throw"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[_ @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 []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(case (:! (e;Error Top) outputT)
(#e;Error error)
@@ -472,20 +472,20 @@
(#e;Error error)
false)))
(test "jvm object class"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm object class" (~ (code;text class)))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(|> outputT (:! Class) (Class.getName []) (text/= class))
(#e;Error error)
false)))
(test "jvm object instance?"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm object instance?" (~ (code;text instance-class)) (~ instance))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(:! Bool outputT)
@@ -512,43 +512,43 @@
(~ type-codeS) (~ idl-typeS) (~ shortS)))]]
($_ seq
(test "jvm member static get"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm convert int-to-long" ("jvm member static get" "java.util.GregorianCalendar" "AD" "int"))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(i.= GregorianCalendar.AD (:! Int outputT))
(#e;Error error)
false)))
(test "jvm member static put"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[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 []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(is hostL;unit (:! Text outputT))
(#e;Error error)
false)))
(test "jvm member virtual get"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(text/= sample-string (:! Text outputT))
(#e;Error error)
false)))
(test "jvm member virtual put"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[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 []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(text/= other-sample-string (:! Text outputT))
@@ -570,42 +570,42 @@
array-listS (` ("jvm member invoke constructor" "java.util.ArrayList" (~ intS)))]]
($_ seq
(test "jvm member invoke static"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm member invoke static" "java.lang.Long" "decode" "java.lang.Long" (~ coded-intS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(i.= sample (:! Int outputT))
(#e;Error error)
false)))
(test "jvm member invoke virtual"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm member invoke virtual" "java.lang.Object" "equals" "boolean"
(~ (code;int sample)) (~ object-longS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(:! Bool outputT)
(#e;Error error)
false)))
(test "jvm member invoke interface"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (` ("jvm member invoke interface" "java.util.Collection" "add" "boolean"
(~ array-listS) (~ object-longS))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(:! Bool outputT)
(#e;Error error)
false)))
(test "jvm member invoke constructor"
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate array-listS)]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(host;instance? ArrayList (:! Object outputT))
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
index 50d6cffbf..1ad68263d 100644
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ b/new-luxc/test/test/luxc/lang/translation/reference.lux
@@ -6,8 +6,8 @@
(data ["e" error]
[text])
["r" math/random]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
test)
(luxc (lang ["_;" module]
(host ["$" jvm]
@@ -45,12 +45,12 @@
#let [valueI (|>. ($i;long def-value) ($i;wrap #$;Long))]]
($_ seq
(test "Can refer to definitions."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[_ (_module;with-module +0 module-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 []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(i.= def-value (:! Int valueT))
@@ -65,13 +65,13 @@
value r;int]
($_ seq
(test "Can refer to local variables/registers."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (caseT;translate-let expressionT;translate
register
(code;int value)
(` ((~ (code;int (nat-to-int register))))))]
(evalT;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success outputT)
(i.= value (:! Int outputT))
diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux
index d8f7bc98f..68a394261 100644
--- a/new-luxc/test/test/luxc/lang/translation/structure.lux
+++ b/new-luxc/test/test/luxc/lang/translation/structure.lux
@@ -11,8 +11,8 @@
(coll [array]
[list]))
["r" math/random "r/" Monad<Random>]
- [meta]
- (meta [code])
+ [macro]
+ (macro [code])
[host]
test)
(luxc (lang [";L" host]
@@ -66,10 +66,10 @@
[size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2))))
members (r;list size gen-primitive)]
(test "Can translate tuple."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[sampleI (expressionT;translate (code;tuple members))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(let [valueT (:! (Array Top) valueT)]
(and (n.= size (array;size valueT))
@@ -86,11 +86,11 @@
#let [last? (n.= (n.dec num-tags) tag)]
member gen-primitive]
(test "Can translate variant."
- (|> (do meta;Monad<Meta>
+ (|> (do macro;Monad<Meta>
[runtime-bytecode @runtime;translate
sampleI (expressionT;translate (` ((~ (code;nat tag)) (~ (code;bool last?)) (~ member))))]
(@eval;eval sampleI))
- (meta;run (init-compiler []))
+ (macro;run (init-compiler []))
(case> (#e;Success valueT)
(let [valueT (:! (Array Top) valueT)]
(and (n.= +3 (array;size valueT))