diff options
Diffstat (limited to '')
16 files changed, 36 insertions, 36 deletions
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux index d2d44d635..102a7a2a5 100644 --- a/stdlib/source/test/lux/data/collection/array.lux +++ b/stdlib/source/test/lux/data/collection/array.lux @@ -34,7 +34,7 @@ (def: structures Test - (do {! random.monad} + (do [! random.monad] [size ..bounded_size] ($_ _.and (_.for [/.equivalence] @@ -49,7 +49,7 @@ (def: search Test - (do {! random.monad} + (do [! random.monad] [size ..bounded_size base random.nat shift random.nat @@ -93,7 +93,7 @@ Test (<| (_.covering /._) (_.for [/.Array]) - (do {! random.monad} + (do [! random.monad] [size ..bounded_size base random.nat shift random.nat diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux index d3d7d1d05..a3f877cb1 100644 --- a/stdlib/source/test/lux/data/collection/bits.lux +++ b/stdlib/source/test/lux/data/collection/bits.lux @@ -21,11 +21,11 @@ (def: .public random (Random Bits) - (do {! random.monad} + (do [! random.monad] [size (\ ! each (n.% 1,000) random.nat)] (case size 0 (in /.empty) - _ (do {! random.monad} + _ (do [! random.monad] [idx (|> random.nat (\ ! each (n.% size)))] (in (/.one idx /.empty)))))) @@ -46,7 +46,7 @@ (_.cover [/.empty] (/.empty? /.empty)) - (do {! random.monad} + (do [! random.monad] [size (\ ! each (|>> (n.% 1,000) ++) random.nat) idx (\ ! each (n.% size) random.nat) sample ..random] diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index 4004b8ca9..60314ca82 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -30,7 +30,7 @@ (def: for_dictionaries Test - (do {! random.monad} + (do [! random.monad] [.let [capped_nat (\ random.monad each (n.% 100) random.nat)] size capped_nat dict (random.dictionary n.hash size random.nat capped_nat) diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux index 78d0afcc1..9759aa3d4 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux @@ -42,7 +42,7 @@ Test (<| (_.covering /._) (_.for [/.Dictionary]) - (do {! random.monad} + (do [! random.monad] [size (\ ! each (n.% 100) random.nat) keys (random.set n.hash size random.nat) values (random.set n.hash size random.nat) diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux index 18ca96820..56d376740 100644 --- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux +++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux @@ -33,7 +33,7 @@ Test (<| (_.covering /._) (_.for [/.PList]) - (do {! random.monad} + (do [! random.monad] [.let [gen_key (random.ascii/alpha 10)] size (\ ! each (n.% 100) random.nat) sample (..random size gen_key random.nat) diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index ab2809406..639e69400 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -39,7 +39,7 @@ (def: random (Random (List Nat)) - (do {! random.monad} + (do [! random.monad] [size ..bounded_size] (|> random.nat (random.set n.hash size) @@ -65,7 +65,7 @@ (_.for [/.monad] ($monad.spec /\in /.equivalence /.monad)) - (do {! random.monad} + (do [! random.monad] [parameter random.nat subject random.nat] (let [lifted (/.lifted io.monad) @@ -85,7 +85,7 @@ (def: whole Test - (do {! random.monad} + (do [! random.monad] [size ..bounded_size .let [(^open "/\.") (/.equivalence n.equivalence)] sample (\ ! each set.list (random.set n.hash size random.nat))] @@ -131,7 +131,7 @@ Test (let [(^open "/\.") (/.equivalence n.equivalence) (^open "/\.") /.functor] - (do {! random.monad} + (do [! random.monad] [sample ..random .let [size (/.size sample)]] ($_ _.and @@ -180,7 +180,7 @@ Test (let [(^open "/\.") (/.equivalence n.equivalence) (^open "/\.") /.monoid] - (do {! random.monad} + (do [! random.monad] [sample (random.only (|>> /.size (n.> 0)) ..random) .let [size (/.size sample)] @@ -228,7 +228,7 @@ (def: member Test (let [(^open "/\.") (/.equivalence n.equivalence)] - (do {! random.monad} + (do [! random.monad] [sample ..random] (`` ($_ _.and (_.cover [/.member?] @@ -275,7 +275,7 @@ +/3 (: (-> Nat Nat Nat Nat) (function (_ left mid right) ($_ n.+ left mid right)))] - (do {! random.monad} + (do [! random.monad] [sample/0 ..random sample/1 ..random sample/2 ..random] @@ -357,7 +357,7 @@ (if (n.even? value) (#.Some (\ n.decimal encoded value)) #.None)))] - (do {! random.monad} + (do [! random.monad] [sample ..random] ($_ _.and (_.cover [/.one] @@ -395,7 +395,7 @@ (_.for [.List]) (let [(^open "/\.") (/.equivalence n.equivalence) (^open "/\.") /.functor] - (do {! random.monad} + (do [! random.monad] [sample ..random separator random.nat] ($_ _.and diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux index 52de12d28..7a24ad89d 100644 --- a/stdlib/source/test/lux/data/collection/queue.lux +++ b/stdlib/source/test/lux/data/collection/queue.lux @@ -27,7 +27,7 @@ Test (<| (_.covering /._) (_.for [/.Queue]) - (do {! random.monad} + (do [! random.monad] [size (\ ! each (n.% 100) random.nat) members (random.set n.hash size random.nat) non_member (random.only (|>> (set.member? members) not) diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux index 7b1335d77..2f61d3e57 100644 --- a/stdlib/source/test/lux/data/collection/queue/priority.lux +++ b/stdlib/source/test/lux/data/collection/queue/priority.lux @@ -17,7 +17,7 @@ (def: .public (random size) (-> Nat (Random (Queue Nat))) - (do {! random.monad} + (do [! random.monad] [inputs (random.list size random.nat)] (monad.mix ! (function (_ head tail) (do ! @@ -30,7 +30,7 @@ Test (<| (_.covering /._) (_.for [/.Queue]) - (do {! random.monad} + (do [! random.monad] [size (\ ! each (n.% 100) random.nat) sample (..random size) non_member_priority random.nat diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux index ca06073df..af3acdb18 100644 --- a/stdlib/source/test/lux/data/collection/row.lux +++ b/stdlib/source/test/lux/data/collection/row.lux @@ -28,7 +28,7 @@ (def: signatures Test - (do {! random.monad} + (do [! random.monad] [size (\ ! each (n.% 100) random.nat)] ($_ _.and (_.for [/.equivalence] @@ -47,7 +47,7 @@ (def: whole Test - (do {! random.monad} + (do [! random.monad] [size (\ ! each (n.% 100) random.nat) sample (random.set n.hash size random.nat) .let [sample (|> sample set.list /.of_list)] @@ -80,7 +80,7 @@ (def: index_based Test - (do {! random.monad} + (do [! random.monad] [size (\ ! each (|>> (n.% 100) ++) random.nat)] ($_ _.and (do ! @@ -133,7 +133,7 @@ Test (<| (_.covering /._) (_.for [/.Row]) - (do {! random.monad} + (do [! random.monad] [size (\ ! each (|>> (n.% 100) ++) random.nat)] ($_ _.and ..signatures diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index f3a3f604c..cd5427b16 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -43,7 +43,7 @@ (<| (_.covering /._) (_.for [/.Sequence]) (let [(^open "list\.") (list.equivalence n.equivalence)]) - (do {! random.monad} + (do [! random.monad] [repeated random.nat index (\ ! each (n.% 100) random.nat) size (\ ! each (|>> (n.% 10) ++) random.nat) diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux index c425492d8..ec572c03c 100644 --- a/stdlib/source/test/lux/data/collection/set.lux +++ b/stdlib/source/test/lux/data/collection/set.lux @@ -29,7 +29,7 @@ Test (<| (_.covering /._) (_.for [/.Set]) - (do {! random.monad} + (do [! random.monad] [size ..gen_nat] ($_ _.and (_.for [/.equivalence] diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index 1037b0ed6..c1a5d6fa5 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -27,7 +27,7 @@ (def: .public (random size hash count element) (All (_ a) (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a)))) - (do {! random.monad} + (do [! random.monad] [elements (random.set hash size element) element_counts (random.list size ..count)] (in (list\mix (function (_ [count element] set) @@ -38,7 +38,7 @@ (def: signature Test - (do {! random.monad} + (do [! random.monad] [diversity (\ ! each (n.% 10) random.nat)] ($_ _.and (_.for [/.equivalence] @@ -52,7 +52,7 @@ (def: composition Test - (do {! random.monad} + (do [! random.monad] [diversity (\ ! each (n.% 10) random.nat) sample (..random diversity n.hash ..count random.nat) another (..random diversity n.hash ..count random.nat)] @@ -112,7 +112,7 @@ Test (<| (_.covering /._) (_.for [/.Set]) - (do {! random.monad} + (do [! random.monad] [diversity (\ ! each (n.% 10) random.nat) sample (..random diversity n.hash ..count random.nat) non_member (random.only (predicate.complement (set.member? (/.support sample))) diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index 2b3074039..c2133dd11 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -40,7 +40,7 @@ Test (<| (_.covering /._) (_.for [/.Set]) - (do {! random.monad} + (do [! random.monad] [sizeL ..size sizeR ..size usetL (random.set n.hash sizeL random.nat) diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux index 66607cc37..0aba27125 100644 --- a/stdlib/source/test/lux/data/collection/tree.lux +++ b/stdlib/source/test/lux/data/collection/tree.lux @@ -21,7 +21,7 @@ (def: .public (tree gen_value) (All (_ a) (-> (Random a) (Random [Nat (Tree a)]))) - (do {! random.monad} + (do [! random.monad] [value gen_value num_children (\ ! each (n.% 2) random.nat) children (random.list num_children (tree gen_value))] @@ -56,7 +56,7 @@ (\ (list.equivalence n.equivalence) = (list expected) (/.flat (/.leaf expected))))) - (do {! random.monad} + (do [! random.monad] [value random.nat num_children (\ ! each (n.% 3) random.nat) children (random.list num_children random.nat)] diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux index 754d1b20b..09c9af569 100644 --- a/stdlib/source/test/lux/data/collection/tree/finger.lux +++ b/stdlib/source/test/lux/data/collection/tree/finger.lux @@ -32,7 +32,7 @@ Test (<| (_.covering /._) (_.for [/.Tree]) - (do {! random.monad} + (do [! random.monad] [tag_left (random.ascii/alpha_num 1) tag_right (random.only (|>> (text\= tag_left) not) (random.ascii/alpha_num 1)) diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux index 8e3d064bc..9f780415c 100644 --- a/stdlib/source/test/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux @@ -155,7 +155,7 @@ Test (<| (_.covering /._) (_.for [/.Zipper]) - (do {! random.monad} + (do [! random.monad] [[size sample] (//.tree random.nat) expected random.nat dummy (random.only (|>> (n.= expected) not) random.nat) |