diff options
author | Eduardo Julian | 2017-12-01 18:13:05 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-12-01 18:13:05 -0400 |
commit | 84a71e373e01f36c57d1bf42b7946f3a8b212d4f (patch) | |
tree | 6aacee5d18fca8277c2c532b9e48aa8b3779d8e4 /new-luxc/test/test/luxc/lang/synthesis/structure.lux | |
parent | 4433c9bcd6c6cac44c018aad2e21a5b4d7cc4896 (diff) |
- Got the tests to compile again.
Diffstat (limited to 'new-luxc/test/test/luxc/lang/synthesis/structure.lux')
-rw-r--r-- | new-luxc/test/test/luxc/lang/synthesis/structure.lux | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/new-luxc/test/test/luxc/lang/synthesis/structure.lux b/new-luxc/test/test/luxc/lang/synthesis/structure.lux index eab568bbe..e401149ec 100644 --- a/new-luxc/test/test/luxc/lang/synthesis/structure.lux +++ b/new-luxc/test/test/luxc/lang/synthesis/structure.lux @@ -1,4 +1,4 @@ -(;module: +(.module: lux (lux [io] (control [monad #+ do] @@ -10,21 +10,21 @@ test) (luxc (lang ["la" analysis] ["ls" synthesis] - (synthesis [";S" expression]))) - (.. common)) + (synthesis [".S" expression]))) + (// common)) (context: "Variants" (<| (times +100) (do @ - [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) - tagA (|> r;nat (:: @ map (n.% size))) + [size (|> r.nat (:: @ map (|>> (n/% +10) (n/max +2)))) + tagA (|> r.nat (:: @ map (n/% size))) memberA gen-primitive] ($_ seq (test "Can synthesize variants." - (|> (expressionS;synthesize (la;sum tagA size +0 memberA)) - (case> (^ [_ (#;Form (list [_ (#;Nat tagS)] [_ (#;Bool last?S)] memberS))]) - (and (n.= tagA tagS) - (B/= (n.= (n.dec size) tagA) + (|> (expressionS.synthesize (la.sum tagA size +0 memberA)) + (case> (^ [_ (#.Form (list [_ (#.Nat tagS)] [_ (#.Bool last?S)] memberS))]) + (and (n/= tagA tagS) + (B/= (n/= (n/dec size) tagA) last?S) (corresponds? memberA memberS)) @@ -35,14 +35,14 @@ (context: "Tuples" (<| (times +100) (do @ - [size (|> r;nat (:: @ map (|>. (n.% +10) (n.max +2)))) - membersA (r;list size gen-primitive)] + [size (|> r.nat (:: @ map (|>> (n/% +10) (n/max +2)))) + membersA (r.list size gen-primitive)] ($_ seq (test "Can synthesize tuple." - (|> (expressionS;synthesize (la;product membersA)) - (case> [_ (#;Tuple membersS)] - (and (n.= size (list;size membersS)) - (list;every? (product;uncurry corresponds?) (list;zip2 membersA membersS))) + (|> (expressionS.synthesize (la.product membersA)) + (case> [_ (#.Tuple membersS)] + (and (n/= size (list.size membersS)) + (list.every? (product.uncurry corresponds?) (list.zip2 membersA membersS))) _ false))) |