aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/parser/synthesis.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/parser/synthesis.lux50
1 files changed, 25 insertions, 25 deletions
diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux
index da6e3247f..d7709687f 100644
--- a/stdlib/source/test/lux/control/parser/synthesis.lux
+++ b/stdlib/source/test/lux/control/parser/synthesis.lux
@@ -52,9 +52,9 @@
(def: random-environment
(Random (Environment Synthesis))
(do {! random.monad}
- [size (:: ! map (n.% 5) random.nat)]
+ [size (\ ! map (n.% 5) random.nat)]
(|> ..random-variable
- (:: ! map (|>> synthesis.variable))
+ (\ ! map (|>> synthesis.variable))
(random.list size))))
(def: simple
@@ -63,12 +63,12 @@
(~~ (template [<query> <check> <random> <synthesis> <equivalence>]
[(do {! random.monad}
[expected <random>
- dummy (|> <random> (random.filter (|>> (:: <equivalence> = expected) not)))]
+ dummy (|> <random> (random.filter (|>> (\ <equivalence> = expected) not)))]
($_ _.and
(_.cover [<query>]
(|> (/.run <query> (list (<synthesis> expected)))
(!expect (^multi (#try.Success actual)
- (:: <equivalence> = expected actual)))))
+ (\ <equivalence> = expected actual)))))
(_.cover [<check>]
(and (|> (/.run (<check> expected) (list (<synthesis> expected)))
(!expect (#try.Success _)))
@@ -77,7 +77,7 @@
(exception.match? /.cannot-parse error))))))))]
[/.bit /.bit! random.bit synthesis.bit bit.equivalence]
- [/.i64 /.i64! (:: ! map .i64 random.nat) synthesis.i64 i64.equivalence]
+ [/.i64 /.i64! (\ ! map .i64 random.nat) synthesis.i64 i64.equivalence]
[/.f64 /.f64! random.safe-frac synthesis.f64 frac.equivalence]
[/.text /.text! (random.unicode 1) synthesis.text text.equivalence]
[/.local /.local! random.nat synthesis.variable/local n.equivalence]
@@ -91,7 +91,7 @@
($_ _.and
(do {! random.monad}
[expected-bit random.bit
- expected-i64 (:: ! map .i64 random.nat)
+ expected-i64 (\ ! map .i64 random.nat)
expected-f64 random.safe-frac
expected-text (random.unicode 1)]
(_.cover [/.tuple]
@@ -101,10 +101,10 @@
(synthesis.f64 expected-f64)
(synthesis.text expected-text)))))
(!expect (^multi (#try.Success [actual-bit actual-i64 actual-f64 actual-text])
- (and (:: bit.equivalence = expected-bit actual-bit)
- (:: i64.equivalence = expected-i64 actual-i64)
- (:: frac.equivalence = expected-f64 actual-f64)
- (:: text.equivalence = expected-text actual-text)))))
+ (and (\ bit.equivalence = expected-bit actual-bit)
+ (\ i64.equivalence = expected-i64 actual-i64)
+ (\ frac.equivalence = expected-f64 actual-f64)
+ (\ text.equivalence = expected-text actual-text)))))
(|> (/.run (/.tuple ($_ <>.and /.bit /.i64 /.f64 /.text))
(list (synthesis.text expected-text)))
(!expect (^multi (#try.Failure error)
@@ -117,10 +117,10 @@
(and (|> (/.run (/.function arity /.text)
(list (synthesis.function/abstraction [expected-environment arity (synthesis.text expected-body)])))
(!expect (^multi (#try.Success [actual-environment actual-body])
- (and (:: (list.equivalence synthesis.equivalence) =
- expected-environment
- actual-environment)
- (:: text.equivalence = expected-body actual-body)))))
+ (and (\ (list.equivalence synthesis.equivalence) =
+ expected-environment
+ actual-environment)
+ (\ text.equivalence = expected-body actual-body)))))
(|> (/.run (/.function arity /.text)
(list (synthesis.text expected-body)))
(!expect (^multi (#try.Failure error)
@@ -135,7 +135,7 @@
(!expect (^multi (#try.Failure error)
(exception.match? /.wrong-arity error))))))
(do {! random.monad}
- [arity (:: ! map (|>> (n.% 10) inc) random.nat)
+ [arity (\ ! map (|>> (n.% 10) inc) random.nat)
expected-offset random.nat
expected-inits (random.list arity random.bit)
expected-body (random.unicode 1)]
@@ -145,11 +145,11 @@
(list\map (|>> synthesis.bit) expected-inits)
(synthesis.text expected-body)])))
(!expect (^multi (#try.Success [actual-offset actual-inits actual-body])
- (and (:: n.equivalence = expected-offset actual-offset)
- (:: (list.equivalence bit.equivalence) =
- expected-inits
- actual-inits)
- (:: text.equivalence = expected-body actual-body)))))
+ (and (\ n.equivalence = expected-offset actual-offset)
+ (\ (list.equivalence bit.equivalence) =
+ expected-inits
+ actual-inits)
+ (\ text.equivalence = expected-body actual-body)))))
(|> (/.run (/.loop (<>.many /.bit) /.text)
(list (synthesis.text expected-body)))
(!expect (^multi (#try.Failure error)
@@ -162,23 +162,23 @@
(_.with-cover [/.Parser])
($_ _.and
(do {! random.monad}
- [expected (:: ! map (|>> synthesis.i64) random.nat)]
+ [expected (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.run /.any]
(|> (/.run /.any (list expected))
(!expect (^multi (#try.Success actual)
- (:: synthesis.equivalence = expected actual))))))
+ (\ synthesis.equivalence = expected actual))))))
(_.cover [/.empty-input]
(|> (/.run /.any (list))
(!expect (^multi (#try.Failure error)
(exception.match? /.empty-input error)))))
(do {! random.monad}
- [expected (:: ! map (|>> synthesis.i64) random.nat)]
+ [expected (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.unconsumed-input]
(|> (/.run /.any (list expected expected))
(!expect (^multi (#try.Failure error)
(exception.match? /.unconsumed-input error))))))
(do {! random.monad}
- [dummy (:: ! map (|>> synthesis.i64) random.nat)]
+ [dummy (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.end! /.expected-empty-input]
(and (|> (/.run /.end! (list))
(!expect (#try.Success _)))
@@ -186,7 +186,7 @@
(!expect (^multi (#try.Failure error)
(exception.match? /.expected-empty-input error)))))))
(do {! random.monad}
- [dummy (:: ! map (|>> synthesis.i64) random.nat)]
+ [dummy (\ ! map (|>> synthesis.i64) random.nat)]
(_.cover [/.end?]
(and (|> (/.run /.end? (list))
(!expect (#try.Success #1)))