diff options
author | Eduardo Julian | 2017-10-18 12:42:46 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-18 12:42:46 -0400 |
commit | 901b09dada43ec6f3b21618800ec7400fda54a0d (patch) | |
tree | d62dde3df2ce4fd7d7cd8d0b177f6592f87817cb /new-luxc/test/test/luxc/analyser/procedure | |
parent | 14e381de130f0c8d3e333cf0523c6c98b9aa84b1 (diff) |
- Updated to the latest changes in stdlib.
Diffstat (limited to 'new-luxc/test/test/luxc/analyser/procedure')
-rw-r--r-- | new-luxc/test/test/luxc/analyser/procedure/common.lux | 54 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux | 16 |
2 files changed, 35 insertions, 35 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))) )) diff --git a/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux b/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux index 49d51eb3c..5cf359ad0 100644 --- a/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux +++ b/new-luxc/test/test/luxc/analyser/procedure/host.jvm.lux @@ -4,7 +4,7 @@ (control [monad #+ do] pipe) (concurrency [atom]) - (data ["R" result] + (data ["e" error] [product] [maybe] [text "text/" Eq<Text>] @@ -13,9 +13,9 @@ [list "list/" Fold<List>] [dict])) ["r" math/random "r/" Monad<Random>] - [type] - [macro #+ Monad<Lux>] - (macro [code]) + [meta #+ Monad<Meta>] + (meta [code] + [type]) test) (luxc ["&" base] ["&;" scope] @@ -32,16 +32,16 @@ (do-template [<name> <success> <failure>] [(def: (<name> procedure params output-type) (-> Text (List Code) Type Bool) - (|> (do Monad<Lux> + (|> (do Monad<Meta> [runtime-bytecode @runtime;generate] (&;with-scope (&;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 error) + (#e;Error error) <failure>)))] [success true false] |