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.lux20
-rw-r--r--stdlib/source/test/lux/data/bit.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux22
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux16
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux30
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux16
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux152
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux20
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux40
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux42
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux20
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux32
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux36
-rw-r--r--stdlib/source/test/lux/data/collection/stack.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux26
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux86
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux12
-rw-r--r--stdlib/source/test/lux/data/color.lux36
-rw-r--r--stdlib/source/test/lux/data/color/named.lux4
-rw-r--r--stdlib/source/test/lux/data/format/binary.lux6
-rw-r--r--stdlib/source/test/lux/data/format/json.lux48
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux46
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux12
-rw-r--r--stdlib/source/test/lux/data/name.lux26
-rw-r--r--stdlib/source/test/lux/data/product.lux6
-rw-r--r--stdlib/source/test/lux/data/sum.lux30
-rw-r--r--stdlib/source/test/lux/data/text.lux82
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux6
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux8
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux26
-rw-r--r--stdlib/source/test/lux/data/text/format.lux32
-rw-r--r--stdlib/source/test/lux/data/text/regex.lux12
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux10
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux8
36 files changed, 509 insertions, 509 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index ca497af1c..70e778090 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -40,7 +40,7 @@
[byte random.nat]
(exec (try.trusted (/.write/8! idx byte output))
(recur (++ idx))))
- (\ random.monad in output)))))
+ (# random.monad in output)))))
(def: (throws? exception try)
(All (_ e a) (-> (Exception e) (Try a) Bit))
@@ -79,13 +79,13 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [.let [gen_size (|> random.nat (\ ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (# ! 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 (# ! each (n.% size)))]
offset gen_idx
- length (\ ! each (n.% (n.- offset size)) random.nat)]
+ length (# ! each (n.% (n.- offset size)) random.nat)]
(_.for [/.Binary]
($_ _.and
(_.for [/.equivalence]
@@ -93,11 +93,11 @@
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
(_.cover [/.aggregate]
- (n.= (\ list.mix mix n.+ 0 (..as_list sample))
+ (n.= (# list.mix mix n.+ 0 (..as_list sample))
(/.aggregate n.+ 0 sample)))
(_.cover [/.empty]
- (\ /.equivalence =
+ (# /.equivalence =
(/.empty size)
(/.empty size)))
(_.cover [/.size]
@@ -124,7 +124,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)
+ (# (list.equivalence n.equivalence) = binary_vals slice_vals)
_
#0))))
@@ -135,8 +135,8 @@
0 (not verdict)
_ verdict))))
(_.cover [/.after]
- (and (\ /.equivalence = sample (/.after 0 sample))
- (\ /.equivalence = (/.empty 0) (/.after size sample))
+ (and (# /.equivalence = sample (/.after 0 sample))
+ (# /.equivalence = (/.empty 0) (/.after size sample))
(case (list.reversed (..as_list sample))
{.#End}
false
@@ -148,7 +148,7 @@
(and (case (/.copy size 0 sample 0 (/.empty size))
{try.#Success output}
(and (not (same? sample output))
- (\ /.equivalence = sample output))
+ (# /.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 f54892910..4bd7e6956 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))
(_.cover [/.no /.yes]
- (and (\ /.equivalence = false /.no)
- (\ /.equivalence = true /.yes)))
+ (and (# /.equivalence = false /.no)
+ (# /.equivalence = true /.yes)))
(_.cover [/.off /.on]
- (and (\ /.equivalence = false /.off)
- (\ /.equivalence = true /.on)))
+ (and (# /.equivalence = false /.off)
+ (# /.equivalence = true /.on)))
(_.cover [/.complement]
- (and (not (\ /.equivalence = value ((/.complement function.identity) value)))
- (\ /.equivalence = value ((/.complement not) value))))
+ (and (not (# /.equivalence = value ((/.complement function.identity) value)))
+ (# /.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 0337bd12a..3d875ac3d 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -29,7 +29,7 @@
(def: bounded_size
(Random Nat)
- (\ random.monad each (|>> (n.% 100) (n.+ 1))
+ (# random.monad each (|>> (n.% 100) (n.+ 1))
random.nat))
(def: structures
@@ -57,7 +57,7 @@
the_array (random.array size random.nat)]
($_ _.and
(_.cover [/.example]
- (\ (maybe.equivalence n.equivalence) =
+ (# (maybe.equivalence n.equivalence) =
(/.example n.even? the_array)
(list.example n.even? (/.list {.#None} the_array))))
(_.cover [/.example+]
@@ -80,11 +80,11 @@
_
false))
(_.cover [/.every?]
- (\ bit.equivalence =
+ (# bit.equivalence =
(list.every? n.even? (/.list {.#None} the_array))
(/.every? n.even? the_array)))
(_.cover [/.any?]
- (\ bit.equivalence =
+ (# bit.equivalence =
(list.any? n.even? (/.list {.#None} the_array))
(/.any? n.even? the_array)))
)))
@@ -169,7 +169,7 @@
_
false)))
(do !
- [occupancy (\ ! each (n.% (++ size)) random.nat)]
+ [occupancy (# ! each (n.% (++ size)) random.nat)]
(_.cover [/.occupancy /.vacancy]
(let [the_array (loop [output (: (Array Nat)
(/.empty size))
@@ -191,9 +191,9 @@
random.nat)]
(_.cover [/.of_list /.list]
(and (|> the_list /.of_list (/.list {.#None})
- (\ (list.equivalence n.equivalence) = the_list))
+ (# (list.equivalence n.equivalence) = the_list))
(|> the_array (/.list {.#None}) /.of_list
- (\ (/.equivalence n.equivalence) = the_array))
+ (# (/.equivalence n.equivalence) = the_array))
(exec
(/.filter! n.even? the_array)
(list.every? (function (_ value)
@@ -201,18 +201,18 @@
(same? default value)))
(/.list {.#Some default} the_array))))))
(do !
- [amount (\ ! each (n.% (++ size)) random.nat)]
+ [amount (# ! each (n.% (++ size)) random.nat)]
(_.cover [/.copy!]
(let [copy (: (Array Nat)
(/.empty size))]
(exec (/.copy! amount 0 the_array 0 copy)
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list.first amount (/.list {.#None} the_array))
(/.list {.#None} copy))))))
(_.cover [/.clone]
(let [clone (/.clone the_array)]
(and (not (same? the_array clone))
- (\ (/.equivalence n.equivalence) = the_array clone))))
+ (# (/.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?))]
@@ -220,5 +220,5 @@
(exec (/.filter! 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}) (# (list.equivalence n.equivalence) = evens))))))
))))
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index ea93acfcb..8c7d69241 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)))))
+ (# random.monad each (|>> (n.% (++ max)) (n.max min)))))
(def: .public random
(Random Bits)
(do [! random.monad]
- [size (\ ! each (n.% 1,000) random.nat)]
+ [size (# ! each (n.% 1,000) random.nat)]
(case size
0 (in /.empty)
_ (do [! random.monad]
- [idx (|> random.nat (\ ! each (n.% size)))]
+ [idx (|> random.nat (# ! 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 (# ! each (|>> (n.% 1,000) ++) random.nat)
+ idx (# ! each (n.% size) random.nat)
sample ..random]
($_ _.and
(_.cover [/.bit /.one]
@@ -79,17 +79,17 @@
(_.cover [/.not]
(and (same? /.empty (/.not /.empty))
(or (same? /.empty sample)
- (and (not (\ /.equivalence = sample (/.not sample)))
- (\ /.equivalence = sample (/.not (/.not sample)))))))
+ (and (not (# /.equivalence = sample (/.not sample)))
+ (# /.equivalence = sample (/.not (/.not sample)))))))
(_.cover [/.xor]
(and (same? /.empty (/.xor sample sample))
(n.= (/.size (/.xor sample (/.not sample)))
(/.capacity sample))))
(_.cover [/.or]
- (and (\ /.equivalence = sample (/.or sample sample))
+ (and (# /.equivalence = sample (/.or sample sample))
(n.= (/.size (/.or sample (/.not sample)))
(/.capacity sample))))
(_.cover [/.and]
- (and (\ /.equivalence = sample (/.and sample sample))
+ (and (# /.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 264f80fb9..562b20c0e 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -9,13 +9,13 @@
["$[0]" equivalence]
["$[0]" functor {"+" [Injection]}]]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]
+ ["[0]" maybe ("[1]#[0]" functor)]
["[0]" try]
["[0]" exception]]
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" functor)]
+ ["[0]" list ("[1]#[0]" functor)]
["[0]" set]]]
[math
["[0]" random]
@@ -31,7 +31,7 @@
(def: for_dictionaries
Test
(do [! random.monad]
- [.let [capped_nat (\ random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (# 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)
@@ -71,7 +71,7 @@
unique_keys!
(|> entries
- (list\each product.left)
+ (list#each product.left)
(set.of_list n.hash)
set.size
(n.= (/.size dict)))
@@ -80,7 +80,7 @@
(list.every? (function (_ [key value])
(|> dict
(/.value key)
- (maybe\each (n.= value))
+ (maybe#each (n.= value))
(maybe.else false)))
entries)]
(and correct_size!
@@ -112,7 +112,7 @@
(let [merging_with_oneself (let [(^open "[0]") (/.equivalence n.equivalence)]
(= dict (/.merged dict dict)))
overwritting_keys (let [dict' (|> dict /.entries
- (list\each (function (_ [k v]) [k (++ v)]))
+ (list#each (function (_ [k v]) [k (++ v)]))
(/.of_list n.hash))
(^open "[0]") (/.equivalence n.equivalence)]
(= dict' (/.merged dict' dict)))]
@@ -133,7 +133,7 @@
(def: for_entries
Test
(do random.monad
- [.let [capped_nat (\ random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (# 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 (# 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 75749c61d..3ade2fc0b 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -9,15 +9,15 @@
[\\specification
["$[0]" equivalence]]]
[control
- ["[0]" maybe ("[1]\[0]" monad)]]
+ ["[0]" maybe ("[1]#[0]" monad)]]
[data
["[0]" product]
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
["[0]" set]
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
- ["[0]" random {"+" [Random]} ("[1]\[0]" monad)]
+ ["[0]" random {"+" [Random]} ("[1]#[0]" monad)]
[number
["n" nat]]]]]
[\\library
@@ -28,7 +28,7 @@
(-> (Order k) (Random k) (Random v) Nat (Random (/.Dictionary k v))))
(case size
0
- (random\in (/.empty order))
+ (random#in (/.empty order))
_
(do random.monad
@@ -43,7 +43,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do [! random.monad]
- [size (\ ! each (n.% 100) random.nat)
+ [size (# ! 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)
@@ -56,12 +56,12 @@
sorted_pairs (list.sorted (function (_ [left _] [right _])
(n.< left right))
pairs)
- sorted_values (list\each product.right sorted_pairs)
- (^open "list\[0]") (list.equivalence (: (Equivalence [Nat Nat])
+ sorted_values (list#each product.right sorted_pairs)
+ (^open "list#[0]") (list.equivalence (: (Equivalence [Nat Nat])
(function (_ [kr vr] [ks vs])
(and (n.= kr ks)
(n.= vr vs)))))
- (^open "/\[0]") (/.equivalence n.equivalence)]]
+ (^open "/#[0]") (/.equivalence n.equivalence)]]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec (/.equivalence n.equivalence) (..dictionary n.order random.nat random.nat size)))
@@ -69,7 +69,7 @@
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (bit\= (n.= 0 (/.size sample))
+ (bit#= (n.= 0 (/.size sample))
(/.empty? sample)))
(_.cover [/.empty]
(/.empty? (/.empty n.order)))
@@ -94,15 +94,15 @@
_
#0))
(_.cover [/.entries]
- (list\= (/.entries sample)
+ (list#= (/.entries sample)
sorted_pairs))
(_.cover [/.keys /.values]
- (list\= (/.entries sample)
+ (list#= (/.entries sample)
(list.zipped/2 (/.keys sample) (/.values sample))))
(_.cover [/.of_list]
(|> sample
/.entries (/.of_list n.order)
- (/\= sample)))
+ (/#= sample)))
(_.cover [/.key?]
(and (list.every? (/.key? sample)
(/.keys sample))
@@ -126,12 +126,12 @@
(|> sample
(/.has extra_key extra_value)
(/.lacks extra_key)
- (/\= sample)))
+ (/#= sample)))
(_.cover [/.revised]
(|> sample
(/.has extra_key extra_value)
(/.revised extra_key (n.+ shift))
(/.value extra_key)
- (maybe\each (n.= (n.+ shift extra_value)))
+ (maybe#each (n.= (n.+ shift extra_value)))
(maybe.else false)))
))))
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index 572f06c31..f7079325e 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -7,9 +7,9 @@
[\\specification
["$[0]" equivalence]]]
[control
- ["[0]" maybe ("[1]\[0]" monad)]]
+ ["[0]" maybe ("[1]#[0]" monad)]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
["[0]" text]
[collection
["[0]" set]
@@ -35,7 +35,7 @@
(_.for [/.PList])
(do [! random.monad]
[.let [gen_key (random.ascii/alpha 10)]
- size (\ ! each (n.% 100) random.nat)
+ size (# ! each (n.% 100) random.nat)
sample (..random size gen_key random.nat)
.let [keys (|> sample /.keys (set.of_list text.hash))]
@@ -51,12 +51,12 @@
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (bit\= (n.= 0 (/.size sample))
+ (bit#= (n.= 0 (/.size sample))
(/.empty? sample)))
(_.cover [/.empty]
(/.empty? /.empty))
(_.cover [/.keys /.values]
- (\ (/.equivalence n.equivalence) =
+ (# (/.equivalence n.equivalence) =
sample
(list.zipped/2 (/.keys sample)
(/.values sample))))
@@ -75,18 +75,18 @@
(|> sample
(/.has extra_key extra_value)
(/.value extra_key)
- (maybe\each (n.= extra_value))
+ (maybe#each (n.= extra_value))
(maybe.else false)))
(_.cover [/.revised]
(|> sample
(/.has extra_key extra_value)
(/.revised extra_key (n.+ shift))
(/.value extra_key)
- (maybe\each (n.= (n.+ shift extra_value)))
+ (maybe#each (n.= (n.+ shift extra_value)))
(maybe.else false)))
(_.cover [/.lacks]
(|> sample
(/.has extra_key extra_value)
(/.lacks extra_key)
- (\ (/.equivalence n.equivalence) = sample)))
+ (# (/.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 d924cb788..44316d6a5 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -21,7 +21,7 @@
[data
["[0]" bit]
["[0]" product]
- ["[0]" text ("[1]\[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)]
[collection
["[0]" set]]]
[math
@@ -30,11 +30,11 @@
["n" nat]
["[0]" int]]]]]
[\\library
- ["[0]" / ("[1]\[0]" monad)]])
+ ["[0]" / ("[1]#[0]" monad)]])
(def: bounded_size
(Random Nat)
- (\ random.monad each (n.% 100)
+ (# random.monad each (n.% 100)
random.nat))
(def: random
@@ -43,7 +43,7 @@
[size ..bounded_size]
(|> random.nat
(random.set n.hash size)
- (\ ! each set.list))))
+ (# ! each set.list))))
(def: signatures
Test
@@ -52,28 +52,28 @@
($equivalence.spec (/.equivalence n.equivalence) ..random))
(_.for [/.hash]
(|> random.nat
- (\ random.monad each (|>> list))
+ (# random.monad each (|>> list))
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid ..random))
(_.for [/.mix]
- ($mix.spec /\in /.equivalence /.mix))
+ ($mix.spec /#in /.equivalence /.mix))
(_.for [/.functor]
- ($functor.spec /\in /.equivalence /.functor))
+ ($functor.spec /#in /.equivalence /.functor))
(_.for [/.apply]
- ($apply.spec /\in /.equivalence /.apply))
+ ($apply.spec /#in /.equivalence /.apply))
(_.for [/.monad]
- ($monad.spec /\in /.equivalence /.monad))
+ ($monad.spec /#in /.equivalence /.monad))
(do [! random.monad]
[parameter random.nat
subject random.nat]
(let [lifted (/.lifted io.monad)
- (^open "io\[0]") io.monad
+ (^open "io#[0]") io.monad
expected (n.+ parameter subject)]
(_.cover [/.with /.lifted]
(|> (io.run! (do (/.with io.monad)
- [a (lifted (io\in parameter))
+ [a (lifted (io#in parameter))
b (in subject)]
(in (n.+ a b))))
(case> (^ (list actual))
@@ -87,13 +87,13 @@
Test
(do [! random.monad]
[size ..bounded_size
- .let [(^open "/\[0]") (/.equivalence n.equivalence)]
- sample (\ ! each set.list (random.set n.hash size random.nat))]
+ .let [(^open "/#[0]") (/.equivalence n.equivalence)]
+ sample (# ! each set.list (random.set n.hash size random.nat))]
($_ _.and
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (\ bit.equivalence =
+ (# bit.equivalence =
(/.empty? sample)
(n.= 0 (/.size sample))))
(_.cover [/.repeated]
@@ -101,11 +101,11 @@
(_.cover [/.reversed]
(or (n.< 2 (/.size sample))
(let [not_same!
- (not (/\= sample
+ (not (/#= sample
(/.reversed sample)))
self_symmetry!
- (/\= sample
+ (/#= sample
(/.reversed (/.reversed sample)))]
(and not_same!
self_symmetry!))))
@@ -121,7 +121,7 @@
(/.size (/.sorted <<< sample)))
symmetry!
- (/\= (/.sorted <<< sample)
+ (/#= (/.sorted <<< sample)
(/.reversed (/.sorted (function.flipped <<<) sample)))]
(and size_preservation!
symmetry!)))
@@ -129,8 +129,8 @@
(def: indices
Test
- (let [(^open "/\[0]") (/.equivalence n.equivalence)
- (^open "/\[0]") /.functor]
+ (let [(^open "/#[0]") (/.equivalence n.equivalence)
+ (^open "/#[0]") /.functor]
(do [! random.monad]
[sample ..random
.let [size (/.size sample)]]
@@ -142,7 +142,7 @@
(n.= size (/.size indices))
already_sorted!
- (/\= indices
+ (/#= indices
(/.sorted n.< indices))
expected_numbers!
@@ -157,12 +157,12 @@
(let [enumeration (/.enumeration sample)
has_correct_indices!
- (/\= (/.indices (/.size enumeration))
- (/\each product.left enumeration))
+ (/#= (/.indices (/.size enumeration))
+ (/#each product.left enumeration))
has_correct_values!
- (/\= sample
- (/\each product.right enumeration))]
+ (/#= sample
+ (/#each product.right enumeration))]
(and has_correct_indices!
has_correct_values!)))
(_.cover [/.item]
@@ -178,14 +178,14 @@
(def: slice
Test
- (let [(^open "/\[0]") (/.equivalence n.equivalence)
- (^open "/\[0]") /.monoid]
+ (let [(^open "/#[0]") (/.equivalence n.equivalence)
+ (^open "/#[0]") /.monoid]
(do [! random.monad]
[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 (# ! each (n.% size) random.nat)
+ sub_size (# ! each (|>> (n.% size) ++) random.nat)]
($_ _.and
(_.cover [/.only]
(let [positives (/.only n.even? sample)
@@ -198,36 +198,36 @@
(/.size negatives))))))
(_.cover [/.partition]
(let [[positives negatives] (/.partition n.even? sample)]
- (and (/\= (/.only n.even? sample)
+ (and (/#= (/.only n.even? sample)
positives)
- (/\= (/.only (bit.complement n.even?) sample)
+ (/#= (/.only (bit.complement n.even?) sample)
negatives))))
(_.cover [/.split_at]
(let [[left right] (/.split_at idx sample)]
- (/\= sample
- (/\composite left right))))
+ (/#= sample
+ (/#composite left right))))
(_.cover [/.split_when]
(let [[left right] (/.split_when n.even? sample)]
- (/\= sample
- (/\composite left right))))
+ (/#= sample
+ (/#composite left right))))
(_.cover [/.first /.after]
- (/\= sample
- (/\composite (/.first idx sample)
+ (/#= sample
+ (/#composite (/.first idx sample)
(/.after idx sample))))
(_.cover [/.while /.until]
- (/\= sample
- (/\composite (/.while n.even? sample)
+ (/#= sample
+ (/#composite (/.while n.even? sample)
(/.until n.even? sample))))
(_.cover [/.sub]
(let [subs (/.sub sub_size sample)]
(and (/.every? (|>> /.size (n.<= sub_size)) subs)
- (/\= sample
+ (/#= sample
(/.together subs)))))
))))
(def: member
Test
- (let [(^open "/\[0]") (/.equivalence n.equivalence)]
+ (let [(^open "/#[0]") (/.equivalence n.equivalence)]
(do [! random.monad]
[sample ..random]
(`` ($_ _.and
@@ -249,7 +249,7 @@
(_.cover [<tail>]
(case [(<pre> sample) (<tail> sample)]
[{.#Item _ expected} {.#Some actual}]
- (/\= (<pre> expected) actual)
+ (/#= (<pre> expected) actual)
[{.#End} {.#None}]
true
@@ -265,9 +265,9 @@
(def: grouping
Test
- (let [(^open "/\[0]") (/.equivalence n.equivalence)
- (^open "/\[0]") /.functor
- (^open "/\[0]") /.monoid
+ (let [(^open "/#[0]") (/.equivalence n.equivalence)
+ (^open "/#[0]") /.functor
+ (^open "/#[0]") /.monoid
+/2 (: (-> Nat Nat Nat)
(function (_ left right)
@@ -292,10 +292,10 @@
(n.min (/.size sample/0) (/.size sample/1)))
can_extract_values!
- (and (/\= (/.first zipped::size sample/0)
- (/\each product.left zipped))
- (/\= (/.first zipped::size sample/1)
- (/\each product.right zipped)))]
+ (and (/#= (/.first zipped::size sample/0)
+ (/#each product.left zipped))
+ (/#= (/.first zipped::size sample/1)
+ (/#each product.right zipped)))]
(and size_of_smaller_list!
can_extract_values!)))
(_.cover [/.zipped/3]
@@ -310,52 +310,52 @@
(/.size sample/2)))
can_extract_values!
- (and (/\= (/.first zipped::size sample/0)
- (/\each product.left zipped))
- (/\= (/.first zipped::size sample/1)
- (/\each (|>> product.right product.left) zipped))
- (/\= (/.first zipped::size sample/2)
- (/\each (|>> product.right product.right) zipped)))]
+ (and (/#= (/.first zipped::size sample/0)
+ (/#each product.left zipped))
+ (/#= (/.first zipped::size sample/1)
+ (/#each (|>> product.right product.left) zipped))
+ (/#= (/.first zipped::size sample/2)
+ (/#each (|>> product.right product.right) zipped)))]
(and size_of_smaller_list!
can_extract_values!)))
(_.cover [/.zipped]
- (and (\ (/.equivalence (product.equivalence n.equivalence n.equivalence)) =
+ (and (# (/.equivalence (product.equivalence n.equivalence n.equivalence)) =
(/.zipped/2 sample/0 sample/1)
((/.zipped 2) sample/0 sample/1))
- (\ (/.equivalence ($_ product.equivalence n.equivalence n.equivalence n.equivalence)) =
+ (# (/.equivalence ($_ product.equivalence n.equivalence n.equivalence n.equivalence)) =
(/.zipped/3 sample/0 sample/1 sample/2)
((/.zipped 3) sample/0 sample/1 sample/2))))
(_.cover [/.zipped_with/2]
- (/\= (/\each (function (_ [left right])
+ (/#= (/#each (function (_ [left right])
(+/2 left right))
(/.zipped/2 sample/0 sample/1))
(/.zipped_with/2 +/2 sample/0 sample/1)))
(_.cover [/.zipped_with/3]
- (/\= (/\each (function (_ [left mid right])
+ (/#= (/#each (function (_ [left mid right])
(+/3 left mid right))
(/.zipped/3 sample/0 sample/1 sample/2))
(/.zipped_with/3 +/3 sample/0 sample/1 sample/2)))
(_.cover [/.zipped_with]
- (and (/\= (/.zipped_with/2 +/2 sample/0 sample/1)
+ (and (/#= (/.zipped_with/2 +/2 sample/0 sample/1)
((/.zipped_with 2) +/2 sample/0 sample/1))
- (/\= (/.zipped_with/3 +/3 sample/0 sample/1 sample/2)
+ (/#= (/.zipped_with/3 +/3 sample/0 sample/1 sample/2)
((/.zipped_with 3) +/3 sample/0 sample/1 sample/2))))
(_.cover [/.together]
- (and (/\= (/\composite sample/0 sample/1)
+ (and (/#= (/#composite sample/0 sample/1)
(/.together (list sample/0 sample/1)))
- (/\= ($_ /\composite sample/0 sample/1 sample/2)
+ (/#= ($_ /#composite sample/0 sample/1 sample/2)
(/.together (list sample/0 sample/1 sample/2)))))
))))
(def: search
Test
- (let [(^open "/\[0]") /.functor
+ (let [(^open "/#[0]") /.functor
choose (: (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (\ n.decimal encoded value)}
+ {.#Some (# n.decimal encoded value)}
{.#None})))]
(do [! random.monad]
[sample ..random]
@@ -363,11 +363,11 @@
(_.cover [/.one]
(case [(|> sample
(/.only n.even?)
- (/\each (\ n.decimal encoded))
+ (/#each (# n.decimal encoded))
/.head)
(/.one choose sample)]
[{.#Some expected} {.#Some actual}]
- (text\= expected actual)
+ (text#= expected actual)
[{.#None} {.#None}]
true
@@ -375,10 +375,10 @@
_
false))
(_.cover [/.all]
- (\ (/.equivalence text.equivalence) =
+ (# (/.equivalence text.equivalence) =
(|> sample
(/.only n.even?)
- (/\each (\ n.decimal encoded)))
+ (/#each (# n.decimal encoded)))
(/.all choose sample)))
(_.cover [/.example]
(case (/.example n.even? sample)
@@ -393,8 +393,8 @@
Test
(<| (_.covering /._)
(_.for [.List])
- (let [(^open "/\[0]") (/.equivalence n.equivalence)
- (^open "/\[0]") /.functor]
+ (let [(^open "/#[0]") (/.equivalence n.equivalence)
+ (^open "/#[0]") /.functor]
(do [! random.monad]
[sample ..random
separator random.nat]
@@ -416,21 +416,21 @@
(_.cover [/.iterations]
(or (/.empty? sample)
(let [size (/.size sample)]
- (/\= (/.indices size)
+ (/#= (/.indices size)
(/.iterations (function (_ index)
(if (n.< size index)
{.#Some (++ index)}
{.#None}))
0)))))
(_.cover [/.mixes]
- (/\= (/\each (function (_ index)
- (\ /.mix mix n.+ 0 (/.first index sample)))
+ (/#= (/#each (function (_ index)
+ (# /.mix mix n.+ 0 (/.first index sample)))
(/.indices (++ (/.size sample))))
(/.mixes n.+ 0 sample)))
(do random.monad
[expected random.nat
- .let [(^open "/\[0]") (/.equivalence n.equivalence)]]
+ .let [(^open "/#[0]") (/.equivalence n.equivalence)]]
(_.cover [/.when]
- (and (/\= (list expected) (/.when true (list expected)))
- (/\= (list) (/.when false (list expected))))))
+ (and (/#= (list expected) (/.when true (list expected)))
+ (/#= (list) (/.when false (list expected))))))
)))))
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 45053e52b..7d5cf2f01 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -8,10 +8,10 @@
["$[0]" equivalence]
["$[0]" functor {"+" [Injection]}]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
["[0]" set]
- ["[0]" list ("[1]\[0]" monoid)]]]
+ ["[0]" list ("[1]#[0]" monoid)]]]
[math
["[0]" random]
[number
@@ -28,7 +28,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do [! random.monad]
- [size (\ ! each (n.% 100) random.nat)
+ [size (# ! each (n.% 100) random.nat)
members (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? members) not)
random.nat)
@@ -42,18 +42,18 @@
(_.cover [/.of_list /.list]
(|> members /.of_list /.list
- (\ (list.equivalence n.equivalence) = members)))
+ (# (list.equivalence n.equivalence) = members)))
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (bit\= (n.= 0 size) (/.empty? sample)))
+ (bit#= (n.= 0 size) (/.empty? sample)))
(_.cover [/.empty]
(let [empty_is_empty!
(/.empty? /.empty)
all_empty_queues_look_the_same!
- (bit\= (/.empty? sample)
- (\ (/.equivalence n.equivalence) =
+ (bit#= (/.empty? sample)
+ (# (/.equivalence n.equivalence) =
sample
/.empty))]
(and empty_is_empty!
@@ -87,8 +87,8 @@
(/.member? n.equivalence pushed non_member)
has_expected_order!
- (\ (list.equivalence n.equivalence) =
- (list\composite (/.list sample) (list non_member))
+ (# (list.equivalence n.equivalence) =
+ (list#composite (/.list sample) (list non_member))
(/.list pushed))]
(and size_increases!
new_member_is_identified!
@@ -106,7 +106,7 @@
(not (/.member? n.equivalence popped target))
has_expected_order!
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
expected
(/.list popped))]
(and size_decreases!
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 807ee4fd5..06f2edef4 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -5,9 +5,9 @@
[abstract
["[0]" monad {"+" [do]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]]
+ ["[0]" maybe ("[1]#[0]" functor)]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]]
+ ["[0]" bit ("[1]#[0]" equivalence)]]
[math
["[0]" random {"+" [Random]}]
[number
@@ -31,7 +31,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do [! random.monad]
- [size (\ ! each (n.% 100) random.nat)
+ [size (# ! each (n.% 100) random.nat)
sample (..random size)
non_member_priority random.nat
non_member (random.only (|>> (/.member? n.equivalence sample) not)
@@ -43,7 +43,7 @@
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (bit\= (n.= 0 (/.size sample))
+ (bit#= (n.= 0 (/.size sample))
(/.empty? sample)))
(_.cover [/.empty]
(/.empty? /.empty))
@@ -80,7 +80,7 @@
(/.end /.min min_member)
(/.end /.max max_member)
/.front
- (maybe\each (n.= max_member))
+ (maybe#each (n.= max_member))
(maybe.else false)))
(_.cover [/.min]
(|> /.empty
@@ -88,7 +88,7 @@
(/.end /.min min_member)
/.next
/.front
- (maybe\each (n.= min_member))
+ (maybe#each (n.= min_member))
(maybe.else false)))
))
))))
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 17e1d8192..1e2180361 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -15,60 +15,60 @@
["[0]" try {"+" [Try]}]
["[0]" exception]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
- ["[0]" list ("[1]\[0]" mix)]
+ ["[0]" list ("[1]#[0]" mix)]
["[0]" set]]]
[math
["[0]" random]
[number
["n" nat]]]]]
[\\library
- ["[0]" / ("[1]\[0]" monad)]])
+ ["[0]" / ("[1]#[0]" monad)]])
(def: signatures
Test
(do [! random.monad]
- [size (\ ! each (n.% 100) random.nat)]
+ [size (# ! each (n.% 100) random.nat)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec (/.equivalence n.equivalence) (random.row size random.nat)))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid (random.row size random.nat)))
(_.for [/.mix]
- ($mix.spec /\in /.equivalence /.mix))
+ ($mix.spec /#in /.equivalence /.mix))
(_.for [/.functor]
- ($functor.spec /\in /.equivalence /.functor))
+ ($functor.spec /#in /.equivalence /.functor))
(_.for [/.apply]
- ($apply.spec /\in /.equivalence /.apply))
+ ($apply.spec /#in /.equivalence /.apply))
(_.for [/.monad]
- ($monad.spec /\in /.equivalence /.monad))
+ ($monad.spec /#in /.equivalence /.monad))
)))
(def: whole
Test
(do [! random.monad]
- [size (\ ! each (n.% 100) random.nat)
+ [size (# ! 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)]]
+ .let [(^open "/#[0]") (/.equivalence n.equivalence)]]
($_ _.and
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (bit\= (/.empty? sample) (n.= 0 (/.size sample))))
+ (bit#= (/.empty? sample) (n.= 0 (/.size sample))))
(_.cover [/.empty]
(/.empty? /.empty))
(_.cover [/.list /.of_list]
- (|> sample /.list /.of_list (/\= sample)))
+ (|> sample /.list /.of_list (/#= sample)))
(_.cover [/.reversed]
(or (n.< 2 (/.size sample))
(let [not_same!
- (not (/\= sample
+ (not (/#= sample
(/.reversed sample)))
self_symmetry!
- (/\= sample
+ (/#= sample
(/.reversed (/.reversed sample)))]
(and not_same!
self_symmetry!))))
@@ -81,10 +81,10 @@
(def: index_based
Test
(do [! random.monad]
- [size (\ ! each (|>> (n.% 100) ++) random.nat)]
+ [size (# ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
(do !
- [good_index (|> random.nat (\ ! each (n.% size)))
+ [good_index (|> random.nat (# ! 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)
@@ -134,7 +134,7 @@
(<| (_.covering /._)
(_.for [/.Row])
(do [! random.monad]
- [size (\ ! each (|>> (n.% 100) ++) random.nat)]
+ [size (# ! each (|>> (n.% 100) ++) random.nat)]
($_ _.and
..signatures
..whole
@@ -145,14 +145,14 @@
non_member (random.only (|>> (set.member? sample) not)
random.nat)
.let [sample (|> sample set.list /.of_list)]
- .let [(^open "/\[0]") (/.equivalence n.equivalence)]]
+ .let [(^open "/#[0]") (/.equivalence n.equivalence)]]
($_ _.and
(do !
[value/0 random.nat
value/1 random.nat
value/2 random.nat]
(_.cover [/.row]
- (/\= (/.of_list (list value/0 value/1 value/2))
+ (/#= (/.of_list (list value/0 value/1 value/2))
(/.row value/0 value/1 value/2))))
(_.cover [/.member?]
(and (list.every? (/.member? n.equivalence sample)
@@ -180,7 +180,7 @@
(|> sample
(/.suffix non_member)
/.prefix
- (/\= sample))]
+ (/#= sample))]
(and expected_size!
symmetry!))))
))
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index 0d772e7dd..2c9a8aca5 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -13,7 +13,7 @@
["[0]" text
["%" format {"+" [format]}]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
["[0]" random]
[number
@@ -25,7 +25,7 @@
(All (_ a) (-> (Equivalence a) (Equivalence (/.Sequence a))))
(def: (= reference subject)
- (\ (list.equivalence super) =
+ (# (list.equivalence super) =
(/.first 100 reference)
(/.first 100 subject))))
@@ -42,12 +42,12 @@
Test
(<| (_.covering /._)
(_.for [/.Sequence])
- (let [(^open "list\[0]") (list.equivalence n.equivalence)])
+ (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 (# ! each (n.% 100) random.nat)
+ size (# ! each (|>> (n.% 10) ++) random.nat)
+ offset (# ! each (n.% 100) random.nat)
cycle_start random.nat
cycle_next (random.list size random.nat)]
($_ _.and
@@ -63,38 +63,38 @@
(n.= repeated
(/.item index (/.repeated repeated))))
(_.cover [/.first]
- (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (list#= (enum.range n.enum offset (-- (n.+ size offset)))
(/.first size (..iterations ++ offset))))
(_.cover [/.after]
- (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (list#= (enum.range n.enum offset (-- (n.+ size offset)))
(/.first size (/.after offset (..iterations ++ 0)))))
(_.cover [/.split_at]
(let [[drops takes] (/.split_at size (..iterations ++ 0))]
- (and (list\= (enum.range n.enum 0 (-- size))
+ (and (list#= (enum.range n.enum 0 (-- size))
drops)
- (list\= (enum.range n.enum size (-- (n.* 2 size)))
+ (list#= (enum.range n.enum size (-- (n.* 2 size)))
(/.first size takes)))))
(_.cover [/.while]
- (list\= (enum.range n.enum 0 (-- size))
+ (list#= (enum.range n.enum 0 (-- size))
(/.while (n.< size) (..iterations ++ 0))))
(_.cover [/.until]
- (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (list#= (enum.range n.enum offset (-- (n.+ size offset)))
(/.while (n.< (n.+ size offset))
(/.until (n.< offset) (..iterations ++ 0)))))
(_.cover [/.split_when]
(let [[drops takes] (/.split_when (n.= size) (..iterations ++ 0))]
- (and (list\= (enum.range n.enum 0 (-- size))
+ (and (list#= (enum.range n.enum 0 (-- size))
drops)
- (list\= (enum.range n.enum size (-- (n.* 2 size)))
+ (list#= (enum.range n.enum size (-- (n.* 2 size)))
(/.while (n.< (n.* 2 size)) takes)))))
(_.cover [/.head]
(n.= offset
(/.head (..iterations ++ offset))))
(_.cover [/.tail]
- (list\= (enum.range n.enum (++ offset) (n.+ size offset))
+ (list#= (enum.range n.enum (++ offset) (n.+ size offset))
(/.first size (/.tail (..iterations ++ offset)))))
(_.cover [/.only]
- (list\= (list\each (n.* 2) (enum.range n.enum 0 (-- size)))
+ (list#= (list#each (n.* 2) (enum.range n.enum 0 (-- size)))
(/.first size (/.only n.even? (..iterations ++ 0)))))
(_.cover [/.partition]
(let [[evens odds] (/.partition n.even? (..iterations ++ 0))]
@@ -103,16 +103,16 @@
(n.= (++ (n.* 2 offset))
(/.item offset odds)))))
(_.cover [/.iterations]
- (let [(^open "/\[0]") /.functor
- (^open "list\[0]") (list.equivalence text.equivalence)]
- (list\= (/.first size
- (/\each %.nat (..iterations ++ offset)))
+ (let [(^open "/#[0]") /.functor
+ (^open "list#[0]") (list.equivalence text.equivalence)]
+ (list#= (/.first size
+ (/#each %.nat (..iterations ++ offset)))
(/.first size
(/.iterations (function (_ n) [(++ n) (%.nat n)])
offset)))))
(_.cover [/.cycle]
(let [cycle (list& cycle_start cycle_next)]
- (list\= (list.together (list.repeated size cycle))
+ (list#= (list.together (list.repeated size cycle))
(/.first (n.* size (list.size cycle))
(/.cycle [cycle_start cycle_next])))))
(_.cover [/.^sequence&]
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index 3745cf845..7cf9debe0 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -10,7 +10,7 @@
["$[0]" hash]
["$[0]" monoid]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
["[0]" list]]]
[math
@@ -18,11 +18,11 @@
[number
["n" nat]]]]]
[\\library
- ["[0]" / ("\[0]" equivalence)]])
+ ["[0]" / ("#[0]" equivalence)]])
(def: gen_nat
(Random Nat)
- (\ random.monad each (n.% 100)
+ (# random.monad each (n.% 100)
random.nat))
(def: .public 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)))
+ (# 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,7 +52,7 @@
(_.cover [/.empty]
(/.empty? (/.empty n.hash)))
(do !
- [hash (\ ! each (function (_ constant)
+ [hash (# ! each (function (_ constant)
(: (Hash Nat)
(implementation
(def: &equivalence n.equivalence)
@@ -65,10 +65,10 @@
(_.cover [/.size]
(n.= sizeL (/.size setL)))
(_.cover [/.empty?]
- (bit\= (/.empty? setL)
+ (bit#= (/.empty? setL)
(n.= 0 (/.size setL))))
(_.cover [/.list /.of_list]
- (|> setL /.list (/.of_list n.hash) (\= setL)))
+ (|> setL /.list (/.of_list n.hash) (#= setL)))
(_.cover [/.member?]
(and (list.every? (/.member? setL) (/.list setL))
(not (/.member? setL non_memberL))))
@@ -89,12 +89,12 @@
(|> setL
(/.has non_memberL)
(/.lacks non_memberL)
- (\= setL))
+ (#= setL))
idempotency!
(|> setL
(/.lacks non_memberL)
- (\= setL))]
+ (#= setL))]
(and symmetry!
idempotency!)))
(_.cover [/.union /.sub?]
@@ -107,7 +107,7 @@
union_with_empty_set!
(|> setL
(/.union (/.empty n.hash))
- (\= setL))]
+ (#= setL))]
(and sets_are_subs_of_their_unions!
union_with_empty_set!)))
(_.cover [/.intersection /.super?]
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 2b614a1a4..b281e85bd 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -10,10 +10,10 @@
["$[0]" equivalence]
["$[0]" hash]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
["[0]" set]
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[math
["[0]" random {"+" [Random]}]
[number
@@ -23,14 +23,14 @@
(def: count
(Random Nat)
- (\ random.monad each (|>> (n.% 10) ++) random.nat))
+ (# 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))))
(do [! random.monad]
[elements (random.set hash size element)
element_counts (random.list size ..count)]
- (in (list\mix (function (_ [count element] set)
+ (in (list#mix (function (_ [count element] set)
(/.has count element set))
(/.empty hash)
(list.zipped/2 element_counts
@@ -39,13 +39,13 @@
(def: signature
Test
(do [! random.monad]
- [diversity (\ ! each (n.% 10) random.nat)]
+ [diversity (# ! each (n.% 10) random.nat)]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat)))
(_.for [/.hash]
(|> random.nat
- (\ random.monad each (function (_ single)
+ (# random.monad each (function (_ single)
(/.has 1 single (/.empty n.hash))))
($hash.spec /.hash)))
)))
@@ -53,7 +53,7 @@
(def: composition
Test
(do [! random.monad]
- [diversity (\ ! each (n.% 10) random.nat)
+ [diversity (# ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
another (..random diversity n.hash ..count random.nat)]
(`` ($_ _.and
@@ -113,24 +113,24 @@
(<| (_.covering /._)
(_.for [/.Set])
(do [! random.monad]
- [diversity (\ ! each (n.% 10) random.nat)
+ [diversity (# ! 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 (# ! each (n.% addition_count) random.nat)
another (..random diversity n.hash ..count random.nat)]
($_ _.and
(_.cover [/.list /.of_list]
(|> sample
/.list
(/.of_list n.hash)
- (\ /.equivalence = sample)))
+ (# /.equivalence = sample)))
(_.cover [/.size]
(n.= (list.size (/.list sample))
(/.size sample)))
(_.cover [/.empty?]
- (bit\= (/.empty? sample)
+ (bit#= (/.empty? sample)
(n.= 0 (/.size sample))))
(_.cover [/.empty]
(/.empty? (/.empty n.hash)))
@@ -159,7 +159,7 @@
(let [null_scenario!
(|> sample
(/.has 0 non_member)
- (\ /.equivalence = sample))
+ (# /.equivalence = sample))
normal_scenario!
(let [sample+ (/.has addition_count non_member sample)]
@@ -170,7 +170,7 @@
normal_scenario!)))
(_.cover [/.lacks]
(let [null_scenario!
- (\ /.equivalence =
+ (# /.equivalence =
(|> sample
(/.has addition_count non_member))
(|> sample
@@ -190,7 +190,7 @@
(|> sample
(/.has addition_count non_member)
(/.lacks addition_count non_member)
- (\ /.equivalence = sample))]
+ (# /.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)))))
+ (# /.equivalence = sample unary)))))
(_.cover [/.super?]
(let [unary (|> sample /.support /.of_set)]
(and (/.super? unary sample)
(or (not (/.super? sample unary))
- (\ /.equivalence = sample unary)))))
+ (# /.equivalence = sample unary)))))
(_.cover [/.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 383c5c747..33ddfc89d 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -8,11 +8,11 @@
[\\specification
["$[0]" equivalence]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
["[0]" list]]]
[math
- ["[0]" random {"+" [Random]} ("[1]\[0]" monad)]
+ ["[0]" random {"+" [Random]} ("[1]#[0]" monad)]
[number
["n" nat]]]]]
[\\library
@@ -21,13 +21,13 @@
(def: size
(random.Random Nat)
- (\ random.monad each (n.% 100) random.nat))
+ (# random.monad each (n.% 100) random.nat))
(def: .public (random size &order gen_value)
(All (_ a) (-> Nat (Order a) (Random a) (Random (Set a))))
(case size
0
- (random\in (/.empty &order))
+ (random#in (/.empty &order))
_
(do random.monad
@@ -47,8 +47,8 @@
non_memberL (random.only (|>> (//.member? usetL) not)
random.nat)
.let [listL (//.list usetL)]
- listR (|> (random.set n.hash sizeR random.nat) (\ ! each //.list))
- .let [(^open "/\[0]") /.equivalence
+ listR (|> (random.set n.hash sizeR random.nat) (# ! each //.list))
+ .let [(^open "/#[0]") /.equivalence
setL (/.of_list n.order listL)
setR (/.of_list n.order listR)
empty (/.empty n.order)]]
@@ -59,18 +59,18 @@
(_.cover [/.size]
(n.= sizeL (/.size setL)))
(_.cover [/.empty?]
- (bit\= (n.= 0 (/.size setL))
+ (bit#= (n.= 0 (/.size setL))
(/.empty? setL)))
(_.cover [/.empty]
(/.empty? (/.empty n.order)))
(_.cover [/.list]
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(/.list (/.of_list n.order listL))
- (list.sorted (\ n.order <) listL)))
+ (list.sorted (# n.order <) listL)))
(_.cover [/.of_list]
(|> setL
/.list (/.of_list n.order)
- (/\= setL)))
+ (/#= setL)))
(~~ (template [<coverage> <comparison>]
[(_.cover [<coverage>]
(case (<coverage> setL)
@@ -101,7 +101,7 @@
(|> setL
(/.has non_memberL)
(/.lacks non_memberL)
- (\ /.equivalence = setL)))
+ (# /.equivalence = setL)))
(_.cover [/.sub?]
(let [self!
(/.sub? setL setL)
@@ -118,7 +118,7 @@
(/.super? empty setL)
symmetry!
- (bit\= (/.super? setL setR)
+ (bit#= (/.super? setL setR)
(/.sub? setR setL))]
(and self!
empty!
@@ -126,7 +126,7 @@
(~~ (template [<coverage> <relation> <empty?>]
[(_.cover [<coverage>]
(let [self!
- (\ /.equivalence =
+ (# /.equivalence =
setL
(<coverage> setL setL))
@@ -135,12 +135,12 @@
(<relation> (<coverage> setL setR) setR))
empty!
- (\ /.equivalence =
+ (# /.equivalence =
(if <empty?> empty setL)
(<coverage> setL empty))
idempotence!
- (\ /.equivalence =
+ (# /.equivalence =
(<coverage> setL (<coverage> setL setR))
(<coverage> setR (<coverage> setL setR)))]
(and self!
@@ -155,19 +155,19 @@
(let [self!
(|> setL
(/.difference setL)
- (\ /.equivalence = empty))
+ (# /.equivalence = empty))
empty!
(|> setL
(/.difference empty)
- (\ /.equivalence = setL))
+ (# /.equivalence = setL))
difference!
(not (list.any? (/.member? (/.difference setL setR))
(/.list setL)))
idempotence!
- (\ /.equivalence =
+ (# /.equivalence =
(/.difference setL setR)
(/.difference setL (/.difference setL setR)))]
(and self!
diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux
index 97e69923f..3ca1e508a 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -10,7 +10,7 @@
[control
["[0]" maybe]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]]
+ ["[0]" bit ("[1]#[0]" equivalence)]]
[math
["[0]" random]
[number
@@ -27,7 +27,7 @@
(<| (_.covering /._)
(_.for [/.Stack])
(do random.monad
- [size (\ random.monad each (n.% 100) random.nat)
+ [size (# random.monad each (n.% 100) random.nat)
sample (random.stack size random.nat)
expected_top random.nat]
($_ _.and
@@ -39,7 +39,7 @@
(_.cover [/.size]
(n.= size (/.size sample)))
(_.cover [/.empty?]
- (bit\= (n.= 0 (/.size sample))
+ (bit#= (n.= 0 (/.size sample))
(/.empty? sample)))
(_.cover [/.empty]
(/.empty? /.empty))
@@ -56,7 +56,7 @@
(/.empty? sample)
{.#Some [top remaining]}
- (\ (/.equivalence n.equivalence) =
+ (# (/.equivalence n.equivalence) =
sample
(/.top top remaining))))
(_.cover [/.top]
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index fef8c14f6..9cba03540 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -11,7 +11,7 @@
[data
["[0]" product]
[collection
- ["[0]" list ("[1]\[0]" functor mix)]]]
+ ["[0]" list ("[1]#[0]" functor mix)]]]
[math
["[0]" random {"+" [Random]}]
[number
@@ -23,13 +23,13 @@
(All (_ a) (-> (Random a) (Random [Nat (Tree a)])))
(do [! random.monad]
[value gen_value
- num_children (\ ! each (n.% 2) random.nat)
+ num_children (# ! each (n.% 2) random.nat)
children (random.list num_children (tree gen_value))]
(in [(|> children
- (list\each product.left)
- (list\mix n.+ 1))
+ (list#each product.left)
+ (list#mix n.+ 1))
[/.#value value
- /.#children (list\each product.right children)]])))
+ /.#children (list#each product.right children)]])))
(def: .public test
Test
@@ -38,7 +38,7 @@
($_ _.and
(_.for [/.equivalence]
(|> (..tree random.nat)
- (\ random.monad each product.right)
+ (# 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]
(_.cover [/.leaf]
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list expected)
(/.flat (/.leaf expected)))))
(do [! random.monad]
[value random.nat
- num_children (\ ! each (n.% 3) random.nat)
+ num_children (# ! each (n.% 3) random.nat)
children (random.list num_children random.nat)]
(_.cover [/.branch]
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list& value children)
- (/.flat (/.branch value (list\each /.leaf children))))))
+ (/.flat (/.branch value (list#each /.leaf children))))))
(do random.monad
[expected/0 random.nat
expected/1 random.nat
@@ -72,15 +72,15 @@
expected/4 random.nat
expected/5 random.nat]
(_.cover [/.tree]
- (and (\ (list.equivalence n.equivalence) =
+ (and (# (list.equivalence n.equivalence) =
(list expected/0)
(/.flat (/.tree expected/0)))
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list expected/0 expected/1 expected/2)
(/.flat (/.tree expected/0
{expected/1 {}
expected/2 {}})))
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list expected/0 expected/1 expected/2
expected/3 expected/4 expected/5)
(/.flat (/.tree expected/0
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index e00a0773b..5285a8eca 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -5,11 +5,11 @@
[abstract
[monad {"+" [do]}]]
[control
- ["[0]" maybe ("[1]\[0]" functor)]]
+ ["[0]" maybe ("[1]#[0]" functor)]]
[data
- ["[0]" text ("[1]\[0]" equivalence monoid)]
+ ["[0]" text ("[1]#[0]" equivalence monoid)]
[collection
- ["[0]" list ("[1]\[0]" mix)]]]
+ ["[0]" list ("[1]#[0]" mix)]]]
[math
["[0]" random]
[number
@@ -34,7 +34,7 @@
(_.for [/.Tree])
(do [! random.monad]
[tag_left (random.ascii/alpha_num 1)
- tag_right (random.only (|>> (text\= tag_left) not)
+ tag_right (random.only (|>> (text#= tag_left) not)
(random.ascii/alpha_num 1))
expected_left random.nat
expected_right random.nat]
@@ -43,22 +43,22 @@
(exec (/.builder text.monoid)
true))
(_.cover [/.tag]
- (and (text\= tag_left
- (/.tag (\ ..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))))))
+ (and (text#= tag_left
+ (/.tag (# ..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))))))
(_.cover [/.root]
- (and (case (/.root (\ ..builder leaf tag_left expected_left))
+ (and (case (/.root (# ..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 (# ..builder branch
+ (# ..builder leaf tag_left expected_left)
+ (# ..builder leaf tag_right expected_right)))
{.#Left _}
false
@@ -73,11 +73,11 @@
false))))
(_.cover [/.value]
(and (n.= expected_left
- (/.value (\ ..builder leaf tag_left expected_left)))
+ (/.value (# ..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 (# ..builder branch
+ (# ..builder leaf tag_left expected_left)
+ (# ..builder leaf tag_right expected_right))))))
(do random.monad
[.let [tags_equivalence (list.equivalence text.equivalence)
values_equivalence (list.equivalence n.equivalence)]
@@ -86,40 +86,40 @@
values/H random.nat
values/T (random.list 5 random.nat)]
(_.cover [/.tags /.values]
- (let [tree (list\mix (function (_ [tag value] tree)
- (\ builder branch tree (\ builder leaf tag value)))
- (\ builder leaf tags/H values/H)
+ (let [tree (list#mix (function (_ [tag value] tree)
+ (# builder branch tree (# builder leaf tag value)))
+ (# builder leaf tags/H values/H)
(list.zipped/2 tags/T values/T))]
- (and (\ tags_equivalence = (list& tags/H tags/T) (/.tags tree))
- (\ values_equivalence = (list& values/H values/T) (/.values tree))))))
+ (and (# tags_equivalence = (list& tags/H tags/T) (/.tags tree))
+ (# values_equivalence = (list& values/H values/T) (/.values tree))))))
(_.cover [/.one]
(let [can_find_correct_one!
- (|> (\ ..builder leaf tag_left expected_left)
+ (|> (# ..builder leaf tag_left expected_left)
(/.one (text.contains? tag_left))
- (maybe\each (n.= expected_left))
+ (maybe#each (n.= expected_left))
(maybe.else false))
cannot_find_incorrect_one!
- (|> (\ ..builder leaf tag_right expected_right)
+ (|> (# ..builder leaf tag_right expected_right)
(/.one (text.contains? tag_left))
- (maybe\each (n.= expected_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))
+ (|> (# ..builder branch
+ (# ..builder leaf tag_left expected_left)
+ (# ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_left))
- (maybe\each (n.= expected_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))
+ (|> (# ..builder branch
+ (# ..builder leaf tag_left expected_left)
+ (# ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_right))
- (maybe\each (n.= expected_right))
+ (maybe#each (n.= expected_right))
(maybe.else false))]
(and can_find_correct_one!
cannot_find_incorrect_one!
@@ -128,23 +128,23 @@
(_.cover [/.exists?]
(let [can_find_correct_one!
(/.exists? (text.contains? tag_left)
- (\ ..builder leaf tag_left expected_left))
+ (# ..builder leaf tag_left expected_left))
cannot_find_incorrect_one!
(not (/.exists? (text.contains? tag_left)
- (\ ..builder leaf tag_right expected_right)))
+ (# ..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)))
+ (# ..builder branch
+ (# ..builder leaf tag_left expected_left)
+ (# ..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)))]
+ (# ..builder branch
+ (# ..builder leaf tag_left expected_left)
+ (# ..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 f9308d080..bda2162f9 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -10,7 +10,7 @@
["$[0]" comonad]]]
[control
pipe
- ["[0]" maybe ("[1]\[0]" functor)]]
+ ["[0]" maybe ("[1]#[0]" functor)]]
[data
["[0]" product]
["[0]" text]
@@ -159,18 +159,18 @@
[[size sample] (//.tree random.nat)
expected random.nat
dummy (random.only (|>> (n.= expected) not) random.nat)
- .let [(^open "tree\[0]") (tree.equivalence n.equivalence)
- (^open "list\[0]") (list.equivalence n.equivalence)]]
+ .let [(^open "tree#[0]") (tree.equivalence n.equivalence)
+ (^open "list#[0]") (list.equivalence n.equivalence)]]
($_ _.and
(_.for [/.equivalence]
- ($equivalence.spec (/.equivalence n.equivalence) (\ ! each (|>> product.right /.zipper) (//.tree random.nat))))
+ ($equivalence.spec (/.equivalence n.equivalence) (# ! each (|>> product.right /.zipper) (//.tree random.nat))))
(_.for [/.functor]
($functor.spec (|>> tree.leaf /.zipper) /.equivalence /.functor))
(_.for [/.comonad]
($comonad.spec (|>> tree.leaf /.zipper) /.equivalence /.comonad))
(_.cover [/.zipper /.tree]
- (|> sample /.zipper /.tree (tree\= sample)))
+ (|> sample /.zipper /.tree (tree#= sample)))
(_.cover [/.start?]
(|> sample /.zipper /.start?))
(_.cover [/.leaf?]
@@ -197,7 +197,7 @@
(|> sample
/.zipper
/.end
- (maybe\each /.end?)
+ (maybe#each /.end?)
(maybe.else false))))
(_.cover [/.interpose]
(let [cursor (|> (tree.branch dummy (list (tree.leaf dummy)))
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index 5069ab31f..cf2f1053c 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -26,7 +26,7 @@
(def: .public random
(Random /.Color)
(|> ($_ random.and random.nat random.nat random.nat)
- (\ random.monad each /.of_rgb)))
+ (# random.monad each /.of_rgb)))
(def: scale
(-> Nat Frac)
@@ -73,7 +73,7 @@
($_ _.and
(_.cover [/.RGB /.rgb /.of_rgb]
(|> expected /.rgb /.of_rgb
- (\ /.equivalence = expected)))
+ (# /.equivalence = expected)))
(_.cover [/.HSL /.hsl /.of_hsl]
(|> expected /.hsl /.of_hsl
(distance/3 expected)
@@ -131,15 +131,15 @@
Test
(_.for [/.Spread /.Palette]
(do [! random.monad]
- [eH (\ ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
+ [eH (# ! 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 (# ! 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))
+ spread (# ! each (|>> f.abs (f.% spread_space) (f.+ min_spread))
random.safe_frac)]
(`` ($_ _.and
(~~ (template [<brightness> <palette>]
@@ -148,7 +148,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? (# /.equivalence = expected) palette)))))]
[+1.0 /.analogous]
[+0.5 /.monochromatic]
))
@@ -156,9 +156,9 @@
[(_.cover [<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 (# /.equivalence = expected c0)
+ (not (# /.equivalence = expected c1))
+ (not (# /.equivalence = expected c2)))))]
[/.triad]
[/.clash]
@@ -167,10 +167,10 @@
[(_.cover [<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 (# /.equivalence = expected c0)
+ (not (# /.equivalence = expected c1))
+ (not (# /.equivalence = expected c2))
+ (not (# /.equivalence = expected c3)))))]
[/.square]
[/.tetradic]))
@@ -195,12 +195,12 @@
(..encoding expected)
(_.cover [/.complement]
(let [~expected (/.complement expected)
- (^open "/\[0]") /.equivalence]
- (and (not (/\= expected ~expected))
- (/\= expected (/.complement ~expected)))))
+ (^open "/#[0]") /.equivalence]
+ (and (not (/#= expected ~expected))
+ (/#= expected (/.complement ~expected)))))
(_.cover [/.black /.white]
- (and (\ /.equivalence = /.white (/.complement /.black))
- (\ /.equivalence = /.black (/.complement /.white))))
+ (and (# /.equivalence = /.white (/.complement /.black))
+ (# /.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 38b2b730f..939a95ffe 100644
--- a/stdlib/source/test/lux/data/color/named.lux
+++ b/stdlib/source/test/lux/data/color/named.lux
@@ -233,8 +233,8 @@
<colors>))
(_.cover [/.aqua]
- (\ //.equivalence = /.cyan /.aqua))
+ (# //.equivalence = /.cyan /.aqua))
(_.cover [/.fuchsia]
- (\ //.equivalence = /.magenta /.fuchsia))
+ (# //.equivalence = /.magenta /.fuchsia))
))))
)
diff --git a/stdlib/source/test/lux/data/format/binary.lux b/stdlib/source/test/lux/data/format/binary.lux
index f2ace808f..bb09a2f77 100644
--- a/stdlib/source/test/lux/data/format/binary.lux
+++ b/stdlib/source/test/lux/data/format/binary.lux
@@ -8,7 +8,7 @@
[\\specification
["$[0]" monoid]]]
[data
- ["[0]" binary ("[1]\[0]" equivalence)]]
+ ["[0]" binary ("[1]#[0]" equivalence)]]
[math
["[0]" random {"+" [Random]}]]]]
[\\library
@@ -18,12 +18,12 @@
(Equivalence /.Specification)
(def: (= reference subject)
- (binary\= (/.instance reference)
+ (binary#= (/.instance reference)
(/.instance subject))))
(def: random
(Random /.Specification)
- (\ random.monad each /.nat random.nat))
+ (# 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 f71def6fe..35381fc7a 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -9,7 +9,7 @@
["$[0]" equivalence]
["$[0]" codec]]]
[control
- ["[0]" try ("[1]\[0]" functor)]]
+ ["[0]" try ("[1]#[0]" functor)]]
[data
["[0]" product]
["[0]" bit]
@@ -19,7 +19,7 @@
["[0]" row]
["[0]" dictionary]
["[0]" set]
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
["[0]" random {"+" [Random]}]
[number
@@ -29,16 +29,16 @@
["[0]" syntax {"+" [syntax:]}]
["[0]" code]]]]
[\\library
- ["[0]" / {"+" [JSON]} ("\[0]" equivalence)]])
+ ["[0]" / {"+" [JSON]} ("#[0]" equivalence)]])
(def: .public random
(Random /.JSON)
(random.rec
(function (_ recur)
(do [! random.monad]
- [size (\ ! each (n.% 2) random.nat)]
+ [size (# ! each (n.% 2) random.nat)]
($_ random.or
- (\ ! in [])
+ (# ! in [])
random.bit
random.safe_frac
(random.unicode size)
@@ -74,7 +74,7 @@
(do random.monad
[sample ..random]
(_.cover [/.Null /.null?]
- (\ bit.equivalence =
+ (# bit.equivalence =
(/.null? sample)
(case sample
{/.#Null} true
@@ -84,21 +84,21 @@
(_.cover [/.format]
(|> expected
/.format
- (\ /.codec decoded)
- (try\each (\= expected))
+ (# /.codec decoded)
+ (try#each (#= expected))
(try.else false))))
(do random.monad
[keys (random.set text.hash 3 (random.ascii/alpha 1))
values (random.set frac.hash 3 random.safe_frac)
.let [expected (list.zipped/2 (set.list keys)
- (list\each (|>> {/.#Number}) (set.list values)))
+ (list#each (|>> {/.#Number}) (set.list values)))
object (/.object expected)]]
($_ _.and
(_.cover [/.object /.fields]
(case (/.fields object)
{try.#Success actual}
- (\ (list.equivalence text.equivalence) =
- (list\each product.left expected)
+ (# (list.equivalence text.equivalence) =
+ (list#each product.left expected)
actual)
{try.#Failure error}
@@ -106,13 +106,13 @@
(_.cover [/.field]
(list.every? (function (_ [key expected])
(|> (/.field key object)
- (try\each (\= expected))
+ (try#each (#= expected))
(try.else false)))
expected))
))
(do random.monad
[key (random.ascii/alpha 1)
- unknown (random.only (|>> (\ text.equivalence = key) not)
+ unknown (random.only (|>> (# text.equivalence = key) not)
(random.ascii/alpha 1))
expected random.safe_frac]
(_.cover [/.has]
@@ -122,7 +122,7 @@
.let [can_find_known_key!
(|> object
(/.field key)
- (try\each (\= {/.#Number expected}))
+ (try#each (#= {/.#Number expected}))
(try.else false))
cannot_find_unknown_key!
@@ -141,7 +141,7 @@
(_.cover [<type> <field>]
(|> (/.object (list [key {<tag> value}]))
(<field> key)
- (try\each (\ <equivalence> = value))
+ (try#each (# <equivalence> = value))
(try.else false))))]
[/.Boolean /.boolean_field /.#Boolean random.bit bit.equivalence]
@@ -165,15 +165,15 @@
<key5> (string)
<key6> (string)]
(_.cover [/.json]
- (and (\= {/.#Null} (/.json ()))
+ (and (#= {/.#Null} (/.json ()))
(~~ (template [<tag> <value>]
- [(\= {<tag> <value>} (/.json <value>))]
+ [(#= {<tag> <value>} (/.json <value>))]
[/.#Boolean <boolean>]
[/.#Number <number>]
[/.#String <string>]
))
- (\= {/.#Array <array_row>} (/.json [() <boolean> <number> <string>]))
+ (#= {/.#Array <array_row>} (/.json [() <boolean> <number> <string>]))
(let [object (/.json {<key0> ()
<key1> <boolean>
<key2> <number>
@@ -189,11 +189,11 @@
value4 (/.field <key4> object)
value5 (/.field <key5> object)
value6 (/.field <key6> value5)]
- (in (and (\= {/.#Null} value0)
- (\= {/.#Boolean <boolean>} value1)
- (\= {/.#Number <number>} value2)
- (\= {/.#String <string>} value3)
- (\= {/.#Array <array_row>} value4)
- (\= {/.#Number <number>} value6))))))
+ (in (and (#= {/.#Null} value0)
+ (#= {/.#Boolean <boolean>} value1)
+ (#= {/.#Number <number>} value2)
+ (#= {/.#String <string>} value3)
+ (#= {/.#Array <array_row>} value4)
+ (#= {/.#Number <number>} value6))))))
)))
))))
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 1ed6821f6..4ada18f50 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -12,8 +12,8 @@
["<b>" binary]]]
[data
["[0]" product]
- ["[0]" binary ("[1]\[0]" equivalence monoid)]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" binary ("[1]#[0]" equivalence monoid)]
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]
[encoding
["[0]" utf8]]
@@ -22,7 +22,7 @@
["[1]/[0]" block]]]
[collection
["[0]" row]
- ["[0]" list ("[1]\[0]" mix)]]
+ ["[0]" list ("[1]#[0]" mix)]]
["[0]" format "_"
["[1]" binary]]]
[time
@@ -48,13 +48,13 @@
(_.cover [/.path /.from_path]
(case (/.path expected)
{try.#Success actual}
- (text\= expected
+ (text#= expected
(/.from_path actual))
{try.#Failure error}
false))
(_.cover [/.no_path]
- (text\= "" (/.from_path /.no_path)))
+ (text#= "" (/.from_path /.no_path)))
(_.cover [/.path_size /.path_is_too_long]
(case (/.path invalid)
{try.#Success _}
@@ -83,7 +83,7 @@
(_.cover [/.name /.from_name]
(case (/.name expected)
{try.#Success actual}
- (text\= expected
+ (text#= expected
(/.from_name actual))
{try.#Failure error}
@@ -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 (# ! each (n.% /.small_limit)))
+ invalid (|> random.nat (# ! each (n.max /.small_limit)))]
(`` ($_ _.and
(_.cover [/.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 (# ! each (n.% /.big_limit)))
+ invalid (|> random.nat (# ! each (n.max /.big_limit)))]
(`` ($_ _.and
(_.cover [/.big /.from_big]
(case (/.big expected)
@@ -158,14 +158,14 @@
Test
(do [! random.monad]
[expected_path (random.ascii/lower (-- /.path_size))
- expected_moment (\ ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
+ expected_moment (# ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
random.nat)
chunk (random.ascii/lower chunk_size)
- chunks (\ ! each (n.% 100) random.nat)
+ chunks (# ! each (n.% 100) random.nat)
.let [content (|> chunk
(list.repeated chunks)
text.together
- (\ utf8.codec encoded))]]
+ (# utf8.codec encoded))]]
(`` ($_ _.and
(~~ (template [<type> <tag>]
[(_.cover [<type>]
@@ -176,7 +176,7 @@
(<b>.result /.parser))]
(in (case (row.list tar)
(^ (list {<tag> actual_path}))
- (text\= (/.from_path expected_path)
+ (text#= (/.from_path expected_path)
(/.from_path actual_path))
_
@@ -207,11 +207,11 @@
(^ (list {<tag> [actual_path actual_moment actual_mode actual_ownership actual_content]}))
(let [seconds (: (-> Instant Int)
(|>> instant.relative (duration.ticks duration.second)))]
- (and (text\= (/.from_path expected_path)
+ (and (text#= (/.from_path expected_path)
(/.from_path actual_path))
(i.= (seconds expected_moment)
(seconds actual_moment))
- (binary\= (/.data expected_content)
+ (binary#= (/.data expected_content)
(/.data actual_content))))
_
@@ -245,7 +245,7 @@
(do [! random.monad]
[path (random.ascii/lower 10)
modes (random.list 4 ..random_mode)
- .let [expected_mode (list\mix /.and /.none modes)]]
+ .let [expected_mode (list#mix /.and /.none modes)]]
(`` ($_ _.and
(_.cover [/.and]
(|> (do try.monad
@@ -353,9 +353,9 @@
(<b>.result /.parser))]
(in (case (row.list tar)
(^ (list {/.#Normal [_ _ _ actual_ownership _]}))
- (and (text\= (/.from_name expected)
+ (and (text#= (/.from_name expected)
(/.from_name (value@ [/.#user /.#name] actual_ownership)))
- (text\= (/.from_name /.anonymous)
+ (text#= (/.from_name /.anonymous)
(/.from_name (value@ [/.#group /.#name] actual_ownership))))
_
@@ -377,11 +377,11 @@
(<b>.result /.parser))]
(in (case (row.list tar)
(^ (list {/.#Normal [_ _ _ actual_ownership _]}))
- (and (text\= (/.from_name /.anonymous)
+ (and (text#= (/.from_name /.anonymous)
(/.from_name (value@ [/.#user /.#name] actual_ownership)))
(n.= (/.from_small /.no_id)
(/.from_small (value@ [/.#user /.#id] actual_ownership)))
- (text\= (/.from_name /.anonymous)
+ (text#= (/.from_name /.anonymous)
(/.from_name (value@ [/.#group /.#name] actual_ownership)))
(n.= (/.from_small /.no_id)
(/.from_small (value@ [/.#group /.#id] actual_ownership))))
@@ -402,11 +402,11 @@
(|> row.empty
(format.result /.writer)
(<b>.result /.parser)
- (\ try.monad each row.empty?)
+ (# try.monad each row.empty?)
(try.else false)))
(_.cover [/.invalid_end_of_archive]
(let [dump (format.result /.writer row.empty)]
- (case (<b>.result /.parser (binary\composite dump dump))
+ (case (<b>.result /.parser (binary#composite dump dump))
{try.#Success _}
false
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 27f2e76a5..e6772262f 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -15,13 +15,13 @@
["</>" xml]]]
[data
["[0]" name]
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" dictionary]
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
- ["[0]" random {"+" [Random]} ("[1]\[0]" monad)]
+ ["[0]" random {"+" [Random]} ("[1]#[0]" monad)]
[number
["n" nat]]]]]
[\\library
@@ -36,13 +36,13 @@
(def: char
(Random Nat)
(do [! random.monad]
- [idx (|> random.nat (\ ! each (n.% (text.size char_range))))]
+ [idx (|> random.nat (# ! each (n.% (text.size char_range))))]
(in (maybe.trusted (text.char idx char_range)))))
(def: (size bottom top)
(-> Nat Nat (Random Nat))
(let [constraint (|>> (n.% top) (n.max bottom))]
- (random\each constraint random.nat)))
+ (random#each constraint random.nat)))
(def: (text bottom top)
(-> Nat Nat (Random Text))
@@ -81,7 +81,7 @@
(`` ($_ _.and
(~~ (template [<type> <format>]
[(_.cover [<type> <format>]
- (and (text\= name (<format> ["" name]))
+ (and (text#= name (<format> ["" name]))
(let [identifier (<format> identifier)]
(and (text.starts_with? namespace identifier)
(text.ends_with? name identifier)))))]
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index dd9171e99..76761b0ae 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -12,7 +12,7 @@
[control
pipe]
[data
- ["[0]" text ("[1]\[0]" equivalence)]]
+ ["[0]" text ("[1]#[0]" equivalence)]]
[math
["[0]" random {"+" [Random]}]
[number
@@ -30,12 +30,12 @@
(<| (_.covering /._)
(do [! random.monad]
[... First Name
- sizeM1 (|> random.nat (\ ! each (n.% 100)))
- sizeS1 (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
+ sizeM1 (|> random.nat (# ! each (n.% 100)))
+ sizeS1 (|> random.nat (# ! each (|>> (n.% 100) (n.max 1))))
(^@ name1 [module1 short1]) (..random sizeM1 sizeS1)
... Second Name
- sizeM2 (|> random.nat (\ ! each (n.% 100)))
- sizeS2 (|> random.nat (\ ! each (|>> (n.% 100) (n.max 1))))
+ sizeM2 (|> random.nat (# ! each (n.% 100)))
+ sizeS2 (|> random.nat (# ! each (|>> (n.% 100) (n.max 1))))
(^@ name2 [module2 short2]) (..random sizeM2 sizeS2)]
(_.for [.Name]
($_ _.and
@@ -43,27 +43,27 @@
($equivalence.spec /.equivalence (..random sizeM1 sizeS1)))
(_.for [/.hash]
(|> (random.ascii 1)
- (\ ! each (|>> [""]))
+ (# ! each (|>> [""]))
($hash.spec /.hash)))
(_.for [/.order]
($order.spec /.order (..random sizeM1 sizeS1)))
(_.for [/.codec]
(_.and ($codec.spec /.equivalence /.codec (..random sizeM1 sizeS1))
- (let [(^open "/\[0]") /.codec]
+ (let [(^open "/#[0]") /.codec]
(_.test "Encoding an name without a module component results in text equal to the short of the name."
(if (text.empty? module1)
- (text\= short1 (/\encoded name1))
+ (text#= short1 (/#encoded name1))
#1)))))
(_.cover [/.module /.short]
(and (same? module1 (/.module name1))
(same? short1 (/.short name1))))
(_.for [.name_of]
- (let [(^open "/\[0]") /.equivalence]
+ (let [(^open "/#[0]") /.equivalence]
($_ _.and
(_.test "Can obtain Name from identifier."
- (and (/\= [.prelude_module "yolo"] (.name_of .yolo))
- (/\= ["test/lux/data/name" "yolo"] (.name_of ..yolo))
- (/\= ["" "yolo"] (.name_of yolo))
- (/\= ["library/lux/test" "yolo"] (.name_of library/lux/test.yolo)))))))
+ (and (/#= [.prelude_module "yolo"] (.name_of .yolo))
+ (/#= ["test/lux/data/name" "yolo"] (.name_of ..yolo))
+ (/#= ["" "yolo"] (.name_of yolo))
+ (/#= ["library/lux/test" "yolo"] (.name_of library/lux/test.yolo)))))))
)))))
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index 38b0dad48..c4e666117 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -32,9 +32,9 @@
right random.nat]
(_.cover [/.hash]
(let [hash (/.hash i.hash n.hash)]
- (n.= (n.+ (\ i.hash hash left)
- (\ n.hash hash right))
- (\ hash hash [left right])))))
+ (n.= (n.+ (# i.hash hash left)
+ (# n.hash hash right))
+ (# hash hash [left right])))))
(<| (_.cover [/.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 353c6f6c2..761bda10c 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -11,7 +11,7 @@
[data
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
["[0]" random]
[number
@@ -36,10 +36,10 @@
right random.nat]
(_.cover [/.hash]
(let [hash (/.hash i.hash n.hash)]
- (and (n.= (\ i.hash hash left)
- (\ hash hash {.#Left left}))
- (n.= (\ n.hash hash right)
- (\ hash hash {.#Right right}))))))
+ (and (n.= (# i.hash hash left)
+ (# hash hash {.#Left left}))
+ (n.= (# n.hash hash right)
+ (# hash hash {.#Right right}))))))
(_.cover [/.left]
(|> (/.left expected)
@@ -70,39 +70,39 @@
(/.then (n.+ shift) (n.- shift))
(case> {0 #1 actual} (n.= (n.- shift expected) actual) _ false))))
(do !
- [size (\ ! each (n.% 5) random.nat)
+ [size (# ! each (n.% 5) random.nat)
expected (random.list size random.nat)]
($_ _.and
(_.cover [/.lefts]
(let [actual (: (List (Or Nat Nat))
- (list\each /.left expected))]
- (and (\ (list.equivalence n.equivalence) =
+ (list#each /.left expected))]
+ (and (# (list.equivalence n.equivalence) =
expected
(/.lefts actual))
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list)
(/.rights actual)))))
(_.cover [/.rights]
(let [actual (: (List (Or Nat Nat))
- (list\each /.right expected))]
- (and (\ (list.equivalence n.equivalence) =
+ (list#each /.right expected))]
+ (and (# (list.equivalence n.equivalence) =
expected
(/.rights actual))
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list)
(/.lefts actual)))))
(_.cover [/.partition]
(let [[lefts rights] (|> expected
- (list\each (function (_ value)
+ (list#each (function (_ value)
(if (n.even? value)
(/.left value)
(/.right value))))
(: (List (Or Nat Nat)))
/.partition)]
- (and (\ (list.equivalence n.equivalence) =
+ (and (# (list.equivalence n.equivalence) =
(list.only n.even? expected)
lefts)
- (\ (list.equivalence n.equivalence) =
+ (# (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 b53d4b83b..ff8ed74dd 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)))))
+ (# random.monad each (|>> (n.% 20) (n.+ 1)))))
(def: size
Test
(do [! random.monad]
- [size (\ ! each (n.% 10) random.nat)
+ [size (# ! each (n.% 10) random.nat)
sample (random.unicode size)]
($_ _.and
(_.cover [/.size]
@@ -52,11 +52,11 @@
Test
(do [! random.monad]
[inner (random.unicode 1)
- outer (random.only (|>> (\ /.equivalence = inner) not)
+ outer (random.only (|>> (# /.equivalence = inner) not)
(random.unicode 1))
left (random.unicode 1)
right (random.unicode 1)
- .let [full (\ /.monoid composite inner outer)
+ .let [full (# /.monoid composite inner outer)
fake_index (-- 0)]]
(`` ($_ _.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 (|>> (# /.equivalence = inner) not)
(random.unicode 1))
.let [fake_index (-- 0)]]
($_ _.and
(_.cover [/.contains?]
- (let [full (\ /.monoid composite inner outer)]
+ (let [full (# /.monoid composite inner outer)]
(and (/.contains? inner full)
(/.contains? outer full))))
(_.cover [/.index]
- (and (|> (/.index inner (\ /.monoid composite inner outer))
+ (and (|> (/.index inner (# /.monoid composite inner outer))
(maybe.else fake_index)
(n.= 0))
- (|> (/.index outer (\ /.monoid composite inner outer))
+ (|> (/.index outer (# /.monoid composite inner outer))
(maybe.else fake_index)
(n.= 1))))
(_.cover [/.index_since]
- (let [full (\ /.monoid composite inner outer)]
+ (let [full (# /.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)))))
(_.cover [/.last_index]
- (let [full ($_ (\ /.monoid composite) outer inner outer)]
+ (let [full ($_ (# /.monoid composite) outer inner outer)]
(and (|> (/.last_index inner full)
(maybe.else fake_index)
(n.= 1))
@@ -131,7 +131,7 @@
(`` ($_ _.and
(~~ (template [<short> <long>]
[(_.cover [<short> <long>]
- (\ /.equivalence = <short> <long>))]
+ (# /.equivalence = <short> <long>))]
[/.\0 /.null]
[/.\a /.alarm]
@@ -143,13 +143,13 @@
[/.\r /.carriage_return]
[/.\'' /.double_quote]))
(_.cover [/.line_feed]
- (\ /.equivalence = /.new_line /.line_feed))
+ (# /.equivalence = /.new_line /.line_feed))
)))
(do [! random.monad]
- [size (\ ! each (|>> (n.% 10) ++) random.nat)
+ [size (# ! each (|>> (n.% 10) ++) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
.let [sample (|> characters set.list /.together)]
- expected (\ ! each (n.% size) random.nat)]
+ expected (# ! each (n.% size) random.nat)]
(_.cover [/.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 (# ! each (|>> (n.% 10) (n.+ 2)) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
separator (random.only (|>> (set.member? characters) not)
(random.ascii/alpha 1))
.let [with_no_separator (|> characters set.list /.together)]
static (random.ascii/alpha 1)
- .let [dynamic (random.only (|>> (\ /.equivalence = static) not)
+ .let [dynamic (random.only (|>> (# /.equivalence = static) not)
(random.ascii/alpha 1))]
pre dynamic
post dynamic
@@ -200,19 +200,19 @@
(/.interposed separator)
(/.all_split_by separator)
(set.of_list /.hash)
- (\ set.equivalence = characters))
- (\ /.equivalence =
+ (# set.equivalence = characters))
+ (# /.equivalence =
(/.together (set.list characters))
(/.interposed "" (set.list characters)))))
(_.cover [/.replaced/1]
- (\ /.equivalence =
- (\ /.monoid composite post static)
- (/.replaced/1 pre post (\ /.monoid composite pre static))))
+ (# /.equivalence =
+ (# /.monoid composite post static)
+ (/.replaced/1 pre post (# /.monoid composite pre static))))
(_.cover [/.split_by]
- (case (/.split_by static ($_ (\ /.monoid composite) pre static post))
+ (case (/.split_by static ($_ (# /.monoid composite) pre static post))
{.#Some [left right]}
- (and (\ /.equivalence = pre left)
- (\ /.equivalence = post right))
+ (and (# /.equivalence = pre left)
+ (# /.equivalence = post right))
{.#None}
false))
@@ -220,19 +220,19 @@
(let [effectiveness!
(|> upper
/.lower_cased
- (\ /.equivalence = upper)
+ (# /.equivalence = upper)
not)
idempotence!
(|> lower
/.lower_cased
- (\ /.equivalence = lower))
+ (# /.equivalence = lower))
inverse!
(|> lower
/.upper_cased
/.lower_cased
- (\ /.equivalence = lower))]
+ (# /.equivalence = lower))]
(and effectiveness!
idempotence!
inverse!)))
@@ -240,19 +240,19 @@
(let [effectiveness!
(|> lower
/.upper_cased
- (\ /.equivalence = lower)
+ (# /.equivalence = lower)
not)
idempotence!
(|> upper
/.upper_cased
- (\ /.equivalence = upper))
+ (# /.equivalence = upper))
inverse!
(|> upper
/.lower_cased
/.upper_cased
- (\ /.equivalence = upper))]
+ (# /.equivalence = upper))]
(and effectiveness!
idempotence!
inverse!)))
@@ -286,14 +286,14 @@
sampleR (random.unicode sizeR)
middle (random.unicode 1)
.let [sample (/.together (list sampleL sampleR))
- (^open "/\[0]") /.equivalence]]
+ (^open "/#[0]") /.equivalence]]
($_ _.and
(_.cover [/.split_at]
(|> (/.split_at sizeL sample)
(case> {.#Right [_l _r]}
- (and (/\= sampleL _l)
- (/\= sampleR _r)
- (/\= sample (/.together (list _l _r))))
+ (and (/#= sampleL _l)
+ (/#= sampleR _r)
+ (/#= sample (/.together (list _l _r))))
_
#0)))
@@ -303,10 +303,10 @@
(/.clip_since sizeL sample)
(/.clip_since 0 sample)]
(case> [{.#Right _l} {.#Right _r} {.#Right _r'} {.#Right _f}]
- (and (/\= sampleL _l)
- (/\= sampleR _r)
- (/\= _r _r')
- (/\= sample _f))
+ (and (/#= sampleL _l)
+ (/#= sampleR _r)
+ (/#= _r _r')
+ (/#= sample _f))
_
#0)))
@@ -317,7 +317,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 (# ! 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)
@@ -325,9 +325,9 @@
parts (random.list sizeL part_gen)
.let [sample1 (/.together (list.interposed sep1 parts))
sample2 (/.together (list.interposed sep2 parts))
- (^open "/\[0]") /.equivalence]]
+ (^open "/#[0]") /.equivalence]]
(_.cover [/.replaced]
- (/\= sample2
+ (/#= sample2
(/.replaced sep1 sep2 sample1))))
/buffer.test
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index 72a9c7912..018ce9a22 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -5,7 +5,7 @@
[abstract
[monad {"+" [do]}]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]]
[math
["[0]" random {"+" [Random]}]
@@ -17,7 +17,7 @@
(def: part
(Random Text)
(do [! random.monad]
- [size (\ ! each (|>> (n.% 10) ++) random.nat)]
+ [size (# ! each (|>> (n.% 10) ++) random.nat)]
(random.ascii/alpha size)))
(def: .public test
@@ -35,7 +35,7 @@
(n.= (text.size left)
(/.size (/.then left /.empty))))
(_.cover [/.text]
- (text\= (format left mid right)
+ (text#= (format left mid right)
(|> /.empty
(/.then left)
(/.then mid)
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index fab8f3c06..2644c2e43 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -10,9 +10,9 @@
["[0]" maybe]
["[0]" try]]
[data
- ["[0]" text ("[1]\[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)]
[collection
- ["[0]" list ("[1]\[0]" mix)]
+ ["[0]" list ("[1]#[0]" mix)]
["[0]" set]]]
[macro
["[0]" template]]
@@ -193,7 +193,7 @@
(list.together (list <named>)))
(def: unique_encodings
- (list\mix (function (_ encoding set)
+ (list#mix (function (_ encoding set)
(set.has (/.name encoding) set))
(set.empty text.hash)
..all_encodings))
@@ -214,7 +214,7 @@
(Random /.Encoding)
(let [options (list.size ..all_encodings)]
(do [! random.monad]
- [choice (\ ! each (n.% options) random.nat)]
+ [choice (# ! 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 edce881aa..43dde1c22 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -12,8 +12,8 @@
[parser
["<[0]>" code]]]
[data
- ["[0]" bit ("[1]\[0]" equivalence)]
- ["[0]" text {"+" [Char]} ("[1]\[0]" equivalence)
+ ["[0]" bit ("[1]#[0]" equivalence)]
+ ["[0]" text {"+" [Char]} ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]
[collection
["[0]" set {"+" [Set]}]]]
@@ -34,7 +34,7 @@
(def: (range max min)
(-> Char Char (Random Char))
(let [range (n.- min max)]
- (\ random.monad each
+ (# random.monad each
(|>> (n.% range) (n.+ min))
random.nat)))
@@ -93,7 +93,7 @@
[/.\n] [/.\v] [/.\f] [/.\r]
[/.\''] [/.\\])))
(/.escapable? ascii)
- (bit\= (/.escapable? ascii)
+ (bit#= (/.escapable? ascii)
(or (n.< (debug.private /.ascii_bottom) ascii)
(n.> (debug.private /.ascii_top) ascii)))))))
(do random.monad
@@ -106,15 +106,15 @@
(let [escaped (/.escaped expected)]
(case (/.un_escaped escaped)
{try.#Success un_escaped}
- (and (not (text\= escaped expected))
- (text\= un_escaped expected))
+ (and (not (text#= escaped expected))
+ (text#= un_escaped expected))
{try.#Failure error}
false))
- (text\= expected (/.escaped expected))))))
+ (text#= expected (/.escaped expected))))))
(do [! random.monad]
[dummy (|> (random.char unicode.character)
- (\ ! each text.of_char))]
+ (# ! each text.of_char))]
(_.cover [/.dangling_escape]
(case (/.un_escaped (format (/.escaped dummy) "\"))
{try.#Success _}
@@ -125,7 +125,7 @@
(do [! random.monad]
[dummy (|> (random.char unicode.character)
(random.only (|>> (set.member? ..valid_sigils) not))
- (\ ! each text.of_char))]
+ (# ! each text.of_char))]
(_.cover [/.invalid_escape]
(case (/.un_escaped (format "\" dummy))
{try.#Success _}
@@ -135,10 +135,10 @@
(exception.match? /.invalid_escape error))))
(do [! random.monad]
[too_short (|> (random.char unicode.character)
- (\ ! each (n.% (hex "1000"))))
+ (# ! each (n.% (hex "1000"))))
code (|> (random.unicode 4)
(random.only (function (_ code)
- (case (\ n.hex decoded code)
+ (case (# n.hex decoded code)
{try.#Failure error} true
{try.#Success _} false))))]
(_.cover [/.invalid_unicode_escape]
@@ -149,9 +149,9 @@
{try.#Failure error}
(exception.match? /.invalid_unicode_escape error))]]
- (and (!invalid (\ n.hex encoded too_short))
+ (and (!invalid (# n.hex encoded too_short))
(!invalid code)))))
(_.cover [/.literal]
(with_expansions [<example> (..static_sample)]
- (text\= <example> (`` (/.literal (~~ (..static_escaped <example>)))))))
+ (text#= <example> (`` (/.literal (~~ (..static_escaped <example>)))))))
)))
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index 14883a7ff..2bfc7a74e 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -11,14 +11,14 @@
[control
["[0]" try]]
[data
- ["[0]" text ("[1]\[0]" equivalence)]
+ ["[0]" text ("[1]#[0]" equivalence)]
["[0]" bit]
["[0]" name]
[format
["[0]" xml]
["[0]" json]]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
["[0]" time
["[0]" day]
["[0]" month]
@@ -26,7 +26,7 @@
["[0]" duration]
["[0]" date]]
[math
- ["[0]" random {"+" [Random]} ("[1]\[0]" monad)]
+ ["[0]" random {"+" [Random]} ("[1]#[0]" monad)]
["[0]" modulus]
["[0]" modular]
[number
@@ -56,17 +56,17 @@
(All (_ a) (-> a (Equivalence (/.Format a))))
(def: (= reference subject)
- (text\= (reference example) (subject example))))
+ (text#= (reference example) (subject example))))
(def: random_contravariant
(Random (Ex (_ a) [(/.Format a)
(Random a)]))
($_ random.either
- (random\in [/.bit random.bit])
- (random\in [/.nat random.nat])
- (random\in [/.int random.int])
- (random\in [/.rev random.rev])
- (random\in [/.frac random.frac])
+ (random#in [/.bit random.bit])
+ (random#in [/.nat random.nat])
+ (random#in [/.int random.int])
+ (random#in [/.rev random.rev])
+ (random#in [/.frac random.frac])
))
(def: codec
@@ -76,7 +76,7 @@
[(do random.monad
[sample <random>]
(_.cover [<format>]
- (text\= (\ <codec> encoded sample)
+ (text#= (# <codec> encoded sample)
(<format> sample))))]
[/.bit bit.codec random.bit]
@@ -135,14 +135,14 @@
mid (random.unicode 5)
right (random.unicode 5)]
(_.cover [/.format]
- (text\= (/.format left mid right)
+ (text#= (/.format left mid right)
($_ "lux text concat" left mid right))))
..codec
(~~ (template [<format> <alias> <random>]
[(do random.monad
[sample <random>]
(_.cover [<format>]
- (text\= (<alias> sample)
+ (text#= (<alias> sample)
(<format> sample))))]
[/.text text.format (random.unicode 5)]
@@ -157,9 +157,9 @@
(do random.monad
[members (random.list 5 random.nat)]
(_.cover [/.list]
- (text\= (/.list /.nat members)
+ (text#= (/.list /.nat members)
(|> members
- (list\each /.nat)
+ (list#each /.nat)
(text.interposed " ")
list
(/.list (|>>))))))
@@ -177,9 +177,9 @@
[modulus (random.one (|>> modulus.modulus
try.maybe)
random.int)
- sample (\ ! each (modular.modular modulus)
+ sample (# ! each (modular.modular modulus)
random.int)]
(_.cover [/.mod]
- (text\= (\ (modular.codec modulus) encoded sample)
+ (text#= (# (modular.codec modulus) encoded sample)
(/.mod sample))))
))))
diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux
index cb766f27b..cfc58a897 100644
--- a/stdlib/source/test/lux/data/text/regex.lux
+++ b/stdlib/source/test/lux/data/text/regex.lux
@@ -11,7 +11,7 @@
["<[0]>" text {"+" [Parser]}]
["<[0]>" code]]]
[data
- ["[0]" text ("[1]\[0]" equivalence)
+ ["[0]" text ("[1]#[0]" equivalence)
["%" format {"+" [format]}]]]
["[0]" macro
[syntax {"+" [syntax:]}]
@@ -27,7 +27,7 @@
(|> input
(<text>.result regex)
(case> {try.#Success parsed}
- (text\= parsed input)
+ (text#= parsed input)
_
#0)))
@@ -37,7 +37,7 @@
(|> input
(<text>.result regex)
(case> {try.#Success parsed}
- (text\= test parsed)
+ (text#= test parsed)
_
false)))
@@ -305,9 +305,9 @@
(case (format sample1 "-" sample2 "-" sample3)
(/.^regex "(.{3})-(.{3})-(.{4})"
[_ match1 match2 match3])
- (and (text\= sample1 match1)
- (text\= sample2 match2)
- (text\= sample3 match3))
+ (and (text#= sample1 match1)
+ (text#= sample2 match2)
+ (text#= sample3 match3))
_
false)))
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index e0325be7b..e01250a30 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 (# ! each (n.% 1,000,000) random.nat)
+ additional (# ! each (n.% 1,000,000) random.nat)]
(in (/.block start additional))))
(with_expansions [<blocks> (as_is [blocks/0
@@ -173,12 +173,12 @@
[.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 (# ! each (|>> (n.% top_start) ++) random.nat)
+ end (# ! each (|>> (n.% end_range) (n.+ top_start)) random.nat)
.let [additional (n.- start end)
sample (/.block start additional)
size (/.size sample)]
- inside (\ ! each
+ inside (# ! each
(|>> (n.% size)
(n.+ (/.start sample)))
random.nat)]
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index ae3fbed65..fe145fd50 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -8,9 +8,9 @@
["$[0]" equivalence]]]
[data
["[0]" product]
- ["[0]" bit ("[1]\[0]" equivalence)]
+ ["[0]" bit ("[1]#[0]" equivalence)]
[collection
- ["[0]" set ("[1]\[0]" equivalence)]]]
+ ["[0]" set ("[1]#[0]" equivalence)]]]
[math
["[0]" random {"+" [Random]}]
[number
@@ -36,7 +36,7 @@
(_.for [/.Set])
(do [! random.monad]
[block //block.random
- inside (\ ! each
+ inside (# ! each
(|>> (n.% (block.size block))
(n.+ (block.start block)))
random.nat)
@@ -62,7 +62,7 @@
(block.end right))
(/.end (/.set [left (list right)]))))
(_.cover [/.member?]
- (bit\= (block.within? block inside)
+ (bit#= (block.within? block inside)
(/.member? (/.set [block (list)]) inside)))
(_.cover [/.composite]
(let [composed (/.composite (/.set [left (list)])