aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/test/test/luxc/lang/synthesis/structure.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/test/test/luxc/lang/synthesis/structure.lux')
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/structure.lux30
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)))