aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
authorEduardo Julian2022-12-02 19:33:00 -0400
committerEduardo Julian2022-12-02 19:33:00 -0400
commit94e5802f594a73245fce0fbd885103b8bf210d57 (patch)
tree65e5799c0be40f5f015b39bfa6c87c9c27fd9424 /stdlib/source/test
parentb491dfff00219d5206075ea65468e00ab657075d (diff)
Added some simple time-series handling machinery.
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/build.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/stamp.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/time.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/version.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/time.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/time/time.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/versioning.lux4
-rw-r--r--stdlib/source/test/aedifex/cache.lux14
-rw-r--r--stdlib/source/test/aedifex/cli.lux8
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux22
-rw-r--r--stdlib/source/test/aedifex/command/build.lux22
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux14
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux36
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux14
-rw-r--r--stdlib/source/test/aedifex/command/install.lux18
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux14
-rw-r--r--stdlib/source/test/aedifex/command/test.lux22
-rw-r--r--stdlib/source/test/aedifex/command/version.lux2
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux8
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux62
-rw-r--r--stdlib/source/test/aedifex/hash.lux12
-rw-r--r--stdlib/source/test/aedifex/input.lux10
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux18
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux18
-rw-r--r--stdlib/source/test/aedifex/package.lux14
-rw-r--r--stdlib/source/test/aedifex/parser.lux8
-rw-r--r--stdlib/source/test/aedifex/pom.lux4
-rw-r--r--stdlib/source/test/aedifex/profile.lux10
-rw-r--r--stdlib/source/test/aedifex/project.lux10
-rw-r--r--stdlib/source/test/aedifex/repository/local.lux8
-rw-r--r--stdlib/source/test/aedifex/repository/remote.lux14
-rw-r--r--stdlib/source/test/lux.lux16
-rw-r--r--stdlib/source/test/lux/abstract/apply.lux2
-rw-r--r--stdlib/source/test/lux/abstract/codec.lux2
-rw-r--r--stdlib/source/test/lux/abstract/comonad/free.lux4
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux6
-rw-r--r--stdlib/source/test/lux/abstract/equivalence.lux24
-rw-r--r--stdlib/source/test/lux/abstract/functor.lux8
-rw-r--r--stdlib/source/test/lux/abstract/interval.lux8
-rw-r--r--stdlib/source/test/lux/abstract/mix.lux2
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux18
-rw-r--r--stdlib/source/test/lux/abstract/monad/free.lux2
-rw-r--r--stdlib/source/test/lux/abstract/monoid.lux6
-rw-r--r--stdlib/source/test/lux/abstract/order.lux14
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux6
-rw-r--r--stdlib/source/test/lux/control/concurrency/async.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/behavioral.lux8
-rw-r--r--stdlib/source/test/lux/control/concurrency/csp.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/event.lux6
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux18
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux12
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux10
-rw-r--r--stdlib/source/test/lux/control/concurrency/structured.lux16
-rw-r--r--stdlib/source/test/lux/control/concurrency/thread.lux2
-rw-r--r--stdlib/source/test/lux/control/exception.lux2
-rw-r--r--stdlib/source/test/lux/control/function.lux6
-rw-r--r--stdlib/source/test/lux/control/function/inline.lux2
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux4
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux2
-rw-r--r--stdlib/source/test/lux/control/function/mutual.lux4
-rw-r--r--stdlib/source/test/lux/control/function/predicate.lux2
-rw-r--r--stdlib/source/test/lux/control/lazy.lux4
-rw-r--r--stdlib/source/test/lux/control/maybe.lux4
-rw-r--r--stdlib/source/test/lux/control/parser.lux32
-rw-r--r--stdlib/source/test/lux/control/region.lux2
-rw-r--r--stdlib/source/test/lux/control/security/policy.lux20
-rw-r--r--stdlib/source/test/lux/control/state.lux2
-rw-r--r--stdlib/source/test/lux/control/thread.lux6
-rw-r--r--stdlib/source/test/lux/control/try.lux6
-rw-r--r--stdlib/source/test/lux/control/writer.lux2
-rw-r--r--stdlib/source/test/lux/data/binary.lux82
-rw-r--r--stdlib/source/test/lux/data/bit.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux46
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux30
-rw-r--r--stdlib/source/test/lux/data/collection/list/property.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux13
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux14
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux24
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux22
-rw-r--r--stdlib/source/test/lux/data/collection/stack.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/stream.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux16
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux64
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux2
-rw-r--r--stdlib/source/test/lux/data/color.lux120
-rw-r--r--stdlib/source/test/lux/data/color/cmyk.lux54
-rw-r--r--stdlib/source/test/lux/data/color/hsb.lux6
-rw-r--r--stdlib/source/test/lux/data/color/hsl.lux6
-rw-r--r--stdlib/source/test/lux/data/color/named.lux6
-rw-r--r--stdlib/source/test/lux/data/color/pigment.lux34
-rw-r--r--stdlib/source/test/lux/data/color/rgb.lux4
-rw-r--r--stdlib/source/test/lux/data/color/terminal.lux4
-rw-r--r--stdlib/source/test/lux/data/format/json.lux60
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux16
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux6
-rw-r--r--stdlib/source/test/lux/data/product.lux6
-rw-r--r--stdlib/source/test/lux/data/sum.lux14
-rw-r--r--stdlib/source/test/lux/data/text.lux126
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux2
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux2
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux12
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux10
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux2
-rw-r--r--stdlib/source/test/lux/documentation.lux2
-rw-r--r--stdlib/source/test/lux/ffi.js.lux4
-rw-r--r--stdlib/source/test/lux/ffi.jvm.lux38
-rw-r--r--stdlib/source/test/lux/ffi.old.lux10
-rw-r--r--stdlib/source/test/lux/ffi/export.jvm.lux4
-rw-r--r--stdlib/source/test/lux/math/logic/fuzzy.lux8
-rw-r--r--stdlib/source/test/lux/math/modular.lux6
-rw-r--r--stdlib/source/test/lux/math/modulus.lux2
-rw-r--r--stdlib/source/test/lux/math/number.lux6
-rw-r--r--stdlib/source/test/lux/math/number/complex.lux6
-rw-r--r--stdlib/source/test/lux/math/number/frac.lux34
-rw-r--r--stdlib/source/test/lux/math/number/i16.lux6
-rw-r--r--stdlib/source/test/lux/math/number/i32.lux6
-rw-r--r--stdlib/source/test/lux/math/number/i64.lux24
-rw-r--r--stdlib/source/test/lux/math/number/i8.lux6
-rw-r--r--stdlib/source/test/lux/math/number/int.lux6
-rw-r--r--stdlib/source/test/lux/math/number/nat.lux4
-rw-r--r--stdlib/source/test/lux/math/number/ratio.lux2
-rw-r--r--stdlib/source/test/lux/math/number/rev.lux10
-rw-r--r--stdlib/source/test/lux/math/random.lux4
-rw-r--r--stdlib/source/test/lux/meta.lux2015
-rw-r--r--stdlib/source/test/lux/meta/code.lux44
-rw-r--r--stdlib/source/test/lux/meta/compiler/arity.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux10
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux12
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux8
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux22
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux16
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux30
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux30
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/function.lux18
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/loop.lux28
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/variable.lux12
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/when.lux22
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux10
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/synthesis.lux38
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux4
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cache.lux4
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux4
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cache/module.lux10
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux12
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cli.lux6
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux4
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/context.lux2
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/export.lux22
-rw-r--r--stdlib/source/test/lux/meta/compiler/meta/import.lux20
-rw-r--r--stdlib/source/test/lux/meta/compiler/phase.lux20
-rw-r--r--stdlib/source/test/lux/meta/compiler/reference.lux2
-rw-r--r--stdlib/source/test/lux/meta/configuration.lux4
-rw-r--r--stdlib/source/test/lux/meta/extension.lux12
-rw-r--r--stdlib/source/test/lux/meta/location.lux4
-rw-r--r--stdlib/source/test/lux/meta/macro.lux16
-rw-r--r--stdlib/source/test/lux/meta/macro/pattern.lux6
-rw-r--r--stdlib/source/test/lux/meta/macro/syntax/declaration.lux4
-rw-r--r--stdlib/source/test/lux/meta/macro/syntax/definition.lux4
-rw-r--r--stdlib/source/test/lux/meta/macro/syntax/export.lux2
-rw-r--r--stdlib/source/test/lux/meta/macro/syntax/input.lux2
-rw-r--r--stdlib/source/test/lux/meta/macro/syntax/type/variable.lux2
-rw-r--r--stdlib/source/test/lux/meta/macro/template.lux2
-rw-r--r--stdlib/source/test/lux/meta/symbol.lux14
-rw-r--r--stdlib/source/test/lux/meta/target/js.lux48
-rw-r--r--stdlib/source/test/lux/meta/target/jvm.lux36
-rw-r--r--stdlib/source/test/lux/meta/target/lua.lux60
-rw-r--r--stdlib/source/test/lux/meta/target/python.lux58
-rw-r--r--stdlib/source/test/lux/meta/target/ruby.lux112
-rw-r--r--stdlib/source/test/lux/meta/type.lux20
-rw-r--r--stdlib/source/test/lux/meta/type/check.lux6
-rw-r--r--stdlib/source/test/lux/meta/type/implicit.lux10
-rw-r--r--stdlib/source/test/lux/meta/type/linear.lux12
-rw-r--r--stdlib/source/test/lux/meta/type/quotient.lux2
-rw-r--r--stdlib/source/test/lux/meta/type/refinement.lux8
-rw-r--r--stdlib/source/test/lux/meta/type/unit.lux28
-rw-r--r--stdlib/source/test/lux/meta/type/unit/scale.lux34
-rw-r--r--stdlib/source/test/lux/program.lux2
-rw-r--r--stdlib/source/test/lux/test/benchmark.lux2
-rw-r--r--stdlib/source/test/lux/test/property.lux6
-rw-r--r--stdlib/source/test/lux/world/console.lux2
-rw-r--r--stdlib/source/test/lux/world/environment.lux8
-rw-r--r--stdlib/source/test/lux/world/file.lux12
-rw-r--r--stdlib/source/test/lux/world/file/watch.lux32
-rw-r--r--stdlib/source/test/lux/world/input/keyboard.lux2
-rw-r--r--stdlib/source/test/lux/world/locale.lux6
-rw-r--r--stdlib/source/test/lux/world/locale/language.lux4
-rw-r--r--stdlib/source/test/lux/world/locale/territory.lux4
-rw-r--r--stdlib/source/test/lux/world/logging.lux14
-rw-r--r--stdlib/source/test/lux/world/money.lux4
-rw-r--r--stdlib/source/test/lux/world/net/http/client.lux12
-rw-r--r--stdlib/source/test/lux/world/net/http/header.lux2
-rw-r--r--stdlib/source/test/lux/world/net/http/response.lux4
-rw-r--r--stdlib/source/test/lux/world/net/http/server.lux8
-rw-r--r--stdlib/source/test/lux/world/net/http/status.lux2
-rw-r--r--stdlib/source/test/lux/world/net/mime.lux2
-rw-r--r--stdlib/source/test/lux/world/net/uri/encoding.lux4
-rw-r--r--stdlib/source/test/lux/world/net/uri/path.lux2
-rw-r--r--stdlib/source/test/lux/world/net/uri/scheme.lux4
-rw-r--r--stdlib/source/test/lux/world/output/video/resolution.lux2
-rw-r--r--stdlib/source/test/lux/world/shell.lux12
-rw-r--r--stdlib/source/test/lux/world/time.lux28
-rw-r--r--stdlib/source/test/lux/world/time/date.lux14
-rw-r--r--stdlib/source/test/lux/world/time/day.lux8
-rw-r--r--stdlib/source/test/lux/world/time/duration.lux6
-rw-r--r--stdlib/source/test/lux/world/time/instant.lux29
-rw-r--r--stdlib/source/test/lux/world/time/month.lux10
-rw-r--r--stdlib/source/test/lux/world/time/series.lux152
-rw-r--r--stdlib/source/test/lux/world/time/year.lux2
228 files changed, 2670 insertions, 2473 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot.lux b/stdlib/source/test/aedifex/artifact/snapshot.lux
index 9a71acb9c..9094e815b 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot.lux
@@ -43,7 +43,7 @@
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
$/build.test
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/build.lux b/stdlib/source/test/aedifex/artifact/snapshot/build.lux
index 53be5d10f..9a5cbba1c 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/build.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/build.lux
@@ -37,6 +37,6 @@
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
))))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
index eba776e33..a5d3b0e1d 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
@@ -45,6 +45,6 @@
(|> expected
/.format
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/time.lux b/stdlib/source/test/aedifex/artifact/snapshot/time.lux
index 40f181552..af6f8bdb0 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/time.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/time.lux
@@ -38,7 +38,7 @@
(|> expected
/.format
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
))
)))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version.lux b/stdlib/source/test/aedifex/artifact/snapshot/version.lux
index 31336c5df..ba8f44d04 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/version.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/version.lux
@@ -46,7 +46,7 @@
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
/value.test
diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux
index d26f6d55b..912aa30f1 100644
--- a/stdlib/source/test/aedifex/artifact/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time.lux
@@ -46,7 +46,7 @@
(|> expected
/.format
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
(do random.monad
[expected ..random]
@@ -54,7 +54,7 @@
(|> expected
/.instant
/.of_instant
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
(_.coverage [/.epoch]
(instant#= instant.epoch (/.instant /.epoch)))
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index 23f0a69f8..f6fc6c83a 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -52,13 +52,13 @@
(|> expected
/.format
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.value /.date]
(|> expected
/.value
/.date
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.year_is_out_of_range]
(when (/.date candidate)
diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux
index 90ac9819b..77521ce00 100644
--- a/stdlib/source/test/aedifex/artifact/time/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time/time.lux
@@ -38,6 +38,6 @@
(|> expected
/.format
(<text>.result /.parser)
- (try#each (at time.equivalence = expected))
+ (try#each (of time.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/aedifex/artifact/versioning.lux b/stdlib/source/test/aedifex/artifact/versioning.lux
index 71d9ad175..6b2b504d2 100644
--- a/stdlib/source/test/aedifex/artifact/versioning.lux
+++ b/stdlib/source/test/aedifex/artifact/versioning.lux
@@ -45,13 +45,13 @@
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
(_.coverage [/.init]
(|> /.init
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = /.init))
+ (try#each (of /.equivalence = /.init))
(try.else false)))
)))
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index f6c75114f..63f9e6f90 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -67,7 +67,7 @@
(def content
(Random Binary)
(do [! random.monad]
- [content_size (at ! each (n.% 100) random.nat)]
+ [content_size (of ! each (n.% 100) random.nat)]
(_binary.random content_size)))
(def package
@@ -85,7 +85,7 @@
(do [! random.monad]
[[main_dependency main_package] ..package
dependencies (|> (//package.dependencies main_package)
- (at try.monad each set.list)
+ (of try.monad each set.list)
(try.else (list))
(monad.each ! (function (_ dependency)
(do !
@@ -108,7 +108,7 @@
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
.let [fs (is (file.System Async)
- (file.mock (at file.default separator)))
+ (file.mock (of file.default separator)))
program (program.async (program.mock environment.empty home working_directory))]]
(in (do async.monad
[wrote! (/.write_one program fs dependency expected_package)
@@ -118,7 +118,7 @@
(do try.monad
[_ wrote!
actual_package read!]
- (in (at //package.equivalence =
+ (in (of //package.equivalence =
(has //package.#origin {//repository/origin.#Local ""} expected_package)
actual_package)))))))))
@@ -129,7 +129,7 @@
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
.let [fs (is (file.System Async)
- (file.mock (at file.default separator)))
+ (file.mock (of file.default separator)))
program (program.async (program.mock environment.empty home working_directory))]]
(in (do async.monad
[wrote! (/.write_all program fs expected)
@@ -139,8 +139,8 @@
(do try.monad
[_ wrote!
actual read!]
- (in (at //dependency/resolution.equivalence =
- (at dictionary.functor each
+ (in (of //dependency/resolution.equivalence =
+ (of dictionary.functor each
(has //package.#origin {//repository/origin.#Local ""})
expected)
actual)))))))))
diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux
index fa6d9c72c..b72f3464e 100644
--- a/stdlib/source/test/aedifex/cli.lux
+++ b/stdlib/source/test/aedifex/cli.lux
@@ -79,8 +79,8 @@
(cli.result /.command)
(pipe.when
{try.#Success [names actual]}
- (and (at (list.equivalence text.equivalence) = (list) names)
- (at /.equivalence = expected actual))
+ (and (of (list.equivalence text.equivalence) = (list) names)
+ (of /.equivalence = expected actual))
{try.#Failure error}
false)))))
@@ -97,8 +97,8 @@
(cli.result /.command)
(pipe.when
{try.#Success [actual_profile actual_command]}
- (and (at (list.equivalence text.equivalence) = (list expected_profile) actual_profile)
- (at /.equivalence = expected_command actual_command))
+ (and (of (list.equivalence text.equivalence) = (list expected_profile) actual_profile)
+ (of /.equivalence = expected_command actual_command))
{try.#Failure error}
false)))))
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index c46b474ac..9f3769b00 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -59,8 +59,8 @@
(if (n.= expected_runs actual_runs)
(in {try.#Failure end_signal})
(do (try.with !)
- [_ (at fs write dummy_file (at utf8.codec encoded (%.nat actual_runs)))
- _ (at fs modify dummy_file (|> actual_runs .int instant.of_millis))]
+ [_ (of fs write dummy_file (of utf8.codec encoded (%.nat actual_runs)))
+ _ (of fs modify dummy_file (|> actual_runs .int instant.of_millis))]
(in [shell.normal []])))))]))
(def .public test
@@ -68,7 +68,7 @@
(<| (_.covering /._)
(do [! random.monad]
[end_signal (random.alphabetic 5)
- .let [/ (at file.default separator)
+ .let [/ (of file.default separator)
[fs watcher] (watch.mock /)]
program (random.and (random.alphabetic 5)
@@ -76,7 +76,7 @@
target (random.alphabetic 5)
source (random.alphabetic 5)
.let [empty_profile (is Profile
- (at ///.monoid identity))
+ (of ///.monoid identity))
with_target (is (-> Profile Profile)
(has ///.#target target))
with_program (is (-> Profile Profile)
@@ -90,18 +90,18 @@
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
- expected_runs (at ! each (|>> (n.% 10) (n.max 2)) random.nat)
- dummy_path (at ! each (|>> (format source /)) (random.alphabetic 5))
+ expected_runs (of ! each (|>> (n.% 10) (n.max 2)) random.nat)
+ dummy_path (of ! each (|>> (format source /)) (random.alphabetic 5))
[compiler resolution] $build.resolution]
(all _.and
(_.coverage [/.delay]
(n.> 0 /.delay))
(in (do async.monad
[verdict (do ///action.monad
- [_ (at fs make_directory source)
- _ (at fs write dummy_path (binary.empty 0))
+ [_ (of fs make_directory source)
+ _ (of fs write dummy_path (binary.empty 0))
.let [[@runs command] (..command expected_runs end_signal fs dummy_path)]
- _ (at watcher poll [])]
+ _ (of watcher poll [])]
(do [! async.monad]
[no_dangling_process! (|> profile
(has ///.#lux compiler)
@@ -111,7 +111,7 @@
fs
(shell.async ($build.good_shell []))
resolution)
- (at ! each (|>> (pipe.when
+ (of ! each (|>> (pipe.when
{try.#Failure error}
(same? end_signal error)
@@ -120,7 +120,7 @@
correct_number_of_runs! (|> @runs
atom.read!
async.future
- (at ! each (n.= expected_runs)))]
+ (of ! each (n.= expected_runs)))]
(in {try.#Success (and correct_number_of_runs!
no_dangling_process!)})))]
(unit.coverage [/.do!]
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 674a04e93..205866e1f 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -144,7 +144,7 @@
(do [! random.monad]
[last_read (random.alphabetic 5)
last_error (random.alphabetic 5)
- .let [fs (file.mock (at file.default separator))
+ .let [fs (file.mock (of file.default separator))
shell (shell.async (..good_shell []))]
program (random.and (random.alphabetic 5)
(random.alphabetic 5))
@@ -152,7 +152,7 @@
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
.let [empty_profile (is Profile
- (at ///.monoid identity))
+ (of ///.monoid identity))
with_target (is (-> Profile Profile)
(has ///.#target target))
with_program (is (-> Profile Profile)
@@ -189,8 +189,8 @@
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs shell resolution
(has ///.#lux compiler profile))
- start (at console read_line [])
- end (at console read_line [])]
+ start (of console read_line [])
+ end (of console read_line [])]
(in (and (text#= /.start start)
(text#= /.success end))))]
(unit.coverage [/.do!
@@ -211,8 +211,8 @@
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async (..bad_shell [])) resolution
(has ///.#lux compiler profile))
- start (at console read_line [])
- end (at console read_line [])]
+ start (of console read_line [])
+ end (of console read_line [])]
(in (and (text#= /.start start)
(text#= /.failure end))))]
(unit.coverage [/.failure]
@@ -231,11 +231,11 @@
[verdict (do ///action.monad
[process (shell [environment.empty working_directory "" (list "")])
_ (<log!> console process)
- actual/0 (at console read_line [])
- actual/1 (at console read_line [])
- actual/2 (at console read_line [])
- end! (|> (at console read_line [])
- (at ! each (|>> (pipe.when
+ actual/0 (of console read_line [])
+ actual/1 (of console read_line [])
+ actual/2 (of console read_line [])
+ end! (|> (of console read_line [])
+ (of ! each (|>> (pipe.when
{try.#Failure error}
true
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index b33d6d911..6ead0475f 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -45,7 +45,7 @@
(def (files prefix)
(-> Path (Random (List [Path Binary])))
(do [! random.monad]
- [count (at ! each (n.% 10) random.nat)
+ [count (of ! each (n.% 10) random.nat)
names (random.set text.hash count ..node_name)
contents (random.list count ($binary.random 100))]
(in (list.zipped_2 (list#each (|>> (format prefix)) (set.list names))
@@ -53,7 +53,7 @@
(def (create_file! fs [path content])
(-> (file.System Async) [Path Binary] (Async (Try Any)))
- (at fs write path content))
+ (of fs write path content))
(def (create_directory! fs path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Any)))
@@ -65,11 +65,11 @@
(def (directory_exists? fs)
(-> (file.System Async) Path (Async (Try Bit)))
- (|>> (at fs directory?) (try.lifted async.monad)))
+ (|>> (of fs directory?) (try.lifted async.monad)))
(def (file_exists? fs)
(-> (file.System Async) Path (Async (Try Bit)))
- (|>> (at fs file?) (try.lifted async.monad)))
+ (|>> (of fs file?) (try.lifted async.monad)))
(def (assets_exist? fs directory_path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Bit)))
@@ -89,8 +89,8 @@
[context ..node_name
target ..node_name
sub ..node_name
- .let [fs (file.mock (at file.default separator))
- / (at fs separator)
+ .let [fs (file.mock (of file.default separator))
+ / (of fs separator)
target_path (format context / target)
sub_path (format target_path / sub)]
direct_files (..files (format target_path /))
@@ -109,7 +109,7 @@
context_exists!/post (..directory_exists? fs context)
target_exists!/post (..assets_exist? fs target_path direct_files)
sub_exists!/post (..assets_exist? fs sub_path sub_files)
- logging (at console read_line [])]
+ logging (of console read_line [])]
(in (and (and context_exists!/pre
context_exists!/post)
(and target_exists!/pre
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 88da67576..d970427d2 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -62,7 +62,7 @@
(implementation
(def (execute [environment working_directory command arguments])
(do [! ///action.monad]
- [files (at fs directory_files working_directory)
+ [files (of fs directory_files working_directory)
_ (monad.each !
(function (_ file)
(do !
@@ -94,8 +94,8 @@
[.let [console ($version.echo "")]
_ ($install.make_sources! fs (the ///.#sources profile))
_ (/.do! program (..shell fs) console local remote fs artifact profile)
- locally_installed! (at console read_line [])
- deployed! (at console read_line [])]
+ locally_installed! (of console read_line [])
+ deployed! (of console read_line [])]
(in [locally_installed! deployed!])))
(def .public test
@@ -112,7 +112,7 @@
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
- .let [fs (file.mock (at file.default separator))
+ .let [fs (file.mock (of file.default separator))
program (program.async (program.mock environment.empty home working_directory))
local (///repository/local.repository program fs)
remote (///repository.mock $repository.mock
@@ -124,20 +124,20 @@
(the ///.#sources)
set.list
(export.library fs)
- (at ! each (\\format.result tar.format)))
+ (of ! each (\\format.result tar.format)))
- actual_pom (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.pom))
- actual_library (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.lux_library))
- actual_sha1 (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha1)))
- actual_sha1 (at async.monad in
+ actual_pom (of remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.pom))
+ actual_library (of remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact ///artifact/extension.lux_library))
+ actual_sha1 (of remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha1)))
+ actual_sha1 (of async.monad in
(do try.monad
- [actual_sha1 (at utf8.codec decoded actual_sha1)]
- (at ///hash.sha1_codec decoded actual_sha1)))
- actual_md5 (at remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
- actual_md5 (at async.monad in
+ [actual_sha1 (of utf8.codec decoded actual_sha1)]
+ (of ///hash.sha1_codec decoded actual_sha1)))
+ actual_md5 (of remote download (///repository/remote.uri (the ///artifact.#version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
+ actual_md5 (of async.monad in
(do try.monad
- [actual_md5 (at utf8.codec decoded actual_md5)]
- (at ///hash.md5_codec decoded actual_md5)))
+ [actual_md5 (of utf8.codec decoded actual_md5)]
+ (of ///hash.md5_codec decoded actual_md5)))
.let [succeeded!
(and (text#= //install.success locally_installed!)
@@ -148,16 +148,16 @@
actual_library)
deployed_pom!
- (binary#= (|> expected_pom (at xml.codec encoded) (at utf8.codec encoded))
+ (binary#= (|> expected_pom (of xml.codec encoded) (of utf8.codec encoded))
actual_pom)
deployed_sha1!
- (at ///hash.equivalence =
+ (of ///hash.equivalence =
(///hash.sha1 expected_library)
actual_sha1)
deployed_md5!
- (at ///hash.equivalence =
+ (of ///hash.equivalence =
(///hash.md5 expected_library)
actual_md5)]]
(in (and succeeded!
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 64060127b..6f681c74d 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -64,7 +64,7 @@
dependee_artifact $///artifact.random
depender_artifact (random.only (predicate.complement
- (at ///artifact.equivalence = dependee_artifact))
+ (of ///artifact.equivalence = dependee_artifact))
$///artifact.random)
[_ dependee_package] $///package.random
@@ -75,11 +75,11 @@
depender [///dependency.#artifact depender_artifact
///dependency.#type ///artifact/type.lux_library]
- dependee_pom (|> (at ///.monoid identity)
+ dependee_pom (|> (of ///.monoid identity)
(has ///.#identity {.#Some dependee_artifact})
///pom.write
try.trusted)
- depender_pom (|> (at ///.monoid identity)
+ depender_pom (|> (of ///.monoid identity)
(has ///.#identity {.#Some depender_artifact})
(has ///.#dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
@@ -88,15 +88,15 @@
dependee_package (|> dependee_package
(has ///package.#origin {///repository/origin.#Remote ""})
(has ///package.#pom [dependee_pom
- (|> dependee_pom (at xml.codec encoded) (at utf8.codec encoded))
+ (|> dependee_pom (of xml.codec encoded) (of utf8.codec encoded))
{///dependency/status.#Unverified}]))
depender_package (|> depender_package
(has ///package.#origin {///repository/origin.#Remote ""})
(has ///package.#pom [depender_pom
- (|> depender_pom (at xml.codec encoded) (at utf8.codec encoded))
+ (|> depender_pom (of xml.codec encoded) (of utf8.codec encoded))
{///dependency/status.#Unverified}]))
- fs (file.mock (at file.default separator))
+ fs (file.mock (of file.default separator))
program (program.async (program.mock environment.empty home working_directory))]]
(in (do async.monad
[verdict (do ///action.monad
@@ -105,7 +105,7 @@
pre (|> ///dependency/resolution.empty
(dictionary.has dependee dependee_package)
(///dependency/deployment.all local))
- post (|> (at ///.monoid identity)
+ post (|> (of ///.monoid identity)
(has ///.#dependencies (set.of_list ///dependency.hash (list dependee depender)))
(/.do! console local
(list (///repository.mock ($///dependency/resolution.single depender_artifact depender_package)
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index d942a9d17..5127ca1fc 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -42,7 +42,7 @@
(def .public (make_sources! fs sources)
(-> (file.System Async) (Set file.Path) (Action (List Any)))
- (let [/ (at fs separator)
+ (let [/ (of fs separator)
! ///action.monad]
(|> sources
set.list
@@ -59,18 +59,18 @@
[.let [console ($version.echo "")]
_ (..make_sources! fs (the ///.#sources sample))
_ (/.do! console fs (///repository/local.repository program fs) sample)]
- (at console read_line [])))
+ (of console read_line [])))
(def .public test
Test
(<| (_.covering /._)
(do [! random.monad]
[identity $artifact.random
- sample (at ! each (has ///.#identity {.#Some identity})
+ sample (of ! each (has ///.#identity {.#Some identity})
$profile.random)
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
- .let [/ (at file.default separator)]]
+ .let [/ (of file.default separator)]]
(all _.and
(in (do [! async.monad]
[.let [fs (file.mock /)
@@ -80,16 +80,16 @@
library_path (format artifact_path ///artifact/extension.lux_library)
pom_path (format artifact_path ///artifact/extension.pom)]
verdict (do [! ///action.monad]
- [succeeded! (at ! each (text#= /.success)
+ [succeeded! (of ! each (text#= /.success)
(..execute! program fs sample))
library_exists! (|> library_path
(format home /)
- (at fs file?)
- (at async.monad each (|>> {try.#Success})))
+ (of fs file?)
+ (of async.monad each (|>> {try.#Success})))
pom_exists! (|> pom_path
(format home /)
- (at fs file?)
- (at async.monad each (|>> {try.#Success})))]
+ (of fs file?)
+ (of async.monad each (|>> {try.#Success})))]
(in (and succeeded!
library_exists!
pom_exists!)))]
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 0d304f19d..a8e75ef1d 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -37,7 +37,7 @@
(<| (_.covering /._)
(do random.monad
[sample @profile.random
- .let [fs (file.mock (at file.default separator))]]
+ .let [fs (file.mock (of file.default separator))]]
(in (do [! async.monad]
[.let [console (@version.echo "")]
outcome (/.do! console fs sample)]
@@ -46,14 +46,14 @@
(do !
[verdict (do ///action.monad
[expected (|> (///pom.write sample)
- (try#each (|>> (at xml.codec encoded)
- (at utf8.codec encoded)))
- (at ! in))
- actual (at fs read ///pom.file)
+ (try#each (|>> (of xml.codec encoded)
+ (of utf8.codec encoded)))
+ (of ! in))
+ actual (of fs read ///pom.file)
- logging! (at ///action.monad each
+ logging! (of ///action.monad each
(text#= /.success)
- (at console read_line []))
+ (of console read_line []))
.let [expected_content!
(binary#= expected actual)]]
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index 31afea06b..f8f5bb935 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -51,7 +51,7 @@
home (random.alphabetic 5)
working_directory (random.alphabetic 5)
.let [empty_profile (is Profile
- (at ///.monoid identity))
+ (of ///.monoid identity))
with_target (is (-> Profile Profile)
(has ///.#target target))
with_test (is (-> Profile Profile)
@@ -62,17 +62,17 @@
with_target)]
[compiler resolution] @build.resolution]
(all _.and
- (let [fs (file.mock (at file.default separator))
+ (let [fs (file.mock (of file.default separator))
console (@version.echo "")]
(in (do async.monad
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async (@build.good_shell [])) resolution
(has ///.#lux compiler profile))
- build_start (at console read_line [])
- build_end (at console read_line [])
- test_start (at console read_line [])
- test_end (at console read_line [])]
+ build_start (of console read_line [])
+ build_end (of console read_line [])
+ test_start (of console read_line [])
+ test_end (of console read_line [])]
(in (and (and (text#= //build.start build_start)
(text#= //build.success build_end))
(and (text#= /.start test_start)
@@ -80,7 +80,7 @@
(unit.coverage [/.do!
/.start /.success]
(try.else false verdict)))))
- (let [fs (file.mock (at file.default separator))
+ (let [fs (file.mock (of file.default separator))
console (@version.echo "")]
(in (do async.monad
[verdict (do ///action.monad
@@ -105,10 +105,10 @@
_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async bad_shell) resolution
(has ///.#lux compiler profile))
- build_start (at console read_line [])
- build_end (at console read_line [])
- test_start (at console read_line [])
- test_end (at console read_line [])]
+ build_start (of console read_line [])
+ build_end (of console read_line [])
+ test_start (of console read_line [])
+ test_end (of console read_line [])]
(in (and (and (text#= //build.start build_start)
(text#= //build.success build_end))
(and (text#= /.start test_start)
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index 169b20ef6..e1e34170e 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -72,7 +72,7 @@
[.let [console (..echo "")]
verdict (do (try.with async.monad)
[_ (/.do! console profile)
- logging (at console read_line [])]
+ logging (of console read_line [])]
(in (text#= (version.format lux_version.latest)
logging)))]
(unit.coverage [/.do!]
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index 6e8aff6b6..3e7350050 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -149,7 +149,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [address (at ! each (text.suffix uri.separator)
+ [address (of ! each (text.suffix uri.separator)
(random.upper_cased 10))]
(all _.and
(do [! random.monad]
@@ -167,12 +167,12 @@
(try.else false))))))
(do [! random.monad]
[.let [hash (is (Hash [Dependency Artifact Package])
- (at hash.functor each (|>> product.right product.left product.left)
+ (of hash.functor each (|>> product.right product.left product.left)
text.hash))]
- num_bundles (at ! each (n.% 10) random.nat)
+ num_bundles (of ! each (n.% 10) random.nat)
bundles (|> ..bundle
(random.set hash num_bundles)
- (at ! each set.list))
+ (of ! each set.list))
.let [resolution (list#mix (function (_ [dependency expected_artifact package] resolution)
(dictionary.has dependency package resolution))
resolution.empty
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index c6c14fec4..9e67edc86 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -80,14 +80,14 @@
(def sha1
(-> Binary Binary)
(|>> ///hash.sha1
- (at ///hash.sha1_codec encoded)
- (at utf8.codec encoded)))
+ (of ///hash.sha1_codec encoded)
+ (of utf8.codec encoded)))
(def md5
(-> Binary Binary)
(|>> ///hash.md5
- (at ///hash.md5_codec encoded)
- (at utf8.codec encoded)))
+ (of ///hash.md5_codec encoded)
+ (of utf8.codec encoded)))
(def .public nope
(Mock Any)
@@ -115,8 +115,8 @@
(|> package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded)))]
+ (of xml.codec encoded)
+ (of utf8.codec encoded)))]
(cond (text.ends_with? ///artifact/extension.lux_library uri)
{try.#Success [state library]}
@@ -169,23 +169,23 @@
{try.#Success [state (|> expected_package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded))]}
+ (of xml.codec encoded)
+ (of utf8.codec encoded))]}
(text.ends_with? ..pom_sha1 uri)
{try.#Success [state (|> dummy_package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded)
+ (of xml.codec encoded)
+ (of utf8.codec encoded)
..sha1)]}
(text.ends_with? ..pom_md5 uri)
{try.#Success [state (|> expected_package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded)
+ (of xml.codec encoded)
+ (of utf8.codec encoded)
..md5)]}
... else
@@ -222,23 +222,23 @@
{try.#Success [state (|> expected_package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded))]}
+ (of xml.codec encoded)
+ (of utf8.codec encoded))]}
(text.ends_with? ..pom_sha1 uri)
{try.#Success [state (|> expected_package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded)
+ (of xml.codec encoded)
+ (of utf8.codec encoded)
..sha1)]}
(text.ends_with? ..pom_md5 uri)
{try.#Success [state (|> dummy_package
(the ///package.#pom)
product.left
- (at xml.codec encoded)
- (at utf8.codec encoded)
+ (of xml.codec encoded)
+ (of utf8.codec encoded)
..md5)]}
... else
@@ -254,7 +254,7 @@
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
(has ///package.#pom (the ///package.#pom expected_package))
- (at ///package.equivalence = expected_package)
+ (of ///package.equivalence = expected_package)
not)
$///package.random)
.let [good (..single expected_artifact expected_package)
@@ -268,7 +268,7 @@
(unit.coverage [/.one]
(when actual_package
{try.#Success actual_package}
- (at ///package.equivalence =
+ (of ///package.equivalence =
(has ///package.#origin {///repository/origin.#Remote ""} expected_package)
actual_package)
@@ -299,7 +299,7 @@
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
(has ///package.#pom (the ///package.#pom expected_package))
- (at ///package.equivalence = expected_package)
+ (of ///package.equivalence = expected_package)
not)
$///package.random)
.let [good (..single expected_artifact expected_package)
@@ -317,7 +317,7 @@
(unit.coverage [/.any]
(when actual_package
{try.#Success actual_package}
- (at ///package.equivalence =
+ (of ///package.equivalence =
(has ///package.#origin {///repository/origin.#Remote ""} expected_package)
actual_package)
@@ -344,11 +344,11 @@
(do random.monad
[dependee_artifact $///artifact.random
depender_artifact (random.only (predicate.complement
- (at ///artifact.equivalence = dependee_artifact))
+ (of ///artifact.equivalence = dependee_artifact))
$///artifact.random)
ignored_artifact (random.only (predicate.complement
- (predicate.and (at ///artifact.equivalence = dependee_artifact)
- (at ///artifact.equivalence = depender_artifact)))
+ (predicate.and (of ///artifact.equivalence = dependee_artifact)
+ (of ///artifact.equivalence = depender_artifact)))
$///artifact.random)]
(in [dependee_artifact depender_artifact ignored_artifact])))
@@ -368,33 +368,33 @@
ignored [///dependency.#artifact ignored_artifact
///dependency.#type ///artifact/type.lux_library]
- dependee_pom (|> (at ///.monoid identity)
+ dependee_pom (|> (of ///.monoid identity)
(has ///.#identity {.#Some dependee_artifact})
///pom.write
try.trusted)
- depender_pom (|> (at ///.monoid identity)
+ depender_pom (|> (of ///.monoid identity)
(has ///.#identity {.#Some depender_artifact})
(has ///.#dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
- ignored_pom (|> (at ///.monoid identity)
+ ignored_pom (|> (of ///.monoid identity)
(has ///.#identity {.#Some ignored_artifact})
///pom.write
try.trusted)
dependee_package (has ///package.#pom
[dependee_pom
- (|> dependee_pom (at xml.codec encoded) (at utf8.codec encoded))
+ (|> dependee_pom (of xml.codec encoded) (of utf8.codec encoded))
{///dependency/status.#Unverified}]
dependee_package)
depender_package (has ///package.#pom
[depender_pom
- (|> depender_pom (at xml.codec encoded) (at utf8.codec encoded))
+ (|> depender_pom (of xml.codec encoded) (of utf8.codec encoded))
{///dependency/status.#Unverified}]
depender_package)
ignored_package (has ///package.#pom
[ignored_pom
- (|> ignored_pom (at xml.codec encoded) (at utf8.codec encoded))
+ (|> ignored_pom (of xml.codec encoded) (of utf8.codec encoded))
{///dependency/status.#Unverified}]
ignored_package)]]
(in [[dependee depender ignored]
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index ea6d6435e..36326a58f 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -31,8 +31,8 @@
(-> (-> Binary (/.Hash h))
(Random (/.Hash h))))
(do [! random.monad]
- [size (at ! each (n.% 100) random.nat)]
- (at ! each hash (_binary.random size))))
+ [size (of ! each (n.% 100) random.nat)]
+ (of ! each hash (_binary.random size))))
(def .public test
Test
@@ -52,11 +52,11 @@
(_.coverage [<hash> <constructor> <exception>]
(and (when (<constructor> (/.data expected))
{try.#Success actual}
- (at /.equivalence = expected actual)
+ (of /.equivalence = expected actual)
{try.#Failure error}
false)
- (when (<constructor> (at binary.monoid composite
+ (when (<constructor> (of binary.monoid composite
(/.data expected)
(/.data expected)))
{try.#Success actual}
@@ -81,8 +81,8 @@
[(do random.monad
[expected (..random <hash>)]
(_.coverage [<codec>]
- (when (at <codec> decoded
- (format (at <codec> encoded expected)
+ (when (of <codec> decoded
+ (format (of <codec> encoded expected)
"AABBCC"))
{try.#Success actual}
false
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index 7dc6ccc8e..76cf34c7c 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -52,19 +52,19 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [expected (at ! each (has //.#parents (list)) $profile.random)
+ [expected (of ! each (has //.#parents (list)) $profile.random)
.let [fs (is (file.System Async)
- (file.mock (at file.default separator)))]]
+ (file.mock (of file.default separator)))]]
(in (do async.monad
[verdict (do //action.monad
[.let [profile (|> expected
(//project.project //.default)
//format.project
%.code
- (at utf8.codec encoded))]
- _ (at fs write //project.file profile)
+ (of utf8.codec encoded))]
+ _ (of fs write //project.file profile)
actual (is (Async (Try Profile))
(/.read async.monad fs (list)))]
- (in (at //.equivalence = (with_defaults expected) actual)))]
+ (in (of //.equivalence = (with_defaults expected) actual)))]
(unit.coverage [/.read]
(try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 1f5fc5f8e..af0474e2f 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -52,12 +52,12 @@
(random.alphabetic 5)
(random.list 5 (random.alphabetic 5))
(do [! random.monad]
- [year (at ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
- month (at ! each (|>> (n.% 12) (n.+ 1)) random.nat)
- day_of_month (at ! each (|>> (n.% 28) (n.+ 1)) random.nat)
- hour (at ! each (n.% 24) random.nat)
- minute (at ! each (n.% 60) random.nat)
- second (at ! each (n.% 60) random.nat)]
+ [year (of ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
+ month (of ! each (|>> (n.% 12) (n.+ 1)) random.nat)
+ day_of_month (of ! each (|>> (n.% 28) (n.+ 1)) random.nat)
+ hour (of ! each (n.% 24) random.nat)
+ minute (of ! each (n.% 60) random.nat)
+ second (of ! each (n.% 60) random.nat)]
(in (try.trusted
(do try.monad
[year (year.year year)
@@ -93,7 +93,7 @@
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
(_.coverage [/.uri]
(text#= (//.remote_project_uri artifact)
@@ -102,7 +102,7 @@
[home (random.lower_cased 5)
working_directory (random.lower_cased 5)
.let [program (program.async (program.mock environment.empty home working_directory))
- fs (file.mock (at file.default separator))
+ fs (file.mock (of file.default separator))
repository (///repository/local.repository program fs)]]
(in (do async.monad
[wrote? (/.write repository artifact expected)
@@ -113,7 +113,7 @@
{try.#Failure _} false)
(when actual
{try.#Success actual}
- (at /.equivalence = expected actual)
+ (of /.equivalence = expected actual)
{try.#Failure _}
false))))))
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index 30a8b0311..d8c1bbf92 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -56,12 +56,12 @@
(def random_instant
(Random Instant)
(do [! random.monad]
- [year (at ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
- month (at ! each (|>> (n.% 12) (n.+ 1)) random.nat)
- day_of_month (at ! each (|>> (n.% 28) (n.+ 1)) random.nat)
- hour (at ! each (n.% 24) random.nat)
- minute (at ! each (n.% 60) random.nat)
- second (at ! each (n.% 60) random.nat)]
+ [year (of ! each (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat)
+ month (of ! each (|>> (n.% 12) (n.+ 1)) random.nat)
+ day_of_month (of ! each (|>> (n.% 28) (n.+ 1)) random.nat)
+ hour (of ! each (n.% 24) random.nat)
+ minute (of ! each (n.% 60) random.nat)
+ second (of ! each (n.% 60) random.nat)]
(in (try.trusted
(do try.monad
[year (year.year year)
@@ -105,7 +105,7 @@
/.format
list
(<xml>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.uri]
(text#= (//.remote_artifact_uri artifact)
@@ -114,7 +114,7 @@
[home (random.lower_cased 5)
working_directory (random.lower_cased 5)
.let [program (program.async (program.mock environment.empty home working_directory))
- fs (file.mock (at file.default separator))
+ fs (file.mock (of file.default separator))
repository (///repository/local.repository program fs)]]
(in (do async.monad
[wrote? (/.write repository artifact expected)
@@ -125,7 +125,7 @@
{try.#Failure _} false)
(when actual
{try.#Success actual}
- (at /.equivalence = expected actual)
+ (of /.equivalence = expected actual)
{try.#Failure _}
false))))))
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index fd8a2c372..8f335b753 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -44,7 +44,7 @@
(def .public random
(Random [//.Profile /.Package])
(do [! random.monad]
- [content_size (at ! each (n.% 100) random.nat)
+ [content_size (of ! each (n.% 100) random.nat)
content ($binary.random content_size)
[profile pom] (random.one (function (_ profile)
(try.maybe
@@ -62,7 +62,7 @@
[[profile package] ..random]
(all _.and
(_.for [/.equivalence]
- ($equivalence.spec /.equivalence (at ! each product.right ..random)))
+ ($equivalence.spec /.equivalence (of ! each product.right ..random)))
(_.coverage [/.local?]
(/.local? (has /.#origin {//origin.#Local "~/yolo"} package)))
@@ -93,9 +93,9 @@
expected_md5 (//hash.md5 binary_pom)]
(and (same? expected_pom actual_pom)
(|> (do try.monad
- [xml_pom (at utf8.codec decoded binary_pom)
- decoded_pom (at xml.codec decoded xml_pom)]
- (in (at xml.equivalence = actual_pom decoded_pom)))
+ [xml_pom (of utf8.codec decoded binary_pom)
+ decoded_pom (of xml.codec decoded xml_pom)]
+ (in (of xml.equivalence = actual_pom decoded_pom)))
(try.else false))
(when pom_status
{//status.#Verified actual_sha1 expected_md5}
@@ -108,7 +108,7 @@
(let [expected (the //.#dependencies profile)]
(when (/.dependencies package)
{try.#Success actual}
- (at set.equivalence = expected actual)
+ (of set.equivalence = expected actual)
{try.#Failure error}
false)))
@@ -116,7 +116,7 @@
(let [expected (the //.#repositories profile)]
(when (/.repositories package)
{try.#Success actual}
- (at set.equivalence = expected actual)
+ (of set.equivalence = expected actual)
{try.#Failure error}
false)))
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index cbc67dbab..2fb1ec812 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -40,12 +40,12 @@
(def (list_of random)
(All (_ a) (-> (Random a) (Random (List a))))
(do [! random.monad]
- [size (at ! each (|>> (n.% 5) ++) random.nat)]
+ [size (of ! each (|>> (n.% 5) ++) random.nat)]
(random.list size random)))
(def (dictionary_of key_hash key_random value_random)
(All (_ k v) (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v))))
- (at random.functor each
+ (of random.functor each
(dictionary.of_list key_hash)
(..list_of (random.and key_random value_random))))
@@ -69,7 +69,7 @@
(def (with_empty_profile project)
(-> Project Project)
(if (dictionary.empty? project)
- (//project.project //.default (at //.monoid identity))
+ (//project.project //.default (of //.monoid identity))
project))
(def with_defaults
@@ -94,6 +94,6 @@
//format.project
list
(<code>.result /.project)
- (try#each (at //project.equivalence = (..with_defaults expected)))
+ (try#each (of //project.equivalence = (..with_defaults expected)))
(try.else false)
)))))
diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux
index 0484599e0..5133b79b4 100644
--- a/stdlib/source/test/aedifex/pom.lux
+++ b/stdlib/source/test/aedifex/pom.lux
@@ -40,8 +40,8 @@
{.#Some _}]
(when (<xml>.result /.parser (list pom))
{try.#Success actual}
- (at //.equivalence =
- (|> (at //.monoid identity)
+ (of //.equivalence =
+ (|> (of //.monoid identity)
(has //.#dependencies (the //.#dependencies expected))
(has //.#repositories (the //.#repositories expected)))
actual)
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index 25eccfa43..591ad4d5d 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -80,18 +80,18 @@
(def (list_of random)
(All (_ a) (-> (Random a) (Random (List a))))
(do [! random.monad]
- [size (at ! each (n.% 5) random.nat)]
+ [size (of ! each (n.% 5) random.nat)]
(random.list size random)))
(def (set_of hash random)
(All (_ a) (-> (Hash a) (Random a) (Random (Set a))))
- (at random.functor each
+ (of random.functor each
(set.of_list hash)
(..list_of random)))
(def (dictionary_of key_hash key_random value_random)
(All (_ k v) (-> (Hash k) (Random k) (Random v) (Random (Dictionary k v))))
- (at random.functor each
+ (of random.functor each
(dictionary.of_list key_hash)
(..list_of (random.and key_random value_random))))
@@ -167,11 +167,11 @@
(_.coverage [/.default]
(text#= "" /.default))
(_.coverage [/.default_lux]
- (|> (at /.monoid identity)
+ (|> (of /.monoid identity)
(the /.#lux)
(same? /.default_lux)))
(_.coverage [/.default_target]
- (|> (at /.monoid identity)
+ (|> (of /.monoid identity)
(the /.#target)
(same? /.default_target)))
)))))
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index 29f8b1215..decc5007d 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -64,24 +64,24 @@
(not (text#= dummy_name name))
(not (text#= sub_name name))))
(random.alphabetic 1))
- .let [project (all (at /.monoid composite)
+ .let [project (all (of /.monoid composite)
(/.project super_name super_profile)
(/.project dummy_name dummy_profile)
(/.project sub_name (has //.#parents (list super_name) sub_profile)))
- circular (all (at /.monoid composite)
+ circular (all (of /.monoid composite)
(/.project super_name (has //.#parents (list sub_name) super_profile))
(/.project dummy_name dummy_profile)
(/.project sub_name (has //.#parents (list super_name) sub_profile)))]]
(all _.and
(_.coverage [/.profile]
(and (|> (/.profile project super_name)
- (try#each (at //.equivalence = super_profile))
+ (try#each (of //.equivalence = super_profile))
(try.else false))
(|> (/.profile project dummy_name)
- (try#each (at //.equivalence = dummy_profile))
+ (try#each (of //.equivalence = dummy_profile))
(try.else false))
(|> (/.profile project sub_name)
- (try#each (at //.equivalence = (at //.monoid composite sub_profile super_profile)))
+ (try#each (of //.equivalence = (of //.monoid composite sub_profile super_profile)))
(try.else false))))
(_.coverage [/.unknown_profile]
(when (/.profile project fake_name)
diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux
index 7edaa1353..a1ca0ee80 100644
--- a/stdlib/source/test/aedifex/repository/local.lux
+++ b/stdlib/source/test/aedifex/repository/local.lux
@@ -37,13 +37,13 @@
repo (/.repository program fs)]
uri (random.lower_cased 10)
- expected (at ! each (at utf8.codec encoded)
+ expected (of ! each (of utf8.codec encoded)
(random.lower_cased 10))]
(all _.and
(in (do async.monad
- [before_upload (at repo download uri)
- _ (at repo upload uri expected)
- actual (at repo download uri)]
+ [before_upload (of repo download uri)
+ _ (of repo upload uri expected)
+ actual (of repo download uri)]
(unit.coverage [/.repository]
(and (when before_upload
{try.#Success _} false
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index 4540ee5eb..03a1c1277 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -34,7 +34,7 @@
(def (url_body url)
(-> URL (@http.Body IO))
- (let [url (at utf8.codec encoded url)]
+ (let [url (of utf8.codec encoded url)]
(function (_ _)
(io.io {try.#Success [(binary.size url) url]}))))
@@ -91,7 +91,7 @@
user (random.lower_cased 10)
password (random.lower_cased 10)
- content (at ! each (at utf8.codec encoded)
+ content (of ! each (of utf8.codec encoded)
(random.lower_cased 10))]
(all _.and
(_.coverage [/.repository /.user_agent /.Address]
@@ -99,13 +99,13 @@
{.#Some [//identity.#user user
//identity.#password password]}
address)]
- (and (|> (at repo download uri)
+ (and (|> (of repo download uri)
io.run!
- (try#each (at utf8.codec decoded))
+ (try#each (of utf8.codec decoded))
try#conjoint
(try#each (text#= (format address uri)))
(try.else false))
- (|> (at repo upload uri content)
+ (|> (of repo upload uri content)
io.run!
(try#each (function.constant true))
(try.else false)))))
@@ -113,7 +113,7 @@
(let [repo (/.repository (..good_http user password)
{.#None}
address)]
- (when (io.run! (at repo upload uri content))
+ (when (io.run! (of repo upload uri content))
{try.#Failure error}
(exception.match? /.upload_failure error)
@@ -123,7 +123,7 @@
(let [repo (/.repository ..bad_http
{.#None}
address)]
- (when (io.run! (at repo download uri))
+ (when (io.run! (of repo download uri))
{try.#Failure error}
(exception.match? /.download_failure error)
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index c86ef4fe0..068727e9f 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -196,14 +196,14 @@
(_.for [/.Interface]
(all _.and
(_.coverage [/.implementation]
- (n.= expected (at local_returner return [])))
+ (n.= expected (of local_returner return [])))
(_.coverage [/.use]
(n.= static_return (global#return [])))
(_.coverage [/.open]
(let [(/.open "local#[0]") local_returner]
(n.= expected (local#return []))))
- (_.coverage [/.at]
- (n.= expected (/.at local_returner return [])))
+ (_.coverage [/.of]
+ (n.= expected (/.of local_returner return [])))
))))
(def for_module
@@ -335,7 +335,7 @@
(def for_code
Test
(do [! random.monad]
- [example (at ! each code.nat random.nat)
+ [example (of ! each code.nat random.nat)
example_bit random.bit
example_nat random.nat
example_int random.int]
@@ -404,7 +404,7 @@
(def identity_macro
(/.macro (_ tokens)
- (at meta.monad in tokens)))
+ (of meta.monad in tokens)))
(def crosshair
"This is an arbitrary text whose only purpose is to be found, somewhere, in the source-code.")
@@ -564,7 +564,7 @@
expected_left random.nat
expected_right random.nat
- .let [existential_type (at ! each (|>> {.#Ex}) random.nat)]
+ .let [existential_type (of ! each (|>> {.#Ex}) random.nat)]
expected/0 existential_type
expected/1 existential_type]
(<| (_.for [/.Type])
@@ -980,8 +980,8 @@
(def for_when
Test
(do [! random.monad]
- [expected_nat (at ! each (n.% 1) random.nat)
- expected_int (at ! each (i.% +1) random.int)
+ [expected_nat (of ! each (n.% 1) random.nat)
+ expected_int (of ! each (i.% +1) random.int)
expected_rev (random.either (in .5)
(in .25))
expected_frac (random.either (in +0.5)
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux
index 8544e5de6..1f315c131 100644
--- a/stdlib/source/test/lux/abstract/apply.lux
+++ b/stdlib/source/test/lux/abstract/apply.lux
@@ -26,7 +26,7 @@
(all _.and
(_.coverage [/.composite]
(let [expected (n.+ left right)]
- (when (at (/.composite maybe.monad maybe.apply list.apply) on
+ (when (of (/.composite maybe.monad maybe.apply list.apply) on
{.#Some (list right)}
{.#Some (list (n.+ left))})
{.#Some (list actual)}
diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/codec.lux
index 3f07c30cb..acd95096a 100644
--- a/stdlib/source/test/lux/abstract/codec.lux
+++ b/stdlib/source/test/lux/abstract/codec.lux
@@ -40,7 +40,7 @@
[expected random.bit]
(<| (_.covering /._)
(_.coverage [/.composite]
- (when (|> expected (at ..codec encoded) (at ..codec decoded))
+ (when (|> expected (of ..codec encoded) (of ..codec decoded))
{try.#Success actual}
(bit#= expected actual)
diff --git a/stdlib/source/test/lux/abstract/comonad/free.lux b/stdlib/source/test/lux/abstract/comonad/free.lux
index f089b2231..bd7c6df5d 100644
--- a/stdlib/source/test/lux/abstract/comonad/free.lux
+++ b/stdlib/source/test/lux/abstract/comonad/free.lux
@@ -27,14 +27,14 @@
(def (interpret [head tail])
(All (_ a) (-> (/.Free Stream a) (Stream a)))
(|> tail
- (stream#each (at (/.comonad stream.functor) out))
+ (stream#each (of (/.comonad stream.functor) out))
[head]
//.pending))
(def comparison
(Comparison (/.Free Stream))
(function (_ == left right)
- (at (list.equivalence ==) =
+ (of (list.equivalence ==) =
(stream.first 100 (..interpret left))
(stream.first 100 (..interpret right)))))
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index 0f575f3e6..916dc04d0 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -21,7 +21,7 @@
(def .public test
Test
(let [limit (is (Random Nat)
- (at random.monad each (n.% 20) random.nat))]
+ (of random.monad each (n.% 20) random.nat))]
(do random.monad
[start limit
end limit
@@ -35,14 +35,14 @@
(let [expected_size (|> end (n.- start) ++)
expected_start? (|> range list.head (maybe#each (n.= start)) (maybe.else false))
expected_end? (|> range list.last (maybe#each (n.= end)) (maybe.else false))
- can_be_backwards? (at (list.equivalence n.equivalence) =
+ can_be_backwards? (of (list.equivalence n.equivalence) =
(/.range n.enum start end)
(list.reversed (/.range n.enum end start)))
every_element_is_a_successor? (when range
{.#Item head tail}
(|> (list#mix (function (_ next [verdict prev])
[(and verdict
- (n.= next (at n.enum succ prev)))
+ (n.= next (of n.enum succ prev)))
next])
[true head]
tail)
diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux
index 0689009f6..c14a1cb26 100644
--- a/stdlib/source/test/lux/abstract/equivalence.lux
+++ b/stdlib/source/test/lux/abstract/equivalence.lux
@@ -61,8 +61,8 @@
(def random
(Random Record)
(do [! random.monad]
- [size (at ! each (n.% 2) random.nat)
- .let [gen_int (|> random.int (at ! each (|>> i.abs (i.% +1,000,000))))]]
+ [size (of ! each (n.% 2) random.nat)
+ .let [gen_int (|> random.int (of ! each (|>> i.abs (i.% +1,000,000))))]]
(all random.and
random.bit
gen_int
@@ -104,12 +104,12 @@
.let [equivalence (is (Equivalence (Equivalence Nat))
(implementation
(def (= left right)
- (and (bit#= (at left = leftN leftN)
- (at right = leftN leftN))
- (bit#= (at left = rightN rightN)
- (at right = rightN rightN))
- (bit#= (at left = leftN rightN)
- (at right = leftN rightN))))))]]
+ (and (bit#= (of left = leftN leftN)
+ (of right = leftN leftN))
+ (bit#= (of left = rightN rightN)
+ (of right = rightN rightN))
+ (bit#= (of left = leftN rightN)
+ (of right = leftN rightN))))))]]
(<| (_.covering /._)
(all _.and
(_.for [/.functor]
@@ -125,13 +125,13 @@
[{.#Item leftH lefT} {.#Item rightH rightT}]
(and (n.= leftH rightH)
- (at equivalence = lefT rightT))
+ (of equivalence = lefT rightT))
_
false))))))]
- (and (at equivalence = (list sample sample) (list sample sample))
- (not (at equivalence = (list sample sample) (list sample)))
- (not (at equivalence = (list sample sample) (list different different))))))
+ (and (of equivalence = (list sample sample) (list sample sample))
+ (not (of equivalence = (list sample sample) (list sample)))
+ (not (of equivalence = (list sample sample) (list different different))))))
..\\polytypic
))))
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index b3eee1741..99e8ac055 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -54,7 +54,7 @@
(<| (_.covering /._)
(all _.and
(_.coverage [/.Or /.sum]
- (and (when (at (/.sum maybe.functor list.functor) each
+ (and (when (of (/.sum maybe.functor list.functor) each
(n.+ shift)
{.#Left {.#Some left}})
{.#Left {.#Some actual}}
@@ -62,7 +62,7 @@
_
false)
- (when (at (/.sum maybe.functor list.functor) each
+ (when (of (/.sum maybe.functor list.functor) each
(n.+ shift)
{.#Right (list right)})
{.#Right (list actual)}
@@ -71,7 +71,7 @@
_
false)))
(_.coverage [/.And /.product]
- (when (at (/.product maybe.functor list.functor) each
+ (when (of (/.product maybe.functor list.functor) each
(n.+ shift)
[{.#Some left} (list right)])
[{.#Some actualL} (list actualR)]
@@ -81,7 +81,7 @@
_
false))
(_.coverage [/.Then /.composite]
- (when (at (/.composite maybe.functor list.functor) each
+ (when (of (/.composite maybe.functor list.functor) each
(n.+ shift)
{.#Some (list left)})
{.#Some (list actual)}
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index 9f43008b2..55f97f711 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -140,7 +140,7 @@
Test
(do [! random.monad]
[[l m r] (|> (random.set n.hash 3 random.nat)
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(list.sorted n.<)
(pipe.when
(list b t1 t2)
@@ -163,7 +163,7 @@
Test
(do [! random.monad]
[[b t1 t2] (|> (random.set n.hash 3 random.nat)
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(list.sorted n.<)
(pipe.when
(list b t1 t2)
@@ -191,7 +191,7 @@
(do [! random.monad]
[some_interval ..interval
[x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat)
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(list.sorted n.<)
(pipe.when
(list x0 x1 x2 x3)
@@ -225,7 +225,7 @@
(do [! random.monad]
[some_interval ..interval
[x0 x1 x2 x3] (|> (random.set n.hash 4 random.nat)
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(list.sorted n.<)
(pipe.when
(list x0 x1 x2 x3)
diff --git a/stdlib/source/test/lux/abstract/mix.lux b/stdlib/source/test/lux/abstract/mix.lux
index 967aaefce..ccf941a83 100644
--- a/stdlib/source/test/lux/abstract/mix.lux
+++ b/stdlib/source/test/lux/abstract/mix.lux
@@ -22,6 +22,6 @@
(<| (_.covering /._)
(all _.and
(_.coverage [/.with_monoid]
- (n.= (at list.mix mix (at n.addition composite) (at n.addition identity) samples)
+ (n.= (of list.mix mix (of n.addition composite) (of n.addition identity) samples)
(/.with_monoid n.addition list.mix samples)))
))))
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index f0ff7096c..e35a07a2a 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -34,34 +34,34 @@
(n.= (++ mono)
(is (Identity Nat)
(/.then identity.monad
- (|>> ++ (at identity.monad in))
- (at identity.monad in mono)))))
+ (|>> ++ (of identity.monad in))
+ (of identity.monad in mono)))))
(_.coverage [/.all]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list#each ++ poly)
(|> poly
- (list#each (|>> ++ (at identity.monad in)))
+ (list#each (|>> ++ (of identity.monad in)))
(is (List (Identity Nat)))
(/.all identity.monad)
(is (Identity (List Nat))))))
(_.coverage [/.each]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list#each ++ poly)
(|> poly
- (/.each identity.monad (|>> ++ (at identity.monad in)))
+ (/.each identity.monad (|>> ++ (of identity.monad in)))
(is (Identity (List Nat))))))
(_.coverage [/.only]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.only n.even? poly)
(|> poly
- (/.only identity.monad (|>> n.even? (at identity.monad in)))
+ (/.only identity.monad (|>> n.even? (of identity.monad in)))
(is (Identity (List Nat))))))
(_.coverage [/.mix]
(n.= (list#mix n.+ 0 poly)
(|> poly
(/.mix identity.monad
(function (_ part whole)
- (at identity.monad in
+ (of identity.monad in
(n.+ part whole)))
0)
(is (Identity Nat)))))
diff --git a/stdlib/source/test/lux/abstract/monad/free.lux b/stdlib/source/test/lux/abstract/monad/free.lux
index 46fd74651..26b035c75 100644
--- a/stdlib/source/test/lux/abstract/monad/free.lux
+++ b/stdlib/source/test/lux/abstract/monad/free.lux
@@ -37,7 +37,7 @@
(def comparison
(Comparison (/.Free List))
(function (_ == left right)
- (at (list.equivalence ==) =
+ (of (list.equivalence ==) =
(..interpret left)
(..interpret right))))
diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux
index 64dab2919..7708be235 100644
--- a/stdlib/source/test/lux/abstract/monoid.lux
+++ b/stdlib/source/test/lux/abstract/monoid.lux
@@ -25,10 +25,10 @@
(<| (_.covering /._)
(all _.and
(_.coverage [/.and]
- (let [[natLR intLR] (at (/.and nat.addition int.multiplication) composite
+ (let [[natLR intLR] (of (/.and nat.addition int.multiplication) composite
[natL intL] [natR intR])]
- (and (nat.= (at nat.addition composite natL natR)
+ (and (nat.= (of nat.addition composite natL natR)
natLR)
- (int.= (at int.multiplication composite intL intR)
+ (int.= (of int.multiplication composite intL intR)
intLR))))
))))
diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux
index e340a58d6..d1ccd5b7d 100644
--- a/stdlib/source/test/lux/abstract/order.lux
+++ b/stdlib/source/test/lux/abstract/order.lux
@@ -28,12 +28,12 @@
.let [equivalence (is (Equivalence (/.Order Nat))
(implementation
(def (= leftO rightO)
- (and (bit#= (at leftO < left left)
- (at rightO < left left))
- (bit#= (at leftO < right right)
- (at rightO < right right))
- (bit#= (at leftO < left right)
- (at rightO < left right))))))]])
+ (and (bit#= (of leftO < left left)
+ (of rightO < left left))
+ (bit#= (of leftO < right right)
+ (of rightO < right right))
+ (bit#= (of leftO < left right)
+ (of rightO < left right))))))]])
(all _.and
(_.for [/.functor]
($contravariant.spec equivalence n.order /.functor))
@@ -46,7 +46,7 @@
(_.coverage [/.<=]
(and (/.<= n.order left left)
(/.<= n.order right right)
- (bit#= (at n.order < left right)
+ (bit#= (of n.order < left right)
(/.<= n.order left right))))
(_.coverage [/.>=]
(and (/.>= n.order left left)
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index 63ffc3740..7c4342f0a 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -173,9 +173,9 @@
false))))
(do !
- [num_events (at ! each (|>> (n.% 10) ++) random.nat)
+ [num_events (of ! each (|>> (n.% 10) ++) random.nat)
events (random.list num_events random.nat)
- num_observations (at ! each (n.% num_events) random.nat)
+ num_observations (of ! each (n.% num_events) random.nat)
.let [expected (list.first num_observations events)
sink (is (Atom (Sequence Nat))
(atom.atom sequence.empty))]]
@@ -199,7 +199,7 @@
_ (/.obituary agent)
actual (async.future (atom.read! sink))]
(unit.coverage [/.Stop /.observe! /.obituary]
- (at (list.equivalence n.equivalence) = expected (sequence.list actual))))))
+ (of (list.equivalence n.equivalence) = expected (sequence.list actual))))))
(in (do async.monad
[actor (async.future (/.spawn! /.default initial_state))
actual (/.request! /.state actor)]
diff --git a/stdlib/source/test/lux/control/concurrency/async.lux b/stdlib/source/test/lux/control/concurrency/async.lux
index 36aba9dfd..1dd85aaaa 100644
--- a/stdlib/source/test/lux/control/concurrency/async.lux
+++ b/stdlib/source/test/lux/control/concurrency/async.lux
@@ -56,7 +56,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [waiting_time (|> random.nat (at ! each (|>> (n.% ..delay) (n.+ ..delay))))
+ [waiting_time (|> random.nat (of ! each (|>> (n.% ..delay) (n.+ ..delay))))
expected random.nat
dummy random.nat
.let [not_dummy (|> random.nat (random.only (|>> (n.= dummy) not)))]
diff --git a/stdlib/source/test/lux/control/concurrency/behavioral.lux b/stdlib/source/test/lux/control/concurrency/behavioral.lux
index 6728ad266..54763d640 100644
--- a/stdlib/source/test/lux/control/concurrency/behavioral.lux
+++ b/stdlib/source/test/lux/control/concurrency/behavioral.lux
@@ -71,10 +71,10 @@
[[old new] (async.future (atom.update! (n.- shift) counter))]
(in new))))]
(do async.monad
- [_ (async.future (at feed! feed (increase [])))
- _ (async.future (at feed! feed (increase [])))
- _ (async.future (at feed! feed (decrease [])))
- _ (async.future (at feed! close))
+ [_ (async.future (of feed! feed (increase [])))
+ _ (async.future (of feed! feed (increase [])))
+ _ (async.future (of feed! feed (decrease [])))
+ _ (async.future (of feed! close))
scenario/+ scenario/+
scenario/- scenario/-
count (async.future (atom.read! counter))]
diff --git a/stdlib/source/test/lux/control/concurrency/csp.lux b/stdlib/source/test/lux/control/concurrency/csp.lux
index 5bf53cb96..502648def 100644
--- a/stdlib/source/test/lux/control/concurrency/csp.lux
+++ b/stdlib/source/test/lux/control/concurrency/csp.lux
@@ -22,7 +22,7 @@
(def injection
(Injection /.Process)
- (at /.monad in))
+ (of /.monad in))
(def comparison
(Comparison /.Process)
diff --git a/stdlib/source/test/lux/control/concurrency/event.lux b/stdlib/source/test/lux/control/concurrency/event.lux
index 966c340fa..5d6fad758 100644
--- a/stdlib/source/test/lux/control/concurrency/event.lux
+++ b/stdlib/source/test/lux/control/concurrency/event.lux
@@ -25,9 +25,9 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [loop_name (at ! each %.nat random.nat)
- error (at ! each %.nat random.nat)
- expected_events (at ! each (n.% 10) random.nat)]
+ [loop_name (of ! each %.nat random.nat)
+ error (of ! each %.nat random.nat)
+ expected_events (of ! each (n.% 10) random.nat)]
(all _.and
(_.coverage [/.loop]
(and (let [[schedule! run!] (/.loop loop_name)]
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 16cae30d8..edfcc24aa 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -52,7 +52,7 @@
(All (_ a) (-> Nat [(/.Channel a) (/.Sink a)] (Async (List a))))
(when amount_of_polls
0 (do async.monad
- [_ (async.future (at sink close))]
+ [_ (async.future (of sink close))]
(in {.#End}))
_ (do [! async.monad]
[event channel]
@@ -61,7 +61,7 @@
(in {.#End})
{.#Some [head tail]}
- (at ! each (|>> {.#Item head})
+ (of ! each (|>> {.#Item head})
(take_amount (-- amount_of_polls) [channel sink]))))))
(def .public test
@@ -90,8 +90,8 @@
(do (try.with io.monad)
[.let [[channel sink] (is [(/.Channel Nat) (/.Sink Nat)]
(/.channel []))]
- _ (at sink feed sample)
- _ (at sink close)]
+ _ (of sink feed sample)
+ _ (of sink close)]
(in channel)))
{try.#Success channel}
(io.run!
@@ -111,8 +111,8 @@
(do (try.with io.monad)
[.let [[channel sink] (is [(/.Channel Nat) (/.Sink Nat)]
(/.channel []))]
- _ (at sink close)]
- (at sink feed sample)))
+ _ (of sink close)]
+ (of sink feed sample)))
{try.#Success _}
false
@@ -161,7 +161,7 @@
listened (|> sink
atom.read!
async.future
- (at ! each sequence.list))]
+ (of ! each sequence.list))]
(unit.coverage [/.Subscriber /.subscribe!]
(list#= inputs listened))))
(in (do async.monad
@@ -193,8 +193,8 @@
(list#= (list distinct/0 distinct/1 distinct/2)
actual))))
(do !
- [polling_delay (at ! each (|>> (n.% 10) ++) random.nat)
- amount_of_polls (at ! each (|>> (n.% 10) ++) random.nat)]
+ [polling_delay (of ! each (|>> (n.% 10) ++) random.nat)
+ amount_of_polls (of ! each (|>> (n.% 10) ++) random.nat)]
(all _.and
(in (do [! async.monad]
[actual (..take_amount amount_of_polls (/.poll polling_delay (is (IO Nat) (io.io sample))))
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index 54143c345..c14ddba68 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -41,7 +41,7 @@
(_.for [/.Semaphore]
(all _.and
(do [! random.monad]
- [initial_open_positions (|> random.nat (at ! each (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (of ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
[result (async.within ..delay (/.wait! semaphore))]
@@ -53,7 +53,7 @@
{.#None}
false)))))
(do [! random.monad]
- [initial_open_positions (|> random.nat (at ! each (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (of ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do [! async.monad]
[_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
@@ -66,7 +66,7 @@
{.#None}
true)))))
(do [! random.monad]
- [initial_open_positions (|> random.nat (at ! each (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (of ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do [! async.monad]
[_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
@@ -82,7 +82,7 @@
_
false)))))
(do [! random.monad]
- [initial_open_positions (|> random.nat (at ! each (|>> (n.% 10) (n.max 1))))
+ [initial_open_positions (|> random.nat (of ! each (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
[outcome (/.signal! semaphore)]
@@ -100,7 +100,7 @@
(_.for [/.Mutex]
(all _.and
(do [! random.monad]
- [repetitions (|> random.nat (at ! each (|>> (n.% 100) (n.max 10))))
+ [repetitions (|> random.nat (of ! each (|>> (n.% 100) (n.max 10))))
.let [resource (atom.atom "")
expected_As (text.together (list.repeated repetitions "A"))
expected_Bs (text.together (list.repeated repetitions "B"))
@@ -157,7 +157,7 @@
_
false)))
(do [! random.monad]
- [limit (at ! each (|>> (n.% 9) ++) random.nat)
+ [limit (of ! each (|>> (n.% 9) ++) random.nat)
.let [barrier (/.barrier (maybe.trusted (/.limit limit)))
resource (atom.atom "")]]
(in (do [! async.monad]
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index 76fd26dc3..e39ff2ec8 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -29,7 +29,7 @@
(def injection
(Injection /.STM)
- (at /.monad in))
+ (of /.monad in))
(def comparison
(Comparison /.STM)
@@ -43,7 +43,7 @@
(do [! random.monad]
[dummy random.nat
expected random.nat
- iterations_per_process (|> random.nat (at ! each (n.% 100)))]
+ iterations_per_process (|> random.nat (of ! each (n.% 100)))]
(all _.and
(_.for [/.functor]
($functor.spec ..injection ..comparison /.functor))
@@ -53,7 +53,7 @@
($monad.spec ..injection ..comparison /.monad))
(in (do async.monad
- [actual (/.commit! (at /.monad in expected))]
+ [actual (/.commit! (of /.monad in expected))]
(unit.coverage [/.commit!]
(n.= expected actual))))
(in (do async.monad
@@ -86,11 +86,11 @@
[follower sink] (io.run! (/.changes box))]
_ (/.commit! (/.write expected box))
_ (/.commit! (/.update (n.* 2) box))
- _ (async.future (at sink close))
+ _ (async.future (of sink close))
_ (/.commit! (/.update (n.* 3) box))
changes (frp.list follower)]
(unit.coverage [/.changes]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list expected (n.* 2 expected))
changes))))
(in (let [var (/.var 0)]
diff --git a/stdlib/source/test/lux/control/concurrency/structured.lux b/stdlib/source/test/lux/control/concurrency/structured.lux
index cd42dd4f0..2af3d8550 100644
--- a/stdlib/source/test/lux/control/concurrency/structured.lux
+++ b/stdlib/source/test/lux/control/concurrency/structured.lux
@@ -28,7 +28,7 @@
(def injection
(Injection /.Async)
- (at /.monad in))
+ (of /.monad in))
(def comparison
(Comparison /.Async)
@@ -62,12 +62,12 @@
(def .public test
Test
(do [! random.monad]
- [short (at ! each (|>> (n.% 10) ++) random.nat)
- long (at ! each (|>> (n.% 2) ++ (n.* 50)) random.nat)
+ [short (of ! each (|>> (n.% 10) ++) random.nat)
+ long (of ! each (|>> (n.% 2) ++ (n.* 50)) random.nat)
leftE random.nat
rightE random.nat
- in_parallel (at ! each (|>> (n.% 10) (n.+ 2)) random.nat)]
+ in_parallel (of ! each (|>> (n.% 10) (n.+ 2)) random.nat)]
(<| (_.covering /._)
(_.for [/.Async])
(all _.and
@@ -78,7 +78,7 @@
(in (do async.monad
[leftA (<| /.async
- (at /.monad in leftE))]
+ (of /.monad in leftE))]
(unit.coverage [/.async]
(|> leftA
(maybe#each (same? leftE))
@@ -145,7 +145,7 @@
(function (_ scope))
(/.schedule! scope long (function (_ _) (io#in {.#Some []})))))))
(_.coverage [/.completed?]
- (io.run! (/.completed? (at /.monad in []))))
+ (io.run! (/.completed? (of /.monad in []))))
(in (do async.monad
[.let [[done? done!] (is [(async.Async Bit) (async.Resolver Bit)]
(async.async []))
@@ -209,7 +209,7 @@
(/.schedule! scope long (function (_ _) (io#in {.#Some leftE}))))]
(do !
[_ (async.future (/.cancel! left))]
- (/.async (/.or left (at /.monad in rightE)))))]
+ (/.async (/.or left (of /.monad in rightE)))))]
(unit.coverage [/.or]
(when [left right]
[{.#Some {.#Left leftA}}
@@ -227,7 +227,7 @@
(/.schedule! scope long (function (_ _) (io#in {.#Some leftE}))))]
(do !
[_ (async.future (/.cancel! left))]
- (/.async (/.either left (at /.monad in rightE)))))]
+ (/.async (/.either left (of /.monad in rightE)))))]
(unit.coverage [/.either]
(when [left right]
[{.#Some leftA}
diff --git a/stdlib/source/test/lux/control/concurrency/thread.lux b/stdlib/source/test/lux/control/concurrency/thread.lux
index 8b2280e69..666ed5f03 100644
--- a/stdlib/source/test/lux/control/concurrency/thread.lux
+++ b/stdlib/source/test/lux/control/concurrency/thread.lux
@@ -29,7 +29,7 @@
(do [! random.monad]
[dummy random.nat
expected random.nat
- delay (at ! each (|>> (n.% 5) (n.+ 5))
+ delay (of ! each (|>> (n.% 5) (n.+ 5))
random.nat)]
(all _.and
(_.coverage [/.parallelism]
diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux
index 164dfa9bf..434b2eae0 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -31,7 +31,7 @@
[expected random.nat
wrong (|> random.nat (random.only (|>> (n.= expected) not)))
assertion_succeeded? random.bit
- .let [report_element (at ! each %.nat random.nat)]
+ .let [report_element (of ! each %.nat random.nat)]
field0 report_element
value0 report_element
field1 report_element
diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux
index fe8c69b07..c237e701a 100644
--- a/stdlib/source/test/lux/control/function.lux
+++ b/stdlib/source/test/lux/control/function.lux
@@ -33,8 +33,8 @@
Test
(do [! random.monad]
[expected random.nat
- f0 (at ! each n.+ random.nat)
- f1 (at ! each n.* random.nat)
+ f0 (of ! each n.+ random.nat)
+ f1 (of ! each n.* random.nat)
dummy random.nat
extra (|> random.nat (random.only (|>> (n.= expected) not)))]
(<| (_.covering /._)
@@ -45,7 +45,7 @@
(n.= (left extra)
(right extra)))))
generator (is (Random (-> Nat Nat))
- (at ! each n.- random.nat))]
+ (of ! each n.- random.nat))]
(_.for [/.monoid]
($monoid.spec equivalence /.monoid generator)))
diff --git a/stdlib/source/test/lux/control/function/inline.lux b/stdlib/source/test/lux/control/function/inline.lux
index d1cfd756e..6f76e1c53 100644
--- a/stdlib/source/test/lux/control/function/inline.lux
+++ b/stdlib/source/test/lux/control/function/inline.lux
@@ -25,7 +25,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [.let [measurement (at ! each (i.% +1000) random.int)]
+ [.let [measurement (of ! each (i.% +1000) random.int)]
m0 measurement
m1 measurement])
(all _.and
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index 8c024ff60..8c0889273 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -63,7 +63,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [input (|> random.nat (at ! each (|>> (n.% 5) (n.+ 21))))])
+ [input (|> random.nat (of ! each (|>> (n.% 5) (n.+ 21))))])
(_.for [/.Memo])
(all _.and
(_.coverage [/.closed /.none]
@@ -111,7 +111,7 @@
(is (//.Mixin Nat (State (Dictionary Nat Nat) Nat))
(function (factorial delegate again input)
(when input
- (^.or 0 1) (at state.monad in 1)
+ (^.or 0 1) (of state.monad in 1)
_ (do state.monad
[output' (again (-- input))]
(in (n.* input output')))))))
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index 9d403e17d..04772297f 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -30,7 +30,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [input (|> random.nat (at ! each (|>> (n.% 6) (n.+ 20))))
+ [input (|> random.nat (of ! each (|>> (n.% 6) (n.+ 20))))
dummy random.nat
shift (|> random.nat (random.only (|>> (n.= dummy) not)))
.let [equivalence (is (Equivalence (/.Mixin Nat Nat))
diff --git a/stdlib/source/test/lux/control/function/mutual.lux b/stdlib/source/test/lux/control/function/mutual.lux
index 8f6a7069d..25ffaec75 100644
--- a/stdlib/source/test/lux/control/function/mutual.lux
+++ b/stdlib/source/test/lux/control/function/mutual.lux
@@ -19,7 +19,7 @@
(def test_let
Test
(do [! random.monad]
- [sample (at ! each (n.% 10) random.nat)
+ [sample (of ! each (n.% 10) random.nat)
.let [expected (n.even? sample)]]
(<| (_.coverage [/.let])
(/.let [(even? number)
@@ -52,7 +52,7 @@
(def test_def
Test
(do [! random.monad]
- [sample (at ! each (n.% 10) random.nat)
+ [sample (of ! each (n.% 10) random.nat)
.let [expected (n.even? sample)]]
(<| (_.coverage [/.def])
(and (bit#= expected (..even? sample))
diff --git a/stdlib/source/test/lux/control/function/predicate.lux b/stdlib/source/test/lux/control/function/predicate.lux
index 9a016094c..74e547932 100644
--- a/stdlib/source/test/lux/control/function/predicate.lux
+++ b/stdlib/source/test/lux/control/function/predicate.lux
@@ -47,7 +47,7 @@
(let [generator (is (Random (/.Predicate Nat))
(|> random.nat
(random.only (|>> (n.= 0) not))
- (at ! each multiple?)))]
+ (of ! each multiple?)))]
(all _.and
(_.for [/.union]
($monoid.spec equivalence /.union generator))
diff --git a/stdlib/source/test/lux/control/lazy.lux b/stdlib/source/test/lux/control/lazy.lux
index c055e500e..4e4267810 100644
--- a/stdlib/source/test/lux/control/lazy.lux
+++ b/stdlib/source/test/lux/control/lazy.lux
@@ -26,11 +26,11 @@
(def comparison
(Comparison Lazy)
(function (_ ==)
- (at (/.equivalence ==) =)))
+ (of (/.equivalence ==) =)))
(def .public lazy
(All (_ a) (-> (Random a) (Random (Lazy a))))
- (at random.functor each (|>> /.lazy)))
+ (of random.functor each (|>> /.lazy)))
(def .public test
Test
diff --git a/stdlib/source/test/lux/control/maybe.lux b/stdlib/source/test/lux/control/maybe.lux
index 7ff61a642..ca86ab509 100644
--- a/stdlib/source/test/lux/control/maybe.lux
+++ b/stdlib/source/test/lux/control/maybe.lux
@@ -36,7 +36,7 @@
($equivalence.spec (/.equivalence n.equivalence) (random.maybe random.nat)))
(_.for [/.hash]
(|> random.nat
- (at random.monad each (|>> {.#Some}))
+ (of random.monad each (|>> {.#Some}))
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid (random.maybe random.nat)))
@@ -80,7 +80,7 @@
(do random.monad
[value random.nat]
(_.coverage [/.list]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list value)
(/.list {.#Some value}))))
(do random.monad
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index 7a8a37245..e62b889e0 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -80,7 +80,7 @@
Test
(do [! random.monad]
[expected0 random.nat
- variadic (at ! each (|>> (n.max 1) (n.min 20)) random.nat)
+ variadic (of ! each (|>> (n.max 1) (n.min 20)) random.nat)
expected+ (random.list variadic random.nat)
even0 (random.only n.even? random.nat)
odd0 (random.only n.odd? random.nat)
@@ -99,7 +99,7 @@
(and (|> (list#each code.nat expected+)
(/.result (/.some <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) = expected+ actual)))
+ (of (list.equivalence n.equivalence) = expected+ actual)))
(|> (list#each (|>> .int code.int) expected+)
(/.result (/.some <code>.nat))
(match {.#End}
@@ -108,7 +108,7 @@
(and (|> (list#each code.nat expected+)
(/.result (/.many <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) = expected+ actual)))
+ (of (list.equivalence n.equivalence) = expected+ actual)))
(|> (list (code.nat expected0))
(/.result (/.many <code>.nat))
(match (list actual)
@@ -170,8 +170,8 @@
(def combinators_1
Test
(do [! random.monad]
- [variadic (at ! each (|>> (n.max 1) (n.min 20)) random.nat)
- times (at ! each (n.% variadic) random.nat)
+ [variadic (of ! each (|>> (n.max 1) (n.min 20)) random.nat)
+ times (of ! each (n.% variadic) random.nat)
expected random.nat
wrong (|> random.nat (random.only (|>> (n.= expected) not)))
expected+ (random.list variadic random.nat)
@@ -181,7 +181,7 @@
(and (|> (list#each code.nat expected+)
(/.result (/.exactly times <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.first times expected+)
actual)))
(|> (list#each code.nat expected+)
@@ -191,7 +191,7 @@
(and (|> (list#each code.nat expected+)
(/.result (/.at_least times <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
expected+
actual)))
(|> (list#each code.nat expected+)
@@ -201,44 +201,44 @@
(and (|> (list#each code.nat expected+)
(/.result (/.at_most times <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.first times expected+)
actual)))
(|> (list#each code.nat expected+)
(/.result (/.at_most (++ variadic) <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
expected+
actual)))))
(_.coverage [/.between]
(and (|> (list#each code.nat expected+)
(/.result (/.between times (n.- times variadic) <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
expected+
actual)))
(|> (list#each code.nat (list.first times expected+))
(/.result (/.between times (n.- times variadic) <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.first times expected+)
actual)))))
(_.coverage [/.separated_by]
(|> (list.interposed (code.text separator) (list#each code.nat expected+))
(/.result (/.separated_by (<code>.this (code.text separator)) <code>.nat))
(match actual
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
expected+
actual))))
(_.coverage [/.remaining]
(|> (list#each code.nat expected+)
(/.result /.remaining)
(match actual
- (at (list.equivalence code.equivalence) =
+ (of (list.equivalence code.equivalence) =
(list#each code.nat expected+)
actual))))
(_.coverage [/.else]
- (and (|> (/.result (/.else wrong (at /.monad in expected)) (list))
+ (and (|> (/.result (/.else wrong (of /.monad in expected)) (list))
(match actual (n.= expected actual)))
(|> (/.result (/.else expected (/.failure "yolo"))
(list))
@@ -322,7 +322,7 @@
(def injection
(Injection (All (_ a i) (Parser i a)))
- (at /.monad in))
+ (of /.monad in))
(def comparison
(Comparison (All (_ a i) (Parser i a)))
@@ -351,7 +351,7 @@
($monad.spec ..injection ..comparison /.monad))
(_.coverage [/.result]
- (|> (/.result (at /.monad in expected) (list))
+ (|> (/.result (of /.monad in expected) (list))
(match actual (n.= expected actual))))
(_.coverage [/.failure]
(|> (list)
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index a859fd904..2bbb8e0cb 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -81,7 +81,7 @@
(<| (_.covering /._)
(_.for [/.Region])
(do [! random.monad]
- [expected_clean_ups (|> random.nat (at ! each (|>> (n.% 100) (n.max 1))))]
+ [expected_clean_ups (|> random.nat (of ! each (|>> (n.% 100) (n.max 1))))]
(all _.and
(_.for [/.functor]
($functor.spec ..injection ..comparison (is (All (_ ! r)
diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux
index 77b5582f7..82fb4c96a 100644
--- a/stdlib/source/test/lux/control/security/policy.lux
+++ b/stdlib/source/test/lux/control/security/policy.lux
@@ -63,7 +63,7 @@
(%#can_downgrade sample)))))
(def hash
(|>> %#can_downgrade
- (at text.hash hash)))))
+ (of text.hash hash)))))
(def password
%#can_upgrade)
@@ -79,24 +79,24 @@
(do random.monad
[.let [policy_0 (policy [])]
raw_password (random.ascii 10)
- .let [password (at policy_0 password raw_password)]]
+ .let [password (of policy_0 password raw_password)]]
(all _.and
(_.for [/.Privacy /.Private /.Can_Conceal /.Can_Reveal
/.Safety /.Safe /.Can_Trust /.Can_Distrust]
(all _.and
(_.for [/.functor]
- ($functor.spec (..injection (at policy_0 #can_upgrade)) (..comparison (at policy_0 #can_downgrade)) /.functor))
+ ($functor.spec (..injection (of policy_0 #can_upgrade)) (..comparison (of policy_0 #can_downgrade)) /.functor))
(_.for [/.apply]
- ($apply.spec (..injection (at policy_0 #can_upgrade)) (..comparison (at policy_0 #can_downgrade)) /.apply))
+ ($apply.spec (..injection (of policy_0 #can_upgrade)) (..comparison (of policy_0 #can_downgrade)) /.apply))
(_.for [/.monad]
- ($monad.spec (..injection (at policy_0 #can_upgrade)) (..comparison (at policy_0 #can_downgrade)) /.monad))))
+ ($monad.spec (..injection (of policy_0 #can_upgrade)) (..comparison (of policy_0 #can_downgrade)) /.monad))))
(_.coverage [/.Privilege /.Context /.with_policy]
- (and (at policy_0 = password password)
- (n.= (at text.hash hash raw_password)
- (at policy_0 hash password))))
+ (and (of policy_0 = password password)
+ (n.= (of text.hash hash raw_password)
+ (of policy_0 hash password))))
(let [policy_1 (policy [])
- delegate (/.delegation (at policy_0 #can_downgrade) (at policy_1 #can_upgrade))]
+ delegate (/.delegation (of policy_0 #can_downgrade) (of policy_1 #can_upgrade))]
(_.coverage [/.Delegation /.delegation]
- (at policy_1 = (delegate password) (delegate password))))
+ (of policy_1 = (delegate password) (delegate password))))
))))
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index d1817279c..98023b1f4 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -82,7 +82,7 @@
(def loops
Test
(do [! random.monad]
- [limit (|> random.nat (at ! each (n.% 10)))
+ [limit (|> random.nat (of ! each (n.% 10)))
.let [condition (do /.monad
[state /.get]
(in (n.< limit state)))]]
diff --git a/stdlib/source/test/lux/control/thread.lux b/stdlib/source/test/lux/control/thread.lux
index 64084691a..8996a2382 100644
--- a/stdlib/source/test/lux/control/thread.lux
+++ b/stdlib/source/test/lux/control/thread.lux
@@ -20,7 +20,7 @@
(def (injection value)
(Injection (All (_ a !) (Thread ! a)))
- (at /.monad in value))
+ (of /.monad in value))
(def comparison
(Comparison (All (_ a !) (Thread ! a)))
@@ -39,12 +39,12 @@
(_.coverage [/.result]
(n.= sample
(|> sample
- (at /.monad in)
+ (of /.monad in)
/.result)))
(_.coverage [/.io]
(n.= sample
(|> sample
- (at /.monad in)
+ (of /.monad in)
/.io
io.run!)))
diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux
index 7b2ec5918..f6f000cc1 100644
--- a/stdlib/source/test/lux/control/try.lux
+++ b/stdlib/source/test/lux/control/try.lux
@@ -29,7 +29,7 @@
(def comparison
(Comparison Try)
(function (_ ==)
- (at (/.equivalence ==) =)))
+ (of (/.equivalence ==) =)))
(def .public (attempt element)
(All (_ a) (-> (Random a) (Random (Try a))))
@@ -83,14 +83,14 @@
(/.else alternative (is (Try Nat) {/.#Failure error})))))
(_.coverage [/.when]
(`` (and (,, (with_template [<scenario>]
- [(at (/.equivalence n.equivalence) =
+ [(of (/.equivalence n.equivalence) =
<scenario>
(/.when true <scenario>))]
[{/.#Success expected}]
[{/.#Failure error}]
))
- (at (/.equivalence n.equivalence) =
+ (of (/.equivalence n.equivalence) =
(/.when false {/.#Success expected})
(/.when false {/.#Failure error})))))
(_.coverage [/.with /.lifted]
diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux
index a6c79032b..4fda216e3 100644
--- a/stdlib/source/test/lux/control/writer.lux
+++ b/stdlib/source/test/lux/control/writer.lux
@@ -24,7 +24,7 @@
(def (injection monoid value)
(All (_ w) (-> (Monoid w) (Injection (Writer w))))
- [(at monoid identity) value])
+ [(of monoid identity) value])
(def comparison
(All (_ w) (Comparison (Writer w)))
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 05c3c2c6a..44af3a44e 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -66,8 +66,8 @@
(def (utf8_conversion_does_not_alter? value)
(Predicate Text)
(|> value
- (at utf8.codec encoded)
- (at utf8.codec decoded)
+ (of utf8.codec encoded)
+ (of utf8.codec decoded)
(pipe.when
{try.#Success converted}
(text#= value converted)
@@ -105,7 +105,7 @@
(random.rec
(function (_ again)
(let [random_sequence (do [! random.monad]
- [size (at ! each (n.% 2) random.nat)]
+ [size (of ! each (n.% 2) random.nat)]
(random.list size again))]
(all random.and
..random_location
@@ -138,7 +138,7 @@
(`` (all _.and
(,, (with_template [<size> <parser> <format>]
[(do [! random.monad]
- [expected (at ! each (i64.and (i64.mask <size>))
+ [expected (of ! each (i64.and (i64.mask <size>))
random.nat)]
(_.coverage [<size> <parser> <format>]
(|> (\\format.result <format> expected)
@@ -158,12 +158,12 @@
(`` (all _.and
(,, (with_template [<parser> <format>]
[(do [! random.monad]
- [expected (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))]
+ [expected (of ! each (of utf8.codec encoded) (random.ascii ..segment_size))]
(_.coverage [<parser> <format>]
(|> (\\format.result <format> expected)
(\\parser.result <parser>)
(!expect (^.multi {try.#Success actual}
- (at /.equivalence = expected actual))))))]
+ (of /.equivalence = expected actual))))))]
[\\parser.binary_8 \\format.binary_8]
[\\parser.binary_16 \\format.binary_16]
@@ -181,7 +181,7 @@
(|> (\\format.result <format> expected)
(\\parser.result <parser>)
(!expect (^.multi {try.#Success actual}
- (at text.equivalence = expected actual))))))]
+ (of text.equivalence = expected actual))))))]
[\\parser.utf8_8 \\format.utf8_8]
[\\parser.utf8_16 \\format.utf8_16]
@@ -201,7 +201,7 @@
(\\format.result (<format> \\format.nat))
(\\parser.result (<parser> \\parser.nat))
(!expect (^.multi {try.#Success actual}
- (at (sequence.equivalence n.equivalence) = expected actual))))))]
+ (of (sequence.equivalence n.equivalence) = expected actual))))))]
[\\parser.sequence_8 \\format.sequence_8]
[\\parser.sequence_16 \\format.sequence_16]
@@ -220,7 +220,7 @@
(\\format.result <format>)
(\\parser.result <parser>)
(!expect (^.multi {try.#Success actual}
- (at <equivalence> = expected actual))))))]
+ (of <equivalence> = expected actual))))))]
[\\parser.bit \\format.bit random.bit bit.equivalence]
[\\parser.nat \\format.nat random.nat n.equivalence]
@@ -233,11 +233,11 @@
(\\format.result \\format.frac)
(\\parser.result \\parser.frac)
(!expect (^.multi {try.#Success actual}
- (or (at frac.equivalence = expected actual)
+ (or (of frac.equivalence = expected actual)
(and (frac.not_a_number? expected)
(frac.not_a_number? actual))))))))
(do [! random.monad]
- [expected (at ! each (|>> (i64.and (i64.mask \\parser.size_8))
+ [expected (of ! each (|>> (i64.and (i64.mask \\parser.size_8))
(n.max 2))
random.nat)]
(_.coverage [\\parser.not_a_bit]
@@ -259,7 +259,7 @@
(\\format.result <format>)
(\\parser.result <parser>)
(!expect (^.multi {try.#Success actual}
- (at <equivalence> = expected actual))))))]
+ (of <equivalence> = expected actual))))))]
[\\parser.location \\format.location random_location location_equivalence]
[\\parser.code \\format.code random_code code.equivalence]
@@ -273,14 +273,14 @@
(\\format.result <format>)
(\\parser.result <parser>)
(!expect (^.multi {try.#Success actual}
- (at <equivalence> = expected actual))))))]
+ (of <equivalence> = expected actual))))))]
[\\parser.maybe (\\parser.maybe \\parser.nat) \\format.maybe (\\format.maybe \\format.nat) (random.maybe random.nat) (maybe.equivalence n.equivalence)]
[\\parser.list (\\parser.list \\parser.nat) \\format.list (\\format.list \\format.nat) (random.list ..segment_size random.nat) (list.equivalence n.equivalence)]
[\\parser.set (\\parser.set n.hash \\parser.nat) \\format.set (\\format.set \\format.nat) (random.set n.hash ..segment_size random.nat) set.equivalence]
[\\parser.symbol \\parser.symbol \\format.symbol \\format.symbol ..random_symbol symbol.equivalence]))
(do [! random.monad]
- [expected (at ! each (list.repeated ..segment_size) random.nat)]
+ [expected (of ! each (list.repeated ..segment_size) random.nat)]
(_.coverage [\\parser.set_elements_are_not_unique]
(|> expected
(\\format.result (\\format.list \\format.nat))
@@ -295,11 +295,11 @@
(\\parser.result (is (\\parser.Parser (Either Bit Nat))
(\\parser.or \\parser.bit \\parser.nat)))
(!expect (^.multi {try.#Success actual}
- (at (sum.equivalence bit.equivalence n.equivalence) =
+ (of (sum.equivalence bit.equivalence n.equivalence) =
expected
actual))))))
(do [! random.monad]
- [tag (at ! each (|>> (i64.and (i64.mask \\parser.size_8))
+ [tag (of ! each (|>> (i64.and (i64.mask \\parser.size_8))
(n.max 2))
random.nat)
value random.bit]
@@ -323,7 +323,7 @@
(<>.and \\parser.nat
again))))))
(!expect (^.multi {try.#Success actual}
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
expected
actual))))))
)))
@@ -339,22 +339,22 @@
(\\parser.result \\parser.any)
(!expect {try.#Success _})))
(do [! random.monad]
- [data (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))]
+ [data (of ! each (of utf8.codec encoded) (random.ascii ..segment_size))]
(_.coverage [\\parser.binary_was_not_fully_read]
(|> data
(\\parser.result \\parser.any)
(!expect (^.multi {try.#Failure error}
(exception.match? \\parser.binary_was_not_fully_read error))))))
(do [! random.monad]
- [expected (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))]
+ [expected (of ! each (of utf8.codec encoded) (random.ascii ..segment_size))]
(_.coverage [\\parser.segment \\format.segment \\format.result]
(|> expected
(\\format.result (\\format.segment ..segment_size))
(\\parser.result (\\parser.segment ..segment_size))
(!expect (^.multi {try.#Success actual}
- (at /.equivalence = expected actual))))))
+ (of /.equivalence = expected actual))))))
(do [! random.monad]
- [data (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))]
+ [data (of ! each (of utf8.codec encoded) (random.ascii ..segment_size))]
(_.coverage [\\parser.end?]
(|> data
(\\parser.result (do <>.monad
@@ -365,8 +365,8 @@
post))))
(!expect {try.#Success .true}))))
(do [! random.monad]
- [to_read (at ! each (n.% (++ ..segment_size)) random.nat)
- data (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))]
+ [to_read (of ! each (n.% (++ ..segment_size)) random.nat)
+ data (of ! each (of utf8.codec encoded) (random.ascii ..segment_size))]
(_.coverage [\\parser.Offset \\parser.offset]
(|> data
(\\parser.result (do <>.monad
@@ -380,8 +380,8 @@
(n.= ..segment_size nothing_left)))))
(!expect {try.#Success .true}))))
(do [! random.monad]
- [to_read (at ! each (n.% (++ ..segment_size)) random.nat)
- data (at ! each (at utf8.codec encoded) (random.ascii ..segment_size))]
+ [to_read (of ! each (n.% (++ ..segment_size)) random.nat)
+ data (of ! each (of utf8.codec encoded) (random.ascii ..segment_size))]
(_.coverage [\\parser.remaining]
(|> data
(\\parser.result (do <>.monad
@@ -410,7 +410,7 @@
(def random_specification
(Random \\format.Specification)
- (at random.monad each \\format.nat random.nat))
+ (of random.monad each \\format.nat random.nat))
(def \\format
Test
@@ -439,7 +439,7 @@
[byte random.nat]
(exec (try.trusted (/.has_8! idx byte output))
(again (++ idx))))
- (at random.monad in output)))))
+ (of random.monad in output)))))
(def (throws? exception try)
(All (_ e a) (-> (Exception e) (Try a) Bit))
@@ -479,13 +479,13 @@
(<| (_.covering !._)
(_.for [!.Binary])
(do [! random.monad]
- [.let [gen_size (|> random.nat (at ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (of ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (at ! each (n.% size)))]
+ .let [gen_idx (|> random.nat (of ! each (n.% size)))]
offset gen_idx
- length (at ! each (n.% (n.- offset size)) random.nat)]
+ length (of ! each (n.% (n.- offset size)) random.nat)]
(`` (all _.and
(_.for [!.=]
($equivalence.spec (function (_ left right)
@@ -523,7 +523,7 @@
reader (function (_ binary idx)
(!.bits_8 idx binary))]
(and (n.= length (!.size random_slice))
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list#each (|>> (n.+ offset) (reader sample)) idxs)
(list#each (reader random_slice) idxs)))))
(_.coverage [!.copy!]
@@ -543,24 +543,24 @@
(<| (_.covering /._)
(_.for [/.Binary])
(do [! random.monad]
- [.let [gen_size (|> random.nat (at ! each (|>> (n.% 100) (n.max 8))))]
+ [.let [gen_size (|> random.nat (of ! each (|>> (n.% 100) (n.max 8))))]
size gen_size
sample (..random size)
value random.nat
- .let [gen_idx (|> random.nat (at ! each (n.% size)))]
- offset (at ! each (n.max 1) gen_idx)
- length (at ! each (n.% (n.- offset size)) random.nat)]
+ .let [gen_idx (|> random.nat (of ! each (n.% size)))]
+ offset (of ! each (n.max 1) gen_idx)
+ length (of ! each (n.% (n.- offset size)) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random size)))
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
(_.coverage [/.mix]
- (n.= (at list.mix mix n.+ 0 (..as_list sample))
+ (n.= (of list.mix mix n.+ 0 (..as_list sample))
(/.mix n.+ 0 sample)))
(_.coverage [/.empty]
- (at /.equivalence =
+ (of /.equivalence =
(/.empty size)
(/.empty size)))
(_.coverage [/.size]
@@ -587,7 +587,7 @@
(when [(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}]
- (at (list.equivalence n.equivalence) = binary_vals slice_vals)
+ (of (list.equivalence n.equivalence) = binary_vals slice_vals)
_
false))))
@@ -598,8 +598,8 @@
0 (not verdict)
_ verdict))))
(_.coverage [/.after]
- (and (at /.equivalence = sample (/.after 0 sample))
- (at /.equivalence = (/.empty 0) (/.after size sample))
+ (and (of /.equivalence = sample (/.after 0 sample))
+ (of /.equivalence = (/.empty 0) (/.after size sample))
(n.= (n.- offset size) (/.size (/.after offset sample)))
(when (list.reversed (..as_list sample))
{.#End}
@@ -612,7 +612,7 @@
(and (when (/.copy! size 0 sample 0 (/.empty size))
{try.#Success output}
(and (not (same? sample output))
- (at /.equivalence = sample output))
+ (of /.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 edd3fd68b..ebdf744af 100644
--- a/stdlib/source/test/lux/data/bit.lux
+++ b/stdlib/source/test/lux/data/bit.lux
@@ -35,12 +35,12 @@
($codec.spec /.equivalence /.codec random.bit))
(_.coverage [/.no /.yes]
- (and (at /.equivalence = false /.no)
- (at /.equivalence = true /.yes)))
+ (and (of /.equivalence = false /.no)
+ (of /.equivalence = true /.yes)))
(_.coverage [/.off /.on]
- (and (at /.equivalence = false /.off)
- (at /.equivalence = true /.on)))
+ (and (of /.equivalence = false /.off)
+ (of /.equivalence = true /.on)))
(_.coverage [/.complement]
- (and (not (at /.equivalence = value ((/.complement function.identity) value)))
- (at /.equivalence = value ((/.complement not) value))))
+ (and (not (of /.equivalence = value ((/.complement function.identity) value)))
+ (of /.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 a923891aa..68ba9480c 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -35,7 +35,7 @@
(def bounded_size
(Random Nat)
- (at random.monad each (|>> (n.% 20) ++)
+ (of random.monad each (|>> (n.% 20) ++)
random.nat))
(def structures
@@ -67,11 +67,11 @@
choose (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (at n.decimal encoded value)}
+ {.#Some (of n.decimal encoded value)}
{.#None})))]
(_.coverage [/.one]
(when [(|> evens
- (/#each (at n.decimal encoded))
+ (/#each (of n.decimal encoded))
(/.item 0))
(/.one choose evens)]
[{.#Some expected} {.#Some actual}]
@@ -83,7 +83,7 @@
_
false)))
(_.coverage [/.example]
- (at (maybe.equivalence n.equivalence) =
+ (of (maybe.equivalence n.equivalence) =
(/.example n.even? the_array)
(list.example n.even? (/.list {.#None} the_array))))
(_.coverage [/.example']
@@ -106,11 +106,11 @@
_
false))
(_.coverage [/.every?]
- (at bit.equivalence =
+ (of bit.equivalence =
(list.every? n.even? (/.list {.#None} the_array))
(/.every? n.even? the_array)))
(_.coverage [/.any?]
- (at bit.equivalence =
+ (of bit.equivalence =
(list.any? n.even? (/.list {.#None} the_array))
(/.any? n.even? the_array)))
)))
@@ -210,7 +210,7 @@
(and (n.= expected (!.item 0 the_array))
(n.= expected (!.item 1 the_array)))))
(do !
- [occupancy (at ! each (n.% (++ size)) random.nat)]
+ [occupancy (of ! each (n.% (++ size)) random.nat)]
(_.coverage [!.occupancy !.vacancy]
(let [the_array (loop (again [output (is (Array Nat)
(!.empty size))
@@ -232,7 +232,7 @@
random.nat)]
(_.coverage [!.of_list !.list]
(and (|> the_list !.of_list (!.list {.#None})
- (at (list.equivalence n.equivalence) = the_list))
+ (of (list.equivalence n.equivalence) = the_list))
(|> the_array (!.list {.#None}) !.of_list
(!.= n.equivalence the_array))
(exec
@@ -242,12 +242,12 @@
(same? default value)))
(!.list {.#Some default} the_array))))))
(do !
- [amount (at ! each (n.% (++ size)) random.nat)]
+ [amount (of ! each (n.% (++ size)) random.nat)]
(_.coverage [!.copy!]
(let [copy (is (Array Nat)
(!.empty size))]
(exec (!.copy! amount 0 the_array 0 copy)
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.first amount (!.list {.#None} the_array))
(!.list {.#None} copy))))))
(_.coverage [!.clone]
@@ -263,21 +263,21 @@
(n.= (list.size odds) (!.vacancy the_array))
(|> the_array
(!.list {.#None})
- (at (list.equivalence n.equivalence) = evens))))))
+ (of (list.equivalence n.equivalence) = evens))))))
(let [choose (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (at n.decimal encoded value)}
+ {.#Some (of n.decimal encoded value)}
{.#None})))]
(_.coverage [!.one]
(|> evens
(!.one choose)
(maybe#each (text#= (|> evens
- (!.each (at n.decimal encoded))
+ (!.each (of n.decimal encoded))
(!.item 0))))
(maybe.else false))))
(_.coverage [!.example]
- (at (maybe.equivalence n.equivalence) =
+ (of (maybe.equivalence n.equivalence) =
(!.example n.even? the_array)
(list.example n.even? (!.list {.#None} the_array))))
(_.coverage [!.example']
@@ -296,11 +296,11 @@
_
false))
(_.coverage [!.every?]
- (at bit.equivalence =
+ (of bit.equivalence =
(list.every? n.even? (!.list {.#None} the_array))
(!.every? n.even? the_array)))
(_.coverage [!.any?]
- (at bit.equivalence =
+ (of bit.equivalence =
(list.any? n.even? (!.list {.#None} the_array))
(!.any? n.even? the_array)))
)))))
@@ -393,7 +393,7 @@
_
false)))
(do !
- [occupancy (at ! each (n.% (++ size)) random.nat)]
+ [occupancy (of ! each (n.% (++ size)) random.nat)]
(_.coverage [/.occupancy /.vacancy]
(let [the_array (loop (again [output (is (Array Nat)
(/.empty size))
@@ -415,9 +415,9 @@
random.nat)]
(_.coverage [/.of_list /.list]
(and (|> the_list /.of_list (/.list {.#None})
- (at (list.equivalence n.equivalence) = the_list))
+ (of (list.equivalence n.equivalence) = the_list))
(|> the_array (/.list {.#None}) /.of_list
- (at (/.equivalence n.equivalence) = the_array))
+ (of (/.equivalence n.equivalence) = the_array))
(exec
(/.only! n.even? the_array)
(list.every? (function (_ value)
@@ -425,18 +425,18 @@
(same? default value)))
(/.list {.#Some default} the_array))))))
(do !
- [amount (at ! each (n.% (++ size)) random.nat)]
+ [amount (of ! each (n.% (++ size)) random.nat)]
(_.coverage [/.copy!]
(let [copy (is (Array Nat)
(/.empty size))]
(exec (/.copy! amount 0 the_array 0 copy)
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.first amount (/.list {.#None} the_array))
(/.list {.#None} copy))))))
(_.coverage [/.clone]
(let [clone (/.clone the_array)]
(and (not (same? the_array clone))
- (at (/.equivalence n.equivalence) = the_array clone))))
+ (of (/.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?))]
@@ -444,7 +444,7 @@
(exec (/.only! n.even? the_array)
(and (n.= (list.size evens) (/.occupancy the_array))
(n.= (list.size odds) (/.vacancy the_array))
- (|> the_array (/.list {.#None}) (at (list.equivalence n.equivalence) = evens))))))
+ (|> the_array (/.list {.#None}) (of (list.equivalence n.equivalence) = evens))))))
..test|unsafe
))))
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index 2a134ab17..965ad8e5a 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -20,16 +20,16 @@
(def (size min max)
(-> Nat Nat (Random Nat))
(|> random.nat
- (at random.monad each (|>> (n.% (++ max)) (n.max min)))))
+ (of random.monad each (|>> (n.% (++ max)) (n.max min)))))
(def .public random
(Random Bits)
(do [! random.monad]
- [size (at ! each (n.% 1,000) random.nat)]
+ [size (of ! each (n.% 1,000) random.nat)]
(when size
0 (in /.empty)
_ (do [! random.monad]
- [idx (|> random.nat (at ! each (n.% size)))]
+ [idx (|> random.nat (of ! each (n.% size)))]
(in (/.one idx /.empty))))))
(def .public test
@@ -50,8 +50,8 @@
(/.empty? /.empty))
(do [! random.monad]
- [size (at ! each (|>> (n.% 1,000) ++) random.nat)
- idx (at ! each (n.% size) random.nat)
+ [size (of ! each (|>> (n.% 1,000) ++) random.nat)
+ idx (of ! each (n.% size) random.nat)
sample ..random]
(all _.and
(_.coverage [/.bit /.one]
@@ -82,17 +82,17 @@
(_.coverage [/.not]
(and (same? /.empty (/.not /.empty))
(or (same? /.empty sample)
- (and (not (at /.equivalence = sample (/.not sample)))
- (at /.equivalence = sample (/.not (/.not sample)))))))
+ (and (not (of /.equivalence = sample (/.not sample)))
+ (of /.equivalence = sample (/.not (/.not sample)))))))
(_.coverage [/.xor]
(and (same? /.empty (/.xor sample sample))
(n.= (/.size (/.xor sample (/.not sample)))
(/.capacity sample))))
(_.coverage [/.or]
- (and (at /.equivalence = sample (/.or sample sample))
+ (and (of /.equivalence = sample (/.or sample sample))
(n.= (/.size (/.or sample (/.not sample)))
(/.capacity sample))))
(_.coverage [/.and]
- (and (at /.equivalence = sample (/.and sample sample))
+ (and (of /.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 d02d9f3a4..121fefce2 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -32,7 +32,7 @@
(def for_dictionaries
Test
(do [! random.monad]
- [.let [capped_nat (at random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (of 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)
@@ -134,7 +134,7 @@
(def for_entries
Test
(do random.monad
- [.let [capped_nat (at random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (of 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)
@@ -254,7 +254,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do random.monad
- [.let [capped_nat (at random.monad each (n.% 100) random.nat)]
+ [.let [capped_nat (of 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 951d6c891..d1c9ba933 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -44,7 +44,7 @@
(<| (_.covering /._)
(_.for [/.Dictionary])
(do [! random.monad]
- [size (at ! each (n.% 100) random.nat)
+ [size (of ! each (n.% 100) random.nat)
keys (random.set n.hash size random.nat)
values (random.set n.hash size random.nat)
extra_key (random.only (|>> (set.member? keys) not)
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 3b079d53d..93af39185 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -35,7 +35,7 @@
(def bounded_size
(Random Nat)
- (at random.monad each (n.% 100)
+ (of random.monad each (n.% 100)
random.nat))
(def random
@@ -44,7 +44,7 @@
[size ..bounded_size]
(|> random.nat
(random.set n.hash size)
- (at ! each set.list))))
+ (of ! each set.list))))
(def signatures
Test
@@ -53,7 +53,7 @@
($equivalence.spec (/.equivalence n.equivalence) ..random))
(_.for [/.hash]
(|> random.nat
- (at random.monad each (|>> list))
+ (of random.monad each (|>> list))
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid ..random))
@@ -90,12 +90,12 @@
(do [! random.monad]
[size ..bounded_size
.let [(open "/#[0]") (/.equivalence n.equivalence)]
- sample (at ! each set.list (random.set n.hash size random.nat))]
+ sample (of ! each set.list (random.set n.hash size random.nat))]
(all _.and
(_.coverage [/.size]
(n.= size (/.size sample)))
(_.coverage [/.empty?]
- (at bit.equivalence =
+ (of bit.equivalence =
(/.empty? sample)
(n.= 0 (/.size sample))))
(_.coverage [/.repeated]
@@ -179,7 +179,7 @@
(do !
[index (when size
0 random.nat
- _ (at ! each (n.% size) random.nat))
+ _ (of ! each (n.% size) random.nat))
.let [changed? (/#= sample (/.revised index ++ sample))
same? (/#= sample (/.revised size ++ sample))]]
(_.coverage [/.revised]
@@ -197,8 +197,8 @@
[sample (random.only (|>> /.size (n.> 0))
..random)
.let [size (/.size sample)]
- idx (at ! each (n.% size) random.nat)
- sub_size (at ! each (|>> (n.% size) ++) random.nat)]
+ idx (of ! each (n.% size) random.nat)
+ sub_size (of ! each (|>> (n.% size) ++) random.nat)]
(all _.and
(_.coverage [/.only]
(let [positives (/.only n.even? sample)
@@ -342,10 +342,10 @@
(and size_of_smaller_list!
can_extract_values!)))
(_.coverage [/.zipped]
- (and (at (/.equivalence (product.equivalence n.equivalence n.equivalence)) =
+ (and (of (/.equivalence (product.equivalence n.equivalence n.equivalence)) =
(/.zipped_2 sample/0 sample/1)
((/.zipped 2) sample/0 sample/1))
- (at (/.equivalence (all product.equivalence n.equivalence n.equivalence n.equivalence)) =
+ (of (/.equivalence (all product.equivalence n.equivalence n.equivalence n.equivalence)) =
(/.zipped_3 sample/0 sample/1 sample/2)
((/.zipped 3) sample/0 sample/1 sample/2))))
@@ -378,7 +378,7 @@
choice (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (at n.decimal encoded value)}
+ {.#Some (of n.decimal encoded value)}
{.#None})))]
(do [! random.monad]
[sample ..random]
@@ -386,7 +386,7 @@
(_.coverage [/.one]
(when [(|> sample
(/.only n.even?)
- (/#each (at n.decimal encoded))
+ (/#each (of n.decimal encoded))
/.head)
(/.one choice sample)]
[{.#Some expected} {.#Some actual}]
@@ -398,10 +398,10 @@
_
false))
(_.coverage [/.all]
- (at (/.equivalence text.equivalence) =
+ (of (/.equivalence text.equivalence) =
(|> sample
(/.only n.even?)
- (/#each (at n.decimal encoded)))
+ (/#each (of n.decimal encoded)))
(/.all choice sample)))
(_.coverage [/.example]
(when (/.example n.even? sample)
@@ -451,7 +451,7 @@
0)))))
(_.coverage [/.mixes]
(/#= (/#each (function (_ index)
- (at /.mix mix n.+ 0 (/.first index sample)))
+ (of /.mix mix n.+ 0 (/.first index sample)))
(/.indices (++ (/.size sample))))
(/.mixes n.+ 0 sample)))
(do random.monad
diff --git a/stdlib/source/test/lux/data/collection/list/property.lux b/stdlib/source/test/lux/data/collection/list/property.lux
index fa8161e16..719a17179 100644
--- a/stdlib/source/test/lux/data/collection/list/property.lux
+++ b/stdlib/source/test/lux/data/collection/list/property.lux
@@ -37,7 +37,7 @@
(_.for [/.List])
(do [! random.monad]
[.let [gen_key (random.alphabetic 10)]
- size (at ! each (n.% 100) random.nat)
+ size (of ! each (n.% 100) random.nat)
sample (..random size gen_key random.nat)
.let [keys (|> sample /.keys (set.of_list text.hash))]
@@ -62,7 +62,7 @@
(_.coverage [/.empty]
(/.empty? /.empty))
(_.coverage [/.keys /.values]
- (at (/.equivalence n.equivalence) =
+ (of (/.equivalence n.equivalence) =
sample
(list.zipped_2 (/.keys sample)
(/.values sample))))
@@ -94,5 +94,5 @@
(|> sample
(/.has extra_key extra_value)
(/.lacks extra_key)
- (at (/.equivalence n.equivalence) = sample)))
+ (of (/.equivalence n.equivalence) = sample)))
))))
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 99511bab5..2a99ba497 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -27,9 +27,10 @@
(def .public test
Test
(<| (_.covering /._)
- (_.for [/.Queue])
+ (_.for [/.Queue
+ /.#front /.#rear])
(do [! random.monad]
- [size (at ! each (n.% 100) random.nat)
+ [size (of ! each (n.% 100) random.nat)
members (random.set n.hash size random.nat)
non_member (random.only (|>> (set.member? members) not)
random.nat)
@@ -43,7 +44,7 @@
(_.coverage [/.of_list /.list]
(|> members /.of_list /.list
- (at (list.equivalence n.equivalence) = members)))
+ (of (list.equivalence n.equivalence) = members)))
(_.coverage [/.size]
(n.= size (/.size sample)))
(_.coverage [/.empty?]
@@ -54,7 +55,7 @@
all_empty_queues_look_the_same!
(bit#= (/.empty? sample)
- (at (/.equivalence n.equivalence) =
+ (of (/.equivalence n.equivalence) =
sample
/.empty))]
(and empty_is_empty!
@@ -88,7 +89,7 @@
(/.member? n.equivalence pushed non_member)
has_expected_order!
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list#composite (/.list sample) (list non_member))
(/.list pushed))]
(and size_increases!
@@ -107,7 +108,7 @@
(not (/.member? n.equivalence popped target))
has_expected_order!
- (at (list.equivalence n.equivalence) =
+ (of (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 b7a1028fe..b948fd8b2 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -32,7 +32,7 @@
(<| (_.covering /._)
(_.for [/.Queue])
(do [! random.monad]
- [size (at ! each (n.% 100) random.nat)
+ [size (of ! each (n.% 100) random.nat)
sample (..random size)
non_member_priority random.nat
non_member (random.only (|>> (/.member? n.equivalence sample) not)
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index a24d05ed6..8a38c3a98 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -31,7 +31,7 @@
(def signatures
Test
(do [! random.monad]
- [size (at ! each (n.% 100) random.nat)]
+ [size (of ! each (n.% 100) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec (/.equivalence n.equivalence) (random.sequence size random.nat)))
@@ -50,7 +50,7 @@
(def whole
Test
(do [! random.monad]
- [size (at ! each (n.% 100) random.nat)
+ [size (of ! 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)]]
@@ -83,10 +83,10 @@
(def index_based
Test
(do [! random.monad]
- [size (at ! each (|>> (n.% 100) ++) random.nat)]
+ [size (of ! each (|>> (n.% 100) ++) random.nat)]
(all _.and
(do !
- [good_index (|> random.nat (at ! each (n.% size)))
+ [good_index (|> random.nat (of ! 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)
@@ -136,7 +136,7 @@
(<| (_.covering /._)
(_.for [/.Sequence])
(do [! random.monad]
- [size (at ! each (|>> (n.% 100) ++) random.nat)]
+ [size (of ! each (|>> (n.% 100) ++) random.nat)]
(all _.and
..signatures
..whole
@@ -199,11 +199,11 @@
choice (is (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- {.#Some (at n.decimal encoded value)}
+ {.#Some (of n.decimal encoded value)}
{.#None})))]
(when [(|> sample
(/.only n.even?)
- (/#each (at n.decimal encoded))
+ (/#each (of n.decimal encoded))
(/.item 0))
(/.one choice sample)]
[{try.#Success expected} {.#Some actual}]
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index 16d7294d8..d4cff2607 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -23,7 +23,7 @@
(def gen_nat
(Random Nat)
- (at random.monad each (n.% 100)
+ (of random.monad each (n.% 100)
random.nat))
(def .public test
@@ -37,7 +37,7 @@
($equivalence.spec /.equivalence (random.set n.hash size random.nat)))
(_.for [/.hash]
(|> random.nat
- (at random.monad each (|>> list (/.of_list n.hash)))
+ (of 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)))
@@ -53,7 +53,7 @@
(_.coverage [/.empty]
(/.empty? (/.empty n.hash)))
(do !
- [hash (at ! each (function (_ constant)
+ [hash (of ! each (function (_ constant)
(is (Hash Nat)
(implementation
(def equivalence n.equivalence)
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 16e7986fa..f22c4c455 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -26,7 +26,7 @@
(def count
(Random Nat)
- (at random.monad each (|>> (n.% 10) ++) random.nat))
+ (of 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))))
@@ -42,13 +42,13 @@
(def signature
Test
(do [! random.monad]
- [diversity (at ! each (n.% 10) random.nat)]
+ [diversity (of ! each (n.% 10) random.nat)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat)))
(_.for [/.hash]
(|> random.nat
- (at random.monad each (function (_ single)
+ (of random.monad each (function (_ single)
(/.has 1 single (/.empty n.hash))))
($hash.spec /.hash)))
)))
@@ -56,7 +56,7 @@
(def composition
Test
(do [! random.monad]
- [diversity (at ! each (n.% 10) random.nat)
+ [diversity (of ! each (n.% 10) random.nat)
sample (..random diversity n.hash ..count random.nat)
another (..random diversity n.hash ..count random.nat)]
(`` (all _.and
@@ -116,19 +116,19 @@
(<| (_.covering /._)
(_.for [/.Set])
(do [! random.monad]
- [diversity (at ! each (n.% 10) random.nat)
+ [diversity (of ! 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 (at ! each (n.% addition_count) random.nat)
+ partial_removal_count (of ! each (n.% addition_count) random.nat)
another (..random diversity n.hash ..count random.nat)]
(all _.and
(_.coverage [/.list /.of_list]
(|> sample
/.list
(/.of_list n.hash)
- (at /.equivalence = sample)))
+ (of /.equivalence = sample)))
(_.coverage [/.size]
(n.= (list.size (/.list sample))
(/.size sample)))
@@ -162,7 +162,7 @@
(let [null_scenario!
(|> sample
(/.has 0 non_member)
- (at /.equivalence = sample))
+ (of /.equivalence = sample))
normal_scenario!
(let [sample+ (/.has addition_count non_member sample)]
@@ -173,7 +173,7 @@
normal_scenario!)))
(_.coverage [/.lacks]
(let [null_scenario!
- (at /.equivalence =
+ (of /.equivalence =
(|> sample
(/.has addition_count non_member))
(|> sample
@@ -193,7 +193,7 @@
(|> sample
(/.has addition_count non_member)
(/.lacks addition_count non_member)
- (at /.equivalence = sample))]
+ (of /.equivalence = sample))]
(and null_scenario!
partial_scenario!
total_scenario!)))
@@ -205,12 +205,12 @@
(let [unary (|> sample /.support /.of_set)]
(and (/.sub? sample unary)
(or (not (/.sub? unary sample))
- (at /.equivalence = sample unary)))))
+ (of /.equivalence = sample unary)))))
(_.coverage [/.super?]
(let [unary (|> sample /.support /.of_set)]
(and (/.super? unary sample)
(or (not (/.super? sample unary))
- (at /.equivalence = sample unary)))))
+ (of /.equivalence = sample unary)))))
(_.coverage [/.difference]
(let [|sample| (/.support sample)
|another| (/.support another)
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index cedc2db15..45c8a9a9e 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -22,7 +22,7 @@
(def size
(random.Random Nat)
- (at random.monad each (n.% 100) random.nat))
+ (of random.monad each (n.% 100) random.nat))
(def .public (random size order gen_value)
(All (_ a) (-> Nat (Order a) (Random a) (Random (Set a))))
@@ -48,7 +48,7 @@
non_memberL (random.only (|>> (//.member? usetL) not)
random.nat)
.let [listL (//.list usetL)]
- listR (|> (random.set n.hash sizeR random.nat) (at ! each //.list))
+ listR (|> (random.set n.hash sizeR random.nat) (of ! each //.list))
.let [(open "/#[0]") /.equivalence
setL (/.of_list n.order listL)
setR (/.of_list n.order listR)
@@ -65,9 +65,9 @@
(_.coverage [/.empty]
(/.empty? (/.empty n.order)))
(_.coverage [/.list]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(/.list (/.of_list n.order listL))
- (list.sorted (at n.order <) listL)))
+ (list.sorted (of n.order <) listL)))
(_.coverage [/.of_list]
(|> setL
/.list (/.of_list n.order)
@@ -102,7 +102,7 @@
(|> setL
(/.has non_memberL)
(/.lacks non_memberL)
- (at /.equivalence = setL)))
+ (of /.equivalence = setL)))
(_.coverage [/.sub?]
(let [self!
(/.sub? setL setL)
@@ -127,7 +127,7 @@
(,, (with_template [<coverage> <relation> <empty?>]
[(_.coverage [<coverage>]
(let [self!
- (at /.equivalence =
+ (of /.equivalence =
setL
(<coverage> setL setL))
@@ -136,12 +136,12 @@
(<relation> (<coverage> setL setR) setR))
empty!
- (at /.equivalence =
+ (of /.equivalence =
(if <empty?> empty setL)
(<coverage> setL empty))
idempotence!
- (at /.equivalence =
+ (of /.equivalence =
(<coverage> setL (<coverage> setL setR))
(<coverage> setR (<coverage> setL setR)))]
(and self!
@@ -156,19 +156,19 @@
(let [self!
(|> setL
(/.difference setL)
- (at /.equivalence = empty))
+ (of /.equivalence = empty))
empty!
(|> setL
(/.difference empty)
- (at /.equivalence = setL))
+ (of /.equivalence = setL))
difference!
(not (list.any? (/.member? (/.difference setL setR))
(/.list setL)))
idempotence!
- (at /.equivalence =
+ (of /.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 22935a5f9..fab3b7d91 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -28,7 +28,7 @@
(<| (_.covering /._)
(_.for [/.Stack])
(do random.monad
- [size (at random.monad each (n.% 100) random.nat)
+ [size (of random.monad each (n.% 100) random.nat)
sample (random.stack size random.nat)
expected_top random.nat]
(all _.and
@@ -57,7 +57,7 @@
(/.empty? sample)
{.#Some [top remaining]}
- (at (/.equivalence n.equivalence) =
+ (of (/.equivalence n.equivalence) =
sample
(/.top top remaining))))
(_.coverage [/.top]
diff --git a/stdlib/source/test/lux/data/collection/stream.lux b/stdlib/source/test/lux/data/collection/stream.lux
index df001ce0e..f14f53131 100644
--- a/stdlib/source/test/lux/data/collection/stream.lux
+++ b/stdlib/source/test/lux/data/collection/stream.lux
@@ -26,7 +26,7 @@
(All (_ a) (-> (Equivalence a) (Equivalence (/.Stream a))))
(implementation
(def (= reference subject)
- (at (list.equivalence super) =
+ (of (list.equivalence super) =
(/.first 100 reference)
(/.first 100 subject)))))
@@ -46,9 +46,9 @@
(let [(open "list#[0]") (list.equivalence n.equivalence)])
(do [! random.monad]
[repeated random.nat
- index (at ! each (n.% 100) random.nat)
- size (at ! each (|>> (n.% 10) ++) random.nat)
- offset (at ! each (n.% 100) random.nat)
+ index (of ! each (n.% 100) random.nat)
+ size (of ! each (|>> (n.% 10) ++) random.nat)
+ offset (of ! each (n.% 100) random.nat)
cycle_start random.nat
cycle_next (random.list size random.nat)]
(all _.and
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 8f7ef89da..eef32ee7d 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -189,7 +189,7 @@
(All (_ a) (-> (Random a) (Random [Nat (Tree a)])))
(do [! random.monad]
[value gen_value
- num_children (at ! each (n.% 2) random.nat)
+ num_children (of ! each (n.% 2) random.nat)
children (random.list num_children (tree gen_value))]
(in [(|> children
(list#each product.left)
@@ -204,7 +204,7 @@
(all _.and
(_.for [/.equivalence]
(|> (..tree random.nat)
- (at random.monad each product.right)
+ (of random.monad each product.right)
($equivalence.spec (/.equivalence n.equivalence))))
(_.for [/.mix]
($mix.spec /.leaf /.equivalence /.mix))
@@ -219,15 +219,15 @@
(do random.monad
[expected random.nat]
(_.coverage [/.leaf]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list expected)
(/.flat (/.leaf expected)))))
(do [! random.monad]
[value random.nat
- num_children (at ! each (n.% 3) random.nat)
+ num_children (of ! each (n.% 3) random.nat)
children (random.list num_children random.nat)]
(_.coverage [/.branch]
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list.partial value children)
(/.flat (/.branch value (list#each /.leaf children))))))
(do random.monad
@@ -238,15 +238,15 @@
expected/4 random.nat
expected/5 random.nat]
(_.coverage [/.tree]
- (and (at (list.equivalence n.equivalence) =
+ (and (of (list.equivalence n.equivalence) =
(list expected/0)
(/.flat (/.tree expected/0)))
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list expected/0 expected/1 expected/2)
(/.flat (/.tree expected/0
{expected/1 {}
expected/2 {}})))
- (at (list.equivalence n.equivalence) =
+ (of (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 ff6e1b62f..85d7cd123 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -45,21 +45,21 @@
true))
(_.coverage [/.tag]
(and (text#= tag_left
- (/.tag (at ..builder leaf tag_left expected_left)))
+ (/.tag (of ..builder leaf tag_left expected_left)))
(text#= (text#composite tag_left tag_right)
- (/.tag (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right))))))
+ (/.tag (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..builder leaf tag_right expected_right))))))
(_.coverage [/.root]
- (and (when (/.root (at ..builder leaf tag_left expected_left))
+ (and (when (/.root (of ..builder leaf tag_left expected_left))
{.#Left actual}
(n.= expected_left actual)
{.#Right _}
false)
- (when (/.root (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right)))
+ (when (/.root (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..builder leaf tag_right expected_right)))
{.#Left _}
false
@@ -74,11 +74,11 @@
false))))
(_.coverage [/.value]
(and (n.= expected_left
- (/.value (at ..builder leaf tag_left expected_left)))
+ (/.value (of ..builder leaf tag_left expected_left)))
(n.= expected_left
- (/.value (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right))))))
+ (/.value (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..builder leaf tag_right expected_right))))))
(do random.monad
[.let [tags_equivalence (list.equivalence text.equivalence)
values_equivalence (list.equivalence n.equivalence)]
@@ -88,37 +88,37 @@
values/T (random.list 5 random.nat)]
(_.coverage [/.tags /.values]
(let [tree (list#mix (function (_ [tag value] tree)
- (at builder branch tree (at builder leaf tag value)))
- (at builder leaf tags/H values/H)
+ (of builder branch tree (of builder leaf tag value)))
+ (of builder leaf tags/H values/H)
(list.zipped_2 tags/T values/T))]
- (and (at tags_equivalence = (list.partial tags/H tags/T) (/.tags tree))
- (at values_equivalence = (list.partial values/H values/T) (/.values tree))))))
+ (and (of tags_equivalence = (list.partial tags/H tags/T) (/.tags tree))
+ (of values_equivalence = (list.partial values/H values/T) (/.values tree))))))
(_.coverage [/.one]
(let [can_find_correct_one!
- (|> (at ..builder leaf tag_left expected_left)
+ (|> (of ..builder leaf tag_left expected_left)
(/.one (text.contains? tag_left))
(maybe#each (n.= expected_left))
(maybe.else false))
cannot_find_incorrect_one!
- (|> (at ..builder leaf tag_right expected_right)
+ (|> (of ..builder leaf tag_right expected_right)
(/.one (text.contains? tag_left))
(maybe#each (n.= expected_left))
(maybe.else false)
not)
can_find_left!
- (|> (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right))
+ (|> (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_left))
(maybe#each (n.= expected_left))
(maybe.else false))
can_find_right!
- (|> (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right))
+ (|> (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_right))
(maybe#each (n.= expected_right))
(maybe.else false))]
@@ -129,23 +129,23 @@
(_.coverage [/.exists?]
(let [can_find_correct_one!
(/.exists? (text.contains? tag_left)
- (at ..builder leaf tag_left expected_left))
+ (of ..builder leaf tag_left expected_left))
cannot_find_incorrect_one!
(not (/.exists? (text.contains? tag_left)
- (at ..builder leaf tag_right expected_right)))
+ (of ..builder leaf tag_right expected_right)))
can_find_left!
(/.exists? (text.contains? tag_left)
- (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right)))
+ (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..builder leaf tag_right expected_right)))
can_find_right!
(/.exists? (text.contains? tag_right)
- (at ..builder branch
- (at ..builder leaf tag_left expected_left)
- (at ..builder leaf tag_right expected_right)))]
+ (of ..builder branch
+ (of ..builder leaf tag_left expected_left)
+ (of ..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 0da1f808d..fe764d955 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -164,7 +164,7 @@
(open "list#[0]") (list.equivalence n.equivalence)]]
(all _.and
(_.for [/.equivalence]
- ($equivalence.spec (/.equivalence n.equivalence) (at ! each (|>> product.right /.zipper) (//.tree random.nat))))
+ ($equivalence.spec (/.equivalence n.equivalence) (of ! each (|>> product.right /.zipper) (//.tree random.nat))))
(_.for [/.functor]
($functor.spec (|>> tree.leaf /.zipper) /.equivalence /.functor))
(_.for [/.comonad]
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index 8198800e6..5d94addef 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -27,6 +27,8 @@
["[1][0]" rgb]
["[1][0]" cmyk]
["[1][0]" hsl]
+ ["[1][0]" hsb]
+ ["[1][0]" pigment]
["[1][0]" named]
["[1][0]" terminal]])
@@ -81,11 +83,7 @@
(all _.and
(_.coverage [/.rgb /.of_rgb]
(|> expected /.rgb /.of_rgb
- (at /.equivalence = expected)))
- (_.coverage [/.HSB /.hsb /.of_hsb]
- (|> expected /.hsb /.of_hsb
- (distance/3 expected)
- (f.<= ..rgb_error_margin)))
+ (of /.equivalence = expected)))
))
(def transformation
@@ -127,54 +125,54 @@
(f.<= ..rgb_error_margin)))))
)))
-(def palette
- Test
- (_.for [/.Spread /.Palette]
- (do [! random.monad]
- [eH (at ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
- random.safe_frac)
- .let [eS +0.5]
- variations (at ! each (|>> (n.% 3) (n.+ 2)) random.nat)
- .let [max_spread (f./ (|> variations ++ .int int.frac)
- +1.0)
- min_spread (f./ +2.0 max_spread)
- spread_space (f.- min_spread max_spread)]
- spread (at ! each (|>> f.abs (f.% spread_space) (f.+ min_spread))
- random.safe_frac)]
- (`` (all _.and
- (,, (with_template [<brightness> <palette>]
- [(_.coverage [<palette>]
- (let [eB <brightness>
- expected (/.of_hsb [eH eS eB])
- palette (<palette> spread variations expected)]
- (and (n.= variations (list.size palette))
- (not (list.any? (at /.equivalence = expected) palette)))))]
- [+1.0 /.analogous]
- [+0.5 /.monochromatic]
- ))
- (,, (with_template [<palette>]
- [(_.coverage [<palette>]
- (let [expected (/.of_hsb [eH eS +0.5])
- [c0 c1 c2] (<palette> expected)]
- (and (at /.equivalence = expected c0)
- (not (at /.equivalence = expected c1))
- (not (at /.equivalence = expected c2)))))]
-
- [/.triad]
- [/.clash]
- [/.split_complement]))
- (,, (with_template [<palette>]
- [(_.coverage [<palette>]
- (let [expected (/.of_hsb [eH eS +0.5])
- [c0 c1 c2 c3] (<palette> expected)]
- (and (at /.equivalence = expected c0)
- (not (at /.equivalence = expected c1))
- (not (at /.equivalence = expected c2))
- (not (at /.equivalence = expected c3)))))]
-
- [/.square]
- [/.tetradic]))
- )))))
+... (def palette
+... Test
+... (_.for [/.Spread /.Palette]
+... (do [! random.monad]
+... [eH (of ! each (|>> f.abs (f.% +0.9) (f.+ +0.05))
+... random.safe_frac)
+... .let [eS +0.5]
+... variations (of ! 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 (of ! each (|>> f.abs (f.% spread_space) (f.+ min_spread))
+... random.safe_frac)]
+... (`` (all _.and
+... (,, (with_template [<brightness> <palette>]
+... [(_.coverage [<palette>]
+... (let [eB <brightness>
+... expected (/.of_hsb [eH eS eB])
+... palette (<palette> spread variations expected)]
+... (and (n.= variations (list.size palette))
+... (not (list.any? (of /.equivalence = expected) palette)))))]
+... [+1.0 /.analogous]
+... [+0.5 /.monochromatic]
+... ))
+... (,, (with_template [<palette>]
+... [(_.coverage [<palette>]
+... (let [expected (/.of_hsb [eH eS +0.5])
+... [c0 c1 c2] (<palette> expected)]
+... (and (of /.equivalence = expected c0)
+... (not (of /.equivalence = expected c1))
+... (not (of /.equivalence = expected c2)))))]
+
+... [/.triad]
+... [/.clash]
+... [/.split_complement]))
+... (,, (with_template [<palette>]
+... [(_.coverage [<palette>]
+... (let [expected (/.of_hsb [eH eS +0.5])
+... [c0 c1 c2 c3] (<palette> expected)]
+... (and (of /.equivalence = expected c0)
+... (not (of /.equivalence = expected c1))
+... (not (of /.equivalence = expected c2))
+... (not (of /.equivalence = expected c3)))))]
+
+... [/.square]
+... [/.tetradic]))
+... )))))
(def .public test
Test
@@ -199,22 +197,16 @@
(and (not (/#= expected ~expected))
(/#= expected (/.complement ~expected)))))
(_.coverage [/.black /.white]
- (and (at /.equivalence = /.white (/.complement /.black))
- (at /.equivalence = /.black (/.complement /.white))))
+ (and (of /.equivalence = /.white (/.complement /.black))
+ (of /.equivalence = /.black (/.complement /.white))))
..transformation
- ..palette
- (_.for [/.Alpha /.Pigment]
- (all _.and
- (_.coverage [/.transparent /.opaque]
- (and (r.= /.opaque (-- /.transparent))
- (r.= /.transparent (++ /.opaque))))
- (_.coverage [/.translucent]
- (r.= /.transparent (r.+ /.translucent /.translucent)))
- ))
+ ... ..palette
/rgb.test
/cmyk.test
/hsl.test
+ /hsb.test
+ /pigment.test
/named.test
/terminal.test
))))
diff --git a/stdlib/source/test/lux/data/color/cmyk.lux b/stdlib/source/test/lux/data/color/cmyk.lux
index 4a9736762..8c852cd4c 100644
--- a/stdlib/source/test/lux/data/color/cmyk.lux
+++ b/stdlib/source/test/lux/data/color/cmyk.lux
@@ -9,7 +9,7 @@
["[0]" try (.use "[1]#[0]" functor)]
["[0]" exception]]
[math
- ["[0]" random (.only Random)]
+ ["[0]" random (.only Random) (.use "[1]#[0]" functor)]
[number
["f" frac]]]
[test
@@ -23,8 +23,7 @@
(def .public value
(Random /.Value)
- (random.one (|>> /.value try.maybe)
- random.safe_frac))
+ (random#each /.value random.safe_frac))
(def .public random
(Random /.CMYK)
@@ -44,32 +43,35 @@
(do [! random.monad]
[expected_value ..value
expected_rgb rgbT.random
- expected_cmyk ..random])
+ expected_cmyk ..random
+
+ possible_value random.frac])
(all _.and
(_.for [/.Value]
(all _.and
- (_.coverage [/.number /.value]
- (|> expected_value
- /.number
- /.value
- (try#each (|>> /.number
- (f.= (/.number expected_value))))
- (try.else false)))
+ (_.coverage [/.value?]
+ (and (/.value? expected_value)
+ (not (/.value? (f.+ f.smallest /.most)))
+ (not (/.value? (f.- f.smallest /.least)))))
+ (_.coverage [/.value]
+ (if (/.value? possible_value)
+ (|> possible_value
+ /.value
+ (f.= possible_value))
+ (or (f.= /.least (/.value possible_value))
+ (f.= /.most (/.value possible_value)))))
(_.coverage [/.least]
- (when (/.value (f.+ +0.001 (/.number /.least)))
- {try.#Failure _} false
- {try.#Success _} true))
+ (and (f.< /.most
+ /.least)
+ (/.value? /.least)
+ (/.value? (f.+ f.smallest /.least))
+ (not (/.value? (f.- f.smallest /.least)))))
(_.coverage [/.most]
- (when (/.value (f.- +0.001 (/.number /.most)))
- {try.#Failure _} false
- {try.#Success _} true))
- (_.coverage [/.invalid]
- (and (when (/.value (f.- +0.001 (/.number /.least)))
- {try.#Failure it} (exception.match? /.invalid it)
- {try.#Success _} false)
- (when (/.value (f.+ +0.001 (/.number /.most)))
- {try.#Failure it} (exception.match? /.invalid it)
- {try.#Success _} false)))
+ (and (f.> /.least
+ /.most)
+ (/.value? /.most)
+ (/.value? (f.- f.smallest /.most))
+ (not (/.value? (f.+ f.smallest /.most)))))
))
(_.for [/.CMYK
/.#cyan /.#magenta /.#yellow /.#key]
@@ -81,10 +83,10 @@
(and (|> expected_rgb
/.cmyk
/.rgb
- (at rgb.equivalence = expected_rgb))
+ (of rgb.equivalence = expected_rgb))
(|> expected_cmyk
/.rgb
/.cmyk
- (at /.equivalence = expected_cmyk))))
+ (of /.equivalence = expected_cmyk))))
))
)))
diff --git a/stdlib/source/test/lux/data/color/hsb.lux b/stdlib/source/test/lux/data/color/hsb.lux
index 16f6d9dfb..2cb41fe7c 100644
--- a/stdlib/source/test/lux/data/color/hsb.lux
+++ b/stdlib/source/test/lux/data/color/hsb.lux
@@ -74,15 +74,15 @@
(_.coverage [/.hsb
/.hue /.saturation /.brightness]
(|> (/.hsb (/.hue expected_hsb) (/.saturation expected_hsb) (/.brightness expected_hsb))
- (at /.equivalence = expected_hsb)))
+ (of /.equivalence = expected_hsb)))
(_.coverage [/.of_rgb /.rgb]
(and (|> expected_rgb
/.of_rgb
/.rgb
- (at rgb.equivalence = expected_rgb))
+ (of rgb.equivalence = expected_rgb))
(|> expected_hsb
/.rgb
/.of_rgb
- (at /.equivalence = expected_hsb))))
+ (of /.equivalence = expected_hsb))))
))
)))
diff --git a/stdlib/source/test/lux/data/color/hsl.lux b/stdlib/source/test/lux/data/color/hsl.lux
index a0524d2b1..72782e0f2 100644
--- a/stdlib/source/test/lux/data/color/hsl.lux
+++ b/stdlib/source/test/lux/data/color/hsl.lux
@@ -74,15 +74,15 @@
(_.coverage [/.hsl
/.hue /.saturation /.luminance]
(|> (/.hsl (/.hue expected_hsl) (/.saturation expected_hsl) (/.luminance expected_hsl))
- (at /.equivalence = expected_hsl)))
+ (of /.equivalence = expected_hsl)))
(_.coverage [/.of_rgb /.rgb]
(and (|> expected_rgb
/.of_rgb
/.rgb
- (at rgb.equivalence = expected_rgb))
+ (of rgb.equivalence = expected_rgb))
(|> expected_hsl
/.rgb
/.of_rgb
- (at /.equivalence = expected_hsl))))
+ (of /.equivalence = expected_hsl))))
))
)))
diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux
index 4a9a633c9..cb1201c74 100644
--- a/stdlib/source/test/lux/data/color/named.lux
+++ b/stdlib/source/test/lux/data/color/named.lux
@@ -219,7 +219,7 @@
(def .public random
(Random //.Color)
(do [! random.monad]
- [choice (at ! each (n.% (set.size ..unique_colors))
+ [choice (of ! each (n.% (set.size ..unique_colors))
random.nat)]
(in (maybe.trusted (list.item choice ..all_colors)))))
@@ -244,8 +244,8 @@
<colors>))
(_.coverage [/.aqua]
- (at //.equivalence = /.cyan /.aqua))
+ (of //.equivalence = /.cyan /.aqua))
(_.coverage [/.fuchsia]
- (at //.equivalence = /.magenta /.fuchsia))
+ (of //.equivalence = /.magenta /.fuchsia))
))))
)
diff --git a/stdlib/source/test/lux/data/color/pigment.lux b/stdlib/source/test/lux/data/color/pigment.lux
new file mode 100644
index 000000000..b1798e438
--- /dev/null
+++ b/stdlib/source/test/lux/data/color/pigment.lux
@@ -0,0 +1,34 @@
+(.require
+ [library
+ [lux (.except)
+ [abstract
+ [monad (.only do)]]
+ [math
+ ["[0]" random (.only Random)]
+ [number
+ ["r" rev]]]
+ [test
+ ["_" property (.only Test)]]]]
+ [\\library
+ ["[0]" /]])
+
+(def .public test
+ Test
+ (<| (_.covering /._)
+ (do [! random.monad]
+ [alpha random.rev])
+ (_.for [/.Alpha /.Pigment])
+ (all _.and
+ (_.coverage [/.transparent]
+ (and (not (r.< /.transparent alpha))
+ (|> alpha
+ (r.+ /.transparent)
+ (r.= alpha))))
+ (_.coverage [/.opaque]
+ (not (r.> /.opaque alpha)))
+ (_.coverage [/.translucent]
+ (and (r.< /.opaque /.translucent)
+ (r.> /.transparent /.translucent)
+ (r.= /.transparent
+ (r.+ /.translucent /.translucent))))
+ )))
diff --git a/stdlib/source/test/lux/data/color/rgb.lux b/stdlib/source/test/lux/data/color/rgb.lux
index c0d329631..a1899e63c 100644
--- a/stdlib/source/test/lux/data/color/rgb.lux
+++ b/stdlib/source/test/lux/data/color/rgb.lux
@@ -123,7 +123,7 @@
(and (not (/#= expected ~expected))
(/#= expected (/.complement ~expected)))))
(_.coverage [/.black /.white]
- (and (at /.equivalence = /.white (/.complement /.black))
- (at /.equivalence = /.black (/.complement /.white))))
+ (and (of /.equivalence = /.white (/.complement /.black))
+ (of /.equivalence = /.black (/.complement /.white))))
))
)))
diff --git a/stdlib/source/test/lux/data/color/terminal.lux b/stdlib/source/test/lux/data/color/terminal.lux
index a22173fbf..9b734041d 100644
--- a/stdlib/source/test/lux/data/color/terminal.lux
+++ b/stdlib/source/test/lux/data/color/terminal.lux
@@ -83,7 +83,7 @@
(and (text.contains? expected_text it)
(not (text#= expected_text it)))))
(_.coverage [/.foreground /.background]
- (not (at /.equivalence =
+ (not (of /.equivalence =
(/.foreground color)
(/.background color))))
(`` (_.coverage [(,, (with_template [<command>]
@@ -96,7 +96,7 @@
true
{.#Item head tail}
- (and (list.every? (|>> (at /.equivalence = head) not) tail)
+ (and (list.every? (|>> (of /.equivalence = head) not) tail)
(again tail))))))
)))
)
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index caabbe222..60140bae6 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -72,23 +72,23 @@
(_.for [\\parser.Parser])
(`` (all _.and
(do [! random.monad]
- [expected (at ! each (|>> {/.#String}) (random.unicode 1))]
+ [expected (of ! each (|>> {/.#String}) (random.unicode 1))]
(_.coverage [\\parser.result \\parser.any]
(|> (\\parser.result \\parser.any expected)
(!expect (^.multi {try.#Success actual}
- (at /.equivalence = expected actual))))))
+ (of /.equivalence = expected actual))))))
(_.coverage [\\parser.null]
(|> (\\parser.result \\parser.null {/.#Null})
(!expect {try.#Success _})))
(,, (with_template [<query> <test> <check> <random> <json> <equivalence>]
[(do [! random.monad]
[expected <random>
- dummy (|> <random> (random.only (|>> (at <equivalence> = expected) not)))]
+ dummy (|> <random> (random.only (|>> (of <equivalence> = expected) not)))]
(all _.and
(_.coverage [<query>]
(|> (\\parser.result <query> {<json> expected})
(!expect (^.multi {try.#Success actual}
- (at <equivalence> = expected actual)))))
+ (of <equivalence> = expected actual)))))
(_.coverage [<test>]
(and (|> (\\parser.result (<test> expected) {<json> expected})
(!expect {try.#Success .true}))
@@ -113,7 +113,7 @@
(exception.match? \\parser.unexpected_value error))))))
(do [! random.monad]
[expected (random.unicode 1)
- dummy (|> (random.unicode 1) (random.only (|>> (at text.equivalence = expected) not)))]
+ dummy (|> (random.unicode 1) (random.only (|>> (of text.equivalence = expected) not)))]
(_.coverage [\\parser.value_mismatch]
(|> (\\parser.result (\\parser.this_string expected) {/.#String dummy})
(!expect (^.multi {try.#Failure error}
@@ -123,22 +123,22 @@
(_.coverage [\\parser.nullable]
(and (|> (\\parser.result (\\parser.nullable \\parser.string) {/.#Null})
(!expect (^.multi {try.#Success actual}
- (at (maybe.equivalence text.equivalence) = {.#None} actual))))
+ (of (maybe.equivalence text.equivalence) = {.#None} actual))))
(|> (\\parser.result (\\parser.nullable \\parser.string) {/.#String expected})
(!expect (^.multi {try.#Success actual}
- (at (maybe.equivalence text.equivalence) = {.#Some expected} actual)))))))
+ (of (maybe.equivalence text.equivalence) = {.#Some expected} actual)))))))
(do [! random.monad]
- [size (at ! each (n.% 10) random.nat)
+ [size (of ! each (n.% 10) random.nat)
expected (|> (random.unicode 1)
(random.list size)
- (at ! each sequence.of_list))]
+ (of ! each sequence.of_list))]
(_.coverage [\\parser.array]
(|> (\\parser.result (\\parser.array (<>.some \\parser.string))
{/.#Array (sequence#each (|>> {/.#String}) expected)})
(!expect (^.multi {try.#Success actual}
- (at (sequence.equivalence text.equivalence) = expected (sequence.of_list actual)))))))
+ (of (sequence.equivalence text.equivalence) = expected (sequence.of_list actual)))))))
(do [! random.monad]
- [expected (at ! each (|>> {/.#String}) (random.unicode 1))]
+ [expected (of ! each (|>> {/.#String}) (random.unicode 1))]
(_.coverage [\\parser.unconsumed_input]
(|> (\\parser.result (\\parser.array \\parser.any) {/.#Array (sequence expected expected)})
(!expect (^.multi {try.#Failure error}
@@ -152,7 +152,7 @@
expected_number ..safe_frac
expected_string (random.unicode 1)
[boolean_field number_field string_field] (|> (random.set text.hash 3 (random.unicode 3))
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(pipe.when
(list boolean_field number_field string_field)
[boolean_field number_field string_field]
@@ -170,11 +170,11 @@
[number_field {/.#Number expected_number}]
[string_field {/.#String expected_string}]))})
(!expect (^.multi {try.#Success [actual_boolean actual_number actual_string]}
- (and (at bit.equivalence = expected_boolean actual_boolean)
- (at frac.equivalence = expected_number actual_number)
- (at text.equivalence = expected_string actual_string)))))))
+ (and (of bit.equivalence = expected_boolean actual_boolean)
+ (of frac.equivalence = expected_number actual_number)
+ (of text.equivalence = expected_string actual_string)))))))
(do [! random.monad]
- [size (at ! each (n.% 10) random.nat)
+ [size (of ! each (n.% 10) random.nat)
keys (random.list size (random.unicode 1))
values (random.list size (random.unicode 1))
.let [expected (dictionary.of_list text.hash (list.zipped_2 keys values))]]
@@ -186,7 +186,7 @@
(list.zipped_2 keys)
(dictionary.of_list text.hash))})
(!expect (^.multi {try.#Success actual}
- (at (dictionary.equivalence text.equivalence) = expected actual))))))
+ (of (dictionary.equivalence text.equivalence) = expected actual))))))
))))
(type Variant
@@ -227,12 +227,12 @@
(def measure
(All (_ unit) (Random (unit.Measure unit)))
- (at random.monad each unit.measure random.int))
+ (of random.monad each unit.measure random.int))
(def gen_record
(Random Record)
(do [! random.monad]
- [size (at ! each (n.% 2) random.nat)]
+ [size (of ! each (n.% 2) random.nat)]
(all random.and
random.bit
random.safe_frac
@@ -270,9 +270,9 @@
(random.rec
(function (_ again)
(do [! random.monad]
- [size (at ! each (n.% 2) random.nat)]
+ [size (of ! each (n.% 2) random.nat)]
(all random.or
- (at ! in [])
+ (of ! in [])
random.bit
random.safe_frac
(random.unicode size)
@@ -319,7 +319,7 @@
(random#in [text.double_quote text.double_quote])
(random#in ["\" "\\"])
(do [! random.monad]
- [char (at ! each (i64.and (hex "FF"))
+ [char (of ! each (i64.and (hex "FF"))
random.nat)]
(in [(text.of_char char)
(format "\u" (digits/4 char))]))
@@ -349,16 +349,16 @@
[expected escaped] any_string]
(_.coverage [/.#String]
(|> {/.#String escaped}
- (at /.codec encoded)
- (at /.codec decoded)
- (try#each (at /.equivalence = {/.#String expected}))
+ (of /.codec encoded)
+ (of /.codec decoded)
+ (try#each (of /.equivalence = {/.#String expected}))
(try.else false))))
))
(do random.monad
[sample ..random]
(_.coverage [/.Null /.#Null /.null?]
- (at bit.equivalence =
+ (of bit.equivalence =
(/.null? sample)
(when sample
{/.#Null} true
@@ -368,7 +368,7 @@
(_.coverage [/.format]
(|> expected
/.format
- (at /.codec decoded)
+ (of /.codec decoded)
(try#each (/#= expected))
(try.else false))))
(do random.monad
@@ -381,7 +381,7 @@
(_.coverage [/.object /.fields]
(when (/.fields object)
{try.#Success actual}
- (at (list.equivalence text.equivalence) =
+ (of (list.equivalence text.equivalence) =
(list#each product.left expected)
actual)
@@ -396,7 +396,7 @@
))
(do random.monad
[key (random.alphabetic 1)
- unknown (random.only (|>> (at text.equivalence = key) not)
+ unknown (random.only (|>> (of text.equivalence = key) not)
(random.alphabetic 1))
expected random.safe_frac]
(_.coverage [/.has]
@@ -425,7 +425,7 @@
(_.coverage [<type> <tag> <field>]
(|> (/.object (list [key {<tag> value}]))
(<field> key)
- (try#each (at <equivalence> = value))
+ (try#each (of <equivalence> = value))
(try.else false))))]
[/.Boolean /.boolean_field /.#Boolean random.bit bit.equivalence]
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 01f8648c1..f5133d4e5 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -109,8 +109,8 @@
Test
(_.for [/.Small]
(do [! random.monad]
- [expected (|> random.nat (at ! each (n.% /.small_limit)))
- invalid (|> random.nat (at ! each (n.max /.small_limit)))]
+ [expected (|> random.nat (of ! each (n.% /.small_limit)))
+ invalid (|> random.nat (of ! each (n.max /.small_limit)))]
(`` (all _.and
(_.coverage [/.small /.from_small]
(when (/.small expected)
@@ -133,8 +133,8 @@
Test
(_.for [/.Big]
(do [! random.monad]
- [expected (|> random.nat (at ! each (n.% /.big_limit)))
- invalid (|> random.nat (at ! each (n.max /.big_limit)))]
+ [expected (|> random.nat (of ! each (n.% /.big_limit)))
+ invalid (|> random.nat (of ! each (n.max /.big_limit)))]
(`` (all _.and
(_.coverage [/.big /.from_big]
(when (/.big expected)
@@ -159,14 +159,14 @@
Test
(do [! random.monad]
[expected_path (random.lower_cased (-- /.path_size))
- expected_moment (at ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
+ expected_moment (of ! each (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
random.nat)
chunk (random.lower_cased chunk_size)
- chunks (at ! each (n.% 100) random.nat)
+ chunks (of ! each (n.% 100) random.nat)
.let [content (|> chunk
(list.repeated chunks)
text.together
- (at utf8.codec encoded))]]
+ (of utf8.codec encoded))]]
(`` (all _.and
(,, (with_template [<type> <tag>]
[(_.coverage [<type>]
@@ -403,7 +403,7 @@
(|> sequence.empty
(\\format.result /.format)
(<b>.result /.parser)
- (at try.monad each sequence.empty?)
+ (of try.monad each sequence.empty?)
(try.else false)))
(_.coverage [/.invalid_end_of_archive]
(let [dump (\\format.result /.format sequence.empty)]
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 653027509..644064c47 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -78,7 +78,7 @@
[[(<>#in expected)
{/.#Text expected}]])
(do [! random.monad]
- [expected (at ! each (|>> {/.#Text}) (random.alphabetic 1))]
+ [expected (of ! each (|>> {/.#Text}) (random.alphabetic 1))]
(_.coverage [\\parser.any]
(|> (\\parser.result \\parser.any (list expected))
(try#each (/#= expected))
@@ -168,7 +168,7 @@
(<>#in []))
_ (<>.some \\parser.any)]
(in [])))]
- repetitions (at ! each (n.% 10) random.nat)]
+ repetitions (of ! each (n.% 10) random.nat)]
(all _.and
(_.coverage [\\parser.somewhere]
(|> (\\parser.result parser
@@ -195,7 +195,7 @@
(def char
(Random Nat)
(do [! random.monad]
- [idx (|> random.nat (at ! each (n.% (text.size char_range))))]
+ [idx (|> random.nat (of ! each (n.% (text.size char_range))))]
(in (maybe.trusted (text.char idx char_range)))))
(def (size bottom top)
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index af76cff0c..458264a0f 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -33,9 +33,9 @@
right random.nat]
(_.coverage [/.hash]
(let [hash (/.hash i.hash n.hash)]
- (n.= (n.+ (at i.hash hash left)
- (at n.hash hash right))
- (at hash hash [left right])))))
+ (n.= (n.+ (of i.hash hash left)
+ (of n.hash hash right))
+ (of hash hash [left right])))))
(<| (_.coverage [/.left])
(n.= expected (/.left [expected dummy])))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index b0956f5ba..ead537253 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -68,25 +68,25 @@
(/.then (n.+ shift) (n.- shift))
(pipe.when {0 #1 actual} (n.= (n.- shift expected) actual) _ false))))
(do !
- [size (at ! each (n.% 5) random.nat)
+ [size (of ! each (n.% 5) random.nat)
expected (random.list size random.nat)]
(all _.and
(_.coverage [/.lefts]
(let [actual (is (List (Or Nat Nat))
(list#each /.left expected))]
- (and (at (list.equivalence n.equivalence) =
+ (and (of (list.equivalence n.equivalence) =
expected
(/.lefts actual))
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list)
(/.rights actual)))))
(_.coverage [/.rights]
(let [actual (is (List (Or Nat Nat))
(list#each /.right expected))]
- (and (at (list.equivalence n.equivalence) =
+ (and (of (list.equivalence n.equivalence) =
expected
(/.rights actual))
- (at (list.equivalence n.equivalence) =
+ (of (list.equivalence n.equivalence) =
(list)
(/.lefts actual)))))
(_.coverage [/.partition]
@@ -97,10 +97,10 @@
(/.right value))))
(is (List (Or Nat Nat)))
/.partition)]
- (and (at (list.equivalence n.equivalence) =
+ (and (of (list.equivalence n.equivalence) =
(list.only n.even? expected)
lefts)
- (at (list.equivalence n.equivalence) =
+ (of (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 1ee5a2bf0..dd867436b 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -106,7 +106,7 @@
[(do random.monad
[sample <random>]
(_.coverage [<format>]
- (/#= (at <codec> encoded sample)
+ (/#= (of <codec> encoded sample)
(<format> sample))))]
[\\format.bit bit.codec random.bit]
@@ -207,10 +207,10 @@
[modulus (random.one (|>> modulus.modulus
try.maybe)
random.int)
- sample (at ! each (modular.modular modulus)
+ sample (of ! each (modular.modular modulus)
random.int)]
(_.coverage [\\format.mod]
- (/#= (at (modular.codec modulus) encoded sample)
+ (/#= (of (modular.codec modulus) encoded sample)
(\\format.mod sample))))
))))
@@ -245,7 +245,7 @@
(-> Text (\\parser.Parser Text) Bit)
(|> expected
(\\parser.result parser)
- (at try.functor each (/#= expected))
+ (of try.functor each (/#= expected))
(try.else false)))
(def (should_pass! expected parser)
@@ -256,13 +256,13 @@
Test
(all _.and
(do [! random.monad]
- [offset (at ! each (nat.% 50) random.nat)
- range (at ! each (|>> (nat.% 50) (nat.+ 10)) random.nat)
+ [offset (of ! each (nat.% 50) random.nat)
+ range (of ! each (|>> (nat.% 50) (nat.+ 10)) random.nat)
.let [limit (nat.+ offset range)]
- expected (at ! each (|>> (nat.% range) (nat.+ offset) /.of_char) random.nat)
+ expected (of ! each (|>> (nat.% range) (nat.+ offset) /.of_char) random.nat)
out_of_range (when offset
- 0 (at ! each (|>> (nat.% 10) ++ (nat.+ limit) /.of_char) random.nat)
- _ (at ! each (|>> (nat.% offset) /.of_char) random.nat))]
+ 0 (of ! each (|>> (nat.% 10) ++ (nat.+ limit) /.of_char) random.nat)
+ _ (of ! each (|>> (nat.% offset) /.of_char) random.nat))]
(_.coverage [\\parser.range]
(and (..should_pass expected (\\parser.range offset limit))
(..should_fail out_of_range (\\parser.range offset limit)))))
@@ -281,22 +281,22 @@
(and (..should_pass (/.of_char expected) \\parser.lower)
(..should_fail (/.of_char invalid) \\parser.lower))))
(do [! random.monad]
- [expected (at ! each (nat.% 10) random.nat)
+ [expected (of ! each (nat.% 10) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.coverage [\\parser.decimal]
- (and (..should_pass (at nat.decimal encoded expected) \\parser.decimal)
+ (and (..should_pass (of nat.decimal encoded expected) \\parser.decimal)
(..should_fail (/.of_char invalid) \\parser.decimal))))
(do [! random.monad]
- [expected (at ! each (nat.% 8) random.nat)
+ [expected (of ! each (nat.% 8) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.coverage [\\parser.octal]
- (and (..should_pass (at nat.octal encoded expected) \\parser.octal)
+ (and (..should_pass (of nat.octal encoded expected) \\parser.octal)
(..should_fail (/.of_char invalid) \\parser.octal))))
(do [! random.monad]
- [expected (at ! each (nat.% 16) random.nat)
+ [expected (of ! each (nat.% 16) random.nat)
invalid (random.char (unicode.set [unicode/block.number_forms (list)]))]
(_.coverage [\\parser.hexadecimal]
- (and (..should_pass (at nat.hex encoded expected) \\parser.hexadecimal)
+ (and (..should_pass (of nat.hex encoded expected) \\parser.hexadecimal)
(..should_fail (/.of_char invalid) \\parser.hexadecimal))))
(do [! random.monad]
[expected (random.char unicode.alphabetic)
@@ -339,10 +339,10 @@
[.let [num_options 3]
options (|> (random.char unicode.character)
(random.set nat.hash num_options)
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(list#each /.of_char)
/.together)))
- expected (at ! each (function (_ value)
+ expected (of ! each (function (_ value)
(|> options
(/.char (nat.% num_options value))
maybe.trusted))
@@ -365,10 +365,10 @@
[.let [num_options 3]
options (|> (random.char unicode.character)
(random.set nat.hash num_options)
- (at ! each (|>> set.list
+ (of ! each (|>> set.list
(list#each /.of_char)
/.together)))
- invalid (at ! each (function (_ value)
+ invalid (of ! each (function (_ value)
(|> options
(/.char (nat.% num_options value))
maybe.trusted))
@@ -394,26 +394,26 @@
(let [octal! (\\parser.one_of! "01234567")]
(all _.and
(do [! random.monad]
- [left (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)
- right (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)
+ [left (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)
+ right (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)
.let [expected (\\format.format left right)]
invalid (|> random.nat
- (at ! each (nat.% 16))
+ (of ! each (nat.% 16))
(random.only (nat.>= 8))
- (at ! each (at nat.hex encoded)))]
+ (of ! each (of nat.hex encoded)))]
(_.coverage [\\parser.many \\parser.many!]
(and (..should_pass expected (\\parser.many \\parser.octal))
(..should_fail invalid (\\parser.many \\parser.octal))
(..should_pass! expected (\\parser.many! octal!)))))
(do [! random.monad]
- [left (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)
- right (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)
+ [left (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)
+ right (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)
.let [expected (\\format.format left right)]
invalid (|> random.nat
- (at ! each (nat.% 16))
+ (of ! each (nat.% 16))
(random.only (nat.>= 8))
- (at ! each (at nat.hex encoded)))]
+ (of ! each (of nat.hex encoded)))]
(_.coverage [\\parser.some \\parser.some!]
(and (..should_pass expected (\\parser.some \\parser.octal))
(..should_pass "" (\\parser.some \\parser.octal))
@@ -422,7 +422,7 @@
(..should_pass! expected (\\parser.some! octal!))
(..should_pass! "" (\\parser.some! octal!)))))
(do [! random.monad]
- [.let [octal (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)]
+ [.let [octal (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -435,7 +435,7 @@
(..should_fail (\\format.format first second third) (\\parser.exactly! 2 octal!))
(..should_fail (\\format.format first) (\\parser.exactly! 2 octal!)))))
(do [! random.monad]
- [.let [octal (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)]
+ [.let [octal (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -448,7 +448,7 @@
(..should_pass! (\\format.format first) (\\parser.at_most! 2 octal!))
(..should_fail (\\format.format first second third) (\\parser.at_most! 2 octal!)))))
(do [! random.monad]
- [.let [octal (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)]
+ [.let [octal (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -461,7 +461,7 @@
(..should_pass! (\\format.format first second third) (\\parser.at_least! 2 octal!))
(..should_fail (\\format.format first) (\\parser.at_least! 2 octal!)))))
(do [! random.monad]
- [.let [octal (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)]
+ [.let [octal (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)]
first octal
second octal
third octal]
@@ -573,7 +573,7 @@
(\\parser.this output)))
(!expect {try.#Success _}))))
(do [! random.monad]
- [expected (at ! each (|>> (nat.% 8) (at nat.octal encoded)) random.nat)]
+ [expected (of ! each (|>> (nat.% 8) (of nat.octal encoded)) random.nat)]
(_.coverage [\\parser.then]
(|> (list (code.text expected))
(<code>.result (\\parser.then \\parser.octal <code>.text))
@@ -629,12 +629,12 @@
(def bounded_size
(random.Random Nat)
(|> random.nat
- (at random.monad each (|>> (nat.% 20) (nat.+ 1)))))
+ (of random.monad each (|>> (nat.% 20) (nat.+ 1)))))
(def size
Test
(do [! random.monad]
- [size (at ! each (nat.% 10) random.nat)
+ [size (of ! each (nat.% 10) random.nat)
sample (random.unicode size)]
(all _.and
(_.coverage [/.size]
@@ -647,11 +647,11 @@
Test
(do [! random.monad]
[inner (random.unicode 1)
- outer (random.only (|>> (at /.equivalence = inner) not)
+ outer (random.only (|>> (of /.equivalence = inner) not)
(random.unicode 1))
left (random.unicode 1)
right (random.unicode 1)
- .let [full (at /.monoid composite inner outer)
+ .let [full (of /.monoid composite inner outer)
fake_index (-- 0)]]
(`` (all _.and
(,, (with_template [<affix> <predicate>]
@@ -676,23 +676,23 @@
Test
(do [! random.monad]
[inner (random.unicode 1)
- outer (random.only (|>> (at /.equivalence = inner) not)
+ outer (random.only (|>> (of /.equivalence = inner) not)
(random.unicode 1))
.let [fake_index (-- 0)]]
(all _.and
(_.coverage [/.contains?]
- (let [full (at /.monoid composite inner outer)]
+ (let [full (of /.monoid composite inner outer)]
(and (/.contains? inner full)
(/.contains? outer full))))
(_.coverage [/.index]
- (and (|> (/.index inner (at /.monoid composite inner outer))
+ (and (|> (/.index inner (of /.monoid composite inner outer))
(maybe.else fake_index)
(nat.= 0))
- (|> (/.index outer (at /.monoid composite inner outer))
+ (|> (/.index outer (of /.monoid composite inner outer))
(maybe.else fake_index)
(nat.= 1))))
(_.coverage [/.index_since]
- (let [full (at /.monoid composite inner outer)]
+ (let [full (of /.monoid composite inner outer)]
(and (|> (/.index_since 0 inner full)
(maybe.else fake_index)
(nat.= 0))
@@ -710,7 +710,7 @@
(maybe.else fake_index)
(nat.= fake_index)))))
(_.coverage [/.last_index]
- (let [full (all (at /.monoid composite) outer inner outer)]
+ (let [full (all (of /.monoid composite) outer inner outer)]
(and (|> (/.last_index inner full)
(maybe.else fake_index)
(nat.= 1))
@@ -726,7 +726,7 @@
(`` (all _.and
(,, (with_template [<short> <long>]
[(_.coverage [<short> <long>]
- (at /.equivalence = <short> <long>))]
+ (of /.equivalence = <short> <long>))]
[/.\0 /.null]
[/.\a /.alarm]
@@ -738,13 +738,13 @@
[/.\r /.carriage_return]
[/.\'' /.double_quote]))
(_.coverage [/.line_feed]
- (at /.equivalence = /.new_line /.line_feed))
+ (of /.equivalence = /.new_line /.line_feed))
)))
(do [! random.monad]
- [size (at ! each (|>> (nat.% 10) ++) random.nat)
+ [size (of ! each (|>> (nat.% 10) ++) random.nat)
characters (random.set /.hash size (random.alphabetic 1))
.let [sample (|> characters set.list /.together)]
- expected (at ! each (nat.% size) random.nat)]
+ expected (of ! each (nat.% size) random.nat)]
(_.coverage [/.char]
(when (/.char expected sample)
{.#Some char}
@@ -773,13 +773,13 @@
(def manipulation
Test
(do [! random.monad]
- [size (at ! each (|>> (nat.% 10) (nat.+ 2)) random.nat)
+ [size (of ! each (|>> (nat.% 10) (nat.+ 2)) random.nat)
characters (random.set /.hash size (random.alphabetic 1))
separator (random.only (|>> (set.member? characters) not)
(random.alphabetic 1))
.let [with_no_separator (|> characters set.list /.together)]
static (random.alphabetic 1)
- .let [dynamic (random.only (|>> (at /.equivalence = static) not)
+ .let [dynamic (random.only (|>> (of /.equivalence = static) not)
(random.alphabetic 1))]
pre dynamic
post dynamic
@@ -795,19 +795,19 @@
(/.interposed separator)
(/.all_split_by separator)
(set.of_list /.hash)
- (at set.equivalence = characters))
- (at /.equivalence =
+ (of set.equivalence = characters))
+ (of /.equivalence =
(/.together (set.list characters))
(/.interposed "" (set.list characters)))))
(_.coverage [/.replaced_once]
- (at /.equivalence =
- (at /.monoid composite post static)
- (/.replaced_once pre post (at /.monoid composite pre static))))
+ (of /.equivalence =
+ (of /.monoid composite post static)
+ (/.replaced_once pre post (of /.monoid composite pre static))))
(_.coverage [/.split_by]
- (when (/.split_by static (all (at /.monoid composite) pre static post))
+ (when (/.split_by static (all (of /.monoid composite) pre static post))
{.#Some [left right]}
- (and (at /.equivalence = pre left)
- (at /.equivalence = post right))
+ (and (of /.equivalence = pre left)
+ (of /.equivalence = post right))
{.#None}
false))
@@ -815,19 +815,19 @@
(let [effectiveness!
(|> upper
/.lower_cased
- (at /.equivalence = upper)
+ (of /.equivalence = upper)
not)
idempotence!
(|> lower
/.lower_cased
- (at /.equivalence = lower))
+ (of /.equivalence = lower))
inverse!
(|> lower
/.upper_cased
/.lower_cased
- (at /.equivalence = lower))]
+ (of /.equivalence = lower))]
(and effectiveness!
idempotence!
inverse!)))
@@ -835,19 +835,19 @@
(let [effectiveness!
(|> lower
/.upper_cased
- (at /.equivalence = lower)
+ (of /.equivalence = lower)
not)
idempotence!
(|> upper
/.upper_cased
- (at /.equivalence = upper))
+ (of /.equivalence = upper))
inverse!
(|> upper
/.lower_cased
/.upper_cased
- (at /.equivalence = upper))]
+ (of /.equivalence = upper))]
(and effectiveness!
idempotence!
inverse!)))
@@ -913,7 +913,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 (at ! each (|>> (nat.% 128) (nat.max 1))))]
+ normal_char_gen (|> random.nat (of ! each (|>> (nat.% 128) (nat.max 1))))]
sep1 (random.text normal_char_gen 1)
sep2 (random.text normal_char_gen 1)
.let [part_gen (|> (random.text normal_char_gen sizeP)
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index 54f74359c..adf184d8f 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -18,7 +18,7 @@
(def part
(Random Text)
(do [! random.monad]
- [size (at ! each (|>> (n.% 10) ++) random.nat)]
+ [size (of ! each (|>> (n.% 10) ++) random.nat)]
(random.alphabetic size)))
(def .public test
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index 2e5b0fad9..e573de1d3 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -216,7 +216,7 @@
(Random /.Encoding)
(let [options (list.size ..all_encodings)]
(do [! random.monad]
- [choice (at ! each (n.% options) random.nat)]
+ [choice (of ! 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 82be1dcb4..0ce18a8d8 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -35,7 +35,7 @@
(def (range max min)
(-> Char Char (Random Char))
(let [range (n.- min max)]
- (at random.monad each
+ (of random.monad each
(|>> (n.% range) (n.+ min))
random.nat)))
@@ -118,7 +118,7 @@
(text#= expected (/.escaped expected))))))
(do [! random.monad]
[dummy (|> (random.char unicode.character)
- (at ! each text.of_char))]
+ (of ! each text.of_char))]
(_.coverage [/.dangling_escape]
(when (/.un_escaped (format (/.escaped dummy) "\"))
{try.#Success _}
@@ -129,7 +129,7 @@
(do [! random.monad]
[dummy (|> (random.char unicode.character)
(random.only (|>> (set.member? ..valid_sigils) not))
- (at ! each text.of_char))]
+ (of ! each text.of_char))]
(_.coverage [/.invalid_escape]
(when (/.un_escaped (format "\" dummy))
{try.#Success _}
@@ -139,10 +139,10 @@
(exception.match? /.invalid_escape error))))
(do [! random.monad]
[too_short (|> (random.char unicode.character)
- (at ! each (n.% (hex "1000"))))
+ (of ! each (n.% (hex "1000"))))
code (|> (random.unicode 4)
(random.only (function (_ code)
- (when (at n.hex decoded code)
+ (when (of n.hex decoded code)
{try.#Failure error} true
{try.#Success _} false))))]
(_.coverage [/.invalid_unicode_escape]
@@ -153,7 +153,7 @@
{try.#Failure error}
(exception.match? /.invalid_unicode_escape error))]]
- (and (!invalid (at n.hex encoded too_short))
+ (and (!invalid (of n.hex encoded too_short))
(!invalid code)))))
(_.coverage [/.literal]
(with_expansions [<example> (..static_sample)]
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index 75756fd45..6ea3e3493 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -27,8 +27,8 @@
(def .public random
(Random /.Block)
(do [! random.monad]
- [start (at ! each (n.% 1,000,000) random.nat)
- additional (at ! each (n.% 1,000,000) random.nat)]
+ [start (of ! each (n.% 1,000,000) random.nat)
+ additional (of ! each (n.% 1,000,000) random.nat)]
(in (/.block start additional))))
(with_expansions [<blocks> (these [blocks/0
@@ -175,12 +175,12 @@
[.let [top_start (hex "AC00")
top_end (hex "D7AF")
end_range (n.- top_start top_end)]
- start (at ! each (|>> (n.% top_start) ++) random.nat)
- end (at ! each (|>> (n.% end_range) (n.+ top_start)) random.nat)
+ start (of ! each (|>> (n.% top_start) ++) random.nat)
+ end (of ! each (|>> (n.% end_range) (n.+ top_start)) random.nat)
.let [additional (n.- start end)
sample (/.block start additional)
size (/.size sample)]
- inside (at ! each
+ inside (of ! 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 b5dbad749..1c62d0eda 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -37,7 +37,7 @@
(_.for [/.Set])
(do [! random.monad]
[block //block.random
- inside (at ! each
+ inside (of ! each
(|>> (n.% (block.size block))
(n.+ (block.start block)))
random.nat)
diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux
index 83fe198e3..c107d205e 100644
--- a/stdlib/source/test/lux/documentation.lux
+++ b/stdlib/source/test/lux/documentation.lux
@@ -36,7 +36,7 @@
(def description
(syntax (_ [])
- (at meta.monad each
+ (of meta.monad each
(|>> %.nat code.text list)
meta.seed)))
diff --git a/stdlib/source/test/lux/ffi.js.lux b/stdlib/source/test/lux/ffi.js.lux
index ba09925f2..2c5ffacb8 100644
--- a/stdlib/source/test/lux/ffi.js.lux
+++ b/stdlib/source/test/lux/ffi.js.lux
@@ -52,9 +52,9 @@
Test
(do [! random.monad]
[boolean random.bit
- number (at ! each (|>> (nat.% 100) nat.frac) random.nat)
+ number (of ! each (|>> (nat.% 100) nat.frac) random.nat)
string (random.ascii 5)
- function (at ! each (function (_ shift)
+ function (of ! each (function (_ shift)
(is (-> Nat Nat)
(nat.+ shift)))
random.nat)
diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux
index 2361c5625..a80a7f63b 100644
--- a/stdlib/source/test/lux/ffi.jvm.lux
+++ b/stdlib/source/test/lux/ffi.jvm.lux
@@ -88,13 +88,13 @@
(def for_conversions
Test
(do [! random.monad]
- [long (at ! each (|>> /.as_long) random.int)
- integer (at ! each (|>> /.as_int) random.int)
- byte (at ! each (|>> /.as_byte) random.int)
- short (at ! each (|>> /.as_short) random.int)
+ [long (of ! each (|>> /.as_long) random.int)
+ integer (of ! each (|>> /.as_int) random.int)
+ byte (of ! each (|>> /.as_byte) random.int)
+ short (of ! each (|>> /.as_short) random.int)
float (|> random.frac
(random.only (|>> f.not_a_number? not))
- (at ! each (|>> /.as_float)))]
+ (of ! each (|>> /.as_float)))]
(`` (all _.and
(,, (with_template [<sample> <=> <to> <from>]
[(_.coverage [<to> <from>]
@@ -123,9 +123,9 @@
(def for_arrays
Test
(do [! random.monad]
- [size (|> random.nat (at ! each (|>> (n.% 100) (n.max 1))))
- idx (|> random.nat (at ! each (n.% size)))
- value (at ! each (|>> /.as_long) random.int)]
+ [size (|> random.nat (of ! each (|>> (n.% 100) (n.max 1))))
+ idx (|> random.nat (of ! each (n.% size)))
+ value (of ! each (|>> /.as_long) random.int)]
(all _.and
(_.coverage [/.array /.length]
(|> size
@@ -149,21 +149,21 @@
(def for_miscellaneous
Test
(`` (do [! random.monad]
- [sample (at ! each (|>> (as java/lang/Object))
+ [sample (of ! each (|>> (as java/lang/Object))
(random.ascii 1))
- boolean (at ! each (|>> /.as_boolean) random.bit)
- byte (at ! each (|>> /.as_byte) random.int)
- short (at ! each (|>> /.as_short) random.int)
- integer (at ! each (|>> /.as_int) random.int)
- long (at ! each (|>> /.as_long) random.int)
+ boolean (of ! each (|>> /.as_boolean) random.bit)
+ byte (of ! each (|>> /.as_byte) random.int)
+ short (of ! each (|>> /.as_short) random.int)
+ integer (of ! each (|>> /.as_int) random.int)
+ long (of ! each (|>> /.as_long) random.int)
float (|> random.frac
(random.only (|>> f.not_a_number? not))
- (at ! each (|>> /.as_float)))
+ (of ! each (|>> /.as_float)))
double (|> random.frac
(random.only (|>> f.not_a_number? not))
- (at ! each (|>> /.as_double)))
- character (at ! each (|>> /.as_int /.int_to_char) random.int)
- string (at ! each (|>> /.as_string)
+ (of ! each (|>> /.as_double)))
+ character (of ! each (|>> /.as_int /.int_to_char) random.int)
+ string (of ! each (|>> /.as_string)
(random.ascii 1))
bit/0 random.bit]
@@ -618,7 +618,7 @@
(/.of_long (test/TestInterface4::actual4 (/.as_long left) (/.as_long right) object_8))))]
.let [random_long (is (Random java/lang/Long)
- (at ! each (|>> /.as_long)
+ (of ! each (|>> /.as_long)
random.int))]
dummy/0 random_long
dummy/1 random_long
diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux
index e3ea06d48..2702b894b 100644
--- a/stdlib/source/test/lux/ffi.old.lux
+++ b/stdlib/source/test/lux/ffi.old.lux
@@ -94,13 +94,13 @@
Test
(do [! random.monad]
[long random.int
- int (at ! each (|>> /.long_to_int) random.int)
- char (at ! each (|>> /.long_to_int /.int_to_char) random.int)
+ int (of ! each (|>> /.long_to_int) random.int)
+ char (of ! each (|>> /.long_to_int /.int_to_char) random.int)
double (|> random.frac
(random.only (|>> f.not_a_number? not)))
float (|> random.frac
(random.only (|>> f.not_a_number? not))
- (at ! each (|>> /.double_to_float)))]
+ (of ! each (|>> /.double_to_float)))]
(`` (all _.and
(,, (with_template [<=> <sample> <to> <from>]
[(_.coverage [<to> <from>]
@@ -161,8 +161,8 @@
(def arrays
Test
(do [! random.monad]
- [size (|> random.nat (at ! each (|>> (n.% 100) (n.max 1))))
- idx (|> random.nat (at ! each (n.% size)))
+ [size (|> random.nat (of ! each (|>> (n.% 100) (n.max 1))))
+ idx (|> random.nat (of ! each (n.% size)))
value random.int]
(all _.and
(_.coverage [/.array /.length]
diff --git a/stdlib/source/test/lux/ffi/export.jvm.lux b/stdlib/source/test/lux/ffi/export.jvm.lux
index a94aa11c2..70c4d1d3e 100644
--- a/stdlib/source/test/lux/ffi/export.jvm.lux
+++ b/stdlib/source/test/lux/ffi/export.jvm.lux
@@ -128,8 +128,8 @@
(<| (_.covering /._)
(do [! random.monad]
[(,, (with_template [<type> <as> <random>]
- [(,, (template.symbol [left_ <type>])) (at ! each (|>> <as>) <random>)
- (,, (template.symbol [right_ <type>])) (at ! each (|>> <as>) <random>)]
+ [(,, (template.symbol [left_ <type>])) (of ! each (|>> <as>) <random>)
+ (,, (template.symbol [right_ <type>])) (of ! each (|>> <as>) <random>)]
[boolean //.as_boolean random.bit]
[byte //.as_byte ..tiny_int]
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index 345578ead..39d67239b 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -40,9 +40,9 @@
(do [! random.monad]
[sample random.rev
- threshold_0 (at ! each (r.% .5)
+ threshold_0 (of ! each (r.% .5)
random.rev)
- threshold_1 (at ! each (|>> (r.% .5) (r.+ .5))
+ threshold_1 (of ! each (|>> (r.% .5) (r.+ .5))
random.rev)
.let [bottom (r.min threshold_0 threshold_1)
@@ -90,7 +90,7 @@
[bottom middle_bottom middle_top top]
(|> random.rev
(random.set r.hash 4)
- (at ! each (|>> set.list (list.sorted r.<)))
+ (of ! each (|>> set.list (list.sorted r.<)))
(random.one (function (_ thresholds)
(when thresholds
(list threshold_0 threshold_1 threshold_2 threshold_3)
@@ -174,7 +174,7 @@
[bottom middle_bottom middle_top top]
(|> random.rev
(random.set r.hash 4)
- (at ! each (|>> set.list (list.sorted r.<)))
+ (of ! each (|>> set.list (list.sorted r.<)))
(random.one (function (_ thresholds)
(when thresholds
(list threshold_0 threshold_1 threshold_2 threshold_3)
diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux
index 44610bd3c..686977544 100644
--- a/stdlib/source/test/lux/math/modular.lux
+++ b/stdlib/source/test/lux/math/modular.lux
@@ -33,7 +33,7 @@
(def .public (random modulus)
(All (_ %) (-> (//.Modulus %) (Random (/.Mod %))))
- (at random.monad each
+ (of random.monad each
(/.modular modulus)
random.int))
@@ -67,8 +67,8 @@
(_.coverage [/.incorrect_modulus]
(when (|> param
- (at (/.codec param::%) encoded)
- (at (/.codec subject::%) decoded))
+ (of (/.codec param::%) encoded)
+ (of (/.codec subject::%) decoded))
{try.#Failure error}
(exception.match? /.incorrect_modulus error)
diff --git a/stdlib/source/test/lux/math/modulus.lux b/stdlib/source/test/lux/math/modulus.lux
index 49c406b9b..b09c71a44 100644
--- a/stdlib/source/test/lux/math/modulus.lux
+++ b/stdlib/source/test/lux/math/modulus.lux
@@ -30,7 +30,7 @@
(def .public (random range)
(Ex (_ %) (-> Int (Random (/.Modulus %))))
(|> random.int
- (at random.monad each (i.% range))
+ (of random.monad each (i.% range))
(random.one (|>> /.modulus try.maybe))))
(def .public test
diff --git a/stdlib/source/test/lux/math/number.lux b/stdlib/source/test/lux/math/number.lux
index 536448d48..18ec4112b 100644
--- a/stdlib/source/test/lux/math/number.lux
+++ b/stdlib/source/test/lux/math/number.lux
@@ -35,7 +35,7 @@
(all _.and
(_.coverage [/.bin]
(`` (and (,, (with_template [<=> <codec> <number>]
- [(when (at <codec> decoded (..clean_commas <number>))
+ [(when (of <codec> decoded (..clean_commas <number>))
{try.#Success actual}
(<=> (/.bin <number>) actual)
@@ -54,7 +54,7 @@
)))))
(_.coverage [/.oct]
(`` (and (,, (with_template [<=> <codec> <number>]
- [(when (at <codec> decoded (..clean_commas <number>))
+ [(when (of <codec> decoded (..clean_commas <number>))
{try.#Success actual}
(<=> (/.oct <number>) actual)
@@ -73,7 +73,7 @@
)))))
(_.coverage [/.hex]
(`` (and (,, (with_template [<=> <codec> <number>]
- [(when (at <codec> decoded (..clean_commas <number>))
+ [(when (of <codec> decoded (..clean_commas <number>))
{try.#Success actual}
(<=> (/.hex <number>) actual)
diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux
index 501d01cd0..fd11abd80 100644
--- a/stdlib/source/test/lux/math/number/complex.lux
+++ b/stdlib/source/test/lux/math/number/complex.lux
@@ -28,7 +28,7 @@
(def dimension
(Random Frac)
(do [! random.monad]
- [factor (|> random.nat (at ! each (|>> (n.% 1000) (n.max 1))))
+ [factor (|> random.nat (of ! each (|>> (n.% 1000) (n.max 1))))
measure (|> random.safe_frac (random.only (f.> +0.0)))]
(in (f.* (|> factor .int int.frac)
measure))))
@@ -42,7 +42,7 @@
(def angle
(Random /.Complex)
- (at random.monad each
+ (of random.monad each
(|>> (revised /.#real (f.% +1.0))
(revised /.#imaginary (f.% +1.0)))
..random))
@@ -260,7 +260,7 @@
Test
(do [! random.monad]
[sample ..random
- degree (|> random.nat (at ! each (|>> (n.max 1) (n.% 5))))]
+ degree (|> random.nat (of ! each (|>> (n.max 1) (n.% 5))))]
(_.coverage [/.roots]
(|> sample
(/.roots degree)
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 673b04276..0e4f99ed6 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -32,7 +32,7 @@
(def random
(Random Frac)
- (at random.monad each (|>> (i.% +1,000,000) i.frac) random.int))
+ (of random.monad each (|>> (i.% +1,000,000) i.frac) random.int))
(def constant
Test
@@ -58,7 +58,7 @@
Test
(do [! random.monad]
[sample ..random
- shift (at ! each /.abs ..random)]
+ shift (of ! each /.abs ..random)]
(all _.and
(_.coverage [/.negative?]
(bit#= (/.negative? sample)
@@ -83,15 +83,15 @@
Test
(all _.and
(do [! random.monad]
- [expected (at ! each (n.% 1,000,000) random.nat)]
+ [expected (of ! each (n.% 1,000,000) random.nat)]
(_.coverage [/.nat]
(|> expected n.frac /.nat (n.= expected))))
(do [! random.monad]
- [expected (at ! each (i.% +1,000,000) random.int)]
+ [expected (of ! each (i.% +1,000,000) random.int)]
(_.coverage [/.int]
(|> expected i.frac /.int (i.= expected))))
(do [! random.monad]
- [expected (at ! each (|>> (i64.left_shifted 52) .rev)
+ [expected (of ! each (|>> (i64.left_shifted 52) .rev)
random.nat)]
(_.coverage [/.rev]
(|> expected r.frac /.rev (r.= expected))))
@@ -147,7 +147,7 @@
(all _.and
(do [! random.monad]
[.let [~= (/.approximately? ..margin_of_error)]
- angle (|> random.safe_frac (at ! each (/.* /.tau)))]
+ angle (|> random.safe_frac (of ! each (/.* /.tau)))]
(all _.and
(_.coverage [/.sin /.asin]
(trigonometric_symmetry /.sin /.asin angle))
@@ -171,7 +171,7 @@
(~= (/./ +2.0 /.tau) /.pi))
))
(do [! random.monad]
- [sample (|> random.safe_frac (at ! each (/.* +1000.0)))]
+ [sample (|> random.safe_frac (of ! each (/.* +1000.0)))]
(all _.and
(_.coverage [/.ceil]
(let [ceil'd (/.ceil sample)]
@@ -201,8 +201,8 @@
))
(do [! random.monad]
[.let [~= (/.approximately? ..margin_of_error)]
- sample (at ! each (/.* +10.0) random.safe_frac)
- power (at ! each (|>> (n.% 10) ++ n.frac) random.nat)]
+ sample (of ! each (/.* +10.0) random.safe_frac)
+ power (of ! each (|>> (n.% 10) ++ n.frac) random.nat)]
(all _.and
(_.coverage [/.exp /.log]
(|> sample /.exp /.log (/.approximately? +0.000000000000001 sample)))
@@ -217,9 +217,9 @@
))
(do [! random.monad]
[.let [~= (/.approximately? ..margin_of_error)]
- angle (at ! each (/.* /.tau) random.safe_frac)
- sample (at ! each /.abs random.safe_frac)
- big (at ! each (/.* +1,000,000,000.00) random.safe_frac)]
+ angle (of ! each (/.* /.tau) random.safe_frac)
+ sample (of ! each /.abs random.safe_frac)
+ big (of ! each (/.* +1,000,000,000.00) random.safe_frac)]
(template.let [(odd! <function>)
[(_.coverage [<function>]
(~= (/.opposite (<function> angle))
@@ -247,8 +247,8 @@
(inverse! /.atanh /.acoth big)
)))
(do [! random.monad]
- [x (at ! each (|>> (/.* +10.0) /.abs) random.safe_frac)
- y (at ! each (|>> (/.* +10.0) /.abs) random.safe_frac)]
+ [x (of ! each (|>> (/.* +10.0) /.abs) random.safe_frac)
+ y (of ! each (|>> (/.* +10.0) /.abs) random.safe_frac)]
(_.coverage [/.hypotenuse]
(let [h (/.hypotenuse x y)]
(and (/.>= x h)
@@ -256,8 +256,8 @@
(do [! random.monad]
[.let [~= (/.approximately? ..margin_of_error)
tau/4 (/./ +4.0 /.tau)]
- x (at ! each (/.* tau/4) random.safe_frac)
- y (at ! each (/.* tau/4) random.safe_frac)]
+ x (of ! each (/.* tau/4) random.safe_frac)
+ y (of ! each (/.* tau/4) random.safe_frac)]
(_.coverage [/.atan_2]
(let [expected (/.atan_2 x y)
actual (if (/.> +0.0 x)
@@ -270,7 +270,7 @@
(~= (/.opposite tau/4) (/.atan_2 +0.0 (/.opposite (/.abs y))))
(/.not_a_number? (/.atan_2 +0.0 +0.0))))))
(do [! random.monad]
- [of (at ! each (|>> (n.% 10) ++) random.nat)]
+ [of (of ! each (|>> (n.% 10) ++) random.nat)]
(_.coverage [/.factorial]
(and (n.= 1 (/.factorial 0))
(|> (/.factorial of) (n.% of) (n.= 0)))))
diff --git a/stdlib/source/test/lux/math/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux
index 6753d2496..529f64f4a 100644
--- a/stdlib/source/test/lux/math/number/i16.lux
+++ b/stdlib/source/test/lux/math/number/i16.lux
@@ -17,7 +17,7 @@
(def .public random
(Random /.I16)
- (at random.functor each /.i16 random.i64))
+ (of random.functor each /.i16 random.i64))
(def .public test
Test
@@ -28,12 +28,12 @@
//i64.mask
.int
++)]
- expected (at ! each (i.% limit) random.int)]
+ expected (of ! each (i.% limit) random.int)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
(_.coverage [/.i16 /.i64 /.width]
(let [actual (|> expected .i64 /.i16 /.i64)]
- (at //i64.equivalence = expected actual)))
+ (of //i64.equivalence = expected actual)))
))))
diff --git a/stdlib/source/test/lux/math/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux
index 0770f96cd..e3f00275c 100644
--- a/stdlib/source/test/lux/math/number/i32.lux
+++ b/stdlib/source/test/lux/math/number/i32.lux
@@ -17,7 +17,7 @@
(def .public random
(Random /.I32)
- (at random.functor each /.i32 random.i64))
+ (of random.functor each /.i32 random.i64))
(def .public test
Test
@@ -28,12 +28,12 @@
//i64.mask
.int
++)]
- expected (at ! each (i.% limit) random.int)]
+ expected (of ! each (i.% limit) random.int)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
(_.coverage [/.i32 /.i64 /.width]
(let [actual (|> expected .i64 /.i32 /.i64)]
- (at //i64.equivalence = expected actual)))
+ (of //i64.equivalence = expected actual)))
))))
diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux
index 025c41346..95a19b447 100644
--- a/stdlib/source/test/lux/math/number/i64.lux
+++ b/stdlib/source/test/lux/math/number/i64.lux
@@ -23,7 +23,7 @@
Test
(do [! random.monad]
[pattern random.nat
- idx (at ! each (n.% /.width) random.nat)]
+ idx (of ! each (n.% /.width) random.nat)]
(all _.and
(_.coverage [/.one? /.one]
(if (/.one? idx pattern)
@@ -49,7 +49,7 @@
[pattern random.nat]
(all _.and
(do !
- [idx (at ! each (|>> (n.% (-- /.width)) ++) random.nat)]
+ [idx (of ! each (|>> (n.% (-- /.width)) ++) random.nat)]
(_.coverage [/.left_shifted /.right_shifted]
(let [nullity!
(and (/#= pattern (/.left_shifted 0 pattern))
@@ -75,7 +75,7 @@
(<| (_.for [/.Mask])
(do [! random.monad]
[pattern random.nat
- idx (at ! each (n.% /.width) random.nat)
+ idx (of ! each (n.% /.width) random.nat)
signed random.int]
(all _.and
(_.coverage [/.sign]
@@ -99,9 +99,9 @@
empty!
full!)))
(do !
- [size (at ! each (n.% /.width) random.nat)
+ [size (of ! each (n.% /.width) random.nat)
.let [spare (n.- size /.width)]
- offset (at ! each (n.% spare) random.nat)]
+ offset (of ! each (n.% spare) random.nat)]
(_.coverage [/.region]
(when size
0 (/#= /.false (/.region offset size))
@@ -123,7 +123,7 @@
Test
(_.for [/.Sub]
(do [! random.monad]
- [size (at ! each (n.% /.width) random.nat)]
+ [size (of ! each (n.% /.width) random.nat)]
(when (/.sub size)
{.#None}
(_.coverage [/.sub]
@@ -131,19 +131,19 @@
{.#Some sub}
(do [! random.monad]
- [.let [limit (|> (-- (at sub bits))
+ [.let [limit (|> (-- (of sub bits))
/.mask
.int
++)]
- expected (at ! each (i.% limit) random.int)
+ expected (of ! each (i.% limit) random.int)
.let [random (is (All (_ size)
(-> (-> I64 (I64 size)) (Random (I64 size))))
(function (_ narrow)
- (at random.functor each narrow random.i64)))]]
+ (of random.functor each narrow random.i64)))]]
(all _.and
- ($equivalence.spec (at sub sub_equivalence) (random (at sub narrow)))
+ ($equivalence.spec (of sub sub_equivalence) (random (of sub narrow)))
(_.coverage [/.sub]
- (let [actual (|> expected .i64 (at sub narrow) (at sub wide))]
+ (let [actual (|> expected .i64 (of sub narrow) (of sub wide))]
(/#= expected actual)))
))))))
@@ -166,7 +166,7 @@
(_.for [.I64])
(do [! random.monad]
[pattern random.nat
- idx (at ! each (n.% /.width) random.nat)]
+ idx (of ! each (n.% /.width) random.nat)]
(all _.and
(_.coverage [/.width /.bits_per_byte /.bytes_per_i64]
(and (n.= /.bytes_per_i64
diff --git a/stdlib/source/test/lux/math/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux
index f07c37aa4..67c29698e 100644
--- a/stdlib/source/test/lux/math/number/i8.lux
+++ b/stdlib/source/test/lux/math/number/i8.lux
@@ -17,7 +17,7 @@
(def .public random
(Random /.I8)
- (at random.functor each /.i8 random.i64))
+ (of random.functor each /.i8 random.i64))
(def .public test
Test
@@ -28,12 +28,12 @@
//i64.mask
.int
++)]
- expected (at ! each (i.% limit) random.int)]
+ expected (of ! each (i.% limit) random.int)]
(all _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
(_.coverage [/.i8 /.i64 /.width]
(let [actual (|> expected .i64 /.i8 /.i64)]
- (at //i64.equivalence = expected actual)))
+ (of //i64.equivalence = expected actual)))
))))
diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index 46c2739e3..6223d9316 100644
--- a/stdlib/source/test/lux/math/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -172,7 +172,7 @@
))
(do [! random.monad]
[.let [random (|> random.int
- (at ! each (/.% +1,000))
+ (of ! each (/.% +1,000))
(random.only (|>> (/.= +0) not)))]
left random
right random]
@@ -213,14 +213,14 @@
(and subtraction!
inverse!))))
(do [! random.monad]
- [expected (at ! each (/.% +1,000,000) random.int)
+ [expected (of ! each (/.% +1,000,000) random.int)
sample random.int]
(_.coverage [/.frac]
(and (|> expected /.frac f.int (/.= expected))
(f.number? (/.frac sample)))))
(do [! random.monad]
[pattern random.int
- idx (at ! each (n.% i64.width) random.nat)]
+ idx (of ! each (n.% i64.width) random.nat)]
(_.coverage [/.right_shifted]
(let [nullity!
(/.= pattern (/.right_shifted 0 pattern))
diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux
index aecbccf81..6cd7bafd5 100644
--- a/stdlib/source/test/lux/math/number/nat.lux
+++ b/stdlib/source/test/lux/math/number/nat.lux
@@ -109,7 +109,7 @@
(/.= rem (/.% left right)))))
))
(do [! random.monad]
- [.let [random (at ! each (|>> (/.% 1,000) ++) random.nat)]
+ [.let [random (of ! each (|>> (/.% 1,000) ++) random.nat)]
left random
right random]
(all _.and
@@ -126,7 +126,7 @@
(/.= 0 (/.% right lcm)))))
))
(do [! random.monad]
- [expected (at ! each (/.% 1,000,000) random.nat)
+ [expected (of ! each (/.% 1,000,000) random.nat)
sample random.nat]
(_.coverage [/.frac]
(and (|> expected /.frac f.nat (/.= expected))
diff --git a/stdlib/source/test/lux/math/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux
index d5062806c..1392162c3 100644
--- a/stdlib/source/test/lux/math/number/ratio.lux
+++ b/stdlib/source/test/lux/math/number/ratio.lux
@@ -25,7 +25,7 @@
(def part
(Random Nat)
- (at random.monad each
+ (of random.monad each
(|>> (n.% 1,000,000) (n.max 1))
random.nat))
diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index 724d0112a..80b5b4a5a 100644
--- a/stdlib/source/test/lux/math/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -94,9 +94,9 @@
(and (/.< left (/.* left right))
(/.< right (/.* left right)))))
(do [! random.monad]
- [.let [dividend (at ! each (i64.and (hex "FFFF"))
+ [.let [dividend (of ! each (i64.and (hex "FFFF"))
random.rev)
- divisor (at ! each (|>> (i64.and (hex "F"))
+ divisor (of ! each (|>> (i64.and (hex "F"))
(i64.or (hex "1"))
(i64.right_rotated 8)
.rev)
@@ -105,14 +105,14 @@
divisor/0 divisor
divisor/1 (random.only (|>> (/.= divisor/0) not)
divisor)
- scale (at ! each (|>> (n.% 10) ++)
+ scale (of ! each (|>> (n.% 10) ++)
random.nat)]
(all _.and
(_.coverage [/./]
(bit#= (/.< divisor/0 divisor/1)
(/.> (/./ divisor/0 dividend) (/./ divisor/1 dividend))))
(_.coverage [/.%]
- (at i64.equivalence =
+ (of i64.equivalence =
(.i64 (n.% (.nat divisor/0) (.nat dividend)))
(.i64 (/.% divisor/0 dividend))))
(_.coverage [/.up /.down]
@@ -161,7 +161,7 @@
(/.= (/.reciprocal sample)
(|> sample /.reciprocal .nat /.reciprocal .nat /.reciprocal))))
(do [! random.monad]
- [expected (at ! each (|>> f.abs (f.% +1.0))
+ [expected (of ! each (|>> f.abs (f.% +1.0))
random.safe_frac)
sample random.rev]
(_.coverage [/.frac]
diff --git a/stdlib/source/test/lux/math/random.lux b/stdlib/source/test/lux/math/random.lux
index d74b7fc6d..e559a9c85 100644
--- a/stdlib/source/test/lux/math/random.lux
+++ b/stdlib/source/test/lux/math/random.lux
@@ -51,7 +51,7 @@
(def injection
(Injection Random)
- (at /.monad in))
+ (of /.monad in))
(def (comparison increase,seed)
(-> [(I64 Any) (I64 Any)] (Comparison Random))
@@ -67,7 +67,7 @@
(All (_ a) (-> (Equivalence a) (Random a) (Random Bit)))
(do /.monad
[reference random
- example (/.only (|>> (at equivalence = reference) not)
+ example (/.only (|>> (of equivalence = reference) not)
random)]
(in (not (same? reference example)))))
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index fa3fd7f7a..97eb1e7f4 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -35,1056 +35,1059 @@
["[0]" / (.only)
["[0]" type (.use "[1]#[0]" equivalence)]]]
["[0]" /
- ["[1][0]" code]
- ["[1][0]" location]
- ["[1][0]" symbol]
- ["[1][0]" configuration]
- ["[1][0]" version]
- ["[1][0]" type]
- ["[1][0]" macro]
- ["[1][0]" static]
+ ... ["[1][0]" code]
+ ... ["[1][0]" location]
+ ... ["[1][0]" symbol]
+ ... ["[1][0]" configuration]
+ ... ["[1][0]" version]
+ ... ["[1][0]" type]
+ ... ["[1][0]" macro]
+ ... ["[1][0]" static]
["[1][0]" extension]
- ["[1][0]" target (.only)
- (.,, (.for "{old}" (.,, (.these ["[1]/[0]" jvm]))
- "JVM" (.,, (.these ["[1]/[0]" jvm]))
- "JavaScript" (.,, (.these ["[1]/[0]" js]))
- "Lua" (.,, (.these ["[1]/[0]" lua]))
- "Python" (.,, (.these ["[1]/[0]" python]))
- "Ruby" (.,, (.these ["[1]/[0]" ruby]))
- (.,, (.these))))]
- ["[1][0]/" compiler
- ["[1][0]" arity]
- ["[1][0]" version]
- ["[1][0]" reference]
- ["[1][0]" phase]
- [language
- [lux
- ... ["[1][0]" syntax]
- ["[1][0]" analysis]
- ["[1][0]" synthesis]
- ["[1][0]" phase
- ["[1]/[0]" extension]
- ["[1]/[0]" analysis]
- ... ["[1]/[0]" synthesis]
- ]]]
- ["[1][0]" meta
- ["[1]/[0]" archive]
- ["[1]/[0]" cli]
- ["[1]/[0]" export]
- ["[1]/[0]" import]
- ["[1]/[0]" context]
- ["[1]/[0]" cache]]]])))
+ ["[1][0]" global]
+ ... ["[1][0]" target (.only)
+ ... (.,, (.for "{old}" (.,, (.these ["[1]/[0]" jvm]))
+ ... "JVM" (.,, (.these ["[1]/[0]" jvm]))
+ ... "JavaScript" (.,, (.these ["[1]/[0]" js]))
+ ... "Lua" (.,, (.these ["[1]/[0]" lua]))
+ ... "Python" (.,, (.these ["[1]/[0]" python]))
+ ... "Ruby" (.,, (.these ["[1]/[0]" ruby]))
+ ... (.,, (.these))))]
+ ... ["[1][0]/" compiler
+ ... ["[1][0]" arity]
+ ... ["[1][0]" version]
+ ... ["[1][0]" reference]
+ ... ["[1][0]" phase]
+ ... [language
+ ... [lux
+ ... ... ["[1][0]" syntax]
+ ... ["[1][0]" analysis]
+ ... ["[1][0]" synthesis]
+ ... ["[1][0]" phase
+ ... ["[1]/[0]" extension]
+ ... ["[1]/[0]" analysis]
+ ... ... ["[1]/[0]" synthesis]
+ ... ]]]
+ ... ["[1][0]" meta
+ ... ["[1]/[0]" archive]
+ ... ["[1]/[0]" cli]
+ ... ["[1]/[0]" export]
+ ... ["[1]/[0]" import]
+ ... ["[1]/[0]" context]
+ ... ["[1]/[0]" cache]]]
+ ])))
-(def !expect
- (template (_ <pattern> <value>)
- [(when <value>
- <pattern> true
- _ false)]))
+... (def !expect
+... (template (_ <pattern> <value>)
+... [(when <value>
+... <pattern> true
+... _ false)]))
-(def compiler_related
- Test
- (do random.monad
- [target (random.upper_case 1)
- version (random.upper_case 1)
- source_code (random.upper_case 1)
- expected_current_module (random.upper_case 1)
- primitive_type (random.upper_case 1)
- expected_seed random.nat
- expected random.nat
- dummy (random.only (|>> (n.= expected) not) random.nat)
- configuration_feature (random.upper_case 1)
- configuration_value (random.upper_case 1)
- .let [configuration (list [configuration_feature configuration_value])
- expected_lux [.#info [.#target target
- .#version version
- .#mode {.#Build}
- .#configuration configuration]
- .#source [location.dummy 0 source_code]
- .#location location.dummy
- .#current_module {.#Some expected_current_module}
- .#modules (list)
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#Some {.#Primitive primitive_type (list)}}
- .#seed expected_seed
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]]]
- (all _.and
- (_.coverage [/.result]
- (|> (at /.monad in expected)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual}
- (n.= expected actual)))))
- (_.coverage [/.result']
- (|> (at /.monad in expected)
- (/.result' expected_lux)
- (!expect (^.multi {try.#Success [actual_lux actual]}
- (and (same? expected_lux actual_lux)
- (n.= expected actual))))))
- (_.coverage [/.compiler_state]
- (|> /.compiler_state
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_lux}
- (same? expected_lux actual_lux)))))
- (_.coverage [/.version]
- (|> /.version
- (/.result expected_lux)
- (!expect (^.multi {try.#Success it}
- (same? version it)))))
- (_.coverage [/.configuration]
- (|> /.configuration
- (/.result expected_lux)
- (!expect (^.multi {try.#Success it}
- (same? configuration it)))))
- )))
+... (def compiler_related
+... Test
+... (do random.monad
+... [target (random.upper_cased 1)
+... version (random.upper_cased 1)
+... source_code (random.upper_cased 1)
+... expected_current_module (random.upper_cased 1)
+... nominal_type (random.upper_cased 1)
+... expected_seed random.nat
+... expected random.nat
+... dummy (random.only (|>> (n.= expected) not) random.nat)
+... configuration_feature (random.upper_cased 1)
+... configuration_value (random.upper_cased 1)
+... .let [configuration (list [configuration_feature configuration_value])
+... expected_lux [.#info [.#target target
+... .#version version
+... .#mode {.#Build}
+... .#configuration configuration]
+... .#source [location.dummy 0 source_code]
+... .#location location.dummy
+... .#current_module {.#Some expected_current_module}
+... .#modules (list)
+... .#scopes (list)
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#Some {.#Nominal nominal_type (list)}}
+... .#seed expected_seed
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []]]]
+... (all _.and
+... (_.coverage [/.result]
+... (|> (of /.monad in expected)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual}
+... (n.= expected actual)))))
+... (_.coverage [/.result']
+... (|> (of /.monad in expected)
+... (/.result' expected_lux)
+... (!expect (^.multi {try.#Success [actual_lux actual]}
+... (and (same? expected_lux actual_lux)
+... (n.= expected actual))))))
+... (_.coverage [/.compiler_state]
+... (|> /.compiler_state
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_lux}
+... (same? expected_lux actual_lux)))))
+... (_.coverage [/.version]
+... (|> /.version
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success it}
+... (same? version it)))))
+... (_.coverage [/.configuration]
+... (|> /.configuration
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success it}
+... (same? configuration it)))))
+... )))
-(def error_handling
- Test
- (do random.monad
- [target (random.upper_case 1)
- version (random.upper_case 1)
- source_code (random.upper_case 1)
- expected_current_module (random.upper_case 1)
- primitive_type (random.upper_case 1)
- expected_seed random.nat
- expected random.nat
- dummy (random.only (|>> (n.= expected) not) random.nat)
- expected_error (random.upper_case 1)
- .let [expected_lux [.#info [.#target target
- .#version version
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 source_code]
- .#location location.dummy
- .#current_module {.#Some expected_current_module}
- .#modules (list)
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#Some {.#Primitive primitive_type (list)}}
- .#seed expected_seed
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]]]
- (all _.and
- (_.coverage [/.failure]
- (|> (/.failure expected_error)
- (is (Meta Any))
- (/.result expected_lux)
- (!expect (^.multi {try.#Failure actual_error}
- (text#= (location.with location.dummy expected_error)
- actual_error)))))
- (_.coverage [/.assertion]
- (and (|> (/.assertion expected_error true)
- (is (Meta Any))
- (/.result expected_lux)
- (!expect {try.#Success []}))
- (|> (/.assertion expected_error false)
- (/.result expected_lux)
- (!expect (^.multi {try.#Failure actual_error}
- (text#= expected_error actual_error))))))
- (_.coverage [/.either]
- (and (|> (/.either (at /.monad in expected)
- (is (Meta Nat)
- (/.failure expected_error)))
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual}
- (n.= expected actual))))
- (|> (/.either (is (Meta Nat)
- (/.failure expected_error))
- (at /.monad in expected))
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual}
- (n.= expected actual))))
- (|> (/.either (is (Meta Nat)
- (/.failure expected_error))
- (is (Meta Nat)
- (/.failure expected_error)))
- (/.result expected_lux)
- (!expect (^.multi {try.#Failure actual_error}
- (text#= (location.with location.dummy expected_error)
- actual_error))))
- (|> (/.either (at /.monad in expected)
- (at /.monad in dummy))
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual}
- (n.= expected actual))))
- ))
- (_.coverage [/.try]
- (and (|> (/.try (/.failure expected_error))
- (/.result expected_lux)
- (!expect (^.multi {try.#Success {try.#Failure actual_error}}
- (text#= (location.with location.dummy expected_error)
- actual_error))))
- (|> (/.try (at /.monad in expected))
- (/.result expected_lux)
- (!expect (^.multi {try.#Success {try.#Success actual}}
- (same? expected actual))))))
- )))
+... (def error_handling
+... Test
+... (do random.monad
+... [target (random.upper_cased 1)
+... version (random.upper_cased 1)
+... source_code (random.upper_cased 1)
+... expected_current_module (random.upper_cased 1)
+... nominal_type (random.upper_cased 1)
+... expected_seed random.nat
+... expected random.nat
+... dummy (random.only (|>> (n.= expected) not) random.nat)
+... expected_error (random.upper_cased 1)
+... .let [expected_lux [.#info [.#target target
+... .#version version
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 source_code]
+... .#location location.dummy
+... .#current_module {.#Some expected_current_module}
+... .#modules (list)
+... .#scopes (list)
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#Some {.#Nominal nominal_type (list)}}
+... .#seed expected_seed
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []]]]
+... (all _.and
+... (_.coverage [/.failure]
+... (|> (/.failure expected_error)
+... (is (Meta Any))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Failure actual_error}
+... (text#= (location.with location.dummy expected_error)
+... actual_error)))))
+... (_.coverage [/.assertion]
+... (and (|> (/.assertion expected_error true)
+... (is (Meta Any))
+... (/.result expected_lux)
+... (!expect {try.#Success []}))
+... (|> (/.assertion expected_error false)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Failure actual_error}
+... (text#= expected_error actual_error))))))
+... (_.coverage [/.either]
+... (and (|> (/.either (of /.monad in expected)
+... (is (Meta Nat)
+... (/.failure expected_error)))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual}
+... (n.= expected actual))))
+... (|> (/.either (is (Meta Nat)
+... (/.failure expected_error))
+... (of /.monad in expected))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual}
+... (n.= expected actual))))
+... (|> (/.either (is (Meta Nat)
+... (/.failure expected_error))
+... (is (Meta Nat)
+... (/.failure expected_error)))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Failure actual_error}
+... (text#= (location.with location.dummy expected_error)
+... actual_error))))
+... (|> (/.either (of /.monad in expected)
+... (of /.monad in dummy))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual}
+... (n.= expected actual))))
+... ))
+... (_.coverage [/.try]
+... (and (|> (/.try (/.failure expected_error))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success {try.#Failure actual_error}}
+... (text#= (location.with location.dummy expected_error)
+... actual_error))))
+... (|> (/.try (of /.monad in expected))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success {try.#Success actual}}
+... (same? expected actual))))))
+... )))
-(def module_related
- Test
- (do random.monad
- [target (random.upper_case 1)
- version (random.upper_case 1)
- source_code (random.upper_case 1)
- expected_current_module (random.upper_case 1)
- imported_module_name (random.only (|>> (text#= expected_current_module) not)
- (random.upper_case 1))
- primitive_type (random.upper_case 1)
- expected_seed random.nat
- expected random.nat
- dummy (random.only (|>> (n.= expected) not) random.nat)
- expected_short (random.upper_case 1)
- dummy_module (random.only (function (_ module)
- (not (or (text#= expected_current_module module)
- (text#= imported_module_name module))))
- (random.upper_case 1))
- .let [imported_module [.#module_hash 0
- .#module_aliases (list)
- .#definitions (list)
- .#imports (list)
- .#module_state {.#Active}]
- expected_module [.#module_hash 0
- .#module_aliases (list)
- .#definitions (list)
- .#imports (list imported_module_name)
- .#module_state {.#Active}]
- expected_modules (list [expected_current_module
- expected_module]
- [imported_module_name
- imported_module])
- expected_lux [.#info [.#target target
- .#version version
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 source_code]
- .#location location.dummy
- .#current_module {.#Some expected_current_module}
- .#modules expected_modules
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#Some {.#Primitive primitive_type (list)}}
- .#seed expected_seed
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]]]
- (<| (_.for [.Module])
- (all _.and
- (_.coverage [/.current_module_name]
- (|> /.current_module_name
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_current_module}
- (text#= expected_current_module actual_current_module)))))
- (_.coverage [/.current_module]
- (|> /.current_module
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_module}
- (same? expected_module actual_module)))))
- (_.coverage [/.module]
- (|> (/.module expected_current_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_module}
- (same? expected_module actual_module)))))
- (_.coverage [/.module_exists?]
- (and (|> (/.module_exists? expected_current_module)
- (/.result expected_lux)
- (!expect {try.#Success .true}))
- (|> (/.module_exists? dummy_module)
- (/.result expected_lux)
- (!expect {try.#Success .false}))))
- (_.coverage [/.modules]
- (|> /.modules
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_modules}
- (same? expected_modules actual_modules)))))
- (_.coverage [/.imported_modules]
- (and (|> (/.imported_modules expected_current_module)
- (/.result expected_lux)
- (try#each (at (list.equivalence text.equivalence) =
- (list imported_module_name)))
- (try.else false))
- (|> (/.imported_modules imported_module_name)
- (/.result expected_lux)
- (try#each (at (list.equivalence text.equivalence) =
- (list)))
- (try.else false))))
- (_.coverage [/.imported_by?]
- (|> (/.imported_by? imported_module_name expected_current_module)
- (/.result expected_lux)
- (try.else false)))
- (_.coverage [/.imported?]
- (|> (/.imported? imported_module_name)
- (/.result expected_lux)
- (try.else false)))
- (_.coverage [/.normal]
- (and (|> (/.normal ["" expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success [actual_module actual_short]}
- (and (text#= expected_current_module actual_module)
- (same? expected_short actual_short)))))
- (|> (/.normal [dummy_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success [actual_module actual_short]}
- (and (text#= dummy_module actual_module)
- (same? expected_short actual_short)))))))
- ))))
+... (def module_related
+... Test
+... (do random.monad
+... [target (random.upper_cased 1)
+... version (random.upper_cased 1)
+... source_code (random.upper_cased 1)
+... expected_current_module (random.upper_cased 1)
+... imported_module_name (random.only (|>> (text#= expected_current_module) not)
+... (random.upper_cased 1))
+... nominal_type (random.upper_cased 1)
+... expected_seed random.nat
+... expected random.nat
+... dummy (random.only (|>> (n.= expected) not) random.nat)
+... expected_short (random.upper_cased 1)
+... dummy_module (random.only (function (_ module)
+... (not (or (text#= expected_current_module module)
+... (text#= imported_module_name module))))
+... (random.upper_cased 1))
+... .let [imported_module [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions (list)
+... .#imports (list)
+... .#module_state {.#Active}]
+... expected_module [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions (list)
+... .#imports (list imported_module_name)
+... .#module_state {.#Active}]
+... expected_modules (list [expected_current_module
+... expected_module]
+... [imported_module_name
+... imported_module])
+... expected_lux [.#info [.#target target
+... .#version version
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 source_code]
+... .#location location.dummy
+... .#current_module {.#Some expected_current_module}
+... .#modules expected_modules
+... .#scopes (list)
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#Some {.#Nominal nominal_type (list)}}
+... .#seed expected_seed
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []]]]
+... (<| (_.for [.Module])
+... (all _.and
+... (_.coverage [/.current_module_name]
+... (|> /.current_module_name
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_current_module}
+... (text#= expected_current_module actual_current_module)))))
+... (_.coverage [/.current_module]
+... (|> /.current_module
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_module}
+... (same? expected_module actual_module)))))
+... (_.coverage [/.module]
+... (|> (/.module expected_current_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_module}
+... (same? expected_module actual_module)))))
+... (_.coverage [/.module_exists?]
+... (and (|> (/.module_exists? expected_current_module)
+... (/.result expected_lux)
+... (!expect {try.#Success .true}))
+... (|> (/.module_exists? dummy_module)
+... (/.result expected_lux)
+... (!expect {try.#Success .false}))))
+... (_.coverage [/.modules]
+... (|> /.modules
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_modules}
+... (same? expected_modules actual_modules)))))
+... (_.coverage [/.imported_modules]
+... (and (|> (/.imported_modules expected_current_module)
+... (/.result expected_lux)
+... (try#each (of (list.equivalence text.equivalence) =
+... (list imported_module_name)))
+... (try.else false))
+... (|> (/.imported_modules imported_module_name)
+... (/.result expected_lux)
+... (try#each (of (list.equivalence text.equivalence) =
+... (list)))
+... (try.else false))))
+... (_.coverage [/.imported_by?]
+... (|> (/.imported_by? imported_module_name expected_current_module)
+... (/.result expected_lux)
+... (try.else false)))
+... (_.coverage [/.imported?]
+... (|> (/.imported? imported_module_name)
+... (/.result expected_lux)
+... (try.else false)))
+... (_.coverage [/.normal]
+... (and (|> (/.normal ["" expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success [actual_module actual_short]}
+... (and (text#= expected_current_module actual_module)
+... (same? expected_short actual_short)))))
+... (|> (/.normal [dummy_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success [actual_module actual_short]}
+... (and (text#= dummy_module actual_module)
+... (same? expected_short actual_short)))))))
+... ))))
-(def random_location
- (Random Location)
- (all random.and
- (random.upper_case 1)
- random.nat
- random.nat))
+... (def random_location
+... (Random Location)
+... (all random.and
+... (random.upper_cased 1)
+... random.nat
+... random.nat))
-(def context_related
- (do [! random.monad]
- [target (random.upper_case 1)
- version (random.upper_case 1)
- source_code (random.upper_case 1)
- expected_current_module (random.upper_case 1)
- expected_type (at ! each (function (_ name)
- {.#Primitive name (list)})
- (random.upper_case 1))
- expected_seed random.nat
- expected random.nat
- dummy (random.only (|>> (n.= expected) not) random.nat)
- expected_location ..random_location
- .let [type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- expected_lux [.#info [.#target target
- .#version version
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 source_code]
- .#location expected_location
- .#current_module {.#Some expected_current_module}
- .#modules (list)
- .#scopes (list)
- .#type_context type_context
- .#expected {.#Some expected_type}
- .#seed expected_seed
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]]]
- (all _.and
- (_.coverage [/.target]
- (|> /.target
- (/.result expected_lux)
- (try#each (same? target))
- (try.else false)))
- (_.coverage [/.seed]
- (|> (do /.monad
- [pre /.seed
- post /.seed]
- (in [pre post]))
- (/.result expected_lux)
- (!expect (^.multi {try.#Success [actual_pre actual_post]}
- (and (n.= expected_seed actual_pre)
- (n.= (++ expected_seed) actual_post))))))
- (_.coverage [/.location]
- (|> /.location
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_location}
- (same? expected_location actual_location)))))
- (_.coverage [/.expected_type]
- (|> /.expected_type
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_type}
- (same? expected_type actual_type)))))
- (_.coverage [.Type_Context /.type_context]
- (|> /.type_context
- (/.result expected_lux)
- (try#each (same? type_context))
- (try.else false)))
- )))
+... (def context_related
+... (do [! random.monad]
+... [target (random.upper_cased 1)
+... version (random.upper_cased 1)
+... source_code (random.upper_cased 1)
+... expected_current_module (random.upper_cased 1)
+... expected_type (of ! each (function (_ name)
+... {.#Nominal name (list)})
+... (random.upper_cased 1))
+... expected_seed random.nat
+... expected random.nat
+... dummy (random.only (|>> (n.= expected) not) random.nat)
+... expected_location ..random_location
+... .let [type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... expected_lux [.#info [.#target target
+... .#version version
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 source_code]
+... .#location expected_location
+... .#current_module {.#Some expected_current_module}
+... .#modules (list)
+... .#scopes (list)
+... .#type_context type_context
+... .#expected {.#Some expected_type}
+... .#seed expected_seed
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []]]]
+... (all _.and
+... (_.coverage [/.target]
+... (|> /.target
+... (/.result expected_lux)
+... (try#each (same? target))
+... (try.else false)))
+... (_.coverage [/.seed]
+... (|> (do /.monad
+... [pre /.seed
+... post /.seed]
+... (in [pre post]))
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success [actual_pre actual_post]}
+... (and (n.= expected_seed actual_pre)
+... (n.= (++ expected_seed) actual_post))))))
+... (_.coverage [/.location]
+... (|> /.location
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_location}
+... (same? expected_location actual_location)))))
+... (_.coverage [/.expected_type]
+... (|> /.expected_type
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_type}
+... (same? expected_type actual_type)))))
+... (_.coverage [.Type_Context /.type_context]
+... (|> /.type_context
+... (/.result expected_lux)
+... (try#each (same? type_context))
+... (try.else false)))
+... )))
-(def definition_related
- Test
- (do [! random.monad]
- [expected_current_module (random.upper_case 1)
- expected_macro_module (random.only (|>> (text#= expected_current_module) not)
- (random.upper_case 1))
- expected_short (random.upper_case 1)
- expected_type (at ! each (function (_ name)
- {.#Primitive name (list)})
- (random.upper_case 1))
- expected_value (random.either (in .def)
- (in .macro))
- .let [expected_lux
- (is (-> Bit (Maybe Type)
- [(List [Text .Global])
- (List [Text .Global])
- Lux])
- (function (_ exported? def_type)
- (let [current_globals (is (List [Text .Global])
- (list [expected_short
- {.#Alias [expected_macro_module expected_short]}]))
- macro_globals (is (List [Text .Global])
- (when def_type
- {.#Some def_type}
- (list [expected_short
- {.#Definition [exported? def_type expected_value]}])
+... (def definition_related
+... Test
+... (do [! random.monad]
+... [expected_current_module (random.upper_cased 1)
+... expected_macro_module (random.only (|>> (text#= expected_current_module) not)
+... (random.upper_cased 1))
+... expected_short (random.upper_cased 1)
+... expected_type (of ! each (function (_ name)
+... {.#Nominal name (list)})
+... (random.upper_cased 1))
+... expected_value (random.either (in .def)
+... (in .macro))
+... .let [expected_lux
+... (is (-> Bit (Maybe Type)
+... [(List [Text .Global])
+... (List [Text .Global])
+... Lux])
+... (function (_ exported? def_type)
+... (let [current_globals (is (List [Text .Global])
+... (list [expected_short
+... {.#Alias [expected_macro_module expected_short]}]))
+... macro_globals (is (List [Text .Global])
+... (when def_type
+... {.#Some def_type}
+... (list [expected_short
+... {.#Definition [exported? def_type expected_value]}])
- {.#None}
- (list)))]
- [current_globals
- macro_globals
- [.#info [.#target ""
- .#version ""
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 ""]
- .#location location.dummy
- .#current_module {.#Some expected_current_module}
- .#modules (list [expected_current_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions current_globals
- .#imports (list)
- .#module_state {.#Active}]]
- [expected_macro_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions macro_globals
- .#imports (list)
- .#module_state {.#Active}]])
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#None}
- .#seed 0
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]])))]]
- (all _.and
- (_.coverage [.Global .Alias /.globals]
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some .Macro})
+... {.#None}
+... (list)))]
+... [current_globals
+... macro_globals
+... [.#info [.#target ""
+... .#version ""
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 ""]
+... .#location location.dummy
+... .#current_module {.#Some expected_current_module}
+... .#modules (list [expected_current_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions current_globals
+... .#imports (list)
+... .#module_state {.#Active}]]
+... [expected_macro_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions macro_globals
+... .#imports (list)
+... .#module_state {.#Active}]])
+... .#scopes (list)
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#None}
+... .#seed 0
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []]])))]]
+... (all _.and
+... (_.coverage [.Global .Alias /.globals]
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some .Macro})
- current_globals!
- (|> (/.globals expected_current_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_globals}
- (same? current_globals actual_globals))))
+... current_globals!
+... (|> (/.globals expected_current_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_globals}
+... (same? current_globals actual_globals))))
- macro_globals!
- (|> (/.globals expected_macro_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_globals}
- (same? macro_globals actual_globals))))]
- (and current_globals!
- macro_globals!)))
- (_.coverage [.Definition /.definitions]
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some .Macro})]
- (and (|> (/.definitions expected_current_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_definitions}
- (n.= 0 (list.size actual_definitions)))))
- (|> (/.definitions expected_macro_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_definitions}
- (n.= 1 (list.size actual_definitions)))))
- )))
- (_.coverage [/.exports]
- (and (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some .Macro})]
- (and (|> (/.exports expected_current_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_definitions}
- (n.= 0 (list.size actual_definitions)))))
- (|> (/.exports expected_macro_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_definitions}
- (n.= 1 (list.size actual_definitions)))))
- ))
- (let [[current_globals macro_globals expected_lux]
- (expected_lux false {.#Some .Macro})]
- (and (|> (/.exports expected_current_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_definitions}
- (n.= 0 (list.size actual_definitions)))))
- (|> (/.exports expected_macro_module)
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_definitions}
- (n.= 0 (list.size actual_definitions)))))
- ))))
- )))
+... macro_globals!
+... (|> (/.globals expected_macro_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_globals}
+... (same? macro_globals actual_globals))))]
+... (and current_globals!
+... macro_globals!)))
+... (_.coverage [.Definition /.definitions]
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some .Macro})]
+... (and (|> (/.definitions expected_current_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_definitions}
+... (n.= 0 (list.size actual_definitions)))))
+... (|> (/.definitions expected_macro_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_definitions}
+... (n.= 1 (list.size actual_definitions)))))
+... )))
+... (_.coverage [/.exports]
+... (and (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some .Macro})]
+... (and (|> (/.exports expected_current_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_definitions}
+... (n.= 0 (list.size actual_definitions)))))
+... (|> (/.exports expected_macro_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_definitions}
+... (n.= 1 (list.size actual_definitions)))))
+... ))
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux false {.#Some .Macro})]
+... (and (|> (/.exports expected_current_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_definitions}
+... (n.= 0 (list.size actual_definitions)))))
+... (|> (/.exports expected_macro_module)
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_definitions}
+... (n.= 0 (list.size actual_definitions)))))
+... ))))
+... )))
-(def search_related
- Test
- (do [! random.monad]
- [expected_exported? random.bit
- expected_current_module (random.upper_case 1)
- expected_macro_module (random.only (|>> (text#= expected_current_module) not)
- (random.upper_case 1))
- expected_short (random.upper_case 1)
- expected_type (at ! each (function (_ name)
- {.#Primitive name (list)})
- (random.upper_case 1))
- expected_value (random.either (in .def)
- (in .macro))
- .let [expected_lux
- (is (-> Bit (Maybe Type)
- [(List [Text .Global])
- (List [Text .Global])
- Lux])
- (function (_ exported? def_type)
- (let [current_globals (is (List [Text .Global])
- (list [expected_short
- {.#Alias [expected_macro_module expected_short]}]))
- macro_globals (is (List [Text .Global])
- (when def_type
- {.#Some def_type}
- (list [expected_short
- {.#Definition [exported? def_type expected_value]}])
+... (def search_related
+... Test
+... (do [! random.monad]
+... [expected_exported? random.bit
+... expected_current_module (random.upper_cased 1)
+... expected_macro_module (random.only (|>> (text#= expected_current_module) not)
+... (random.upper_cased 1))
+... expected_short (random.upper_cased 1)
+... expected_type (of ! each (function (_ name)
+... {.#Nominal name (list)})
+... (random.upper_cased 1))
+... expected_value (random.either (in .def)
+... (in .macro))
+... .let [expected_lux
+... (is (-> Bit (Maybe Type)
+... [(List [Text .Global])
+... (List [Text .Global])
+... Lux])
+... (function (_ exported? def_type)
+... (let [current_globals (is (List [Text .Global])
+... (list [expected_short
+... {.#Alias [expected_macro_module expected_short]}]))
+... macro_globals (is (List [Text .Global])
+... (when def_type
+... {.#Some def_type}
+... (list [expected_short
+... {.#Definition [exported? def_type expected_value]}])
- {.#None}
- (list)))]
- [current_globals
- macro_globals
- [.#info [.#target ""
- .#version ""
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 ""]
- .#location location.dummy
- .#current_module {.#Some expected_current_module}
- .#modules (list [expected_current_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions current_globals
- .#imports (list)
- .#module_state {.#Active}]]
- [expected_macro_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions macro_globals
- .#imports (list)
- .#module_state {.#Active}]])
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#None}
- .#seed 0
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]])))]]
- (all _.and
- (_.coverage [/.export]
- (and (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some expected_type})]
- (|> (/.export [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect {try.#Success _})))
- (let [[current_globals macro_globals expected_lux]
- (expected_lux false {.#Some expected_type})]
- (|> (/.export [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect {try.#Failure _})))))
- (_.coverage [/.macro]
- (let [same_module!
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some .Macro})]
- (|> (/.macro [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success {.#Some actual_value}}
- (same? expected_value actual_value)))))
+... {.#None}
+... (list)))]
+... [current_globals
+... macro_globals
+... [.#info [.#target ""
+... .#version ""
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 ""]
+... .#location location.dummy
+... .#current_module {.#Some expected_current_module}
+... .#modules (list [expected_current_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions current_globals
+... .#imports (list)
+... .#module_state {.#Active}]]
+... [expected_macro_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions macro_globals
+... .#imports (list)
+... .#module_state {.#Active}]])
+... .#scopes (list)
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#None}
+... .#seed 0
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []]])))]]
+... (all _.and
+... (_.coverage [/.export]
+... (and (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some expected_type})]
+... (|> (/.export [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect {try.#Success _})))
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux false {.#Some expected_type})]
+... (|> (/.export [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect {try.#Failure _})))))
+... (_.coverage [/.macro]
+... (let [same_module!
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some .Macro})]
+... (|> (/.macro [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success {.#Some actual_value}}
+... (same? expected_value actual_value)))))
- not_macro!
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some expected_type})]
- (|> (/.macro [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect {try.#Success {.#None}})))
+... not_macro!
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some expected_type})]
+... (|> (/.macro [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect {try.#Success {.#None}})))
- not_found!
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#None})]
- (|> (/.macro [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect {try.#Success {.#None}})))
+... not_found!
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#None})]
+... (|> (/.macro [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect {try.#Success {.#None}})))
- aliasing!
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some .Macro})]
- (|> (/.macro [expected_current_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success {.#Some actual_value}}
- (same? expected_value actual_value)))))]
- (and same_module!
- not_macro!
- not_found!
- aliasing!)))
- (_.coverage [/.de_aliased]
- (let [[current_globals macro_globals expected_lux]
- (expected_lux true {.#Some .Macro})]
- (and (|> (/.de_aliased [expected_macro_module expected_short])
- (/.result expected_lux)
- (try#each (symbol#= [expected_macro_module expected_short]))
- (try.else false))
- (|> (/.de_aliased [expected_current_module expected_short])
- (/.result expected_lux)
- (try#each (symbol#= [expected_macro_module expected_short]))
- (try.else false)))))
- (_.coverage [/.definition]
- (let [[current_globals macro_globals expected_lux]
- (expected_lux expected_exported? {.#Some expected_type})
+... aliasing!
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some .Macro})]
+... (|> (/.macro [expected_current_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success {.#Some actual_value}}
+... (same? expected_value actual_value)))))]
+... (and same_module!
+... not_macro!
+... not_found!
+... aliasing!)))
+... (_.coverage [/.de_aliased]
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux true {.#Some .Macro})]
+... (and (|> (/.de_aliased [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (try#each (symbol#= [expected_macro_module expected_short]))
+... (try.else false))
+... (|> (/.de_aliased [expected_current_module expected_short])
+... (/.result expected_lux)
+... (try#each (symbol#= [expected_macro_module expected_short]))
+... (try.else false)))))
+... (_.coverage [/.definition]
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux expected_exported? {.#Some expected_type})
- definition!
- (|> (/.definition [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success {.#Definition [actual_exported? actual_type actual_value]}}
- (and (bit#= expected_exported? actual_exported?)
- (same? expected_type actual_type)
- (same? (as Any expected_value) actual_value)))))
+... definition!
+... (|> (/.definition [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success {.#Definition [actual_exported? actual_type actual_value]}}
+... (and (bit#= expected_exported? actual_exported?)
+... (same? expected_type actual_type)
+... (same? (as Any expected_value) actual_value)))))
- alias!
- (|> (/.definition [expected_current_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success {.#Alias [actual_module actual_short]}}
- (and (same? expected_macro_module actual_module)
- (same? expected_short actual_short)))))]
- (and definition!
- alias!)))
- (_.coverage [/.definition_type]
- (let [[current_globals macro_globals expected_lux]
- (expected_lux expected_exported? {.#Some expected_type})
+... alias!
+... (|> (/.definition [expected_current_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success {.#Alias [actual_module actual_short]}}
+... (and (same? expected_macro_module actual_module)
+... (same? expected_short actual_short)))))]
+... (and definition!
+... alias!)))
+... (_.coverage [/.definition_type]
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux expected_exported? {.#Some expected_type})
- definition!
- (|> (/.definition_type [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_type}
- (same? expected_type actual_type))))
+... definition!
+... (|> (/.definition_type [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_type}
+... (same? expected_type actual_type))))
- alias!
- (|> (/.definition_type [expected_current_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_type}
- (same? expected_type actual_type))))]
- (and definition!
- alias!)))
- (_.coverage [/.type_definition]
- (let [[current_globals macro_globals expected_lux]
- (expected_lux expected_exported? {.#Some .Type})
+... alias!
+... (|> (/.definition_type [expected_current_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_type}
+... (same? expected_type actual_type))))]
+... (and definition!
+... alias!)))
+... (_.coverage [/.type_definition]
+... (let [[current_globals macro_globals expected_lux]
+... (expected_lux expected_exported? {.#Some .Type})
- definition!
- (|> (/.type_definition [expected_macro_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_value}
- (same? (as .Type expected_value) actual_value))))
+... definition!
+... (|> (/.type_definition [expected_macro_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_value}
+... (same? (as .Type expected_value) actual_value))))
- alias!
- (|> (/.type_definition [expected_current_module expected_short])
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual_value}
- (same? (as .Type expected_value) actual_value))))]
- (and definition!
- alias!)))
- )))
+... alias!
+... (|> (/.type_definition [expected_current_module expected_short])
+... (/.result expected_lux)
+... (!expect (^.multi {try.#Success actual_value}
+... (same? (as .Type expected_value) actual_value))))]
+... (and definition!
+... alias!)))
+... )))
-(def label_related
- Test
- (do [! random.monad]
- [current_module (random.upper_case 1)
- label_module (random.only (|>> (text#= current_module) not)
- (random.upper_case 1))
+... (def label_related
+... Test
+... (do [! random.monad]
+... [current_module (random.upper_cased 1)
+... label_module (random.only (|>> (text#= current_module) not)
+... (random.upper_cased 1))
- name_0 (random.upper_case 1)
- name_1 (random.only (|>> (text#= name_0) not)
- (random.upper_case 1))
-
- .let [random_tag (at ! each (|>> [label_module])
- (random.upper_case 1))
- random_labels (is (Random [Text (List Text)])
- (do !
- [head (random.lower_case 5)]
- (|> (random.lower_case 5)
- (random.only (|>> (text#= head) not))
- (random.set text.hash 3)
- (at ! each set.list)
- (random.and (in head)))))]
- tags_0 random_labels
- tags_1 (let [set/0 (set.of_list text.hash {.#Item tags_0})]
- (random.only (|>> {.#Item}
- (list.any? (set.member? set/0))
- not)
- random_labels))
- .let [type_0 {.#Primitive name_0 (list)}
- type_1 {.#Primitive name_1 (list)}
-
- expected_lux
- (is Lux
- [.#info [.#target ""
- .#version ""
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 ""]
- .#location location.dummy
- .#current_module {.#Some current_module}
- .#modules (list [current_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions (list)
- .#imports (list label_module)
- .#module_state {.#Active}]]
- [label_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions (list.partial [name_0 {.#Type [true type_0 {.#Left tags_0}]}]
- [name_1 {.#Type [true type_1 {.#Right tags_1}]}]
- (all list#composite
- (|> {.#Item tags_0}
- list.enumeration
- (list#each (function (_ [index short])
- [short {.#Tag [true type_0 {.#Item tags_0} index]}])))
- (|> {.#Item tags_1}
- list.enumeration
- (list#each (function (_ [index short])
- [short {.#Slot [true type_1 {.#Item tags_1} index]}])))))
- .#imports (list)
- .#module_state {.#Active}]])
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#None}
- .#seed 0
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []])]]
- (all _.and
- (_.coverage [/.tag_lists]
- (let [equivalence (list.equivalence
- (product.equivalence
- (list.equivalence symbol.equivalence)
- type.equivalence))]
- (|> (/.tag_lists label_module)
- (/.result expected_lux)
- (try#each (at equivalence = (list [(list#each (|>> [label_module]) {.#Item tags_0})
- type_0]
- [(list#each (|>> [label_module]) {.#Item tags_1})
- type_1])))
- (try.else false))))
- (_.coverage [/.tags_of]
- (|> (/.tags_of [label_module name_1])
- (/.result expected_lux)
- (try#each (at (maybe.equivalence (list.equivalence symbol.equivalence)) = {.#Some (list#each (|>> [label_module]) {.#Item tags_1})}))
- (try.else false)))
- (_.coverage [/.tag]
- (|> {.#Item tags_0}
- list.enumeration
- (list.every? (function (_ [expected_index label])
- (|> [label_module label]
- /.tag
- (/.result expected_lux)
- (!expect (^.multi {try.#Success [actual_index actual_tags actual_type]}
- (let [correct_index!
- (n.= expected_index
- actual_index)
+... name_0 (random.upper_cased 1)
+... name_1 (random.only (|>> (text#= name_0) not)
+... (random.upper_cased 1))
- correct_tags!
- (at (list.equivalence symbol.equivalence) =
- (list#each (|>> [label_module]) {.#Item tags_0})
- actual_tags)
+... .let [random_tag (of ! each (|>> [label_module])
+... (random.upper_cased 1))
+... random_labels (is (Random [Text (List Text)])
+... (do !
+... [head (random.lower_cased 5)]
+... (|> (random.lower_cased 5)
+... (random.only (|>> (text#= head) not))
+... (random.set text.hash 3)
+... (of ! each set.list)
+... (random.and (in head)))))]
+... tags_0 random_labels
+... tags_1 (let [set/0 (set.of_list text.hash {.#Item tags_0})]
+... (random.only (|>> {.#Item}
+... (list.any? (set.member? set/0))
+... not)
+... random_labels))
+... .let [type_0 {.#Nominal name_0 (list)}
+... type_1 {.#Nominal name_1 (list)}
- correct_type!
- (type#= type_0
- actual_type)]
- (and correct_index!
- correct_tags!
- correct_type!))))
- )))))
- (_.coverage [/.slot]
- (|> {.#Item tags_1}
- list.enumeration
- (list.every? (function (_ [expected_index label])
- (|> [label_module label]
- /.slot
- (/.result expected_lux)
- (!expect (^.multi {try.#Success [actual_index actual_tags actual_type]}
- (let [correct_index!
- (n.= expected_index
- actual_index)
+... expected_lux
+... (is Lux
+... [.#info [.#target ""
+... .#version ""
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 ""]
+... .#location location.dummy
+... .#current_module {.#Some current_module}
+... .#modules (list [current_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions (list)
+... .#imports (list label_module)
+... .#module_state {.#Active}]]
+... [label_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions (list.partial [name_0 {.#Type [true type_0 {.#Left tags_0}]}]
+... [name_1 {.#Type [true type_1 {.#Right tags_1}]}]
+... (all list#composite
+... (|> {.#Item tags_0}
+... list.enumeration
+... (list#each (function (_ [index short])
+... [short {.#Tag [true type_0 {.#Item tags_0} index]}])))
+... (|> {.#Item tags_1}
+... list.enumeration
+... (list#each (function (_ [index short])
+... [short {.#Slot [true type_1 {.#Item tags_1} index]}])))))
+... .#imports (list)
+... .#module_state {.#Active}]])
+... .#scopes (list)
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#None}
+... .#seed 0
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []])]]
+... (all _.and
+... (_.coverage [/.tag_lists]
+... (let [equivalence (list.equivalence
+... (product.equivalence
+... (list.equivalence symbol.equivalence)
+... type.equivalence))]
+... (|> (/.tag_lists label_module)
+... (/.result expected_lux)
+... (try#each (of equivalence = (list [(list#each (|>> [label_module]) {.#Item tags_0})
+... type_0]
+... [(list#each (|>> [label_module]) {.#Item tags_1})
+... type_1])))
+... (try.else false))))
+... (_.coverage [/.tags_of]
+... (|> (/.tags_of [label_module name_1])
+... (/.result expected_lux)
+... (try#each (of (maybe.equivalence (list.equivalence symbol.equivalence)) = {.#Some (list#each (|>> [label_module]) {.#Item tags_1})}))
+... (try.else false)))
+... ... (_.coverage [/.tag]
+... ... (|> {.#Item tags_0}
+... ... list.enumeration
+... ... (list.every? (function (_ [expected_index label])
+... ... (|> [label_module label]
+... ... /.tag
+... ... (/.result expected_lux)
+... ... (!expect (^.multi {try.#Success [actual_index actual_tags actual_type]}
+... ... (let [correct_index!
+... ... (n.= expected_index
+... ... actual_index)
- correct_tags!
- (at (list.equivalence symbol.equivalence) =
- (list#each (|>> [label_module]) {.#Item tags_1})
- actual_tags)
+... ... correct_tags!
+... ... (of (list.equivalence symbol.equivalence) =
+... ... (list#each (|>> [label_module]) {.#Item tags_0})
+... ... actual_tags)
- correct_type!
- (type#= type_1
- actual_type)]
- (and correct_index!
- correct_tags!
- correct_type!))))
- )))))
- )))
+... ... correct_type!
+... ... (type#= type_0
+... ... actual_type)]
+... ... (and correct_index!
+... ... correct_tags!
+... ... correct_type!))))
+... ... )))))
+... ... (_.coverage [/.slot]
+... ... (|> {.#Item tags_1}
+... ... list.enumeration
+... ... (list.every? (function (_ [expected_index label])
+... ... (|> [label_module label]
+... ... /.slot
+... ... (/.result expected_lux)
+... ... (!expect (^.multi {try.#Success [actual_index actual_tags actual_type]}
+... ... (let [correct_index!
+... ... (n.= expected_index
+... ... actual_index)
-(def locals_related
- Test
- (do [! random.monad]
- [current_module (random.upper_case 1)
- [name_0 name_1 name_2 name_3 name_4] (|> (random.upper_case 1)
- (random.set text.hash 5)
- (at ! each set.list)
- (random.one (function (_ values)
- (when values
- (list name_0 name_1 name_2 name_3 name_4)
- {.#Some [name_0 name_1 name_2 name_3 name_4]}
+... ... correct_tags!
+... ... (of (list.equivalence symbol.equivalence) =
+... ... (list#each (|>> [label_module]) {.#Item tags_1})
+... ... actual_tags)
- _
- {.#None}))))
- .let [type_0 {.#Primitive name_0 (list)}
- type_1 {.#Primitive name_1 (list)}
- type_2 {.#Primitive name_2 (list)}
- type_3 {.#Primitive name_3 (list)}
- type_4 {.#Primitive name_4 (list)}
+... ... correct_type!
+... ... (type#= type_1
+... ... actual_type)]
+... ... (and correct_index!
+... ... correct_tags!
+... ... correct_type!))))
+... ... )))))
+... )))
- globals (is (List [Text .Global])
- (list [name_4
- {.#Definition [false type_4 []]}]))
+... (def locals_related
+... Test
+... (do [! random.monad]
+... [current_module (random.upper_cased 1)
+... [name_0 name_1 name_2 name_3 name_4] (|> (random.upper_cased 1)
+... (random.set text.hash 5)
+... (of ! each set.list)
+... (random.one (function (_ values)
+... (when values
+... (list name_0 name_1 name_2 name_3 name_4)
+... {.#Some [name_0 name_1 name_2 name_3 name_4]}
- scopes (list [.#name (list)
- .#inner 0
- .#locals [.#counter 1
- .#mappings (list [name_3 [type_3 3]])]
- .#captured [.#counter 0
- .#mappings (list)]]
- [.#name (list)
- .#inner 0
- .#locals [.#counter 2
- .#mappings (list [name_1 [type_1 1]]
- [name_2 [type_2 2]])]
- .#captured [.#counter 0
- .#mappings (list)]]
- [.#name (list)
- .#inner 0
- .#locals [.#counter 1
- .#mappings (list [name_0 [type_0 0]])]
- .#captured [.#counter 0
- .#mappings (list)]])]
- .let [expected_lux
- (is Lux
- [.#info [.#target ""
- .#version ""
- .#mode {.#Build}
- .#configuration (list)]
- .#source [location.dummy 0 ""]
- .#location location.dummy
- .#current_module {.#Some current_module}
- .#modules (list [current_module
- [.#module_hash 0
- .#module_aliases (list)
- .#definitions globals
- .#imports (list)
- .#module_state {.#Active}]])
- .#scopes scopes
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#None}
- .#seed 0
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []])]]
- (all _.and
- (_.coverage [.Scope /.locals]
- (let [equivalence (is (Equivalence (List (List [Text Type])))
- (list.equivalence
- (list.equivalence
- (product.equivalence
- text.equivalence
- type.equivalence))))]
- (|> /.locals
- (/.result expected_lux)
- (try#each (at equivalence = (list (list [name_3 type_3])
- (list [name_1 type_1]
- [name_2 type_2]))))
- (try.else false))))
- (_.coverage [/.var_type]
- (and (|> (/.var_type name_0)
- (/.result expected_lux)
- (try#each (at type.equivalence = type_0))
- (try.else false))
- (|> (/.var_type name_1)
- (/.result expected_lux)
- (try#each (at type.equivalence = type_1))
- (try.else false))
- (|> (/.var_type name_2)
- (/.result expected_lux)
- (try#each (at type.equivalence = type_2))
- (try.else false))
- (|> (/.var_type name_3)
- (/.result expected_lux)
- (try#each (at type.equivalence = type_3))
- (try.else false))))
- (_.coverage [/.type]
- (and (|> (/.type ["" name_0])
- (/.result expected_lux)
- (try#each (at type.equivalence = type_0))
- (try.else false))
- (|> (/.type ["" name_1])
- (/.result expected_lux)
- (try#each (at type.equivalence = type_1))
- (try.else false))
- (|> (/.type ["" name_2])
- (/.result expected_lux)
- (try#each (at type.equivalence = type_2))
- (try.else false))
- (|> (/.type ["" name_3])
- (/.result expected_lux)
- (try#each (at type.equivalence = type_3))
- (try.else false))
- (|> (/.type [current_module name_4])
- (/.result expected_lux)
- (try#each (at type.equivalence = type_4))
- (try.else false))
- (|> (/.type ["" name_4])
- (/.result expected_lux)
- (try#each (at type.equivalence = type_4))
- (try.else false))))
- )))
+... _
+... {.#None}))))
+... .let [type_0 {.#Nominal name_0 (list)}
+... type_1 {.#Nominal name_1 (list)}
+... type_2 {.#Nominal name_2 (list)}
+... type_3 {.#Nominal name_3 (list)}
+... type_4 {.#Nominal name_4 (list)}
-(def injection
- (Injection Meta)
- (at /.monad in))
+... globals (is (List [Text .Global])
+... (list [name_4
+... {.#Definition [false type_4 []]}]))
-(def (comparison init)
- (-> Lux (Comparison Meta))
- (function (_ == left right)
- (when [(/.result init left)
- (/.result init right)]
- [{try.#Success left} {try.#Success right}]
- (== left right)
-
- _
- false)))
+... scopes (list [.#scope_name (list)
+... .#inner_scopes 0
+... .#locals [.#counter 1
+... .#mappings (list [name_3 [type_3 3]])]
+... .#captured [.#counter 0
+... .#mappings (list)]]
+... [.#scope_name (list)
+... .#inner_scopes 0
+... .#locals [.#counter 2
+... .#mappings (list [name_1 [type_1 1]]
+... [name_2 [type_2 2]])]
+... .#captured [.#counter 0
+... .#mappings (list)]]
+... [.#scope_name (list)
+... .#inner_scopes 0
+... .#locals [.#counter 1
+... .#mappings (list [name_0 [type_0 0]])]
+... .#captured [.#counter 0
+... .#mappings (list)]])]
+... .let [expected_lux
+... (is Lux
+... [.#info [.#target ""
+... .#version ""
+... .#mode {.#Build}
+... .#configuration (list)]
+... .#source [location.dummy 0 ""]
+... .#location location.dummy
+... .#current_module {.#Some current_module}
+... .#modules (list [current_module
+... [.#module_hash 0
+... .#module_aliases (list)
+... .#definitions globals
+... .#imports (list)
+... .#module_state {.#Active}]])
+... .#scopes scopes
+... .#type_context [.#ex_counter 0
+... .#var_counter 0
+... .#var_bindings (list)]
+... .#expected {.#None}
+... .#seed 0
+... .#scope_type_vars (list)
+... .#extensions []
+... .#eval (as (-> Type Code (Meta Any)) [])
+... .#host []])]]
+... (all _.and
+... (_.coverage [.Scope /.locals]
+... (let [equivalence (is (Equivalence (List (List [Text Type])))
+... (list.equivalence
+... (list.equivalence
+... (product.equivalence
+... text.equivalence
+... type.equivalence))))]
+... (|> /.locals
+... (/.result expected_lux)
+... (try#each (of equivalence = (list (list [name_3 type_3])
+... (list [name_1 type_1]
+... [name_2 type_2]))))
+... (try.else false))))
+... (_.coverage [/.var_type]
+... (and (|> (/.var_type name_0)
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_0))
+... (try.else false))
+... (|> (/.var_type name_1)
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_1))
+... (try.else false))
+... (|> (/.var_type name_2)
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_2))
+... (try.else false))
+... (|> (/.var_type name_3)
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_3))
+... (try.else false))))
+... (_.coverage [/.type]
+... (and (|> (/.type ["" name_0])
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_0))
+... (try.else false))
+... (|> (/.type ["" name_1])
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_1))
+... (try.else false))
+... (|> (/.type ["" name_2])
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_2))
+... (try.else false))
+... (|> (/.type ["" name_3])
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_3))
+... (try.else false))
+... (|> (/.type [current_module name_4])
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_4))
+... (try.else false))
+... (|> (/.type ["" name_4])
+... (/.result expected_lux)
+... (try#each (of type.equivalence = type_4))
+... (try.else false))))
+... )))
+
+... (def injection
+... (Injection Meta)
+... (of /.monad in))
+
+... (def (comparison init)
+... (-> Lux (Comparison Meta))
+... (function (_ == left right)
+... (when [(/.result init left)
+... (/.result init right)]
+... [{try.#Success left} {try.#Success right}]
+... (== left right)
+
+... _
+... false)))
(`` (`` (def .public test
Test
(<| (_.covering /._)
(_.for [.Meta .Lux])
(all _.and
- (do [! random.monad]
- [target (random.upper_case 1)
- version (random.upper_case 1)
- source_code (random.upper_case 1)
- expected_current_module (random.upper_case 1)
- expected_type (at ! each (function (_ name)
- {.#Primitive name (list)})
- (random.upper_case 1))
- expected_seed random.nat
- expected random.nat
- dummy (random.only (|>> (n.= expected) not) random.nat)
- expected_location ..random_location
- .let [expected_lux [.#info [.#target target
- .#version version
- .#mode {.#Build}
- .#configuration (list)]
- .#source [expected_location 0 source_code]
- .#location expected_location
- .#current_module {.#Some expected_current_module}
- .#modules (list)
- .#scopes (list)
- .#type_context [.#ex_counter 0
- .#var_counter 0
- .#var_bindings (list)]
- .#expected {.#Some expected_type}
- .#seed expected_seed
- .#scope_type_vars (list)
- .#extensions []
- .#eval (as (-> Type Code (Meta Any)) [])
- .#host []]]]
- (all _.and
- (_.for [/.functor]
- ($functor.spec ..injection (..comparison expected_lux) /.functor))
- (_.for [/.apply]
- ($apply.spec ..injection (..comparison expected_lux) /.apply))
- (_.for [/.monad]
- ($monad.spec ..injection (..comparison expected_lux) /.monad))
+ ... (do [! random.monad]
+ ... [target (random.upper_cased 1)
+ ... version (random.upper_cased 1)
+ ... source_code (random.upper_cased 1)
+ ... expected_current_module (random.upper_cased 1)
+ ... expected_type (of ! each (function (_ name)
+ ... {.#Nominal name (list)})
+ ... (random.upper_cased 1))
+ ... expected_seed random.nat
+ ... expected random.nat
+ ... dummy (random.only (|>> (n.= expected) not) random.nat)
+ ... expected_location ..random_location
+ ... .let [expected_lux [.#info [.#target target
+ ... .#version version
+ ... .#mode {.#Build}
+ ... .#configuration (list)]
+ ... .#source [expected_location 0 source_code]
+ ... .#location expected_location
+ ... .#current_module {.#Some expected_current_module}
+ ... .#modules (list)
+ ... .#scopes (list)
+ ... .#type_context [.#ex_counter 0
+ ... .#var_counter 0
+ ... .#var_bindings (list)]
+ ... .#expected {.#Some expected_type}
+ ... .#seed expected_seed
+ ... .#scope_type_vars (list)
+ ... .#extensions []
+ ... .#eval (as (-> Type Code (Meta Any)) [])
+ ... .#host []]]]
+ ... (all _.and
+ ... (_.for [/.functor]
+ ... ($functor.spec ..injection (..comparison expected_lux) /.functor))
+ ... (_.for [/.apply]
+ ... ($apply.spec ..injection (..comparison expected_lux) /.apply))
+ ... (_.for [/.monad]
+ ... ($monad.spec ..injection (..comparison expected_lux) /.monad))
- (do random.monad
- [expected_value random.nat
- expected_error (random.upper_case 1)]
- (_.coverage [/.lifted]
- (and (|> expected_error
- {try.#Failure}
- (is (Try Nat))
- /.lifted
- (/.result expected_lux)
- (!expect (^.multi {try.#Failure actual}
- (text#= (location.with expected_location expected_error)
- actual))))
- (|> expected_value
- {try.#Success}
- (is (Try Nat))
- /.lifted
- (/.result expected_lux)
- (!expect (^.multi {try.#Success actual}
- (same? expected_value actual)))))))
-
- ..compiler_related
- ..error_handling
- ..module_related
- ..context_related
- ..definition_related
- ..search_related
- ..locals_related
- (_.for [.Label]
- ..label_related)
- ))
+ ... (do random.monad
+ ... [expected_value random.nat
+ ... expected_error (random.upper_cased 1)]
+ ... (_.coverage [/.of_try]
+ ... (and (|> expected_error
+ ... {try.#Failure}
+ ... (is (Try Nat))
+ ... /.of_try
+ ... (/.result expected_lux)
+ ... (!expect (^.multi {try.#Failure actual}
+ ... (text#= (location.with expected_location expected_error)
+ ... actual))))
+ ... (|> expected_value
+ ... {try.#Success}
+ ... (is (Try Nat))
+ ... /.of_try
+ ... (/.result expected_lux)
+ ... (!expect (^.multi {try.#Success actual}
+ ... (same? expected_value actual)))))))
+
+ ... ..compiler_related
+ ... ..error_handling
+ ... ..module_related
+ ... ..context_related
+ ... ..definition_related
+ ... ..search_related
+ ... ..locals_related
+ ... (_.for [.Label]
+ ... ..label_related)
+ ... ))
- /code.test
- /location.test
- /symbol.test
- /configuration.test
- /version.test
- /type.test
- /macro.test
- /static.test
- /target.test
- (,, (for @.jvm (,, (these /target/jvm.test))
- @.old (,, (these /target/jvm.test))
- @.js (,, (these /target/js.test))
- @.lua (,, (these /target/lua.test))
- @.python (,, (these /target/python.test))
- @.ruby (,, (these /target/ruby.test))))
+ ... /code.test
+ ... /location.test
+ ... /symbol.test
+ ... /configuration.test
+ ... /version.test
+ ... /type.test
+ ... /macro.test
+ ... /static.test
+ ... /target.test
+ ... (,, (for @.jvm (,, (these /target/jvm.test))
+ ... @.old (,, (these /target/jvm.test))
+ ... @.js (,, (these /target/js.test))
+ ... @.lua (,, (these /target/lua.test))
+ ... @.python (,, (these /target/python.test))
+ ... @.ruby (,, (these /target/ruby.test))))
(,, (for @.old (,, (these))
(,, (these /extension.test))))
+ /global.test
- /compiler/arity.test
- /compiler/version.test
- /compiler/reference.test
- /compiler/phase.test
- /compiler/analysis.test
- /compiler/synthesis.test
- /compiler/meta/archive.test
- /compiler/meta/cli.test
- /compiler/meta/export.test
- /compiler/meta/import.test
- /compiler/meta/context.test
- /compiler/meta/cache.test
- /compiler/phase/extension.test
- /compiler/phase/analysis.test
- ... /compiler/syntax.test
+ ... /compiler/arity.test
+ ... /compiler/version.test
+ ... /compiler/reference.test
+ ... /compiler/phase.test
+ ... /compiler/analysis.test
... /compiler/synthesis.test
+ ... /compiler/meta/archive.test
+ ... /compiler/meta/cli.test
+ ... /compiler/meta/export.test
+ ... /compiler/meta/import.test
+ ... /compiler/meta/context.test
+ ... /compiler/meta/cache.test
+ ... /compiler/phase/extension.test
+ ... /compiler/phase/analysis.test
+ ... ... /compiler/syntax.test
+ ... ... /compiler/synthesis.test
)))))
diff --git a/stdlib/source/test/lux/meta/code.lux b/stdlib/source/test/lux/meta/code.lux
index eac8000a9..f01e5889b 100644
--- a/stdlib/source/test/lux/meta/code.lux
+++ b/stdlib/source/test/lux/meta/code.lux
@@ -71,7 +71,7 @@
(_.for [\\parser.Parser])
(`` (all _.and
(do [! random.monad]
- [expected (at ! each /.bit random.bit)]
+ [expected (of ! each /.bit random.bit)]
(_.coverage [\\parser.result]
(and (|> (\\parser.result \\parser.any (list expected))
(!expect {try.#Success _}))
@@ -80,12 +80,12 @@
(,, (with_template [<query> <check> <random> <code> <equivalence>]
[(do [! random.monad]
[expected <random>
- dummy (|> <random> (random.only (|>> (at <equivalence> = expected) not)))]
+ dummy (|> <random> (random.only (|>> (of <equivalence> = expected) not)))]
(all _.and
(_.coverage [<query>]
(|> (\\parser.result <query> (list (<code> expected)))
(!expect (^.multi {try.#Success actual}
- (at <equivalence> = expected actual)))))
+ (of <equivalence> = expected actual)))))
(_.coverage [<check>]
(and (|> (\\parser.result (<check> expected) (list (<code> expected)))
(!expect {try.#Success []}))
@@ -93,7 +93,7 @@
(!expect {try.#Failure _}))))
))]
- [\\parser.any \\parser.this (at ! each /.bit random.bit) function.identity /.equivalence]
+ [\\parser.any \\parser.this (of ! each /.bit random.bit) function.identity /.equivalence]
[\\parser.bit \\parser.this_bit random.bit /.bit bit.equivalence]
[\\parser.nat \\parser.this_nat random.nat /.nat nat.equivalence]
[\\parser.int \\parser.this_int random.int /.int int.equivalence]
@@ -113,8 +113,8 @@
(list (<code> (list (/.nat expected_left)
(/.int expected_right)))))
(!expect (^.multi {try.#Success [actual_left actual_right]}
- (and (at nat.equivalence = expected_left actual_left)
- (at int.equivalence = expected_right actual_right)))))))]
+ (and (of nat.equivalence = expected_left actual_left)
+ (of int.equivalence = expected_right actual_right)))))))]
[\\parser.form /.form]
[\\parser.variant /.variant]
@@ -128,10 +128,10 @@
\\parser.int)
(list (/.int expected_global)))
(!expect (^.multi {try.#Success [actual_local actual_global]}
- (and (at nat.equivalence = expected_local actual_local)
- (at int.equivalence = expected_global actual_global)))))))
+ (and (of nat.equivalence = expected_local actual_local)
+ (of int.equivalence = expected_global actual_global)))))))
(do [! random.monad]
- [dummy (at ! each /.bit random.bit)]
+ [dummy (of ! each /.bit random.bit)]
(_.coverage [\\parser.end?]
(|> (\\parser.result (do <>.monad
[pre \\parser.end?
@@ -143,14 +143,14 @@
(!expect (^.multi {try.#Success verdict}
verdict)))))
(do [! random.monad]
- [dummy (at ! each /.bit random.bit)]
+ [dummy (of ! each /.bit random.bit)]
(_.coverage [\\parser.end]
(and (|> (\\parser.result \\parser.end (list))
(!expect {try.#Success []}))
(|> (\\parser.result \\parser.end (list dummy))
(!expect {try.#Failure _})))))
(do [! random.monad]
- [expected (at ! each /.bit random.bit)]
+ [expected (of ! each /.bit random.bit)]
(_.coverage [\\parser.next]
(|> (\\parser.result (do <>.monad
[pre \\parser.next
@@ -160,7 +160,7 @@
(list expected))
(!expect {try.#Success _}))))
(do [! random.monad]
- [expected (at ! each /.bit random.bit)]
+ [expected (of ! each /.bit random.bit)]
(_.coverage [\\parser.not]
(and (|> (\\parser.result (\\parser.not \\parser.nat) (list expected))
(!expect (^.multi {try.#Success actual}
@@ -180,7 +180,7 @@
(def (random_sequence random)
(All (_ a) (-> (Random a) (Random (List a))))
(do [! random.monad]
- [size (|> random.nat (at ! each (nat.% 3)))]
+ [size (|> random.nat (of ! each (nat.% 3)))]
(random.list size random)))
(def .public random
@@ -220,7 +220,7 @@
(function (_ replacement_simulation)
(let [for_sequence (is (-> (-> (List Code) Code) (Random [Code Code]))
(function (_ to_code)
- (random.only (|>> product.left (at /.equivalence = original) not)
+ (random.only (|>> product.left (of /.equivalence = original) not)
(do [! random.monad]
[parts (..random_sequence replacement_simulation)]
(in [(to_code (list#each product.left parts))
@@ -228,7 +228,7 @@
(all random.either
(random#in [original substitute])
(do [! random.monad]
- [sample (random.only (|>> (at /.equivalence = original) not)
+ [sample (random.only (|>> (of /.equivalence = original) not)
(all random.either
(random#each /.bit random.bit)
(random#each /.nat random.nat)
@@ -252,13 +252,13 @@
(_.coverage [<coverage>]
(and (when (..read (/.format (<coverage> expected)))
{try.#Success actual}
- (at /.equivalence =
+ (of /.equivalence =
actual
(<coverage> expected))
{try.#Failure error}
false)
- (at /.equivalence =
+ (of /.equivalence =
[location.dummy {<tag> expected}]
(<coverage> expected)))))]
@@ -278,13 +278,13 @@
(_.coverage [<coverage>]
(and (when (..read (/.format (<coverage> expected)))
{try.#Success actual}
- (at /.equivalence =
+ (of /.equivalence =
actual
(<coverage> expected))
{try.#Failure error}
false)
- (at /.equivalence =
+ (of /.equivalence =
[location.dummy {<tag> ["" expected]}]
(<coverage> expected)))
))]
@@ -304,13 +304,13 @@
(do [! random.monad]
[[original substitute] (random.only (function (_ [original substitute])
- (not (at /.equivalence = original substitute)))
+ (not (of /.equivalence = original substitute)))
(random.and ..random ..random))
[sample expected] (random.only (function (_ [sample expected])
- (not (at /.equivalence = sample expected)))
+ (not (of /.equivalence = sample expected)))
(..replacement_simulation [original substitute]))]
(_.coverage [/.replaced]
- (at /.equivalence =
+ (of /.equivalence =
expected
(/.replaced original substitute sample))))
diff --git a/stdlib/source/test/lux/meta/compiler/arity.lux b/stdlib/source/test/lux/meta/compiler/arity.lux
index 08f735f81..06e3d9dde 100644
--- a/stdlib/source/test/lux/meta/compiler/arity.lux
+++ b/stdlib/source/test/lux/meta/compiler/arity.lux
@@ -19,7 +19,7 @@
(<| (_.covering /._)
(_.for [/.Arity])
(do [! random.monad]
- [arity (at ! each (n.% 3) random.nat)]
+ [arity (of ! each (n.% 3) random.nat)]
(all _.and
(_.coverage [/.nullary?]
(bit#= (n.= 0 arity) (/.nullary? arity)))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux
index 9f972b10b..665322283 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis.lux
@@ -84,13 +84,13 @@
[]
(`` (all _.and
(do [! random.monad]
- [expected (at ! each (|>> /.bit) random.bit)]
+ [expected (of ! each (|>> /.bit) random.bit)]
(_.coverage [\\parser.result \\parser.any]
(|> (list expected)
(\\parser.result \\parser.any)
(pipe.when
{try.#Success actual}
- (at /.equivalence = expected actual)
+ (of /.equivalence = expected actual)
{try.#Failure _}
false))))
@@ -596,7 +596,7 @@
(_.for [/.State]
..test|state)
(_.coverage [/.format]
- (bit#= (at /.equivalence = left right)
+ (bit#= (of /.equivalence = left right)
(text#= (/.format left) (/.format right))))
/complex.test
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux
index f4de2a962..d09fdc234 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/complex.lux
@@ -22,8 +22,8 @@
(def test|tag
Test
(do [! random.monad]
- [multiplicity (at ! each (n.max 2) random.nat)
- tag (at ! each (n.% multiplicity) random.nat)
+ [multiplicity (of ! each (n.max 2) random.nat)
+ tag (of ! each (n.% multiplicity) random.nat)
lefts random.nat
right? random.bit]
(all _.and
@@ -72,6 +72,6 @@
[left random
right random]
(_.coverage [/.format]
- (bit#= (at (/.equivalence n.equivalence) = left right)
+ (bit#= (of (/.equivalence n.equivalence) = left right)
(text#= (/.format %.nat left) (/.format %.nat right)))))
))))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux
index 1a04f77e1..0d12a11fa 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/coverage.lux
@@ -64,8 +64,8 @@
whens (random.set n.hash whens ..random_tag)]
(|> whens
set.list
- (monad.each ! (function (_ when) (at ! each (|>> [when]) again)))
- (at ! each (dictionary.of_list n.hash))))
+ (monad.each ! (function (_ when) (of ! each (|>> [when]) again)))
+ (of ! each (dictionary.of_list n.hash))))
)
(random.and again again)
(random.and again again)
@@ -101,7 +101,7 @@
))
(do [! random.monad]
- [tag (at ! each ++ ..random_tag)
+ [tag (of ! each ++ ..random_tag)
right? random.bit
.let [lefts (//complex.lefts right? tag)]
[sub_coverage sub_pattern] again]
@@ -206,7 +206,7 @@
[[expected/0 pattern/0] ..random_partial_pattern
[expected/1 pattern/1] (random.only (|>> product.left (/#= expected/0) not)
..random_partial_pattern)
- expected_maximum (at ! each (n.+ 2) ..random_tag)
+ expected_maximum (of ! each (n.+ 2) ..random_tag)
.let [random_tag (random#each (n.% expected_maximum) random.nat)]
tag/0 random_tag
tag/1 (random.only (|>> (n.= tag/0) not) random_tag)
@@ -253,7 +253,7 @@
frac random.safe_frac
text (random.unicode 1)
- arity (at ! each (n.+ 2) ..random_tag)
+ arity (of ! each (n.+ 2) ..random_tag)
.let [random_tag (random#each (n.% arity) random.nat)]
tag/0 random_tag
tag/1 (random.only (|>> (n.= tag/0) not) random_tag)]
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux
index 0cfac766e..ac8b82ae8 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/inference.lux
@@ -106,7 +106,7 @@
expected ..nominal
name ($symbol.random 1 1)
[type/0 term/0] ..simple_parameter
- arity (at ! each (n.% 10) random.nat)
+ arity (of ! each (n.% 10) random.nat)
nats (random.list arity random.nat)]
(all _.and
(_.coverage [/.general]
@@ -126,7 +126,7 @@
(/phase.result state)
(try#each (function (_ [actual analysis/*])
(and (type#= expected actual)
- (at (list.equivalence //.equivalence) =
+ (of (list.equivalence //.equivalence) =
(list#each (|>> //.nat) nats)
analysis/*))))
(try.else false))
@@ -219,12 +219,12 @@
.let [state [/extension.#bundle (/extension/analysis.bundle ..eval)
/extension.#state lux]]
name ($symbol.random 1 1)
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
[type/0 term/0] ..simple_parameter
[type/1 term/1] (random.only (|>> product.left (same? type/0) not)
..simple_parameter)
types/*,terms/* (random.list arity ..simple_parameter)
- tag (at ! each (n.% arity) random.nat)
+ tag (of ! each (n.% arity) random.nat)
.let [[lefts right?] (//complex.choice arity tag)]
arbitrary_right? random.bit]
(all _.and
@@ -328,7 +328,7 @@
.let [state [/extension.#bundle (/extension/analysis.bundle ..eval)
/extension.#state lux]]
name ($symbol.random 1 1)
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
[type/0 term/0] ..simple_parameter
[type/1 term/1] (random.only (|>> product.left (same? type/0) not)
..simple_parameter)
@@ -405,7 +405,7 @@
[type/0 term/0] ..simple_parameter
[type/1 term/1] (random.only (|>> product.left (same? type/0) not)
..simple_parameter)
- lefts (at ! each (n.% 10) random.nat)
+ lefts (of ! each (n.% 10) random.nat)
right? random.bit]
(all _.and
..test|general
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux
index d6f7fb079..c4c5cd193 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/macro.lux
@@ -51,9 +51,9 @@
(<| (_.covering /._)
(_.for [/.Expander])
(do [! random.monad]
- [multiplicity (at ! each (|>> (n.% 8) (n.+ 2))
+ [multiplicity (of ! each (|>> (n.% 8) (n.+ 2))
random.nat)
- choice (at ! each (n.% multiplicity)
+ choice (of ! each (n.% multiplicity)
random.nat)
expected_error (random.upper_cased 5)
@@ -81,7 +81,7 @@
(_.coverage [/.expansion]
(|> (/.expansion ..expander name multiple (list mono))
(meta.result lux)
- (try#each (at (list.equivalence code.equivalence) =
+ (try#each (of (list.equivalence code.equivalence) =
(list.repeated multiplicity mono)))
(try.else false)))
(_.coverage [/.expansion_failed]
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux
index 26dd79c7b..372359050 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/module.lux
@@ -200,13 +200,13 @@
public? random.bit
def_type ..nominal
- arity (at ! each (|>> (n.% 10) ++) random.nat)
+ arity (of ! each (|>> (n.% 10) ++) random.nat)
labels|head (random.lower_cased 1)
labels|tail (|> (random.lower_cased 1)
(random.only (|>> (text#= labels|head) not))
(random.set text.hash (-- arity))
- (at ! each set.list))
- index (at ! each (n.% arity) random.nat)
+ (of ! each set.list))
+ index (of ! each (n.% arity) random.nat)
.let [definition {.#Definition [public? def_type []]}
alias {.#Alias [module_name def_name]}]]
(all _.and
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux
index 0bcd9505a..ad7342a9a 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/pattern.lux
@@ -53,7 +53,7 @@
($equivalence.spec /.equivalence ..random))
(_.coverage [/.format]
- (bit#= (at /.equivalence = left right)
+ (bit#= (of /.equivalence = left right)
(text#= (/.format left) (/.format right))))
(_.coverage [/.unit]
(when (/.unit)
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux
index d01895bec..2de2ce625 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/analysis/simple.lux
@@ -41,6 +41,6 @@
[left ..random
right ..random]
(_.coverage [/.format]
- (bit#= (at /.equivalence = left right)
+ (bit#= (of /.equivalence = left right)
(text#= (/.format left) (/.format right)))))
)))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux
index 274a53f4b..a53935c09 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis.lux
@@ -919,10 +919,10 @@
@left (random.lower_cased 9)
@right (random.lower_cased 10)
- $abstraction/0 (at ! each code.local (random.lower_cased 11))
- $parameter/0 (at ! each code.local (random.lower_cased 12))
- $abstraction/1 (at ! each code.local (random.lower_cased 13))
- $parameter/1 (at ! each code.local (random.lower_cased 14))])
+ $abstraction/0 (of ! each code.local (random.lower_cased 11))
+ $parameter/0 (of ! each code.local (random.lower_cased 12))
+ $abstraction/1 (of ! each code.local (random.lower_cased 13))
+ $parameter/1 (of ! each code.local (random.lower_cased 14))])
(all _.and
(_.coverage [/.phase]
(and (..can_analyse_unit! lux module/0)
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux
index 829452717..eda7a7a45 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/complex.lux
@@ -135,9 +135,9 @@
.let [state [//extension.#bundle (//extension/analysis.bundle ..eval)
//extension.#state lux]]
name ($symbol.random 1 1)
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
types/*,terms/* (random.list arity ..simple_parameter)
- tag (at ! each (n.% arity) random.nat)
+ tag (of ! each (n.% arity) random.nat)
.let [[lefts right?] (//complex.choice arity tag)
[tagT tagC] (|> types/*,terms/*
(list.item tag)
@@ -218,13 +218,13 @@
.let [state [//extension.#bundle (//extension/analysis.bundle ..eval)
//extension.#state lux]]
name ($symbol.random 1 1)
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
types/*,terms/* (random.list arity ..simple_parameter)
- tag (at ! each (n.% arity) random.nat)
+ tag (of ! each (n.% arity) random.nat)
.let [[lefts right?] (//complex.choice arity tag)]
tags (|> (random.lower_cased 1)
(random.set text.hash arity)
- (at ! each set.list))
+ (of ! each set.list))
.let [module (product.left name)
sumT (type.variant (list#each product.left types/*,terms/*))
variantT {.#Named name sumT}
@@ -291,7 +291,7 @@
.let [state [//extension.#bundle (//extension/analysis.bundle ..eval)
//extension.#state lux]]
name ($symbol.random 1 1)
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
types/*,terms/* (random.list arity ..simple_parameter)
[type/0 term/0] ..simple_parameter
[type/1 term/1] ..simple_parameter
@@ -435,8 +435,8 @@
.let [state [//extension.#bundle (//extension/analysis.bundle ..eval)
//extension.#state lux]]
name ($symbol.random 1 1)
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
- slice (at ! each (|>> (n.% (-- arity)) ++) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ slice (of ! each (|>> (n.% (-- arity)) ++) random.nat)
[type/0 term/0] ..simple_parameter
slot/0 (random.lower_cased 1)
types/*,terms/* (random.list arity ..simple_parameter)
@@ -514,7 +514,7 @@
(pipe.when
{try.#Success {.#Some [actual_arity actual_tuple actual_type]}}
(and (n.= arity actual_arity)
- (at code.equivalence = (code.tuple tuple) (code.tuple actual_tuple))
+ (of code.equivalence = (code.tuple tuple) (code.tuple actual_tuple))
(type#= :record: actual_type))
_
@@ -635,11 +635,11 @@
[lux ..random_state
.let [state [//extension.#bundle (//extension/analysis.bundle ..eval)
//extension.#state lux]]
- arity (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
types/*,terms/* (random.list arity ..simple_parameter)
[type/0 term/0] ..simple_parameter
[type/1 term/1] ..simple_parameter
- tag (at ! each (n.% arity) random.nat)
+ tag (of ! each (n.% arity) random.nat)
.let [[lefts right?] (//complex.choice arity tag)]]
(all _.and
..test|sum
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux
index a488520a8..b9af5a7e3 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/analysis/when.lux
@@ -61,13 +61,13 @@
.let [state [//extension.#bundle (//extension/analysis.bundle ..eval)
//extension.#state lux]]
module/0 (random.lower_cased 1)
- name/0 (at ! each (|>> [module/0]) (random.lower_cased 2))
+ name/0 (of ! each (|>> [module/0]) (random.lower_cased 2))
[input/0 simple/0] $//inference.simple_parameter
[input/1 simple/1] $//inference.simple_parameter
[input/2 simple/2] $//inference.simple_parameter
- $binding/0 (at ! each code.local (random.lower_cased 3))
- $binding/1 (at ! each code.local (random.lower_cased 4))
- $binding/2 (at ! each code.local (random.lower_cased 5))]
+ $binding/0 (of ! each code.local (random.lower_cased 3))
+ $binding/1 (of ! each code.local (random.lower_cased 4))
+ $binding/2 (of ! each code.local (random.lower_cased 5))]
(all _.and
(_.coverage [/.tuple]
(let [tuple? (is (-> Type Type Bit)
@@ -510,10 +510,10 @@
[output/0 body/0] $//inference.simple_parameter
[output/1 body/1] (random.only (|>> product.left (same? output/0) not)
$//inference.simple_parameter)
- $binding/0 (at ! each code.local (random.lower_cased 3))
- $binding/1 (at ! each code.local (random.lower_cased 4))
- $binding/2 (at ! each code.local (random.lower_cased 5))
- extension/0 (at ! each code.text (random.lower_cased 6))
+ $binding/0 (of ! each code.local (random.lower_cased 3))
+ $binding/1 (of ! each code.local (random.lower_cased 4))
+ $binding/2 (of ! each code.local (random.lower_cased 5))
+ extension/0 (of ! each code.text (random.lower_cased 6))
bit/0 random.bit
nat/0 random.nat]
(all _.and
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux
index f108a9334..cf64648b9 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension.lux
@@ -48,7 +48,7 @@
(_.coverage [/.read]
(|> (is (/.Operation Int Nat Nat Text)
(/.read %.int))
- (at phase.functor each (text#= (%.int state)))
+ (of phase.functor each (text#= (%.int state)))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false)))
@@ -57,7 +57,7 @@
(do phase.monad
[_ (/.update ++)]
(/.read %.int)))
- (at phase.functor each (text#= (%.int (++ state))))
+ (of phase.functor each (text#= (%.int (++ state))))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false)))
@@ -67,7 +67,7 @@
[|state'| (/.temporary ++ (/.read %.int))
|state| (/.read %.int)]
(in (format |state'| " " |state|))))
- (at phase.functor each (text#= (format (%.int (++ state)) " " (%.int state))))
+ (of phase.functor each (text#= (format (%.int (++ state)) " " (%.int state))))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false)))
@@ -80,7 +80,7 @@
(/.read %.int))
|state'| (/.read %.int)]
(in (format |state'| " " |state|))))
- (at phase.functor each (text#= (format (%.int (i.+ +2 state))
+ (of phase.functor each (text#= (format (%.int (i.+ +2 state))
" " (%.int (i.+ +1 state)))))
(phase.result [/.#bundle /.empty
/.#state state])
@@ -94,12 +94,12 @@
(def handler/0
(/.Handler Int Nat Nat)
(function (_ @self phase archive inputs)
- (at phase.monad in (list#mix n.+ 0 inputs))))
+ (of phase.monad in (list#mix n.+ 0 inputs))))
(def handler/1
(/.Handler Int Nat Nat)
(function (_ @self phase archive inputs)
- (at phase.monad in (list#mix n.* 1 inputs))))
+ (of phase.monad in (list#mix n.* 1 inputs))))
(def test|name
Test
@@ -123,7 +123,7 @@
false)))
(_.coverage [/.unknown]
(|> (/.apply archive.empty (function (_ archive input)
- (at phase.monad in (++ input)))
+ (of phase.monad in (++ input)))
[extension (list left right)])
(phase.result [/.#bundle /.empty
/.#state state])
@@ -139,7 +139,7 @@
Test
(let [phase (is (/.Phase Int Nat Nat)
(function (_ archive input)
- (at phase.monad in (++ input))))]
+ (of phase.monad in (++ input))))]
(do [! random.monad]
[state random.int
@@ -155,7 +155,7 @@
(|> (do phase.monad
[_ (/.install extender extension handler/0)]
(/.apply archive.empty phase [extension (list left right)]))
- (at phase.functor each (n.= (n.+ left right)))
+ (of phase.functor each (n.= (n.+ left right)))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false)))
@@ -165,11 +165,11 @@
(let [! phase.monad]
(|> inputs
(monad.each ! (phase archive))
- (at ! each (list#mix n.+ 0))))))]
+ (of ! each (list#mix n.+ 0))))))]
(|> (do phase.monad
[_ (/.install extender extension handler)]
(/.apply archive.empty phase [extension (list left right)]))
- (at phase.functor each (n.= (n.+ (++ left) (++ right))))
+ (of phase.functor each (n.= (n.+ (++ left) (++ right))))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false))))
@@ -177,9 +177,9 @@
(|> (do phase.monad
[_ (/.with extender (dictionary.of_list text.hash (list [extension handler/1])))]
(/.apply archive.empty (function (_ archive input)
- (at phase.monad in (++ input)))
+ (of phase.monad in (++ input)))
[extension (list left right)]))
- (at phase.functor each (n.= (n.* left right)))
+ (of phase.functor each (n.= (n.* left right)))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false)))
@@ -211,7 +211,7 @@
(/.lifted (do phase.monad
[]
(in expected))))
- (at phase.functor each (same? expected))
+ (of phase.functor each (same? expected))
(phase.result [/.#bundle /.empty
/.#state state])
(try.else false))
@@ -232,7 +232,7 @@
(is (/.Operation Int Nat Nat Nat))
/.up
(is (phase.Operation Int Nat))
- (at phase.functor each (same? expected))
+ (of phase.functor each (same? expected))
(phase.result state)
(try.else false)))
))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux
index 258333074..44e1fa5cd 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/extension/analysis/lux.lux
@@ -76,9 +76,9 @@
(def i64
Test
(do [! r.monad]
- [subjectC (|> r.nat (at ! each code.nat))
- signedC (|> r.int (at ! each code.int))
- paramC (|> r.nat (at ! each code.nat))]
+ [subjectC (|> r.nat (of ! each code.nat))
+ signedC (|> r.int (of ! each code.int))
+ paramC (|> r.nat (of ! each code.nat))]
(all _.and
(_.test "i64 'and'."
(check_success+ (symbol .i64_and#) (list paramC subjectC) Nat))
@@ -103,8 +103,8 @@
(def int
Test
(do [! r.monad]
- [subjectC (|> r.int (at ! each code.int))
- paramC (|> r.int (at ! each code.int))]
+ [subjectC (|> r.int (of ! each code.int))
+ paramC (|> r.int (of ! each code.int))]
(all _.and
(_.test "Can multiply integers."
(check_success+ (symbol .int_*#) (list paramC subjectC) Int))
@@ -123,9 +123,9 @@
(def frac
Test
(do [! r.monad]
- [subjectC (|> r.safe_frac (at ! each code.frac))
- paramC (|> r.safe_frac (at ! each code.frac))
- encodedC (|> r.safe_frac (at ! each (|>> %.frac code.text)))]
+ [subjectC (|> r.safe_frac (of ! each code.frac))
+ paramC (|> r.safe_frac (of ! each code.frac))
+ encodedC (|> r.safe_frac (of ! each (|>> %.frac code.text)))]
(all _.and
(_.test "Can add frac numbers."
(check_success+ (symbol .f64_+#) (list paramC subjectC) Frac))
@@ -152,11 +152,11 @@
(def text
Test
(do [! r.monad]
- [subjectC (|> (r.unicode 5) (at ! each code.text))
- paramC (|> (r.unicode 5) (at ! each code.text))
- replacementC (|> (r.unicode 5) (at ! each code.text))
- fromC (|> r.nat (at ! each code.nat))
- toC (|> r.nat (at ! each code.nat))]
+ [subjectC (|> (r.unicode 5) (of ! each code.text))
+ paramC (|> (r.unicode 5) (of ! each code.text))
+ replacementC (|> (r.unicode 5) (of ! each code.text))
+ fromC (|> r.nat (of ! each code.nat))
+ toC (|> r.nat (of ! each code.nat))]
(all _.and
(_.test "Can test text equivalence."
(check_success+ (symbol .text_=#) (list paramC subjectC) Bit))
@@ -177,8 +177,8 @@
(def io
Test
(do [! r.monad]
- [logC (|> (r.unicode 5) (at ! each code.text))
- exitC (|> r.int (at ! each code.int))]
+ [logC (|> (r.unicode 5) (of ! each code.text))
+ exitC (|> r.int (of ! each code.int))]
(all _.and
(_.test "Can log messages to standard output."
(check_success+ (symbol .log!#) (list logC) Any))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/function.lux
index 33b02eaf7..a65dda6d0 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/function.lux
@@ -86,7 +86,7 @@
(def (random_unit output?)
Scenario
- (at random.monad in
+ (of random.monad in
[true
(synthesis.text synthesis.unit)
(analysis.unit)]))
@@ -153,7 +153,7 @@
(def (random_variable arity output?)
(-> Arity Scenario)
(do [! random.monad]
- [register (at ! each (|>> (n.% arity) ++) random.nat)]
+ [register (of ! each (|>> (n.% arity) ++) random.nat)]
(in [(not (n.= 0 register))
(synthesis.variable/local register)
(if (n.= arity register)
@@ -183,7 +183,7 @@
text_test (random.unicode 1)
[loop?_input expected_input actual_input] (random_value false)
[loop?_output expected_output actual_output] (random_value output?)
- lefts (|> random.nat (at ! each (n.% 10)))
+ lefts (|> random.nat (of ! each (n.% 10)))
right? random.bit
.let [side|member (if right?
{.#Right lefts}
@@ -285,7 +285,7 @@
(def (random_get random_value output?)
(-> Scenario Scenario)
(do [! random.monad]
- [lefts (|> random.nat (at ! each (n.% 10)))
+ [lefts (|> random.nat (of ! each (n.% 10)))
right? random.bit
[loop?_record expected_record actual_record] (random_value false)]
(in [loop?_record
@@ -349,7 +349,7 @@
Scenario
(do [! random.monad]
[[loop?_output expected_output actual_output] (..random_nat output?)
- arity (|> random.nat (at ! each (|>> (n.% 5) ++)))
+ arity (|> random.nat (of ! each (|>> (n.% 5) ++)))
.let [environment (all list#composite
(list#each (|>> {variable.#Foreign})
(list.indices arity))
@@ -369,7 +369,7 @@
(-> Scenario Scenario)
(do [! random.monad]
[[loop?_abstraction expected_abstraction actual_abstraction] (..random_nat output?)
- arity (|> random.nat (at ! each (|>> (n.% 5) ++)))
+ arity (|> random.nat (of ! each (|>> (n.% 5) ++)))
inputs (random.list arity (random_value false))]
(in [(list#mix (function (_ new old)
(and new old))
@@ -425,7 +425,7 @@
(def random_abstraction
(Random [Synthesis Analysis])
(do [! random.monad]
- [arity (|> random.nat (at ! each (|>> (n.% 5) ++)))
+ [arity (|> random.nat (of ! each (|>> (n.% 5) ++)))
[loop? expected_body actual_body] (random_body arity true)]
(in [(..n_function loop? arity expected_body)
(..n_abstraction arity actual_body)])))
@@ -439,12 +439,12 @@
(//.phase archive.empty)
(phase.result [///bundle.empty synthesis.init])
(!expect (^.multi {try.#Success actual}
- (at synthesis.equivalence = expected actual)))))))
+ (of synthesis.equivalence = expected actual)))))))
(def application
Test
(do [! random.monad]
- [arity (|> random.nat (at ! each (|>> (n.% 10) (n.max 1))))
+ [arity (|> random.nat (of ! each (|>> (n.% 10) (n.max 1))))
funcA //primitive.primitive
argsA (random.list arity //primitive.primitive)]
(_.coverage [/.apply]
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/loop.lux
index 2fa13fdb7..e628b8b7a 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/loop.lux
@@ -33,13 +33,13 @@
(`` (all random.either
(,, (with_template [<synthesis> <random>]
[(do [! random.monad]
- [example (at ! each (|>> <synthesis>) <random>)]
+ [example (of ! each (|>> <synthesis>) <random>)]
(in [next
[example
example]]))]
[//.bit random.bit]
- [//.i64 (at ! each .i64 random.nat)]
+ [//.i64 (of ! each .i64 random.nat)]
[//.f64 random.frac]
[//.text (random.unicode 1)]
))
@@ -57,7 +57,7 @@
(def (variable offset arity next)
(Scenario Variable)
(let [local (do [! random.monad]
- [register (at ! each (|>> (n.% arity) ++) random.nat)]
+ [register (of ! each (|>> (n.% arity) ++) random.nat)]
(in [next
[{variable.#Local (/.register_optimization offset register)}
{variable.#Local register}]]))]
@@ -66,7 +66,7 @@
_ (all random.either
local
(do [! random.monad]
- [foreign (at ! each (n.% offset) random.nat)]
+ [foreign (of ! each (n.% offset) random.nat)]
(in [next
[{variable.#Local foreign}
{variable.#Foreign foreign}]]))))))
@@ -119,19 +119,19 @@
//.path/pop]])
(,, (with_template [<path> <random>]
[(do [! random.monad]
- [example (at ! each (|>> <path>) <random>)]
+ [example (of ! each (|>> <path>) <random>)]
(in [next
[example
example]]))]
[//.path/bit random.bit]
- [//.path/i64 (at ! each .i64 random.nat)]
+ [//.path/i64 (of ! each .i64 random.nat)]
[//.path/f64 random.frac]
[//.path/text (random.unicode 1)]
))
(,, (with_template [<path>]
[(do [! random.monad]
- [example (at ! each (|>> <path>)
+ [example (of ! each (|>> <path>)
(random.or random.nat
random.nat))]
(in [next
@@ -184,7 +184,7 @@
(all random.either
(do [! random.monad]
[[next [recordE recordA]] (..reference offset arity next)
- path_length (at ! each (|>> (n.% 5) ++) random.nat)
+ path_length (of ! each (|>> (n.% 5) ++) random.nat)
path (random.list path_length random_member)]
(in [next
[(//.branch/get [path recordE])
@@ -221,7 +221,7 @@
(do [! random.monad]
[[next [firstE firstA]] (..variable offset arity next)
[next [secondE secondA]] (..variable offset arity next)
- arity (at ! each (n.max 1) random.nat)
+ arity (of ! each (n.max 1) random.nat)
[next [bodyE bodyA]] (..primitive 0 arity next)]
(in [next
[(//.function/abstraction
@@ -268,10 +268,10 @@
(<| (_.covering /._)
(all _.and
(do [! random.monad]
- [expected_offset (at ! each (|>> (n.% 5) (n.+ 2)) random.nat)
- arity (at ! each (|>> (n.% 5) ++) random.nat)
+ [expected_offset (of ! each (|>> (n.% 5) (n.+ 2)) random.nat)
+ arity (of ! each (|>> (n.% 5) ++) random.nat)
expected_inits (|> random.nat
- (at ! each (|>> .i64 //.i64))
+ (of ! each (|>> .i64 //.i64))
(random.list arity))
[_ [expected iteration]] (..scenario expected_offset arity 0)]
(_.coverage [/.Transform /.optimization /.register_optimization]
@@ -285,10 +285,10 @@
actual])}
(and (n.= expected_offset
actual_offset)
- (at (list.equivalence //.equivalence) =
+ (of (list.equivalence //.equivalence) =
expected_inits
actual_inits)
- (at //.equivalence = expected actual))
+ (of //.equivalence = expected actual))
_
false)))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux
index 055f1440a..6a3904e7b 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/structure.lux
@@ -39,8 +39,8 @@
(def variant
Test
(do [! r.monad]
- [size (|> r.nat (at ! each (|>> (n.% 10) (n.+ 2))))
- tagA (|> r.nat (at ! each (n.% size)))
+ [size (|> r.nat (of ! each (|>> (n.% 10) (n.+ 2))))
+ tagA (|> r.nat (of ! each (n.% size)))
.let [right? (n.= (-- size) tagA)
lefts (if right?
(-- tagA)
@@ -63,7 +63,7 @@
(def tuple
Test
(do [! r.monad]
- [size (|> r.nat (at ! each (|>> (n.% 10) (n.max 2))))
+ [size (|> r.nat (of ! each (|>> (n.% 10) (n.max 2))))
membersA (r.list size //primitive.primitive)]
(_.test "Can synthesize tuple."
(|> (////analysis.tuple membersA)
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/variable.lux
index ff011a319..02ffd9a6b 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/variable.lux
@@ -55,7 +55,7 @@
(<synthesis> value)])))]
[bit_scenario synthesis.bit random.bit]
- [i64_scenario synthesis.i64 (at ! each .i64 random.nat)]
+ [i64_scenario synthesis.i64 (of ! each .i64 random.nat)]
[f64_scenario synthesis.f64 random.frac]
[text_scenario synthesis.text (random.unicode 1)]
)
@@ -101,7 +101,7 @@
(def (tuple_scenario context)
(Scenario Synthesis)
(let [registers (dictionary.entries (the #necessary context))]
- (at random.monad in
+ (of random.monad in
[(synthesis.tuple (list#each (|>> product.left synthesis.variable/local) registers))
(synthesis.tuple (list#each (|>> product.right synthesis.variable/local) registers))])))
@@ -148,7 +148,7 @@
(def (get_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do [! random.monad]
- [length (at ! each (|>> (n.% 5) ++) random.nat)
+ [length (of ! each (|>> (n.% 5) ++) random.nat)
path (random.list length ..random_member)
[expected_record actual_record] (scenario context)]
(in [(synthesis.branch/get [path expected_record])
@@ -192,7 +192,7 @@
{synthesis.#Then actual_then}}]))]
[synthesis.#Bit random.bit]
- [synthesis.#I64 (at ! each .i64 random.nat)]
+ [synthesis.#I64 (of ! each .i64 random.nat)]
[synthesis.#F64 random.frac]
[synthesis.#Text (random.unicode 1)]
)))
@@ -288,7 +288,7 @@
(def (apply_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do [! random.monad]
- [abstraction (at ! each (|>> synthesis.constant)
+ [abstraction (of ! each (|>> synthesis.constant)
(random.and (random.unicode 1)
(random.unicode 1)))
inputs (random.list ..scope_arity (scenario context))]
@@ -336,5 +336,5 @@
(_.coverage [/.optimization]
(|> (/.optimization input)
(!expect (^.multi {try.#Success actual}
- (at synthesis.equivalence = expected actual))))))
+ (of synthesis.equivalence = expected actual))))))
)))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/when.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/when.lux
index 65350ce95..6e14dd3f4 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/when.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/synthesis/when.lux
@@ -45,7 +45,7 @@
Test
(do [! random.monad]
[maskedA //primitive.primitive
- temp (|> random.nat (at ! each (n.% 100)))
+ temp (|> random.nat (of ! each (n.% 100)))
.let [maskA (analysis.when
[maskedA
[[{analysis.#Bind temp}
@@ -114,7 +114,7 @@
(def random_member
(Random synthesis.Member)
(do [! random.monad]
- [lefts (|> random.nat (at ! each (n.% 10)))
+ [lefts (|> random.nat (of ! each (n.% 10)))
right? random.bit]
(in (if right?
{.#Right lefts}
@@ -123,7 +123,7 @@
(def random_path
(Random (analysis.Tuple synthesis.Member))
(do [! random.monad]
- [size_1 (|> random.nat (at ! each (|>> (n.% 10) ++)))]
+ [size_1 (|> random.nat (of ! each (|>> (n.% 10) ++)))]
(random.list size_1 ..random_member)))
(def (get_pattern path)
@@ -150,9 +150,9 @@
Test
(do [! random.monad]
[recordA (|> random.nat
- (at ! each (|>> analysis.nat))
+ (of ! each (|>> analysis.nat))
(random.list 10)
- (at ! each (|>> analysis.tuple)))
+ (of ! each (|>> analysis.tuple)))
pathA ..random_path
[pattern @member] (get_pattern pathA)
.let [getA (analysis.when [recordA [[pattern
@@ -164,7 +164,7 @@
(phase.result [///bundle.empty synthesis.init])
(pipe.when
{try.#Success (synthesis.branch/get [pathS recordS])}
- (and (at (list.equivalence (sum.equivalence n.= n.=)) = pathA pathS)
+ (and (of (list.equivalence (sum.equivalence n.= n.=)) = pathA pathS)
(//primitive.corresponds? recordA recordS))
_
@@ -189,7 +189,7 @@
(All (_ a) (-> (Hash a) (Random a) (Random [a a a a a])))
(|> random_element
(random.set hash 5)
- (at random.monad each (|>> set.list
+ (of random.monad each (|>> set.list
(pipe.when
(list s0 s1 s2 s3 s4)
[s0 s1 s2 s3 s4]
@@ -268,7 +268,7 @@
(def random_tuple
(Random [Path Match])
(do [! random.monad]
- [mid_size (at ! each (n.% 4) random.nat)
+ [mid_size (of ! each (n.% 4) random.nat)
value/first (random.unicode 1)
value/mid (random.list mid_size (random.unicode 1))
@@ -334,15 +334,15 @@
(def when_test
Test
(do [! random.monad]
- [expected_input (at ! each (|>> .i64 synthesis.i64) random.nat)
+ [expected_input (of ! each (|>> .i64 synthesis.i64) random.nat)
[expected_path match] ..random_when]
(_.coverage [/.synthesize_when]
(|> (/.synthesize_when //.phase archive.empty expected_input match)
(phase.result [///bundle.empty synthesis.init])
(pipe.when
{try.#Success (synthesis.branch/when [actual_input actual_path])}
- (and (at synthesis.equivalence = expected_input actual_input)
- (at synthesis.path_equivalence = expected_path actual_path))
+ (and (of synthesis.equivalence = expected_input actual_input)
+ (of synthesis.path_equivalence = expected_path actual_path))
_
false)))))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux b/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux
index ea75c4274..81c94d3df 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/syntax.lux
@@ -27,7 +27,7 @@
(def symbol_part^
(Random Text)
(do [! r.monad]
- [size (|> r.nat (at ! each (|>> (n.% 20) (n.max 1))))]
+ [size (|> r.nat (of ! each (|>> (n.% 20) (n.max 1))))]
(r.lower_case_alpha size)))
(def symbol^
@@ -84,7 +84,7 @@
false
{.#Right [_ parsed]}
- (at code.equivalence = parsed sample)))
+ (of code.equivalence = parsed sample)))
(do !
[other code^]
(_.test "Can parse multiple Lux code nodes."
@@ -102,8 +102,8 @@
false
{.#Right [_ =other]}
- (and (at code.equivalence = sample =sample)
- (at code.equivalence = other =other)))))))
+ (and (of code.equivalence = sample =sample)
+ (of code.equivalence = other =other)))))))
)))
(def comment_text^
@@ -134,7 +134,7 @@
false
{.#Right [_ parsed]}
- (at code.equivalence = parsed sample)))
+ (of code.equivalence = parsed sample)))
)))
(def .public test
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis.lux
index f1c85f69d..357778028 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis.lux
@@ -58,9 +58,9 @@
(def random_environment
(Random (Environment Synthesis))
(do [! random.monad]
- [size (at ! each (n.% 5) random.nat)]
+ [size (of ! each (n.% 5) random.nat)]
(|> ..random_variable
- (at ! each (|>> synthesis.variable))
+ (of ! each (|>> synthesis.variable))
(random.list size))))
(def simple
@@ -69,12 +69,12 @@
(,, (with_template [<query> <check> <random> <synthesis> <equivalence>]
[(do [! random.monad]
[expected <random>
- dummy (|> <random> (random.only (|>> (at <equivalence> = expected) not)))]
+ dummy (|> <random> (random.only (|>> (of <equivalence> = expected) not)))]
(all _.and
(_.coverage [<query>]
(|> (\\parser.result <query> (list (<synthesis> expected)))
(!expect (^.multi {try.#Success actual}
- (at <equivalence> = expected actual)))))
+ (of <equivalence> = expected actual)))))
(_.coverage [<check>]
(and (|> (\\parser.result (<check> expected) (list (<synthesis> expected)))
(!expect {try.#Success _}))
@@ -108,10 +108,10 @@
(synthesis.f64 expected_f64)
(synthesis.text expected_text)))))
(!expect (^.multi {try.#Success [actual_bit actual_i64 actual_f64 actual_text]}
- (and (at bit.equivalence = expected_bit actual_bit)
- (at i64.equivalence = expected_i64 actual_i64)
- (at frac.equivalence = expected_f64 actual_f64)
- (at text.equivalence = expected_text actual_text)))))
+ (and (of bit.equivalence = expected_bit actual_bit)
+ (of i64.equivalence = expected_i64 actual_i64)
+ (of frac.equivalence = expected_f64 actual_f64)
+ (of text.equivalence = expected_text actual_text)))))
(|> (\\parser.result (\\parser.tuple (all <>.and \\parser.bit \\parser.i64 \\parser.f64 \\parser.text))
(list (synthesis.text expected_text)))
(!expect (^.multi {try.#Failure error}
@@ -124,10 +124,10 @@
(and (|> (\\parser.result (\\parser.function arity \\parser.text)
(list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
(!expect (^.multi {try.#Success [actual_environment actual_body]}
- (and (at (list.equivalence synthesis.equivalence) =
+ (and (of (list.equivalence synthesis.equivalence) =
expected_environment
actual_environment)
- (at text.equivalence = expected_body actual_body)))))
+ (of text.equivalence = expected_body actual_body)))))
(|> (\\parser.result (\\parser.function arity \\parser.text)
(list (synthesis.text expected_body)))
(!expect (^.multi {try.#Failure error}
@@ -142,7 +142,7 @@
(!expect (^.multi {try.#Failure error}
(exception.match? \\parser.wrong_arity error))))))
(do [! random.monad]
- [arity (at ! each (|>> (n.% 10) ++) random.nat)
+ [arity (of ! each (|>> (n.% 10) ++) random.nat)
expected_offset random.nat
expected_inits (random.list arity random.bit)
expected_body (random.unicode 1)]
@@ -152,11 +152,11 @@
(list#each (|>> synthesis.bit) expected_inits)
(synthesis.text expected_body)])))
(!expect (^.multi {try.#Success [actual_offset actual_inits actual_body]}
- (and (at n.equivalence = expected_offset actual_offset)
- (at (list.equivalence bit.equivalence) =
+ (and (of n.equivalence = expected_offset actual_offset)
+ (of (list.equivalence bit.equivalence) =
expected_inits
actual_inits)
- (at text.equivalence = expected_body actual_body)))))
+ (of text.equivalence = expected_body actual_body)))))
(|> (\\parser.result (\\parser.loop (<>.many \\parser.bit) \\parser.text)
(list (synthesis.text expected_body)))
(!expect (^.multi {try.#Failure error}
@@ -169,23 +169,23 @@
(_.for [\\parser.Parser])
(all _.and
(do [! random.monad]
- [expected (at ! each (|>> synthesis.i64) random.i64)]
+ [expected (of ! each (|>> synthesis.i64) random.i64)]
(_.coverage [\\parser.result \\parser.any]
(|> (\\parser.result \\parser.any (list expected))
(!expect (^.multi {try.#Success actual}
- (at synthesis.equivalence = expected actual))))))
+ (of synthesis.equivalence = expected actual))))))
(_.coverage [\\parser.empty_input]
(|> (\\parser.result \\parser.any (list))
(!expect (^.multi {try.#Failure error}
(exception.match? \\parser.empty_input error)))))
(do [! random.monad]
- [expected (at ! each (|>> synthesis.i64) random.i64)]
+ [expected (of ! each (|>> synthesis.i64) random.i64)]
(_.coverage [\\parser.unconsumed_input]
(|> (\\parser.result \\parser.any (list expected expected))
(!expect (^.multi {try.#Failure error}
(exception.match? \\parser.unconsumed_input error))))))
(do [! random.monad]
- [dummy (at ! each (|>> synthesis.i64) random.i64)]
+ [dummy (of ! each (|>> synthesis.i64) random.i64)]
(_.coverage [\\parser.end \\parser.expected_empty_input]
(and (|> (\\parser.result \\parser.end (list))
(!expect {try.#Success _}))
@@ -193,7 +193,7 @@
(!expect (^.multi {try.#Failure error}
(exception.match? \\parser.expected_empty_input error)))))))
(do [! random.monad]
- [dummy (at ! each (|>> synthesis.i64) random.i64)]
+ [dummy (of ! each (|>> synthesis.i64) random.i64)]
(_.coverage [\\parser.end?]
(and (|> (\\parser.result \\parser.end? (list))
(!expect {try.#Success .true}))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux
index 3008247b0..b04305686 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/member.lux
@@ -37,6 +37,6 @@
($hash.spec /.hash ..random))
(_.coverage [/.format]
- (bit#= (at /.equivalence = left right)
+ (bit#= (of /.equivalence = left right)
(text#= (/.format left) (/.format right))))
))))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux
index d3c09db3d..2a7456ab4 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/access/side.lux
@@ -37,6 +37,6 @@
($hash.spec /.hash ..random))
(_.coverage [/.format]
- (bit#= (at /.equivalence = left right)
+ (bit#= (of /.equivalence = left right)
(text#= (/.format left) (/.format right))))
))))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux
index b21f17d72..4f076e84a 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/synthesis/simple.lux
@@ -42,5 +42,5 @@
(_.coverage [/.format]
(bit#= (text#= (/.format left) (/.format right))
- (at /.equivalence = left right)))
+ (of /.equivalence = left right)))
))))
diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux
index 0aa690f97..568a27af3 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/archive/module/descriptor.lux
@@ -54,6 +54,6 @@
(|> expected
(binary.result /.format)
(<binary>.result /.parser)
- (try#each (|>> (at /.equivalence = (has /.#state {.#Cached} expected))))
+ (try#each (|>> (of /.equivalence = (has /.#state {.#Cached} expected))))
(try.else false)))
)))
diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux
index 57ce1b585..e13e1dca1 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/archive/registry.lux
@@ -58,10 +58,10 @@
mandatory? random.bit
expected_dependencies (..random_dependencies 5)
- expected_amount (at ! each (n.% 10) random.nat)
+ expected_amount (of ! each (n.% 10) random.nat)
expected_names (|> (random.lower_cased 1)
(random.set text.hash expected_amount)
- (at ! each set.list))]
+ (of ! each set.list))]
(`` (all _.and
(_.coverage [/.empty]
(|> /.empty
@@ -148,7 +148,7 @@
(list.every? (function (_ [@it [it dependencies]])
(same? @it (the artifact.#id it)))
(list.zipped_2 (sequence.list ids) (sequence.list it)))
- (at (list.equivalence <equivalence>) = expected/* (<query> registry))))]
+ (of (list.equivalence <equivalence>) = expected/* (<query> registry))))]
[/.definition /.definitions category.definition_equivalence (is (-> Text category.Definition)
(function (_ it)
diff --git a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux
index a5c8c89ee..d8faf1590 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/archive/signature.lux
@@ -43,7 +43,7 @@
[left ..random
right ..random]
(_.coverage [/.description]
- (bit#= (at /.equivalence = left right)
+ (bit#= (of /.equivalence = left right)
(text#= (/.description left) (/.description right)))))
(do random.monad
[expected ..random]
@@ -51,6 +51,6 @@
(|> expected
(binaryF.result /.format)
(<binary>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache.lux b/stdlib/source/test/lux/meta/compiler/meta/cache.lux
index 06d6e20ff..a2004598e 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cache.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cache.lux
@@ -33,10 +33,10 @@
fs (file.mock /)]]
(all _.and
(in (do [! async.monad]
- [pre/0 (at fs directory? (/.path fs context))
+ [pre/0 (of fs directory? (/.path fs context))
pre/1 (/.enabled? fs context)
outcome (/.enable! ! fs context)
- post/0 (at fs directory? (/.path fs context))
+ post/0 (of fs directory? (/.path fs context))
post/1 (/.enabled? fs context)]
(unit.coverage [/.path /.enabled? /.enable!]
(and (not pre/0)
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux
index e6f37d941..abb5ed135 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cache/archive.lux
@@ -72,11 +72,11 @@
try.trusted)]]
(all _.and
(in (do [! async.monad]
- [pre/0 (at fs file? (/.descriptor fs context))
+ [pre/0 (of fs file? (/.descriptor fs context))
enabled? (//.enable! ! fs context)
cached? (/.cache! fs configuration context archive)
- actual (at fs read (/.descriptor fs context))
- post/0 (at fs file? (/.descriptor fs context))]
+ actual (of fs read (/.descriptor fs context))
+ post/0 (of fs file? (/.descriptor fs context))]
(unit.coverage [/.descriptor /.cache!]
(and (not pre/0)
(|> (do try.monad
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux
index 67d6eceb6..fe4117f93 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cache/artifact.lux
@@ -38,10 +38,10 @@
expected ($binary.random 1)]
(all _.and
(in (do [! async.monad]
- [pre (at fs file? (/.path fs context @module @artifact))
+ [pre (of fs file? (/.path fs context @module @artifact))
_ (//module.enable! ! fs context @module)
write! (/.cache! fs context @module @artifact expected)
- post (at fs file? (/.path fs context @module @artifact))
+ post (of fs file? (/.path fs context @module @artifact))
read! (/.cache fs context @module @artifact)]
(unit.coverage [/.path /.cache! /.cache]
(and (not pre)
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/module.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/module.lux
index 243d395fc..5f77051a3 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cache/module.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cache/module.lux
@@ -25,7 +25,7 @@
(implementation
(,, (with_template [<name>]
[(def <name>
- (at it <name>))]
+ (of it <name>))]
[separator]
[file?]
@@ -57,10 +57,10 @@
(in (do [! async.monad]
[.let [/ "/"
fs (file.mock /)]
- pre/0 (at fs directory? (/.path fs context @module))
+ pre/0 (of fs directory? (/.path fs context @module))
pre/1 (/.enabled? fs context @module)
outcome (/.enable! ! fs context @module)
- post/0 (at fs directory? (/.path fs context @module))
+ post/0 (of fs directory? (/.path fs context @module))
post/1 (/.enabled? fs context @module)]
(unit.coverage [/.path /.enabled? /.enable!]
(and (not pre/0)
@@ -75,10 +75,10 @@
(in (do [! async.monad]
[.let [/ "/"
fs (file.mock /)]
- pre/0 (at fs directory? (/.path fs context @module))
+ pre/0 (of fs directory? (/.path fs context @module))
pre/1 (/.enabled? fs context @module)
outcome (/.enable! ! (..bad fs) context @module)
- post/0 (at fs directory? (/.path fs context @module))
+ post/0 (of fs directory? (/.path fs context @module))
post/1 (/.enabled? fs context @module)]
(unit.coverage [/.cannot_enable]
(and (not pre/0)
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux b/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux
index 3b2ca3160..2fc9c354c 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cache/purge.lux
@@ -54,7 +54,7 @@
content/0 ($binary.random 1)
name/1 (random.lower_cased 2)
module/1 (|> ($module.random random.nat)
- (at ! each (has [module.#descriptor descriptor.#references]
+ (of ! each (has [module.#descriptor descriptor.#references]
(set.of_list text.hash (list name/0)))))
content/1 ($binary.random 2)
.let [id/0 (the module.#id module/0)
@@ -121,16 +121,16 @@
.let [dir (//module.path fs context id/0)
file/0 (%.format dir / name/0)
file/1 (%.format dir / name/1)]
- _ (at fs write file/0 content/0)
- _ (at fs write file/1 content/1)
- pre (at fs directory_files dir)
+ _ (of fs write file/0 content/0)
+ _ (of fs write file/1 content/1)
+ pre (of fs directory_files dir)
_ (/.purge! fs context id/0)
- post (at fs directory_files dir)]
+ post (of fs directory_files dir)]
(unit.coverage [/.purge!]
(<| (try.else false)
(do try.monad
[pre pre]
- (in (and (at set.equivalence =
+ (in (and (of set.equivalence =
(set.of_list text.hash pre)
(set.of_list text.hash (list file/0 file/1)))
(when post
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli.lux b/stdlib/source/test/lux/meta/compiler/meta/cli.lux
index e1ea3f641..77f39c97b 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cli.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cli.lux
@@ -35,7 +35,7 @@
(_.for [/.Service /.service])
(let [(open "list#[0]") (list.equivalence text.equivalence)])
(do [! random.monad]
- [amount (at ! each (|>> (n.% 5) ++) random.nat)
+ [amount (of ! each (|>> (n.% 5) ++) random.nat)
sources (random.list amount (random.lower_cased 1))
host_dependencies (random.list amount (random.lower_cased 2))
libraries (random.list amount (random.lower_cased 3))
@@ -74,7 +74,7 @@
[/.Host_Dependency /.#host_dependencies (list#= host_dependencies)]
[/.Library /.#libraries (list#= libraries)]
- [/compiler.Compiler /.#compilers (at (list.equivalence /compiler.equivalence) = compilers)]
+ [/compiler.Compiler /.#compilers (of (list.equivalence /compiler.equivalence) = compilers)]
[/.Source /.#sources (list#= sources)]
[/.Target /.#target (same? target)]
[/.Module /.#module (same? module)]
@@ -97,7 +97,7 @@
[/.#host_dependencies (list#= host_dependencies)]
[/.#libraries (list#= libraries)]
- [/.#compilers (at (list.equivalence /compiler.equivalence) = compilers)]
+ [/.#compilers (of (list.equivalence /compiler.equivalence) = compilers)]
[/.#sources (list#= sources)]
[/.#target (same? target)]
[/.#module (same? module)]
diff --git a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux
index 56b917ae1..20084da59 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/cli/compiler.lux
@@ -26,7 +26,7 @@
(Random /.Compiler)
(do [! random.monad]
[definition ($symbol.random 1 1)
- amount (at ! each (n.% 5) random.nat)
+ amount (of ! each (n.% 5) random.nat)
parameters (random.list amount (random.lower_cased 2))]
(in [/.#definition definition
/.#parameters parameters])))
@@ -45,6 +45,6 @@
(|> expected
/.format
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
))))
diff --git a/stdlib/source/test/lux/meta/compiler/meta/context.lux b/stdlib/source/test/lux/meta/compiler/meta/context.lux
index b1f60e864..d080d5bb8 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/context.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/context.lux
@@ -26,7 +26,7 @@
(in /.lua)
(in /.python)
(in /.ruby))]
- (at ! each context (random.lower_cased 1))))
+ (of ! each context (random.lower_cased 1))))
(def .public test
Test
diff --git a/stdlib/source/test/lux/meta/compiler/meta/export.lux b/stdlib/source/test/lux/meta/compiler/meta/export.lux
index ef9a8a835..95372ea67 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/export.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/export.lux
@@ -46,34 +46,34 @@
target (random.lower_cased 3)
.let [random_file (is (Random file.Path)
- (at ! each (text.suffix io.lux_extension) (random.lower_cased 4)))]
+ (of ! each (text.suffix io.lux_extension) (random.lower_cased 4)))]
file/0' random_file
.let [file/0 (format source/0 / file/0')]
dir/0 (random.lower_cased 5)
- file/1' (at ! each (|>> (format dir/0 /)) random_file)
+ file/1' (of ! each (|>> (format dir/0 /)) random_file)
.let [file/1 (format source/1 / file/1')]
.let [random_content (is (Random Binary)
- (at ! each (|>> %.nat (at utf8.codec encoded)) random.nat))]
+ (of ! each (|>> %.nat (of utf8.codec encoded)) random.nat))]
content/0 random_content
content/1 random_content]
(all _.and
(in (do [! async.monad]
[it (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs make_directory source/0)
- _ (at fs write file/0 content/0)
+ _ (of fs make_directory source/0)
+ _ (of fs write file/0 content/0)
- _ (at fs make_directory source/1)
- _ (at fs make_directory (format source/1 / dir/0))
- _ (at fs write file/1 content/1)
+ _ (of fs make_directory source/1)
+ _ (of fs make_directory (format source/1 / dir/0))
+ _ (of fs write file/1 content/1)
- _ (at fs make_directory target)
+ _ (of fs make_directory target)
library_tar (/.library fs (list source/0 source/1))
_ (/.export fs [(list source/0 source/1) target])
- export_tar (at fs read (format target / /.file))
- export_tar (at ! in (<binary>.result tar.parser export_tar))]
+ export_tar (of fs read (format target / /.file))
+ export_tar (of ! in (<binary>.result tar.parser export_tar))]
(in [library_tar export_tar]))]
(all unit.and
(unit.coverage [/.library /.mode /.ownership]
diff --git a/stdlib/source/test/lux/meta/compiler/meta/import.lux b/stdlib/source/test/lux/meta/compiler/meta/import.lux
index 59dc6d52c..5dc51b942 100644
--- a/stdlib/source/test/lux/meta/compiler/meta/import.lux
+++ b/stdlib/source/test/lux/meta/compiler/meta/import.lux
@@ -50,14 +50,14 @@
.let [/ .module_separator
random_file (is (Random file.Path)
- (at ! each (text.suffix io.lux_extension) (random.lower_cased 3)))]
+ (of ! each (text.suffix io.lux_extension) (random.lower_cased 3)))]
file/0 random_file
dir/0 (random.lower_cased 4)
- file/1 (at ! each (|>> (format dir/0 /)) random_file)
+ file/1 (of ! each (|>> (format dir/0 /)) random_file)
.let [random_content (is (Random Binary)
- (at ! each (|>> %.nat (at utf8.codec encoded)) random.nat))]
+ (of ! each (|>> %.nat (of utf8.codec encoded)) random.nat))]
now random.instant
content/0 random_content
content/1 random_content
@@ -113,12 +113,12 @@
(in (do [! async.monad]
[it/0 (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs write library/0 library_content)]
+ _ (of fs write library/0 library_content)]
(/.import fs (list library/0)))
it/1 (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs write library/0 library_content/0)
- _ (at fs write library/1 library_content/1)]
+ _ (of fs write library/0 library_content/0)
+ _ (of fs write library/1 library_content/1)]
(/.import fs (list library/0 library/1)))]
(unit.coverage [/.import]
(and (|> it/0
@@ -130,7 +130,7 @@
(in (do [! async.monad]
[it (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs write library/0 library_content)
+ _ (of fs write library/0 library_content)
_ (/.import fs (list library/0 library/0))]
(in false))]
(unit.coverage [/.duplicate]
@@ -138,17 +138,17 @@
(in (do [! async.monad]
[it/0 (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs write library/0 library_content/-0)
+ _ (of fs write library/0 library_content/-0)
_ (/.import fs (list library/0))]
(in false))
it/1 (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs write library/0 library_content/-1)
+ _ (of fs write library/0 library_content/-1)
_ (/.import fs (list library/0))]
(in false))
it/2 (do (try.with !)
[.let [fs (file.mock /)]
- _ (at fs write library/0 library_content/-2)
+ _ (of fs write library/0 library_content/-2)
_ (/.import fs (list library/0))]
(in false))]
(unit.coverage [/.useless_tar_entry]
diff --git a/stdlib/source/test/lux/meta/compiler/phase.lux b/stdlib/source/test/lux/meta/compiler/phase.lux
index d3b55aaf3..355f02299 100644
--- a/stdlib/source/test/lux/meta/compiler/phase.lux
+++ b/stdlib/source/test/lux/meta/compiler/phase.lux
@@ -69,7 +69,7 @@
_
false))
(|> (/.of_try {try.#Success expected})
- (at /.functor each (same? expected))
+ (of /.functor each (same? expected))
(/.result state)
(try.else false))))
(_.coverage [/.except]
@@ -106,24 +106,24 @@
(all _.and
(_.coverage [/.state]
(|> /.state
- (at /.functor each (same? state))
+ (of /.functor each (same? state))
(/.result state)
(try.else false)))
(_.coverage [/.with]
(|> (do /.monad
[_ (/.with state)]
/.state)
- (at /.functor each (same? state))
+ (of /.functor each (same? state))
(/.result dummy)
(try.else false)))
(_.coverage [/.sub]
- (|> (/.sub [(at n.hex encoded)
+ (|> (/.sub [(of n.hex encoded)
(function (_ new old)
- (|> new (at n.hex decoded) (try.else dummy)))]
+ (|> new (of n.hex decoded) (try.else dummy)))]
(do /.monad
[state/hex /.state]
(in (|> state
- (at n.hex encoded)
+ (of n.hex encoded)
(text#= state/hex)))))
(/.result' state)
(pipe.when {try.#Success [state' verdict]}
@@ -146,7 +146,7 @@
($monad.spec ..injection (..comparison state) /.monad))
(_.coverage [/.result]
- (|> (at /.monad in expected)
+ (|> (of /.monad in expected)
(/.result state)
(pipe.when {try.#Success actual}
(same? expected actual)
@@ -154,7 +154,7 @@
_
false)))
(_.coverage [/.result']
- (|> (at /.monad in expected)
+ (|> (of /.monad in expected)
(/.result' state)
(pipe.when {try.#Success [state' actual]}
(and (same? state state')
@@ -181,10 +181,10 @@
(_.coverage [/.composite]
(let [phase (/.composite (is (/.Phase Nat Int Frac)
(function (_ archive input)
- (at /.monad in (i.frac input))))
+ (of /.monad in (i.frac input))))
(is (/.Phase Rev Frac Text)
(function (_ archive input)
- (at /.monad in (%.frac input)))))]
+ (of /.monad in (%.frac input)))))]
(|> (phase archive.empty expected)
(/.result' [state/0 state/1])
(pipe.when {try.#Success [[state/0' state/1'] actual]}
diff --git a/stdlib/source/test/lux/meta/compiler/reference.lux b/stdlib/source/test/lux/meta/compiler/reference.lux
index a2e0a85ff..49bd3415c 100644
--- a/stdlib/source/test/lux/meta/compiler/reference.lux
+++ b/stdlib/source/test/lux/meta/compiler/reference.lux
@@ -64,7 +64,7 @@
))
(_.coverage [/.variable /.self]
- (and (at /.equivalence = (/.self) (/.variable (variable.self)))
+ (and (of /.equivalence = (/.self) (/.variable (variable.self)))
(when (/.self)
(/.self)
true
diff --git a/stdlib/source/test/lux/meta/configuration.lux b/stdlib/source/test/lux/meta/configuration.lux
index c7d93bd9d..24a6ecf76 100644
--- a/stdlib/source/test/lux/meta/configuration.lux
+++ b/stdlib/source/test/lux/meta/configuration.lux
@@ -35,7 +35,7 @@
_ (do [! random.monad]
[feature (random.upper_cased amount)
value (random.lower_cased amount)]
- (at ! each (|>> (list.partial [feature value]))
+ (of ! each (|>> (list.partial [feature value]))
(random (-- amount))))))
(def failure
@@ -66,7 +66,7 @@
(|> expected
/.format
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.for]
(and (and (/.for ["left" "<<<"
diff --git a/stdlib/source/test/lux/meta/extension.lux b/stdlib/source/test/lux/meta/extension.lux
index 64905a9f2..9d49aeb16 100644
--- a/stdlib/source/test/lux/meta/extension.lux
+++ b/stdlib/source/test/lux/meta/extension.lux
@@ -85,7 +85,7 @@
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
- (at ! each (|>> (is (List analysis.Analysis))
+ (of ! each (|>> (is (List analysis.Analysis))
{analysis.#Extension (symbol ..my_synthesis|synthesis)}
[location.dummy]
(is analysis.Analysis)))))))
@@ -102,7 +102,7 @@
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
- (at ! each (|>> {synthesis.#Extension (symbol ..my_translation|translation)}
+ (of ! each (|>> {synthesis.#Extension (symbol ..my_translation|translation)}
[location.dummy]
(is synthesis.Synthesis)))))))
@@ -112,7 +112,7 @@
(let [! phase.monad]
(|> parameters
(monad.each ! (phase archive))
- (at ! each (|>> (is (List analysis.Analysis))
+ (of ! each (|>> (is (List analysis.Analysis))
{analysis.#Extension (symbol ..my_translation|synthesis)}
[location.dummy]
(is analysis.Analysis)))))))
@@ -121,7 +121,7 @@
Translation
(translation (_ phase archive [])
(let [[_ self] (symbol ..dummy_translation)]
- (at phase.monad in
+ (of phase.monad in
(for @.jvm (jvm.string self)
@.js (js.string self)
@.python (python.unicode self)
@@ -133,13 +133,13 @@
(def dummy_translation|synthesis
Synthesis
(synthesis (_ phase archive [])
- (at phase.monad in (is synthesis.Synthesis
+ (of phase.monad in (is synthesis.Synthesis
[location.dummy {synthesis.#Extension (symbol ..dummy_translation|translation) (list)}]))))
(def dummy_translation
Analysis
(analysis (_ phase archive [])
- (at phase.monad in (is analysis.Analysis
+ (of phase.monad in (is analysis.Analysis
[location.dummy {analysis.#Extension (symbol ..dummy_translation|synthesis) (list)}]))))
... Declaration
diff --git a/stdlib/source/test/lux/meta/location.lux b/stdlib/source/test/lux/meta/location.lux
index 46b7138b9..c9f60cbfa 100644
--- a/stdlib/source/test/lux/meta/location.lux
+++ b/stdlib/source/test/lux/meta/location.lux
@@ -33,7 +33,7 @@
($equivalence.spec /.equivalence ..random))
(_.coverage [/.here]
- (not (at /.equivalence = (/.here) (/.here))))
+ (not (of /.equivalence = (/.here) (/.here))))
(do random.monad
[location ..random
error (random.alphabetic 10)]
@@ -46,5 +46,5 @@
(do random.monad
[[location _] $//code.random]
(_.coverage [/.dummy]
- (at /.equivalence = /.dummy location)))
+ (of /.equivalence = /.dummy location)))
)))
diff --git a/stdlib/source/test/lux/meta/macro.lux b/stdlib/source/test/lux/meta/macro.lux
index 3c248df81..e00266211 100644
--- a/stdlib/source/test/lux/meta/macro.lux
+++ b/stdlib/source/test/lux/meta/macro.lux
@@ -125,9 +125,9 @@
(do [! random.monad]
[[seed symbol_prefix lux] ..random_lux
- pow/1 (at ! each code.nat random.nat)
+ pow/1 (of ! each code.nat random.nat)
- repetitions (at ! each (n.% 10) random.nat)
+ repetitions (of ! each (n.% 10) random.nat)
.let [single_expansion (` (..pow/2 (..pow/2 (, pow/1))))
expansion (` (n.* (..pow/2 (, pow/1))
(..pow/2 (, pow/1))))
@@ -138,18 +138,18 @@
... [(_.coverage [<expander>]
... (|> (<expander> (` (..pow/4 (, pow/1))))
... (meta.result lux)
- ... (try#each (at (list.equivalence code.equivalence) =
+ ... (try#each (of (list.equivalence code.equivalence) =
... (list <expansion>)))
... (try.else false)))
... (_.coverage [<logger>]
... (and (|> (expansion.single (` (<logger> "omit" (..pow/4 (, pow/1)))))
... (meta.result lux)
- ... (try#each (at (list.equivalence code.equivalence) = (list)))
+ ... (try#each (of (list.equivalence code.equivalence) = (list)))
... (try.else false))
... (|> (expansion.single (` (<logger> (..pow/4 (, pow/1)))))
... (meta.result lux)
- ... (try#each (at (list.equivalence code.equivalence) = (list <expansion>)))
+ ... (try#each (of (list.equivalence code.equivalence) = (list <expansion>)))
... (try.else false))))]
... [expansion.single expansion.log_single! single_expansion]
@@ -195,7 +195,7 @@
output 0])
(when tokens
{.#End}
- (at meta.monad in (list (code.nat output)))
+ (of meta.monad in (list (code.nat output)))
{.#Item [_ {.#Nat head}] tail}
(again tail (n.+ head output))
@@ -216,7 +216,7 @@
(all _.and
(_.coverage [/.symbol]
(|> (/.symbol symbol_prefix)
- (at meta.monad each %.code)
+ (of meta.monad each %.code)
(meta.result lux)
(!expect (^.multi {try.#Success actual_symbol}
(and (text.contains? symbol_prefix actual_symbol)
@@ -230,7 +230,7 @@
(_.coverage [/.with_symbols]
(with_expansions [<expected> (fresh_symbol)]
(|> (/.with_symbols [<expected>]
- (at meta.monad in <expected>))
+ (of meta.monad in <expected>))
(meta.result lux)
(!expect (^.multi {try.#Success [_ {.#Symbol ["" actual]}]}
(text.contains? (template.text [<expected>])
diff --git a/stdlib/source/test/lux/meta/macro/pattern.lux b/stdlib/source/test/lux/meta/macro/pattern.lux
index 362cf42ba..b87e66603 100644
--- a/stdlib/source/test/lux/meta/macro/pattern.lux
+++ b/stdlib/source/test/lux/meta/macro/pattern.lux
@@ -32,8 +32,8 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [expected_nat (at ! each (n.% 1) random.nat)
- expected_int (at ! each (i.% +1) random.int)
+ [expected_nat (of ! each (n.% 1) random.nat)
+ expected_int (of ! each (i.% +1) random.int)
expected_rev (random.either (in .5)
(in .25))
expected_frac (random.either (in +0.5)
@@ -42,7 +42,7 @@
(in "+1.25"))]
(all _.and
(do [! random.monad]
- [sample (at ! each (n.% 5) random.nat)]
+ [sample (of ! each (n.% 5) random.nat)]
(_.coverage [/.with_template]
(when sample
(/.with_template [<case>]
diff --git a/stdlib/source/test/lux/meta/macro/syntax/declaration.lux b/stdlib/source/test/lux/meta/macro/syntax/declaration.lux
index 090518338..d92609804 100644
--- a/stdlib/source/test/lux/meta/macro/syntax/declaration.lux
+++ b/stdlib/source/test/lux/meta/macro/syntax/declaration.lux
@@ -25,7 +25,7 @@
(all random.and
word
(do [! random.monad]
- [size (at ! each (n.% 10) random.nat)]
+ [size (of ! each (n.% 10) random.nat)]
(random.list size word))
)))
@@ -46,4 +46,4 @@
false
{try.#Success actual}
- (at /.equivalence = expected actual)))))))
+ (of /.equivalence = expected actual)))))))
diff --git a/stdlib/source/test/lux/meta/macro/syntax/definition.lux b/stdlib/source/test/lux/meta/macro/syntax/definition.lux
index 929f841d6..34289885d 100644
--- a/stdlib/source/test/lux/meta/macro/syntax/definition.lux
+++ b/stdlib/source/test/lux/meta/macro/syntax/definition.lux
@@ -74,7 +74,7 @@
false
{try.#Success actual}
- (at /.equivalence = expected actual)))
+ (of /.equivalence = expected actual)))
(_.coverage [/.typed]
(let [expected (has /.#value {.#Left [type untyped_value]} expected)]
(when (<code>.result (/.typed compiler)
@@ -83,7 +83,7 @@
false
{try.#Success actual}
- (at /.equivalence = expected actual))))
+ (of /.equivalence = expected actual))))
(_.coverage [/.lacks_type]
(let [expected (has /.#value {.#Right untyped_value} expected)]
(when (<code>.result (/.typed compiler)
diff --git a/stdlib/source/test/lux/meta/macro/syntax/export.lux b/stdlib/source/test/lux/meta/macro/syntax/export.lux
index 68a999ad5..e56294445 100644
--- a/stdlib/source/test/lux/meta/macro/syntax/export.lux
+++ b/stdlib/source/test/lux/meta/macro/syntax/export.lux
@@ -22,7 +22,7 @@
(Random [(Maybe Code) Nat])
(all random.and
(|> random.bit
- (at random.monad each code.bit)
+ (of random.monad each code.bit)
random.maybe)
random.nat))
diff --git a/stdlib/source/test/lux/meta/macro/syntax/input.lux b/stdlib/source/test/lux/meta/macro/syntax/input.lux
index 7f84d403d..e623431df 100644
--- a/stdlib/source/test/lux/meta/macro/syntax/input.lux
+++ b/stdlib/source/test/lux/meta/macro/syntax/input.lux
@@ -47,4 +47,4 @@
false
{try.#Success actual}
- (at (list.equivalence /.equivalence) = (list expected) actual)))))))
+ (of (list.equivalence /.equivalence) = (list expected) actual)))))))
diff --git a/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux b/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux
index e7abf1416..45356cb5a 100644
--- a/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux
+++ b/stdlib/source/test/lux/meta/macro/syntax/type/variable.lux
@@ -34,6 +34,6 @@
(_.coverage [/.format /.parser]
(|> (list (/.format expected))
(<code>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/lux/meta/macro/template.lux b/stdlib/source/test/lux/meta/macro/template.lux
index 655c52d73..abf768265 100644
--- a/stdlib/source/test/lux/meta/macro/template.lux
+++ b/stdlib/source/test/lux/meta/macro/template.lux
@@ -53,7 +53,7 @@
<short>' "abc#0#12+3-4.5"]
(all _.and
(_.coverage [/.spliced]
- (at (list.equivalence nat.equivalence) =
+ (of (list.equivalence nat.equivalence) =
(list left mid right)
(`` (list (,, (/.spliced [left mid right]))))))
(_.coverage [/.amount]
diff --git a/stdlib/source/test/lux/meta/symbol.lux b/stdlib/source/test/lux/meta/symbol.lux
index fef843ede..d16275357 100644
--- a/stdlib/source/test/lux/meta/symbol.lux
+++ b/stdlib/source/test/lux/meta/symbol.lux
@@ -32,12 +32,12 @@
(<| (_.covering /._)
(do [! random.monad]
[... First Symbol
- sizeM1 (|> random.nat (at ! each (n.% 100)))
- sizeS1 (|> random.nat (at ! each (|>> (n.% 100) (n.max 1))))
+ sizeM1 (|> random.nat (of ! each (n.% 100)))
+ sizeS1 (|> random.nat (of ! each (|>> (n.% 100) (n.max 1))))
(^.let symbol1 [module1 short1]) (..random sizeM1 sizeS1)
... Second Symbol
- sizeM2 (|> random.nat (at ! each (n.% 100)))
- sizeS2 (|> random.nat (at ! each (|>> (n.% 100) (n.max 1))))
+ sizeM2 (|> random.nat (of ! each (n.% 100)))
+ sizeS2 (|> random.nat (of ! each (|>> (n.% 100) (n.max 1))))
(^.let symbol2 [module2 short2]) (..random sizeM2 sizeS2)]
(_.for [.Symbol]
(all _.and
@@ -45,7 +45,7 @@
($equivalence.spec /.equivalence (..random sizeM1 sizeS1)))
(_.for [/.hash]
(|> (random.ascii 1)
- (at ! each (|>> [""]))
+ (of ! each (|>> [""]))
($hash.spec /.hash)))
(_.for [/.order]
($order.spec /.order (..random sizeM1 sizeS1)))
@@ -53,11 +53,11 @@
(_.and ($codec.spec /.equivalence /.codec (..random sizeM1 sizeS1))
(_.test "Encoding a symbol without a module component results in text equal to the short of the symbol."
(if (text.empty? module1)
- (same? short1 (at /.codec encoded symbol1))
+ (same? short1 (of /.codec encoded symbol1))
true))))
(_.coverage [/.separator]
- (let [it (at /.codec encoded symbol1)]
+ (let [it (of /.codec encoded symbol1)]
(if (text.empty? module1)
(same? short1 it)
(text.contains? /.separator it))))
diff --git a/stdlib/source/test/lux/meta/target/js.lux b/stdlib/source/test/lux/meta/target/js.lux
index eef7a43d3..2ad2b03ad 100644
--- a/stdlib/source/test/lux/meta/target/js.lux
+++ b/stdlib/source/test/lux/meta/target/js.lux
@@ -57,7 +57,7 @@
(Random Int)
(do [! random.monad]
[negative? random.bit
- mantissa (at ! each (|>> (i64.and (static.nat (-- (i64.left_shifted (-- <range>) 1))))
+ mantissa (of ! each (|>> (i64.and (static.nat (-- (i64.left_shifted (-- <range>) 1))))
.int)
random.nat)]
(in (if negative?
@@ -159,7 +159,7 @@
i32 ..int_32
i16 ..int_16
- shift (at ! each (n.% 16) random.nat)]
+ shift (of ! each (n.% 16) random.nat)]
(`` (all _.and
(,, (with_template [<js> <lux>]
[(_.coverage [<js>]
@@ -207,8 +207,8 @@
(def test|array
Test
(do [! random.monad]
- [size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ [size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)
.let [expected (|> items
(list.item index)
@@ -232,8 +232,8 @@
dummy (random.only (|>> (text#= field) not)
(random.upper_cased 5))
- size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)]
(all _.and
(_.coverage [/.object /.the]
@@ -358,7 +358,7 @@
(do [! random.monad]
[number/0 random.safe_frac
int/0 ..int_16
- $foreign (at ! each /.var (random.lower_cased 10))
+ $foreign (of ! each /.var (random.lower_cased 10))
field (random.upper_cased 10)]
(all _.and
(_.coverage [/.set]
@@ -449,12 +449,12 @@
(do [! random.monad]
[input ..int_16
- full_inner_iterations (at ! each (|>> (n.% 20) ++) random.nat)
- expected_inner_iterations (at ! each (n.% full_inner_iterations) random.nat)
+ full_inner_iterations (of ! each (|>> (n.% 20) ++) random.nat)
+ expected_inner_iterations (of ! each (n.% full_inner_iterations) random.nat)
- @outer (at ! each /.label (random.upper_cased 5))
- full_outer_iterations (at ! each (|>> (n.% 10) ++) random.nat)
- expected_outer_iterations (at ! each (n.% full_outer_iterations) random.nat)
+ @outer (of ! each /.label (random.upper_cased 5))
+ full_outer_iterations (of ! each (|>> (n.% 10) ++) random.nat)
+ expected_outer_iterations (of ! each (n.% full_outer_iterations) random.nat)
.let [$input (/.var "input")
$output (/.var "output")
@@ -555,7 +555,7 @@
Test
(do [! random.monad]
[input ..int_16
- iterations (at ! each (n.% 10) random.nat)
+ iterations (of ! each (n.% 10) random.nat)
.let [$input (/.var "input")
$output (/.var "output")
$index (/.var "index")
@@ -609,7 +609,7 @@
[expected random.safe_frac
dummy (random.only (|>> (f.= expected) not)
random.safe_frac)
- $ex (at ! each /.var (random.lower_cased 10))]
+ $ex (of ! each /.var (random.lower_cased 10))]
(all _.and
(_.coverage [/.try]
(expression (|>> (as Frac) (f.= expected))
@@ -633,9 +633,9 @@
[number/0 random.safe_frac
number/1 random.safe_frac
number/2 random.safe_frac
- $arg/0 (at ! each /.var (random.lower_cased 10))
- $arg/1 (at ! each /.var (random.lower_cased 11))
- $arg/2 (at ! each /.var (random.lower_cased 12))]
+ $arg/0 (of ! each /.var (random.lower_cased 10))
+ $arg/1 (of ! each /.var (random.lower_cased 11))
+ $arg/2 (of ! each /.var (random.lower_cased 12))]
(`` (all _.and
(_.coverage [/.apply_1]
(expression (|>> (as Frac) (f.= number/0))
@@ -664,11 +664,11 @@
Test
(do [! random.monad]
[number/0 random.safe_frac
- iterations (at ! each (n.% 10) random.nat)
- $self (at ! each /.var (random.lower_cased 1))
- $arg/0 (at ! each /.var (random.lower_cased 2))
+ iterations (of ! each (n.% 10) random.nat)
+ $self (of ! each /.var (random.lower_cased 1))
+ $arg/0 (of ! each /.var (random.lower_cased 2))
field (random.lower_cased 3)
- $class (at ! each /.var (random.upper_cased 4))]
+ $class (of ! each /.var (random.upper_cased 4))]
(all _.and
(_.coverage [/.closure /.return]
(expression (|>> (as Frac) (f.= number/0))
@@ -770,9 +770,9 @@
[number/0 random.safe_frac
number/1 random.safe_frac
number/2 random.safe_frac
- $arg/0 (at ! each /.var (random.lower_cased 10))
- $arg/1 (at ! each /.var (random.lower_cased 11))
- $arg/2 (at ! each /.var (random.lower_cased 12))
+ $arg/0 (of ! each /.var (random.lower_cased 10))
+ $arg/1 (of ! each /.var (random.lower_cased 11))
+ $arg/2 (of ! each /.var (random.lower_cased 12))
??? random.bit
int ..int_16]
(`` (all _.and
diff --git a/stdlib/source/test/lux/meta/target/jvm.lux b/stdlib/source/test/lux/meta/target/jvm.lux
index 514eecf1f..2487c7e3b 100644
--- a/stdlib/source/test/lux/meta/target/jvm.lux
+++ b/stdlib/source/test/lux/meta/target/jvm.lux
@@ -186,7 +186,7 @@
(/.invokestatic ..$Byte "valueOf" (/type.method [(list) (list /type.byte) ..$Byte (list)])))
(def $Byte::random
(Random java/lang/Byte)
- (at random.monad each (|>> (as java/lang/Long) ffi.long_to_byte) random.int))
+ (of random.monad each (|>> (as java/lang/Long) ffi.long_to_byte) random.int))
(def $Byte::literal
(-> java/lang/Byte (Bytecode Any))
(|>> ffi.byte_to_long (as I64) i32.i32 /.int))
@@ -204,7 +204,7 @@
(/.invokestatic ..$Short "valueOf" (/type.method [(list) (list /type.short) ..$Short (list)])))
(def $Short::random
(Random java/lang/Short)
- (at random.monad each (|>> (as java/lang/Long) ffi.long_to_short) random.int))
+ (of random.monad each (|>> (as java/lang/Long) ffi.long_to_short) random.int))
(def $Short::literal
(-> java/lang/Short (Bytecode Any))
(|>> ffi.short_to_long (as I64) i32.i32 /.int))
@@ -222,7 +222,7 @@
(/.invokestatic ..$Integer "valueOf" (/type.method [(list) (list /type.int) ..$Integer (list)])))
(def $Integer::random
(Random java/lang/Integer)
- (at random.monad each (|>> (as java/lang/Long) ffi.long_to_int) random.int))
+ (of random.monad each (|>> (as java/lang/Long) ffi.long_to_int) random.int))
(def $Integer::literal
(-> java/lang/Integer (Bytecode Any))
(|>> ffi.int_to_long (as I64) i32.i32 /.int))
@@ -250,7 +250,7 @@
(def $Float::wrap (/.invokestatic ..$Float "valueOf" (/type.method [(list) (list /type.float) ..$Float (list)])))
(def $Float::random
(Random java/lang/Float)
- (at random.monad each
+ (of random.monad each
(|>> (as java/lang/Double) ffi.double_to_float)
random.frac))
(def $Float::literal /.float)
@@ -290,7 +290,7 @@
(/.invokestatic ..$Character "valueOf" (/type.method [(list) (list /type.char) ..$Character (list)])))
(def $Character::random
(Random java/lang/Character)
- (at random.monad each (|>> (as java/lang/Long) ffi.long_to_int ffi.int_to_char) random.int))
+ (of random.monad each (|>> (as java/lang/Long) ffi.long_to_int ffi.int_to_char) random.int))
(def $Character::literal
(-> java/lang/Character (Bytecode Any))
(|>> ffi.char_to_long (as I64) i32.i32 /.int))
@@ -325,7 +325,7 @@
[(def <name>
Test
(do [! random.monad]
- [expected (at ! each (i64.and (i64.mask <bits>)) random.nat)]
+ [expected (of ! each (i64.and (i64.mask <bits>)) random.nat)]
(<| (_.lifted <message>)
(..bytecode (for @.old
(|>> (as <type>) <to_long> ("jvm leq" expected))
@@ -406,7 +406,7 @@
shift (is (-> (-> java/lang/Integer java/lang/Integer java/lang/Integer) (Bytecode Any) (Random Bit))
(function (_ reference instruction)
(do [! random.monad]
- [parameter (at ! each (|>> (n.% 32) .int (as java/lang/Long) ffi.long_to_int) random.nat)
+ [parameter (of ! each (|>> (n.% 32) .int (as java/lang/Long) ffi.long_to_int) random.nat)
subject ..$Integer::random]
(int (reference parameter subject)
(do /.monad
@@ -485,7 +485,7 @@
shift (is (-> (-> java/lang/Integer java/lang/Long java/lang/Long) (Bytecode Any) (Random Bit))
(function (_ reference instruction)
(do [! random.monad]
- [parameter (at ! each (|>> (n.% 64) (as java/lang/Long)) random.nat)
+ [parameter (of ! each (|>> (n.% 64) (as java/lang/Long)) random.nat)
subject ..$Long::random]
(long (reference (ffi.long_to_int parameter) subject)
(do /.monad
@@ -967,7 +967,7 @@
Test))
(function (_ constructor random literal [*store *load *wrap] test)
(do [! random.monad]
- [size (at ! each (|>> (n.% 1024) (n.max 1)) random.nat)
+ [size (of ! each (|>> (n.% 1024) (n.max 1)) random.nat)
value random]
(all _.and
(<| (_.lifted "length")
@@ -1039,7 +1039,7 @@
(function (_ expected) (|>> (as Text) (text#= (as Text expected))))))
(<| (_.context "multi")
(do [! random.monad]
- [.let [size (at ! each (|>> (n.% 5) (n.+ 1))
+ [.let [size (of ! each (|>> (n.% 5) (n.+ 1))
random.nat)]
dimensions size
sizesH size
@@ -1153,7 +1153,7 @@
(function (_ random_value literal *wrap [store load] test)
(do [! random.monad]
[expected random_value
- register (at ! each (n.% 128) random.nat)]
+ register (of ! each (n.% 128) random.nat)]
(<| (..bytecode (test expected))
(do /.monad
[_ (literal expected)
@@ -1177,7 +1177,7 @@
(_.lifted "IINC"
(do [! random.monad]
[base ..$Byte::random
- increment (at ! each (|>> (n.% 100) /unsigned.u1 try.trusted)
+ increment (of ! each (|>> (n.% 100) /unsigned.u1 try.trusted)
random.nat)
.let [expected (is java/lang/Long
(for @.old
@@ -1501,9 +1501,9 @@
(do [! random.monad]
[expected ..$Long::random
dummy ..$Long::random
- minimum (at ! each (|>> (n.% 100) .int /signed.s4 try.trusted)
+ minimum (of ! each (|>> (n.% 100) .int /signed.s4 try.trusted)
random.nat)
- afterwards (at ! each (n.% 10) random.nat)])
+ afterwards (of ! each (n.% 10) random.nat)])
(..bytecode ((!::= java/lang/Long "jvm leq" .jvm_long_=#) expected))
(do /.monad
[@right /.new_label
@@ -1520,13 +1520,13 @@
..$Long::wrap))
(<| (_.lifted "LOOKUPSWITCH")
(do [! random.monad]
- [options (at ! each (|>> (n.% 10) (n.+ 1))
+ [options (of ! each (|>> (n.% 10) (n.+ 1))
random.nat)
- choice (at ! each (n.% options) random.nat)
+ choice (of ! each (n.% options) random.nat)
options (|> random.int
- (at ! each (|>> (as java/lang/Long) ffi.long_to_int ffi.int_to_long (as Int)))
+ (of ! each (|>> (as java/lang/Long) ffi.long_to_int ffi.int_to_long (as Int)))
(random.set i.hash options)
- (at ! each set.list))
+ (of ! each set.list))
.let [choice (maybe.trusted (list.item choice options))]
expected ..$Long::random
dummy ..$Long::random])
diff --git a/stdlib/source/test/lux/meta/target/lua.lux b/stdlib/source/test/lux/meta/target/lua.lux
index 4277f7958..967f1a9f3 100644
--- a/stdlib/source/test/lux/meta/target/lua.lux
+++ b/stdlib/source/test/lux/meta/target/lua.lux
@@ -110,7 +110,7 @@
(do [! random.monad]
[left random.int
right random.int
- shift (at ! each (n.% 65) random.nat)
+ shift (of ! each (n.% 65) random.nat)
parameter (random.only (|>> (i.= +0) not)
random.int)
@@ -198,8 +198,8 @@
(def test|array
Test
(do [! random.monad]
- [size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ [size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)
.let [expected (|> items
(list.item index)
@@ -225,13 +225,13 @@
dummy (random.only (|>> (f.= expected) not)
random.safe_frac)
- size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)
- $self (at ! each /.var (random.lower_cased 10))
- $table (at ! each /.var (random.lower_cased 11))
- $arg (at ! each /.var (random.lower_cased 12))
+ $self (of ! each /.var (random.lower_cased 10))
+ $table (of ! each /.var (random.lower_cased 11))
+ $arg (of ! each /.var (random.lower_cased 12))
field (random.upper_cased 5)
non_field (random.only (|>> (text#= field) not)
(random.upper_cased 5))
@@ -362,9 +362,9 @@
[float/0 random.safe_frac
float/1 random.safe_frac
int/0 ..int_16
- $foreign (at ! each /.var (random.lower_cased 10))
- $arg/0 (at ! each /.var (random.lower_cased 11))
- $arg/1 (at ! each /.var (random.lower_cased 12))
+ $foreign (of ! each /.var (random.lower_cased 10))
+ $arg/0 (of ! each /.var (random.lower_cased 11))
+ $arg/1 (of ! each /.var (random.lower_cased 12))
field (random.upper_cased 10)]
(all _.and
(_.coverage [/.set]
@@ -413,14 +413,14 @@
(do [! random.monad]
[input ..int_16
- full_iterations (at ! each (|>> (n.% 20) ++) random.nat)
- expected_iterations (at ! each (|>> (n.% full_iterations) .int) random.nat)
+ full_iterations (of ! each (|>> (n.% 20) ++) random.nat)
+ expected_iterations (of ! each (|>> (n.% full_iterations) .int) random.nat)
- $input (at ! each /.var (random.lower_cased 10))
- $output (at ! each /.var (random.lower_cased 11))
- $index (at ! each /.var (random.lower_cased 12))
+ $input (of ! each /.var (random.lower_cased 10))
+ $output (of ! each /.var (random.lower_cased 11))
+ $index (of ! each /.var (random.lower_cased 12))
- @loop (at ! each /.label (random.lower_cased 13))
+ @loop (of ! each /.label (random.lower_cased 13))
.let [expected (i.* expected_iterations input)
expected_iterations (/.int expected_iterations)]]
@@ -502,7 +502,7 @@
Test
(do [! random.monad]
[input ..int_16
- iterations (at ! each (n.% 10) random.nat)
+ iterations (of ! each (n.% 10) random.nat)
.let [$input (/.var "input")
$output (/.var "output")
$index (/.var "index")
@@ -562,8 +562,8 @@
[expected random.safe_frac
dummy (random.only (|>> (f.= expected) not)
random.safe_frac)
- $verdict (at ! each /.var (random.lower_cased 10))
- $outcome (at ! each /.var (random.lower_cased 11))]
+ $verdict (of ! each /.var (random.lower_cased 10))
+ $outcome (of ! each /.var (random.lower_cased 11))]
(all _.and
(_.coverage [/.pcall/1]
(expression (|>> (as Frac) (f.= expected))
@@ -605,11 +605,11 @@
Test
(do [! random.monad]
[float/0 random.safe_frac
- iterations (at ! each (n.% 10) random.nat)
- $self (at ! each /.var (random.lower_cased 1))
- $arg/0 (at ! each /.var (random.lower_cased 2))
+ iterations (of ! each (n.% 10) random.nat)
+ $self (of ! each /.var (random.lower_cased 1))
+ $arg/0 (of ! each /.var (random.lower_cased 2))
field (random.lower_cased 3)
- $class (at ! each /.var (random.upper_cased 4))]
+ $class (of ! each /.var (random.upper_cased 4))]
(all _.and
(_.coverage [/.closure /.return]
(expression (|>> (as Frac) (f.= float/0))
@@ -629,9 +629,9 @@
[float/0 random.safe_frac
float/1 random.safe_frac
float/2 random.safe_frac
- $arg/0 (at ! each /.var (random.lower_cased 10))
- $arg/1 (at ! each /.var (random.lower_cased 11))
- $arg/2 (at ! each /.var (random.lower_cased 12))]
+ $arg/0 (of ! each /.var (random.lower_cased 10))
+ $arg/1 (of ! each /.var (random.lower_cased 11))
+ $arg/2 (of ! each /.var (random.lower_cased 12))]
(`` (all _.and
(_.coverage [/.apply]
(expression (|>> (as Frac) (f.= (all f.+ float/0 float/1 float/2)))
@@ -687,8 +687,8 @@
(do [! random.monad]
[float/0 random.safe_frac
float/1 random.safe_frac
- $arg/0 (at ! each /.var (random.lower_cased 10))
- $arg/1 (at ! each /.var (random.lower_cased 11))]
+ $arg/0 (of ! each /.var (random.lower_cased 10))
+ $arg/1 (of ! each /.var (random.lower_cased 11))]
(`` (all _.and
(_.coverage [/.statement /.then /.print/1]
(expression (|>> (as Frac) (f.= float/0))
@@ -704,7 +704,7 @@
(def .public test
Test
(do [! random.monad]
- [.let [random (at ! each /.int random.int)]
+ [.let [random (of ! each /.int random.int)]
expected random.int]
(<| (_.covering /._)
(_.for [/.Code /.code])
diff --git a/stdlib/source/test/lux/meta/target/python.lux b/stdlib/source/test/lux/meta/target/python.lux
index 13510a10b..3e0beef03 100644
--- a/stdlib/source/test/lux/meta/target/python.lux
+++ b/stdlib/source/test/lux/meta/target/python.lux
@@ -158,8 +158,8 @@
[left random.int
right random.int
- i16 (at ! each ..int_16 random.int)
- shift (at ! each (n.% 16) random.nat)]
+ i16 (of ! each ..int_16 random.int)
+ shift (of ! each (n.% 16) random.nat)]
(`` (all _.and
(,, (with_template [</> <lux>]
[(_.coverage [</>]
@@ -210,7 +210,7 @@
(def test|text
Test
(do [! random.monad]
- [expected_code (at ! each (n.% 128) random.nat)
+ [expected_code (of ! each (n.% 128) random.nat)
.let [expected_char (text.of_char expected_code)]]
(all _.and
(_.coverage [/.chr/1 /.ord/1
@@ -228,14 +228,14 @@
(def test|array
Test
(do [! random.monad]
- [size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ [size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)
.let [expected (|> items
(list.item index)
(maybe.else f.not_a_number))]
- from (at ! each (n.% size) random.nat)
- plus (at ! each (n.% (n.- from size)) random.nat)
+ from (of ! each (n.% size) random.nat)
+ plus (of ! each (n.% (n.- from size)) random.nat)
.let [slice_from|size (n.- from size)
to (/.int (.int (n.+ plus from)))
from (/.int (.int from))]]
@@ -294,8 +294,8 @@
string (random.upper_cased 5)
comment (random.upper_cased 10)
- $arg/0 (at ! each /.var (random.lower_cased 10))
- $arg/1 (at ! each /.var (random.lower_cased 11))]
+ $arg/0 (of ! each /.var (random.lower_cased 10))
+ $arg/1 (of ! each /.var (random.lower_cased 11))]
(all _.and
..test|bool
..test|float
@@ -338,9 +338,9 @@
[float/0 random.safe_frac
float/1 random.safe_frac
float/2 random.safe_frac
- $arg/0 (at ! each /.var (random.lower_cased 10))
- $arg/1 (at ! each /.var (random.lower_cased 11))
- $arg/2 (at ! each /.var (random.lower_cased 12))]
+ $arg/0 (of ! each /.var (random.lower_cased 10))
+ $arg/1 (of ! each /.var (random.lower_cased 11))
+ $arg/2 (of ! each /.var (random.lower_cased 12))]
(all _.and
(_.coverage [/.lambda]
(expression (|>> (as Frac) (f.= float/0))
@@ -359,7 +359,7 @@
(do [! random.monad]
[expected/0 random.safe_frac
expected/1 random.safe_frac
- poly_choice (at ! each (n.% 2) random.nat)
+ poly_choice (of ! each (n.% 2) random.nat)
.let [keyword (|>> %.nat (format "k") /.string)
keyword/0 (keyword 0)
keyword/1 (keyword 1)
@@ -367,8 +367,8 @@
.let [expected/? (when poly_choice
0 expected/0
_ expected/1)]
- $var (at ! each (|>> %.nat (format "v") /.var) random.nat)
- $choice (at ! each (|>> %.nat (format "c") /.var) random.nat)]
+ $var (of ! each (|>> %.nat (format "v") /.var) random.nat)
+ $choice (of ! each (|>> %.nat (format "c") /.var) random.nat)]
(all _.and
(_.coverage [/.Single /.SVar /.var]
(expression (|>> (as Frac) (f.= expected/0))
@@ -446,10 +446,10 @@
(def test|access
Test
(do [! random.monad]
- [$var/0 (at ! each (|>> %.nat (format "v0_") /.var) random.nat)
+ [$var/0 (of ! each (|>> %.nat (format "v0_") /.var) random.nat)
expected/0 random.safe_frac
dummy/0 random.safe_frac
- field (at ! each /.string (random.upper_cased 1))]
+ field (of ! each /.string (random.upper_cased 1))]
(all _.and
(_.coverage [/.item]
(`` (and (,, (with_template [<seq>]
@@ -484,13 +484,13 @@
(def test|location
Test
(do [! random.monad]
- [$var/0 (at ! each (|>> %.nat (format "v0_") /.var) random.nat)
- $var/1 (at ! each (|>> %.nat (format "v1_") /.var) random.nat)
- $def (at ! each (|>> %.nat (format "def_") /.var) random.nat)
+ [$var/0 (of ! each (|>> %.nat (format "v0_") /.var) random.nat)
+ $var/1 (of ! each (|>> %.nat (format "v1_") /.var) random.nat)
+ $def (of ! each (|>> %.nat (format "def_") /.var) random.nat)
expected/0 random.safe_frac
expected/1 random.safe_frac
dummy/0 random.safe_frac
- field/0 (at ! each /.string (random.upper_cased 1))]
+ field/0 (of ! each /.string (random.upper_cased 1))]
(all _.and
(_.coverage [/.set]
(|> (..statement
@@ -599,7 +599,7 @@
expected random.safe_frac
dummy (random.only (|>> (f.= expected) not)
random.safe_frac)
- $ex (at ! each (|>> %.nat (format "ex_") /.var) random.nat)]
+ $ex (of ! each (|>> %.nat (format "ex_") /.var) random.nat)]
(all _.and
(_.coverage [/.raise /.Exception/1]
(when (try (..statement
@@ -641,12 +641,12 @@
(def test|loop
Test
(do [! random.monad]
- [base (at ! each (n.% 100) random.nat)
- factor (at ! each (|>> (n.% 10) ++) random.nat)
- extra (at ! each (|>> (n.% 10) ++) random.nat)
+ [base (of ! each (n.% 100) random.nat)
+ factor (of ! each (|>> (n.% 10) ++) random.nat)
+ extra (of ! each (|>> (n.% 10) ++) random.nat)
.let [expected (n.* factor base)]
- $iteration (at ! each (|>> %.nat (format "iteration_") /.var) random.nat)
- $temp (at ! each (|>> %.nat (format "temp_") /.var) random.nat)]
+ $iteration (of ! each (|>> %.nat (format "iteration_") /.var) random.nat)
+ $temp (of ! each (|>> %.nat (format "temp_") /.var) random.nat)]
(all _.and
(_.coverage [/.while]
(and (|> (..statement
@@ -746,8 +746,8 @@
(def test|statement
Test
(do [! random.monad]
- [$def (at ! each (|>> %.nat (format "def_") /.var) random.nat)
- $input/0 (at ! each (|>> %.nat (format "input_") /.var) random.nat)
+ [$def (of ! each (|>> %.nat (format "def_") /.var) random.nat)
+ $input/0 (of ! each (|>> %.nat (format "input_") /.var) random.nat)
expected/0 random.safe_frac
test random.bit
then random.safe_frac
diff --git a/stdlib/source/test/lux/meta/target/ruby.lux b/stdlib/source/test/lux/meta/target/ruby.lux
index f16b93c42..77cc6fa30 100644
--- a/stdlib/source/test/lux/meta/target/ruby.lux
+++ b/stdlib/source/test/lux/meta/target/ruby.lux
@@ -149,8 +149,8 @@
[left random.int
right random.int
- i16 (at ! each ..int_16 random.int)
- shift (at ! each (n.% 16) random.nat)]
+ i16 (of ! each ..int_16 random.int)
+ shift (of ! each (n.% 16) random.nat)]
(`` (all _.and
(,, (with_template [</> <lux>]
[(_.coverage [</>]
@@ -183,14 +183,14 @@
(def test|array
Test
(do [! random.monad]
- [size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ [size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)
.let [expected (|> items
(list.item index)
(maybe.else f.not_a_number))]
- from (at ! each (n.% size) random.nat)
- plus (at ! each (n.% (n.- from size)) random.nat)
+ from (of ! each (n.% size) random.nat)
+ plus (of ! each (n.% (n.- from size)) random.nat)
.let [to (/.int (.int (n.+ plus from)))
from (/.int (.int from))]]
(all _.and
@@ -231,21 +231,21 @@
(def test|object
Test
(do [! random.monad]
- [size (at ! each (|>> (n.% 10) ++) random.nat)
- index (at ! each (n.% size) random.nat)
+ [size (of ! each (|>> (n.% 10) ++) random.nat)
+ index (of ! each (n.% size) random.nat)
items (random.list size random.safe_frac)
- $class (at ! each (|>> %.nat (format "class_") /.local)
+ $class (of ! each (|>> %.nat (format "class_") /.local)
random.nat)
- $sub_class (at ! each (|>> %.nat (format "sub_class_") /.local)
+ $sub_class (of ! each (|>> %.nat (format "sub_class_") /.local)
random.nat)
- $method/0 (at ! each (|>> %.nat (format "method_") /.local)
+ $method/0 (of ! each (|>> %.nat (format "method_") /.local)
random.nat)
$method/1 (|> random.nat
- (at ! each (|>> %.nat (format "method_") /.local))
+ (of ! each (|>> %.nat (format "method_") /.local))
(random.only (|>> (/#= $method/0) not)))
- $arg/0 (at ! each (|>> %.nat (format "arg_") /.local)
+ $arg/0 (of ! each (|>> %.nat (format "arg_") /.local)
random.nat)
- $state (at ! each (|>> %.nat (format "instance_") /.instance)
+ $state (of ! each (|>> %.nat (format "instance_") /.instance)
random.nat)
single random.safe_frac
.let [double (/.function $method/0 (list $arg/0)
@@ -333,9 +333,9 @@
(<| (do [! random.monad]
[left (random.upper_cased 5)
right (random.upper_cased 5)
- $old (at ! each /.local (random.upper_cased 1))
- $new (at ! each /.local (random.upper_cased 2))
- $it (at ! each /.local (random.upper_cased 3))
+ $old (of ! each /.local (random.upper_cased 1))
+ $new (of ! each /.local (random.upper_cased 2))
+ $it (of ! each /.local (random.upper_cased 3))
.let [expected (format left right)]])
(all _.and
(_.for [/.stdout]
@@ -434,8 +434,8 @@
Test
(do [! random.monad]
[float/0 random.safe_frac
- $global (at ! each /.global (random.lower_cased 10))
- pattern (at ! each /.string (random.lower_cased 11))]
+ $global (of ! each /.global (random.lower_cased 10))
+ pattern (of ! each /.string (random.lower_cased 11))]
(all _.and
(_.coverage [/.global]
(expression (|>> (as Text) (text#= "global-variable"))
@@ -445,7 +445,7 @@
[(list)] (/.lambda {.#None})
(/.apply_lambda (list)))))
(_.coverage [/.script_name]
- (expression (let [file (format (at file.default separator) packager.main_file)]
+ (expression (let [file (format (of file.default separator) packager.main_file)]
(|>> (as Text)
(text.ends_with? file)))
/.script_name))
@@ -488,7 +488,7 @@
Test
(do [! random.monad]
[float/0 random.safe_frac
- $foreign (at ! each /.local (random.lower_cased 10))]
+ $foreign (of ! each /.local (random.lower_cased 10))]
(all _.and
(_.coverage [/.local]
(expression (|>> (as Frac) (f.= (f.+ float/0 float/0)))
@@ -508,14 +508,14 @@
Test
(do [! random.monad]
[float/0 random.safe_frac
- instance (at ! each (|>> %.nat (format "instance_"))
+ instance (of ! each (|>> %.nat (format "instance_"))
random.nat)
.let [$instance (/.instance instance)]
- $method (at ! each (|>> %.nat (format "method_") /.local)
+ $method (of ! each (|>> %.nat (format "method_") /.local)
random.nat)
- $class (at ! each (|>> %.nat (format "class_") /.local)
+ $class (of ! each (|>> %.nat (format "class_") /.local)
random.nat)
- $object (at ! each (|>> %.nat (format "object_") /.local)
+ $object (of ! each (|>> %.nat (format "object_") /.local)
random.nat)]
(all _.and
(_.coverage [/.instance]
@@ -579,15 +579,15 @@
(def test|static_var
Test
(do [! random.monad]
- [int/0 (at ! each (|>> (n.% 10) ++ .int)
+ [int/0 (of ! each (|>> (n.% 10) ++ .int)
random.nat)
- $static (at ! each (|>> %.nat (format "static_") /.static)
+ $static (of ! each (|>> %.nat (format "static_") /.static)
random.nat)
- $arg (at ! each (|>> %.nat /.local)
+ $arg (of ! each (|>> %.nat /.local)
random.nat)
- $method (at ! each (|>> %.nat (format "method_") /.local)
+ $method (of ! each (|>> %.nat (format "method_") /.local)
random.nat)
- $class (at ! each (|>> %.nat (format "class_") /.local)
+ $class (of ! each (|>> %.nat (format "class_") /.local)
random.nat)]
(all _.and
(_.coverage [/.static /.class_variable_set /.class_variable_get]
@@ -605,14 +605,14 @@
(def test|variadic
Test
(do [! random.monad]
- [$inputs (at ! each /.local (random.lower_cased 10))
- arity (at ! each (n.% 10) random.nat)
+ [$inputs (of ! each /.local (random.lower_cased 10))
+ arity (of ! each (n.% 10) random.nat)
vals (|> random.int
- (at ! each /.int)
+ (of ! each /.int)
(random.list arity))
keys (|> (random.lower_cased 1)
(random.set text.hash arity)
- (at ! each (|>> set.list (list#each /.string))))]
+ (of ! each (|>> set.list (list#each /.string))))]
(all _.and
(<| (_.for [/.LVar*])
(all _.and
@@ -638,9 +638,9 @@
Test
(do [! random.monad]
[float/0 random.safe_frac
- $foreign (at ! each /.local (random.lower_cased 10))
+ $foreign (of ! each /.local (random.lower_cased 10))
- $constant (at ! each /.constant (random.lower_cased 10))]
+ $constant (of ! each /.constant (random.lower_cased 10))]
(all _.and
(_.coverage [/.defined?/1]
(and (expression (|>> (as Bit))
@@ -675,8 +675,8 @@
Test
(do [! random.monad]
[float/0 random.safe_frac
- $foreign (at ! each /.local (random.lower_cased 10))
- field (at ! each /.string (random.upper_cased 10))]
+ $foreign (of ! each /.local (random.lower_cased 10))
+ field (of ! each /.string (random.upper_cased 10))]
(all _.and
(<| (_.for [/.Var])
..test|var)
@@ -717,13 +717,13 @@
(def test|label
Test
(do [! random.monad]
- [input (at ! each ..int_16 random.int)
+ [input (of ! each ..int_16 random.int)
- full_inner_iterations (at ! each (|>> (n.% 20) ++) random.nat)
- expected_inner_iterations (at ! each (n.% full_inner_iterations) random.nat)
+ full_inner_iterations (of ! each (|>> (n.% 20) ++) random.nat)
+ expected_inner_iterations (of ! each (n.% full_inner_iterations) random.nat)
- full_outer_iterations (at ! each (|>> (n.% 10) ++) random.nat)
- expected_outer_iterations (at ! each (n.% full_outer_iterations) random.nat)
+ full_outer_iterations (of ! each (|>> (n.% 10) ++) random.nat)
+ expected_outer_iterations (of ! each (n.% full_outer_iterations) random.nat)
.let [$input (/.local "input")
$output (/.local "output")
@@ -783,8 +783,8 @@
(def test|loop
Test
(do [! random.monad]
- [input (at ! each (i.right_shifted 32) random.int)
- iterations (at ! each (n.% 10) random.nat)
+ [input (of ! each (i.right_shifted 32) random.int)
+ iterations (of ! each (n.% 10) random.nat)
.let [$input (/.local "input")
$output (/.local "output")
$index (/.local "index")
@@ -827,7 +827,7 @@
dummy (random.only (|>> (f.= expected) not)
random.safe_frac)
error (random.lower_cased 10)
- $ex (at ! each /.local (random.lower_cased 10))
+ $ex (of ! each /.local (random.lower_cased 10))
expected_tag ..random_tag
dummy_tag (random.only (|>> (i.= expected_tag) not)
@@ -905,17 +905,17 @@
(def test|function
Test
(do [! random.monad]
- [iterations (at ! each (n.% 10) random.nat)
- $self (at ! each /.local (random.lower_cased 1))
+ [iterations (of ! each (n.% 10) random.nat)
+ $self (of ! each /.local (random.lower_cased 1))
field (random.lower_cased 3)
- $class (at ! each /.local (random.upper_cased 4))
+ $class (of ! each /.local (random.upper_cased 4))
float/0 random.safe_frac
float/1 random.safe_frac
float/2 random.safe_frac
- $arg/0 (at ! each /.local (random.lower_cased 10))
- $arg/1 (at ! each /.local (random.lower_cased 11))
- $arg/2 (at ! each /.local (random.lower_cased 12))]
+ $arg/0 (of ! each /.local (random.lower_cased 10))
+ $arg/1 (of ! each /.local (random.lower_cased 11))
+ $arg/2 (of ! each /.local (random.lower_cased 12))]
(all _.and
(_.coverage [/.lambda /.return]
(and (expression (|>> (as Frac) (f.= float/0))
@@ -993,10 +993,10 @@
[float/0 random.safe_frac
float/1 random.safe_frac
float/2 random.safe_frac
- $arg/0 (at ! each /.local (random.lower_cased 10))
- $arg/1 (at ! each /.local (random.lower_cased 11))
- $arg/2 (at ! each /.local (random.lower_cased 12))
- expected (at ! each (|>> %.int (text.replaced "+" ""))
+ $arg/0 (of ! each /.local (random.lower_cased 10))
+ $arg/1 (of ! each /.local (random.lower_cased 11))
+ $arg/2 (of ! each /.local (random.lower_cased 12))
+ expected (of ! each (|>> %.int (text.replaced "+" ""))
random.int)]
(all _.and
(_.coverage [/.statement]
diff --git a/stdlib/source/test/lux/meta/type.lux b/stdlib/source/test/lux/meta/type.lux
index 8c7e6cd9c..21d6d1d8e 100644
--- a/stdlib/source/test/lux/meta/type.lux
+++ b/stdlib/source/test/lux/meta/type.lux
@@ -57,7 +57,7 @@
(def nominal
(Random Type)
(|> (random.alpha_numeric 1)
- (at random.monad each (function (_ name)
+ (of random.monad each (function (_ name)
{.#Nominal name (list)}))))
(def test|matches
@@ -209,7 +209,7 @@
Test
(do [! random.monad]
[not_polymorphic ..nominal
- expected_inputs (at ! each (|>> (n.% 10) ++) random.nat)]
+ expected_inputs (of ! each (|>> (n.% 10) ++) random.nat)]
(all _.and
(_.coverage [\\parser.not_polymorphic]
(and (|> (\\parser.result (\\parser.polymorphic \\parser.any)
@@ -345,7 +345,7 @@
(def short
(Random Text)
(do [! random.monad]
- [size (|> random.nat (at ! each (n.% 10)))]
+ [size (|> random.nat (of ! each (n.% 10)))]
(random.unicode size)))
(def symbol
@@ -396,11 +396,11 @@
aliasedT {.#Named symbol/1 namedT}]]
(all _.and
(_.coverage [/.de_aliased]
- (at /.equivalence = namedT (/.de_aliased aliasedT)))
+ (of /.equivalence = namedT (/.de_aliased aliasedT)))
(_.coverage [/.anonymous]
- (at /.equivalence = anonymousT (/.anonymous aliasedT)))))
+ (of /.equivalence = anonymousT (/.anonymous aliasedT)))))
(do [! random.monad]
- [size (|> random.nat (at ! each (n.% 3)))
+ [size (|> random.nat (of ! each (n.% 3)))
members (|> (..random 0)
(random.only (function (_ type)
(when type
@@ -430,7 +430,7 @@
(do maybe.monad
[partial (/.applied (list Bit) Ann)
full (/.applied (list Int) partial)]
- (in (at /.equivalence = full {.#Product Bit Int}))))
+ (in (of /.equivalence = full {.#Product Bit Int}))))
(|> (/.applied (list Bit) Text)
(pipe.when
{.#None}
@@ -439,7 +439,7 @@
_
false))))
(do [! random.monad]
- [size (|> random.nat (at ! each (n.% 3)))
+ [size (|> random.nat (of ! each (n.% 3)))
members (monad.all ! (list.repeated size (..random 0)))
extra (|> (..random 0)
(random.only (function (_ type)
@@ -461,7 +461,7 @@
(n.= (list.size members) (list.size tparams))))
))
(do [! random.monad]
- [size (|> random.nat (at ! each (|>> (n.% 3) ++)))
+ [size (|> random.nat (of ! each (|>> (n.% 3) ++)))
body_type (|> (..random 0)
(random.only (function (_ type)
(when type
@@ -487,7 +487,7 @@
(|> body_type (/.ex_q size) /.quantified?)))
)))
(do [! random.monad]
- [depth (|> random.nat (at ! each (|>> (n.% 3) ++)))
+ [depth (|> random.nat (of ! each (|>> (n.% 3) ++)))
element_type (|> (..random 0)
(random.only (function (_ type)
(when type
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))))
)))))
diff --git a/stdlib/source/test/lux/program.lux b/stdlib/source/test/lux/program.lux
index 90e5aae43..19386129c 100644
--- a/stdlib/source/test/lux/program.lux
+++ b/stdlib/source/test/lux/program.lux
@@ -41,7 +41,7 @@
(<| (_.covering \\parser._)
(_.for [\\parser.Parser])
(do [! random.monad]
- [expected (at ! each n#encoded random.nat)
+ [expected (of ! each n#encoded random.nat)
.let [random_dummy (random.only (|>> (text#= expected) not)
(random.unicode 5))]
dummy random_dummy
diff --git a/stdlib/source/test/lux/test/benchmark.lux b/stdlib/source/test/lux/test/benchmark.lux
index 740d444cf..e8ff950f3 100644
--- a/stdlib/source/test/lux/test/benchmark.lux
+++ b/stdlib/source/test/lux/test/benchmark.lux
@@ -25,7 +25,7 @@
(do [! random.monad]
[angle random.safe_frac
- times (at ! each (n.% 10) random.nat)
+ times (of ! each (n.% 10) random.nat)
.let [computation (is (IO Frac)
(io.io (|> angle
diff --git a/stdlib/source/test/lux/test/property.lux b/stdlib/source/test/lux/test/property.lux
index f5754958a..a0ae91e30 100644
--- a/stdlib/source/test/lux/test/property.lux
+++ b/stdlib/source/test/lux/test/property.lux
@@ -70,7 +70,7 @@
(n.= 0 (the tally.#successes tally))
(n.= 1 (the tally.#failures tally)))))))
(do [! random.monad]
- [expected (at ! each (|>> (n.% 10) ++) random.nat)
+ [expected (of ! each (|>> (n.% 10) ++) random.nat)
.let [counter (is (Atom Nat)
(atom.atom 0))]
times_unit_test (<| (/.times expected /.ignore_success)
@@ -94,7 +94,7 @@
/.Test
(all /.and
(do [! random.monad]
- [expected (at ! each (|>> (n.% 10) ++) random.nat)
+ [expected (of ! each (|>> (n.% 10) ++) random.nat)
.let [counter (is (Atom Nat)
(atom.atom 0))]
unit_test (<| /.in_parallel
@@ -112,7 +112,7 @@
(n.= expected (the tally.#successes tally))
(n.= 0 (the tally.#failures tally)))))))
(do [! random.monad]
- [expected (at ! each (|>> (n.% 10) ++) random.nat)
+ [expected (of ! each (|>> (n.% 10) ++) random.nat)
.let [counter (is (Atom Nat)
(atom.atom 0))]
unit_test (<| /.in_parallel
diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux
index e4d595dec..7d933d926 100644
--- a/stdlib/source/test/lux/world/console.lux
+++ b/stdlib/source/test/lux/world/console.lux
@@ -62,7 +62,7 @@
(io.run!
(do io.monad
[?_ (/.write_line expected console)
- ?actual (at console read_line [])]
+ ?actual (of console read_line [])]
(in (<| (try.else false)
(do try.monad
[_ ?_
diff --git a/stdlib/source/test/lux/world/environment.lux b/stdlib/source/test/lux/world/environment.lux
index df434f657..8c2484e7b 100644
--- a/stdlib/source/test/lux/world/environment.lux
+++ b/stdlib/source/test/lux/world/environment.lux
@@ -40,7 +40,7 @@
[expected random.nat]
(_.coverage [\\parser.result]
(|> (\\parser.result (//#in expected) \\parser.empty)
- (at try.functor each (n.= expected))
+ (of try.functor each (n.= expected))
(try.else false))))
(do random.monad
[property (random.alphabetic 1)
@@ -49,7 +49,7 @@
(|> \\parser.empty
(dictionary.has property expected)
(\\parser.result (\\parser.property property))
- (at try.functor each (text#= expected))
+ (of try.functor each (text#= expected))
(try.else false))))
(do random.monad
[property (random.alphabetic 1)]
@@ -76,7 +76,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [env_size (at ! each (|>> (n.% 10) ++) random.nat)
+ [env_size (of ! each (|>> (n.% 10) ++) random.nat)
environment (..environment env_size)
home ..path
directory ..path
@@ -102,7 +102,7 @@
(_.coverage [/.unknown_environment_variable]
(let [it (/.mock environment home directory)]
(|> unknown
- (at it variable)
+ (of it variable)
io.run!
(pipe.when {try.#Success _}
false
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index d2f3cde55..b7ffb5f6c 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -193,7 +193,7 @@
{.#Some {.#Right children}}
(|> children
(monad.only ! (..file? disk))
- (at ! each (|>> {try.#Success})))
+ (of ! each (|>> {try.#Success})))
_
(in {try.#Failure ""}))))
@@ -204,7 +204,7 @@
{.#Some {.#Right children}}
(|> children
(monad.only ! (..directory? disk))
- (at ! each (|>> {try.#Success})))
+ (of ! each (|>> {try.#Success})))
_
(in {try.#Failure ""}))))
@@ -257,7 +257,7 @@
(in (do async.monad
[.let [fs (/.mock /)]
- ? (at fs delete file)]
+ ? (of fs delete file)]
(unit.coverage [/.cannot_delete]
(when ?
{try.#Failure error}
@@ -267,7 +267,7 @@
false))))
(in (do async.monad
[.let [fs (/.mock /)]
- ? (at fs read file)]
+ ? (of fs read file)]
(unit.coverage [/.cannot_find_file]
(when ?
{try.#Failure error}
@@ -277,8 +277,8 @@
false))))
(in (do async.monad
[.let [fs (/.mock /)]
- ?/0 (at fs directory_files file)
- ?/1 (at fs sub_directories file)]
+ ?/0 (of fs directory_files file)
+ ?/1 (of fs sub_directories file)]
(unit.coverage [/.cannot_find_directory]
(when [?/0 ?/1]
[{try.#Failure error/0} {try.#Failure error/1}]
diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux
index e8ce8182e..75bcf5a2e 100644
--- a/stdlib/source/test/lux/world/file/watch.lux
+++ b/stdlib/source/test/lux/world/file/watch.lux
@@ -74,8 +74,8 @@
.let [[fs watcher] (/.mock "/")]]
(all _.and
(in (do async.monad
- [?concern (at watcher concern directory)
- ?stop (at watcher stop directory)]
+ [?concern (of watcher concern directory)
+ ?stop (of watcher stop directory)]
(unit.coverage [/.not_being_watched]
(and (when ?concern
{try.#Failure error}
@@ -94,18 +94,18 @@
(def (no_events_prior_to_creation! fs watcher directory)
(-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit)))
(do [! (try.with async.monad)]
- [_ (at fs make_directory directory)
- _ (at watcher start /.all directory)]
- (|> (at watcher poll [])
- (at ! each list.empty?))))
+ [_ (of fs make_directory directory)
+ _ (of watcher start /.all directory)]
+ (|> (of watcher poll [])
+ (of ! each list.empty?))))
(def (after_creation! fs watcher expected_path)
(-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit)))
(do (try.with async.monad)
[_ (is (Async (Try Any))
(//.make_file async.monad fs (binary.empty 0) expected_path))
- poll/pre (at watcher poll [])
- poll/post (at watcher poll [])]
+ poll/pre (of watcher poll [])
+ poll/post (of watcher poll [])]
(in (and (when poll/pre
(list [concern actual_path])
(and (text#= expected_path actual_path)
@@ -121,9 +121,9 @@
(-> (//.System Async) (/.Watcher Async) Binary //.Path (Async (Try Bit)))
(do (try.with async.monad)
[_ (async.after 1 {try.#Success "Delay to make sure the over_write time-stamp always changes."})
- _ (at fs write expected_path data)
- poll/2 (at watcher poll [])
- poll/2' (at watcher poll [])]
+ _ (of fs write expected_path data)
+ poll/2 (of watcher poll [])
+ poll/2' (of watcher poll [])]
(in (and (when poll/2
(list [concern actual_path])
(and (text#= expected_path actual_path)
@@ -138,9 +138,9 @@
(def (after_deletion! fs watcher expected_path)
(-> (//.System Async) (/.Watcher Async) //.Path (Async (Try Bit)))
(do (try.with async.monad)
- [_ (at fs delete expected_path)
- poll/3 (at watcher poll [])
- poll/3' (at watcher poll [])]
+ [_ (of fs delete expected_path)
+ poll/3 (of watcher poll [])
+ poll/3' (of watcher poll [])]
(in (and (when poll/3
(list [concern actual_path])
(and (not (/.creation? concern))
@@ -164,7 +164,7 @@
[directory (random.alphabetic 5)
.let [/ "/"
[fs watcher] (/.mock /)]
- expected_path (at ! each (|>> (format directory /))
+ expected_path (of ! each (|>> (format directory /))
(random.alphabetic 5))
data ($binary.random 10)]
(in (do [! async.monad]
@@ -191,7 +191,7 @@
.let [/ "/"
[fs watcher] (/.mock /)]]
(in (do async.monad
- [started? (at watcher start /.all directory)]
+ [started? (of watcher start /.all directory)]
(unit.coverage [/.cannot_poll_a_non_existent_directory]
(when started?
{try.#Success _}
diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux
index d04d4dba0..06330ca69 100644
--- a/stdlib/source/test/lux/world/input/keyboard.lux
+++ b/stdlib/source/test/lux/world/input/keyboard.lux
@@ -142,7 +142,7 @@
(Random /.Key)
(let [count (list.size ..listing)]
(do [! random.monad]
- [choice (at ! each (n.% count) random.nat)]
+ [choice (of ! each (n.% count) random.nat)]
(in (maybe.trusted (list.item choice ..listing))))))
(def .public test
diff --git a/stdlib/source/test/lux/world/locale.lux b/stdlib/source/test/lux/world/locale.lux
index f4e8f7919..57ae892a0 100644
--- a/stdlib/source/test/lux/world/locale.lux
+++ b/stdlib/source/test/lux/world/locale.lux
@@ -60,15 +60,15 @@
fixed_encoding ..random_encoding]
(all _.and
(|> ..random_language
- (at ! each (function (_ language)
+ (of ! each (function (_ language)
(/.locale language {.#Some fixed_territory} {.#Some fixed_encoding})))
($hash.spec /.hash))
(|> ..random_territory
- (at ! each (function (_ territory)
+ (of ! each (function (_ territory)
(/.locale fixed_language {.#Some territory} {.#Some fixed_encoding})))
($hash.spec /.hash))
(|> ..random_encoding
- (at ! each (function (_ encoding)
+ (of ! each (function (_ encoding)
(/.locale fixed_language {.#Some fixed_territory} {.#Some encoding})))
($hash.spec /.hash))
)))
diff --git a/stdlib/source/test/lux/world/locale/language.lux b/stdlib/source/test/lux/world/locale/language.lux
index 8e203a4d9..12020bfe7 100644
--- a/stdlib/source/test/lux/world/locale/language.lux
+++ b/stdlib/source/test/lux/world/locale/language.lux
@@ -218,7 +218,7 @@
(def !aliases
(template (_ <reference> <aliases>)
[(_.coverage <aliases>
- (list.every? (at /.equivalence = <reference>)
+ (list.every? (of /.equivalence = <reference>)
(`` (list (,, (template.spliced <aliases>))))))]))
(def aliases_test/0
@@ -285,7 +285,7 @@
(list#each (|>> (the #languages) set.list))
list.together)]
(do [! random.monad]
- [choice (at ! each (n.% (list.size options))
+ [choice (of ! each (n.% (list.size options))
random.nat)]
(in (maybe.trusted (list.item choice options))))))
diff --git a/stdlib/source/test/lux/world/locale/territory.lux b/stdlib/source/test/lux/world/locale/territory.lux
index 06ab0b2d5..f39ff6627 100644
--- a/stdlib/source/test/lux/world/locale/territory.lux
+++ b/stdlib/source/test/lux/world/locale/territory.lux
@@ -175,7 +175,7 @@
(def !aliases
(template (_ <reference> <aliases>)
[(_.coverage <aliases>
- (list.every? (at /.equivalence = <reference>)
+ (list.every? (of /.equivalence = <reference>)
(`` (list (,, (template.spliced <aliases>))))))]))
(def aliases_test
@@ -211,7 +211,7 @@
(list#each (|>> (the #territories) set.list))
list.together)]
(do [! random.monad]
- [choice (at ! each (n.% (list.size options))
+ [choice (of ! each (n.% (list.size options))
random.nat)]
(in (maybe.trusted (list.item choice options))))))
diff --git a/stdlib/source/test/lux/world/logging.lux b/stdlib/source/test/lux/world/logging.lux
index f2d56ff15..bcc559448 100644
--- a/stdlib/source/test/lux/world/logging.lux
+++ b/stdlib/source/test/lux/world/logging.lux
@@ -49,8 +49,8 @@
(let [console (console.async (console.mock ..mock ""))
it (/.console console)]
(in (do async.monad
- [logged? (at it log expected_message)
- actual_message (at console read_line [])]
+ [logged? (of it log expected_message)
+ actual_message (of console read_line [])]
(unit.coverage [/.console /.log]
(when [logged? actual_message]
[{try.#Success _}
@@ -64,7 +64,7 @@
it (/.console console)]
(in (do async.monad
[logged? (<level> expected_message it)
- actual_message (at console read_line [])]
+ actual_message (of console read_line [])]
(unit.coverage [<level>]
(when [logged? actual_message]
[{try.#Success _}
@@ -85,8 +85,8 @@
(/.with (text.suffix expected_appendix)
(/.console console)))]
(in (do async.monad
- [logged? (at it log expected_message)
- actual_message (at console read_line [])]
+ [logged? (of it log expected_message)
+ actual_message (of console read_line [])]
(unit.coverage [/.with]
(when [logged? actual_message]
[{try.#Success _}
@@ -103,8 +103,8 @@
(async#in expected_instant))
(/.console console)))]
(in (do async.monad
- [logged? (at it log expected_message)
- actual_message (at console read_line [])]
+ [logged? (of it log expected_message)
+ actual_message (of console read_line [])]
(unit.coverage [/.timed]
(when [logged? actual_message]
[{try.#Success _}
diff --git a/stdlib/source/test/lux/world/money.lux b/stdlib/source/test/lux/world/money.lux
index dc21b0603..4ebd46bf2 100644
--- a/stdlib/source/test/lux/world/money.lux
+++ b/stdlib/source/test/lux/world/money.lux
@@ -53,12 +53,12 @@
subject (/.money expected_currency expected_subject)]
(and (|> subject
(/.+ parameter)
- (at /.equivalence = subject)
+ (of /.equivalence = subject)
not)
(|> subject
(/.+ parameter)
(/.- parameter)
- (maybe#each (at /.equivalence = subject))
+ (maybe#each (of /.equivalence = subject))
(maybe.else false)))))
(do !
[it ..random]
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux
index 3eee7b77a..0e4a05fb8 100644
--- a/stdlib/source/test/lux/world/net/http/client.lux
+++ b/stdlib/source/test/lux/world/net/http/client.lux
@@ -45,10 +45,10 @@
product.right
(the //.#body)
(function.on {.#None})
- (at ! each (|>> (pipe.do try.monad
+ (of ! each (|>> (pipe.do try.monad
[]
- [product.right (at utf8.codec decoded)]
- [(at nat.decimal decoded)]
+ [product.right (of utf8.codec decoded)]
+ [(of nat.decimal decoded)]
[(nat.= expected) in])
(try.else false))))
@@ -69,7 +69,7 @@
on_connect random.nat
on_options random.nat
on_trace random.nat
- num_headers (at ! each (nat.% 10) random.nat)
+ num_headers (of ! each (nat.% 10) random.nat)
headers (random.dictionary text.hash num_headers (random.lower_cased 3) (random.lower_cased 3))
.let [mock (is (/.Client IO)
(implementation
@@ -85,8 +85,8 @@
{//.#Options} on_options
{//.#Trace} on_trace)
data (|> value
- (at nat.decimal encoded)
- (at utf8.codec encoded))]
+ (of nat.decimal encoded)
+ (of utf8.codec encoded))]
{try.#Success [//status.ok
[//.#headers headers
//.#body (function (_ ?wanted_bytes)
diff --git a/stdlib/source/test/lux/world/net/http/header.lux b/stdlib/source/test/lux/world/net/http/header.lux
index 7302fd653..1baa300af 100644
--- a/stdlib/source/test/lux/world/net/http/header.lux
+++ b/stdlib/source/test/lux/world/net/http/header.lux
@@ -85,6 +85,6 @@
(|> /.empty
(/.has /.set_cookies expected_jar)
(/.one /.set_cookies)
- (try#each (at cookie.equivalence = expected_jar))
+ (try#each (of cookie.equivalence = expected_jar))
(try.else false))))
)))
diff --git a/stdlib/source/test/lux/world/net/http/response.lux b/stdlib/source/test/lux/world/net/http/response.lux
index bdefd87c2..4e4e0baac 100644
--- a/stdlib/source/test/lux/world/net/http/response.lux
+++ b/stdlib/source/test/lux/world/net/http/response.lux
@@ -50,11 +50,11 @@
[expected_status statusT.random
expected_mime mimeT.random
- utf8_length (at ! each (n.% 10) random.nat)
+ utf8_length (of ! each (n.% 10) random.nat)
utf8 (random.upper_cased utf8_length)
.let [utf8_data (utf8#encoded utf8)]
- expected_url (at ! each (text.prefix "http://www.example.com/")
+ expected_url (of ! each (text.prefix "http://www.example.com/")
(random.upper_cased 1))
.let [expected_html (html.html/5
diff --git a/stdlib/source/test/lux/world/net/http/server.lux b/stdlib/source/test/lux/world/net/http/server.lux
index 92f57b953..a78a5f345 100644
--- a/stdlib/source/test/lux/world/net/http/server.lux
+++ b/stdlib/source/test/lux/world/net/http/server.lux
@@ -99,7 +99,7 @@
(all random.and
(random#in header.empty)
(random#in (function (_ _)
- (at ! in {try.#Success [(binary.size body) body]})))
+ (of ! in {try.#Success [(binary.size body) body]})))
))
(def data
@@ -131,7 +131,7 @@
[expected_data_size expected_data] ..data
.let [expected_server (is /.Server
(function (_ ! request)
- (at ! in (response.content ! expected_status expected_mime expected_data))))]])
+ (of ! in (response.content ! expected_status expected_mime expected_data))))]])
(`` (all _.and
(,, (with_template [<server> <scheme>]
[(in (do [! async.monad]
@@ -170,7 +170,7 @@
[expected_data_size expected_data] ..data
.let [expected_server (is /.Server
(function (_ ! request)
- (at ! in (response.content ! expected_status expected_mime expected_data))))]])
+ (of ! in (response.content ! expected_status expected_mime expected_data))))]])
(`` (all _.and
(,, (with_template [<server> <correct_method> <incorrect_method>]
[(in (do [! async.monad]
@@ -217,7 +217,7 @@
[expected_data_size expected_data] ..data
.let [expected_server (is /.Server
(function (_ ! request)
- (at ! in (response.content ! expected_status expected_mime expected_data))))]])
+ (of ! in (response.content ! expected_status expected_mime expected_data))))]])
(_.for [/.Server])
(`` (all _.and
..scheme_test
diff --git a/stdlib/source/test/lux/world/net/http/status.lux b/stdlib/source/test/lux/world/net/http/status.lux
index a7cb40039..550e8b0f6 100644
--- a/stdlib/source/test/lux/world/net/http/status.lux
+++ b/stdlib/source/test/lux/world/net/http/status.lux
@@ -105,7 +105,7 @@
(def .public random
(Random /.Status)
(do [! random.monad]
- [choice (at ! each (n.% (set.size ..unique))
+ [choice (of ! each (n.% (set.size ..unique))
random.nat)]
(in (maybe.trusted (list.item choice all)))))
diff --git a/stdlib/source/test/lux/world/net/mime.lux b/stdlib/source/test/lux/world/net/mime.lux
index 3b36e7ecd..30b34affc 100644
--- a/stdlib/source/test/lux/world/net/mime.lux
+++ b/stdlib/source/test/lux/world/net/mime.lux
@@ -165,7 +165,7 @@
(|> expected
/.name
/.mime
- (at /.equivalence = expected)))
+ (of /.equivalence = expected)))
<coverages>
(_.coverage [/.text]
(|> (/.text encoding)
diff --git a/stdlib/source/test/lux/world/net/uri/encoding.lux b/stdlib/source/test/lux/world/net/uri/encoding.lux
index 0bdb9a7a0..c302dceac 100644
--- a/stdlib/source/test/lux/world/net/uri/encoding.lux
+++ b/stdlib/source/test/lux/world/net/uri/encoding.lux
@@ -32,8 +32,8 @@
left (random.lower_cased 1)
middle (random.lower_cased 1)
right (random.lower_cased 1)
- left_choice (at ! each (n.% variety) random.nat)
- right_choice (at ! each (n.% variety) random.nat)
+ left_choice (of ! each (n.% variety) random.nat)
+ right_choice (of ! each (n.% variety) random.nat)
.let [left_choice (maybe.trusted (list.item left_choice choices))
right_choice (maybe.trusted (list.item right_choice choices))
unsafe (%.format left
diff --git a/stdlib/source/test/lux/world/net/uri/path.lux b/stdlib/source/test/lux/world/net/uri/path.lux
index 968fd990c..9ea2e75fe 100644
--- a/stdlib/source/test/lux/world/net/uri/path.lux
+++ b/stdlib/source/test/lux/world/net/uri/path.lux
@@ -20,7 +20,7 @@
Test
(<| (_.covering /._)
(do [! random.monad]
- [segments (at ! each (n.% 10) random.nat)
+ [segments (of ! each (n.% 10) random.nat)
segments (random.list segments (random.lower_cased 1))])
(_.for [/.Path])
(all _.and
diff --git a/stdlib/source/test/lux/world/net/uri/scheme.lux b/stdlib/source/test/lux/world/net/uri/scheme.lux
index 4a651646c..66d51ea0d 100644
--- a/stdlib/source/test/lux/world/net/uri/scheme.lux
+++ b/stdlib/source/test/lux/world/net/uri/scheme.lux
@@ -66,7 +66,7 @@
(|> expected
/.name
/.scheme
- (at /.equivalence = expected)))
+ (of /.equivalence = expected)))
(_.coverage [(,, (with_template [<scheme>]
[<scheme>]
@@ -83,7 +83,7 @@
(set.size uniques))))
(,, (with_template [<original> <alias>]
[(_.coverage [<alias>]
- (at /.equivalence = <original> <alias>))]
+ (of /.equivalence = <original> <alias>))]
[/.acap /.application_configuration_access_protocol]
diff --git a/stdlib/source/test/lux/world/output/video/resolution.lux b/stdlib/source/test/lux/world/output/video/resolution.lux
index c5444497e..4123a0b7d 100644
--- a/stdlib/source/test/lux/world/output/video/resolution.lux
+++ b/stdlib/source/test/lux/world/output/video/resolution.lux
@@ -48,7 +48,7 @@
(Random /.Resolution)
(let [count (list.size ..listing)]
(do [! random.monad]
- [choice (at ! each (n.% count) random.nat)]
+ [choice (of ! each (n.% count) random.nat)]
(in (maybe.trusted (list.item choice ..listing))))))
(def .public test
diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux
index 32e2d3494..03dff9dba 100644
--- a/stdlib/source/test/lux/world/shell.lux
+++ b/stdlib/source/test/lux/world/shell.lux
@@ -100,11 +100,11 @@
.let [shell (/.async (..io_shell command oops input destruction exit))]]
(in (do [! async.monad]
[verdict (do (try.with !)
- [process (at shell execute [environment.empty "~" command (list)])
- read (at process read [])
- failure (at process fail [])
+ [process (of shell execute [environment.empty "~" command (list)])
+ read (of process read [])
+ failure (of process fail [])
wrote! (do !
- [write (at process write input)]
+ [write (of process write input)]
(in {try.#Success (when write
{try.#Success _}
false
@@ -112,14 +112,14 @@
{try.#Failure write}
(text#= input write))}))
destroyed! (do !
- [destroy (at process destroy [])]
+ [destroy (of process destroy [])]
(in {try.#Success (when destroy
{try.#Success _}
false
{try.#Failure destroy}
(text#= destruction destroy))}))
- await (at process await [])]
+ await (of process await [])]
(in (and (text#= command read)
(text#= oops failure)
wrote!
diff --git a/stdlib/source/test/lux/world/time.lux b/stdlib/source/test/lux/world/time.lux
index d6ee9b953..95ddb6370 100644
--- a/stdlib/source/test/lux/world/time.lux
+++ b/stdlib/source/test/lux/world/time.lux
@@ -29,7 +29,8 @@
["[1][0]" instant]
["[1][0]" month]
["[1][0]" year]
- ["[1][0]" solar]]
+ ["[1][0]" solar]
+ ["[1][0]" series]]
[\\library
["[0]" / (.only)
["[0]" duration]]])
@@ -55,7 +56,7 @@
(|> expected
/.clock
/.time
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(let [expected (/.clock expected)]
(`` (all _.and
@@ -73,10 +74,10 @@
(def for_ranges
Test
(do [! random.monad]
- [valid_hour (at ! each (|>> (n.% /.hours) (n.max 10)) random.nat)
- valid_minute (at ! each (|>> (n.% /.minutes) (n.max 10)) random.nat)
- valid_second (at ! each (|>> (n.% /.seconds) (n.max 10)) random.nat)
- valid_milli_second (at ! each (n.% /.milli_seconds) random.nat)
+ [valid_hour (of ! each (|>> (n.% /.hours) (n.max 10)) random.nat)
+ valid_minute (of ! each (|>> (n.% /.minutes) (n.max 10)) random.nat)
+ valid_second (of ! each (|>> (n.% /.seconds) (n.max 10)) random.nat)
+ valid_milli_second (of ! each (n.% /.milli_seconds) random.nat)
.let [invalid_hour (|> valid_hour (n.+ /.hours))
invalid_minute (|> valid_minute (n.+ /.minutes) (n.min 99))
@@ -89,7 +90,7 @@
%.nat
(text.prefix <prefix>)
(text.suffix <suffix>)
- (at /.codec decoded)
+ (of /.codec decoded)
(pipe.when
{try.#Success _} true
{try.#Failure error} false))
@@ -99,7 +100,7 @@
%.nat
(text.prefix <prefix>)
(text.suffix <suffix>)
- (at /.codec decoded)
+ (of /.codec decoded)
(pipe.when
{try.#Success _}
false
@@ -117,7 +118,7 @@
(|> valid_milli_second
%.nat
(format "00:00:00.")
- (at /.codec decoded)
+ (of /.codec decoded)
(pipe.when
{try.#Success _} true
{try.#Failure error} false)))
@@ -131,7 +132,7 @@
[.let [day (.nat (duration.millis duration.day))]
expected random.time
- out_of_bounds (at ! each (|>> /.millis (n.+ day))
+ out_of_bounds (of ! each (|>> /.millis (n.+ day))
random.time)]
(`` (all _.and
..for_implementation
@@ -140,7 +141,7 @@
(|> expected
/.millis
/.of_millis
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.time_exceeds_a_day]
(when (/.of_millis out_of_bounds)
@@ -155,9 +156,9 @@
(n.= 0)))
(_.coverage [/.parser]
(|> expected
- (at /.codec encoded)
+ (of /.codec encoded)
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
..for_ranges
(_.for [/.Clock]
@@ -170,4 +171,5 @@
/month.test
/year.test
/solar.test
+ /series.test
)))))
diff --git a/stdlib/source/test/lux/world/time/date.lux b/stdlib/source/test/lux/world/time/date.lux
index 3dd22343b..d2a3bdc0d 100644
--- a/stdlib/source/test/lux/world/time/date.lux
+++ b/stdlib/source/test/lux/world/time/date.lux
@@ -45,7 +45,7 @@
(|> (/.date (/.year expected)
(/.month expected)
(/.day_of_month expected))
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
(do random.monad
[expected random.date]
@@ -64,7 +64,7 @@
(|> expected
/.days
/.of_days
- (at /.equivalence = expected))))
+ (of /.equivalence = expected))))
(_.coverage [/.epoch]
(|> /.epoch
/.days
@@ -72,16 +72,16 @@
(do random.monad
[expected random.date]
(_.coverage [/.parser]
- (|> (at /.codec encoded expected)
+ (|> (of /.codec encoded expected)
(<text>.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
(do [! random.monad]
- [year (at ! each (|>> (n.% 10,000) ++)
+ [year (of ! each (|>> (n.% 10,000) ++)
random.nat)
- month (at ! each (|>> (n.% 10) (n.+ 13))
+ month (of ! each (|>> (n.% 10) (n.+ 13))
random.nat)
- day (at ! each (|>> (n.% 10) (n.+ 10))
+ day (of ! each (|>> (n.% 10) (n.+ 10))
random.nat)
.let [input (format (%.nat year)
"-" (%.nat month)
diff --git a/stdlib/source/test/lux/world/time/day.lux b/stdlib/source/test/lux/world/time/day.lux
index 6f1ea4b3d..5e1c3a2fe 100644
--- a/stdlib/source/test/lux/world/time/day.lux
+++ b/stdlib/source/test/lux/world/time/day.lux
@@ -60,8 +60,8 @@
(,, (with_template [<before> <current> <after>]
[(_.coverage [<current>]
- (and (at /.equivalence = {<before>} (at /.enum pred {<current>}))
- (at /.equivalence = {<after>} (at /.enum succ {<current>}))))]
+ (and (of /.equivalence = {<before>} (of /.enum pred {<current>}))
+ (of /.equivalence = {<after>} (of /.enum succ {<current>}))))]
[/.#Saturday /.#Sunday /.#Monday]
[/.#Sunday /.#Monday /.#Tuesday]
@@ -74,7 +74,7 @@
(do random.monad
[not_a_day (random.upper_cased 1)]
(_.coverage [/.not_a_day_of_the_week]
- (when (at /.codec decoded not_a_day)
+ (when (of /.codec decoded not_a_day)
{try.#Failure error}
(exception.match? /.not_a_day_of_the_week error)
@@ -84,7 +84,7 @@
(|> expected
/.number
/.by_number
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.invalid_day]
(when (/.by_number invalid)
diff --git a/stdlib/source/test/lux/world/time/duration.lux b/stdlib/source/test/lux/world/time/duration.lux
index 093f98f0d..c3546fe7a 100644
--- a/stdlib/source/test/lux/world/time/duration.lux
+++ b/stdlib/source/test/lux/world/time/duration.lux
@@ -40,7 +40,7 @@
(do random.monad
[duration random.duration]
(_.coverage [/.of_millis /.millis]
- (|> duration /.millis /.of_millis (at /.equivalence = duration))))
+ (|> duration /.millis /.of_millis (of /.equivalence = duration))))
(do random.monad
[.let [(open "#[0]") /.equivalence]
expected random.duration
@@ -68,7 +68,7 @@
[.let [(open "#[0]") /.order
positive (|> random.duration
(random.only (|>> (#= /.empty) not))
- (at ! each (function (_ duration)
+ (of ! each (function (_ duration)
(if (/.positive? duration)
duration
(/.inverse duration)))))]
@@ -83,7 +83,7 @@
(_.coverage [/.ticks]
(i.= +1 (/.ticks sample sample)))
(_.coverage [/.milli_second]
- (#= /.empty (at /.enum pred /.milli_second)))
+ (#= /.empty (of /.enum pred /.milli_second)))
(,, (with_template [<factor> <big> <small>]
[(_.coverage [<big>]
(|> <big> (/.ticks <small>) (i.= <factor>)))]
diff --git a/stdlib/source/test/lux/world/time/instant.lux b/stdlib/source/test/lux/world/time/instant.lux
index d81a5ad27..ef6773eac 100644
--- a/stdlib/source/test/lux/world/time/instant.lux
+++ b/stdlib/source/test/lux/world/time/instant.lux
@@ -45,33 +45,44 @@
($codec.spec /.equivalence /.codec random.instant))
(do random.monad
- [.let [(open "#[0]") /.equivalence]
+ [.let [(open "/#[0]") /.equivalence]
expected random.instant]
(all _.and
(_.coverage [/.millis /.of_millis]
- (|> expected /.millis /.of_millis (#= expected)))
+ (|> expected /.millis /.of_millis (/#= expected)))
(_.coverage [/.relative /.absolute]
- (|> expected /.relative /.absolute (#= expected)))
+ (|> expected /.relative /.absolute (/#= expected)))
(_.coverage [/.date /.time /.of_date_time]
- (#= expected
- (/.of_date_time (/.date expected)
- (/.time expected))))
+ (/#= expected
+ (/.of_date_time (/.date expected)
+ (/.time expected))))
))
(do random.monad
- [.let [(open "#[0]") /.equivalence
+ [.let [(open "/#[0]") /.equivalence
(open "duration#[0]") duration.equivalence]
from random.instant
to random.instant]
(all _.and
(_.coverage [/.span]
(|> from (/.span from) (duration#= duration.empty)))
+ (_.coverage [/.before]
+ (|> from (/.before (/.span to from)) (/#= to)))
(_.coverage [/.after]
- (|> from (/.after (/.span from to)) (#= to)))
+ (|> from (/.after (/.span from to)) (/#= to)))
(_.coverage [/.epoch]
(duration#= (/.relative to)
(/.span /.epoch to)))
))
(do random.monad
+ [.let [(open "/#[0]") /.order]
+ it random.instant]
+ (all _.and
+ (_.coverage [/.earliest]
+ (not (/#< /.earliest it)))
+ (_.coverage [/.latest]
+ (not (/#< it /.latest)))
+ ))
+ (do random.monad
[instant random.instant
.let [d0 (/.day_of_week instant)]]
(_.coverage [/.day_of_week]
@@ -115,6 +126,6 @@
(|> expected
/.format
(?text.result /.parser)
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false))))
)))
diff --git a/stdlib/source/test/lux/world/time/month.lux b/stdlib/source/test/lux/world/time/month.lux
index 620af8077..bc095c947 100644
--- a/stdlib/source/test/lux/world/time/month.lux
+++ b/stdlib/source/test/lux/world/time/month.lux
@@ -33,7 +33,7 @@
(Random /.Month)
(let [december (/.number {/.#December})]
(|> random.nat
- (at random.monad each (|>> (n.% december) ++))
+ (of random.monad each (|>> (n.% december) ++))
(random.one (|>> /.by_number try.maybe)))))
(def .public test
@@ -54,8 +54,8 @@
(,, (with_template [<before> <current> <after>]
[(_.coverage [<current>]
- (and (at /.equivalence = {<before>} (at /.enum pred {<current>}))
- (at /.equivalence = {<after>} (at /.enum succ {<current>}))))]
+ (and (of /.equivalence = {<before>} (of /.enum pred {<current>}))
+ (of /.equivalence = {<after>} (of /.enum succ {<current>}))))]
[/.#December /.#January /.#February]
[/.#January /.#February /.#March]
@@ -80,7 +80,7 @@
(|> expected
/.number
/.by_number
- (try#each (at /.equivalence = expected))
+ (try#each (of /.equivalence = expected))
(try.else false)))
(_.coverage [/.invalid_month]
(when (/.by_number invalid)
@@ -111,7 +111,7 @@
(do random.monad
[not_a_month (random.upper_cased 1)]
(_.coverage [/.not_a_month_of_the_year]
- (when (at /.codec decoded not_a_month)
+ (when (of /.codec decoded not_a_month)
{try.#Failure error}
(exception.match? /.not_a_month_of_the_year error)
diff --git a/stdlib/source/test/lux/world/time/series.lux b/stdlib/source/test/lux/world/time/series.lux
new file mode 100644
index 000000000..806241c2b
--- /dev/null
+++ b/stdlib/source/test/lux/world/time/series.lux
@@ -0,0 +1,152 @@
+(.require
+ [library
+ [lux (.except)
+ [abstract
+ [monad (.only do)]
+ [\\specification
+ ["[0]S" equivalence]
+ ["[0]S" mix]
+ ["[0]S" functor (.only Injection)]]]
+ [control
+ ["|" pipe]
+ ["[0]" try (.use "[1]#[0]" functor)]
+ ["[0]" exception]]
+ [data
+ ["[0]" product]
+ [collection
+ ["[0]" list (.use "[1]#[0]" functor mix)]
+ ["[0]" set]]]
+ [math
+ ["[0]" random (.only Random) (.use "[1]#[0]" functor)]
+ [number
+ ["n" nat]
+ ["i" int]]]
+ [world
+ [time
+ ["[0]" instant (.only Instant) (.use "[1]#[0]" order)]
+ ["[0]" duration]]]
+ [test
+ ["_" property (.only Test)]]]]
+ [\\library
+ ["[0]" /]])
+
+(def .public (event it)
+ (All (_ of)
+ (-> (Random of)
+ (Random (/.Event of))))
+ (do random.monad
+ [when random.instant
+ what it]
+ (in [/.#when when
+ /.#what what])))
+
+(def .public (random size it)
+ (All (_ of)
+ (-> Nat (Random of)
+ (Random (/.Series of))))
+ (|> it
+ (random.list size)
+ (random#each (|>> (list#mix (function (_ what [when events])
+ [(instant.before duration.milli_second when)
+ (list.partial [/.#when when
+ /.#what what]
+ events)])
+ [instant.latest (list)])
+ product.right))
+ (random.one (|>> /.series
+ try.maybe))))
+
+(def (injection when)
+ (-> Instant
+ (Injection /.Series))
+ (|>> [/.#when when
+ /.#what]
+ list
+ /.series
+ try.trusted))
+
+(def .public test
+ Test
+ (<| (_.covering /._)
+ (do [! random.monad]
+ [before (..event random.nat)
+ after (random.only (|>> (the /.#when)
+ (instant#= (the /.#when before))
+ not)
+ (..event random.nat))
+ .let [[before after] (if (instant#< (the /.#when after)
+ (the /.#when before))
+ [before after]
+ [after before])]
+
+ expected_instant random.instant
+ expected_size (of ! each (n.% 10) random.nat)
+ events (is (Random (List (/.Event Int)))
+ (|> random.int
+ (random.set i.hash expected_size)
+ (of ! each (|>> set.list
+ (list.sorted i.<)
+ (list#each (function (_ it)
+ [/.#when (instant.of_millis it)
+ /.#what it]))))))])
+ (all _.and
+ (<| (_.for [/.Event
+ /.#what /.#when])
+ (`` (all _.and
+ (,, (with_template [<event> <expected>]
+ [(_.coverage [<event>]
+ (|> (do try.monad
+ [it (/.series (list before after))
+ actual (<event> it)]
+ (in (same? <expected> actual)))
+ (try.else false)))]
+
+ [/.earliest before]
+ [/.latest after]
+ ))
+ )))
+ (<| (_.for [/.Series])
+ (`` (all _.and
+ (_.for [/.equivalence]
+ (equivalenceS.spec (/.equivalence n.equivalence) (..random expected_size random.nat)))
+ (_.for [/.mix]
+ (mixS.spec (..injection expected_instant) /.equivalence /.mix))
+ (_.for [/.functor]
+ (functorS.spec (..injection expected_instant) /.equivalence /.functor))
+
+ (_.coverage [/.series /.size]
+ (|> (do try.monad
+ [it (/.series events)]
+ (in (/.size it)))
+ (try#each (n.= expected_size))
+ (try.else false)))
+ (_.coverage [/.empty]
+ (and (,, (with_template [<event> <expected>]
+ [(|> (do try.monad
+ [it (/.series (list))]
+ (<event> it))
+ (|.when
+ {try.#Failure error}
+ (exception.match? /.empty error)
+
+ _
+ false))]
+
+ [/.earliest before]
+ [/.latest after]
+ ))))
+ (,, (with_template [<exception> <left> <right>]
+ [(_.coverage [<exception>]
+ (|> (/.series (list <left> <right>))
+ (|.when
+ {try.#Failure error}
+ (exception.match? <exception> error)
+
+ _
+ false)))]
+
+ [/.disordered after before]
+ [/.duplicated before before]
+ ))
+ )))
+ )))
diff --git a/stdlib/source/test/lux/world/time/year.lux b/stdlib/source/test/lux/world/time/year.lux
index ec4638abd..a635804ea 100644
--- a/stdlib/source/test/lux/world/time/year.lux
+++ b/stdlib/source/test/lux/world/time/year.lux
@@ -74,7 +74,7 @@
(n.= (.nat (//duration.ticks //duration.day //duration.normal_year))
/.days))
(_.coverage [/.epoch]
- (at /.equivalence =
+ (of /.equivalence =
(//date.year (//instant.date //instant.epoch))
/.epoch))
(_.for [/.Period]