aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/version/value.lux8
-rw-r--r--stdlib/source/test/aedifex/artifact/time/time.lux2
-rw-r--r--stdlib/source/test/aedifex/cache.lux14
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux10
-rw-r--r--stdlib/source/test/aedifex/command/build.lux8
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux2
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux14
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux24
-rw-r--r--stdlib/source/test/aedifex/command/install.lux8
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux2
-rw-r--r--stdlib/source/test/aedifex/command/test.lux8
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux10
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux82
-rw-r--r--stdlib/source/test/aedifex/input.lux6
-rw-r--r--stdlib/source/test/aedifex/local.lux2
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux6
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/package.lux18
-rw-r--r--stdlib/source/test/aedifex/parser.lux14
-rw-r--r--stdlib/source/test/aedifex/pom.lux6
-rw-r--r--stdlib/source/test/aedifex/profile.lux4
-rw-r--r--stdlib/source/test/aedifex/project.lux8
-rw-r--r--stdlib/source/test/aedifex/runtime.lux8
-rw-r--r--stdlib/source/test/lux.lux118
-rw-r--r--stdlib/source/test/lux/abstract/comonad.lux4
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux2
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux24
-rw-r--r--stdlib/source/test/lux/abstract/monad/free.lux2
-rw-r--r--stdlib/source/test/lux/control/concatenative.lux48
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux26
-rw-r--r--stdlib/source/test/lux/control/concurrency/async.lux18
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux34
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux24
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux4
-rw-r--r--stdlib/source/test/lux/control/continuation.lux2
-rw-r--r--stdlib/source/test/lux/control/function.lux4
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux6
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux12
-rw-r--r--stdlib/source/test/lux/control/function/mutual.lux8
-rw-r--r--stdlib/source/test/lux/control/parser.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/binary.lux4
-rw-r--r--stdlib/source/test/lux/control/parser/cli.lux2
-rw-r--r--stdlib/source/test/lux/control/parser/synthesis.lux4
-rw-r--r--stdlib/source/test/lux/control/parser/text.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/type.lux2
-rw-r--r--stdlib/source/test/lux/control/parser/xml.lux6
-rw-r--r--stdlib/source/test/lux/control/pipe.lux16
-rw-r--r--stdlib/source/test/lux/control/region.lux8
-rw-r--r--stdlib/source/test/lux/control/state.lux8
-rw-r--r--stdlib/source/test/lux/data/binary.lux20
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux22
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux28
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux54
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux4
-rw-r--r--stdlib/source/test/lux/data/color.lux6
-rw-r--r--stdlib/source/test/lux/data/color/named.lux14
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux22
-rw-r--r--stdlib/source/test/lux/data/product.lux8
-rw-r--r--stdlib/source/test/lux/data/sum.lux6
-rw-r--r--stdlib/source/test/lux/data/text.lux24
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux12
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux2
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux6
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux10
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux4
-rw-r--r--stdlib/source/test/lux/documentation.lux12
-rw-r--r--stdlib/source/test/lux/ffi.jvm.lux16
-rw-r--r--stdlib/source/test/lux/ffi.old.lux10
-rw-r--r--stdlib/source/test/lux/locale/language.lux10
-rw-r--r--stdlib/source/test/lux/locale/territory.lux10
-rw-r--r--stdlib/source/test/lux/macro/local.lux4
-rw-r--r--stdlib/source/test/lux/macro/syntax/check.lux4
-rw-r--r--stdlib/source/test/lux/macro/syntax/definition.lux4
-rw-r--r--stdlib/source/test/lux/math.lux4
-rw-r--r--stdlib/source/test/lux/math/logic/continuous.lux4
-rw-r--r--stdlib/source/test/lux/math/modulus.lux2
-rw-r--r--stdlib/source/test/lux/math/number/complex.lux40
-rw-r--r--stdlib/source/test/lux/math/number/i16.lux4
-rw-r--r--stdlib/source/test/lux/math/number/i32.lux4
-rw-r--r--stdlib/source/test/lux/math/number/i64.lux12
-rw-r--r--stdlib/source/test/lux/math/number/i8.lux4
-rw-r--r--stdlib/source/test/lux/math/number/int.lux2
-rw-r--r--stdlib/source/test/lux/math/number/nat.lux2
-rw-r--r--stdlib/source/test/lux/math/number/rev.lux2
-rw-r--r--stdlib/source/test/lux/meta.lux2
-rw-r--r--stdlib/source/test/lux/target/jvm.lux20
-rw-r--r--stdlib/source/test/lux/test.lux112
-rw-r--r--stdlib/source/test/lux/time/date.lux2
-rw-r--r--stdlib/source/test/lux/time/month.lux2
-rw-r--r--stdlib/source/test/lux/time/year.lux2
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux39
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux12
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux20
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux8
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux11
-rw-r--r--stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux50
-rw-r--r--stdlib/source/test/lux/type.lux31
-rw-r--r--stdlib/source/test/lux/type/abstract.lux2
-rw-r--r--stdlib/source/test/lux/type/check.lux38
-rw-r--r--stdlib/source/test/lux/type/implicit.lux4
-rw-r--r--stdlib/source/test/lux/type/refinement.lux6
-rw-r--r--stdlib/source/test/lux/world/file/watch.lux2
-rw-r--r--stdlib/source/test/lux/world/input/keyboard.lux18
-rw-r--r--stdlib/source/test/lux/world/net/http/client.lux2
-rw-r--r--stdlib/source/test/lux/world/net/http/status.lux14
-rw-r--r--stdlib/source/test/lux/world/program.lux2
118 files changed, 769 insertions, 762 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux
index ada815059..915d283da 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/version/value.lux
@@ -47,18 +47,18 @@
(do random.monad
[sample random
stamp $///stamp.random]
- (let [version (get@ #/.version sample)
+ (let [version (value@ #/.version sample)
local!
(text\= version
- (/.format (set@ #/.snapshot #///.Local sample)))
+ (/.format (with@ #/.snapshot #///.Local sample)))
remote_format (/.format {#/.version (format version /.snapshot)
#/.snapshot (#///.Remote stamp)})
remote!
- (and (text.starts_with? (format version (///time.format (get@ #///stamp.time stamp)))
+ (and (text.starts_with? (format version (///time.format (value@ #///stamp.time stamp)))
remote_format)
- (text.ends_with? (%.nat (get@ #///stamp.build stamp))
+ (text.ends_with? (%.nat (value@ #///stamp.build stamp))
remote_format))]
(_.cover [/.snapshot /.format]
(and local!
diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux
index 4dcdac3cc..1f5e4c6e7 100644
--- a/stdlib/source/test/aedifex/artifact/time/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time/time.lux
@@ -19,7 +19,7 @@
(def: .public random
(Random /.Time)
- (random.one (|>> time.clock (set@ #time.milli_second 0) time.time)
+ (random.one (|>> time.clock (with@ #time.milli_second 0) time.time)
random.time))
(def: .public test
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index 44641af70..91870d680 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -57,7 +57,7 @@
(try.maybe
(do try.monad
[pom (//pom.write profile)
- identity (try.of_maybe (get@ #//.identity profile))]
+ identity (try.of_maybe (value@ #//.identity profile))]
(in [identity profile pom]))))
@profile.random))
@@ -75,7 +75,7 @@
content ..content]
(in [{#//dependency.artifact identity
#//dependency.type type}
- (set@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))
+ (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))
(def: resolution
(Random Resolution)
@@ -88,14 +88,14 @@
(do !
[pom (random.one (function (_ [identity profile pom])
(|> profile
- (set@ #//.dependencies (set.empty //dependency.hash))
- (set@ #//.identity (#.Some (get@ #//dependency.artifact dependency)))
+ (with@ #//.dependencies (set.empty //dependency.hash))
+ (with@ #//.identity (#.Some (value@ #//dependency.artifact dependency)))
//pom.write
try.maybe))
..profile)
content ..content]
(in [dependency
- (set@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))))]
+ (with@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))))]
(in (dictionary.of_list //dependency.hash (list& [main_dependency main_package] dependencies)))))
(def: singular
@@ -116,7 +116,7 @@
[_ wrote!
actual_package read!]
(in (\ //package.equivalence =
- (set@ #//package.origin (#//repository/origin.Local "") expected_package)
+ (with@ #//package.origin (#//repository/origin.Local "") expected_package)
actual_package)))))))))
(def: plural
@@ -138,7 +138,7 @@
actual read!]
(in (\ //dependency/resolution.equivalence =
(\ dictionary.functor map
- (set@ #//package.origin (#//repository/origin.Local ""))
+ (with@ #//package.origin (#//repository/origin.Local ""))
expected)
actual)))))))))
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 41d0f080f..ea62b6daa 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -53,7 +53,7 @@
[@runs
(function (_ console program fs shell resolution profile)
(do {! async.monad}
- [[_ actual_runs] (async.future (atom.update! inc @runs))]
+ [[_ actual_runs] (async.future (atom.update! ++ @runs))]
(if (n.= expected_runs actual_runs)
(in (#try.Failure end_signal))
(do (try.with !)
@@ -77,14 +77,14 @@
.let [empty_profile (: Profile
(\ ///.monoid identity))
with_target (: (-> Profile Profile)
- (set@ #///.target target))
+ (with@ #///.target target))
with_program (: (-> Profile Profile)
- (set@ #///.program (#.Some program)))
+ (with@ #///.program (#.Some program)))
profile (|> empty_profile
with_program
with_target
- (set@ #///.sources (set.of_list text.hash (list source))))]
+ (with@ #///.sources (set.of_list text.hash (list source))))]
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
@@ -103,7 +103,7 @@
_ (\ watcher poll [])]
(do {! async.monad}
[no_dangling_process! (|> profile
- (set@ #///.compiler compiler)
+ (with@ #///.compiler compiler)
((/.do! 1 watcher command)
($version.echo "")
(program.async (program.mock environment.empty home working_directory))
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index 81f331e41..03625f0c1 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -151,9 +151,9 @@
.let [empty_profile (: Profile
(\ ///.monoid identity))
with_target (: (-> Profile Profile)
- (set@ #///.target target))
+ (with@ #///.target target))
with_program (: (-> Profile Profile)
- (set@ #///.program (#.Some program)))
+ (with@ #///.program (#.Some program)))
profile (|> empty_profile
with_program
@@ -185,7 +185,7 @@
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs shell resolution
- (set@ #///.compiler compiler profile))
+ (with@ #///.compiler compiler profile))
start (\ console read_line [])
end (\ console read_line [])]
(in (and (text\= /.start start)
@@ -207,7 +207,7 @@
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async (..bad_shell [])) resolution
- (set@ #///.compiler compiler profile))
+ (with@ #///.compiler compiler profile))
start (\ console read_line [])
end (\ console read_line [])]
(in (and (text\= /.start start)
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index fffef3033..30ef6eb6f 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -103,7 +103,7 @@
context_exists!/pre (..directory_exists? fs context)
target_exists!/pre (..assets_exist? fs target_path direct_files)
sub_exists!/pre (..assets_exist? fs sub_path sub_files)
- _ (/.do! console fs (set@ #///.target target_path dummy))
+ _ (/.do! console fs (with@ #///.target target_path dummy))
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)
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 4d11234bd..1df6a4180 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -55,7 +55,7 @@
(Async (Try Text)))
(do ///action.monad
[.let [console ($version.echo "")]
- _ ($install.make_sources! fs (get@ #///.sources profile))
+ _ ($install.make_sources! fs (value@ #///.sources profile))
_ (/.do! console repository fs artifact profile)]
(\ console read_line [])))
@@ -66,7 +66,7 @@
[[artifact expected_pom profile]
(random.one (function (_ profile)
(do maybe.monad
- [artifact (get@ #///.identity profile)
+ [artifact (value@ #///.identity profile)
expected_pom (try.maybe (///pom.write profile))]
(in [artifact expected_pom profile])))
$profile.random)
@@ -81,19 +81,19 @@
[verdict (do {! ///action.monad}
[logging (..execute! program repository fs artifact profile)
expected_library (|> profile
- (get@ #///.sources)
+ (value@ #///.sources)
set.list
(export.library fs)
(\ ! map (format.result tar.writer)))
- actual_pom (\ repository download (///repository/remote.uri (get@ #///artifact.version artifact) artifact ///artifact/extension.pom))
- actual_library (\ repository download (///repository/remote.uri (get@ #///artifact.version artifact) artifact ///artifact/extension.lux_library))
- actual_sha-1 (\ repository download (///repository/remote.uri (get@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
+ actual_pom (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.pom))
+ actual_library (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact ///artifact/extension.lux_library))
+ actual_sha-1 (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
actual_sha-1 (\ async.monad in
(do try.monad
[actual_sha-1 (\ utf8.codec decode actual_sha-1)]
(\ ///hash.sha-1_codec decode actual_sha-1)))
- actual_md5 (\ repository download (///repository/remote.uri (get@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
+ actual_md5 (\ repository download (///repository/remote.uri (value@ #///artifact.version artifact) artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
actual_md5 (\ async.monad in
(do try.monad
[actual_md5 (\ utf8.codec decode actual_md5)]
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 0c6676488..ec45ba697 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -73,25 +73,25 @@
#///dependency.type ///artifact/type.lux_library}
dependee_pom (|> (\ ///.monoid identity)
- (set@ #///.identity (#.Some dependee_artifact))
+ (with@ #///.identity (#.Some dependee_artifact))
///pom.write
try.trusted)
depender_pom (|> (\ ///.monoid identity)
- (set@ #///.identity (#.Some depender_artifact))
- (set@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
+ (with@ #///.identity (#.Some depender_artifact))
+ (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
dependee_package (|> dependee_package
- (set@ #///package.origin (#///repository/origin.Remote ""))
- (set@ #///package.pom [dependee_pom
- (|> dependee_pom (\ xml.codec encode) (\ utf8.codec encode))
- #///dependency/status.Unverified]))
+ (with@ #///package.origin (#///repository/origin.Remote ""))
+ (with@ #///package.pom [dependee_pom
+ (|> dependee_pom (\ xml.codec encode) (\ utf8.codec encode))
+ #///dependency/status.Unverified]))
depender_package (|> depender_package
- (set@ #///package.origin (#///repository/origin.Remote ""))
- (set@ #///package.pom [depender_pom
- (|> depender_pom (\ xml.codec encode) (\ utf8.codec encode))
- #///dependency/status.Unverified]))
+ (with@ #///package.origin (#///repository/origin.Remote ""))
+ (with@ #///package.pom [depender_pom
+ (|> depender_pom (\ xml.codec encode) (\ utf8.codec encode))
+ #///dependency/status.Unverified]))
fs (file.mock (\ file.default separator))
program (program.async (program.mock environment.empty home working_directory))]]
@@ -103,7 +103,7 @@
(dictionary.has dependee dependee_package)
(///dependency/deployment.all local))
post (|> (\ ///.monoid identity)
- (set@ #///.dependencies (set.of_list ///dependency.hash (list dependee depender)))
+ (with@ #///.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 86fe5ebea..f1c0c2de1 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -56,7 +56,7 @@
(-> (Program Async) (file.System Async) ///.Profile (Async (Try Text)))
(do ///action.monad
[.let [console ($version.echo "")]
- _ (..make_sources! fs (get@ #///.sources sample))
+ _ (..make_sources! fs (value@ #///.sources sample))
_ (/.do! console fs (///repository/local.repository program fs) sample)]
(\ console read_line [])))
@@ -65,7 +65,7 @@
(<| (_.covering /._)
(do {! random.monad}
[identity $artifact.random
- sample (\ ! map (set@ #///.identity (#.Some identity))
+ sample (\ ! map (with@ #///.identity (#.Some identity))
$profile.random)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
@@ -75,7 +75,7 @@
[.let [fs (file.mock /)
program (program.async (program.mock environment.empty home working_directory))
- artifact_path (///local.uri (get@ #///artifact.version identity) identity)
+ artifact_path (///local.uri (value@ #///artifact.version identity) identity)
library_path (format artifact_path ///artifact/extension.lux_library)
pom_path (format artifact_path ///artifact/extension.pom)]
verdict (do {! ///action.monad}
@@ -97,7 +97,7 @@
(in (do {! async.monad}
[.let [fs (file.mock /)
program (program.async (program.mock environment.empty home working_directory))]
- logging (..execute! program fs (set@ #///.identity #.None sample))]
+ logging (..execute! program fs (with@ #///.identity #.None sample))]
(_.cover' [/.failure]
(|> logging
(try\map (text\= /.failure))
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index 9577842c1..b06a7c944 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -62,7 +62,7 @@
(#try.Failure error)
(_.cover' [/.do!]
- (case (get@ #///.identity sample)
+ (case (value@ #///.identity sample)
(#.Some _)
false
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index f2117fad4..3e3cf85d7 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -50,9 +50,9 @@
.let [empty_profile (: Profile
(\ ///.monoid identity))
with_target (: (-> Profile Profile)
- (set@ #///.target target))
+ (with@ #///.target target))
with_test (: (-> Profile Profile)
- (set@ #///.test (#.Some test)))
+ (with@ #///.test (#.Some test)))
profile (|> empty_profile
with_test
@@ -65,7 +65,7 @@
[verdict (do ///action.monad
[_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async (@build.good_shell [])) resolution
- (set@ #///.compiler compiler profile))
+ (with@ #///.compiler compiler profile))
build_start (\ console read_line [])
build_end (\ console read_line [])
test_start (\ console read_line [])
@@ -101,7 +101,7 @@
[])]
_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async bad_shell) resolution
- (set@ #///.compiler compiler profile))
+ (with@ #///.compiler compiler profile))
build_start (\ console read_line [])
build_end (\ console read_line [])
test_start (\ console read_line [])
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index ae97a70ca..009298783 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -79,20 +79,20 @@
(-> Nat URL Package (Dictionary URL Binary) Artifact Artifact Bit)
(let [url (: (-> URI URL)
(|>> (format address)))
- library_url (url (format (artifact.uri (get@ #artifact.version expected_artifact)
+ library_url (url (format (artifact.uri (value@ #artifact.version expected_artifact)
expected_artifact)
artifact/extension.lux_library))
- pom_url (url (format (artifact.uri (get@ #artifact.version expected_artifact)
+ pom_url (url (format (artifact.uri (value@ #artifact.version expected_artifact)
expected_artifact)
artifact/extension.pom))
artifact_metadata_url (url (metadata.remote_artifact_uri expected_artifact))
project_metadata_url (url (metadata.remote_project_uri expected_artifact))
expected_library (|> package
- (get@ #package.library)
+ (value@ #package.library)
product.left)
expected_pom (|> package
- (get@ #package.pom)
+ (value@ #package.pom)
product.right
product.left)
@@ -136,7 +136,7 @@
(do random.monad
[[profile package] $///package.random
.let [artifact (|> profile
- (get@ #profile.identity)
+ (value@ #profile.identity)
maybe.trusted)
dependency (: Dependency
[artifact
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index c7f7d6d40..44420243d 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -98,7 +98,7 @@
(def: .public (single artifact package)
(-> Artifact Package (Mock Any))
- (let [expected (///artifact.uri (get@ #///artifact.version artifact) artifact)]
+ (let [expected (///artifact.uri (value@ #///artifact.version artifact) artifact)]
(implementation
(def: the_description
"[1]")
@@ -106,11 +106,11 @@
(if (text.contains? expected uri)
(let [library (: Binary
(|> package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left))
pom (: Binary
(|> package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode)))]
@@ -144,34 +144,34 @@
(def: the_description
"[~SHA-1]")
(def: (on_download uri state)
- (if (text.contains? (///artifact.uri (get@ #///artifact.version expected_artifact) expected_artifact) uri)
+ (if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
(#try.Success [state (|> expected_package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left)])
(text.ends_with? ..lux_sha-1 uri)
(#try.Success [state (|> expected_package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left
..sha-1)])
(text.ends_with? ..lux_md5 uri)
(#try.Success [state (|> expected_package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left
..md5)])
(text.ends_with? ///artifact/extension.pom uri)
(#try.Success [state (|> expected_package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode))])
(text.ends_with? ..pom_sha-1 uri)
(#try.Success [state (|> dummy_package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode)
@@ -179,7 +179,7 @@
(text.ends_with? ..pom_md5 uri)
(#try.Success [state (|> expected_package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode)
@@ -197,34 +197,34 @@
(def: the_description
"[~MD5]")
(def: (on_download uri state)
- (if (text.contains? (///artifact.uri (get@ #///artifact.version expected_artifact) expected_artifact) uri)
+ (if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
(#try.Success [state (|> expected_package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left)])
(text.ends_with? ..lux_sha-1 uri)
(#try.Success [state (|> expected_package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left
..sha-1)])
(text.ends_with? ..lux_md5 uri)
(#try.Success [state (|> dummy_package
- (get@ #///package.library)
+ (value@ #///package.library)
product.left
..md5)])
(text.ends_with? ///artifact/extension.pom uri)
(#try.Success [state (|> expected_package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode))])
(text.ends_with? ..pom_sha-1 uri)
(#try.Success [state (|> expected_package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode)
@@ -232,7 +232,7 @@
(text.ends_with? ..pom_md5 uri)
(#try.Success [state (|> dummy_package
- (get@ #///package.pom)
+ (value@ #///package.pom)
product.left
(\ xml.codec encode)
(\ utf8.codec encode)
@@ -250,7 +250,7 @@
[expected_artifact $///artifact.random
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
- (set@ #///package.pom (get@ #///package.pom expected_package))
+ (with@ #///package.pom (value@ #///package.pom expected_package))
(\ ///package.equivalence = expected_package)
not)
$///package.random)
@@ -266,7 +266,7 @@
(case actual_package
(#try.Success actual_package)
(\ ///package.equivalence =
- (set@ #///package.origin (#///repository/origin.Remote "") expected_package)
+ (with@ #///package.origin (#///repository/origin.Remote "") expected_package)
actual_package)
(#try.Failure _)
@@ -295,7 +295,7 @@
[expected_artifact $///artifact.random
[_ expected_package] $///package.random
[_ dummy_package] (random.only (|>> product.right
- (set@ #///package.pom (get@ #///package.pom expected_package))
+ (with@ #///package.pom (value@ #///package.pom expected_package))
(\ ///package.equivalence = expected_package)
not)
$///package.random)
@@ -315,7 +315,7 @@
(case actual_package
(#try.Success actual_package)
(\ ///package.equivalence =
- (set@ #///package.origin (#///repository/origin.Remote "") expected_package)
+ (with@ #///package.origin (#///repository/origin.Remote "") expected_package)
actual_package)
(#try.Failure _)
@@ -344,8 +344,8 @@
(\ ///artifact.equivalence = dependee_artifact))
$///artifact.random)
ignored_artifact (random.only (predicate.complement
- (predicate.unite (\ ///artifact.equivalence = dependee_artifact)
- (\ ///artifact.equivalence = depender_artifact)))
+ (predicate.and (\ ///artifact.equivalence = dependee_artifact)
+ (\ ///artifact.equivalence = depender_artifact)))
$///artifact.random)]
(in [dependee_artifact depender_artifact ignored_artifact])))
@@ -366,34 +366,34 @@
#///dependency.type ///artifact/type.lux_library}
dependee_pom (|> (\ ///.monoid identity)
- (set@ #///.identity (#.Some dependee_artifact))
+ (with@ #///.identity (#.Some dependee_artifact))
///pom.write
try.trusted)
depender_pom (|> (\ ///.monoid identity)
- (set@ #///.identity (#.Some depender_artifact))
- (set@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
+ (with@ #///.identity (#.Some depender_artifact))
+ (with@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
ignored_pom (|> (\ ///.monoid identity)
- (set@ #///.identity (#.Some ignored_artifact))
+ (with@ #///.identity (#.Some ignored_artifact))
///pom.write
try.trusted)
- dependee_package (set@ #///package.pom
- [dependee_pom
- (|> dependee_pom (\ xml.codec encode) (\ utf8.codec encode))
+ dependee_package (with@ #///package.pom
+ [dependee_pom
+ (|> dependee_pom (\ xml.codec encode) (\ utf8.codec encode))
+ #///dependency/status.Unverified]
+ dependee_package)
+ depender_package (with@ #///package.pom
+ [depender_pom
+ (|> depender_pom (\ xml.codec encode) (\ utf8.codec encode))
+ #///dependency/status.Unverified]
+ depender_package)
+ ignored_package (with@ #///package.pom
+ [ignored_pom
+ (|> ignored_pom (\ xml.codec encode) (\ utf8.codec encode))
#///dependency/status.Unverified]
- dependee_package)
- depender_package (set@ #///package.pom
- [depender_pom
- (|> depender_pom (\ xml.codec encode) (\ utf8.codec encode))
- #///dependency/status.Unverified]
- depender_package)
- ignored_package (set@ #///package.pom
- [ignored_pom
- (|> ignored_pom (\ xml.codec encode) (\ utf8.codec encode))
- #///dependency/status.Unverified]
- ignored_package)]]
+ ignored_package)]]
(in [[dependee depender ignored]
[dependee_package depender_package ignored_package]])))
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index 086551be0..1c47fdd6f 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -45,7 +45,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [expected (\ ! map (set@ #//.parents (list)) $profile.random)
+ [expected (\ ! map (with@ #//.parents (list)) $profile.random)
.let [fs (: (file.System Async)
(file.mock (\ file.default separator)))]]
(in (do async.monad
@@ -59,8 +59,8 @@
(/.read async.monad fs //.default))]
(in (\ //.equivalence =
(|> expected
- (update@ #//.sources ..with_default_source)
- (update@ #//.repositories ..with_default_repository))
+ (revised@ #//.sources ..with_default_source)
+ (revised@ #//.repositories ..with_default_repository))
actual)))]
(_.cover' [/.read]
(try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/local.lux b/stdlib/source/test/aedifex/local.lux
index a797f2a97..a8c0702bb 100644
--- a/stdlib/source/test/aedifex/local.lux
+++ b/stdlib/source/test/aedifex/local.lux
@@ -23,5 +23,5 @@
($_ _.and
(_.cover [/.repository /.uri]
(text.starts_with? /.repository
- (/.uri (get@ #//artifact.version sample) sample)))
+ (/.uri (value@ #//artifact.version sample) sample)))
))))
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 46ebf4eae..85aafa550 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -72,10 +72,10 @@
(_.for [/.Metadata])
(do random.monad
[expected ..random
- .let [artifact {#///artifact.group (get@ #/.group expected)
- #///artifact.name (get@ #/.name expected)
+ .let [artifact {#///artifact.group (value@ #/.group expected)
+ #///artifact.name (value@ #/.name expected)
#///artifact.version (|> expected
- (get@ #/.versions)
+ (value@ #/.versions)
list.head
(maybe.else ""))}]]
($_ _.and
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index d5dc8595e..2c74296e0 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -91,7 +91,7 @@
(_.for [/.Metadata])
(do random.monad
[expected ..random
- .let [artifact (get@ #/.artifact expected)]]
+ .let [artifact (value@ #/.artifact expected)]]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index e05c1d753..9596eb63f 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -64,18 +64,18 @@
($equivalence.spec /.equivalence (\ ! map product.right ..random)))
(_.cover [/.local?]
- (/.local? (set@ #/.origin (#//origin.Local "~/yolo") package)))
+ (/.local? (with@ #/.origin (#//origin.Local "~/yolo") package)))
(_.cover [/.remote?]
- (/.remote? (set@ #/.origin (#//origin.Remote "https://example.com") package)))
+ (/.remote? (with@ #/.origin (#//origin.Remote "https://example.com") package)))
(_.cover [/.local]
- (let [expected_pom (|> package (get@ #/.pom) product.left)
- expected_library (|> package (get@ #/.library) product.left)
+ (let [expected_pom (|> package (value@ #/.pom) product.left)
+ expected_library (|> package (value@ #/.library) product.left)
local (/.local expected_pom expected_library)
- [actual_pom binary_pom pom_status] (get@ #/.pom local)
- [actual_library library_status] (get@ #/.library local)]
- (and (case (get@ #/.origin local)
+ [actual_pom binary_pom pom_status] (value@ #/.pom local)
+ [actual_library library_status] (value@ #/.library local)]
+ (and (case (value@ #/.origin local)
(#//origin.Local "") true
_ false)
(let [expected_sha1 (//hash.sha-1 expected_library)
@@ -104,7 +104,7 @@
_
false))))))
(_.cover [/.dependencies]
- (let [expected (get@ #//.dependencies profile)]
+ (let [expected (value@ #//.dependencies profile)]
(case (/.dependencies package)
(#try.Success actual)
(\ set.equivalence = expected actual)
@@ -112,7 +112,7 @@
(#try.Failure error)
false)))
(_.cover [/.repositories]
- (let [expected (get@ #//.repositories profile)]
+ (let [expected (value@ #//.repositories profile)]
(case (/.repositories package)
(#try.Success actual)
(\ set.equivalence = expected actual)
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index 152123d55..6f1516258 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -55,16 +55,16 @@
(def: with_default_sources
(-> //.Profile //.Profile)
- (update@ #//.sources
- (: (-> (Set //.Source) (Set //.Source))
- (function (_ sources)
- (if (set.empty? sources)
- (set.of_list text.hash (list //.default_source))
- sources)))))
+ (revised@ #//.sources
+ (: (-> (Set //.Source) (Set //.Source))
+ (function (_ sources)
+ (if (set.empty? sources)
+ (set.of_list text.hash (list //.default_source))
+ sources)))))
(def: with_default_repository
(-> //.Profile //.Profile)
- (update@ #//.repositories (set.has //.default_repository)))
+ (revised@ #//.repositories (set.has //.default_repository)))
(def: single_profile
Test
diff --git a/stdlib/source/test/aedifex/pom.lux b/stdlib/source/test/aedifex/pom.lux
index f51ac9abc..e413b69ed 100644
--- a/stdlib/source/test/aedifex/pom.lux
+++ b/stdlib/source/test/aedifex/pom.lux
@@ -34,15 +34,15 @@
[expected @profile.random]
(_.cover [/.write /.parser]
(case [(/.write expected)
- (get@ #//.identity expected)]
+ (value@ #//.identity expected)]
[(#try.Success pom)
(#.Some _)]
(case (<xml>.result /.parser (list pom))
(#try.Success actual)
(\ //.equivalence =
(|> (\ //.monoid identity)
- (set@ #//.dependencies (get@ #//.dependencies expected))
- (set@ #//.repositories (get@ #//.repositories expected)))
+ (with@ #//.dependencies (value@ #//.dependencies expected))
+ (with@ #//.repositories (value@ #//.repositories expected)))
actual)
(#try.Failure error)
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index b1ec22e6c..4cb58d0d0 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -154,10 +154,10 @@
(text\= "" /.default))
(_.cover [/.default_compiler]
(|> (\ /.monoid identity)
- (get@ #/.compiler)
+ (value@ #/.compiler)
(same? /.default_compiler)))
(_.cover [/.default_target]
(|> (\ /.monoid identity)
- (get@ #/.target)
+ (value@ #/.target)
(same? /.default_target)))
)))))
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index 3d027eec7..291935293 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -27,7 +27,7 @@
(def: profile
(Random [//.Name //.Profile])
(|> @profile.random
- (random\map (set@ #//.parents (list)))
+ (random\map (with@ #//.parents (list)))
(random.and (random.ascii/alpha 1))))
(def: .public random
@@ -66,11 +66,11 @@
.let [project ($_ (\ /.monoid compose)
(/.project super_name super_profile)
(/.project dummy_name dummy_profile)
- (/.project sub_name (set@ #//.parents (list super_name) sub_profile)))
+ (/.project sub_name (with@ #//.parents (list super_name) sub_profile)))
circular ($_ (\ /.monoid compose)
- (/.project super_name (set@ #//.parents (list sub_name) super_profile))
+ (/.project super_name (with@ #//.parents (list sub_name) super_profile))
(/.project dummy_name dummy_profile)
- (/.project sub_name (set@ #//.parents (list super_name) sub_profile)))]]
+ (/.project sub_name (with@ #//.parents (list super_name) sub_profile)))]]
($_ _.and
(_.cover [/.profile]
(and (|> (/.profile super_name project)
diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux
index c9e61b017..782b20204 100644
--- a/stdlib/source/test/aedifex/runtime.lux
+++ b/stdlib/source/test/aedifex/runtime.lux
@@ -44,7 +44,7 @@
(~~ (template [<command>]
[(_.cover [/.default_java /.default_js /.default_python /.default_lua /.default_ruby]
(let [listing (|> (list /.default_java /.default_js /.default_python /.default_lua /.default_ruby)
- (list\map (get@ #/.program)))
+ (list\map (value@ #/.program)))
unique (set.of_list text.hash listing)]
(n.= (list.size listing)
(set.size unique))))]
@@ -57,10 +57,10 @@
))
(_.cover [/.for]
(let [runtime' (/.for runtime path)]
- (and (text\= (get@ #/.program runtime)
- (get@ #/.program runtime'))
+ (and (text\= (value@ #/.program runtime)
+ (value@ #/.program runtime'))
(|> runtime'
- (get@ #/.parameters)
+ (value@ #/.parameters)
list.last
(maybe\map (text\= path))
(maybe.else false)))))
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index a0e00fdd4..6eab1c60b 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -280,20 +280,20 @@
(do random.monad
[start random.nat
factor random.nat
- .let [expected (n.* factor (inc start))]]
+ .let [expected (n.* factor (++ start))]]
($_ _.and
(_.cover [/.|>]
(n.= expected
- (/.|> start inc (n.* factor))))
+ (/.|> start ++ (n.* factor))))
(_.cover [/.|>>]
(n.= expected
- ((/.|>> inc (n.* factor)) start)))
+ ((/.|>> ++ (n.* factor)) start)))
(_.cover [/.<|]
(n.= expected
- (/.<| (n.* factor) inc start)))
+ (/.<| (n.* factor) ++ start)))
(_.cover [/.<<|]
(n.= expected
- ((/.<<| (n.* factor) inc) start)))
+ ((/.<<| (n.* factor) ++) start)))
)))
(def: example_identifier "YOLO")
@@ -421,7 +421,7 @@
))
(_.cover [/.Ann]
(|> example
- (get@ #/.meta)
+ (value@ #/.meta)
(location\= location.dummy)))
)))
@@ -432,7 +432,7 @@
"This is an arbitrary text whose only purpose is to be found, somewhere, in the source-code.")
(/.macro: (found_crosshair? tokens lux)
- (let [[_ _ source_code] (get@ #.source lux)]
+ (let [[_ _ source_code] (value@ #.source lux)]
(#.Right [lux (list (code.bit (text.contains? ..crosshair source_code)))])))
(def: for_macro
@@ -572,11 +572,11 @@
(_.cover [/.rev]
(same? (: Any expected)
(: Any (/.rev expected))))
- (_.cover [/.inc]
+ (_.cover [/.++]
(n.= 1 (n.- expected
- (/.inc expected))))
- (_.cover [/.dec]
- (n.= 1 (n.- (/.dec expected)
+ (/.++ expected))))
+ (_.cover [/.--]
+ (n.= 1 (n.- (/.-- expected)
expected)))
)))
@@ -588,13 +588,13 @@
(_.cover [/.-> /.function]
(and (let [actual (: (/.-> Nat Nat Nat)
(/.function (_ actual_left actual_right)
- (n.* (inc actual_left) (dec actual_right))))]
- (n.= (n.* (inc expected_left) (dec expected_right))
+ (n.* (++ actual_left) (-- actual_right))))]
+ (n.= (n.* (++ expected_left) (-- expected_right))
(actual expected_left expected_right)))
(let [actual (: (/.-> [Nat Nat] Nat)
(/.function (_ [actual_left actual_right])
- (n.* (inc actual_left) (dec actual_right))))]
- (n.= (n.* (inc expected_left) (dec expected_right))
+ (n.* (++ actual_left) (-- actual_right))))]
+ (n.= (n.* (++ expected_left) (-- expected_right))
(actual [expected_left expected_right])))))))
(/.template: (!n/+ <left> <right>)
@@ -673,72 +673,72 @@
#big_right {#small_left start/s
#small_right text}}]]
($_ _.and
- (_.cover [/.get@]
+ (_.cover [/.value@]
(and (and (|> sample
- (/.get@ #big_left)
+ (/.value@ #big_left)
(same? start/b))
(|> sample
- ((/.get@ #big_left))
+ ((/.value@ #big_left))
(same? start/b)))
(and (|> sample
- (/.get@ [#big_right #small_left])
+ (/.value@ [#big_right #small_left])
(same? start/s))
(|> sample
- ((/.get@ [#big_right #small_left]))
+ ((/.value@ [#big_right #small_left]))
(same? start/s)))))
- (_.cover [/.set@]
+ (_.cover [/.with@]
(and (and (|> sample
- (/.set@ #big_left shift/b)
- (/.get@ #big_left)
+ (/.with@ #big_left shift/b)
+ (/.value@ #big_left)
(same? shift/b))
(|> sample
- ((/.set@ #big_left shift/b))
- (/.get@ #big_left)
+ ((/.with@ #big_left shift/b))
+ (/.value@ #big_left)
(same? shift/b))
(|> sample
- ((/.set@ #big_left) shift/b)
- (/.get@ #big_left)
+ ((/.with@ #big_left) shift/b)
+ (/.value@ #big_left)
(same? shift/b)))
(and (|> sample
- (/.set@ [#big_right #small_left] shift/s)
- (/.get@ [#big_right #small_left])
+ (/.with@ [#big_right #small_left] shift/s)
+ (/.value@ [#big_right #small_left])
(same? shift/s))
(|> sample
- ((/.set@ [#big_right #small_left] shift/s))
- (/.get@ [#big_right #small_left])
+ ((/.with@ [#big_right #small_left] shift/s))
+ (/.value@ [#big_right #small_left])
(same? shift/s))
(|> sample
- ((/.set@ [#big_right #small_left]) shift/s)
- (/.get@ [#big_right #small_left])
+ ((/.with@ [#big_right #small_left]) shift/s)
+ (/.value@ [#big_right #small_left])
(same? shift/s)))))
- (_.cover [/.update@]
+ (_.cover [/.revised@]
(and (and (|> sample
- (/.update@ #big_left (n.+ shift/b))
- (/.get@ #big_left)
+ (/.revised@ #big_left (n.+ shift/b))
+ (/.value@ #big_left)
(n.= expected/b))
(|> sample
- ((/.update@ #big_left (n.+ shift/b)))
- (/.get@ #big_left)
+ ((/.revised@ #big_left (n.+ shift/b)))
+ (/.value@ #big_left)
(n.= expected/b))
(|> sample
((: (-> (-> Nat Nat) (-> Big Big))
- (/.update@ #big_left))
+ (/.revised@ #big_left))
(n.+ shift/b))
- (/.get@ #big_left)
+ (/.value@ #big_left)
(n.= expected/b)))
(and (|> sample
- (/.update@ [#big_right #small_left] (n.+ shift/s))
- (/.get@ [#big_right #small_left])
+ (/.revised@ [#big_right #small_left] (n.+ shift/s))
+ (/.value@ [#big_right #small_left])
(n.= expected/s))
(|> sample
- ((/.update@ [#big_right #small_left] (n.+ shift/s)))
- (/.get@ [#big_right #small_left])
+ ((/.revised@ [#big_right #small_left] (n.+ shift/s)))
+ (/.value@ [#big_right #small_left])
(n.= expected/s))
(|> sample
((: (-> (-> Nat Nat) (-> Big Big))
- (/.update@ [#big_right #small_left]))
+ (/.revised@ [#big_right #small_left]))
(n.+ shift/s))
- (/.get@ [#big_right #small_left])
+ (/.value@ [#big_right #small_left])
(n.= expected/s)))))
)))
@@ -862,7 +862,7 @@
(hide left))
true)))
(_.cover [/.same?]
- (let [not_left (|> left inc dec)]
+ (let [not_left (|> left ++ --)]
(and (/.same? left left)
(and (n.= not_left left)
(not (/.same? not_left left))))))
@@ -1009,7 +1009,7 @@
(/.loop [counter 0
value 0]
(if (n.< iterations counter)
- (recur (inc counter) (n.+ factor value))
+ (recur (++ counter) (n.+ factor value))
value)))))
(do random.monad
[pre random.nat
@@ -1051,13 +1051,13 @@
(syntax: (for_meta|Info [])
(function (_ lux)
- (let [info (get@ #.info lux)
+ (let [info (value@ #.info lux)
conforming_target!
- (set.member? ..possible_targets (get@ #.target info))
+ (set.member? ..possible_targets (value@ #.target info))
compiling!
- (case (get@ #.mode info)
+ (case (value@ #.mode info)
#.Build true
_ false)]
(#.Right [lux (list (code.bit (and conforming_target!
@@ -1066,7 +1066,7 @@
(syntax: (for_meta|Module_State [])
(do meta.monad
[prelude_module (meta.module .prelude_module)]
- (in (list (code.bit (case (get@ #.module_state prelude_module)
+ (in (list (code.bit (case (value@ #.module_state prelude_module)
#.Active false
_ true))))))
@@ -1103,22 +1103,22 @@
let/2 <code>.local_identifier
let/3 <code>.local_identifier])
- (in (list (code.bit (case (get@ #.scopes *lux*)
+ (in (list (code.bit (case (value@ #.scopes *lux*)
(^ (list& scope/2 _))
- (let [locals/2 (get@ #.locals scope/2)
+ (let [locals/2 (value@ #.locals scope/2)
expected_locals/2 (set.of_list text.hash (list fn/2 var/2 let/2
let/3))
actual_locals/2 (|> locals/2
- (get@ #.mappings)
+ (value@ #.mappings)
(list\map product.left)
(set.of_list text.hash))
correct_locals!
- (and (n.= 4 (get@ #.counter locals/2))
+ (and (n.= 4 (value@ #.counter locals/2))
(set\= expected_locals/2
actual_locals/2))
- captured/2 (get@ #.captured scope/2)
+ captured/2 (value@ #.captured scope/2)
local? (: (-> Ref Bit)
(function (_ ref)
@@ -1130,13 +1130,13 @@
binding? (: (-> (-> Ref Bit) Text Bit)
(function (_ is? name)
(|> captured/2
- (get@ #.mappings)
+ (value@ #.mappings)
(plist.value name)
(maybe\map (|>> product.right is?))
(maybe.else false))))
correct_closure!
- (and (n.= 6 (get@ #.counter captured/2))
+ (and (n.= 6 (value@ #.counter captured/2))
(binding? local? fn/1)
(binding? local? var/1)
(binding? local? let/1)
diff --git a/stdlib/source/test/lux/abstract/comonad.lux b/stdlib/source/test/lux/abstract/comonad.lux
index 431272d9f..05067e786 100644
--- a/stdlib/source/test/lux/abstract/comonad.lux
+++ b/stdlib/source/test/lux/abstract/comonad.lux
@@ -20,9 +20,9 @@
(<| (_.covering /._)
($_ _.and
(_.cover [/.be]
- (n.= (inc sample)
+ (n.= (++ sample)
(: (Identity Nat)
(/.be identity.comonad
[value (out sample)]
- (out (inc value))))))
+ (out (++ value))))))
))))
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index 88d4cc732..179dad8df 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -31,7 +31,7 @@
(<| (_.covering /._)
($_ _.and
(_.cover [/.range]
- (let [expected_size (|> end (n.- start) inc)
+ (let [expected_size (|> end (n.- start) ++)
expected_start? (|> range list.head (maybe\map (n.= start)) (maybe.else false))
expected_end? (|> range list.last (maybe\map (n.= end)) (maybe.else false))
can_be_backwards? (\ (list.equivalence n.equivalence) =
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index 0fc605a0c..051f63a5c 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -21,30 +21,30 @@
(<| (_.covering /._)
($_ _.and
(_.cover [/.do]
- (n.= (inc mono)
+ (n.= (++ mono)
(: (Identity Nat)
(/.do identity.monad
[sample (in mono)]
- (in (inc sample))))))
- (_.cover [/.bind]
- (n.= (inc mono)
+ (in (++ sample))))))
+ (_.cover [/.then]
+ (n.= (++ mono)
(: (Identity Nat)
- (/.bind identity.monad
- (|>> inc (\ identity.monad in))
+ (/.then identity.monad
+ (|>> ++ (\ identity.monad in))
(\ identity.monad in mono)))))
- (_.cover [/.seq]
+ (_.cover [/.all]
(\ (list.equivalence n.equivalence) =
- (list\map inc poly)
+ (list\map ++ poly)
(|> poly
- (list\map (|>> inc (\ identity.monad in)))
+ (list\map (|>> ++ (\ identity.monad in)))
(: (List (Identity Nat)))
- (/.seq identity.monad)
+ (/.all identity.monad)
(: (Identity (List Nat))))))
(_.cover [/.map]
(\ (list.equivalence n.equivalence) =
- (list\map inc poly)
+ (list\map ++ poly)
(|> poly
- (/.map identity.monad (|>> inc (\ identity.monad in)))
+ (/.map identity.monad (|>> ++ (\ identity.monad in)))
(: (Identity (List Nat))))))
(_.cover [/.only]
(\ (list.equivalence n.equivalence) =
diff --git a/stdlib/source/test/lux/abstract/monad/free.lux b/stdlib/source/test/lux/abstract/monad/free.lux
index b583f4a8e..523741df6 100644
--- a/stdlib/source/test/lux/abstract/monad/free.lux
+++ b/stdlib/source/test/lux/abstract/monad/free.lux
@@ -31,7 +31,7 @@
(#/.Effect effect)
(|> effect
(list\map interpret)
- list.joined)))
+ list.together)))
(def: comparison
(Comparison (/.Free List))
diff --git a/stdlib/source/test/lux/control/concatenative.lux b/stdlib/source/test/lux/control/concatenative.lux
index deb5601a7..97b7a48f6 100644
--- a/stdlib/source/test/lux/control/concatenative.lux
+++ b/stdlib/source/test/lux/control/concatenative.lux
@@ -76,18 +76,18 @@
[/.||L #.Left]
[/.||R #.Right]))
(_.cover [/.dip]
- (n.= (inc sample)
+ (n.= (++ sample)
(||> (/.push sample)
(/.push dummy)
- (/.push (/.apply/1 inc))
+ (/.push (/.apply/1 ++))
/.dip
/.drop)))
(_.cover [/.dip/2]
- (n.= (inc sample)
+ (n.= (++ sample)
(||> (/.push sample)
(/.push dummy)
(/.push dummy)
- (/.push (/.apply/1 inc))
+ (/.push (/.apply/1 ++))
/.dip/2
/.drop /.drop)))
))))
@@ -142,13 +142,13 @@
sample random.nat
start random.nat
.let [distance 10
- |inc| (/.apply/1 inc)
+ |++| (/.apply/1 ++)
|test| (/.apply/1 (|>> (n.- start) (n.< distance)))]]
($_ _.and
(_.cover [/.call /.apply/1]
- (n.= (inc sample)
+ (n.= (++ sample)
(||> (/.push sample)
- (/.push (/.apply/1 inc))
+ (/.push (/.apply/1 ++))
/.call)))
(_.cover [/.apply/2]
(n.= (n.+ sample sample)
@@ -235,35 +235,35 @@
/.call)))
(_.cover [/.if]
(n.= (if choice
- (inc sample)
- (dec sample))
+ (++ sample)
+ (-- sample))
(||> (/.push sample)
(/.push choice)
- (/.push (/.apply/1 inc))
- (/.push (/.apply/1 dec))
+ (/.push (/.apply/1 ++))
+ (/.push (/.apply/1 --))
/.if)))
(_.cover [/.loop]
(n.= (n.+ distance start)
(||> (/.push start)
- (/.push (|>> |inc| /.dup |test|))
+ (/.push (|>> |++| /.dup |test|))
/.loop)))
(_.cover [/.while]
(n.= (n.+ distance start)
(||> (/.push start)
(/.push (|>> /.dup |test|))
- (/.push |inc|)
+ (/.push |++|)
/.while)))
(_.cover [/.do]
- (n.= (inc sample)
+ (n.= (++ sample)
(||> (/.push sample)
(/.push (|>> (/.push false)))
- (/.push |inc|)
+ (/.push |++|)
/.do /.while)))
(_.cover [/.compose]
- (n.= (inc (inc sample))
+ (n.= (++ (++ sample))
(||> (/.push sample)
- (/.push |inc|)
- (/.push |inc|)
+ (/.push |++|)
+ (/.push |++|)
/.compose
/.call)))
(_.cover [/.partial]
@@ -275,19 +275,19 @@
/.call)))
(_.cover [/.when]
(n.= (if choice
- (inc sample)
+ (++ sample)
sample)
(||> (/.push sample)
(/.push choice)
- (/.push (/.apply/1 inc))
+ (/.push (/.apply/1 ++))
/.when)))
(_.cover [/.?]
(n.= (if choice
- (inc sample)
- (dec sample))
+ (++ sample)
+ (-- sample))
(||> (/.push choice)
- (/.push (inc sample))
- (/.push (dec sample))
+ (/.push (++ sample))
+ (/.push (-- sample))
/.?)))
)))
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index 627b294ad..93c68faff 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -55,8 +55,8 @@
(function (_ transform)
(function (_ state actor)
(|> state transform #try.Success async\in))))
- inc! (: (/.Mail Nat) (as_mail inc))
- dec! (: (/.Mail Nat) (as_mail dec))]]
+ ++! (: (/.Mail Nat) (as_mail ++))
+ --! (: (/.Mail Nat) (as_mail --))]]
(<| (_.covering /._)
(_.for [/.Actor])
($_ _.and
@@ -116,7 +116,7 @@
(in (do async.monad
[sent? (async.future (do io.monad
[actor (/.spawn! /.default 0)
- sent? (/.mail! inc! actor)]
+ sent? (/.mail! ++! actor)]
(in (..mailed? sent?))))]
(_.cover' [/.Behavior /.Mail
/.default /.spawn! /.mail!]
@@ -126,7 +126,7 @@
[result (async.future (do io.monad
[counter (/.spawn! /.default 0)
_ (/.poison! counter)]
- (/.mail! inc! counter)))]
+ (/.mail! ++! counter)))]
(_.cover' [/.dead]
(case result
(#try.Success outcome)
@@ -180,18 +180,18 @@
[anonymous (/.actor {Nat
initial_state}
((on_mail message state self)
- (message (inc state) self)))
- sent/inc? (/.mail! inc! anonymous)
- sent/dec? (/.mail! dec! anonymous)
+ (message (++ state) self)))
+ sent/++? (/.mail! ++! anonymous)
+ sent/--? (/.mail! --! anonymous)
poisoned? (/.poison! anonymous)
obituary (/.obituary' anonymous)]
- (in (and (..mailed? sent/inc?)
- (..mailed? sent/dec?)
+ (in (and (..mailed? sent/++?)
+ (..mailed? sent/--?)
(..mailed? poisoned?)
(case obituary
(^ (#.Some [error final_state (list poison_pill)]))
(and (exception.match? /.poisoned error)
- (n.= (inc (inc initial_state))
+ (n.= (++ (++ initial_state))
final_state))
_
@@ -200,7 +200,7 @@
verdict)))
(do !
- [num_events (\ ! map (|>> (n.% 10) inc) random.nat)
+ [num_events (\ ! map (|>> (n.% 10) ++) random.nat)
events (random.list num_events random.nat)
num_observations (\ ! map (n.% num_events) random.nat)
.let [expected (list.first num_observations events)
@@ -215,8 +215,8 @@
(async.future
(if (n.< num_observations events_seen)
(do !
- [_ (atom.update! (row.add event) sink)]
- (in (#try.Success (inc events_seen))))
+ [_ (atom.update! (row.suffix event) sink)]
+ (in (#try.Success (++ events_seen))))
(do !
[_ stop]
(in (#try.Failure "YOLO")))))))
diff --git a/stdlib/source/test/lux/control/concurrency/async.lux b/stdlib/source/test/lux/control/concurrency/async.lux
index a92a5c44c..f9b917ee5 100644
--- a/stdlib/source/test/lux/control/concurrency/async.lux
+++ b/stdlib/source/test/lux/control/concurrency/async.lux
@@ -107,16 +107,16 @@
(n.+ leftA rightA)))))
(in (do /.monad
[pre (/.future instant.now)
- actual (/.delayed waiting_time expected)
+ actual (/.after waiting_time expected)
post (/.future instant.now)]
- (_.cover' [/.delayed]
+ (_.cover' [/.after]
(and (n.= expected actual)
(i.>= (.int waiting_time)
(duration.millis (instant.span pre post)))))))
(in (do /.monad
[?left (/.or (in leftE)
- (/.delayed waiting_time dummy))
- ?right (/.or (/.delayed waiting_time dummy)
+ (/.after waiting_time dummy))
+ ?right (/.or (/.after waiting_time dummy)
(in rightE))]
(_.cover' [/.or]
(case [?left ?right]
@@ -128,8 +128,8 @@
false))))
(in (do /.monad
[leftA (/.either (in leftE)
- (/.delayed waiting_time dummy))
- rightA (/.either (/.delayed waiting_time dummy)
+ (/.after waiting_time dummy))
+ rightA (/.either (/.after waiting_time dummy)
(in rightE))]
(_.cover' [/.either]
(n.= (n.+ leftE rightE)
@@ -155,9 +155,9 @@
(and yep
(not nope)))))
(in (do /.monad
- [?none (/.time_out 0 (/.delayed waiting_time dummy))
- ?actual (/.time_out waiting_time (in expected))]
- (_.cover' [/.time_out]
+ [?none (/.within 0 (/.after waiting_time dummy))
+ ?actual (/.within waiting_time (in expected))]
+ (_.cover' [/.within]
(case [?none ?actual]
[#.None (#.Some actual)]
(n.= expected actual)
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 45dadc8cb..5876331b6 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -60,7 +60,7 @@
(#.Some [head tail])
(\ ! map (|>> (#.Item head))
- (take_amount (dec amount_of_polls) [channel sink]))))))
+ (take_amount (-- amount_of_polls) [channel sink]))))))
(def: .public test
Test
@@ -145,9 +145,9 @@
_ (async.future (/.subscribe! (function (_ value)
(do {! io.monad}
[current (atom.read! sink)
- _ (atom.update! (row.add value) sink)]
+ _ (atom.update! (row.suffix value) sink)]
(if (n.< (list.size inputs)
- (inc (row.size current)))
+ (++ (row.size current)))
(in (#.Some []))
(do !
[_ (!signal [])]
@@ -161,22 +161,22 @@
(_.cover' [/.Subscriber /.subscribe!]
(list\= inputs listened))))
(in (do async.monad
- [actual (/.fold (function (_ input total)
- (async.resolved (n.+ input total)))
- 0
- (/.sequential 0 inputs))]
- (_.cover' [/.fold]
+ [actual (/.aggregate (function (_ input total)
+ (async.resolved (n.+ input total)))
+ 0
+ (/.sequential 0 inputs))]
+ (_.cover' [/.aggregate]
(n.= (list\fold n.+ 0 inputs)
actual))))
(in (do async.monad
[actual (|> inputs
(/.sequential 0)
- (/.folds (function (_ input total)
- (async.resolved (n.+ input total)))
- 0)
+ (/.aggregates (function (_ input total)
+ (async.resolved (n.+ input total)))
+ 0)
/.list)]
- (_.cover' [/.folds]
- (list\= (list.folds n.+ 0 inputs)
+ (_.cover' [/.aggregates]
+ (list\= (list.aggregates n.+ 0 inputs)
actual))))
(in (do async.monad
[actual (|> (list distint/0 distint/0 distint/0
@@ -189,8 +189,8 @@
(list\= (list distint/0 distint/1 distint/2)
actual))))
(do !
- [polling_delay (\ ! map (|>> (n.% 10) inc) random.nat)
- amount_of_polls (\ ! map (|>> (n.% 10) inc) random.nat)]
+ [polling_delay (\ ! map (|>> (n.% 10) ++) random.nat)
+ amount_of_polls (\ ! map (|>> (n.% 10) ++) random.nat)]
($_ _.and
(in (do {! async.monad}
[actual (..take_amount amount_of_polls (/.poll polling_delay (: (IO Nat) (io.io sample))))
@@ -212,12 +212,12 @@
(/.iterations (function (_ [iterations current])
(async.resolved
(if (n.< max_iterations iterations)
- (#.Some [[(inc iterations) (n.+ shift current)]
+ (#.Some [[(++ iterations) (n.+ shift current)]
current])
#.None))))
/.list)]
(_.cover' [/.iterations]
(and (n.= max_iterations (list.size actual))
- (list\= (list.folds n.+ sample (list.repeated (dec max_iterations) shift))
+ (list\= (list.aggregates n.+ sample (list.repeated (-- max_iterations) shift))
actual)))))
)))))
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index a57e3bcd6..b4b07bbb0 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -42,7 +42,7 @@
[initial_open_positions (|> random.nat (\ ! map (|>> (n.% 10) (n.max 1))))
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do async.monad
- [result (async.time_out ..delay (/.wait! semaphore))]
+ [result (async.within ..delay (/.wait! semaphore))]
(_.cover' [/.semaphore]
(case result
(#.Some _)
@@ -55,7 +55,7 @@
.let [semaphore (/.semaphore initial_open_positions)]]
(in (do {! async.monad}
[_ (monad.map ! /.wait! (list.repeated initial_open_positions semaphore))
- result (async.time_out ..delay (/.wait! semaphore))]
+ result (async.within ..delay (/.wait! semaphore))]
(_.cover' [/.wait!]
(case result
(#.Some _)
@@ -69,9 +69,9 @@
(in (do {! async.monad}
[_ (monad.map ! /.wait! (list.repeated initial_open_positions semaphore))
.let [block (/.wait! semaphore)]
- result/0 (async.time_out ..delay block)
+ result/0 (async.within ..delay block)
open_positions (/.signal! semaphore)
- result/1 (async.time_out ..delay block)]
+ result/1 (async.within ..delay block)]
(_.cover' [/.signal!]
(case [result/0 result/1 open_positions]
[#.None (#.Some _) (#try.Success +0)]
@@ -100,14 +100,14 @@
(do {! random.monad}
[repetitions (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
.let [resource (atom.atom "")
- expected_As (text.joined (list.repeated repetitions "A"))
- expected_Bs (text.joined (list.repeated repetitions "B"))
+ expected_As (text.together (list.repeated repetitions "A"))
+ expected_Bs (text.together (list.repeated repetitions "B"))
mutex (/.mutex [])
processA (<| (/.synchronize! mutex)
io.io
async.future
(do {! io.monad}
- [_ (<| (monad.seq !)
+ [_ (<| (monad.all !)
(list.repeated repetitions)
(atom.update! (|>> (format "A")) resource))]
(in [])))
@@ -115,7 +115,7 @@
io.io
async.future
(do {! io.monad}
- [_ (<| (monad.seq !)
+ [_ (<| (monad.all !)
(list.repeated repetitions)
(atom.update! (|>> (format "B")) resource))]
(in [])))]]
@@ -155,21 +155,21 @@
_
false)))
(do {! random.monad}
- [limit (\ ! map (|>> (n.% 9) inc) random.nat)
+ [limit (\ ! map (|>> (n.% 9) ++) random.nat)
.let [barrier (/.barrier (maybe.trusted (/.limit limit)))
resource (atom.atom "")]]
(in (do {! async.monad}
[.let [suffix "_"
expected_ending (|> suffix
(list.repeated limit)
- text.joined)
- expected_ids (enum.range n.enum 0 (dec limit))]
+ text.together)
+ expected_ids (enum.range n.enum 0 (-- limit))]
_ (|> expected_ids
(list\map (function (_ id)
(exec
(io.run! (atom.update! (|>> (format suffix)) resource))
(waiter resource barrier id))))
- (monad.seq !))
+ (monad.all !))
.let [outcome (io.run! (atom.read! resource))]]
(_.cover' [/.barrier /.block!]
(and (text.ends_with? expected_ending outcome)
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index dbe98177f..f3a5c618c 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -94,8 +94,8 @@
(in (let [var (/.var 0)]
(do {! async.monad}
[_ (|> (list.repeated iterations_per_process [])
- (list\map (function (_ _) (/.commit! (/.update inc var))))
- (monad.seq !))
+ (list\map (function (_ _) (/.commit! (/.update ++ var))))
+ (monad.all !))
cummulative (/.commit! (/.read var))]
(_.cover' [/.STM]
(n.= iterations_per_process
diff --git a/stdlib/source/test/lux/control/continuation.lux b/stdlib/source/test/lux/control/continuation.lux
index 4844e521f..cac3794a0 100644
--- a/stdlib/source/test/lux/control/continuation.lux
+++ b/stdlib/source/test/lux/control/continuation.lux
@@ -63,7 +63,7 @@
(/.result (do /.monad
[[restart [output idx]] (/.portal [sample 0])]
(if (n.< 10 idx)
- (restart [(n.+ 10 output) (inc idx)])
+ (restart [(n.+ 10 output) (++ idx)])
(in output))))))
(_.cover [/.shift /.reset]
(let [(^open "_\.") /.monad
diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux
index 369a018e0..4450991ec 100644
--- a/stdlib/source/test/lux/control/function.lux
+++ b/stdlib/source/test/lux/control/function.lux
@@ -56,9 +56,9 @@
outcome)
(not (n.= (n.- expected extra)
outcome)))))
- (_.cover [/.apply]
+ (_.cover [/.on]
(n.= (f0 extra)
- (/.apply extra f0)))
+ (/.on extra f0)))
/contract.test
/memo.test
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index a91f2a69a..914247204 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -85,7 +85,7 @@
open (/.open fibonacci)]
[none_time none_output] (..time none input)
[open_time [memory open_output]] (..time open [memory input])
- [open_time/+1 _] (..time open [memory (inc input)])
+ [open_time/+1 _] (..time open [memory (++ input)])
.let [same_output!
(n.= none_output
open_output)
@@ -108,10 +108,10 @@
(case input
(^or 0 1) (\ state.monad in 1)
_ (do state.monad
- [output' (recur (dec input))]
+ [output' (recur (-- input))]
(in (n.* input output')))))))
expected (|> (list.indices input)
- (list\map inc)
+ (list\map ++)
(list\fold n.* 1))
actual (|> (memo input)
(state.result (dictionary.empty n.hash))
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index 19e67b7aa..b41da5623 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -39,7 +39,7 @@
(in (function (_ delegate recur input)
output))))
expected (|> (list.indices input)
- (list\map inc)
+ (list\map ++)
(list\fold n.* 1))]])
($_ _.and
(_.for [/.Mixin]
@@ -52,7 +52,7 @@
(function (_ delegate recur input)
(case input
(^or 0 1) 1
- _ (n.* input (recur (dec input))))))]
+ _ (n.* input (recur (-- input))))))]
(n.= expected
(factorial input))))
(_.cover [/.with]
@@ -63,7 +63,7 @@
_ (delegate input))))
multiplication (: (/.Mixin Nat Nat)
(function (_ delegate recur input)
- (n.* input (recur (dec input)))))
+ (n.* input (recur (-- input)))))
factorial (/.mixin (/.with bottom multiplication))]
(n.= expected
(factorial input))))
@@ -72,7 +72,7 @@
(function (_ delegate recur input)
(case input
(^or 0 1) 1
- _ (n.* input (delegate (dec input))))))
+ _ (n.* input (delegate (-- input))))))
left (/.mixin (/.with /.nothing loop))
right (/.mixin (/.with loop /.nothing))]
(and (n.= expected
@@ -90,7 +90,7 @@
_ false)))
multiplication (: (/.Mixin Nat Nat)
(function (_ delegate recur input)
- (n.* input (recur (dec input)))))
+ (n.* input (recur (-- input)))))
factorial (/.mixin (/.with (/.advice bottom? bottom)
multiplication))]
(n.= expected
@@ -129,7 +129,7 @@
(function (_ recur input)
(case input
(^or 0 1) 1
- _ (n.* input (recur (dec input)))))))]
+ _ (n.* input (recur (-- input)))))))]
(n.= expected
(factorial input)))))
)))
diff --git a/stdlib/source/test/lux/control/function/mutual.lux b/stdlib/source/test/lux/control/function/mutual.lux
index 5aeb9be71..4fe2e4219 100644
--- a/stdlib/source/test/lux/control/function/mutual.lux
+++ b/stdlib/source/test/lux/control/function/mutual.lux
@@ -25,13 +25,13 @@
(-> Nat Bit)
(case number
0 true
- _ (odd? (dec number)))
+ _ (odd? (-- number)))
(odd? number)
(-> Nat Bit)
(case number
0 false
- _ (even? (dec number)))]
+ _ (even? (-- number)))]
(and (bit\= expected (even? sample))
(bit\= (not expected) (odd? sample)))))))
@@ -40,13 +40,13 @@
(-> Nat Bit)
(case number
0 true
- _ (odd? (dec number)))]
+ _ (odd? (-- number)))]
[(odd? number)
(-> Nat Bit)
(case number
0 false
- _ (even? (dec number)))])
+ _ (even? (-- number)))])
(def: test_def
Test
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index f45ba2111..e37a2f355 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -195,7 +195,7 @@
(list.first times expected+)
actual)))
(|> (list\map code.nat expected+)
- (/.result (/.exactly (inc variadic) <code>.nat))
+ (/.result (/.exactly (++ variadic) <code>.nat))
fails?)))
(_.cover [/.at_least]
(and (|> (list\map code.nat expected+)
@@ -205,7 +205,7 @@
expected+
actual)))
(|> (list\map code.nat expected+)
- (/.result (/.at_least (inc variadic) <code>.nat))
+ (/.result (/.at_least (++ variadic) <code>.nat))
fails?)))
(_.cover [/.at_most]
(and (|> (list\map code.nat expected+)
@@ -215,7 +215,7 @@
(list.first times expected+)
actual)))
(|> (list\map code.nat expected+)
- (/.result (/.at_most (inc variadic) <code>.nat))
+ (/.result (/.at_most (++ variadic) <code>.nat))
(match actual
(\ (list.equivalence n.equivalence) =
expected+
diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux
index 50233ba6e..dcf4d0e80 100644
--- a/stdlib/source/test/lux/control/parser/binary.lux
+++ b/stdlib/source/test/lux/control/parser/binary.lux
@@ -355,7 +355,7 @@
post))))
(!expect (#try.Success #1)))))
(do {! random.monad}
- [to_read (\ ! map (n.% (inc ..segment_size)) random.nat)
+ [to_read (\ ! map (n.% (++ ..segment_size)) random.nat)
data (\ ! map (\ utf8.codec encode) (random.ascii ..segment_size))]
(_.cover [/.Offset /.offset]
(|> data
@@ -370,7 +370,7 @@
(n.= ..segment_size nothing_left)))))
(!expect (#try.Success #1)))))
(do {! random.monad}
- [to_read (\ ! map (n.% (inc ..segment_size)) random.nat)
+ [to_read (\ ! map (n.% (++ ..segment_size)) random.nat)
data (\ ! map (\ utf8.codec encode) (random.ascii ..segment_size))]
(_.cover [/.remaining]
(|> data
diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux
index fb1f485c0..529986ad4 100644
--- a/stdlib/source/test/lux/control/parser/cli.lux
+++ b/stdlib/source/test/lux/control/parser/cli.lux
@@ -57,7 +57,7 @@
(_.cover [/.somewhere]
(|> (/.result (|> (/.somewhere (/.this expected))
(<>.before (<>.some /.any)))
- (list.joined (list pre_ignore (list expected) post_ignore)))
+ (list.together (list pre_ignore (list expected) post_ignore)))
(!expect (#try.Success _))))
(_.cover [/.end]
(and (|> (/.result /.end (list))
diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux
index 068ba1235..e412ff262 100644
--- a/stdlib/source/test/lux/control/parser/synthesis.lux
+++ b/stdlib/source/test/lux/control/parser/synthesis.lux
@@ -132,12 +132,12 @@
expected_environment ..random_environment
expected_body (random.unicode 1)]
(_.cover [/.wrong_arity]
- (|> (/.result (/.function (inc arity) /.text)
+ (|> (/.result (/.function (++ arity) /.text)
(list (synthesis.function/abstraction [expected_environment arity (synthesis.text expected_body)])))
(!expect (^multi (#try.Failure error)
(exception.match? /.wrong_arity error))))))
(do {! random.monad}
- [arity (\ ! map (|>> (n.% 10) inc) random.nat)
+ [arity (\ ! map (|>> (n.% 10) ++) random.nat)
expected_offset random.nat
expected_inits (random.list arity random.bit)
expected_body (random.unicode 1)]
diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux
index 7be2416d0..951bed82e 100644
--- a/stdlib/source/test/lux/control/parser/text.lux
+++ b/stdlib/source/test/lux/control/parser/text.lux
@@ -77,7 +77,7 @@
.let [limit (n.+ offset range)]
expected (\ ! map (|>> (n.% range) (n.+ offset) text.of_char) random.nat)
out_of_range (case offset
- 0 (\ ! map (|>> (n.% 10) inc (n.+ limit) text.of_char) random.nat)
+ 0 (\ ! map (|>> (n.% 10) ++ (n.+ limit) text.of_char) random.nat)
_ (\ ! map (|>> (n.% offset) text.of_char) random.nat))]
(_.cover [/.range]
(and (..should_pass expected (/.range offset limit))
@@ -157,7 +157,7 @@
(random.set n.hash num_options)
(\ ! map (|>> set.list
(list\map text.of_char)
- text.joined)))
+ text.together)))
expected (\ ! map (function (_ value)
(|> options
(text.char (n.% num_options value))
@@ -183,7 +183,7 @@
(random.set n.hash num_options)
(\ ! map (|>> set.list
(list\map text.of_char)
- text.joined)))
+ text.together)))
invalid (\ ! map (function (_ value)
(|> options
(text.char (n.% num_options value))
diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux
index 373d549e9..dc901e3c4 100644
--- a/stdlib/source/test/lux/control/parser/type.lux
+++ b/stdlib/source/test/lux/control/parser/type.lux
@@ -166,7 +166,7 @@
Test
(do {! random.monad}
[not_polymorphic ..primitive
- expected_inputs (\ ! map (|>> (n.% 10) inc) random.nat)]
+ expected_inputs (\ ! map (|>> (n.% 10) ++) random.nat)]
($_ _.and
(_.cover [/.not_polymorphic]
(and (|> (/.result (/.polymorphic /.any)
diff --git a/stdlib/source/test/lux/control/parser/xml.lux b/stdlib/source/test/lux/control/parser/xml.lux
index 92efb1121..e92216696 100644
--- a/stdlib/source/test/lux/control/parser/xml.lux
+++ b/stdlib/source/test/lux/control/parser/xml.lux
@@ -164,9 +164,9 @@
(_.cover [/.somewhere]
(|> (/.result parser
(list (node parent
- (list.joined (list (list.repeated repetitions (node wrong (list)))
- (list (node right (list)))
- (list.repeated repetitions (node wrong (list))))))))
+ (list.together (list (list.repeated repetitions (node wrong (list)))
+ (list (node right (list)))
+ (list.repeated repetitions (node wrong (list))))))))
(!expect (#try.Success []))))
(_.cover [/.nowhere]
(|> (/.result parser
diff --git a/stdlib/source/test/lux/control/pipe.lux b/stdlib/source/test/lux/control/pipe.lux
index 27e92a7e0..3ef82e309 100644
--- a/stdlib/source/test/lux/control/pipe.lux
+++ b/stdlib/source/test/lux/control/pipe.lux
@@ -25,11 +25,11 @@
(do !
[another random.nat]
(_.cover [/.new>]
- (n.= (inc another)
+ (n.= (++ another)
(|> sample
(n.* 3)
(n.+ 4)
- (/.new> another [inc])))))
+ (/.new> another [++])))))
(_.cover [/.let>]
(n.= (n.+ sample sample)
(|> sample
@@ -63,12 +63,12 @@
(/.loop> [(n.= (n.* 10 sample)) not]
[(n.+ sample)]))))
(_.cover [/.do>]
- (n.= (inc (n.+ 4 (n.* 3 sample)))
+ (n.= (++ (n.+ 4 (n.* 3 sample)))
(|> sample
(/.do> identity.monad
[(n.* 3)]
[(n.+ 4)]
- [inc]))))
+ [++]))))
(_.cover [/.exec>]
(n.= (n.* 10 sample)
(|> sample
@@ -76,11 +76,11 @@
(n.* 10))))
(_.cover [/.tuple>]
(let [[left middle right] (|> sample
- (/.tuple> [inc]
- [dec]
+ (/.tuple> [++]
+ [--]
[%.nat]))]
- (and (n.= (inc sample) left)
- (n.= (dec sample) middle)
+ (and (n.= (++ sample) left)
+ (n.= (-- sample) middle)
(text\= (%.nat sample) right))))
(_.cover [/.case>]
(text\= (case (n.% 10 sample)
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index caabbadf6..555f30b4f 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -103,7 +103,7 @@
.let [//@ !
count_clean_up (function (_ value)
(do !
- [_ (thread.update! inc clean_up_counter)]
+ [_ (thread.update! ++ clean_up_counter)]
(in (#try.Success []))))]
outcome (/.run! !
(do {! (/.monad !)}
@@ -121,7 +121,7 @@
.let [//@ !
count_clean_up (function (_ value)
(do !
- [_ (thread.update! inc clean_up_counter)]
+ [_ (thread.update! ++ clean_up_counter)]
(in (#try.Success []))))]
outcome (/.run! !
(do {! (/.monad !)}
@@ -140,7 +140,7 @@
.let [//@ !
count_clean_up (function (_ value)
(do !
- [_ (thread.update! inc clean_up_counter)]
+ [_ (thread.update! ++ clean_up_counter)]
(in (#try.Success []))))]
outcome (/.run! !
(do {! (/.monad !)}
@@ -159,7 +159,7 @@
.let [//@ !
count_clean_up (function (_ value)
(do !
- [_ (thread.update! inc clean_up_counter)]
+ [_ (thread.update! ++ clean_up_counter)]
(in (: (Try Any)
(exception.except ..oops [])))))]
outcome (/.run! !
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index 864c16bd9..eda78cbeb 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -46,8 +46,8 @@
[_ (/.update (n.* value))]
/.get)))
(_.cover [/.use]
- (with_conditions [state (inc state)]
- (/.use inc)))
+ (with_conditions [state (++ state)]
+ (/.use ++)))
(_.cover [/.local]
(with_conditions [state (n.* value state)]
(/.local (n.* value)
@@ -88,12 +88,12 @@
(in (n.< limit state)))]]
($_ _.and
(_.cover [/.while /.result]
- (|> (/.while condition (/.update inc))
+ (|> (/.while condition (/.update ++))
(/.result 0)
(let> [state' output']
(n.= limit state'))))
(_.cover [/.do_while]
- (|> (/.do_while condition (/.update inc))
+ (|> (/.do_while condition (/.update ++))
(/.result 0)
(let> [state' output']
(or (n.= limit state')
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 372aed7de..331e05142 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -39,7 +39,7 @@
(do random.monad
[byte random.nat]
(exec (try.trusted (/.write/8! idx byte output))
- (recur (inc idx))))
+ (recur (++ idx))))
(\ random.monad in output)))))
(def: (throws? exception try)
@@ -56,8 +56,8 @@
(let [bytes (i64.left_shifted power 1)
binary (/.empty bytes)
cap (case bytes
- 8 (dec 0)
- _ (|> 1 (i64.left_shifted (n.* 8 bytes)) dec))
+ 8 (-- 0)
+ _ (|> 1 (i64.left_shifted (n.* 8 bytes)) --))
capped_value (i64.and cap value)]
(and (..succeed
(do try.monad
@@ -71,9 +71,9 @@
(def: as_list
(-> /.Binary (List Nat))
- (/.fold (function (_ head tail)
- (#.Item head tail))
- (list)))
+ (/.aggregate (function (_ head tail)
+ (#.Item head tail))
+ (list)))
(def: .public test
Test
@@ -92,9 +92,9 @@
($equivalence.spec /.equivalence (..random size)))
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
- (_.cover [/.fold]
+ (_.cover [/.aggregate]
(n.= (\ list.fold fold n.+ 0 (..as_list sample))
- (/.fold n.+ 0 sample)))
+ (/.aggregate n.+ 0 sample)))
(_.cover [/.empty]
(\ /.equivalence =
@@ -117,7 +117,7 @@
idxs (: (List Nat)
(case length
0 (list)
- _ (enum.range n.enum 0 (dec length))))
+ _ (enum.range n.enum 0 (-- length))))
reader (function (_ binary idx)
(/.read/8! idx binary))]
(and (n.= length (/.size random_slice))
@@ -143,7 +143,7 @@
(#.Item head tail)
(n.= (list.fold n.+ 0 tail)
- (/.fold n.+ 0 (/.after 1 sample))))))
+ (/.aggregate n.+ 0 (/.after 1 sample))))))
(_.cover [/.copy]
(and (case (/.copy size 0 sample 0 (/.empty size))
(#try.Success output)
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index c1e1471f8..4045c008a 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -169,14 +169,14 @@
_
false)))
(do !
- [occupancy (\ ! map (n.% (inc size)) random.nat)]
+ [occupancy (\ ! map (n.% (++ size)) random.nat)]
(_.cover [/.occupancy /.vacancy]
(let [the_array (loop [output (: (Array Nat)
(/.empty size))
idx 0]
(if (n.< occupancy idx)
(recur (/.write! idx expected output)
- (inc idx))
+ (++ idx))
output))]
(and (n.= occupancy (/.occupancy the_array))
(n.= size (n.+ (/.occupancy the_array)
@@ -189,7 +189,7 @@
(|> the_array /.list /.of_list
(\ (/.equivalence n.equivalence) = the_array)))))
(do !
- [amount (\ ! map (n.% (inc size)) random.nat)]
+ [amount (\ ! map (n.% (++ size)) random.nat)]
(_.cover [/.copy!]
(let [copy (: (Array Nat)
(/.empty size))]
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index 6710ef7c6..c0e54e3bb 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -17,7 +17,7 @@
(def: (size min max)
(-> Nat Nat (Random Nat))
(|> random.nat
- (\ random.monad map (|>> (n.% (inc max)) (n.max min)))))
+ (\ random.monad map (|>> (n.% (++ max)) (n.max min)))))
(def: .public random
(Random Bits)
@@ -47,7 +47,7 @@
(/.empty? /.empty))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 1,000) inc) random.nat)
+ [size (\ ! map (|>> (n.% 1,000) ++) random.nat)
idx (\ ! map (n.% size) random.nat)
sample ..random]
($_ _.and
@@ -73,7 +73,7 @@
/.empty))
(/.intersects? (/.one idx /.empty)
(/.one idx /.empty))
- (not (/.intersects? (/.one (inc idx) /.empty)
+ (not (/.intersects? (/.one (++ idx) /.empty)
(/.one idx /.empty)))
(not (/.intersects? sample (/.not sample)))))
(_.cover [/.not]
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 080e09001..446c4e354 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -112,7 +112,7 @@
(let [merging_with_oneself (let [(^open ".") (/.equivalence n.equivalence)]
(= dict (/.merged dict dict)))
overwritting_keys (let [dict' (|> dict /.entries
- (list\map (function (_ [k v]) [k (inc v)]))
+ (list\map (function (_ [k v]) [k (++ v)]))
(/.of_list n.hash))
(^open ".") (/.equivalence n.equivalence)]
(= dict' (/.merged dict' dict)))]
@@ -155,7 +155,7 @@
_ true)))
(_.cover [/.has]
- (and (n.= (inc (/.size dict))
+ (and (n.= (++ (/.size dict))
(/.size (/.has non_key test_val dict)))
(case (/.value non_key (/.has non_key test_val dict))
(#.Some v) (n.= test_val v)
@@ -193,24 +193,24 @@
true
(#.Some known_key)
- (n.= (dec (/.size dict))
+ (n.= (-- (/.size dict))
(/.size (/.lacks known_key dict))))))
(_.cover [/.revised]
(let [base (/.has non_key test_val dict)
- updt (/.revised non_key inc base)]
+ updt (/.revised non_key ++ base)]
(case [(/.value non_key base) (/.value non_key updt)]
[(#.Some x) (#.Some y)]
- (n.= (inc x) y)
+ (n.= (++ x) y)
_
false)))
(_.cover [/.revised']
(let [can_upsert_new_key!
- (case (/.value non_key (/.revised' non_key test_val inc dict))
+ (case (/.value non_key (/.revised' non_key test_val ++ dict))
(#.Some inserted)
- (n.= (inc test_val) inserted)
+ (n.= (++ test_val) inserted)
#.None
false)
@@ -221,9 +221,9 @@
true
(#.Some [known_key known_value])
- (case (/.value known_key (/.revised' known_key test_val inc dict))
+ (case (/.value known_key (/.revised' known_key test_val ++ dict))
(#.Some updated)
- (n.= (inc known_value) updated)
+ (n.= (++ known_value) updated)
#.None
false))]
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 838d2cf5d..7f6178f8e 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -32,7 +32,7 @@
_
(do random.monad
- [partial (dictionary order gen_key gen_value (dec size))
+ [partial (dictionary order gen_key gen_value (-- size))
key (random.only (|>> (/.key? partial) not)
gen_key)
value gen_value]
@@ -111,7 +111,7 @@
(and (not (/.key? sample extra_key))
(let [sample+ (/.has extra_key extra_value sample)]
(and (/.key? sample+ extra_key)
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size sample+))))))
(_.cover [/.value]
(let [sample+ (/.has extra_key extra_value sample)]
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index c76892185..2172fbd44 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -69,7 +69,7 @@
(let [sample+ (/.has extra_key extra_value sample)]
(and (not (/.contains? extra_key sample))
(/.contains? extra_key sample+)
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size sample+)))))
(_.cover [/.value]
(|> sample
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 8ba430845..f635eca05 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -146,7 +146,7 @@
(/.sorted n.< indices))
expected_numbers!
- (/.every? (n.= (dec size))
+ (/.every? (n.= (-- size))
(/.zipped_with/2 n.+
indices
(/.sorted n.> indices)))]
@@ -185,7 +185,7 @@
..random)
.let [size (/.size sample)]
idx (\ ! map (n.% size) random.nat)
- sub_size (\ ! map (|>> (n.% size) inc) random.nat)]
+ sub_size (\ ! map (|>> (n.% size) ++) random.nat)]
($_ _.and
(_.cover [/.only]
(let [positives (/.only n.even? sample)
@@ -222,7 +222,7 @@
(let [subs (/.sub sub_size sample)]
(and (/.every? (|>> /.size (n.<= sub_size)) subs)
(/\= sample
- (/.joined subs)))))
+ (/.together subs)))))
))))
(def: member
@@ -341,11 +341,11 @@
((/.zipped_with 2) +/2 sample/0 sample/1))
(/\= (/.zipped_with/3 +/3 sample/0 sample/1 sample/2)
((/.zipped_with 3) +/3 sample/0 sample/1 sample/2))))
- (_.cover [/.joined]
+ (_.cover [/.together]
(and (/\= (/\compose sample/0 sample/1)
- (/.joined (list sample/0 sample/1)))
+ (/.together (list sample/0 sample/1)))
(/\= ($_ /\compose sample/0 sample/1 sample/2)
- (/.joined (list sample/0 sample/1 sample/2)))))
+ (/.together (list sample/0 sample/1 sample/2)))))
))))
(def: search
@@ -410,7 +410,7 @@
(_.cover [/.interposed]
(or (/.empty? sample)
(let [sample+ (/.interposed separator sample)]
- (and (n.= (|> (/.size sample) (n.* 2) dec)
+ (and (n.= (|> (/.size sample) (n.* 2) --)
(/.size sample+))
(|> sample+ /.pairs (/.every? (|>> product.right (n.= separator))))))))
(_.cover [/.iterations]
@@ -419,14 +419,14 @@
(/\= (/.indices size)
(/.iterations (function (_ index)
(if (n.< size index)
- (#.Some (inc index))
+ (#.Some (++ index))
#.None))
0)))))
- (_.cover [/.folds]
+ (_.cover [/.aggregates]
(/\= (/\map (function (_ index)
(\ /.fold fold n.+ 0 (/.first index sample)))
- (/.indices (inc (/.size sample))))
- (/.folds n.+ 0 sample)))
+ (/.indices (++ (/.size sample))))
+ (/.aggregates n.+ 0 sample)))
(do random.monad
[expected random.nat
.let [(^open "/\.") (/.equivalence n.equivalence)]]
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 5fcec5102..cdb7198b5 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -81,7 +81,7 @@
(let [pushed (/.end non_member sample)
size_increases!
- (n.= (inc (/.size sample)) (/.size pushed))
+ (n.= (++ (/.size sample)) (/.size pushed))
new_member_is_identified!
(/.member? n.equivalence pushed non_member)
@@ -99,7 +99,7 @@
(let [popped (/.next sample)
size_decreases!
- (n.= (dec (/.size sample))
+ (n.= (-- (/.size sample))
(/.size popped))
popped_member_is_not_identified!
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 4faaaf488..9be7c183f 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -64,14 +64,14 @@
(_.cover [/.end]
(let [sample+ (/.end non_member_priority non_member sample)]
(and (not (/.member? n.equivalence sample non_member))
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size sample+))
(/.member? n.equivalence sample+ non_member))))
(_.cover [/.next]
(let [sample- (/.next sample)]
(or (and (/.empty? sample)
(/.empty? sample-))
- (n.= (dec (/.size sample))
+ (n.= (-- (/.size sample))
(/.size sample-)))))
(_.for [/.Priority]
($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 2515f284f..8e8348617 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -81,7 +81,7 @@
(def: index_based
Test
(do {! random.monad}
- [size (\ ! map (|>> (n.% 100) inc) random.nat)]
+ [size (\ ! map (|>> (n.% 100) ++) random.nat)]
($_ _.and
(do !
[good_index (|> random.nat (\ ! map (n.% size)))
@@ -108,9 +108,9 @@
(<| (try.else false)
(do try.monad
[sample (/.has good_index non_member sample)
- sample (/.revised good_index inc sample)
+ sample (/.revised good_index ++ sample)
actual (/.item good_index sample)]
- (in (n.= (inc non_member) actual)))))
+ (in (n.= (++ non_member) actual)))))
(_.cover [/.within_bounds?]
(and (/.within_bounds? sample good_index)
(not (/.within_bounds? sample bad_index))))
@@ -125,7 +125,7 @@
(exception.match? /.index_out_of_bounds error))))]
(and (fails! (/.item bad_index sample))
(fails! (/.has bad_index non_member sample))
- (fails! (/.revised bad_index inc sample)))))
+ (fails! (/.revised bad_index ++ sample)))))
))
)))
@@ -134,7 +134,7 @@
(<| (_.covering /._)
(_.for [/.Row])
(do {! random.monad}
- [size (\ ! map (|>> (n.% 100) inc) random.nat)]
+ [size (\ ! map (|>> (n.% 100) ++) random.nat)]
($_ _.and
..signatures
..whole
@@ -158,28 +158,28 @@
(and (list.every? (/.member? n.equivalence sample)
(/.list sample))
(not (/.member? n.equivalence sample non_member))))
- (_.cover [/.add]
- (let [added (/.add non_member sample)
+ (_.cover [/.suffix]
+ (let [added (/.suffix non_member sample)
size_increases!
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size added))
is_a_member!
(/.member? n.equivalence added non_member)]
(and size_increases!
is_a_member!)))
- (_.cover [/.pop]
+ (_.cover [/.prefix]
(if (/.empty? sample)
- (/.empty? (/.pop sample))
+ (/.empty? (/.prefix sample))
(let [expected_size!
- (n.= (dec (/.size sample))
- (/.size (/.pop sample)))
+ (n.= (-- (/.size sample))
+ (/.size (/.prefix sample)))
symmetry!
(|> sample
- (/.add non_member)
- /.pop
+ (/.suffix non_member)
+ /.prefix
(/\= sample))]
(and expected_size!
symmetry!))))
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index ebac1772b..fc67cf27d 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -46,7 +46,7 @@
(do {! random.monad}
[repeated random.nat
index (\ ! map (n.% 100) random.nat)
- size (\ ! map (|>> (n.% 10) inc) random.nat)
+ size (\ ! map (|>> (n.% 10) ++) random.nat)
offset (\ ! map (n.% 100) random.nat)
cycle_start random.nat
cycle_next (random.list size random.nat)]
@@ -58,65 +58,65 @@
(_.cover [/.item]
(n.= (n.+ offset index)
- (/.item index (..iterations inc offset))))
+ (/.item index (..iterations ++ offset))))
(_.cover [/.repeated]
(n.= repeated
(/.item index (/.repeated repeated))))
(_.cover [/.first]
- (list\= (enum.range n.enum offset (dec (n.+ size offset)))
- (/.first size (..iterations inc offset))))
+ (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (/.first size (..iterations ++ offset))))
(_.cover [/.after]
- (list\= (enum.range n.enum offset (dec (n.+ size offset)))
- (/.first size (/.after offset (..iterations inc 0)))))
+ (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (/.first size (/.after offset (..iterations ++ 0)))))
(_.cover [/.split_at]
- (let [[drops takes] (/.split_at size (..iterations inc 0))]
- (and (list\= (enum.range n.enum 0 (dec size))
+ (let [[drops takes] (/.split_at size (..iterations ++ 0))]
+ (and (list\= (enum.range n.enum 0 (-- size))
drops)
- (list\= (enum.range n.enum size (dec (n.* 2 size)))
+ (list\= (enum.range n.enum size (-- (n.* 2 size)))
(/.first size takes)))))
(_.cover [/.while]
- (list\= (enum.range n.enum 0 (dec size))
- (/.while (n.< size) (..iterations inc 0))))
+ (list\= (enum.range n.enum 0 (-- size))
+ (/.while (n.< size) (..iterations ++ 0))))
(_.cover [/.until]
- (list\= (enum.range n.enum offset (dec (n.+ size offset)))
+ (list\= (enum.range n.enum offset (-- (n.+ size offset)))
(/.while (n.< (n.+ size offset))
- (/.until (n.< offset) (..iterations inc 0)))))
+ (/.until (n.< offset) (..iterations ++ 0)))))
(_.cover [/.split_when]
- (let [[drops takes] (/.split_when (n.= size) (..iterations inc 0))]
- (and (list\= (enum.range n.enum 0 (dec size))
+ (let [[drops takes] (/.split_when (n.= size) (..iterations ++ 0))]
+ (and (list\= (enum.range n.enum 0 (-- size))
drops)
- (list\= (enum.range n.enum size (dec (n.* 2 size)))
+ (list\= (enum.range n.enum size (-- (n.* 2 size)))
(/.while (n.< (n.* 2 size)) takes)))))
(_.cover [/.head]
(n.= offset
- (/.head (..iterations inc offset))))
+ (/.head (..iterations ++ offset))))
(_.cover [/.tail]
- (list\= (enum.range n.enum (inc offset) (n.+ size offset))
- (/.first size (/.tail (..iterations inc offset)))))
+ (list\= (enum.range n.enum (++ offset) (n.+ size offset))
+ (/.first size (/.tail (..iterations ++ offset)))))
(_.cover [/.only]
- (list\= (list\map (n.* 2) (enum.range n.enum 0 (dec size)))
- (/.first size (/.only n.even? (..iterations inc 0)))))
+ (list\= (list\map (n.* 2) (enum.range n.enum 0 (-- size)))
+ (/.first size (/.only n.even? (..iterations ++ 0)))))
(_.cover [/.partition]
- (let [[evens odds] (/.partition n.even? (..iterations inc 0))]
+ (let [[evens odds] (/.partition n.even? (..iterations ++ 0))]
(and (n.= (n.* 2 offset)
(/.item offset evens))
- (n.= (inc (n.* 2 offset))
+ (n.= (++ (n.* 2 offset))
(/.item offset odds)))))
(_.cover [/.iterations]
(let [(^open "/\.") /.functor
(^open "list\.") (list.equivalence text.equivalence)]
(list\= (/.first size
- (/\map %.nat (..iterations inc offset)))
+ (/\map %.nat (..iterations ++ offset)))
(/.first size
- (/.iterations (function (_ n) [(inc n) (%.nat n)])
+ (/.iterations (function (_ n) [(++ n) (%.nat n)])
offset)))))
(_.cover [/.cycle]
(let [cycle (list& cycle_start cycle_next)]
- (list\= (list.joined (list.repeated size cycle))
+ (list\= (list.together (list.repeated size cycle))
(/.first (n.* size (list.size cycle))
(/.cycle [cycle_start cycle_next])))))
(_.cover [/.^sequence&]
- (let [(/.^sequence& first second third next) (..iterations inc offset)]
+ (let [(/.^sequence& first second third next) (..iterations ++ offset)]
(and (n.= offset first)
(n.= (n.+ 1 offset) second)
(n.= (n.+ 2 offset) third))))
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index e6dbd5c3d..66ecd0ca3 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -80,7 +80,7 @@
(/.member? (/.has non_memberL setL) non_memberL)
size_increase!
- (n.= (inc (/.size setL))
+ (n.= (++ (/.size setL))
(/.size (/.has non_memberL setL)))]
(and before_addition!
after_addition!)))
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 09c7c2cd5..4ca359ddb 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -23,7 +23,7 @@
(def: count
(Random Nat)
- (\ random.monad map (|>> (n.% 10) inc) random.nat))
+ (\ random.monad map (|>> (n.% 10) ++) random.nat))
(def: .public (random size hash count element)
(All [a] (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a))))
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 725c4b3c0..b753ac1af 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -31,7 +31,7 @@
_
(do random.monad
- [partial (random (dec size) &order gen_value)
+ [partial (random (-- size) &order gen_value)
value (random.only (|>> (/.member? partial) not)
gen_value)]
(in (/.has value partial)))))
@@ -95,7 +95,7 @@
(let [setL+ (/.has non_memberL setL)]
(and (not (/.member? setL non_memberL))
(/.member? setL+ non_memberL)
- (n.= (inc (/.size setL))
+ (n.= (++ (/.size setL))
(/.size setL+)))))
(_.cover [/.lacks]
(|> setL
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index a4e73fb03..2b20582e9 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -188,9 +188,9 @@
(n.= expected)))
(_.cover [/.update]
(|> (/.zipper (tree.leaf expected))
- (/.update inc)
+ (/.update ++)
/.value
- (n.= (inc expected))))
+ (n.= (++ expected))))
..move
(_.cover [/.end?]
(or (/.end? (/.zipper sample))
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index a4fc0911e..67158dc10 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -135,7 +135,7 @@
random.safe_frac)
.let [eS +0.5]
variations (\ ! map (|>> (n.% 3) (n.+ 2)) random.nat)
- .let [max_spread (f./ (|> variations inc .int int.frac)
+ .let [max_spread (f./ (|> variations ++ .int int.frac)
+1.0)
min_spread (f./ +2.0 max_spread)
spread_space (f.- min_spread max_spread)]
@@ -206,8 +206,8 @@
(_.for [/.Alpha /.Pigment]
($_ _.and
(_.cover [/.transparent /.opaque]
- (and (r.= /.opaque (dec /.transparent))
- (r.= /.transparent (inc /.opaque))))
+ (and (r.= /.opaque (-- /.transparent))
+ (r.= /.transparent (++ /.opaque))))
(_.cover [/.translucent]
(r.= /.transparent (r.+ /.translucent /.translucent)))
))
diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux
index aaf1fcab8..4e400e99c 100644
--- a/stdlib/source/test/lux/data/color/named.lux
+++ b/stdlib/source/test/lux/data/color/named.lux
@@ -201,13 +201,13 @@
/.yellow_green]]
)]
(def: all_colors
- (list.joined (`` (list (~~ (template [<definition> <by_letter>]
- [((: (-> Any (List //.Color))
- (function (_ _)
- (`` (list (~~ (template.spliced <by_letter>))))))
- 123)]
-
- <colors>))))))
+ (list.together (`` (list (~~ (template [<definition> <by_letter>]
+ [((: (-> Any (List //.Color))
+ (function (_ _)
+ (`` (list (~~ (template.spliced <by_letter>))))))
+ 123)]
+
+ <colors>))))))
(def: unique_colors
(set.of_list //.hash ..all_colors))
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index fe0083c95..9bed1f5ed 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -41,7 +41,7 @@
(_.for [/.Path]
(do {! random.monad}
[expected (random.ascii/lower /.path_size)
- invalid (random.ascii/lower (inc /.path_size))
+ invalid (random.ascii/lower (++ /.path_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
/.path_size)]
(`` ($_ _.and
@@ -76,7 +76,7 @@
(_.for [/.Name]
(do {! random.monad}
[expected (random.ascii/lower /.name_size)
- invalid (random.ascii/lower (inc /.name_size))
+ invalid (random.ascii/lower (++ /.name_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
/.name_size)]
(`` ($_ _.and
@@ -157,14 +157,14 @@
(def: entry
Test
(do {! random.monad}
- [expected_path (random.ascii/lower (dec /.path_size))
+ [expected_path (random.ascii/lower (-- /.path_size))
expected_moment (\ ! map (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
random.nat)
chunk (random.ascii/lower chunk_size)
chunks (\ ! map (n.% 100) random.nat)
.let [content (|> chunk
(list.repeated chunks)
- text.joined
+ text.together
(\ utf8.codec encode))]]
(`` ($_ _.and
(~~ (template [<type> <tag>]
@@ -317,7 +317,7 @@
(do {! random.monad}
[path (random.ascii/lower /.path_size)
expected (random.ascii/lower /.name_size)
- invalid (random.ascii/lower (inc /.name_size))
+ invalid (random.ascii/lower (++ /.name_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
/.name_size)]
(_.for [/.Ownership /.Owner /.ID]
@@ -354,9 +354,9 @@
(in (case (row.list tar)
(^ (list (#/.Normal [_ _ _ actual_ownership _])))
(and (text\= (/.from_name expected)
- (/.from_name (get@ [#/.user #/.name] actual_ownership)))
+ (/.from_name (value@ [#/.user #/.name] actual_ownership)))
(text\= (/.from_name /.anonymous)
- (/.from_name (get@ [#/.group #/.name] actual_ownership))))
+ (/.from_name (value@ [#/.group #/.name] actual_ownership))))
_
false)))
@@ -378,13 +378,13 @@
(in (case (row.list tar)
(^ (list (#/.Normal [_ _ _ actual_ownership _])))
(and (text\= (/.from_name /.anonymous)
- (/.from_name (get@ [#/.user #/.name] actual_ownership)))
+ (/.from_name (value@ [#/.user #/.name] actual_ownership)))
(n.= (/.from_small /.no_id)
- (/.from_small (get@ [#/.user #/.id] actual_ownership)))
+ (/.from_small (value@ [#/.user #/.id] actual_ownership)))
(text\= (/.from_name /.anonymous)
- (/.from_name (get@ [#/.group #/.name] actual_ownership)))
+ (/.from_name (value@ [#/.group #/.name] actual_ownership)))
(n.= (/.from_small /.no_id)
- (/.from_small (get@ [#/.group #/.id] actual_ownership))))
+ (/.from_small (value@ [#/.group #/.id] actual_ownership))))
_
false)))
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index 9d9b9e248..b779678af 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -40,8 +40,8 @@
(n.= expected (/.left [expected dummy])))
(<| (_.cover [/.right])
(n.= expected (/.right [dummy expected])))
- (<| (_.cover [/.fork])
- (let [[left right] ((/.fork (n.+ shift) (n.- shift)) expected)]
+ (<| (_.cover [/.forked])
+ (let [[left right] ((/.forked (n.+ shift) (n.- shift)) expected)]
(and (n.= (n.+ shift expected)
left)
(n.= (n.- shift expected)
@@ -62,8 +62,8 @@
(<| (_.cover [/.curried])
(n.= (n.+ left right)
((/.curried (/.uncurried n.+)) left right)))
- (<| (_.cover [/.apply])
- (let [[left' right'] (/.apply (n.+ shift) (n.- shift) [left right])]
+ (<| (_.cover [/.then])
+ (let [[left' right'] (/.then (n.+ shift) (n.- shift) [left right])]
(and (n.= (n.+ shift left) left')
(n.= (n.- shift right) right'))))))
))))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index ddb924273..61b9c43a1 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -60,14 +60,14 @@
(: (Or Nat Nat))
(/.either (n.+ shift) (n.- shift))
(n.= (n.- shift expected)))))
- (_.cover [/.apply]
+ (_.cover [/.then]
(and (|> (/.left expected)
(: (Or Nat Nat))
- (/.apply (n.+ shift) (n.- shift))
+ (/.then (n.+ shift) (n.- shift))
(case> (0 #0 actual) (n.= (n.+ shift expected) actual) _ false))
(|> (/.right expected)
(: (Or Nat Nat))
- (/.apply (n.+ shift) (n.- shift))
+ (/.then (n.+ shift) (n.- shift))
(case> (0 #1 actual) (n.= (n.- shift expected) actual) _ false))))
(do !
[size (\ ! map (n.% 5) random.nat)
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index aa012a5ae..51849d1af 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -57,7 +57,7 @@
left (random.unicode 1)
right (random.unicode 1)
.let [full (\ /.monoid compose inner outer)
- fake_index (dec 0)]]
+ fake_index (-- 0)]]
(`` ($_ _.and
(~~ (template [<affix> <predicate>]
[(_.cover [<affix> <predicate>]
@@ -83,7 +83,7 @@
[inner (random.unicode 1)
outer (random.only (|>> (\ /.equivalence = inner) not)
(random.unicode 1))
- .let [fake_index (dec 0)]]
+ .let [fake_index (-- 0)]]
($_ _.and
(_.cover [/.contains?]
(let [full (\ /.monoid compose inner outer)]
@@ -146,9 +146,9 @@
(\ /.equivalence = /.new_line /.line_feed))
)))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) inc) random.nat)
+ [size (\ ! map (|>> (n.% 10) ++) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
- .let [sample (|> characters set.list /.joined)]
+ .let [sample (|> characters set.list /.together)]
expected (\ ! map (n.% size) random.nat)]
(_.cover [/.char]
(case (/.char expected sample)
@@ -182,7 +182,7 @@
characters (random.set /.hash size (random.ascii/alpha 1))
separator (random.only (|>> (set.member? characters) not)
(random.ascii/alpha 1))
- .let [with_no_separator (|> characters set.list /.joined)]
+ .let [with_no_separator (|> characters set.list /.together)]
static (random.ascii/alpha 1)
.let [dynamic (random.only (|>> (\ /.equivalence = static) not)
(random.ascii/alpha 1))]
@@ -192,9 +192,9 @@
lower (random.ascii/lower 1)
upper (random.ascii/upper 1)]
($_ _.and
- (_.cover [/.joined]
+ (_.cover [/.together]
(n.= (set.size characters)
- (/.size (/.joined (set.list characters)))))
+ (/.size (/.together (set.list characters)))))
(_.cover [/.interposed /.all_split_by]
(and (|> (set.list characters)
(/.interposed separator)
@@ -202,7 +202,7 @@
(set.of_list /.hash)
(\ set.equivalence = characters))
(\ /.equivalence =
- (/.joined (set.list characters))
+ (/.together (set.list characters))
(/.interposed "" (set.list characters)))))
(_.cover [/.replaced/1]
(\ /.equivalence =
@@ -285,7 +285,7 @@
sampleL (random.unicode sizeL)
sampleR (random.unicode sizeR)
middle (random.unicode 1)
- .let [sample (/.joined (list sampleL sampleR))
+ .let [sample (/.together (list sampleL sampleR))
(^open "/\.") /.equivalence]]
($_ _.and
(_.cover [/.split_at]
@@ -293,7 +293,7 @@
(case> (#.Right [_l _r])
(and (/\= sampleL _l)
(/\= sampleR _r)
- (/\= sample (/.joined (list _l _r))))
+ (/\= sample (/.together (list _l _r))))
_
#0)))
@@ -323,8 +323,8 @@
.let [part_gen (|> (random.text normal_char_gen sizeP)
(random.only (|>> (/.contains? sep1) not)))]
parts (random.list sizeL part_gen)
- .let [sample1 (/.joined (list.interposed sep1 parts))
- sample2 (/.joined (list.interposed sep2 parts))
+ .let [sample1 (/.together (list.interposed sep1 parts))
+ sample2 (/.together (list.interposed sep2 parts))
(^open "/\.") /.equivalence]]
(_.cover [/.replaced]
(/\= sample2
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index 393a20779..7d502d2fb 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -17,7 +17,7 @@
(def: part
(Random Text)
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) inc) random.nat)]
+ [size (\ ! map (|>> (n.% 10) ++) random.nat)]
(random.ascii/alpha size)))
(def: .public test
@@ -31,14 +31,14 @@
($_ _.and
(_.cover [/.empty]
(n.= 0(/.size /.empty)))
- (_.cover [/.size /.append]
+ (_.cover [/.size /.then]
(n.= (text.size left)
- (/.size (/.append left /.empty))))
+ (/.size (/.then left /.empty))))
(_.cover [/.text]
(text\= (format left mid right)
(|> /.empty
- (/.append left)
- (/.append mid)
- (/.append right)
+ (/.then left)
+ (/.then mid)
+ (/.then right)
/.text)))
))))
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index 46dba6ded..432e98257 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -190,7 +190,7 @@
<encodings>)]
(def: all_encodings
- (list.joined (list <named>)))
+ (list.together (list <named>)))
(def: unique_encodings
(list\fold (function (_ encoding set)
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index dcb562a3e..707a06996 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -44,15 +44,15 @@
(def: over_range
(Random Char)
- (..range (hex "FFFF") (inc (debug.private /.ascii_top))))
+ (..range (hex "FFFF") (++ (debug.private /.ascii_top))))
(def: in_range
(Random Char)
- (..range (inc (debug.private /.ascii_top)) (debug.private /.ascii_bottom)))
+ (..range (++ (debug.private /.ascii_top)) (debug.private /.ascii_bottom)))
(def: ascii_range
(Random Char)
- (..range (inc (debug.private /.ascii_top)) 0))
+ (..range (++ (debug.private /.ascii_top)) 0))
(def: valid_sigils
(Set Char)
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index db419c3dc..926a56446 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -157,7 +157,7 @@
[(def: <definition>
Test
(`` (_.cover [(~~ (template.spliced <part>))]
- (let [all (list.joined (list <named>))
+ (let [all (list.together (list <named>))
unique (set.of_list /.hash all)]
(n.= (list.size all)
(set.size unique))))))]
@@ -173,7 +173,7 @@
[.let [top_start (hex "AC00")
top_end (hex "D7AF")
end_range (n.- top_start top_end)]
- start (\ ! map (|>> (n.% top_start) inc) random.nat)
+ start (\ ! map (|>> (n.% top_start) ++) random.nat)
end (\ ! map (|>> (n.% end_range) (n.+ top_start)) random.nat)
.let [additional (n.- start end)
sample (/.block start additional)
@@ -199,12 +199,12 @@
(n.= end
(/.end sample)))
(_.cover [/.size]
- (n.= (inc additional)
+ (n.= (++ additional)
(/.size sample)))
(_.cover [/.within?]
(and (/.within? sample inside)
- (not (/.within? sample (dec (/.start sample))))
- (not (/.within? sample (inc (/.end sample))))))
+ (not (/.within? sample (-- (/.start sample))))
+ (not (/.within? sample (++ (/.end sample))))))
(~~ (template [<definition> <part>]
[<definition>]
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index 84ebef798..b0be9c914 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -80,8 +80,8 @@
end (/.end <set>)]]
(_.cover [<set>]
(and (/.member? <set> char)
- (not (/.member? <set> (dec start)))
- (not (/.member? <set> (inc end))))))]
+ (not (/.member? <set> (-- start)))
+ (not (/.member? <set> (++ end))))))]
[/.ascii]
[/.ascii/alpha]
diff --git a/stdlib/source/test/lux/documentation.lux b/stdlib/source/test/lux/documentation.lux
index 72417f5c5..6efd24021 100644
--- a/stdlib/source/test/lux/documentation.lux
+++ b/stdlib/source/test/lux/documentation.lux
@@ -54,19 +54,19 @@
(_.cover [/.default]
(let [definition (`` (/.default (~~ (template.identifier [.._] [g!default]))))]
(and (|> definition
- (get@ #/.definition)
+ (value@ #/.definition)
(text\= (template.text [g!default])))
(|> definition
- (get@ #/.documentation)
+ (value@ #/.documentation)
md.markdown
(text\= "")
not))))
(_.cover [/.documentation:]
(and (|> ..documentation:
- (get@ #/.definition)
+ (value@ #/.definition)
(text\= (template.text [/.documentation:])))
(|> ..documentation:
- (get@ #/.documentation)
+ (value@ #/.documentation)
md.markdown
(text.contains? 'definition_description'))))
))
@@ -87,12 +87,12 @@
(/.documentation super))
(text.contains? (template.text ['super_description'])
(/.documentation super))
- (text.contains? (md.markdown (get@ #/.documentation ..documentation:))
+ (text.contains? (md.markdown (value@ #/.documentation ..documentation:))
(/.documentation super)))))
))
(_.cover [/.unqualified_identifier]
(`` (and (~~ (template [<example>]
- [(<| (text.contains? (get@ #exception.label /.unqualified_identifier))
+ [(<| (text.contains? (value@ #exception.label /.unqualified_identifier))
macro_error
<example>)]
diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux
index 55c812d72..41a794c4e 100644
--- a/stdlib/source/test/lux/ffi.jvm.lux
+++ b/stdlib/source/test/lux/ffi.jvm.lux
@@ -110,24 +110,24 @@
idx (|> random.nat (\ ! map (n.% size)))
value (\ ! map (|>> (:as java/lang/Long)) random.int)]
($_ _.and
- (_.cover [/.array /.array_length]
+ (_.cover [/.array /.length]
(|> size
(/.array java/lang/Long)
- /.array_length
+ /.length
(n.= size)))
- (_.cover [/.array_write /.array_read]
+ (_.cover [/.write! /.read!]
(|> (/.array java/lang/Long size)
- (/.array_write idx value)
- (/.array_read idx)
+ (/.write! idx value)
+ (/.read! idx)
(:as Int)
(i.= (:as Int value))))
(_.cover [/.cannot_convert_to_jvm_type]
(let [array (:as (Array Nothing)
(array.empty 1))]
(|> array
- /.array_length
+ /.length
..macro_error
- (text.contains? (get@ #exception.label /.cannot_convert_to_jvm_type))))))))
+ (text.contains? (value@ #exception.label /.cannot_convert_to_jvm_type))))))))
(def: for_miscellaneous
Test
@@ -198,7 +198,7 @@
[/.Character /.char character character\=]
))
(_.cover [/.cannot_cast_to_non_object]
- (text.contains? (get@ #exception.label /.cannot_cast_to_non_object)
+ (text.contains? (value@ #exception.label /.cannot_cast_to_non_object)
(macro_error (/.:as boolean (: /.Boolean boolean)))))
(_.cover [/.:as]
(|> string
diff --git a/stdlib/source/test/lux/ffi.old.lux b/stdlib/source/test/lux/ffi.old.lux
index 9ca7d80b3..701828389 100644
--- a/stdlib/source/test/lux/ffi.old.lux
+++ b/stdlib/source/test/lux/ffi.old.lux
@@ -160,12 +160,12 @@
idx (|> random.nat (\ ! map (n.% size)))
value random.int]
($_ _.and
- (_.cover [/.array /.array_length]
- (n.= size (/.array_length (/.array java/lang/Long size))))
- (_.cover [/.array_write /.array_read]
+ (_.cover [/.array /.length]
+ (n.= size (/.length (/.array java/lang/Long size))))
+ (_.cover [/.write! /.read!]
(|> (/.array java/lang/Long size)
- (/.array_write idx value)
- (/.array_read idx)
+ (/.write! idx value)
+ (/.read! idx)
(i.= value)))
)))
diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux
index 29389ae9f..e6ded5090 100644
--- a/stdlib/source/test/lux/locale/language.lux
+++ b/stdlib/source/test/lux/locale/language.lux
@@ -189,7 +189,7 @@
(List Bundle)
[Nat (Set a)]))
(list\fold (function (_ bundle [amount set])
- [(n.+ amount (get@ #amount bundle))
+ [(n.+ amount (value@ #amount bundle))
(set.union set (lens bundle))])
[0 (set.empty hash)]
territories))
@@ -198,11 +198,11 @@
Test
(|> ..languages
list.reversed
- (list\map (get@ #test))
+ (list\map (value@ #test))
(list\fold _.and
(`` ($_ _.and
(~~ (template [<lens> <tag> <hash>]
- [(let [[amount set] (..aggregate (get@ <tag>) <hash> ..languages)]
+ [(let [[amount set] (..aggregate (value@ <tag>) <hash> ..languages)]
(_.cover [<lens>]
(n.= amount (set.size set))))]
@@ -278,8 +278,8 @@
(def: .public random
(Random /.Language)
(let [options (|> ..languages
- (list\map (|>> (get@ #languages) set.list))
- list.joined)]
+ (list\map (|>> (value@ #languages) set.list))
+ list.together)]
(do {! random.monad}
[choice (\ ! map (n.% (list.size options))
random.nat)]
diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux
index fa7aff326..d25308c49 100644
--- a/stdlib/source/test/lux/locale/territory.lux
+++ b/stdlib/source/test/lux/locale/territory.lux
@@ -144,7 +144,7 @@
(List Bundle)
[Nat (Set a)]))
(list\fold (function (_ bundle [amount set])
- [(n.+ amount (get@ #amount bundle))
+ [(n.+ amount (value@ #amount bundle))
(set.union set (lens bundle))])
[0 (set.empty hash)]
territories))
@@ -153,11 +153,11 @@
Test
(|> ..territories
list.reversed
- (list\map (get@ #test))
+ (list\map (value@ #test))
(list\fold _.and
(`` ($_ _.and
(~~ (template [<lens> <tag> <hash>]
- [(let [[amount set] (..aggregate (get@ <tag>) <hash> ..territories)]
+ [(let [[amount set] (..aggregate (value@ <tag>) <hash> ..territories)]
(_.cover [<lens>]
(n.= amount (set.size set))))]
@@ -204,8 +204,8 @@
(def: .public random
(Random /.Territory)
(let [options (|> ..territories
- (list\map (|>> (get@ #territories) set.list))
- list.joined)]
+ (list\map (|>> (value@ #territories) set.list))
+ list.together)]
(do {! random.monad}
[choice (\ ! map (n.% (list.size options))
random.nat)]
diff --git a/stdlib/source/test/lux/macro/local.lux b/stdlib/source/test/lux/macro/local.lux
index 1ab20df9a..c097f7676 100644
--- a/stdlib/source/test/lux/macro/local.lux
+++ b/stdlib/source/test/lux/macro/local.lux
@@ -52,9 +52,9 @@
[module short] (meta.normal name)
_ (if pre_remove
(let [remove_macro! (: (-> .Module .Module)
- (update@ #.definitions (plist.lacks short)))]
+ (revised@ #.definitions (plist.lacks short)))]
(function (_ lux)
- (#try.Success [(update@ #.modules (plist.revised module remove_macro!) lux)
+ (#try.Success [(revised@ #.modules (plist.revised module remove_macro!) lux)
[]])))
(in []))]
(let [pre_expansion (` (let [(~ g!output) (~ body)]
diff --git a/stdlib/source/test/lux/macro/syntax/check.lux b/stdlib/source/test/lux/macro/syntax/check.lux
index f9cbab99e..c2bfd9896 100644
--- a/stdlib/source/test/lux/macro/syntax/check.lux
+++ b/stdlib/source/test/lux/macro/syntax/check.lux
@@ -44,5 +44,5 @@
false
(#try.Success check)
- (and (code\= type (get@ #/.type check))
- (code\= value (get@ #/.value check)))))))))
+ (and (code\= type (value@ #/.type check))
+ (code\= value (value@ #/.value check)))))))))
diff --git a/stdlib/source/test/lux/macro/syntax/definition.lux b/stdlib/source/test/lux/macro/syntax/definition.lux
index ae7d5d3e5..11074fbc7 100644
--- a/stdlib/source/test/lux/macro/syntax/definition.lux
+++ b/stdlib/source/test/lux/macro/syntax/definition.lux
@@ -76,7 +76,7 @@
(#try.Success actual)
(\ /.equivalence = expected actual)))
(_.cover [/.typed]
- (let [expected (set@ #/.value (#.Left [type untyped_value]) expected)]
+ (let [expected (with@ #/.value (#.Left [type untyped_value]) expected)]
(case (<code>.result (/.typed compiler)
(list (/.format expected)))
(#try.Failure error)
@@ -85,7 +85,7 @@
(#try.Success actual)
(\ /.equivalence = expected actual))))
(_.cover [/.lacks_type!]
- (let [expected (set@ #/.value (#.Right untyped_value) expected)]
+ (let [expected (with@ #/.value (#.Right untyped_value) expected)]
(case (<code>.result (/.typed compiler)
(list (/.format expected)))
(#try.Failure error)
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index f1bbc7fa6..8aeb528f5 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -92,7 +92,7 @@
(do {! random.monad}
[.let [~= (f.approximately? ..margin_of_error)]
sample (\ ! map (f.* +10.0) random.safe_frac)
- power (\ ! map (|>> (n.% 10) inc n.frac) random.nat)]
+ power (\ ! map (|>> (n.% 10) ++ n.frac) random.nat)]
($_ _.and
(_.cover [/.exp /.log]
(|> sample /.exp /.log (f.approximately? +0.000000000000001 sample)))
@@ -160,7 +160,7 @@
(~= (f.opposite tau/4) (/.atan/2 +0.0 (f.opposite (f.abs y))))
(f.not_a_number? (/.atan/2 +0.0 +0.0))))))
(do {! random.monad}
- [of (\ ! map (|>> (n.% 10) inc) random.nat)]
+ [of (\ ! map (|>> (n.% 10) ++) random.nat)]
(_.cover [/.factorial]
(and (n.= 1 (/.factorial 0))
(|> (/.factorial of) (n.% of) (n.= 0)))))
diff --git a/stdlib/source/test/lux/math/logic/continuous.lux b/stdlib/source/test/lux/math/logic/continuous.lux
index a49e5c7d8..cd168fc4c 100644
--- a/stdlib/source/test/lux/math/logic/continuous.lux
+++ b/stdlib/source/test/lux/math/logic/continuous.lux
@@ -31,10 +31,10 @@
(_.cover [/.true /.false]
(let [true=max!
- (r.= /.false (inc /.true))
+ (r.= /.false (++ /.true))
false=min!
- (r.= /.true (dec /.false))]
+ (r.= /.true (-- /.false))]
(and true=max!
false=min!)))
(_.cover [/.or]
diff --git a/stdlib/source/test/lux/math/modulus.lux b/stdlib/source/test/lux/math/modulus.lux
index f1e731975..ae3bbb8e1 100644
--- a/stdlib/source/test/lux/math/modulus.lux
+++ b/stdlib/source/test/lux/math/modulus.lux
@@ -63,6 +63,6 @@
(/.literal <divisor>))))
(_.cover [/.congruent?]
(and (/.congruent? modulus dividend dividend)
- (or (not (/.congruent? modulus dividend (inc dividend)))
+ (or (not (/.congruent? modulus dividend (++ dividend)))
(i.= +1 (/.divisor modulus)))))
))))
diff --git a/stdlib/source/test/lux/math/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux
index 77cafc155..70706538d 100644
--- a/stdlib/source/test/lux/math/number/complex.lux
+++ b/stdlib/source/test/lux/math/number/complex.lux
@@ -43,8 +43,8 @@
(def: angle
(Random /.Complex)
(\ random.monad map
- (|>> (update@ #/.real (f.% +1.0))
- (update@ #/.imaginary (f.% +1.0)))
+ (|>> (revised@ #/.real (f.% +1.0))
+ (revised@ #/.imaginary (f.% +1.0)))
..random))
(def: construction
@@ -55,11 +55,11 @@
($_ _.and
(_.cover [/.complex]
(and (let [r+i (/.complex real imaginary)]
- (and (f.= real (get@ #/.real r+i))
- (f.= imaginary (get@ #/.imaginary r+i))))
+ (and (f.= real (value@ #/.real r+i))
+ (f.= imaginary (value@ #/.imaginary r+i))))
(let [r+i (/.complex real)]
- (and (f.= real (get@ #/.real r+i))
- (f.= +0.0 (get@ #/.imaginary r+i))))))
+ (and (f.= real (value@ #/.real r+i))
+ (f.= +0.0 (value@ #/.imaginary r+i))))))
(_.cover [/.approximately?]
(/.approximately? ..margin_of_error
(/.complex real imaginary)
@@ -135,18 +135,18 @@
(_.cover [/.+]
(let [z (/.+ y x)]
(and (/.= z
- (/.complex (f.+ (get@ #/.real y)
- (get@ #/.real x))
- (f.+ (get@ #/.imaginary y)
- (get@ #/.imaginary x)))))))
+ (/.complex (f.+ (value@ #/.real y)
+ (value@ #/.real x))
+ (f.+ (value@ #/.imaginary y)
+ (value@ #/.imaginary x)))))))
(_.cover [/.-]
(let [normal!
(let [z (/.- y x)]
(and (/.= z
- (/.complex (f.- (get@ #/.real y)
- (get@ #/.real x))
- (f.- (get@ #/.imaginary y)
- (get@ #/.imaginary x))))))
+ (/.complex (f.- (value@ #/.real y)
+ (value@ #/.real x))
+ (f.- (value@ #/.imaginary y)
+ (value@ #/.imaginary x))))))
inverse!
(and (|> x (/.+ y) (/.- y) (/.approximately? ..margin_of_error x))
@@ -161,8 +161,8 @@
(let [rem (/.% y x)
quotient (|> x (/.- rem) (/./ y))
floored (|> quotient
- (update@ #/.real math.floor)
- (update@ #/.imaginary math.floor))]
+ (revised@ #/.real math.floor)
+ (revised@ #/.imaginary math.floor))]
(/.approximately? +0.000000000001
x
(|> quotient (/.* y) (/.+ rem)))))
@@ -175,10 +175,10 @@
($_ _.and
(_.cover [/.conjugate]
(let [cx (/.conjugate x)]
- (and (f.= (get@ #/.real x)
- (get@ #/.real cx))
- (f.= (f.opposite (get@ #/.imaginary x))
- (get@ #/.imaginary cx)))))
+ (and (f.= (value@ #/.real x)
+ (value@ #/.real cx))
+ (f.= (f.opposite (value@ #/.imaginary x))
+ (value@ #/.imaginary cx)))))
(_.cover [/.reciprocal]
(let [reciprocal!
(|> x (/.* (/.reciprocal x)) (/.approximately? ..margin_of_error /.+one))
diff --git a/stdlib/source/test/lux/math/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux
index f82250048..807a58886 100644
--- a/stdlib/source/test/lux/math/number/i16.lux
+++ b/stdlib/source/test/lux/math/number/i16.lux
@@ -23,10 +23,10 @@
(<| (_.covering /._)
(_.for [/.I16])
(do {! random.monad}
- [.let [limit (|> (dec /.width)
+ [.let [limit (|> (-- /.width)
//i64.mask
.int
- inc)]
+ ++)]
expected (\ ! map (i.% limit) random.int)]
($_ _.and
(_.for [/.equivalence]
diff --git a/stdlib/source/test/lux/math/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux
index a4c503bf7..06b2458e9 100644
--- a/stdlib/source/test/lux/math/number/i32.lux
+++ b/stdlib/source/test/lux/math/number/i32.lux
@@ -23,10 +23,10 @@
(<| (_.covering /._)
(_.for [/.I32])
(do {! random.monad}
- [.let [limit (|> (dec /.width)
+ [.let [limit (|> (-- /.width)
//i64.mask
.int
- inc)]
+ ++)]
expected (\ ! map (i.% limit) random.int)]
($_ _.and
(_.for [/.equivalence]
diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux
index d8e47745b..ac82addce 100644
--- a/stdlib/source/test/lux/math/number/i64.lux
+++ b/stdlib/source/test/lux/math/number/i64.lux
@@ -48,7 +48,7 @@
[pattern random.nat]
($_ _.and
(do !
- [idx (\ ! map (|>> (n.% (dec /.width)) inc) random.nat)]
+ [idx (\ ! map (|>> (n.% (-- /.width)) ++) random.nat)]
(_.cover [/.left_shifted /.right_shifted]
(let [nullity!
(and (\= pattern (/.left_shifted 0 pattern))
@@ -85,7 +85,7 @@
idempotency! (\= (/.and mask pattern)
(/.and mask (/.and mask pattern)))
- limit (inc (.nat mask))
+ limit (++ (.nat mask))
limit! (if (n.< limit pattern)
(\= pattern (/.and mask pattern))
(n.< limit (/.and mask pattern)))
@@ -130,10 +130,10 @@
(#.Some sub)
(do {! random.monad}
- [.let [limit (|> (dec (\ sub width))
+ [.let [limit (|> (-- (\ sub width))
/.mask
.int
- inc)]
+ ++)]
expected (\ ! map (i.% limit) random.int)
.let [random (: (All [size]
(-> (-> I64 (I64 size)) (Random (I64 size))))
@@ -199,8 +199,8 @@
(_.cover [/.ones]
(let [zero&one!
(if (/.one? idx pattern)
- (n.= (dec (/.ones pattern)) (/.ones (/.zero idx pattern)))
- (n.= (inc (/.ones pattern)) (/.ones (/.one idx pattern))))
+ (n.= (-- (/.ones pattern)) (/.ones (/.zero idx pattern)))
+ (n.= (++ (/.ones pattern)) (/.ones (/.one idx pattern))))
complementarity!
(n.= /.width
diff --git a/stdlib/source/test/lux/math/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux
index 2764f93ec..7d753733d 100644
--- a/stdlib/source/test/lux/math/number/i8.lux
+++ b/stdlib/source/test/lux/math/number/i8.lux
@@ -23,10 +23,10 @@
(<| (_.covering /._)
(_.for [/.I8])
(do {! random.monad}
- [.let [limit (|> (dec /.width)
+ [.let [limit (|> (-- /.width)
//i64.mask
.int
- inc)]
+ ++)]
expected (\ ! map (i.% limit) random.int)]
($_ _.and
(_.for [/.equivalence]
diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index 6fba4351a..3c7cb47be 100644
--- a/stdlib/source/test/lux/math/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -192,7 +192,7 @@
idempotency!
(/.= pattern (/.right_shifted i64.width pattern))
- sign_mask (i64.left_shifted (dec i64.width) 1)
+ sign_mask (i64.left_shifted (-- i64.width) 1)
mantissa_mask (i64.not sign_mask)
sign_preservation!
diff --git a/stdlib/source/test/lux/math/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux
index d6e64603e..bf4a7eb40 100644
--- a/stdlib/source/test/lux/math/number/nat.lux
+++ b/stdlib/source/test/lux/math/number/nat.lux
@@ -104,7 +104,7 @@
(/.= rem (/.% left right)))))
))
(do {! random.monad}
- [.let [random (\ ! map (|>> (/.% 1,000) inc) random.nat)]
+ [.let [random (\ ! map (|>> (/.% 1,000) ++) random.nat)]
left random
right random]
($_ _.and
diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index b0d857464..fdb68b72c 100644
--- a/stdlib/source/test/lux/math/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -99,7 +99,7 @@
divisor/0 divisor
divisor/1 (random.only (|>> (/.= divisor/0) not)
divisor)
- scale (\ ! map (|>> (n.% 10) inc)
+ scale (\ ! map (|>> (n.% 10) ++)
random.nat)]
($_ _.and
(_.cover [/./]
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 5c84f9c38..a56457c9c 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -320,7 +320,7 @@
(/.result expected_lux)
(!expect (^multi (#try.Success [actual_pre actual_post])
(and (n.= expected_seed actual_pre)
- (n.= (inc expected_seed) actual_post))))))
+ (n.= (++ expected_seed) actual_post))))))
(_.cover [/.location]
(|> /.location
(/.result expected_lux)
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index ae4685790..2a21207d4 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -1019,13 +1019,13 @@
random.nat)]
dimensions size
sizesH size
- sizesT (random.list (dec dimensions) size)
+ sizesT (random.list (-- dimensions) size)
.let [type (loop [dimensions dimensions
type (: (Type Object)
..$Object)]
(case dimensions
0 type
- _ (recur (dec dimensions) (/type.array type))))]]
+ _ (recur (-- dimensions) (/type.array type))))]]
(<| (_.lifted "MULTIANEWARRAY")
(..bytecode (|>> (:as Nat) (n.= sizesH)))
(do {! /.monad}
@@ -1051,13 +1051,13 @@
(-> (Primitive a) (Primitive z) (Bytecode Any) (-> a z) (-> z Any Bit) (Random Bit)))
(function (_ from to instruction convert test)
(do random.monad
- [input (get@ #random from)
+ [input (value@ #random from)
.let [expected (convert input)]]
(..bytecode (test expected)
(do /.monad
- [_ ((get@ #literal from) input)
+ [_ ((value@ #literal from) input)
_ instruction]
- (get@ #wrap to))))))
+ (value@ #wrap to))))))
int::= (!::= java/lang/Integer "jvm ieq" "jvm int =")
long::= (!::= java/lang/Long "jvm leq" "jvm long =")
float::= (!::= java/lang/Float "jvm feq" "jvm float =")
@@ -1321,10 +1321,10 @@
(do random.monad
[class_name ..class_name
primitive_method_name (random.ascii/upper 10)
- .let [primitive_method_type (/type.method [(list) (list) (get@ #unboxed primitive) (list)])]
+ .let [primitive_method_type (/type.method [(list) (list) (value@ #unboxed primitive) (list)])]
object_method_name (|> (random.ascii/upper 10)
(random.only (|>> (text\= primitive_method_name) not)))
- expected (get@ #random primitive)
+ expected (value@ #random primitive)
.let [$Self (/type.class class_name (list))]]
(in (case (do try.monad
[class (/class.class /version.v6_0 /class.public
@@ -1337,11 +1337,11 @@
primitive_method_type
(list)
(#.Some (do /.monad
- [_ ((get@ #literal primitive) expected)]
+ [_ ((value@ #literal primitive) expected)]
return)))
(/method.method ..method_modifier
object_method_name
- (/type.method [(list) (list) (get@ #boxed primitive) (list)])
+ (/type.method [(list) (list) (value@ #boxed primitive) (list)])
(list)
(#.Some (do /.monad
[_ (/.invokestatic $Self primitive_method_name primitive_method_type)
@@ -1351,7 +1351,7 @@
(#.Some substitute)
(substitute expected))
- _ (get@ #wrap primitive)]
+ _ (value@ #wrap primitive)]
/.areturn))))
(row.row))
.let [bytecode (format.result /class.writer class)
diff --git a/stdlib/source/test/lux/test.lux b/stdlib/source/test/lux/test.lux
index eef7b91e7..e51623e28 100644
--- a/stdlib/source/test/lux/test.lux
+++ b/stdlib/source/test/lux/test.lux
@@ -25,8 +25,8 @@
(-> Text Text Nat Nat [/.Tally Text] Bit)
(and (text.contains? expected_message/0 message)
(text.contains? expected_message/1 message)
- (n.= successes (get@ #/.successes tally))
- (n.= failures (get@ #/.failures tally))))
+ (n.= successes (value@ #/.successes tally))
+ (n.= failures (value@ #/.failures tally))))
(def: assertion
/.Test
@@ -41,10 +41,10 @@
(/.cover' [/.assertion /.Tally]
(and (text.ends_with? expected_message/0 success_message)
(text.ends_with? expected_message/0 failure_message)
- (and (n.= 1 (get@ #/.successes success_tally))
- (n.= 0 (get@ #/.failures success_tally)))
- (and (n.= 0 (get@ #/.successes failure_tally))
- (n.= 1 (get@ #/.failures failure_tally)))))))
+ (and (n.= 1 (value@ #/.successes success_tally))
+ (n.= 0 (value@ #/.failures success_tally)))
+ (and (n.= 0 (value@ #/.successes failure_tally))
+ (n.= 1 (value@ #/.failures failure_tally)))))))
(in (do async.monad
[tt (/.and' (/.assertion expected_message/0 true)
(/.assertion expected_message/1 true))
@@ -82,10 +82,10 @@
[[pre_tally pre_message] pre
[post_tally post_message] post]
(/.cover' [/.seed]
- (and (and (n.= 1 (get@ #/.successes pre_tally))
- (n.= 0 (get@ #/.failures pre_tally)))
- (and (n.= 1 (get@ #/.successes post_tally))
- (n.= 0 (get@ #/.failures post_tally)))))))))
+ (and (and (n.= 1 (value@ #/.successes pre_tally))
+ (n.= 0 (value@ #/.failures pre_tally)))
+ (and (n.= 1 (value@ #/.successes post_tally))
+ (n.= 0 (value@ #/.failures post_tally)))))))))
(def: times
/.Test
@@ -95,32 +95,32 @@
(in (do async.monad
[[tally error] times_assertion]
(/.cover' [/.must_try_test_at_least_once]
- (and (text.contains? (get@ #exception.label /.must_try_test_at_least_once) error)
- (n.= 0 (get@ #/.successes tally))
- (n.= 1 (get@ #/.failures tally)))))))
+ (and (text.contains? (value@ #exception.label /.must_try_test_at_least_once) error)
+ (n.= 0 (value@ #/.successes tally))
+ (n.= 1 (value@ #/.failures tally)))))))
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 10) inc) random.nat)
+ [expected (\ ! map (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
times_assertion (<| (/.times expected)
(do !
[_ (in [])
- .let [_ (io.run! (atom.update! inc counter))]]
+ .let [_ (io.run! (atom.update! ++ counter))]]
(/.test "" true)))]
(in (do async.monad
[[tally error] times_assertion
actual (async.future (atom.read! counter))]
(/.cover' [/.times]
(and (n.= expected actual)
- (n.= 1 (get@ #/.successes tally))
- (n.= 0 (get@ #/.failures tally)))))))
+ (n.= 1 (value@ #/.successes tally))
+ (n.= 0 (value@ #/.failures tally)))))))
))
(def: in_parallel
/.Test
($_ /.and
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 10) inc) random.nat)
+ [expected (\ ! map (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
assertion (<| /.in_parallel
@@ -128,17 +128,17 @@
(: /.Test)
(do !
[_ (in [])
- .let [_ (io.run! (atom.update! inc counter))]]
+ .let [_ (io.run! (atom.update! ++ counter))]]
(/.test "" true)))]
(in (do async.monad
[[tally error] assertion
actual (async.future (atom.read! counter))]
(/.cover' [/.in_parallel]
(and (n.= expected actual)
- (n.= expected (get@ #/.successes tally))
- (n.= 0 (get@ #/.failures tally)))))))
+ (n.= expected (value@ #/.successes tally))
+ (n.= 0 (value@ #/.failures tally)))))))
(do {! random.monad}
- [expected (\ ! map (|>> (n.% 10) inc) random.nat)
+ [expected (\ ! map (|>> (n.% 10) ++) random.nat)
.let [counter (: (Atom Nat)
(atom.atom 0))]
assertion (<| /.in_parallel
@@ -147,16 +147,16 @@
(do !
[_ (in [])
.let [_ (undefined)
- _ (io.run! (atom.update! inc counter))]]
+ _ (io.run! (atom.update! ++ counter))]]
(/.test "" true)))]
(in (do async.monad
[[tally error] assertion
actual (async.future (atom.read! counter))]
(/.cover' [/.error_during_execution]
- (let [correct_error! (text.contains? (get@ #exception.label /.error_during_execution) error)
+ (let [correct_error! (text.contains? (value@ #exception.label /.error_during_execution) error)
no_complete_run! (n.= 0 actual)
- no_successes! (n.= 0 (get@ #/.successes tally))
- ran_all_tests! (n.= expected (get@ #/.failures tally))]
+ no_successes! (n.= 0 (value@ #/.successes tally))
+ ran_all_tests! (n.= expected (value@ #/.failures tally))]
(and correct_error!
no_complete_run!
no_successes!
@@ -176,10 +176,10 @@
[[not_covering _] not_covering
[covering _] covering]
(/.cover' [/.covering]
- (and (and (set.empty? (get@ #/.expected_coverage not_covering))
- (set.empty? (get@ #/.actual_coverage not_covering)))
- (and (not (set.empty? (get@ #/.expected_coverage covering)))
- (set.empty? (get@ #/.actual_coverage covering))))))))
+ (and (and (set.empty? (value@ #/.expected_coverage not_covering))
+ (set.empty? (value@ #/.actual_coverage not_covering)))
+ (and (not (set.empty? (value@ #/.expected_coverage covering)))
+ (set.empty? (value@ #/.actual_coverage covering))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (/.cover [..dummy_target] true))]
@@ -187,10 +187,10 @@
[[not_covering _] not_covering
[covering _] covering]
(/.cover' [/.cover]
- (and (and (not (set.empty? (get@ #/.expected_coverage not_covering)))
- (not (set.member? (get@ #/.actual_coverage not_covering) (name_of ..dummy_target))))
- (and (not (set.empty? (get@ #/.expected_coverage covering)))
- (set.member? (get@ #/.actual_coverage covering) (name_of ..dummy_target))))))))
+ (and (and (not (set.empty? (value@ #/.expected_coverage not_covering)))
+ (not (set.member? (value@ #/.actual_coverage not_covering) (name_of ..dummy_target))))
+ (and (not (set.empty? (value@ #/.expected_coverage covering)))
+ (set.member? (value@ #/.actual_coverage covering) (name_of ..dummy_target))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (in (/.cover' [..dummy_target] true)))]
@@ -198,10 +198,10 @@
[[not_covering _] not_covering
[covering _] covering]
(/.cover' [/.cover']
- (and (and (not (set.empty? (get@ #/.expected_coverage not_covering)))
- (not (set.member? (get@ #/.actual_coverage not_covering) (name_of ..dummy_target))))
- (and (not (set.empty? (get@ #/.expected_coverage covering)))
- (set.member? (get@ #/.actual_coverage covering) (name_of ..dummy_target))))))))
+ (and (and (not (set.empty? (value@ #/.expected_coverage not_covering)))
+ (not (set.member? (value@ #/.actual_coverage not_covering) (name_of ..dummy_target))))
+ (and (not (set.empty? (value@ #/.expected_coverage covering)))
+ (set.member? (value@ #/.actual_coverage covering) (name_of ..dummy_target))))))))
(do random.monad
[not_covering (/.covering .._ (/.test "" true))
covering (/.covering .._ (/.for [..dummy_target] (/.test "" true)))]
@@ -209,10 +209,10 @@
[[not_covering _] not_covering
[covering _] covering]
(/.cover' [/.for]
- (and (and (not (set.empty? (get@ #/.expected_coverage not_covering)))
- (not (set.member? (get@ #/.actual_coverage not_covering) (name_of ..dummy_target))))
- (and (not (set.empty? (get@ #/.expected_coverage covering)))
- (set.member? (get@ #/.actual_coverage covering) (name_of ..dummy_target))))))))
+ (and (and (not (set.empty? (value@ #/.expected_coverage not_covering)))
+ (not (set.member? (value@ #/.actual_coverage not_covering) (name_of ..dummy_target))))
+ (and (not (set.empty? (value@ #/.expected_coverage covering)))
+ (set.member? (value@ #/.actual_coverage covering) (name_of ..dummy_target))))))))
))
(def: .public test
@@ -239,10 +239,10 @@
(/.cover' [/.test]
(and (text.ends_with? expected_message/0 success_message)
(text.ends_with? expected_message/0 failure_message)
- (and (n.= 1 (get@ #/.successes success_tally))
- (n.= 0 (get@ #/.failures success_tally)))
- (and (n.= 0 (get@ #/.successes failure_tally))
- (n.= 1 (get@ #/.failures failure_tally))))))))
+ (and (n.= 1 (value@ #/.successes success_tally))
+ (n.= 0 (value@ #/.failures success_tally)))
+ (and (n.= 0 (value@ #/.successes failure_tally))
+ (n.= 1 (value@ #/.failures failure_tally))))))))
(do !
[tt (/.and (/.test expected_message/0 true)
(/.test expected_message/1 true))
@@ -273,18 +273,18 @@
(text.contains? expected_message/0 success_message))
(and (text.contains? expected_context failure_message)
(text.contains? expected_message/0 failure_message))
- (and (n.= 1 (get@ #/.successes success_tally))
- (n.= 0 (get@ #/.failures success_tally)))
- (and (n.= 0 (get@ #/.successes failure_tally))
- (n.= 1 (get@ #/.failures failure_tally))))))))
+ (and (n.= 1 (value@ #/.successes success_tally))
+ (n.= 0 (value@ #/.failures success_tally)))
+ (and (n.= 0 (value@ #/.successes failure_tally))
+ (n.= 1 (value@ #/.failures failure_tally))))))))
(do !
[failure_assertion (/.failure expected_message/0)]
(in (do async.monad
[[failure_tally failure_message] failure_assertion]
(/.cover' [/.failure]
(and (text.contains? expected_message/0 failure_message)
- (and (n.= 0 (get@ #/.successes failure_tally))
- (n.= 1 (get@ #/.failures failure_tally))))))))
+ (and (n.= 0 (value@ #/.successes failure_tally))
+ (n.= 1 (value@ #/.failures failure_tally))))))))
(do !
[success_assertion (/.lifted expected_message/0 (in true))
failure_assertion (/.lifted expected_message/0 (in false))]
@@ -294,10 +294,10 @@
(/.cover' [/.lifted]
(and (text.contains? expected_message/0 success_message)
(text.contains? expected_message/0 failure_message)
- (and (n.= 1 (get@ #/.successes success_tally))
- (n.= 0 (get@ #/.failures success_tally)))
- (and (n.= 0 (get@ #/.successes failure_tally))
- (n.= 1 (get@ #/.failures failure_tally))))))))
+ (and (n.= 1 (value@ #/.successes success_tally))
+ (n.= 0 (value@ #/.failures success_tally)))
+ (and (n.= 0 (value@ #/.successes failure_tally))
+ (n.= 1 (value@ #/.failures failure_tally))))))))
..times
..in_parallel
..coverage
diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux
index 872e7f2ce..70bb0a93e 100644
--- a/stdlib/source/test/lux/time/date.lux
+++ b/stdlib/source/test/lux/time/date.lux
@@ -77,7 +77,7 @@
(try\map (\ /.equivalence = expected))
(try.else false))))
(do {! random.monad}
- [year (\ ! map (|>> (n.% 10,000) inc)
+ [year (\ ! map (|>> (n.% 10,000) ++)
random.nat)
month (\ ! map (|>> (n.% 10) (n.+ 13))
random.nat)
diff --git a/stdlib/source/test/lux/time/month.lux b/stdlib/source/test/lux/time/month.lux
index 18d56c088..77a0a9702 100644
--- a/stdlib/source/test/lux/time/month.lux
+++ b/stdlib/source/test/lux/time/month.lux
@@ -31,7 +31,7 @@
(Random /.Month)
(let [december (/.number #/.December)]
(|> random.nat
- (\ random.monad map (|>> (n.% december) inc))
+ (\ random.monad map (|>> (n.% december) ++))
(random.one (|>> /.by_number try.maybe)))))
(def: .public test
diff --git a/stdlib/source/test/lux/time/year.lux b/stdlib/source/test/lux/time/year.lux
index 513b1b92d..b43fb99eb 100644
--- a/stdlib/source/test/lux/time/year.lux
+++ b/stdlib/source/test/lux/time/year.lux
@@ -91,7 +91,7 @@
(and (i.= +1 (/.leaps leap))
(i.= (.int (n./ /.leap /.century))
(/.leaps century))
- (i.= (inc (i.* +4 (dec (/.leaps century))))
+ (i.= (++ (i.* +4 (-- (/.leaps century))))
(/.leaps era))))
))
)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
index aa4443cdb..92acc8672 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/case.lux
@@ -179,7 +179,7 @@
(_.test "Can analyse exhaustive pattern-matching."
(|> (analyse_pm exhaustive_branchesC)
_structure.check_succeeds))
- (let [non_exhaustive_branchesC (list.first (dec (list.size exhaustive_branchesC))
+ (let [non_exhaustive_branchesC (list.first (-- (list.size exhaustive_branchesC))
exhaustive_branchesC)]
(_.test "Will reject non-exhaustive pattern-matching."
(|> (analyse_pm non_exhaustive_branchesC)
@@ -188,7 +188,7 @@
[redundant_patterns (exhaustive_branches false variantTC inputC)
redundancy_idx (|> r.nat (\ ! map (n.% (list.size redundant_patterns))))
.let [redundant_branchesC (<| (list!map (branch outputC))
- list.joined
+ list.together
(list (list.first redundancy_idx redundant_patterns)
(list (maybe.trusted (list.item redundancy_idx redundant_patterns)))
(list.after redundancy_idx redundant_patterns)))]]
@@ -199,10 +199,10 @@
[[heterogeneousT heterogeneousC] (r.only (|>> product.left (check.subsumes? outputT) not)
_primitive.primitive)
heterogeneous_idx (|> r.nat (\ ! map (n.% (list.size exhaustive_patterns))))
- .let [heterogeneous_branchesC (list.joined (list (list.first heterogeneous_idx exhaustive_branchesC)
- (list (let [[_pattern _body] (maybe.trusted (list.item heterogeneous_idx exhaustive_branchesC))]
- [_pattern heterogeneousC]))
- (list.after (inc heterogeneous_idx) exhaustive_branchesC)))]]
+ .let [heterogeneous_branchesC (list.together (list (list.first heterogeneous_idx exhaustive_branchesC)
+ (list (let [[_pattern _body] (maybe.trusted (list.item heterogeneous_idx exhaustive_branchesC))]
+ [_pattern heterogeneousC]))
+ (list.after (++ heterogeneous_idx) exhaustive_branchesC)))]]
(_.test "Will reject pattern-matching if the bodies of the branches do not all have the same type."
(|> (analyse_pm heterogeneous_branchesC)
_structure.check_fails)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
index 42b1e366c..b0feacead 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/function.lux
@@ -92,12 +92,12 @@
partialT (type.function (list.after partial_args inputsT) outputT)
varT (#.Parameter 1)
polyT (<| (type.univ_q 1)
- (type.function (list.joined (list (list.first var_idx inputsT)
- (list varT)
- (list.after (inc var_idx) inputsT))))
+ (type.function (list.together (list (list.first var_idx inputsT)
+ (list varT)
+ (list.after (++ var_idx) inputsT))))
varT)
poly_inputT (maybe.trusted (list.item var_idx inputsT))
- partial_poly_inputsT (list.after (inc var_idx) inputsT)
+ partial_poly_inputsT (list.after (++ var_idx) inputsT)
partial_polyT1 (<| (type.function partial_poly_inputsT)
poly_inputT)
partial_polyT2 (<| (type.univ_q 1)
@@ -116,8 +116,8 @@
(|> (/.apply _primitive.phase inputsC polyT dummy_function archive.empty (' []))
(check_apply poly_inputT full_args)))
(_.test "Polymorphic partial application propagates found type-vars."
- (|> (/.apply _primitive.phase (list.first (inc var_idx) inputsC) polyT dummy_function archive.empty (' []))
- (check_apply partial_polyT1 (inc var_idx))))
+ (|> (/.apply _primitive.phase (list.first (++ var_idx) inputsC) polyT dummy_function archive.empty (' []))
+ (check_apply partial_polyT1 (++ var_idx))))
(_.test "Polymorphic partial application preserves quantification for type-vars."
(|> (/.apply _primitive.phase (list.first var_idx inputsC) polyT dummy_function archive.empty (' []))
(check_apply partial_polyT2 var_idx)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
index d27b85baf..1b8939368 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/analysis/structure.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
- [abstract ["." monad (#+ do)]]
+ [abstract
+ ["." monad (#+ do)]]
[data
["%" text/format (#+ format)]
["." name]]
@@ -54,12 +55,12 @@
(def: (check_sum' tag size variant)
(-> Tag Nat (Variant Analysis) Bit)
- (let [expected//right? (n.= (dec size) tag)
+ (let [expected//right? (n.= (-- size) tag)
expected//lefts (if expected//right?
- (dec tag)
+ (-- tag)
tag)
- actual//right? (get@ #////analysis.right? variant)
- actual//lefts (get@ #////analysis.lefts variant)]
+ actual//right? (value@ #////analysis.right? variant)
+ actual//lefts (value@ #////analysis.lefts variant)]
(and (n.= expected//lefts
actual//lefts)
(bit\= expected//right?
@@ -121,14 +122,14 @@
[size (|> r.nat (\ ! map (|>> (n.% 10) (n.max 2))))
choice (|> r.nat (\ ! map (n.% size)))
primitives (r.list size _primitive.primitive)
- +choice (|> r.nat (\ ! map (n.% (inc size))))
+ +choice (|> r.nat (\ ! map (n.% (++ size))))
[_ +valueC] _primitive.primitive
.let [variantT (type.variant (list\map product.left primitives))
[valueT valueC] (maybe.trusted (list.item choice primitives))
- +size (inc size)
- +primitives (list.joined (list (list.first choice primitives)
- (list [(#.Parameter 1) +valueC])
- (list.after choice primitives)))
+ +size (++ size)
+ +primitives (list.together (list (list.first choice primitives)
+ (list [(#.Parameter 1) +valueC])
+ (list.after choice primitives)))
[+valueT +valueC] (maybe.trusted (list.item +choice +primitives))
+variantT (type.variant (list\map product.left +primitives))]]
(<| (_.context (%.name (name_of /.sum)))
@@ -176,9 +177,9 @@
[_ +valueC] _primitive.primitive
.let [tupleT (type.tuple (list\map product.left primitives))
[singletonT singletonC] (|> primitives (list.item choice) maybe.trusted)
- +primitives (list.joined (list (list.first choice primitives)
- (list [(#.Parameter 1) +valueC])
- (list.after choice primitives)))
+ +primitives (list.together (list (list.first choice primitives)
+ (list [(#.Parameter 1) +valueC])
+ (list.after choice primitives)))
+tupleT (type.tuple (list\map product.left +primitives))]]
(<| (_.context (%.name (name_of /.product)))
($_ _.and
@@ -243,9 +244,9 @@
[choiceT choiceC] (maybe.trusted (list.item choice primitives))
[other_choiceT other_choiceC] (maybe.trusted (list.item other_choice primitives))
monoT (type.variant primitivesT)
- polyT (|> (type.variant (list.joined (list (list.first choice primitivesT)
- (list varT)
- (list.after (inc choice) primitivesT))))
+ polyT (|> (type.variant (list.together (list (list.first choice primitivesT)
+ (list varT)
+ (list.after (++ choice) primitivesT))))
(type.univ_q 1))
choice_tag (maybe.trusted (list.item choice tags))
other_choice_tag (maybe.trusted (list.item other_choice tags))]]
@@ -288,9 +289,9 @@
primitivesC (list\map product.right primitives)
monoT (#.Named [module_name type_name] (type.tuple primitivesT))
recordC (list.zipped/2 tagsC primitivesC)
- polyT (|> (type.tuple (list.joined (list (list.first choice primitivesT)
- (list varT)
- (list.after (inc choice) primitivesT))))
+ polyT (|> (type.tuple (list.together (list (list.first choice primitivesT)
+ (list varT)
+ (list.after (++ choice) primitivesT))))
(type.univ_q 1)
(#.Named [module_name type_name]))]]
(<| (_.context (%.name (name_of /.record)))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
index 224349569..b634c0115 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/case.lux
@@ -119,7 +119,7 @@
(def: random_path
(Random (analysis.Tuple synthesis.Member))
(do {! random.monad}
- [size_1 (|> random.nat (\ ! map (|>> (n.% 10) inc)))]
+ [size_1 (|> random.nat (\ ! map (|>> (n.% 10) ++)))]
(random.list size_1 ..random_member)))
(def: (get_pattern path)
@@ -136,7 +136,7 @@
(#.Right lefts)
(analysis.pattern/tuple
- (list\compose (list.repeated (inc lefts) (analysis.pattern/unit))
+ (list\compose (list.repeated (++ lefts) (analysis.pattern/unit))
(list inner)))))
(#analysis.Bind @member)
(list.reversed path))
@@ -290,7 +290,7 @@
branch (: (-> Nat Bit Text Frac Branch)
(function (_ lefts right? value body)
{#analysis.when (if right?
- (analysis.pattern/tuple (list\compose (list.repeated (inc lefts) (analysis.pattern/unit))
+ (analysis.pattern/tuple (list\compose (list.repeated (++ lefts) (analysis.pattern/unit))
(list (analysis.pattern/text value))))
(analysis.pattern/tuple ($_ list\compose
(list.repeated lefts (analysis.pattern/unit))
@@ -299,7 +299,7 @@
#analysis.then (analysis.frac body)}))]]
(in [(list\fold (function (_ left right)
(#synthesis.Alt left right))
- (path (inc mid_size) true value/last body/last)
+ (path (++ mid_size) true value/last body/last)
(|> (list.zipped/2 value/mid body/mid)
(#.Item [value/first body/first])
list.enumeration
@@ -310,8 +310,8 @@
(list\compose (|> (list.zipped/2 value/mid body/mid)
list.enumeration
(list\map (function (_ [lefts' [value body]])
- (branch (inc lefts') false value body))))
- (list (branch (inc mid_size) true value/last body/last)))]])))
+ (branch (++ lefts') false value body))))
+ (list (branch (++ mid_size) true value/last body/last)))]])))
(def: random_complex
($_ random.either
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
index 692a2fab9..a25bd787c 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/function.lux
@@ -146,7 +146,7 @@
(def: (random_variable arity output?)
(-> Arity Scenario)
(do {! random.monad}
- [register (\ ! map (|>> (n.% arity) inc) random.nat)]
+ [register (\ ! map (|>> (n.% arity) ++) random.nat)]
(in [(not (n.= 0 register))
(synthesis.variable/local register)
(if (n.= arity register)
@@ -194,20 +194,20 @@
(synthesis.path/then expected_output))
(synthesis.path/seq (synthesis.path/text text_test)
(synthesis.path/then expected_output))
- (synthesis.path/seq (synthesis.path/bind (inc arity))
+ (synthesis.path/seq (synthesis.path/bind (++ arity))
(synthesis.path/then expected_output))
($_ synthesis.path/seq
(synthesis.path/side side|member)
- (synthesis.path/bind (inc arity))
+ (synthesis.path/bind (++ arity))
(synthesis.path/then expected_output))
(if right?
($_ synthesis.path/seq
(synthesis.path/member side|member)
- (synthesis.path/bind (inc arity))
+ (synthesis.path/bind (++ arity))
(synthesis.path/then expected_output))
($_ synthesis.path/seq
(synthesis.path/member side|member)
- (synthesis.path/bind (inc arity))
+ (synthesis.path/bind (++ arity))
synthesis.path/pop
(synthesis.path/then expected_output))))])
(#analysis.Case actual_input
@@ -243,7 +243,7 @@
(in [(and loop?_input
loop?_output)
(synthesis.branch/let [expected_input
- (inc arity)
+ (++ arity)
expected_output])
(#analysis.Case actual_input
[{#analysis.when (#analysis.Bind 2)
@@ -323,7 +323,7 @@
true
(list\map product.left resets))
(synthesis.loop/scope
- {#synthesis.start (inc arity)
+ {#synthesis.start (++ arity)
#synthesis.inits (list\map (|>> product.right product.left) resets)
#synthesis.iteration expected_output})
(analysis.apply [(..n_abstraction arity actual_output)
@@ -342,7 +342,7 @@
Scenario
(do {! random.monad}
[[loop?_output expected_output actual_output] (..random_nat output?)
- arity (|> random.nat (\ ! map (|>> (n.% 5) inc)))
+ arity (|> random.nat (\ ! map (|>> (n.% 5) ++)))
.let [environment ($_ list\compose
(list\map (|>> #variable.Foreign)
(list.indices arity))
@@ -362,7 +362,7 @@
(-> Scenario Scenario)
(do {! random.monad}
[[loop?_abstraction expected_abstraction actual_abstraction] (..random_nat output?)
- arity (|> random.nat (\ ! map (|>> (n.% 5) inc)))
+ arity (|> random.nat (\ ! map (|>> (n.% 5) ++)))
inputs (random.list arity (random_value false))]
(in [(list\fold (function (_ new old)
(and new old))
@@ -418,7 +418,7 @@
(def: random_abstraction
(Random [Synthesis Analysis])
(do {! random.monad}
- [arity (|> random.nat (\ ! map (|>> (n.% 5) inc)))
+ [arity (|> random.nat (\ ! map (|>> (n.% 5) ++)))
[loop? expected_body actual_body] (random_body arity true)]
(in [(..n_function loop? arity expected_body)
(..n_abstraction arity actual_body)])))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
index 9aa7bdfe9..41dff47e9 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/loop.lux
@@ -55,7 +55,7 @@
(def: (variable offset arity next)
(Scenario Variable)
(let [local (do {! random.monad}
- [register (\ ! map (|>> (n.% arity) inc) random.nat)]
+ [register (\ ! map (|>> (n.% arity) ++) random.nat)]
(in [next
[(#variable.Local (/.register_optimization offset register))
(#variable.Local register)]]))]
@@ -139,7 +139,7 @@
[//.path/side]
[//.path/member]
))
- (random\in [(inc next)
+ (random\in [(++ next)
[(//.path/bind (/.register_optimization offset next))
(//.path/bind next)]])
))))
@@ -182,7 +182,7 @@
($_ random.either
(do {! random.monad}
[[next [recordE recordA]] (..reference offset arity next)
- path_length (\ ! map (|>> (n.% 5) inc) random.nat)
+ path_length (\ ! map (|>> (n.% 5) ++) random.nat)
path (random.list path_length random_member)]
(in [next
[(//.branch/get [path recordE])
@@ -267,7 +267,7 @@
($_ _.and
(do {! random.monad}
[expected_offset (\ ! map (|>> (n.% 5) (n.+ 2)) random.nat)
- arity (\ ! map (|>> (n.% 5) inc) random.nat)
+ arity (\ ! map (|>> (n.% 5) ++) random.nat)
expected_inits (|> random.nat
(\ ! map (|>> .i64 //.i64))
(random.list arity))
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
index a7fa786fb..014a77ac2 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/structure.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
- [abstract ["." monad (#+ do)]]
+ [abstract
+ ["." monad (#+ do)]]
[data
["%" text/format (#+ format)]
["." name]]
@@ -37,9 +38,9 @@
(do {! r.monad}
[size (|> r.nat (\ ! map (|>> (n.% 10) (n.+ 2))))
tagA (|> r.nat (\ ! map (n.% size)))
- .let [right? (n.= (dec size) tagA)
+ .let [right? (n.= (-- size) tagA)
lefts (if right?
- (dec tagA)
+ (-- tagA)
tagA)]
memberA //primitive.primitive]
(_.test "Can synthesize variants."
@@ -47,9 +48,9 @@
(//.phase archive.empty)
(phase.result [///bundle.empty ////synthesis.init])
(case> (^ (#try.Success (////synthesis.variant [leftsS right?S valueS])))
- (let [tagS (if right?S (inc leftsS) leftsS)]
+ (let [tagS (if right?S (++ leftsS) leftsS)]
(and (n.= tagA tagS)
- (|> tagS (n.= (dec size)) (bit\= right?S))
+ (|> tagS (n.= (-- size)) (bit\= right?S))
(//primitive.corresponds? memberA valueS)))
_
diff --git a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
index 2678f8f77..10a6ca270 100644
--- a/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
+++ b/stdlib/source/test/lux/tool/compiler/language/lux/phase/synthesis/variable.lux
@@ -70,9 +70,9 @@
(do !
[let? random.bit
[expected_input actual_input] (..primitive_scenario context)
- .let [fake_register (n.+ (get@ #redundants context)
- (dictionary.size (get@ #necessary context)))]
- [expected_output actual_output] (scenario (update@ #redundants inc context))]
+ .let [fake_register (n.+ (value@ #redundants context)
+ (dictionary.size (value@ #necessary context)))]
+ [expected_output actual_output] (scenario (revised@ #redundants ++ context))]
(in [(synthesis.branch/case [expected_input
(#synthesis.Seq #synthesis.Pop
(#synthesis.Then expected_output))])
@@ -95,7 +95,7 @@
(def: (tuple_scenario context)
(Scenario Synthesis)
- (let [registers (dictionary.entries (get@ #necessary context))]
+ (let [registers (dictionary.entries (value@ #necessary context))]
(\ random.monad in
[(synthesis.tuple (list\map (|>> product.left synthesis.variable/local) registers))
(synthesis.tuple (list\map (|>> product.right synthesis.variable/local) registers))])))
@@ -110,10 +110,10 @@
(do random.monad
[_ (in [])
[expected_input actual_input] (scenario context)
- .let [real_register (dictionary.size (get@ #necessary context))
- fake_register (n.+ (get@ #redundants context)
- (dictionary.size (get@ #necessary context)))]
- [expected_output actual_output] (scenario (update@ #necessary (dictionary.has real_register fake_register) context))]
+ .let [real_register (dictionary.size (value@ #necessary context))
+ fake_register (n.+ (value@ #redundants context)
+ (dictionary.size (value@ #necessary context)))]
+ [expected_output actual_output] (scenario (revised@ #necessary (dictionary.has real_register fake_register) context))]
(in [(synthesis.branch/let [expected_input real_register expected_output])
(synthesis.branch/let [actual_input fake_register actual_output])])))
@@ -143,7 +143,7 @@
(def: (get_scenario scenario context)
(-> (Scenario Synthesis) (Scenario Synthesis))
(do {! random.monad}
- [length (\ ! map (|>> (n.% 5) inc) random.nat)
+ [length (\ ! map (|>> (n.% 5) ++) random.nat)
path (random.list length ..random_member)
[expected_record actual_record] (scenario context)]
(in [(synthesis.branch/get [path expected_record])
@@ -166,10 +166,10 @@
(#synthesis.Then actual_then))]))
(do {! random.monad}
[_ (in [])
- .let [real_register (dictionary.size (get@ #necessary context))
- fake_register (n.+ (get@ #redundants context)
- (dictionary.size (get@ #necessary context)))]
- [expected_then actual_then] (scenario (update@ #necessary (dictionary.has real_register fake_register) context))]
+ .let [real_register (dictionary.size (value@ #necessary context))
+ fake_register (n.+ (value@ #redundants context)
+ (dictionary.size (value@ #necessary context)))]
+ [expected_then actual_then] (scenario (revised@ #necessary (dictionary.has real_register fake_register) context))]
(in [(#synthesis.Seq (#synthesis.Bind real_register)
(#synthesis.Seq #synthesis.Pop
(#synthesis.Then expected_then)))
@@ -238,19 +238,19 @@
(-> (Scenario Synthesis) (Scenario Synthesis))
(do {! random.monad}
[_ (in [])
- .let [real_start (dictionary.size (get@ #necessary context))
- fake_start (n.+ (get@ #redundants context)
+ .let [real_start (dictionary.size (value@ #necessary context))
+ fake_start (n.+ (value@ #redundants context)
real_start)]
inits (random.list ..scope_arity (scenario context))
- [expected_iteration actual_iteration] (scenario (update@ #necessary
- (function (_ necessary)
- (list\fold (function (_ [idx _] context)
- (dictionary.has (n.+ real_start idx)
- (n.+ fake_start idx)
- context))
- necessary
- (list.enumeration inits)))
- context))]
+ [expected_iteration actual_iteration] (scenario (revised@ #necessary
+ (function (_ necessary)
+ (list\fold (function (_ [idx _] context)
+ (dictionary.has (n.+ real_start idx)
+ (n.+ fake_start idx)
+ context))
+ necessary
+ (list.enumeration inits)))
+ context))]
(in [(synthesis.loop/scope [real_start (list\map product.left inits) expected_iteration])
(synthesis.loop/scope [fake_start (list\map product.right inits) actual_iteration])])))
@@ -273,7 +273,7 @@
(-> (Scenario Synthesis) (Scenario Synthesis))
(do {! random.monad}
[_ (in [])
- .let [registers (dictionary.entries (get@ #necessary context))
+ .let [registers (dictionary.entries (value@ #necessary context))
expected_environment (list\map (|>> product.left #variable.Local) registers)
actual_environment (list\map (|>> product.right #variable.Local) registers)]
[expected_body actual_body] (..primitive_scenario context)]
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 8c135b590..65920eca9 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -45,27 +45,32 @@
(Random Name)
(random.and ..short ..short))
-(def: .public (random parameters)
+(def: (random' parameters)
(-> Nat (Random Type))
(random.rec
(function (_ recur)
(let [pairG (random.and recur recur)
- quantifiedG (random.and (random\in (list)) recur)
un_parameterized (: (Random Type)
($_ random.either
- (random\map (|>> #.Primitive) (random.and ..short (random\in (list))))
+ (random\map (|>> #.Primitive) (random.and ..short (random.list 0 recur)))
+ (random\map (|>> #.Primitive) (random.and ..short (random.list 1 recur)))
+ (random\map (|>> #.Primitive) (random.and ..short (random.list 2 recur)))
(random\map (|>> #.Sum) pairG)
(random\map (|>> #.Product) pairG)
(random\map (|>> #.Function) pairG)
- (random\map (|>> #.UnivQ) quantifiedG)
- (random\map (|>> #.ExQ) quantifiedG)
- (random\map (|>> #.Apply) pairG)
- (random\map (|>> #.Named) (random.and ..name recur))
))]
(case parameters
0 un_parameterized
- _ (random.either un_parameterized
- (random\map (|>> (n.% parameters) #.Parameter) random.nat)))))))
+ _ (|> random.nat
+ (random\map (|>> (n.% parameters) #.Parameter))
+ (random.either un_parameterized)))))))
+
+(def: .public (random parameters)
+ (-> Nat (Random Type))
+ ($_ random.either
+ (random\map (/.univ_q parameters) (random' parameters))
+ (random\map (/.ex_q parameters) (random' parameters))
+ ))
(def: .public test
Test
@@ -98,7 +103,7 @@
_
#1)))
(list.repeated size)
- (monad.seq !))
+ (monad.all !))
.let [(^open "/\.") /.equivalence
(^open "list\.") (list.equivalence /.equivalence)]]
(`` ($_ _.and
@@ -123,7 +128,7 @@
(case> #.None #1 _ #0))))
(do {! random.monad}
[size (|> random.nat (\ ! map (n.% 3)))
- members (monad.seq ! (list.repeated size (..random 0)))
+ members (monad.all ! (list.repeated size (..random 0)))
extra (|> (..random 0)
(random.only (function (_ type)
(case type
@@ -144,7 +149,7 @@
(n.= (list.size members) (list.size tparams))))
))
(do {! random.monad}
- [size (|> random.nat (\ ! map (|>> (n.% 3) inc)))
+ [size (|> random.nat (\ ! map (|>> (n.% 3) ++)))
body_type (|> (..random 0)
(random.only (function (_ type)
(case type
@@ -170,7 +175,7 @@
(|> body_type (/.ex_q size) /.quantified?)))
)))
(do {! random.monad}
- [depth (|> random.nat (\ ! map (|>> (n.% 3) inc)))
+ [depth (|> random.nat (\ ! map (|>> (n.% 3) ++)))
element_type (|> (..random 0)
(random.only (function (_ type)
(case type
diff --git a/stdlib/source/test/lux/type/abstract.lux b/stdlib/source/test/lux/type/abstract.lux
index 6275647d0..f8fe3c6a3 100644
--- a/stdlib/source/test/lux/type/abstract.lux
+++ b/stdlib/source/test/lux/type/abstract.lux
@@ -28,7 +28,7 @@
[(syntax: (<syntax> [])
(do meta.monad
[frame <meta>]
- (in (list (code.text (get@ #/.name frame))))))]
+ (in (list (code.text (value@ #/.name frame))))))]
[current /.current]
[specific (/.specific (template.text [g!Foo]))]
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index 1875d4fc8..d148e9fdc 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -43,7 +43,7 @@
(random.rec
(function (_ recur)
(let [pairG (random.and recur recur)
- quantifiedG (random.and (random\in (list)) (type' (inc num_vars)))
+ quantifiedG (random.and (random\in (list)) (type' (++ num_vars)))
random_pair (random.either (random.either (random\map (|>> #.Sum) pairG)
(random\map (|>> #.Product) pairG))
(random.either (random\map (|>> #.Function) pairG)
@@ -52,7 +52,7 @@
(random\map (|>> #.Ex) random.nat))]
(case num_vars
0 random_id
- _ (random.either (random\map (|>> (n.% num_vars) (n.* 2) inc #.Parameter) random.nat)
+ _ (random.either (random\map (|>> (n.% num_vars) (n.* 2) ++ #.Parameter) random.nat)
random_id)))
random_quantified (random.either (random\map (|>> #.UnivQ) quantifiedG)
(random\map (|>> #.ExQ) quantifiedG))]
@@ -220,10 +220,10 @@
(do random.monad
[nominal (random.ascii/upper 10)
.let [expected (#.Primitive nominal (list))]]
- (_.cover [/.read]
+ (_.cover [/.read']
(and (|> (do /.monad
[[var_id var_type] /.var]
- (/.read var_id))
+ (/.read' var_id))
(/.result /.fresh_context)
(case> (#try.Success #.None) true
_ false))
@@ -231,14 +231,14 @@
[[var_id var/0] /.var
[_ var/1] /.var
_ (/.check var/0 var/1)]
- (/.read var_id))
+ (/.read' var_id))
(/.result /.fresh_context)
(case> (#try.Success #.None) true
_ false))
(|> (do /.monad
[[var_id var_type] /.var
_ (/.bind expected var_id)]
- (/.read var_id))
+ (/.read' var_id))
(/.result /.fresh_context)
(case> (#try.Success (#.Some actual))
(same? expected actual)
@@ -248,12 +248,12 @@
(do random.monad
[nominal (random.ascii/upper 10)
.let [expected (#.Primitive nominal (list))]]
- (_.cover [/.read!]
+ (_.cover [/.read]
(case (/.result /.fresh_context
(do /.monad
[[var_id var_type] /.var
_ (/.bind expected var_id)]
- (/.read! var_id)))
+ (/.read var_id)))
(#try.Success actual)
(same? expected actual)
@@ -266,7 +266,7 @@
(case (/.result /.fresh_context
(do /.monad
[[var_id var_type] /.var]
- (/.read! var_id)))
+ (/.read var_id)))
(#try.Failure error)
(exception.match? /.unbound_type_var error)
@@ -278,9 +278,9 @@
Test
($_ _.and
(_.cover [/.fresh_context]
- (and (n.= 0 (get@ #.var_counter /.fresh_context))
- (n.= 0 (get@ #.ex_counter /.fresh_context))
- (list.empty? (get@ #.var_bindings /.fresh_context))))
+ (and (n.= 0 (value@ #.var_counter /.fresh_context))
+ (n.= 0 (value@ #.ex_counter /.fresh_context))
+ (list.empty? (value@ #.var_bindings /.fresh_context))))
(_.cover [/.context]
(and (case (/.result /.fresh_context /.context)
(#try.Success actual)
@@ -293,9 +293,9 @@
[_ /.var]
/.context))
(#try.Success actual)
- (and (n.= 1 (get@ #.var_counter actual))
- (n.= 0 (get@ #.ex_counter actual))
- (n.= 1 (list.size (get@ #.var_bindings actual))))
+ (and (n.= 1 (value@ #.var_counter actual))
+ (n.= 0 (value@ #.ex_counter actual))
+ (n.= 1 (list.size (value@ #.var_bindings actual))))
(#try.Failure error)
false)))
@@ -305,9 +305,9 @@
[_ /.existential]
/.context))
(#try.Success actual)
- (and (n.= 0 (get@ #.var_counter actual))
- (n.= 1 (get@ #.ex_counter actual))
- (n.= 0 (list.size (get@ #.var_bindings actual))))
+ (and (n.= 0 (value@ #.var_counter actual))
+ (n.= 1 (value@ #.ex_counter actual))
+ (n.= 0 (list.size (value@ #.var_bindings actual))))
(#try.Failure error)
false))
@@ -703,7 +703,7 @@
(-> Nat (Random Type))
(do random.monad
[primitive (random.ascii/upper 3)
- parameters (random.list parameters (primitive_type (dec parameters)))]
+ parameters (random.list parameters (primitive_type (-- parameters)))]
(in (#.Primitive primitive parameters))))
(def: clean_type
diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/type/implicit.lux
index d032f19c5..f50bd57e7 100644
--- a/stdlib/source/test/lux/type/implicit.lux
+++ b/stdlib/source/test/lux/type/implicit.lux
@@ -39,8 +39,8 @@
(let [(^open "list\.") (list.equivalence n.equivalence)]
(and (bit\= (\ n.equivalence = left right)
(/.\\ = left right))
- (list\= (\ list.functor map inc (enum.range n.enum start end))
- (/.\\ map inc (enum.range n.enum start end)))))
+ (list\= (\ list.functor map ++ (enum.range n.enum start end))
+ (/.\\ map ++ (enum.range n.enum start end)))))
second_order!
(/.\\ =
diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/type/refinement.lux
index cf69e9243..5942e2a84 100644
--- a/stdlib/source/test/lux/type/refinement.lux
+++ b/stdlib/source/test/lux/type/refinement.lux
@@ -32,7 +32,7 @@
modulus (\ ! map (|>> (n.% 10) (n.+ 2)) random.nat)
.let [predicate (: (Predicate Nat)
(|>> (n.% modulus) (n.= 0)))]
- total_raws (\ ! map (|>> (n.% 20) inc) random.nat)
+ total_raws (\ ! map (|>> (n.% 20) ++) random.nat)
raws (random.list total_raws random.nat)]
($_ _.and
(_.for [/.Refiner]
@@ -60,9 +60,9 @@
(maybe\map (|>> /.value (n.= (n.+ modulus modulus))))
(maybe.else false))
(|> (/.refiner predicate modulus)
- (maybe\map (/.lifted (n.+ (inc modulus))))
+ (maybe\map (/.lifted (n.+ (++ modulus))))
maybe\join
- (maybe\map (|>> /.value (n.= (n.+ modulus (inc modulus)))))
+ (maybe\map (|>> /.value (n.= (n.+ modulus (++ modulus)))))
(maybe.else false)
not)))
(_.cover [/.only]
diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux
index 0bbff685f..0e7369716 100644
--- a/stdlib/source/test/lux/world/file/watch.lux
+++ b/stdlib/source/test/lux/world/file/watch.lux
@@ -118,7 +118,7 @@
(def: (after_modification! fs watcher data expected_path)
(-> (//.System Async) (/.Watcher Async) Binary //.Path (Async (Try Bit)))
(do (try.with async.monad)
- [_ (async.delayed 1 (#try.Success "Delay to make sure the over_write time-stamp always changes."))
+ [_ (async.after 1 (#try.Success "Delay to make sure the over_write time-stamp always changes."))
_ (\ fs write data expected_path)
poll/2 (\ watcher poll [])
poll/2' (\ watcher poll [])]
diff --git a/stdlib/source/test/lux/world/input/keyboard.lux b/stdlib/source/test/lux/world/input/keyboard.lux
index 67ce892fe..865a66a9d 100644
--- a/stdlib/source/test/lux/world/input/keyboard.lux
+++ b/stdlib/source/test/lux/world/input/keyboard.lux
@@ -112,13 +112,13 @@
/.f24]])]
(def: listing
(List /.Key)
- (list.joined (`` (list (~~ (template [<definition> <keys>]
- [((: (-> Any (List /.Key))
- (function (_ _)
- (`` (list (~~ (template.spliced <keys>))))))
- [])]
-
- <groups>))))))
+ (list.together (`` (list (~~ (template [<definition> <keys>]
+ [((: (-> Any (List /.Key))
+ (function (_ _)
+ (`` (list (~~ (template.spliced <keys>))))))
+ [])]
+
+ <groups>))))))
(def: catalogue
(Set /.Key)
@@ -160,8 +160,8 @@
[key ..random
.let [sample (<function> key)]]
(_.cover [<function>]
- (and (bit\= <pressed?> (get@ #/.pressed? sample))
- (n.= key (get@ #/.input sample)))))]
+ (and (bit\= <pressed?> (value@ #/.pressed? sample))
+ (n.= key (value@ #/.input sample)))))]
[#0 /.release]
[#1 /.press]
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux
index 24ece9d1e..c9b3f12c9 100644
--- a/stdlib/source/test/lux/world/net/http/client.lux
+++ b/stdlib/source/test/lux/world/net/http/client.lux
@@ -70,7 +70,7 @@
(|> (<definition> "" //.empty #.None mock)
(do> try.monad
[io.run!]
- [product.right (get@ #//.body) (function.apply #.None) io.run!]
+ [product.right (value@ #//.body) (function.on #.None) io.run!]
[product.right (\ utf8.codec decode)]
[(\ nat.decimal decode)]
[(nat.= <expected>) in])
diff --git a/stdlib/source/test/lux/world/net/http/status.lux b/stdlib/source/test/lux/world/net/http/status.lux
index 84cbd6355..c93f5b083 100644
--- a/stdlib/source/test/lux/world/net/http/status.lux
+++ b/stdlib/source/test/lux/world/net/http/status.lux
@@ -84,13 +84,13 @@
/.network_authentication_required]])]
(def: all
(List //.Status)
- (list.joined (`` (list (~~ (template [<category> <status+>]
- [((: (-> Any (List //.Status))
- (function (_ _)
- (`` (list (~~ (template.spliced <status+>))))))
- 123)]
-
- <categories>))))))
+ (list.together (`` (list (~~ (template [<category> <status+>]
+ [((: (-> Any (List //.Status))
+ (function (_ _)
+ (`` (list (~~ (template.spliced <status+>))))))
+ 123)]
+
+ <categories>))))))
(def: unique
(Set //.Status)
diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux
index 879d1f60f..6f5784daf 100644
--- a/stdlib/source/test/lux/world/program.lux
+++ b/stdlib/source/test/lux/world/program.lux
@@ -42,7 +42,7 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [env_size (\ ! map (|>> (n.% 10) inc) random.nat)
+ [env_size (\ ! map (|>> (n.% 10) ++) random.nat)
environment (..environment env_size)
home ..path
directory ..path