aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/analyser/procedure/common.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/test/test/luxc/analyser/procedure/common.lux')
-rw-r--r--new-luxc/test/test/luxc/analyser/procedure/common.lux54
1 files changed, 27 insertions, 27 deletions
diff --git a/new-luxc/test/test/luxc/analyser/procedure/common.lux b/new-luxc/test/test/luxc/analyser/procedure/common.lux
index 5e834746a..ee342971b 100644
--- a/new-luxc/test/test/luxc/analyser/procedure/common.lux
+++ b/new-luxc/test/test/luxc/analyser/procedure/common.lux
@@ -5,13 +5,13 @@
pipe)
(concurrency [atom])
(data text/format
- ["R" result]
+ ["e" error]
[product]
(coll [array]))
["r" math/random "r/" Monad<Random>]
- [type "Type/" Eq<Type>]
- [macro #+ Monad<Lux>]
- (macro [code])
+ [meta #+ Monad<Meta>]
+ (meta [code]
+ [type "type/" Eq<Type>])
test)
(luxc ["&" base]
["&;" scope]
@@ -28,11 +28,11 @@
(-> Text (List Code) Type Bool)
(|> (&;with-expected-type output-type
(@;analyse-procedure analyse procedure params))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
<success>
- (#R;Error _)
+ (#e;Error _)
<failure>)))]
[check-success+ true false]
@@ -42,7 +42,7 @@
(context: "Lux procedures"
[[primT primC] gen-primitive
[antiT antiC] (|> gen-primitive
- (r;filter (|>. product;left (Type/= primT) not)))]
+ (r;filter (|>. product;left (type/= primT) not)))]
($_ seq
(test "Can test for reference equality."
(check-success+ "lux is" (list primC primC) Bool))
@@ -237,7 +237,7 @@
sizeC (|> r;nat (:: @ map code;nat))
idxC (|> r;nat (:: @ map code;nat))
var-name (r;text +5)
- #let [arrayT (type (array;Array elemT))]]
+ #let [arrayT (type (Array elemT))]]
($_ seq
(test "Can create arrays."
(check-success+ "lux array new" (list sizeC) arrayT))
@@ -248,11 +248,11 @@
(@;analyse-procedure analyse "lux array get"
(list idxC
(code;symbol ["" var-name]))))))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
true
- (#R;Error _)
+ (#e;Error _)
false)))
(test "Can put a value inside an array."
(|> (&scope;with-scope ""
@@ -262,11 +262,11 @@
(list idxC
elemC
(code;symbol ["" var-name]))))))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
true
- (#R;Error _)
+ (#e;Error _)
false)))
(test "Can remove a value from an array."
(|> (&scope;with-scope ""
@@ -275,11 +275,11 @@
(@;analyse-procedure analyse "lux array remove"
(list idxC
(code;symbol ["" var-name]))))))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
true
- (#R;Error _)
+ (#e;Error _)
false)))
(test "Can query the size of an array."
(|> (&scope;with-scope ""
@@ -287,11 +287,11 @@
(&;with-expected-type Nat
(@;analyse-procedure analyse "lux array size"
(list (code;symbol ["" var-name]))))))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
true
- (#R;Error _)
+ (#e;Error _)
false)))
))
@@ -343,11 +343,11 @@
(&;with-expected-type elemT
(@;analyse-procedure analyse "lux atom read"
(list (code;symbol ["" var-name]))))))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
true
- (#R;Error _)
+ (#e;Error _)
false)))
(test "Can swap the value of an atomic reference."
(|> (&scope;with-scope ""
@@ -357,11 +357,11 @@
(list elemC
elemC
(code;symbol ["" var-name]))))))
- (macro;run (init-compiler []))
- (case> (#R;Success _)
+ (meta;run (init-compiler []))
+ (case> (#e;Success _)
true
- (#R;Error _)
+ (#e;Error _)
false)))
))