aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r--stdlib/source/test/lux/data/binary.lux38
-rw-r--r--stdlib/source/test/lux/data/bit.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux80
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux50
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux22
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux14
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux22
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux36
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux40
-rw-r--r--stdlib/source/test/lux/data/collection/stack.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/stream.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux48
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux64
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux2
-rw-r--r--stdlib/source/test/lux/data/color.lux34
-rw-r--r--stdlib/source/test/lux/data/color/named.lux4
-rw-r--r--stdlib/source/test/lux/data/format/binary.lux2
-rw-r--r--stdlib/source/test/lux/data/format/json.lux26
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux18
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux2
-rw-r--r--stdlib/source/test/lux/data/product.lux6
-rw-r--r--stdlib/source/test/lux/data/sum.lux38
-rw-r--r--stdlib/source/test/lux/data/text.lux66
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux2
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux2
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux16
-rw-r--r--stdlib/source/test/lux/data/text/format.lux8
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux16
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux8
34 files changed, 368 insertions, 368 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 15df63e2e..b0eea56fa 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -44,7 +44,7 @@
[byte random.nat]
(exec (try.trusted (/.has_8! idx byte output))
(again (++ idx))))
- (# random.monad in output)))))
+ (at random.monad in output)))))
(def: (throws? exception try)
(All (_ e a) (-> (Exception e) (Try a) Bit))
@@ -84,13 +84,13 @@
(<| (_.covering !._)
(_.for [!.Binary])
(do [! random.monad]
- [.let [gen_size (|> random.nat (# ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (at ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (# ! each (n.% size)))]
+ .let [gen_idx (|> random.nat (at ! each (n.% size)))]
offset gen_idx
- length (# ! each (n.% (n.- offset size)) random.nat)]
+ length (at ! each (n.% (n.- offset size)) random.nat)]
(`` (all _.and
(_.for [!.=]
($equivalence.spec (function (_ left right)
@@ -128,9 +128,9 @@
reader (function (_ binary idx)
(!.bits_8 idx binary))]
(and (n.= length (!.size random_slice))
- (# (list.equivalence n.equivalence) =
- (list#each (|>> (n.+ offset) (reader sample)) idxs)
- (list#each (reader random_slice) idxs)))))
+ (at (list.equivalence n.equivalence) =
+ (list#each (|>> (n.+ offset) (reader sample)) idxs)
+ (list#each (reader random_slice) idxs)))))
(_.coverage [!.copy!]
(and (let [it (!.copy! size 0 sample 0 (!.empty size))]
(and (not (same? sample it))
@@ -148,26 +148,26 @@
(<| (_.covering /._)
(_.for [/.Binary])
(do [! random.monad]
- [.let [gen_size (|> random.nat (# ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (at ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (# ! each (n.% size)))]
- offset (# ! each (n.max 1) gen_idx)
- length (# ! each (n.% (n.- offset size)) random.nat)]
+ .let [gen_idx (|> random.nat (at ! each (n.% size)))]
+ offset (at ! each (n.max 1) gen_idx)
+ length (at ! each (n.% (n.- offset size)) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random size)))
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
(_.coverage [/.mix]
- (n.= (# list.mix mix n.+ 0 (..as_list sample))
+ (n.= (at list.mix mix n.+ 0 (..as_list sample))
(/.mix n.+ 0 sample)))
(_.coverage [/.empty]
- (# /.equivalence =
- (/.empty size)
- (/.empty size)))
+ (at /.equivalence =
+ (/.empty size)
+ (/.empty size)))
(_.coverage [/.size]
(|> (/.empty size) /.size (n.= size)))
(_.for [/.index_out_of_bounds]
@@ -192,7 +192,7 @@
(case [(monad.each try.monad (|>> (n.+ offset) (reader sample)) idxs)
(monad.each try.monad (reader random_slice) idxs)]
[{try.#Success binary_vals} {try.#Success slice_vals}]
- (# (list.equivalence n.equivalence) = binary_vals slice_vals)
+ (at (list.equivalence n.equivalence) = binary_vals slice_vals)
_
#0))))
@@ -203,8 +203,8 @@
0 (not verdict)
_ verdict))))
(_.coverage [/.after]
- (and (# /.equivalence = sample (/.after 0 sample))
- (# /.equivalence = (/.empty 0) (/.after size sample))
+ (and (at /.equivalence = sample (/.after 0 sample))
+ (at /.equivalence = (/.empty 0) (/.after size sample))
(n.= (n.- offset size) (/.size (/.after offset sample)))
(case (list.reversed (..as_list sample))
{.#End}
@@ -217,7 +217,7 @@
(and (case (/.copy! size 0 sample 0 (/.empty size))
{try.#Success output}
(and (not (same? sample output))
- (# /.equivalence = sample output))
+ (at /.equivalence = sample output))
{try.#Failure _}
false)
diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux
index 3ce9f5223..868c673f6 100644
--- a/stdlib/source/test/lux/data/bit.lux
+++ b/stdlib/source/test/lux/data/bit.lux
@@ -34,12 +34,12 @@
($codec.spec /.equivalence /.codec random.bit))
(_.coverage [/.no /.yes]
- (and (# /.equivalence = false /.no)
- (# /.equivalence = true /.yes)))
+ (and (at /.equivalence = false /.no)
+ (at /.equivalence = true /.yes)))
(_.coverage [/.off /.on]
- (and (# /.equivalence = false /.off)
- (# /.equivalence = true /.on)))
+ (and (at /.equivalence = false /.off)
+ (at /.equivalence = true /.on)))
(_.coverage [/.complement]
- (and (not (# /.equivalence = value ((/.complement function.identity) value)))
- (# /.equivalence = value ((/.complement not) value))))
+ (and (not (at /.equivalence = value ((/.complement function.identity) value)))
+ (at /.equivalence = value ((/.complement not) value))))
))))
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index ee06a8073..d62e20981 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -34,8 +34,8 @@
(def: bounded_size
(Random Nat)
- (# random.monad each (|>> (n.% 20) ++)
- random.nat))
+ (at random.monad each (|>> (n.% 20) ++)
+ random.nat))
(def: structures
Test
@@ -66,11 +66,11 @@
choose (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (# n.decimal encoded value)}
+ {.#Some (at n.decimal encoded value)}
{.#None})))]
(_.coverage [/.one]
(case [(|> evens
- (/#each (# n.decimal encoded))
+ (/#each (at n.decimal encoded))
(/.item 0))
(/.one choose evens)]
[{.#Some expected} {.#Some actual}]
@@ -82,9 +82,9 @@
_
false)))
(_.coverage [/.example]
- (# (maybe.equivalence n.equivalence) =
- (/.example n.even? the_array)
- (list.example n.even? (/.list {.#None} the_array))))
+ (at (maybe.equivalence n.equivalence) =
+ (/.example n.even? the_array)
+ (list.example n.even? (/.list {.#None} the_array))))
(_.coverage [/.example']
(case [(/.example n.even? the_array)
(/.example' (function (_ idx member)
@@ -105,13 +105,13 @@
_
false))
(_.coverage [/.every?]
- (# bit.equivalence =
- (list.every? n.even? (/.list {.#None} the_array))
- (/.every? n.even? the_array)))
+ (at bit.equivalence =
+ (list.every? n.even? (/.list {.#None} the_array))
+ (/.every? n.even? the_array)))
(_.coverage [/.any?]
- (# bit.equivalence =
- (list.any? n.even? (/.list {.#None} the_array))
- (/.any? n.even? the_array)))
+ (at bit.equivalence =
+ (list.any? n.even? (/.list {.#None} the_array))
+ (/.any? n.even? the_array)))
)))
(def: test|unsafe
@@ -209,7 +209,7 @@
(and (n.= expected (!.item 0 the_array))
(n.= expected (!.item 1 the_array)))))
(do !
- [occupancy (# ! each (n.% (++ size)) random.nat)]
+ [occupancy (at ! each (n.% (++ size)) random.nat)]
(_.coverage [!.occupancy !.vacancy]
(let [the_array (loop (again [output (is (Array Nat)
(!.empty size))
@@ -231,7 +231,7 @@
random.nat)]
(_.coverage [!.of_list !.list]
(and (|> the_list !.of_list (!.list {.#None})
- (# (list.equivalence n.equivalence) = the_list))
+ (at (list.equivalence n.equivalence) = the_list))
(|> the_array (!.list {.#None}) !.of_list
(!.= n.equivalence the_array))
(exec
@@ -241,14 +241,14 @@
(same? default value)))
(!.list {.#Some default} the_array))))))
(do !
- [amount (# ! each (n.% (++ size)) random.nat)]
+ [amount (at ! each (n.% (++ size)) random.nat)]
(_.coverage [!.copy!]
(let [copy (is (Array Nat)
(!.empty size))]
(exec (!.copy! amount 0 the_array 0 copy)
- (# (list.equivalence n.equivalence) =
- (list.first amount (!.list {.#None} the_array))
- (!.list {.#None} copy))))))
+ (at (list.equivalence n.equivalence) =
+ (list.first amount (!.list {.#None} the_array))
+ (!.list {.#None} copy))))))
(_.coverage [!.clone]
(let [clone (!.clone the_array)]
(and (not (same? the_array clone))
@@ -262,23 +262,23 @@
(n.= (list.size odds) (!.vacancy the_array))
(|> the_array
(!.list {.#None})
- (# (list.equivalence n.equivalence) = evens))))))
+ (at (list.equivalence n.equivalence) = evens))))))
(let [choose (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (# n.decimal encoded value)}
+ {.#Some (at n.decimal encoded value)}
{.#None})))]
(_.coverage [!.one]
(|> evens
(!.one choose)
(maybe#each (text#= (|> evens
- (!.each (# n.decimal encoded))
+ (!.each (at n.decimal encoded))
(!.item 0))))
(maybe.else false))))
(_.coverage [!.example]
- (# (maybe.equivalence n.equivalence) =
- (!.example n.even? the_array)
- (list.example n.even? (!.list {.#None} the_array))))
+ (at (maybe.equivalence n.equivalence) =
+ (!.example n.even? the_array)
+ (list.example n.even? (!.list {.#None} the_array))))
(_.coverage [!.example']
(case [(!.example n.even? the_array)
(!.example' (function (_ idx member)
@@ -295,13 +295,13 @@
_
false))
(_.coverage [!.every?]
- (# bit.equivalence =
- (list.every? n.even? (!.list {.#None} the_array))
- (!.every? n.even? the_array)))
+ (at bit.equivalence =
+ (list.every? n.even? (!.list {.#None} the_array))
+ (!.every? n.even? the_array)))
(_.coverage [!.any?]
- (# bit.equivalence =
- (list.any? n.even? (!.list {.#None} the_array))
- (!.any? n.even? the_array)))
+ (at bit.equivalence =
+ (list.any? n.even? (!.list {.#None} the_array))
+ (!.any? n.even? the_array)))
)))))
(def: .public test
@@ -392,7 +392,7 @@
_
false)))
(do !
- [occupancy (# ! each (n.% (++ size)) random.nat)]
+ [occupancy (at ! each (n.% (++ size)) random.nat)]
(_.coverage [/.occupancy /.vacancy]
(let [the_array (loop (again [output (is (Array Nat)
(/.empty size))
@@ -414,9 +414,9 @@
random.nat)]
(_.coverage [/.of_list /.list]
(and (|> the_list /.of_list (/.list {.#None})
- (# (list.equivalence n.equivalence) = the_list))
+ (at (list.equivalence n.equivalence) = the_list))
(|> the_array (/.list {.#None}) /.of_list
- (# (/.equivalence n.equivalence) = the_array))
+ (at (/.equivalence n.equivalence) = the_array))
(exec
(/.only! n.even? the_array)
(list.every? (function (_ value)
@@ -424,18 +424,18 @@
(same? default value)))
(/.list {.#Some default} the_array))))))
(do !
- [amount (# ! each (n.% (++ size)) random.nat)]
+ [amount (at ! each (n.% (++ size)) random.nat)]
(_.coverage [/.copy!]
(let [copy (is (Array Nat)
(/.empty size))]
(exec (/.copy! amount 0 the_array 0 copy)
- (# (list.equivalence n.equivalence) =
- (list.first amount (/.list {.#None} the_array))
- (/.list {.#None} copy))))))
+ (at (list.equivalence n.equivalence) =
+ (list.first amount (/.list {.#None} the_array))
+ (/.list {.#None} copy))))))
(_.coverage [/.clone]
(let [clone (/.clone the_array)]
(and (not (same? the_array clone))
- (# (/.equivalence n.equivalence) = the_array clone))))
+ (at (/.equivalence n.equivalence) = the_array clone))))
(let [the_array (/.clone the_array)
evens (|> the_array (/.list {.#None}) (list.only n.even?))
odds (|> the_array (/.list {.#None}) (list.only n.odd?))]
@@ -443,7 +443,7 @@
(exec (/.only! n.even? the_array)
(and (n.= (list.size evens) (/.occupancy the_array))
(n.= (list.size odds) (/.vacancy the_array))
- (|> the_array (/.list {.#None}) (# (list.equivalence n.equivalence) = evens))))))
+ (|> the_array (/.list {.#None}) (at (list.equivalence n.equivalence) = evens))))))
..test|unsafe
))))
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index b03ccee8c..72bd8a31f 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -17,16 +17,16 @@
(def: (size min max)
(-> Nat Nat (Random Nat))
(|> random.nat
- (# random.monad each (|>> (n.% (++ max)) (n.max min)))))
+ (at random.monad each (|>> (n.% (++ max)) (n.max min)))))
(def: .public random
(Random Bits)
(do [! random.monad]
- [size (# ! each (n.% 1,000) random.nat)]
+ [size (at ! each (n.% 1,000) random.nat)]
(case size
0 (in /.empty)
_ (do [! random.monad]
- [idx (|> random.nat (# ! each (n.% size)))]
+ [idx (|> random.nat (at ! each (n.% size)))]
(in (/.one idx /.empty))))))
(def: .public test
@@ -47,8 +47,8 @@
(/.empty? /.empty))
(do [! random.monad]
- [size (# ! each (|>> (n.% 1,000) ++) random.nat)
- idx (# ! each (n.% size) random.nat)
+ [size (at ! each (|>> (n.% 1,000) ++) random.nat)
+ idx (at ! each (n.% size) random.nat)
sample ..random]
(all _.and
(_.coverage [/.bit /.one]
@@ -79,17 +79,17 @@
(_.coverage [/.not]
(and (same? /.empty (/.not /.empty))
(or (same? /.empty sample)
- (and (not (# /.equivalence = sample (/.not sample)))
- (# /.equivalence = sample (/.not (/.not sample)))))))
+ (and (not (at /.equivalence = sample (/.not sample)))
+ (at /.equivalence = sample (/.not (/.not sample)))))))
(_.coverage [/.xor]
(and (same? /.empty (/.xor sample sample))
(n.= (/.size (/.xor sample (/.not sample)))
(/.capacity sample))))
(_.coverage [/.or]
- (and (# /.equivalence = sample (/.or sample sample))
+ (and (at /.equivalence = sample (/.or sample sample))
(n.= (/.size (/.or sample (/.not sample)))
(/.capacity sample))))
(_.coverage [/.and]
- (and (# /.equivalence = sample (/.and sample sample))
+ (and (at /.equivalence = sample (/.and sample sample))
(same? /.empty (/.and sample (/.not sample)))))
)))))
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 11a4da3cb..f5c0b4c9d 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -31,7 +31,7 @@
(def: for_dictionaries
Test
(do [! random.monad]
- [.let [capped_nat (# random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (at random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
non_key (random.only (|>> (/.key? dict) not)
@@ -133,7 +133,7 @@
(def: for_entries
Test
(do random.monad
- [.let [capped_nat (# random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (at random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
non_key (random.only (|>> (/.key? dict) not)
@@ -253,7 +253,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do random.monad
- [.let [capped_nat (# random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (at random.monad each (n.% 100) random.nat)]
size capped_nat
dict (random.dictionary n.hash size random.nat capped_nat)
non_key (random.only (|>> (/.key? dict) not)
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 75e7a36e2..19454582a 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -43,7 +43,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do [! random.monad]
- [size (# ! each (n.% 100) random.nat)
+ [size (at ! each (n.% 100) random.nat)
keys (random.set n.hash size random.nat)
values (random.set n.hash size random.nat)
extra_key (random.only (|>> (set.member? keys) not)
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index 252ca9f85..7cd9ad3aa 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -36,7 +36,7 @@
(_.for [/.PList])
(do [! random.monad]
[.let [gen_key (random.alphabetic 10)]
- size (# ! each (n.% 100) random.nat)
+ size (at ! each (n.% 100) random.nat)
sample (..random size gen_key random.nat)
.let [keys (|> sample /.keys (set.of_list text.hash))]
@@ -61,10 +61,10 @@
(_.coverage [/.empty]
(/.empty? /.empty))
(_.coverage [/.keys /.values]
- (# (/.equivalence n.equivalence) =
- sample
- (list.zipped_2 (/.keys sample)
- (/.values sample))))
+ (at (/.equivalence n.equivalence) =
+ sample
+ (list.zipped_2 (/.keys sample)
+ (/.values sample))))
(_.coverage [/.contains?]
(and (list.every? (function (_ key)
(/.contains? key sample))
@@ -93,5 +93,5 @@
(|> sample
(/.has extra_key extra_value)
(/.lacks extra_key)
- (# (/.equivalence n.equivalence) = sample)))
+ (at (/.equivalence n.equivalence) = sample)))
))))
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 81e8d76dc..3e05ec3f4 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -34,8 +34,8 @@
(def: bounded_size
(Random Nat)
- (# random.monad each (n.% 100)
- random.nat))
+ (at random.monad each (n.% 100)
+ random.nat))
(def: random
(Random (List Nat))
@@ -43,7 +43,7 @@
[size ..bounded_size]
(|> random.nat
(random.set n.hash size)
- (# ! each set.list))))
+ (at ! each set.list))))
(def: signatures
Test
@@ -52,7 +52,7 @@
($equivalence.spec (/.equivalence n.equivalence) ..random))
(_.for [/.hash]
(|> random.nat
- (# random.monad each (|>> list))
+ (at random.monad each (|>> list))
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid ..random))
@@ -89,14 +89,14 @@
(do [! random.monad]
[size ..bounded_size
.let [(open "/#[0]") (/.equivalence n.equivalence)]
- sample (# ! each set.list (random.set n.hash size random.nat))]
+ sample (at ! each set.list (random.set n.hash size random.nat))]
(all _.and
(_.coverage [/.size]
(n.= size (/.size sample)))
(_.coverage [/.empty?]
- (# bit.equivalence =
- (/.empty? sample)
- (n.= 0 (/.size sample))))
+ (at bit.equivalence =
+ (/.empty? sample)
+ (n.= 0 (/.size sample))))
(_.coverage [/.repeated]
(n.= size (/.size (/.repeated size []))))
(_.coverage [/.reversed]
@@ -178,7 +178,7 @@
(do !
[index (case size
0 random.nat
- _ (# ! each (n.% size) random.nat))
+ _ (at ! each (n.% size) random.nat))
.let [changed? (/#= sample (/.revised index ++ sample))
same? (/#= sample (/.revised size ++ sample))]]
(_.coverage [/.revised]
@@ -196,8 +196,8 @@
[sample (random.only (|>> /.size (n.> 0))
..random)
.let [size (/.size sample)]
- idx (# ! each (n.% size) random.nat)
- sub_size (# ! each (|>> (n.% size) ++) random.nat)]
+ idx (at ! each (n.% size) random.nat)
+ sub_size (at ! each (|>> (n.% size) ++) random.nat)]
(all _.and
(_.coverage [/.only]
(let [positives (/.only n.even? sample)
@@ -341,12 +341,12 @@
(and size_of_smaller_list!
can_extract_values!)))
(_.coverage [/.zipped]
- (and (# (/.equivalence (product.equivalence n.equivalence n.equivalence)) =
- (/.zipped_2 sample/0 sample/1)
- ((/.zipped 2) sample/0 sample/1))
- (# (/.equivalence (all product.equivalence n.equivalence n.equivalence n.equivalence)) =
- (/.zipped_3 sample/0 sample/1 sample/2)
- ((/.zipped 3) sample/0 sample/1 sample/2))))
+ (and (at (/.equivalence (product.equivalence n.equivalence n.equivalence)) =
+ (/.zipped_2 sample/0 sample/1)
+ ((/.zipped 2) sample/0 sample/1))
+ (at (/.equivalence (all product.equivalence n.equivalence n.equivalence n.equivalence)) =
+ (/.zipped_3 sample/0 sample/1 sample/2)
+ ((/.zipped 3) sample/0 sample/1 sample/2))))
(_.coverage [/.zipped_with_2]
(/#= (/#each (function (_ [left right])
@@ -377,7 +377,7 @@
choice (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (# n.decimal encoded value)}
+ {.#Some (at n.decimal encoded value)}
{.#None})))]
(do [! random.monad]
[sample ..random]
@@ -385,7 +385,7 @@
(_.coverage [/.one]
(case [(|> sample
(/.only n.even?)
- (/#each (# n.decimal encoded))
+ (/#each (at n.decimal encoded))
/.head)
(/.one choice sample)]
[{.#Some expected} {.#Some actual}]
@@ -397,11 +397,11 @@
_
false))
(_.coverage [/.all]
- (# (/.equivalence text.equivalence) =
- (|> sample
- (/.only n.even?)
- (/#each (# n.decimal encoded)))
- (/.all choice sample)))
+ (at (/.equivalence text.equivalence) =
+ (|> sample
+ (/.only n.even?)
+ (/#each (at n.decimal encoded)))
+ (/.all choice sample)))
(_.coverage [/.example]
(case (/.example n.even? sample)
{.#Some found}
@@ -449,7 +449,7 @@
0)))))
(_.coverage [/.mixes]
(/#= (/#each (function (_ index)
- (# /.mix mix n.+ 0 (/.first index sample)))
+ (at /.mix mix n.+ 0 (/.first index sample)))
(/.indices (++ (/.size sample))))
(/.mixes n.+ 0 sample)))
(do random.monad
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index a67697de2..460c64618 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -28,7 +28,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do [! random.monad]
- [size (# ! each (n.% 100) random.nat)
+ [size (at ! each (n.% 100) random.nat)
members (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? members) not)
random.nat)
@@ -42,7 +42,7 @@
(_.coverage [/.of_list /.list]
(|> members /.of_list /.list
- (# (list.equivalence n.equivalence) = members)))
+ (at (list.equivalence n.equivalence) = members)))
(_.coverage [/.size]
(n.= size (/.size sample)))
(_.coverage [/.empty?]
@@ -53,9 +53,9 @@
all_empty_queues_look_the_same!
(bit#= (/.empty? sample)
- (# (/.equivalence n.equivalence) =
- sample
- /.empty))]
+ (at (/.equivalence n.equivalence) =
+ sample
+ /.empty))]
(and empty_is_empty!
all_empty_queues_look_the_same!)))
(_.coverage [/.front]
@@ -87,9 +87,9 @@
(/.member? n.equivalence pushed non_member)
has_expected_order!
- (# (list.equivalence n.equivalence) =
- (list#composite (/.list sample) (list non_member))
- (/.list pushed))]
+ (at (list.equivalence n.equivalence) =
+ (list#composite (/.list sample) (list non_member))
+ (/.list pushed))]
(and size_increases!
new_member_is_identified!
has_expected_order!)))
@@ -106,9 +106,9 @@
(not (/.member? n.equivalence popped target))
has_expected_order!
- (# (list.equivalence n.equivalence) =
- expected
- (/.list popped))]
+ (at (list.equivalence n.equivalence) =
+ expected
+ (/.list popped))]
(and size_decreases!
popped_member_is_not_identified!
has_expected_order!))
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 624231fb1..106884fa1 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -31,7 +31,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do [! random.monad]
- [size (# ! each (n.% 100) random.nat)
+ [size (at ! each (n.% 100) random.nat)
sample (..random size)
non_member_priority random.nat
non_member (random.only (|>> (/.member? n.equivalence sample) not)
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index 92d59f68d..445d6b033 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -30,7 +30,7 @@
(def: signatures
Test
(do [! random.monad]
- [size (# ! each (n.% 100) random.nat)]
+ [size (at ! each (n.% 100) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec (/.equivalence n.equivalence) (random.sequence size random.nat)))
@@ -49,7 +49,7 @@
(def: whole
Test
(do [! random.monad]
- [size (# ! each (n.% 100) random.nat)
+ [size (at ! each (n.% 100) random.nat)
sample (random.set n.hash size random.nat)
.let [sample (|> sample set.list /.of_list)]
.let [(open "/#[0]") (/.equivalence n.equivalence)]]
@@ -82,10 +82,10 @@
(def: index_based
Test
(do [! random.monad]
- [size (# ! each (|>> (n.% 100) ++) random.nat)]
+ [size (at ! each (|>> (n.% 100) ++) random.nat)]
(all _.and
(do !
- [good_index (|> random.nat (# ! each (n.% size)))
+ [good_index (|> random.nat (at ! each (n.% size)))
.let [bad_index (n.+ size good_index)]
sample (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? sample) not)
@@ -135,7 +135,7 @@
(<| (_.covering /._)
(_.for [/.Sequence])
(do [! random.monad]
- [size (# ! each (|>> (n.% 100) ++) random.nat)]
+ [size (at ! each (|>> (n.% 100) ++) random.nat)]
(all _.and
..signatures
..whole
@@ -198,11 +198,11 @@
choice (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (# n.decimal encoded value)}
+ {.#Some (at n.decimal encoded value)}
{.#None})))]
(case [(|> sample
(/.only n.even?)
- (/#each (# n.decimal encoded))
+ (/#each (at n.decimal encoded))
(/.item 0))
(/.one choice sample)]
[{try.#Success expected} {.#Some actual}]
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index 17617c2dc..be1168ad5 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -22,8 +22,8 @@
(def: gen_nat
(Random Nat)
- (# random.monad each (n.% 100)
- random.nat))
+ (at random.monad each (n.% 100)
+ random.nat))
(def: .public test
Test
@@ -36,7 +36,7 @@
($equivalence.spec /.equivalence (random.set n.hash size random.nat)))
(_.for [/.hash]
(|> random.nat
- (# random.monad each (|>> list (/.of_list n.hash)))
+ (at random.monad each (|>> list (/.of_list n.hash)))
($hash.spec /.hash)))
(_.for [/.monoid]
($monoid.spec /.equivalence (/.monoid n.hash) (random.set n.hash size random.nat)))
@@ -52,14 +52,14 @@
(_.coverage [/.empty]
(/.empty? (/.empty n.hash)))
(do !
- [hash (# ! each (function (_ constant)
- (is (Hash Nat)
- (implementation
- (def: equivalence n.equivalence)
-
- (def: (hash _)
- constant))))
- random.nat)]
+ [hash (at ! each (function (_ constant)
+ (is (Hash Nat)
+ (implementation
+ (def: equivalence n.equivalence)
+
+ (def: (hash _)
+ constant))))
+ random.nat)]
(_.coverage [/.member_hash]
(same? hash (/.member_hash (/.empty hash)))))
(_.coverage [/.size]
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 555d7e210..8e68d0a63 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -23,7 +23,7 @@
(def: count
(Random Nat)
- (# random.monad each (|>> (n.% 10) ++) random.nat))
+ (at random.monad each (|>> (n.% 10) ++) random.nat))
(def: .public (random size hash count element)
(All (_ a) (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a))))
@@ -39,21 +39,21 @@
(def: signature
Test
(do [! random.monad]
- [diversity (# ! each (n.% 10) random.nat)]
+ [diversity (at ! each (n.% 10) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat)))
(_.for [/.hash]
(|> random.nat
- (# random.monad each (function (_ single)
- (/.has 1 single (/.empty n.hash))))
+ (at random.monad each (function (_ single)
+ (/.has 1 single (/.empty n.hash))))
($hash.spec /.hash)))
)))
(def: composition
Test
(do [! random.monad]
- [diversity (# ! each (n.% 10) random.nat)
+ [diversity (at ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
another (..random diversity n.hash ..count random.nat)]
(`` (all _.and
@@ -113,19 +113,19 @@
(<| (_.covering /._)
(_.for [/.Set])
(do [! random.monad]
- [diversity (# ! each (n.% 10) random.nat)
+ [diversity (at ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
non_member (random.only (predicate.complement (set.member? (/.support sample)))
random.nat)
addition_count ..count
- partial_removal_count (# ! each (n.% addition_count) random.nat)
+ partial_removal_count (at ! each (n.% addition_count) random.nat)
another (..random diversity n.hash ..count random.nat)]
(all _.and
(_.coverage [/.list /.of_list]
(|> sample
/.list
(/.of_list n.hash)
- (# /.equivalence = sample)))
+ (at /.equivalence = sample)))
(_.coverage [/.size]
(n.= (list.size (/.list sample))
(/.size sample)))
@@ -159,7 +159,7 @@
(let [null_scenario!
(|> sample
(/.has 0 non_member)
- (# /.equivalence = sample))
+ (at /.equivalence = sample))
normal_scenario!
(let [sample+ (/.has addition_count non_member sample)]
@@ -170,12 +170,12 @@
normal_scenario!)))
(_.coverage [/.lacks]
(let [null_scenario!
- (# /.equivalence =
- (|> sample
- (/.has addition_count non_member))
- (|> sample
- (/.has addition_count non_member)
- (/.lacks 0 non_member)))
+ (at /.equivalence =
+ (|> sample
+ (/.has addition_count non_member))
+ (|> sample
+ (/.has addition_count non_member)
+ (/.lacks 0 non_member)))
partial_scenario!
(let [sample* (|> sample
@@ -190,7 +190,7 @@
(|> sample
(/.has addition_count non_member)
(/.lacks addition_count non_member)
- (# /.equivalence = sample))]
+ (at /.equivalence = sample))]
(and null_scenario!
partial_scenario!
total_scenario!)))
@@ -202,12 +202,12 @@
(let [unary (|> sample /.support /.of_set)]
(and (/.sub? sample unary)
(or (not (/.sub? unary sample))
- (# /.equivalence = sample unary)))))
+ (at /.equivalence = sample unary)))))
(_.coverage [/.super?]
(let [unary (|> sample /.support /.of_set)]
(and (/.super? unary sample)
(or (not (/.super? sample unary))
- (# /.equivalence = sample unary)))))
+ (at /.equivalence = sample unary)))))
(_.coverage [/.difference]
(let [|sample| (/.support sample)
|another| (/.support another)
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 64a1dc4bb..d35037fd9 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -21,7 +21,7 @@
(def: size
(random.Random Nat)
- (# random.monad each (n.% 100) random.nat))
+ (at random.monad each (n.% 100) random.nat))
(def: .public (random size order gen_value)
(All (_ a) (-> Nat (Order a) (Random a) (Random (Set a))))
@@ -47,7 +47,7 @@
non_memberL (random.only (|>> (//.member? usetL) not)
random.nat)
.let [listL (//.list usetL)]
- listR (|> (random.set n.hash sizeR random.nat) (# ! each //.list))
+ listR (|> (random.set n.hash sizeR random.nat) (at ! each //.list))
.let [(open "/#[0]") /.equivalence
setL (/.of_list n.order listL)
setR (/.of_list n.order listR)
@@ -64,9 +64,9 @@
(_.coverage [/.empty]
(/.empty? (/.empty n.order)))
(_.coverage [/.list]
- (# (list.equivalence n.equivalence) =
- (/.list (/.of_list n.order listL))
- (list.sorted (# n.order <) listL)))
+ (at (list.equivalence n.equivalence) =
+ (/.list (/.of_list n.order listL))
+ (list.sorted (at n.order <) listL)))
(_.coverage [/.of_list]
(|> setL
/.list (/.of_list n.order)
@@ -101,7 +101,7 @@
(|> setL
(/.has non_memberL)
(/.lacks non_memberL)
- (# /.equivalence = setL)))
+ (at /.equivalence = setL)))
(_.coverage [/.sub?]
(let [self!
(/.sub? setL setL)
@@ -126,23 +126,23 @@
(~~ (template [<coverage> <relation> <empty?>]
[(_.coverage [<coverage>]
(let [self!
- (# /.equivalence =
- setL
- (<coverage> setL setL))
+ (at /.equivalence =
+ setL
+ (<coverage> setL setL))
super!
(and (<relation> (<coverage> setL setR) setL)
(<relation> (<coverage> setL setR) setR))
empty!
- (# /.equivalence =
- (if <empty?> empty setL)
- (<coverage> setL empty))
+ (at /.equivalence =
+ (if <empty?> empty setL)
+ (<coverage> setL empty))
idempotence!
- (# /.equivalence =
- (<coverage> setL (<coverage> setL setR))
- (<coverage> setR (<coverage> setL setR)))]
+ (at /.equivalence =
+ (<coverage> setL (<coverage> setL setR))
+ (<coverage> setR (<coverage> setL setR)))]
(and self!
super!
empty!
@@ -155,21 +155,21 @@
(let [self!
(|> setL
(/.difference setL)
- (# /.equivalence = empty))
+ (at /.equivalence = empty))
empty!
(|> setL
(/.difference empty)
- (# /.equivalence = setL))
+ (at /.equivalence = setL))
difference!
(not (list.any? (/.member? (/.difference setL setR))
(/.list setL)))
idempotence!
- (# /.equivalence =
- (/.difference setL setR)
- (/.difference setL (/.difference setL setR)))]
+ (at /.equivalence =
+ (/.difference setL setR)
+ (/.difference setL (/.difference setL setR)))]
(and self!
empty!
difference!
diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux
index 337b7de4e..3f600a958 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -27,7 +27,7 @@
(<| (_.covering /._)
(_.for [/.Stack])
(do random.monad
- [size (# random.monad each (n.% 100) random.nat)
+ [size (at random.monad each (n.% 100) random.nat)
sample (random.stack size random.nat)
expected_top random.nat]
(all _.and
@@ -56,9 +56,9 @@
(/.empty? sample)
{.#Some [top remaining]}
- (# (/.equivalence n.equivalence) =
- sample
- (/.top top remaining))))
+ (at (/.equivalence n.equivalence) =
+ sample
+ (/.top top remaining))))
(_.coverage [/.top]
(case (/.next (/.top expected_top sample))
{.#Some [actual_top actual_sample]}
diff --git a/stdlib/source/test/lux/data/collection/stream.lux b/stdlib/source/test/lux/data/collection/stream.lux
index ee293cfa8..174cb9041 100644
--- a/stdlib/source/test/lux/data/collection/stream.lux
+++ b/stdlib/source/test/lux/data/collection/stream.lux
@@ -25,9 +25,9 @@
(All (_ a) (-> (Equivalence a) (Equivalence (/.Stream a))))
(def: (= reference subject)
- (# (list.equivalence super) =
- (/.first 100 reference)
- (/.first 100 subject))))
+ (at (list.equivalence super) =
+ (/.first 100 reference)
+ (/.first 100 subject))))
(def: (iterations step)
(All (_ a)
@@ -45,9 +45,9 @@
(let [(open "list#[0]") (list.equivalence n.equivalence)])
(do [! random.monad]
[repeated random.nat
- index (# ! each (n.% 100) random.nat)
- size (# ! each (|>> (n.% 10) ++) random.nat)
- offset (# ! each (n.% 100) random.nat)
+ index (at ! each (n.% 100) random.nat)
+ size (at ! each (|>> (n.% 10) ++) random.nat)
+ offset (at ! each (n.% 100) random.nat)
cycle_start random.nat
cycle_next (random.list size random.nat)]
(all _.and
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 945c1c6b8..7898b3035 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -23,7 +23,7 @@
(All (_ a) (-> (Random a) (Random [Nat (Tree a)])))
(do [! random.monad]
[value gen_value
- num_children (# ! each (n.% 2) random.nat)
+ num_children (at ! each (n.% 2) random.nat)
children (random.list num_children (tree gen_value))]
(in [(|> children
(list#each product.left)
@@ -38,7 +38,7 @@
(all _.and
(_.for [/.equivalence]
(|> (..tree random.nat)
- (# random.monad each product.right)
+ (at random.monad each product.right)
($equivalence.spec (/.equivalence n.equivalence))))
(_.for [/.mix]
($mix.spec /.leaf /.equivalence /.mix))
@@ -53,17 +53,17 @@
(do random.monad
[expected random.nat]
(_.coverage [/.leaf]
- (# (list.equivalence n.equivalence) =
- (list expected)
- (/.flat (/.leaf expected)))))
+ (at (list.equivalence n.equivalence) =
+ (list expected)
+ (/.flat (/.leaf expected)))))
(do [! random.monad]
[value random.nat
- num_children (# ! each (n.% 3) random.nat)
+ num_children (at ! each (n.% 3) random.nat)
children (random.list num_children random.nat)]
(_.coverage [/.branch]
- (# (list.equivalence n.equivalence) =
- (partial_list value children)
- (/.flat (/.branch value (list#each /.leaf children))))))
+ (at (list.equivalence n.equivalence) =
+ (partial_list value children)
+ (/.flat (/.branch value (list#each /.leaf children))))))
(do random.monad
[expected/0 random.nat
expected/1 random.nat
@@ -72,20 +72,20 @@
expected/4 random.nat
expected/5 random.nat]
(_.coverage [/.tree]
- (and (# (list.equivalence n.equivalence) =
- (list expected/0)
- (/.flat (/.tree expected/0)))
- (# (list.equivalence n.equivalence) =
- (list expected/0 expected/1 expected/2)
- (/.flat (/.tree expected/0
- {expected/1 {}
- expected/2 {}})))
- (# (list.equivalence n.equivalence) =
- (list expected/0 expected/1 expected/2
- expected/3 expected/4 expected/5)
- (/.flat (/.tree expected/0
- {expected/1 {}
- expected/2 {expected/3 {}
- expected/4 {expected/5 {}}}})))
+ (and (at (list.equivalence n.equivalence) =
+ (list expected/0)
+ (/.flat (/.tree expected/0)))
+ (at (list.equivalence n.equivalence) =
+ (list expected/0 expected/1 expected/2)
+ (/.flat (/.tree expected/0
+ {expected/1 {}
+ expected/2 {}})))
+ (at (list.equivalence n.equivalence) =
+ (list expected/0 expected/1 expected/2
+ expected/3 expected/4 expected/5)
+ (/.flat (/.tree expected/0
+ {expected/1 {}
+ expected/2 {expected/3 {}
+ expected/4 {expected/5 {}}}})))
)))
)))
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index a9e3d68e6..a2a57629a 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -44,21 +44,21 @@
true))
(_.coverage [/.tag]
(and (text#= tag_left
- (/.tag (# ..builder leaf tag_left expected_left)))
+ (/.tag (at ..builder leaf tag_left expected_left)))
(text#= (text#composite tag_left tag_right)
- (/.tag (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right))))))
+ (/.tag (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right))))))
(_.coverage [/.root]
- (and (case (/.root (# ..builder leaf tag_left expected_left))
+ (and (case (/.root (at ..builder leaf tag_left expected_left))
{.#Left actual}
(n.= expected_left actual)
{.#Right _}
false)
- (case (/.root (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right)))
+ (case (/.root (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right)))
{.#Left _}
false
@@ -73,11 +73,11 @@
false))))
(_.coverage [/.value]
(and (n.= expected_left
- (/.value (# ..builder leaf tag_left expected_left)))
+ (/.value (at ..builder leaf tag_left expected_left)))
(n.= expected_left
- (/.value (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right))))))
+ (/.value (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right))))))
(do random.monad
[.let [tags_equivalence (list.equivalence text.equivalence)
values_equivalence (list.equivalence n.equivalence)]
@@ -87,37 +87,37 @@
values/T (random.list 5 random.nat)]
(_.coverage [/.tags /.values]
(let [tree (list#mix (function (_ [tag value] tree)
- (# builder branch tree (# builder leaf tag value)))
- (# builder leaf tags/H values/H)
+ (at builder branch tree (at builder leaf tag value)))
+ (at builder leaf tags/H values/H)
(list.zipped_2 tags/T values/T))]
- (and (# tags_equivalence = (partial_list tags/H tags/T) (/.tags tree))
- (# values_equivalence = (partial_list values/H values/T) (/.values tree))))))
+ (and (at tags_equivalence = (partial_list tags/H tags/T) (/.tags tree))
+ (at values_equivalence = (partial_list values/H values/T) (/.values tree))))))
(_.coverage [/.one]
(let [can_find_correct_one!
- (|> (# ..builder leaf tag_left expected_left)
+ (|> (at ..builder leaf tag_left expected_left)
(/.one (text.contains? tag_left))
(maybe#each (n.= expected_left))
(maybe.else false))
cannot_find_incorrect_one!
- (|> (# ..builder leaf tag_right expected_right)
+ (|> (at ..builder leaf tag_right expected_right)
(/.one (text.contains? tag_left))
(maybe#each (n.= expected_left))
(maybe.else false)
not)
can_find_left!
- (|> (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right))
+ (|> (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_left))
(maybe#each (n.= expected_left))
(maybe.else false))
can_find_right!
- (|> (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right))
+ (|> (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_right))
(maybe#each (n.= expected_right))
(maybe.else false))]
@@ -128,23 +128,23 @@
(_.coverage [/.exists?]
(let [can_find_correct_one!
(/.exists? (text.contains? tag_left)
- (# ..builder leaf tag_left expected_left))
+ (at ..builder leaf tag_left expected_left))
cannot_find_incorrect_one!
(not (/.exists? (text.contains? tag_left)
- (# ..builder leaf tag_right expected_right)))
+ (at ..builder leaf tag_right expected_right)))
can_find_left!
(/.exists? (text.contains? tag_left)
- (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right)))
+ (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right)))
can_find_right!
(/.exists? (text.contains? tag_right)
- (# ..builder branch
- (# ..builder leaf tag_left expected_left)
- (# ..builder leaf tag_right expected_right)))]
+ (at ..builder branch
+ (at ..builder leaf tag_left expected_left)
+ (at ..builder leaf tag_right expected_right)))]
(and can_find_correct_one!
cannot_find_incorrect_one!
can_find_left!
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index 4a2bbac26..eb4a1c553 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -163,7 +163,7 @@
(open "list#[0]") (list.equivalence n.equivalence)]]
(all _.and
(_.for [/.equivalence]
- ($equivalence.spec (/.equivalence n.equivalence) (# ! each (|>> product.right /.zipper) (//.tree random.nat))))
+ ($equivalence.spec (/.equivalence n.equivalence) (at ! each (|>> product.right /.zipper) (//.tree random.nat))))
(_.for [/.functor]
($functor.spec (|>> tree.leaf /.zipper) /.equivalence /.functor))
(_.for [/.comonad]
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index 3c70fd002..9f2534c83 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -24,7 +24,7 @@
(def: .public random
(Random /.Color)
(|> (all random.and random.nat random.nat random.nat)
- (# random.monad each /.of_rgb)))
+ (at random.monad each /.of_rgb)))
(def: scale
(-> Nat Frac)
@@ -71,7 +71,7 @@
(all _.and
(_.coverage [/.RGB /.rgb /.of_rgb]
(|> expected /.rgb /.of_rgb
- (# /.equivalence = expected)))
+ (at /.equivalence = expected)))
(_.coverage [/.HSL /.hsl /.of_hsl]
(|> expected /.hsl /.of_hsl
(distance/3 expected)
@@ -129,16 +129,16 @@
Test
(_.for [/.Spread /.Palette]
(do [! random.monad]
- [eH (# ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
- random.safe_frac)
+ [eH (at ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
+ random.safe_frac)
.let [eS +0.5]
- variations (# ! each (|>> (n.% 3) (n.+ 2)) random.nat)
+ variations (at ! each (|>> (n.% 3) (n.+ 2)) random.nat)
.let [max_spread (f./ (|> variations ++ .int int.frac)
+1.0)
min_spread (f./ +2.0 max_spread)
spread_space (f.- min_spread max_spread)]
- spread (# ! each (|>> f.abs (f.% spread_space) (f.+ min_spread))
- random.safe_frac)]
+ spread (at ! each (|>> f.abs (f.% spread_space) (f.+ min_spread))
+ random.safe_frac)]
(`` (all _.and
(~~ (template [<brightness> <palette>]
[(_.coverage [<palette>]
@@ -146,7 +146,7 @@
expected (/.of_hsb [eH eS eB])
palette (<palette> spread variations expected)]
(and (n.= variations (list.size palette))
- (not (list.any? (# /.equivalence = expected) palette)))))]
+ (not (list.any? (at /.equivalence = expected) palette)))))]
[+1.0 /.analogous]
[+0.5 /.monochromatic]
))
@@ -154,9 +154,9 @@
[(_.coverage [<palette>]
(let [expected (/.of_hsb [eH eS +0.5])
[c0 c1 c2] (<palette> expected)]
- (and (# /.equivalence = expected c0)
- (not (# /.equivalence = expected c1))
- (not (# /.equivalence = expected c2)))))]
+ (and (at /.equivalence = expected c0)
+ (not (at /.equivalence = expected c1))
+ (not (at /.equivalence = expected c2)))))]
[/.triad]
[/.clash]
@@ -165,10 +165,10 @@
[(_.coverage [<palette>]
(let [expected (/.of_hsb [eH eS +0.5])
[c0 c1 c2 c3] (<palette> expected)]
- (and (# /.equivalence = expected c0)
- (not (# /.equivalence = expected c1))
- (not (# /.equivalence = expected c2))
- (not (# /.equivalence = expected c3)))))]
+ (and (at /.equivalence = expected c0)
+ (not (at /.equivalence = expected c1))
+ (not (at /.equivalence = expected c2))
+ (not (at /.equivalence = expected c3)))))]
[/.square]
[/.tetradic]))
@@ -197,8 +197,8 @@
(and (not (/#= expected ~expected))
(/#= expected (/.complement ~expected)))))
(_.coverage [/.black /.white]
- (and (# /.equivalence = /.white (/.complement /.black))
- (# /.equivalence = /.black (/.complement /.white))))
+ (and (at /.equivalence = /.white (/.complement /.black))
+ (at /.equivalence = /.black (/.complement /.white))))
..transformation
..palette
(_.for [/.Alpha /.Pigment]
diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux
index 346bc74ed..ce902b16b 100644
--- a/stdlib/source/test/lux/data/color/named.lux
+++ b/stdlib/source/test/lux/data/color/named.lux
@@ -233,8 +233,8 @@
<colors>))
(_.coverage [/.aqua]
- (# //.equivalence = /.cyan /.aqua))
+ (at //.equivalence = /.cyan /.aqua))
(_.coverage [/.fuchsia]
- (# //.equivalence = /.magenta /.fuchsia))
+ (at //.equivalence = /.magenta /.fuchsia))
))))
)
diff --git a/stdlib/source/test/lux/data/format/binary.lux b/stdlib/source/test/lux/data/format/binary.lux
index 8c69f0c64..4fa969c57 100644
--- a/stdlib/source/test/lux/data/format/binary.lux
+++ b/stdlib/source/test/lux/data/format/binary.lux
@@ -23,7 +23,7 @@
(def: random
(Random /.Specification)
- (# random.monad each /.nat random.nat))
+ (at random.monad each /.nat random.nat))
(def: .public test
Test
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 1fb8f94fa..c0d9f7537 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -36,9 +36,9 @@
(random.rec
(function (_ again)
(do [! random.monad]
- [size (# ! each (n.% 2) random.nat)]
+ [size (at ! each (n.% 2) random.nat)]
(all random.or
- (# ! in [])
+ (at ! in [])
random.bit
random.safe_frac
(random.unicode size)
@@ -74,17 +74,17 @@
(do random.monad
[sample ..random]
(_.coverage [/.Null /.null?]
- (# bit.equivalence =
- (/.null? sample)
- (case sample
- {/.#Null} true
- _ false))))
+ (at bit.equivalence =
+ (/.null? sample)
+ (case sample
+ {/.#Null} true
+ _ false))))
(do random.monad
[expected ..random]
(_.coverage [/.format]
(|> expected
/.format
- (# /.codec decoded)
+ (at /.codec decoded)
(try#each (/#= expected))
(try.else false))))
(do random.monad
@@ -97,9 +97,9 @@
(_.coverage [/.object /.fields]
(case (/.fields object)
{try.#Success actual}
- (# (list.equivalence text.equivalence) =
- (list#each product.left expected)
- actual)
+ (at (list.equivalence text.equivalence) =
+ (list#each product.left expected)
+ actual)
{try.#Failure error}
false))
@@ -112,7 +112,7 @@
))
(do random.monad
[key (random.alphabetic 1)
- unknown (random.only (|>> (# text.equivalence = key) not)
+ unknown (random.only (|>> (at text.equivalence = key) not)
(random.alphabetic 1))
expected random.safe_frac]
(_.coverage [/.has]
@@ -141,7 +141,7 @@
(_.coverage [<type> <field>]
(|> (/.object (list [key {<tag> value}]))
(<field> key)
- (try#each (# <equivalence> = value))
+ (try#each (at <equivalence> = value))
(try.else false))))]
[/.Boolean /.boolean_field /.#Boolean random.bit bit.equivalence]
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index c30fb086b..4681f3822 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -108,8 +108,8 @@
Test
(_.for [/.Small]
(do [! random.monad]
- [expected (|> random.nat (# ! each (n.% /.small_limit)))
- invalid (|> random.nat (# ! each (n.max /.small_limit)))]
+ [expected (|> random.nat (at ! each (n.% /.small_limit)))
+ invalid (|> random.nat (at ! each (n.max /.small_limit)))]
(`` (all _.and
(_.coverage [/.small /.from_small]
(case (/.small expected)
@@ -132,8 +132,8 @@
Test
(_.for [/.Big]
(do [! random.monad]
- [expected (|> random.nat (# ! each (n.% /.big_limit)))
- invalid (|> random.nat (# ! each (n.max /.big_limit)))]
+ [expected (|> random.nat (at ! each (n.% /.big_limit)))
+ invalid (|> random.nat (at ! each (n.max /.big_limit)))]
(`` (all _.and
(_.coverage [/.big /.from_big]
(case (/.big expected)
@@ -158,14 +158,14 @@
Test
(do [! random.monad]
[expected_path (random.lower_case (-- /.path_size))
- expected_moment (# ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
- random.nat)
+ expected_moment (at ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
+ random.nat)
chunk (random.lower_case chunk_size)
- chunks (# ! each (n.% 100) random.nat)
+ chunks (at ! each (n.% 100) random.nat)
.let [content (|> chunk
(list.repeated chunks)
text.together
- (# utf8.codec encoded))]]
+ (at utf8.codec encoded))]]
(`` (all _.and
(~~ (template [<type> <tag>]
[(_.coverage [<type>]
@@ -402,7 +402,7 @@
(|> sequence.empty
(format.result /.writer)
(<b>.result /.parser)
- (# try.monad each sequence.empty?)
+ (at try.monad each sequence.empty?)
(try.else false)))
(_.coverage [/.invalid_end_of_archive]
(let [dump (format.result /.writer sequence.empty)]
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index dc95a00fe..fffae6ba2 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -38,7 +38,7 @@
(def: char
(Random Nat)
(do [! random.monad]
- [idx (|> random.nat (# ! each (n.% (text.size char_range))))]
+ [idx (|> random.nat (at ! each (n.% (text.size char_range))))]
(in (maybe.trusted (text.char idx char_range)))))
(def: (size bottom top)
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index 61e7f251e..1cde90959 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -32,9 +32,9 @@
right random.nat]
(_.coverage [/.hash]
(let [hash (/.hash i.hash n.hash)]
- (n.= (n.+ (# i.hash hash left)
- (# n.hash hash right))
- (# hash hash [left right])))))
+ (n.= (n.+ (at i.hash hash left)
+ (at n.hash hash right))
+ (at hash hash [left right])))))
(<| (_.coverage [/.left])
(n.= expected (/.left [expected dummy])))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 82adfdc49..8543ddba6 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -67,27 +67,27 @@
(/.then (n.+ shift) (n.- shift))
(pipe.case {0 #1 actual} (n.= (n.- shift expected) actual) _ false))))
(do !
- [size (# ! each (n.% 5) random.nat)
+ [size (at ! each (n.% 5) random.nat)
expected (random.list size random.nat)]
(all _.and
(_.coverage [/.lefts]
(let [actual (is (List (Or Nat Nat))
(list#each /.left expected))]
- (and (# (list.equivalence n.equivalence) =
- expected
- (/.lefts actual))
- (# (list.equivalence n.equivalence) =
- (list)
- (/.rights actual)))))
+ (and (at (list.equivalence n.equivalence) =
+ expected
+ (/.lefts actual))
+ (at (list.equivalence n.equivalence) =
+ (list)
+ (/.rights actual)))))
(_.coverage [/.rights]
(let [actual (is (List (Or Nat Nat))
(list#each /.right expected))]
- (and (# (list.equivalence n.equivalence) =
- expected
- (/.rights actual))
- (# (list.equivalence n.equivalence) =
- (list)
- (/.lefts actual)))))
+ (and (at (list.equivalence n.equivalence) =
+ expected
+ (/.rights actual))
+ (at (list.equivalence n.equivalence) =
+ (list)
+ (/.lefts actual)))))
(_.coverage [/.partition]
(let [[lefts rights] (|> expected
(list#each (function (_ value)
@@ -96,11 +96,11 @@
(/.right value))))
(is (List (Or Nat Nat)))
/.partition)]
- (and (# (list.equivalence n.equivalence) =
- (list.only n.even? expected)
- lefts)
- (# (list.equivalence n.equivalence) =
- (list.only (|>> n.even? not) expected)
- rights))))
+ (and (at (list.equivalence n.equivalence) =
+ (list.only n.even? expected)
+ lefts)
+ (at (list.equivalence n.equivalence) =
+ (list.only (|>> n.even? not) expected)
+ rights))))
))
))))
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index 2a3a3f919..3e1889c04 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -34,12 +34,12 @@
(def: bounded_size
(random.Random Nat)
(|> random.nat
- (# random.monad each (|>> (n.% 20) (n.+ 1)))))
+ (at random.monad each (|>> (n.% 20) (n.+ 1)))))
(def: size
Test
(do [! random.monad]
- [size (# ! each (n.% 10) random.nat)
+ [size (at ! each (n.% 10) random.nat)
sample (random.unicode size)]
(all _.and
(_.coverage [/.size]
@@ -52,11 +52,11 @@
Test
(do [! random.monad]
[inner (random.unicode 1)
- outer (random.only (|>> (# /.equivalence = inner) not)
+ outer (random.only (|>> (at /.equivalence = inner) not)
(random.unicode 1))
left (random.unicode 1)
right (random.unicode 1)
- .let [full (# /.monoid composite inner outer)
+ .let [full (at /.monoid composite inner outer)
fake_index (-- 0)]]
(`` (all _.and
(~~ (template [<affix> <predicate>]
@@ -81,23 +81,23 @@
Test
(do [! random.monad]
[inner (random.unicode 1)
- outer (random.only (|>> (# /.equivalence = inner) not)
+ outer (random.only (|>> (at /.equivalence = inner) not)
(random.unicode 1))
.let [fake_index (-- 0)]]
(all _.and
(_.coverage [/.contains?]
- (let [full (# /.monoid composite inner outer)]
+ (let [full (at /.monoid composite inner outer)]
(and (/.contains? inner full)
(/.contains? outer full))))
(_.coverage [/.index]
- (and (|> (/.index inner (# /.monoid composite inner outer))
+ (and (|> (/.index inner (at /.monoid composite inner outer))
(maybe.else fake_index)
(n.= 0))
- (|> (/.index outer (# /.monoid composite inner outer))
+ (|> (/.index outer (at /.monoid composite inner outer))
(maybe.else fake_index)
(n.= 1))))
(_.coverage [/.index_since]
- (let [full (# /.monoid composite inner outer)]
+ (let [full (at /.monoid composite inner outer)]
(and (|> (/.index_since 0 inner full)
(maybe.else fake_index)
(n.= 0))
@@ -115,7 +115,7 @@
(maybe.else fake_index)
(n.= fake_index)))))
(_.coverage [/.last_index]
- (let [full (all (# /.monoid composite) outer inner outer)]
+ (let [full (all (at /.monoid composite) outer inner outer)]
(and (|> (/.last_index inner full)
(maybe.else fake_index)
(n.= 1))
@@ -131,7 +131,7 @@
(`` (all _.and
(~~ (template [<short> <long>]
[(_.coverage [<short> <long>]
- (# /.equivalence = <short> <long>))]
+ (at /.equivalence = <short> <long>))]
[/.\0 /.null]
[/.\a /.alarm]
@@ -143,13 +143,13 @@
[/.\r /.carriage_return]
[/.\'' /.double_quote]))
(_.coverage [/.line_feed]
- (# /.equivalence = /.new_line /.line_feed))
+ (at /.equivalence = /.new_line /.line_feed))
)))
(do [! random.monad]
- [size (# ! each (|>> (n.% 10) ++) random.nat)
+ [size (at ! each (|>> (n.% 10) ++) random.nat)
characters (random.set /.hash size (random.alphabetic 1))
.let [sample (|> characters set.list /.together)]
- expected (# ! each (n.% size) random.nat)]
+ expected (at ! each (n.% size) random.nat)]
(_.coverage [/.char]
(case (/.char expected sample)
{.#Some char}
@@ -178,13 +178,13 @@
(def: manipulation
Test
(do [! random.monad]
- [size (# ! each (|>> (n.% 10) (n.+ 2)) random.nat)
+ [size (at ! each (|>> (n.% 10) (n.+ 2)) random.nat)
characters (random.set /.hash size (random.alphabetic 1))
separator (random.only (|>> (set.member? characters) not)
(random.alphabetic 1))
.let [with_no_separator (|> characters set.list /.together)]
static (random.alphabetic 1)
- .let [dynamic (random.only (|>> (# /.equivalence = static) not)
+ .let [dynamic (random.only (|>> (at /.equivalence = static) not)
(random.alphabetic 1))]
pre dynamic
post dynamic
@@ -200,19 +200,19 @@
(/.interposed separator)
(/.all_split_by separator)
(set.of_list /.hash)
- (# set.equivalence = characters))
- (# /.equivalence =
- (/.together (set.list characters))
- (/.interposed "" (set.list characters)))))
+ (at set.equivalence = characters))
+ (at /.equivalence =
+ (/.together (set.list characters))
+ (/.interposed "" (set.list characters)))))
(_.coverage [/.replaced_once]
- (# /.equivalence =
- (# /.monoid composite post static)
- (/.replaced_once pre post (# /.monoid composite pre static))))
+ (at /.equivalence =
+ (at /.monoid composite post static)
+ (/.replaced_once pre post (at /.monoid composite pre static))))
(_.coverage [/.split_by]
- (case (/.split_by static (all (# /.monoid composite) pre static post))
+ (case (/.split_by static (all (at /.monoid composite) pre static post))
{.#Some [left right]}
- (and (# /.equivalence = pre left)
- (# /.equivalence = post right))
+ (and (at /.equivalence = pre left)
+ (at /.equivalence = post right))
{.#None}
false))
@@ -220,19 +220,19 @@
(let [effectiveness!
(|> upper
/.lower_cased
- (# /.equivalence = upper)
+ (at /.equivalence = upper)
not)
idempotence!
(|> lower
/.lower_cased
- (# /.equivalence = lower))
+ (at /.equivalence = lower))
inverse!
(|> lower
/.upper_cased
/.lower_cased
- (# /.equivalence = lower))]
+ (at /.equivalence = lower))]
(and effectiveness!
idempotence!
inverse!)))
@@ -240,19 +240,19 @@
(let [effectiveness!
(|> lower
/.upper_cased
- (# /.equivalence = lower)
+ (at /.equivalence = lower)
not)
idempotence!
(|> upper
/.upper_cased
- (# /.equivalence = upper))
+ (at /.equivalence = upper))
inverse!
(|> upper
/.lower_cased
/.upper_cased
- (# /.equivalence = upper))]
+ (at /.equivalence = upper))]
(and effectiveness!
idempotence!
inverse!)))
@@ -318,7 +318,7 @@
.let [... The wider unicode charset includes control characters that
... can make text replacement work improperly.
... Because of that, I restrict the charset.
- normal_char_gen (|> random.nat (# ! each (|>> (n.% 128) (n.max 1))))]
+ normal_char_gen (|> random.nat (at ! each (|>> (n.% 128) (n.max 1))))]
sep1 (random.text normal_char_gen 1)
sep2 (random.text normal_char_gen 1)
.let [part_gen (|> (random.text normal_char_gen sizeP)
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index b6d868fbd..eb980389d 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -17,7 +17,7 @@
(def: part
(Random Text)
(do [! random.monad]
- [size (# ! each (|>> (n.% 10) ++) random.nat)]
+ [size (at ! each (|>> (n.% 10) ++) random.nat)]
(random.alphabetic size)))
(def: .public test
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index d56fd8bdc..4e30d8797 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -214,7 +214,7 @@
(Random /.Encoding)
(let [options (list.size ..all_encodings)]
(do [! random.monad]
- [choice (# ! each (n.% options) random.nat)]
+ [choice (at ! each (n.% options) random.nat)]
(in (maybe.trusted (list.item choice ..all_encodings))))))
(def: .public test
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index aba3d5948..d1258bf25 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -34,9 +34,9 @@
(def: (range max min)
(-> Char Char (Random Char))
(let [range (n.- min max)]
- (# random.monad each
- (|>> (n.% range) (n.+ min))
- random.nat)))
+ (at random.monad each
+ (|>> (n.% range) (n.+ min))
+ random.nat)))
(def: under_range
(Random Char)
@@ -115,7 +115,7 @@
(text#= expected (/.escaped expected))))))
(do [! random.monad]
[dummy (|> (random.char unicode.character)
- (# ! each text.of_char))]
+ (at ! each text.of_char))]
(_.coverage [/.dangling_escape]
(case (/.un_escaped (format (/.escaped dummy) "\"))
{try.#Success _}
@@ -126,7 +126,7 @@
(do [! random.monad]
[dummy (|> (random.char unicode.character)
(random.only (|>> (set.member? ..valid_sigils) not))
- (# ! each text.of_char))]
+ (at ! each text.of_char))]
(_.coverage [/.invalid_escape]
(case (/.un_escaped (format "\" dummy))
{try.#Success _}
@@ -136,10 +136,10 @@
(exception.match? /.invalid_escape error))))
(do [! random.monad]
[too_short (|> (random.char unicode.character)
- (# ! each (n.% (hex "1000"))))
+ (at ! each (n.% (hex "1000"))))
code (|> (random.unicode 4)
(random.only (function (_ code)
- (case (# n.hex decoded code)
+ (case (at n.hex decoded code)
{try.#Failure error} true
{try.#Success _} false))))]
(_.coverage [/.invalid_unicode_escape]
@@ -150,7 +150,7 @@
{try.#Failure error}
(exception.match? /.invalid_unicode_escape error))]]
- (and (!invalid (# n.hex encoded too_short))
+ (and (!invalid (at n.hex encoded too_short))
(!invalid code)))))
(_.coverage [/.literal]
(with_expansions [<example> (..static_sample)]
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index 903e13497..13446a8ce 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -77,7 +77,7 @@
[(do random.monad
[sample <random>]
(_.coverage [<format>]
- (text#= (# <codec> encoded sample)
+ (text#= (at <codec> encoded sample)
(<format> sample))))]
[/.bit bit.codec random.bit]
@@ -178,9 +178,9 @@
[modulus (random.one (|>> modulus.modulus
try.maybe)
random.int)
- sample (# ! each (modular.modular modulus)
- random.int)]
+ sample (at ! each (modular.modular modulus)
+ random.int)]
(_.coverage [/.mod]
- (text#= (# (modular.codec modulus) encoded sample)
+ (text#= (at (modular.codec modulus) encoded sample)
(/.mod sample))))
))))
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index 63ec898c0..00e98bf4d 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -25,8 +25,8 @@
(def: .public random
(Random /.Block)
(do [! random.monad]
- [start (# ! each (n.% 1,000,000) random.nat)
- additional (# ! each (n.% 1,000,000) random.nat)]
+ [start (at ! each (n.% 1,000,000) random.nat)
+ additional (at ! each (n.% 1,000,000) random.nat)]
(in (/.block start additional))))
(with_expansions [<blocks> (these [blocks/0
@@ -173,15 +173,15 @@
[.let [top_start (hex "AC00")
top_end (hex "D7AF")
end_range (n.- top_start top_end)]
- start (# ! each (|>> (n.% top_start) ++) random.nat)
- end (# ! each (|>> (n.% end_range) (n.+ top_start)) random.nat)
+ start (at ! each (|>> (n.% top_start) ++) random.nat)
+ end (at ! each (|>> (n.% end_range) (n.+ top_start)) random.nat)
.let [additional (n.- start end)
sample (/.block start additional)
size (/.size sample)]
- inside (# ! each
- (|>> (n.% size)
- (n.+ (/.start sample)))
- random.nat)]
+ inside (at ! each
+ (|>> (n.% size)
+ (n.+ (/.start sample)))
+ random.nat)]
(`` (all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index af36a8463..f2c9808c0 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -36,10 +36,10 @@
(_.for [/.Set])
(do [! random.monad]
[block //block.random
- inside (# ! each
- (|>> (n.% (block.size block))
- (n.+ (block.start block)))
- random.nat)
+ inside (at ! each
+ (|>> (n.% (block.size block))
+ (n.+ (block.start block)))
+ random.nat)
left //block.random
right //block.random
.let [equivalence (product.equivalence n.equivalence