diff options
Diffstat (limited to 'stdlib/source/test/lux/meta/type')
-rw-r--r-- | stdlib/source/test/lux/meta/type/check.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/type/implicit.lux | 10 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/type/linear.lux | 12 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/type/quotient.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/type/refinement.lux | 8 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/type/unit.lux | 28 | ||||
-rw-r--r-- | stdlib/source/test/lux/meta/type/unit/scale.lux | 34 |
7 files changed, 50 insertions, 50 deletions
diff --git a/stdlib/source/test/lux/meta/type/check.lux b/stdlib/source/test/lux/meta/type/check.lux index 5fd953e73..f82d5b74e 100644 --- a/stdlib/source/test/lux/meta/type/check.lux +++ b/stdlib/source/test/lux/meta/type/check.lux @@ -95,7 +95,7 @@ (def injection (Injection (All (_ a) (/.Check a))) - (at /.monad in)) + (of /.monad in)) (def comparison (Comparison (All (_ a) (/.Check a))) @@ -668,7 +668,7 @@ [parameter/0 parameter/1] (..non_twins //#= ..nominal) left_name ..symbol right_name ..symbol - ring_tail_size (at ! each (n.% 10) random.nat)] + ring_tail_size (of ! each (n.% 10) random.nat)] (_.coverage [/.check] (and (..handles_nominal_types! name/0 name/1 parameter/0 parameter/1) (..handles_products! name/0 name/1) @@ -890,7 +890,7 @@ [expected random.nat] (_.coverage [/.result] (when (/.result /.fresh_context - (at /.monad in expected)) + (of /.monad in expected)) {try.#Success actual} (same? expected actual) {try.#Failure error} false))) ..error_handling diff --git a/stdlib/source/test/lux/meta/type/implicit.lux b/stdlib/source/test/lux/meta/type/implicit.lux index 233c121ca..b4f5c2f2b 100644 --- a/stdlib/source/test/lux/meta/type/implicit.lux +++ b/stdlib/source/test/lux/meta/type/implicit.lux @@ -26,7 +26,7 @@ Test (<| (_.covering /._) (do [! random.monad] - [.let [digit (at ! each (n.% 10) random.nat)] + [.let [digit (of ! each (n.% 10) random.nat)] left digit right digit .let [start (n.min left right) @@ -38,9 +38,9 @@ (_.coverage [/.a/an /.a /.an] (let [first_order! (let [(open "list#[0]") (list.equivalence n.equivalence)] - (and (bit#= (at n.equivalence = left right) + (and (bit#= (of n.equivalence = left right) (/.a = left right)) - (list#= (at list.functor each ++ (enum.range n.enum start end)) + (list#= (of list.functor each ++ (enum.range n.enum start end)) (/.an each ++ (enum.range n.enum start end))))) second_order! @@ -57,9 +57,9 @@ third_order!))) (_.coverage [/.with] (/.with [n.addition] - (n.= (at n.addition composite left right) + (n.= (of n.addition composite left right) (/.a/an composite left right)))) (_.coverage [/.implicitly] - (n.= (at n.multiplication composite left right) + (n.= (of n.multiplication composite left right) (/.a/an composite left right))) )))) diff --git a/stdlib/source/test/lux/meta/type/linear.lux b/stdlib/source/test/lux/meta/type/linear.lux index 4b134ebbe..899dbc7ee 100644 --- a/stdlib/source/test/lux/meta/type/linear.lux +++ b/stdlib/source/test/lux/meta/type/linear.lux @@ -31,8 +31,8 @@ (def pure Test (monad.do [! random.monad] - [pre (at ! each %.nat random.nat) - post (at ! each %.nat random.nat) + [pre (of ! each %.nat random.nat) + post (of ! each %.nat random.nat) .let [! identity.monad]] (_.for [/.Linear /.run! /.monad] (`` (all _.and @@ -73,8 +73,8 @@ (def sync Test (monad.do [! random.monad] - [pre (at ! each %.nat random.nat) - post (at ! each %.nat random.nat) + [pre (of ! each %.nat random.nat) + post (of ! each %.nat random.nat) .let [! io.monad]] (_.for [/.Linear /.run! /.monad] (`` (all _.and @@ -116,8 +116,8 @@ (def async Test (monad.do [! random.monad] - [pre (at ! each %.nat random.nat) - post (at ! each %.nat random.nat) + [pre (of ! each %.nat random.nat) + post (of ! each %.nat random.nat) .let [! async.monad]] (_.for [/.Linear /.run! /.monad] (`` (all _.and diff --git a/stdlib/source/test/lux/meta/type/quotient.lux b/stdlib/source/test/lux/meta/type/quotient.lux index aac5e212e..cc4981b31 100644 --- a/stdlib/source/test/lux/meta/type/quotient.lux +++ b/stdlib/source/test/lux/meta/type/quotient.lux @@ -19,7 +19,7 @@ (def .public (random class super) (All (_ t c %) (-> (/.Class t c %) (Random t) (Random (/.Quotient t c %)))) - (at random.monad each (/.quotient class) super)) + (of random.monad each (/.quotient class) super)) (def mod_10_class (/.class (|>> (n.% 10) %.nat))) diff --git a/stdlib/source/test/lux/meta/type/refinement.lux b/stdlib/source/test/lux/meta/type/refinement.lux index 2921ff8c2..e241cdd27 100644 --- a/stdlib/source/test/lux/meta/type/refinement.lux +++ b/stdlib/source/test/lux/meta/type/refinement.lux @@ -31,10 +31,10 @@ (_.for [/.Refined]) (do [! random.monad] [raw random.nat - modulus (at ! each (|>> (n.% 10) (n.+ 2)) random.nat) + modulus (of ! each (|>> (n.% 10) (n.+ 2)) random.nat) .let [predicate (is (Predicate Nat) (|>> (n.% modulus) (n.= 0)))] - total_raws (at ! each (|>> (n.% 20) ++) random.nat) + total_raws (of ! each (|>> (n.% 20) ++) random.nat) raws (random.list total_raws random.nat)] (all _.and (_.for [/.Refiner] @@ -72,7 +72,7 @@ actual (/.only (/.refiner predicate) raws)] (and (n.= (list.size expected) (list.size actual)) - (at (list.equivalence n.equivalence) = + (of (list.equivalence n.equivalence) = expected (list#each /.value actual))))) (_.coverage [/.partition] @@ -82,7 +82,7 @@ (list.size actual)) (n.= (n.- (list.size expected) total_raws) (list.size alternative)) - (at (list.equivalence n.equivalence) = + (of (list.equivalence n.equivalence) = expected (list#each /.value actual))))) (_.coverage [/.type] diff --git a/stdlib/source/test/lux/meta/type/unit.lux b/stdlib/source/test/lux/meta/type/unit.lux index 734400ade..6c27c1900 100644 --- a/stdlib/source/test/lux/meta/type/unit.lux +++ b/stdlib/source/test/lux/meta/type/unit.lux @@ -29,9 +29,9 @@ [(def (<name> range) (-> Nat (Random (/.Measure Any <type>))) (|> random.int - (at random.monad each (i.% (.int range))) + (of random.monad each (i.% (.int range))) (random.only (|>> (i.= +0) not)) - (at random.monad each (at <unit> in))))] + (of random.monad each (of <unit> in))))] [meter /.Meter /.meter] [second /.Second /.second] @@ -62,12 +62,12 @@ (,, (with_template [<type> <unit>] [(_.coverage [<type> <unit>] (and (|> expected - (at <unit> in) - (at <unit> out) + (of <unit> in) + (of <unit> out) (i.= expected)) (let [it (|> expected - (at <unit> in) - (at <unit> format))] + (of <unit> in) + (of <unit> format))] (and (not (text#= (%.int expected) it)) (text.starts_with? (%.int expected) it)))))] @@ -83,13 +83,13 @@ (i.= expected))) (_.coverage [/.unit /.type] (and (|> expected - (at ..what in) + (of ..what in) (is (/.Measure Any What)) - (at ..what out) + (of ..what out) (i.= expected)) (let [it (|> expected - (at ..what in) - (at ..what format))] + (of ..what in) + (of ..what format))] (and (text.contains? (%.int expected) it) (text.contains? <descriptor> it))))) )))))) @@ -97,7 +97,7 @@ (def arithmetic Test (do random.monad - [.let [zero (at /.meter in +0) + [.let [zero (of /.meter in +0) (open "meter#[0]") (is (Equivalence (/.Measure Any /.Meter)) /.equivalence)] left (random.only (|>> (meter#= zero) not) (..meter 1,000)) @@ -106,14 +106,14 @@ (`` (all _.and (,, (with_template [<q> <i>] [(_.coverage [<q>] - (i.= (<i> (at /.meter out left) (at /.meter out right)) - (at /.meter out (<q> left right))))] + (i.= (<i> (of /.meter out left) (of /.meter out right)) + (of /.meter out (<q> left right))))] [/.+ i.+] [/.- i.-] )) (_.coverage [/.*] - (let [expected (i.* (at /.meter out left) (at /.meter out right)) + (let [expected (i.* (of /.meter out left) (of /.meter out right)) actual (/.number (is (/.Measure Any [/.Meter /.Meter]) (/.* left right)))] (i.= expected actual))) diff --git a/stdlib/source/test/lux/meta/type/unit/scale.lux b/stdlib/source/test/lux/meta/type/unit/scale.lux index 64e6cd1ef..836bc5b99 100644 --- a/stdlib/source/test/lux/meta/type/unit/scale.lux +++ b/stdlib/source/test/lux/meta/type/unit/scale.lux @@ -22,7 +22,7 @@ (def natural (syntax (_ []) - (at meta.monad each + (of meta.monad each (|>> code.nat list) meta.seed))) @@ -43,25 +43,25 @@ (_.for [/.Scale]) (do [! random.monad] [small (|> random.int - (at ! each (i.% +1,000)) - (at ! each (at //.meter in))) + (of ! each (i.% +1,000)) + (of ! each (of //.meter in))) large (|> random.int - (at ! each (i.% +1,000)) - (at ! each (i.* +1,000,000,000)) - (at ! each (at //.meter in))) + (of ! each (i.% +1,000)) + (of ! each (i.* +1,000,000,000)) + (of ! each (of //.meter in))) .let [(open "meter#[0]") (is (Equivalence (//.Measure Any //.Meter)) //.equivalence)] unscaled (|> random.int - (at ! each (|>> (i.% +1,000) + (of ! each (|>> (i.% +1,000) (i.* (.int how::to)) - (at //.meter in))))] + (of //.meter in))))] (`` (all _.and (,, (with_template [<type> <scale>] [(_.coverage [<type> <scale>] (|> small - (at <scale> up) + (of <scale> up) (is (//.Measure <type> //.Meter)) - (at <scale> down) + (of <scale> down) (is (//.Measure Any //.Meter)) (meter#= small)))] @@ -72,9 +72,9 @@ (,, (with_template [<type> <scale>] [(_.coverage [<type> <scale>] (|> large - (at <scale> up) + (of <scale> up) (is (//.Measure <type> //.Meter)) - (at <scale> down) + (of <scale> down) (is (//.Measure Any //.Meter)) (meter#= large)))] @@ -84,18 +84,18 @@ )) (_.coverage [/.re_scaled] (|> large (is (//.Measure Any //.Meter)) - (at /.kilo up) (is (//.Measure /.Kilo //.Meter)) + (of /.kilo up) (is (//.Measure /.Kilo //.Meter)) (/.re_scaled /.kilo /.milli) (is (//.Measure /.Milli //.Meter)) (/.re_scaled /.milli /.kilo) (is (//.Measure /.Kilo //.Meter)) - (at /.kilo down) (is (//.Measure Any //.Meter)) + (of /.kilo down) (is (//.Measure Any //.Meter)) (meter#= large))) (_.coverage [/.scale /.type] (and (|> unscaled - (at ..how up) + (of ..how up) (is (//.Measure How //.Meter)) - (at ..how down) + (of ..how down) (meter#= unscaled)) (ratio#= [ratio.#denominator ..how::from ratio.#numerator ..how::to] - (at ..how ratio)))) + (of ..how ratio)))) ))))) |