diff options
author | Eduardo Julian | 2017-05-17 20:23:02 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-05-17 20:23:02 -0400 |
commit | 8bd1d1b3a4750b26f1540717839c1aa196f2a520 (patch) | |
tree | cc9d595998c3bf4d15e434480f5505fd491e39b0 /new-luxc/test/test/luxc/analyser | |
parent | 824482b2e8b13e42a524a5e4945ea3e172395c9e (diff) |
- Renamed "Error" to "Result".
Diffstat (limited to 'new-luxc/test/test/luxc/analyser')
-rw-r--r-- | new-luxc/test/test/luxc/analyser/primitive.lux | 20 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/analyser/reference.lux | 14 | ||||
-rw-r--r-- | new-luxc/test/test/luxc/analyser/struct.lux | 10 |
3 files changed, 22 insertions, 22 deletions
diff --git a/new-luxc/test/test/luxc/analyser/primitive.lux b/new-luxc/test/test/luxc/analyser/primitive.lux index 321a51fcb..6053e2fd7 100644 --- a/new-luxc/test/test/luxc/analyser/primitive.lux +++ b/new-luxc/test/test/luxc/analyser/primitive.lux @@ -9,10 +9,10 @@ (text format ["l" lexer]) [number] - ["E" error] + ["R" result] [product] (coll [list "L/" Functor<List> Fold<List>])) - ["R" math/random "R/" Monad<Random>] + ["r" math/random "R/" Monad<Random>] [type "Type/" Eq<Type>] [macro #+ Monad<Lux>] (macro [code]) @@ -27,20 +27,20 @@ (.. common)) (test: "Simple primitives" - [%bool% R;bool - %nat% R;nat - %int% R;int - %deg% R;deg - %real% R;real - %char% R;char - %text% (R;text +5)] + [%bool% r;bool + %nat% r;nat + %int% r;int + %deg% r;deg + %real% r;real + %char% r;char + %text% (r;text +5)] (with-expansions [<primitives> (do-template [<desc> <type> <tag> <value> <analyser>] [(assert (format "Can analyse " <desc> ".") (|> (@common;with-unknown-type (<analyser> <value>)) (macro;run init-compiler) - (case> (#E;Success [_type (<tag> value)]) + (case> (#R;Success [_type (<tag> value)]) (and (Type/= <type> _type) (is <value> value)) diff --git a/new-luxc/test/test/luxc/analyser/reference.lux b/new-luxc/test/test/luxc/analyser/reference.lux index 4e83a7af8..4b4355178 100644 --- a/new-luxc/test/test/luxc/analyser/reference.lux +++ b/new-luxc/test/test/luxc/analyser/reference.lux @@ -3,8 +3,8 @@ (lux [io] (control monad pipe) - (data ["E" error]) - ["R" math/random "R/" Monad<Random>] + (data ["R" result]) + ["r" math/random "R/" Monad<Random>] [type "Type/" Eq<Type>] [macro #+ Monad<Lux>] test) @@ -18,9 +18,9 @@ (test: "References" [[ref-type _] gen-simple-primitive - module-name (R;text +5) - scope-name (R;text +5) - var-name (R;text +5)] + module-name (r;text +5) + scope-name (r;text +5) + var-name (r;text +5)] ($_ seq (assert "Can analyse relative reference." (|> (&env;with-scope scope-name @@ -28,7 +28,7 @@ (@common;with-unknown-type (@;analyse-reference ["" var-name])))) (macro;run init-compiler) - (case> (#E;Success [_type (#~;Relative idx)]) + (case> (#R;Success [_type (#~;Relative idx)]) (Type/= ref-type _type) _ @@ -41,7 +41,7 @@ (@common;with-unknown-type (@;analyse-reference [module-name var-name]))) (macro;run init-compiler) - (case> (#E;Success [_type (#~;Absolute idx)]) + (case> (#R;Success [_type (#~;Absolute idx)]) (Type/= ref-type _type) _ diff --git a/new-luxc/test/test/luxc/analyser/struct.lux b/new-luxc/test/test/luxc/analyser/struct.lux index a86f6da9c..869b2b0d1 100644 --- a/new-luxc/test/test/luxc/analyser/struct.lux +++ b/new-luxc/test/test/luxc/analyser/struct.lux @@ -3,10 +3,10 @@ (lux [io] (control monad pipe) - (data ["E" error] + (data ["R" result] [product] (coll [list "L/" Functor<List>])) - ["R" math/random "R/" Monad<Random>] + ["r" math/random "R/" Monad<Random>] [type "Type/" Eq<Type>] [macro #+ Monad<Lux>] test) @@ -22,14 +22,14 @@ (analyser;analyser (:!! []))) (test: "Tuples" - [size (|> R;nat (:: @ map (|>. (n.% +10) (n.max +2)))) - primitives (R;list size gen-simple-primitive)] + [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) + primitives (r;list size gen-simple-primitive)] ($_ seq (assert "Can analyse tuple." (|> (@common;with-unknown-type (@;analyse-tuple analyse (L/map product;right primitives))) (macro;run init-compiler) - (case> (#E;Success [_type (#~;Tuple elems)]) + (case> (#R;Success [_type (#~;Tuple elems)]) (and (Type/= (type;tuple (L/map product;left primitives)) _type) (n.= size (list;size elems))) |