From 62b3abfcc014ca1c19d62aacdd497f6a250b372c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 25 Jul 2021 03:12:17 -0400 Subject: Better syntax for "library/lux.^multi". --- .../specification/compositor/generation/common.lux | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'stdlib/source/specification/compositor/generation/common.lux') diff --git a/stdlib/source/specification/compositor/generation/common.lux b/stdlib/source/specification/compositor/generation/common.lux index 3d377b7ca..e14aa8e52 100644 --- a/stdlib/source/specification/compositor/generation/common.lux +++ b/stdlib/source/specification/compositor/generation/common.lux @@ -75,7 +75,7 @@ (def: (i64 run) (-> Runner Test) (do r.monad - [param (|> r.i64 (r.filter (|>> ("lux i64 =" 0) not))) + [param (|> r.i64 (r.only (|>> ("lux i64 =" 0) not))) subject r.i64] (`` ($_ _.and (~~ (template [ ] @@ -123,7 +123,7 @@ (def: (f64 run) (-> Runner Test) (do r.monad - [param (|> ..simple-frac (r.filter (|>> (f.= +0.0) not))) + [param (|> ..simple-frac (r.only (|>> (f.= +0.0) not))) subject ..simple-frac] (`` ($_ _.and (~~ (template [ ] @@ -179,7 +179,7 @@ sample-lower (r.ascii/lower-alpha sample-size) sample-upper (r.ascii/upper-alpha sample-size) sample-alpha (|> (r.ascii/alpha sample-size) - (r.filter (|>> (text\= sample-upper) not))) + (r.only (|>> (text\= sample-upper) not))) char-idx (|> r.nat (\ ! map (n.% sample-size))) #let [sample-lowerS (synthesis.text sample-lower) sample-upperS (synthesis.text sample-upper) @@ -235,7 +235,7 @@ (synthesis.i64 +0))) (run (..sanitize "lux text index")) (case> (^multi (#try.Success valueV) - [(:as (Maybe Nat) valueV) (#.Some valueV)]) + {(:as (Maybe Nat) valueV) (#.Some valueV)}) (n.= 0 valueV) _ @@ -245,7 +245,7 @@ (synthesis.i64 +0))) (run (..sanitize "lux text index")) (case> (^multi (#try.Success valueV) - [(:as (Maybe Nat) valueV) (#.Some valueV)]) + {(:as (Maybe Nat) valueV) (#.Some valueV)}) (n.= sample-size valueV) _ @@ -258,7 +258,7 @@ (synthesis.i64 length))) (run (..sanitize "lux text clip")) (case> (^multi (#try.Success valueV) - [(:as (Maybe Text) valueV) (#.Some valueV)]) + {(:as (Maybe Text) valueV) (#.Some valueV)}) (text\= expected valueV) _ @@ -272,7 +272,7 @@ (synthesis.i64 char-idx))) (run (..sanitize "lux text char")) (case> (^multi (#try.Success valueV) - [(:as (Maybe Int) valueV) (#.Some valueV)]) + {(:as (Maybe Int) valueV) (#.Some valueV)}) (text.contains? ("lux i64 char" valueV) sample-lower) @@ -303,7 +303,7 @@ (list (synthesis.text message)))}))) (run (..sanitize "lux try")) (case> (^multi (#try.Success valueV) - [(:as (Try Text) valueV) (#try.Failure error)]) + {(:as (Try Text) valueV) (#try.Failure error)}) (text.contains? message error) _ @@ -315,7 +315,7 @@ #synthesis.body (synthesis.text message)}))) (run (..sanitize "lux try")) (case> (^multi (#try.Success valueV) - [(:as (Try Text) valueV) (#try.Success valueV)]) + {(:as (Try Text) valueV) (#try.Success valueV)}) (text\= message valueV) _ -- cgit v1.2.3