aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/build.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/stamp.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/time.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/snapshot/version.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/time.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux4
-rw-r--r--stdlib/source/test/aedifex/artifact/time/time.lux2
-rw-r--r--stdlib/source/test/aedifex/artifact/versioning.lux4
-rw-r--r--stdlib/source/test/aedifex/cache.lux6
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux2
-rw-r--r--stdlib/source/test/aedifex/command/build.lux6
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux2
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux2
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux2
-rw-r--r--stdlib/source/test/aedifex/command/install.lux4
-rw-r--r--stdlib/source/test/aedifex/command/pom.lux2
-rw-r--r--stdlib/source/test/aedifex/command/test.lux4
-rw-r--r--stdlib/source/test/aedifex/command/version.lux2
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux8
-rw-r--r--stdlib/source/test/aedifex/input.lux2
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux4
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/package.lux2
-rw-r--r--stdlib/source/test/aedifex/project.lux6
-rw-r--r--stdlib/source/test/aedifex/repository/local.lux2
-rw-r--r--stdlib/source/test/aedifex/repository/remote.lux8
-rw-r--r--stdlib/source/test/aedifex/runtime.lux2
-rw-r--r--stdlib/source/test/lux.lux21
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux4
-rw-r--r--stdlib/source/test/lux/control/concurrency/async.lux4
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux4
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux2
-rw-r--r--stdlib/source/test/lux/control/parser.lux8
-rw-r--r--stdlib/source/test/lux/control/parser/environment.lux4
-rw-r--r--stdlib/source/test/lux/control/parser/text.lux2
-rw-r--r--stdlib/source/test/lux/control/state.lux4
-rw-r--r--stdlib/source/test/lux/control/try.lux6
-rw-r--r--stdlib/source/test/lux/data/binary.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux24
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux40
-rw-r--r--stdlib/source/test/lux/data/format/json.lux12
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux14
-rw-r--r--stdlib/source/test/lux/data/lazy.lux20
-rw-r--r--stdlib/source/test/lux/data/maybe.lux10
-rw-r--r--stdlib/source/test/lux/data/text.lux48
-rw-r--r--stdlib/source/test/lux/debug.lux14
-rw-r--r--stdlib/source/test/lux/ffi.jvm.lux63
-rw-r--r--stdlib/source/test/lux/macro.lux6
-rw-r--r--stdlib/source/test/lux/macro/syntax/type/variable.lux2
-rw-r--r--stdlib/source/test/lux/math/modular.lux2
-rw-r--r--stdlib/source/test/lux/math/number/frac.lux2
-rw-r--r--stdlib/source/test/lux/math/number/i64.lux48
-rw-r--r--stdlib/source/test/lux/math/number/int.lux14
-rw-r--r--stdlib/source/test/lux/math/number/ratio.lux4
-rw-r--r--stdlib/source/test/lux/math/number/rev.lux2
-rw-r--r--stdlib/source/test/lux/meta.lux40
-rw-r--r--stdlib/source/test/lux/meta/annotation.lux6
-rw-r--r--stdlib/source/test/lux/time.lux6
-rw-r--r--stdlib/source/test/lux/time/date.lux4
-rw-r--r--stdlib/source/test/lux/time/month.lux2
-rw-r--r--stdlib/source/test/lux/type.lux2
-rw-r--r--stdlib/source/test/lux/type/check.lux8
-rw-r--r--stdlib/source/test/lux/type/refinement.lux8
-rw-r--r--stdlib/source/test/lux/world/console.lux2
-rw-r--r--stdlib/source/test/lux/world/file/watch.lux2
-rw-r--r--stdlib/source/test/lux/world/net/http/client.lux2
-rw-r--r--stdlib/source/test/lux/world/program.lux2
-rw-r--r--stdlib/source/test/lux/world/shell.lux2
75 files changed, 324 insertions, 266 deletions
diff --git a/stdlib/source/test/aedifex/artifact/snapshot.lux b/stdlib/source/test/aedifex/artifact/snapshot.lux
index 931fefd17..d8ececcd4 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot.lux
@@ -41,7 +41,7 @@
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
$/build.test
$/stamp.test
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/build.lux b/stdlib/source/test/aedifex/artifact/snapshot/build.lux
index 8b0be9f1d..55bdc0a42 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/build.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/build.lux
@@ -35,5 +35,5 @@
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
))))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
index 00be1c227..deea0e954 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/stamp.lux
@@ -42,5 +42,5 @@
/.format
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
)))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/time.lux b/stdlib/source/test/aedifex/artifact/snapshot/time.lux
index 820214cba..05e575e64 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/time.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/time.lux
@@ -37,6 +37,6 @@
/.format
(<text>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
))
)))
diff --git a/stdlib/source/test/aedifex/artifact/snapshot/version.lux b/stdlib/source/test/aedifex/artifact/snapshot/version.lux
index a4a090246..c63dc4f51 100644
--- a/stdlib/source/test/aedifex/artifact/snapshot/version.lux
+++ b/stdlib/source/test/aedifex/artifact/snapshot/version.lux
@@ -44,7 +44,7 @@
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
/value.test
)))
diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux
index 9ac9be6ae..982d2b0f7 100644
--- a/stdlib/source/test/aedifex/artifact/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time.lux
@@ -44,7 +44,7 @@
/.format
(<text>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
(do random.monad
[expected ..random]
(_.cover [/.instant /.of_instant]
@@ -52,7 +52,7 @@
/.instant
/.of_instant
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
(_.cover [/.epoch]
(instant\= instant.epoch (/.instant /.epoch)))
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index 4d44b5358..5dd7156fc 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -50,13 +50,13 @@
/.format
(<text>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
(_.cover [/.value /.date]
(|> expected
/.value
/.date
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
(_.cover [/.year_is_out_of_range]
(case (/.date candidate)
(#try.Success date)
diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux
index dd4b63904..904e34aec 100644
--- a/stdlib/source/test/aedifex/artifact/time/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time/time.lux
@@ -34,5 +34,5 @@
/.format
(<text>.run /.parser)
(try\map (\ time.equivalence = expected))
- (try.default false))))
+ (try.else false))))
)))
diff --git a/stdlib/source/test/aedifex/artifact/versioning.lux b/stdlib/source/test/aedifex/artifact/versioning.lux
index a16794e98..79d063123 100644
--- a/stdlib/source/test/aedifex/artifact/versioning.lux
+++ b/stdlib/source/test/aedifex/artifact/versioning.lux
@@ -43,12 +43,12 @@
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
(_.cover [/.init]
(|> /.init
/.format
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = /.init))
- (try.default false)))
+ (try.else false)))
)))
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index 2a2d3d2e4..4b7fcc885 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -83,7 +83,7 @@
[[main_dependency main_package] ..package
dependencies (|> (//package.dependencies main_package)
(\ try.monad map set.to_list)
- (try.default (list))
+ (try.else (list))
(monad.map ! (function (_ dependency)
(do !
[pom (random.one (function (_ [identity profile pom])
@@ -111,7 +111,7 @@
[wrote! (/.write_one program fs dependency expected_package)
read! (/.read_one program fs dependency)]
(_.cover' [/.write_one /.read_one]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[_ wrote!
actual_package read!]
@@ -132,7 +132,7 @@
[wrote! (/.write_all program fs expected)
read! (/.read_all program fs (dictionary.keys expected) //dependency/resolution.empty)]
(_.cover' [/.write_all /.read_all]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[_ wrote!
actual read!]
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index e27fd039a..fd08f541c 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -122,5 +122,5 @@
(in (#try.Success (and correct_number_of_runs!
no_dangling_process!)))))]
(_.cover' [/.do!]
- (try.default false verdict))))
+ (try.else false verdict))))
))))
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index b38b61340..1a1ff7f60 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -199,7 +199,7 @@
/.ruby_compiler_name
/.start
/.success]
- (try.default false verdict)))))
+ (try.else false verdict)))))
(do !
[#let [console (@version.echo "")]
[compiler resolution] ..resolution]
@@ -213,7 +213,7 @@
(in (and (text\= /.start start)
(text\= /.failure end))))]
(_.cover' [/.failure]
- (try.default false verdict)))))
+ (try.else false verdict)))))
(do !
[expected/0 (random.ascii/alpha 5)
expected/1 (random.ascii/alpha 5)
@@ -243,7 +243,7 @@
(text\= expected/2 actual/2)
end!)))]
(_.cover' [<log!>]
- (try.default false verdict)))))]
+ (try.else false verdict)))))]
[#0 /.log_output!]
[#1 /.log_error!]
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 238fa824b..36ed10b8e 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -116,4 +116,4 @@
(not sub_exists!/post))
(text\= (/.success target_path) logging))))]
(_.cover' [/.do! /.success]
- (try.default false verdict)))))))
+ (try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index 41a997d6f..b34584b19 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -125,4 +125,4 @@
deployed_sha-1!
deployed_md5!)))]
(_.cover' [/.do! /.success]
- (try.default false verdict)))))))
+ (try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index c00c88078..165c859b8 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -127,4 +127,4 @@
had_dependee_after!
had_depender_after!)))]
(_.cover' [/.do!]
- (try.default false verdict)))))))
+ (try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index a9de141ff..f68fcb732 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -93,7 +93,7 @@
library_exists!
pom_exists!)))]
(_.cover' [/.do! /.success]
- (try.default false verdict))))
+ (try.else false verdict))))
(in (do {! async.monad}
[#let [fs (file.mock /)
program (program.async (program.mock environment.empty home working_directory))]
@@ -101,5 +101,5 @@
(_.cover' [/.failure]
(|> logging
(try\map (text\= /.failure))
- (try.default false)))))
+ (try.else false)))))
))))
diff --git a/stdlib/source/test/aedifex/command/pom.lux b/stdlib/source/test/aedifex/command/pom.lux
index ebc0ae09e..6578e793f 100644
--- a/stdlib/source/test/aedifex/command/pom.lux
+++ b/stdlib/source/test/aedifex/command/pom.lux
@@ -58,7 +58,7 @@
(in (and logging!
expected_content!)))]
(_.cover' [/.do! /.success]
- (try.default false verdict)))
+ (try.else false verdict)))
(#try.Failure error)
(_.cover' [/.do!]
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index 93c6642f7..b82a32678 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -76,7 +76,7 @@
(text\= /.success test_end)))))]
(_.cover' [/.do!
/.start /.success]
- (try.default false verdict)))))
+ (try.else false verdict)))))
(let [fs (file.mock (\ file.default separator))
console (@version.echo "")]
(in (do async.monad
@@ -111,5 +111,5 @@
(and (text\= /.start test_start)
(text\= /.failure test_end)))))]
(_.cover' [/.failure]
- (try.default false verdict)))))
+ (try.else false verdict)))))
))))
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
index 30c7d3f80..f87424ab6 100644
--- a/stdlib/source/test/aedifex/command/version.lux
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -76,4 +76,4 @@
(in (text\= (version.format language/lux.version)
logging)))]
(_.cover' [/.do!]
- (try.default false verdict)))))))
+ (try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index 3688e56aa..e62e7b2e4 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -107,7 +107,7 @@
(and (|> cache
(dictionary.get library_url)
(maybe\map (binary\= expected_library))
- (maybe.default false))
+ (maybe.else false))
(dictionary.key? cache (format library_url artifact/extension.sha-1))
(dictionary.key? cache (format library_url artifact/extension.md5)))
@@ -115,7 +115,7 @@
(and (|> cache
(dictionary.get pom_url)
(maybe\map (binary\= expected_pom))
- (maybe.default false))
+ (maybe.else false))
(dictionary.key? cache (format pom_url artifact/extension.sha-1))
(dictionary.key? cache (format pom_url artifact/extension.md5)))
@@ -162,7 +162,7 @@
(_.cover' [/.one]
(|> ?outcome
(try\map (verify_one 1 address package cache expected_artifact))
- (try.default false))))))
+ (try.else false))))))
(do {! random.monad}
[#let [hash (: (Hash [Dependency Artifact Package])
(\ hash.functor map (|>> product.right product.left product.left)
@@ -200,5 +200,5 @@
bundles)]
(and expected_deployments!
every_deployment_was_correct!))))
- (try.default false))))))
+ (try.else false))))))
))))
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index 0cea854c4..e86efa6dd 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -63,4 +63,4 @@
(update@ #//.repositories ..with_default_repository))
actual)))]
(_.cover' [/.read]
- (try.default false verdict)))))))
+ (try.else false verdict)))))))
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index acd0575a0..0d291d368 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -77,7 +77,7 @@
#///artifact.version (|> expected
(get@ #/.versions)
list.head
- (maybe.default ""))}]]
+ (maybe.else ""))}]]
($_ _.and
(_.for [/.equivalence]
($equivalence.spec /.equivalence ..random))
@@ -90,7 +90,7 @@
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
(_.cover [/.uri]
(text\= (//.remote_project_uri artifact)
(/.uri artifact)))
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index c9787d8bb..ff11ff7ab 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -102,7 +102,7 @@
list
(<xml>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
(_.cover [/.uri]
(text\= (//.remote_artifact_uri artifact)
(/.uri artifact)))
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index 8896b731d..9c6adfcf2 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -95,7 +95,7 @@
[xml_pom (\ utf8.codec decode binary_pom)
decoded_pom (\ xml.codec decode xml_pom)]
(in (\ xml.equivalence = actual_pom decoded_pom)))
- (try.default false))
+ (try.else false))
(case pom_status
(#//status.Verified actual_sha1 expected_md5)
(and (//hash\= expected_sha1 actual_sha1)
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index 4df06a337..58ee8c577 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -75,13 +75,13 @@
(_.cover [/.profile]
(and (|> (/.profile super_name project)
(try\map (\ //.equivalence = super_profile))
- (try.default false))
+ (try.else false))
(|> (/.profile dummy_name project)
(try\map (\ //.equivalence = dummy_profile))
- (try.default false))
+ (try.else false))
(|> (/.profile sub_name project)
(try\map (\ //.equivalence = (\ //.monoid compose sub_profile super_profile)))
- (try.default false))))
+ (try.else false))))
(_.cover [/.unknown_profile]
(case (/.profile fake_name project)
(#try.Success _)
diff --git a/stdlib/source/test/aedifex/repository/local.lux b/stdlib/source/test/aedifex/repository/local.lux
index 180ea404a..eab07411f 100644
--- a/stdlib/source/test/aedifex/repository/local.lux
+++ b/stdlib/source/test/aedifex/repository/local.lux
@@ -48,5 +48,5 @@
(#try.Failure _) true)
(|> actual
(try\map (binary\= expected))
- (try.default false))))))
+ (try.else false))))))
))))
diff --git a/stdlib/source/test/aedifex/repository/remote.lux b/stdlib/source/test/aedifex/repository/remote.lux
index 5f74cab9d..cad0fe873 100644
--- a/stdlib/source/test/aedifex/repository/remote.lux
+++ b/stdlib/source/test/aedifex/repository/remote.lux
@@ -49,7 +49,7 @@
(if (|> headers
(dictionary.get "User-Agent")
(maybe\map (is? /.user_agent))
- (maybe.default false))
+ (maybe.else false))
(case [method input]
[#@http.Get #.None]
[http/status.ok
@@ -60,7 +60,7 @@
(if (|> headers
(dictionary.get "Authorization")
(maybe\map (text\= (//identity.basic_auth user password)))
- (maybe.default false))
+ (maybe.else false))
[http/status.created
{#@http.headers (http.headers (list))
#@http.body (..url_body url)}]
@@ -103,11 +103,11 @@
(try\map (\ utf8.codec decode))
try\join
(try\map (text\= (format address uri)))
- (try.default false))
+ (try.else false))
(|> (\ repo upload uri content)
io.run
(try\map (function.constant true))
- (try.default false)))))
+ (try.else false)))))
(_.cover [/.upload_failure]
(let [repo (/.repository (..good_http user password)
#.None
diff --git a/stdlib/source/test/aedifex/runtime.lux b/stdlib/source/test/aedifex/runtime.lux
index cb6d1a8fe..bd87377bc 100644
--- a/stdlib/source/test/aedifex/runtime.lux
+++ b/stdlib/source/test/aedifex/runtime.lux
@@ -62,5 +62,5 @@
(get@ #/.parameters)
list.last
(maybe\map (text\= path))
- (maybe.default false)))))
+ (maybe.else false)))))
)))))
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 11e3b6c73..04f6bea3f 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -779,7 +779,11 @@
Test
(do random.monad
[left random.nat
- right (random.ascii/lower 1)]
+ right (random.ascii/lower 1)
+
+ item/0 random.nat
+ item/1 random.nat
+ item/2 random.nat]
($_ _.and
(_.cover [/.Either]
(and (exec
@@ -833,6 +837,21 @@
(and (/.is? left left)
(and (n.= not_left left)
(not (/.is? not_left left))))))
+ (_.cover [/.Rec]
+ (let [list (: (/.Rec NList
+ (Maybe [Nat NList]))
+ (#.Some [item/0
+ (#.Some [item/1
+ (#.Some [item/2
+ #.None])])]))]
+ (case list
+ (#.Some [actual/0 (#.Some [actual/1 (#.Some [actual/2 #.None])])])
+ (and (is? item/0 actual/0)
+ (is? item/1 actual/1)
+ (is? item/2 actual/2))
+
+ _
+ false)))
)))
(type: (Pair l r)
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index 8e472db22..b389a9c8b 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -31,8 +31,8 @@
($_ _.and
(_.cover [/.range]
(let [expected_size (|> end (n.- start) inc)
- expected_start? (|> range list.head (maybe\map (n.= start)) (maybe.default false))
- expected_end? (|> range list.last (maybe\map (n.= end)) (maybe.default false))
+ 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) =
(/.range n.enum start end)
(list.reverse (/.range n.enum end start)))
diff --git a/stdlib/source/test/lux/control/concurrency/async.lux b/stdlib/source/test/lux/control/concurrency/async.lux
index 5a92f595a..8b7bafff8 100644
--- a/stdlib/source/test/lux/control/concurrency/async.lux
+++ b/stdlib/source/test/lux/control/concurrency/async.lux
@@ -47,8 +47,8 @@
(def: delay
(for {@.js
- (i64.left_shift 4 1)}
- (i64.left_shift 3 1)))
+ (i64.left_shifted 4 1)}
+ (i64.left_shifted 3 1)))
(def: #export test
Test
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index 3dff3aba1..f5b851104 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -31,8 +31,8 @@
(def: delay
(for {@.js
- (i64.left_shift 4 1)}
- (i64.left_shift 3 1)))
+ (i64.left_shifted 4 1)}
+ (i64.left_shifted 3 1)))
(def: semaphore
Test
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index edc74a9c0..67824f3f3 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -52,7 +52,7 @@
## and other issues that might mess with duration
(def: wiggle_room
Nat
- (i64.left_shift 4 1))
+ (i64.left_shifted 4 1))
(def: #export test
Test
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index 7370e0db0..209944969 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -245,11 +245,11 @@
(\ (list.equivalence code.equivalence) =
(list\map code.nat expected+)
actual))))
- (_.cover [/.default]
- (and (|> (/.run (/.default wrong (\ /.monad in expected)) (list))
+ (_.cover [/.else]
+ (and (|> (/.run (/.else wrong (\ /.monad in expected)) (list))
(match actual (n.= expected actual)))
- (|> (/.run (/.default expected (: (Parser (List Code) Nat)
- (/.failure "yolo")))
+ (|> (/.run (/.else expected (: (Parser (List Code) Nat)
+ (/.failure "yolo")))
(list))
(match actual (n.= expected actual)))
))
diff --git a/stdlib/source/test/lux/control/parser/environment.lux b/stdlib/source/test/lux/control/parser/environment.lux
index 017795418..756fa38be 100644
--- a/stdlib/source/test/lux/control/parser/environment.lux
+++ b/stdlib/source/test/lux/control/parser/environment.lux
@@ -31,7 +31,7 @@
(_.cover [/.run]
(|> (/.run (//\in expected) /.empty)
(\ try.functor map (n.= expected))
- (try.default false))))
+ (try.else false))))
(do random.monad
[property (random.ascii/alpha 1)
expected (random.ascii/alpha 1)]
@@ -40,7 +40,7 @@
(dictionary.put property expected)
(/.run (/.property property))
(\ try.functor map (text\= expected))
- (try.default false))))
+ (try.else false))))
(do random.monad
[property (random.ascii/alpha 1)]
(_.cover [/.unknown_property]
diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux
index 055a2f858..b3031cc26 100644
--- a/stdlib/source/test/lux/control/parser/text.lux
+++ b/stdlib/source/test/lux/control/parser/text.lux
@@ -62,7 +62,7 @@
(|> expected
(/.run parser)
(\ try.functor map (text\= expected))
- (try.default false)))
+ (try.else false)))
(def: (should_pass! expected parser)
(-> Text (/.Parser /.Slice) Bit)
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index d537ca4de..e64833259 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -108,8 +108,8 @@
left random.nat
right random.nat]
(let [(^open "io\.") io.monad]
- (_.cover [/.State' /.with /.lift /.run']
- (|> (: (/.State' io.IO Nat Nat)
+ (_.cover [/.+State /.with /.lift /.run']
+ (|> (: (/.+State io.IO Nat Nat)
(do (/.with io.monad)
[a (/.lift io.monad (io\in left))
b (in right)]
diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux
index 4fbf42fd2..4959014f7 100644
--- a/stdlib/source/test/lux/control/try.lux
+++ b/stdlib/source/test/lux/control/try.lux
@@ -74,11 +74,11 @@
_
false))
- (_.cover [/.default]
+ (_.cover [/.else]
(and (n.= expected
- (/.default alternative (#/.Success expected)))
+ (/.else alternative (#/.Success expected)))
(n.= alternative
- (/.default alternative (: (Try Nat) (#/.Failure error))))))
+ (/.else alternative (: (Try Nat) (#/.Failure error))))))
(_.cover [/.with /.lifted]
(let [lifted (/.lifted io.monad)]
(|> (do (/.with io.monad)
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index a9e977c0a..638668ec5 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -53,11 +53,11 @@
(def: (binary_io power read write value)
(-> Nat (-> Nat Binary (Try Nat)) (-> Nat Nat Binary (Try Any)) Nat Bit)
- (let [bytes (i64.left_shift power 1)
+ (let [bytes (i64.left_shifted power 1)
binary (/.create bytes)
cap (case bytes
8 (dec 0)
- _ (|> 1 (i64.left_shift (n.* 8 bytes)) dec))
+ _ (|> 1 (i64.left_shifted (n.* 8 bytes)) dec))
capped_value (i64.and cap value)]
(and (..succeed
(do try.monad
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index d51067799..2cec43439 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -81,7 +81,7 @@
(|> dict
(/.get key)
(maybe\map (n.= value))
- (maybe.default false)))
+ (maybe.else false)))
entries)]
(and correct_size!
unique_keys!
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 0b98204a9..8302cdf38 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -132,5 +132,5 @@
(/.update extra_key (n.+ shift))
(/.get extra_key)
(maybe\map (n.= (n.+ shift extra_value)))
- (maybe.default false)))
+ (maybe.else false)))
))))
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index 7916da3eb..5ba785919 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -75,14 +75,14 @@
(/.put extra_key extra_value)
(/.get extra_key)
(maybe\map (n.= extra_value))
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.update]
(|> sample
(/.put extra_key extra_value)
(/.update extra_key (n.+ shift))
(/.get extra_key)
(maybe\map (n.= (n.+ shift extra_value)))
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.remove]
(|> sample
(/.put extra_key extra_value)
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 06238c4c8..07eff44ac 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -80,7 +80,7 @@
(/.push /.max max_member)
/.peek
(maybe\map (n.= max_member))
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.min]
(|> /.empty
(/.push /.max max_member)
@@ -88,6 +88,6 @@
/.pop
/.peek
(maybe\map (n.= min_member))
- (maybe.default false)))
+ (maybe.else false)))
))
))))
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 407fcde8e..3ac6e8965 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -99,13 +99,13 @@
(#try.Failure error)
false))
(_.cover [/.put]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[sample (/.put good_index non_member sample)
actual (/.nth good_index sample)]
(in (is? non_member actual)))))
(_.cover [/.update]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[sample (/.put good_index non_member sample)
sample (/.update good_index inc sample)
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index a263b2451..ea58f8f72 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -47,15 +47,15 @@
(do random.monad
[[size sample] (..tree random.nat)]
- (_.cover [/.flatten]
+ (_.cover [/.flat]
(n.= size
- (list.size (/.flatten sample)))))
+ (list.size (/.flat sample)))))
(do random.monad
[expected random.nat]
(_.cover [/.leaf]
(\ (list.equivalence n.equivalence) =
(list expected)
- (/.flatten (/.leaf expected)))))
+ (/.flat (/.leaf expected)))))
(do {! random.monad}
[value random.nat
num_children (\ ! map (n.% 3) random.nat)
@@ -63,7 +63,7 @@
(_.cover [/.branch]
(\ (list.equivalence n.equivalence) =
(list& value children)
- (/.flatten (/.branch value (list\map /.leaf children))))))
+ (/.flat (/.branch value (list\map /.leaf children))))))
(do random.monad
[expected/0 random.nat
expected/1 random.nat
@@ -74,18 +74,18 @@
(_.cover [/.tree]
(and (\ (list.equivalence n.equivalence) =
(list expected/0)
- (/.flatten (/.tree expected/0)))
+ (/.flat (/.tree expected/0)))
(\ (list.equivalence n.equivalence) =
(list expected/0 expected/1 expected/2)
- (/.flatten (/.tree expected/0
- {expected/1 {}
- expected/2 {}})))
+ (/.flat (/.tree expected/0
+ {expected/1 {}
+ expected/2 {}})))
(\ (list.equivalence n.equivalence) =
(list expected/0 expected/1 expected/2
expected/3 expected/4 expected/5)
- (/.flatten (/.tree expected/0
- {expected/1 {}
- expected/2 {expected/3 {}
- expected/4 {expected/5 {}}}})))
+ (/.flat (/.tree expected/0
+ {expected/1 {}
+ expected/2 {expected/3 {}
+ expected/4 {expected/5 {}}}})))
)))
)))
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index d14c4d27f..496c25865 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -96,13 +96,13 @@
(|> (\ ..builder leaf tag_left expected_left)
(/.one (text.contains? tag_left))
(maybe\map (n.= expected_left))
- (maybe.default false))
+ (maybe.else false))
cannot_find_incorrect_one!
(|> (\ ..builder leaf tag_right expected_right)
(/.one (text.contains? tag_left))
(maybe\map (n.= expected_left))
- (maybe.default false)
+ (maybe.else false)
not)
can_find_left!
@@ -111,7 +111,7 @@
(\ ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_left))
(maybe\map (n.= expected_left))
- (maybe.default false))
+ (maybe.else false))
can_find_right!
(|> (\ ..builder branch
@@ -119,7 +119,7 @@
(\ ..builder leaf tag_right expected_right))
(/.one (text.contains? tag_right))
(maybe\map (n.= expected_right))
- (maybe.default false))]
+ (maybe.else false))]
(and can_find_correct_one!
cannot_find_incorrect_one!
can_find_left!
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index df7333db5..749a8c59b 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -37,7 +37,7 @@
(do> maybe.monad
[/.down]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.up]
(|> (tree.branch expected (list (tree.leaf dummy)))
/.zipper
@@ -45,7 +45,7 @@
[/.down]
[/.up]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.right]
(|> (tree.branch dummy (list (tree.leaf dummy) (tree.leaf expected)))
/.zipper
@@ -53,7 +53,7 @@
[/.down]
[/.right]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.rightmost]
(|> (tree.branch dummy
(list (tree.leaf dummy)
@@ -65,7 +65,7 @@
[/.down]
[/.rightmost]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.left]
(|> (tree.branch dummy (list (tree.leaf expected) (tree.leaf dummy)))
/.zipper
@@ -74,7 +74,7 @@
[/.right]
[/.left]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.leftmost]
(|> (tree.branch dummy
(list (tree.leaf expected)
@@ -87,7 +87,7 @@
[/.rightmost]
[/.leftmost]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.next]
(and (|> (tree.branch dummy
(list (tree.leaf expected)
@@ -96,7 +96,7 @@
(do> maybe.monad
[/.next]
[/.value (n.= expected) in])
- (maybe.default false))
+ (maybe.else false))
(|> (tree.branch dummy
(list (tree.leaf dummy)
(tree.leaf expected)))
@@ -105,7 +105,7 @@
[/.next]
[/.next]
[/.value (n.= expected) in])
- (maybe.default false))))
+ (maybe.else false))))
(_.cover [/.end]
(|> (tree.branch dummy
(list (tree.leaf dummy)
@@ -116,7 +116,7 @@
(do> maybe.monad
[/.end]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.start]
(|> (tree.branch expected
(list (tree.leaf dummy)
@@ -128,7 +128,7 @@
[/.end]
[/.start]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.previous]
(and (|> (tree.branch expected
(list (tree.leaf dummy)
@@ -138,7 +138,7 @@
[/.next]
[/.previous]
[/.value (n.= expected) in])
- (maybe.default false))
+ (maybe.else false))
(|> (tree.branch dummy
(list (tree.leaf expected)
(tree.leaf dummy)))
@@ -148,7 +148,7 @@
[/.next]
[/.previous]
[/.value (n.= expected) in])
- (maybe.default false))))
+ (maybe.else false))))
)))
(def: #export test
@@ -198,7 +198,7 @@
/.zipper
/.end
(maybe\map /.end?)
- (maybe.default false))))
+ (maybe.else false))))
(_.cover [/.interpose]
(let [cursor (|> (tree.branch dummy (list (tree.leaf dummy)))
/.zipper
@@ -208,13 +208,13 @@
(do> maybe.monad
[/.down]
[/.value (n.= expected) in])
- (maybe.default false))
+ (maybe.else false))
(|> cursor
(do> maybe.monad
[/.down]
[/.down]
[/.value (n.= dummy) in])
- (maybe.default false)))))
+ (maybe.else false)))))
(_.cover [/.adopt]
(let [cursor (|> (tree.branch dummy (list (tree.leaf dummy)))
/.zipper
@@ -224,13 +224,13 @@
(do> maybe.monad
[/.down]
[/.value (n.= expected) in])
- (maybe.default false))
+ (maybe.else false))
(|> cursor
(do> maybe.monad
[/.down]
[/.right]
[/.value (n.= dummy) in])
- (maybe.default false)))))
+ (maybe.else false)))))
(_.cover [/.insert_left]
(|> (tree.branch dummy (list (tree.leaf dummy)))
/.zipper
@@ -239,7 +239,7 @@
[(/.insert_left expected)]
[/.left]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.insert_right]
(|> (tree.branch dummy (list (tree.leaf dummy)))
/.zipper
@@ -248,7 +248,7 @@
[(/.insert_right expected)]
[/.right]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.remove]
(|> (tree.branch dummy (list (tree.leaf dummy)))
/.zipper
@@ -257,5 +257,5 @@
[(/.insert_left expected)]
[/.remove]
[/.value (n.= expected) in])
- (maybe.default false)))
+ (maybe.else false)))
))))
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index e9acae043..063d3ef2f 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -86,7 +86,7 @@
/.format
(\ /.codec decode)
(try\map (\= expected))
- (try.default false))))
+ (try.else false))))
(do random.monad
[keys (random.set text.hash 3 (random.ascii/alpha 1))
values (random.set frac.hash 3 random.safe_frac)
@@ -107,7 +107,7 @@
(list.every? (function (_ [key expected])
(|> (/.get key object)
(try\map (\= expected))
- (try.default false)))
+ (try.else false)))
expected))
))
(do random.monad
@@ -116,14 +116,14 @@
(random.ascii/alpha 1))
expected random.safe_frac]
(_.cover [/.set]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[object (/.set key (#/.Number expected) (/.object (list)))
#let [can_find_known_key!
(|> object
(/.get key)
(try\map (\= (#/.Number expected)))
- (try.default false))
+ (try.else false))
cannot_find_unknown_key!
(case (/.get unknown object)
@@ -142,7 +142,7 @@
(|> (/.object (list [key (<tag> value)]))
(<get> key)
(try\map (\ <equivalence> = value))
- (try.default false))))]
+ (try.else false))))]
[/.Boolean /.get_boolean #/.Boolean random.bit bit.equivalence]
[/.Number /.get_number #/.Number random.safe_frac frac.equivalence]
@@ -180,7 +180,7 @@
<key3> <string>
<key4> [#null <boolean> <number> <string>]
<key5> {<key6> <number>}})]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[value0 (/.get <key0> object)
value1 (/.get <key1> object)
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 8dfe9635d..13c713f7f 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -181,7 +181,7 @@
_
false)))
- (try.default false)))]
+ (try.else false)))]
[/.Symbolic_Link #/.Symbolic_Link]
[/.Directory #/.Directory]
@@ -216,7 +216,7 @@
_
false)))
- (try.default false)))]
+ (try.else false)))]
[/.Normal #/.Normal]
[/.Contiguous #/.Contiguous]
@@ -268,7 +268,7 @@
_
false)))
- (try.default false)))
+ (try.else false)))
(~~ (template [<expected_mode>]
[(_.cover [<expected_mode>]
(|> (do try.monad
@@ -291,7 +291,7 @@
_
false)))
- (try.default false)))]
+ (try.else false)))]
[/.none]
@@ -360,7 +360,7 @@
_
false)))
- (try.default false)))
+ (try.else false)))
(_.cover [/.anonymous /.no_id]
(|> (do try.monad
[path (/.path path)
@@ -388,7 +388,7 @@
_
false)))
- (try.default false)))
+ (try.else false)))
))))
(def: #export test
@@ -403,7 +403,7 @@
(format.run /.writer)
(<b>.run /.parser)
(\ try.monad map row.empty?)
- (try.default false)))
+ (try.else false)))
(_.cover [/.invalid_end_of_archive]
(let [dump (format.run /.writer row.empty)]
(case (<b>.run /.parser (binary\compose dump dump))
diff --git a/stdlib/source/test/lux/data/lazy.lux b/stdlib/source/test/lux/data/lazy.lux
index 0c93ae612..4fb2f6642 100644
--- a/stdlib/source/test/lux/data/lazy.lux
+++ b/stdlib/source/test/lux/data/lazy.lux
@@ -20,7 +20,7 @@
(def: injection
(Injection Lazy)
- (|>> /.freeze))
+ (|>> /.lazy))
(def: comparison
(Comparison Lazy)
@@ -29,7 +29,7 @@
(def: #export lazy
(All [a] (-> (Random a) (Random (Lazy a))))
- (\ random.functor map (|>> /.freeze)))
+ (\ random.functor map (|>> /.lazy)))
(def: #export test
Test
@@ -52,16 +52,16 @@
(_.for [/.monad]
($monad.spec ..injection ..comparison /.monad))
- (_.cover [/.freeze]
- (let [lazy (/.freeze <eager>)
+ (_.cover [/.lazy]
+ (let [lazy (/.lazy <eager>)
(^open "\=") (product.equivalence n.equivalence n.equivalence)]
(\= expected
- (/.thaw lazy))))
+ (/.value lazy))))
- (_.cover [/.thaw]
- (let [lazy (/.freeze <eager>)]
+ (_.cover [/.value]
+ (let [lazy (/.lazy <eager>)]
(and (not (is? expected
- (/.thaw lazy)))
- (is? (/.thaw lazy)
- (/.thaw lazy)))))
+ (/.value lazy)))
+ (is? (/.value lazy)
+ (/.value lazy)))))
))))))
diff --git a/stdlib/source/test/lux/data/maybe.lux b/stdlib/source/test/lux/data/maybe.lux
index c2baca4fa..9aa890d9f 100644
--- a/stdlib/source/test/lux/data/maybe.lux
+++ b/stdlib/source/test/lux/data/maybe.lux
@@ -63,12 +63,12 @@
(do random.monad
[default random.nat
value random.nat]
- (_.cover [/.default]
- (and (is? default (/.default default
- #.None))
+ (_.cover [/.else]
+ (and (is? default (/.else default
+ #.None))
- (is? value (/.default default
- (#.Some value))))))
+ (is? value (/.else default
+ (#.Some value))))))
(do random.monad
[value random.nat]
(_.cover [/.assume]
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index f39c25c01..e1f9c1e4f 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -91,54 +91,54 @@
(/.contains? outer full))))
(_.cover [/.index_of]
(and (|> (/.index_of inner (\ /.monoid compose inner outer))
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 0))
(|> (/.index_of outer (\ /.monoid compose inner outer))
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 1))))
(_.cover [/.index_of']
(let [full (\ /.monoid compose inner outer)]
(and (|> (/.index_of' inner 0 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 0))
(|> (/.index_of' inner 1 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= fake_index))
(|> (/.index_of' outer 0 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 1))
(|> (/.index_of' outer 1 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 1))
(|> (/.index_of' outer 2 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= fake_index)))))
(_.cover [/.last_index_of]
(let [full ($_ (\ /.monoid compose) outer inner outer)]
(and (|> (/.last_index_of inner full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 1))
(|> (/.last_index_of outer full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 2)))))
(_.cover [/.last_index_of']
(let [full ($_ (\ /.monoid compose) outer inner outer)]
(and (|> (/.last_index_of' inner 0 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 1))
(|> (/.last_index_of' inner 2 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= fake_index))
(|> (/.last_index_of' outer 0 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 2))
(|> (/.last_index_of' outer 2 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= 2))
(|> (/.last_index_of' outer 3 full)
- (maybe.default fake_index)
+ (maybe.else fake_index)
(n.= fake_index)))))
)))
@@ -234,42 +234,42 @@
#.None
false))
- (_.cover [/.lower_case]
+ (_.cover [/.lower_cased]
(let [effectiveness!
(|> upper
- /.lower_case
+ /.lower_cased
(\ /.equivalence = upper)
not)
idempotence!
(|> lower
- /.lower_case
+ /.lower_cased
(\ /.equivalence = lower))
inverse!
(|> lower
- /.upper_case
- /.lower_case
+ /.upper_cased
+ /.lower_cased
(\ /.equivalence = lower))]
(and effectiveness!
idempotence!
inverse!)))
- (_.cover [/.upper_case]
+ (_.cover [/.upper_cased]
(let [effectiveness!
(|> lower
- /.upper_case
+ /.upper_cased
(\ /.equivalence = lower)
not)
idempotence!
(|> upper
- /.upper_case
+ /.upper_cased
(\ /.equivalence = upper))
inverse!
(|> upper
- /.lower_case
- /.upper_case
+ /.lower_cased
+ /.upper_cased
(\ /.equivalence = upper))]
(and effectiveness!
idempotence!
diff --git a/stdlib/source/test/lux/debug.lux b/stdlib/source/test/lux/debug.lux
index a7741082a..9089e080f 100644
--- a/stdlib/source/test/lux/debug.lux
+++ b/stdlib/source/test/lux/debug.lux
@@ -58,7 +58,7 @@
(in (`` (and (~~ (template [<type> <format> <sample>]
[(|> (/.representation <type> <sample>)
(try\map (text\= (<format> <sample>)))
- (try.default false))]
+ (try.else false))]
[Bit %.bit sample_bit]
[Nat %.nat sample_nat]
@@ -93,7 +93,7 @@
## (try\map (text\= (format "(" (%.nat <lefts>)
## " " (%.bit <right?>)
## " " (<format> <value>) ")")))
- ## (try.default false))]
+ ## (try.else false))]
## [0 #0 sample_bit %.bit]
## [1 #0 sample_int %.int]
@@ -114,7 +114,7 @@
(in (`` (and (~~ (template [<type> <format> <sample>]
[(|> (/.representation <type> <sample>)
(try\map (text\= (<format> <sample>)))
- (try.default false))]
+ (try.else false))]
[Ratio %.ratio sample_ratio]
[Name %.name sample_name]
@@ -137,7 +137,7 @@
(in (`` (and (~~ (template [<type> <format> <sample>]
[(|> (/.representation <type> <sample>)
(try\map (text\= (<format> <sample>)))
- (try.default false))]
+ (try.else false))]
[Instant %.instant sample_instant]
[Duration %.duration sample_duration]
@@ -168,14 +168,14 @@
(|> (/.representation .Any sample_frac)
(try\map (text\= "[]"))
- (try.default false))
+ (try.else false))
(|> (/.representation (type (List Nat)) (: (List Nat) (list sample_nat)))
(try\map (text\= (%.list %.nat (list sample_nat))))
- (try.default false))
+ (try.else false))
(~~ (template [<sample>]
[(|> (/.representation (type (Maybe Nat)) (: (Maybe Nat) <sample>))
(try\map (text\= (%.maybe %.nat <sample>)))
- (try.default false))]
+ (try.else false))]
[(#.Some sample_nat)]
[#.None]
diff --git a/stdlib/source/test/lux/ffi.jvm.lux b/stdlib/source/test/lux/ffi.jvm.lux
index b5d9fffbf..96da12763 100644
--- a/stdlib/source/test/lux/ffi.jvm.lux
+++ b/stdlib/source/test/lux/ffi.jvm.lux
@@ -19,7 +19,7 @@
[syntax (#+ syntax:)]
["." code]]
[math
- ["." random]
+ ["." random (#+ Random)]
[number
["n" nat]
["i" int ("#\." equivalence)]
@@ -464,9 +464,27 @@
["#::."
(new [])])
+(/.class: #final (test/TestClass9 a) []
+ ## Fields
+ (#private value9 a)
+ ## Constructors
+ (#public [] (new self {value a}) []
+ (:= ::value9 value))
+ ## Methods
+ (#public (set_actual9 self {value a}) void
+ (:= ::value9 value))
+ (#public (get_actual9 self) a
+ ::value9))
+
+(/.import: (test/TestClass9 a)
+ ["#::."
+ (new [a])
+ (set_actual9 [a] void)
+ (get_actual9 [] a)])
+
(def: for_class
Test
- (do random.monad
+ (do {! random.monad}
[expected random.nat
left random.int
right random.int
@@ -521,16 +539,37 @@
(let [expected (i.+ left right)
object/8 (test/TestClass8::new)]
(i.= expected
- (test/TestInterface4::actual4 left right right object/8)))]]
- (_.cover [/.class: /.import:]
- (and example/0!
- example/1!
- example/2!
- example/3!
- example/4!
- example/5!
- example/7!
- example/8!))))
+ (test/TestInterface4::actual4 left right right object/8)))]
+
+ #let [random_long (: (Random java/lang/Long)
+ (\ ! map (|>> (:as java/lang/Long))
+ random.int))]
+ dummy/0 random_long
+ dummy/1 random_long
+ dummy/2 random_long
+ #let [object/9 (/.do_to (: (test/TestClass9 java/lang/Long)
+ (test/TestClass9::new dummy/0))
+ (test/TestClass9::set_actual9 dummy/1)
+ (test/TestClass9::set_actual9 dummy/2))
+
+ example/9!
+ (|> object/9
+ test/TestClass9::get_actual9
+ (:as java/lang/Long)
+ (is? dummy/2))]]
+ ($_ _.and
+ (_.cover [/.class: /.import:]
+ (and example/0!
+ example/1!
+ example/2!
+ example/3!
+ example/4!
+ example/5!
+ example/7!
+ example/8!))
+ (_.cover [/.do_to]
+ example/9!)
+ )))
(def: #export test
(<| (_.covering /._)
diff --git a/stdlib/source/test/lux/macro.lux b/stdlib/source/test/lux/macro.lux
index 115b5168e..248a63400 100644
--- a/stdlib/source/test/lux/macro.lux
+++ b/stdlib/source/test/lux/macro.lux
@@ -125,17 +125,17 @@
(meta.run lux)
(try\map (\ (list.equivalence code.equivalence) =
(list <expansion>)))
- (try.default false)))
+ (try.else false)))
(_.cover [<logger>]
(and (|> (/.single_expansion (` (<logger> (~' #omit) (..pow/4 (~ pow/1)))))
(meta.run lux)
(try\map (\ (list.equivalence code.equivalence) = (list)))
- (try.default false))
+ (try.else false))
(|> (/.single_expansion (` (<logger> (..pow/4 (~ pow/1)))))
(meta.run lux)
(try\map (\ (list.equivalence code.equivalence) = (list <expansion>)))
- (try.default false))))]
+ (try.else false))))]
[/.single_expansion /.log_single_expansion! single_expansion]
[/.expansion /.log_expansion! expansion]
diff --git a/stdlib/source/test/lux/macro/syntax/type/variable.lux b/stdlib/source/test/lux/macro/syntax/type/variable.lux
index 18197bf3e..48882172a 100644
--- a/stdlib/source/test/lux/macro/syntax/type/variable.lux
+++ b/stdlib/source/test/lux/macro/syntax/type/variable.lux
@@ -33,5 +33,5 @@
(|> (list (/.format expected))
(<code>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
)))
diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux
index e8865d207..cafc576eb 100644
--- a/stdlib/source/test/lux/math/modular.lux
+++ b/stdlib/source/test/lux/math/modular.lux
@@ -105,7 +105,7 @@
#.None
(not co_prime?))))
(_.cover [/.adapter]
- (<| (try.default false)
+ (<| (try.else false)
(do try.monad
[copy\\% (//.modulus (//.divisor subject\\%))
adapt (/.adapter subject\\% copy\\%)]
diff --git a/stdlib/source/test/lux/math/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index 23ede5834..41f1bc29c 100644
--- a/stdlib/source/test/lux/math/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
@@ -85,7 +85,7 @@
(_.cover [/.int]
(|> expected i.frac /.int (i.= expected))))
(do {! random.monad}
- [expected (\ ! map (|>> (i64.left_shift 52) .rev)
+ [expected (\ ! map (|>> (i64.left_shifted 52) .rev)
random.nat)]
(_.cover [/.rev]
(|> expected r.frac /.rev (r.= expected))))
diff --git a/stdlib/source/test/lux/math/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux
index 94260d6ee..d6f531613 100644
--- a/stdlib/source/test/lux/math/number/i64.lux
+++ b/stdlib/source/test/lux/math/number/i64.lux
@@ -49,21 +49,21 @@
($_ _.and
(do !
[idx (\ ! map (|>> (n.% (dec /.width)) inc) random.nat)]
- (_.cover [/.left_shift /.right_shift]
+ (_.cover [/.left_shifted /.right_shifted]
(let [nullity!
- (and (\= pattern (/.left_shift 0 pattern))
- (\= pattern (/.right_shift 0 pattern)))
+ (and (\= pattern (/.left_shifted 0 pattern))
+ (\= pattern (/.right_shifted 0 pattern)))
idempotency!
- (and (\= pattern (/.left_shift /.width pattern))
- (\= pattern (/.right_shift /.width pattern)))
+ (and (\= pattern (/.left_shifted /.width pattern))
+ (\= pattern (/.right_shifted /.width pattern)))
movement!
(let [shift (n.- idx /.width)]
(\= (/.and (/.mask idx) pattern)
(|> pattern
- (/.left_shift shift)
- (/.right_shift shift))))]
+ (/.left_shifted shift)
+ (/.right_shifted shift))))]
(and nullity!
idempotency!
movement!))))
@@ -106,13 +106,13 @@
0 (\= /.false (/.region size offset))
_ (\= (|> pattern
## NNNNYYYYNNNN
- (/.right_shift offset)
+ (/.right_shifted offset)
## ____NNNNYYYY
- (/.left_shift spare)
+ (/.left_shifted spare)
## YYYY________
- (/.right_shift spare)
+ (/.right_shifted spare)
## ________YYYY
- (/.left_shift offset)
+ (/.left_shifted offset)
## ____YYYY____
)
(/.and (/.region size offset) pattern)))))
@@ -208,39 +208,39 @@
(/.count (/.not pattern))))]
(and clear&set!
complementarity!)))
- (_.cover [/.rotate_left /.rotate_right]
+ (_.cover [/.left_rotated /.right_rotated]
(let [false!
- (and (\= /.false (/.rotate_left idx /.false))
- (\= /.false (/.rotate_right idx /.false)))
+ (and (\= /.false (/.left_rotated idx /.false))
+ (\= /.false (/.right_rotated idx /.false)))
true!
- (and (\= /.true (/.rotate_left idx /.true))
- (\= /.true (/.rotate_right idx /.true)))
+ (and (\= /.true (/.left_rotated idx /.true))
+ (\= /.true (/.right_rotated idx /.true)))
inverse!
(and (|> pattern
- (/.rotate_left idx)
- (/.rotate_right idx)
+ (/.left_rotated idx)
+ (/.right_rotated idx)
(\= pattern))
(|> pattern
- (/.rotate_right idx)
- (/.rotate_left idx)
+ (/.right_rotated idx)
+ (/.left_rotated idx)
(\= pattern)))
nullity!
(and (|> pattern
- (/.rotate_left 0)
+ (/.left_rotated 0)
(\= pattern))
(|> pattern
- (/.rotate_right 0)
+ (/.right_rotated 0)
(\= pattern)))
futility!
(and (|> pattern
- (/.rotate_left /.width)
+ (/.left_rotated /.width)
(\= pattern))
(|> pattern
- (/.rotate_right /.width)
+ (/.right_rotated /.width)
(\= pattern)))]
(and false!
true!
diff --git a/stdlib/source/test/lux/math/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index 00b66d700..d7d3d6122 100644
--- a/stdlib/source/test/lux/math/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -185,23 +185,23 @@
(do {! random.monad}
[pattern random.int
idx (\ ! map (n.% i64.width) random.nat)]
- (_.cover [/.right_shift]
+ (_.cover [/.right_shifted]
(let [nullity!
- (/.= pattern (/.right_shift 0 pattern))
+ (/.= pattern (/.right_shifted 0 pattern))
idempotency!
- (/.= pattern (/.right_shift i64.width pattern))
+ (/.= pattern (/.right_shifted i64.width pattern))
- sign_mask (i64.left_shift (dec i64.width) 1)
+ sign_mask (i64.left_shifted (dec i64.width) 1)
mantissa_mask (i64.not sign_mask)
sign_preservation!
(/.= (i64.and sign_mask pattern)
- (i64.and sign_mask (/.right_shift idx pattern)))
+ (i64.and sign_mask (/.right_shifted idx pattern)))
mantissa_parity!
- (/.= (i64.and mantissa_mask (i64.right_shift idx pattern))
- (i64.and mantissa_mask (/.right_shift idx pattern)))]
+ (/.= (i64.and mantissa_mask (i64.right_shifted idx pattern))
+ (i64.and mantissa_mask (/.right_shifted idx pattern)))]
(and nullity!
idempotency!
sign_preservation!
diff --git a/stdlib/source/test/lux/math/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux
index b4c9799cc..9383f97e3 100644
--- a/stdlib/source/test/lux/math/number/ratio.lux
+++ b/stdlib/source/test/lux/math/number/ratio.lux
@@ -68,13 +68,13 @@
(|> (/.ratio numerator)
/.nat
(maybe\map (n\= numerator))
- (maybe.default false))
+ (maybe.else false))
denominator_1!
(|> (/.ratio numerator 1)
/.nat
(maybe\map (n\= numerator))
- (maybe.default false))
+ (maybe.else false))
with_denominator!
(case (/.nat (/.ratio numerator denominator))
diff --git a/stdlib/source/test/lux/math/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index e99a1f656..63c8c7135 100644
--- a/stdlib/source/test/lux/math/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -92,7 +92,7 @@
random.rev)
divisor (\ ! map (|>> (i64.and (hex "F"))
(i64.or (hex "1"))
- (i64.rotate_right 8)
+ (i64.right_rotated 8)
.rev)
random.nat)]
dividend (random.only (/.> .0) dividend)
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 43a7ec41a..2356772ec 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -247,20 +247,20 @@
(/.run expected_lux)
(try\map (\ (list.equivalence text.equivalence) =
(list imported_module_name)))
- (try.default false))
+ (try.else false))
(|> (/.imported_modules imported_module_name)
(/.run expected_lux)
(try\map (\ (list.equivalence text.equivalence) =
(list)))
- (try.default false))))
+ (try.else false))))
(_.cover [/.imported_by?]
(|> (/.imported_by? imported_module_name expected_current_module)
(/.run expected_lux)
- (try.default false)))
+ (try.else false)))
(_.cover [/.imported?]
(|> (/.imported? imported_module_name)
(/.run expected_lux)
- (try.default false)))
+ (try.else false)))
(_.cover [/.normal]
(and (|> (/.normal ["" expected_short])
(/.run expected_lux)
@@ -335,7 +335,7 @@
(|> /.type_context
(/.run expected_lux)
(try\map (is? type_context))
- (try.default false)))
+ (try.else false)))
)))
(def: definition_related
@@ -575,11 +575,11 @@
(and (|> (/.de_aliased [expected_macro_module expected_short])
(/.run expected_lux)
(try\map (name\= [expected_macro_module expected_short]))
- (try.default false))
+ (try.else false))
(|> (/.de_aliased [expected_current_module expected_short])
(/.run expected_lux)
(try\map (name\= [expected_macro_module expected_short]))
- (try.default false)))))
+ (try.else false)))))
(_.cover [/.definition]
(let [[current_globals macro_globals expected_lux]
(expected_lux expected_exported? (#.Some expected_type))
@@ -713,12 +713,12 @@
(|> (/.tag_lists tag_module)
(/.run expected_lux)
(try\map (\ equivalence = (list [tags_1 type_1])))
- (try.default false))))
+ (try.else false))))
(_.cover [/.tags_of]
(|> (/.tags_of [tag_module name_1])
(/.run expected_lux)
(try\map (\ (maybe.equivalence (list.equivalence name.equivalence)) = (#.Some tags_1)))
- (try.default false)))
+ (try.else false)))
(_.cover [/.resolve_tag]
(|> tags_1
list.enumeration
@@ -826,49 +826,49 @@
(try\map (\ equivalence = (list (list [name_3 type_3])
(list [name_1 type_1]
[name_2 type_2]))))
- (try.default false))))
+ (try.else false))))
(_.cover [/.var_type]
(and (|> (/.var_type name_0)
(/.run expected_lux)
(try\map (\ type.equivalence = type_0))
- (try.default false))
+ (try.else false))
(|> (/.var_type name_1)
(/.run expected_lux)
(try\map (\ type.equivalence = type_1))
- (try.default false))
+ (try.else false))
(|> (/.var_type name_2)
(/.run expected_lux)
(try\map (\ type.equivalence = type_2))
- (try.default false))
+ (try.else false))
(|> (/.var_type name_3)
(/.run expected_lux)
(try\map (\ type.equivalence = type_3))
- (try.default false))))
+ (try.else false))))
(_.cover [/.type]
(and (|> (/.type ["" name_0])
(/.run expected_lux)
(try\map (\ type.equivalence = type_0))
- (try.default false))
+ (try.else false))
(|> (/.type ["" name_1])
(/.run expected_lux)
(try\map (\ type.equivalence = type_1))
- (try.default false))
+ (try.else false))
(|> (/.type ["" name_2])
(/.run expected_lux)
(try\map (\ type.equivalence = type_2))
- (try.default false))
+ (try.else false))
(|> (/.type ["" name_3])
(/.run expected_lux)
(try\map (\ type.equivalence = type_3))
- (try.default false))
+ (try.else false))
(|> (/.type [current_module name_4])
(/.run expected_lux)
(try\map (\ type.equivalence = type_4))
- (try.default false))
+ (try.else false))
(|> (/.type ["" name_4])
(/.run expected_lux)
(try\map (\ type.equivalence = type_4))
- (try.default false))))
+ (try.else false))))
)))
(def: injection
diff --git a/stdlib/source/test/lux/meta/annotation.lux b/stdlib/source/test/lux/meta/annotation.lux
index f080ee0c6..0447e3e6a 100644
--- a/stdlib/source/test/lux/meta/annotation.lux
+++ b/stdlib/source/test/lux/meta/annotation.lux
@@ -114,7 +114,7 @@
<definition>)))))]
[/.implementation? #.implementation?]
- [/.recursive_type? #.type-rec?]
+ [/.recursive_type? #.type_rec?]
[/.signature? #.sig?]
))
))))
@@ -137,8 +137,8 @@
<definition>
(\ (list.equivalence text.equivalence) = (list))))))]
- [/.function_arguments #.func-args]
- [/.type_arguments #.type-args]
+ [/.function_arguments #.func_args]
+ [/.type_arguments #.type_args]
))
))))
diff --git a/stdlib/source/test/lux/time.lux b/stdlib/source/test/lux/time.lux
index 86e8ddc45..593dc0d5c 100644
--- a/stdlib/source/test/lux/time.lux
+++ b/stdlib/source/test/lux/time.lux
@@ -54,7 +54,7 @@
/.clock
/.time
(try\map (\ /.equivalence = expected))
- (try.default false)))))
+ (try.else false)))))
(def: for_ranges
Test
@@ -124,7 +124,7 @@
/.to_millis
/.of_millis
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
(_.cover [/.time_exceeds_a_day]
(case (/.of_millis out_of_bounds)
(#try.Success _)
@@ -141,7 +141,7 @@
(\ /.codec encode)
(<text>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
..for_ranges
(_.for [/.Clock]
..for_clock)
diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux
index 6f9832198..0aa6674b6 100644
--- a/stdlib/source/test/lux/time/date.lux
+++ b/stdlib/source/test/lux/time/date.lux
@@ -46,7 +46,7 @@
(/.month expected)
(/.day_of_month expected))
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
(do random.monad
[expected random.date]
(_.cover [/.invalid_day]
@@ -75,7 +75,7 @@
(|> (\ /.codec encode expected)
(<text>.run /.parser)
(try\map (\ /.equivalence = expected))
- (try.default false))))
+ (try.else false))))
(do {! random.monad}
[year (\ ! map (|>> (n.% 10,000) inc)
random.nat)
diff --git a/stdlib/source/test/lux/time/month.lux b/stdlib/source/test/lux/time/month.lux
index 3e2a8b451..ec1c8134c 100644
--- a/stdlib/source/test/lux/time/month.lux
+++ b/stdlib/source/test/lux/time/month.lux
@@ -61,7 +61,7 @@
/.number
/.by_number
(try\map (\ /.equivalence = expected))
- (try.default false)))
+ (try.else false)))
(_.cover [/.invalid_month]
(case (/.by_number invalid)
(#try.Failure error)
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index 521ca4851..24097be23 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -109,7 +109,7 @@
))
)))
(_.cover [/.applied]
- (and (<| (maybe.default #0)
+ (and (<| (maybe.else #0)
(do maybe.monad
[partial (/.applied (list Bit) Ann)
full (/.applied (list Int) partial)]
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index 982234fb1..a7cac630c 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -180,7 +180,7 @@
(in (and (not pre)
post)))
(/.run /.fresh_context)
- (try.default false))
+ (try.else false))
(|> (do /.monad
[[var_id var/0] /.var
pre (/.bound? var_id)
@@ -190,7 +190,7 @@
(in (and (not pre)
(not post))))
(/.run /.fresh_context)
- (try.default false)))))
+ (try.else false)))))
(do random.monad
[nominal (random.ascii/upper 10)]
(_.cover [/.cannot_rebind_var]
@@ -688,7 +688,7 @@
(in (type\= (type_shape varT)
cleanedT)))
(/.run /.fresh_context)
- (try.default false))
+ (try.else false))
(|> (do /.monad
[[var_id varT] /.var
[_ replacementT] /.existential
@@ -697,7 +697,7 @@
(in (type\= (type_shape replacementT)
cleanedT)))
(/.run /.fresh_context)
- (try.default false))
+ (try.else false))
))))
(def: #export test
diff --git a/stdlib/source/test/lux/type/refinement.lux b/stdlib/source/test/lux/type/refinement.lux
index ecfbe8aab..80294a765 100644
--- a/stdlib/source/test/lux/type/refinement.lux
+++ b/stdlib/source/test/lux/type/refinement.lux
@@ -46,23 +46,23 @@
(_.cover [/.predicate]
(|> (/.refinement predicate modulus)
(maybe\map (|>> /.predicate (is? predicate)))
- (maybe.default false)))
+ (maybe.else false)))
))
(_.cover [/.value]
(|> (/.refinement predicate modulus)
(maybe\map (|>> /.value (n.= modulus)))
- (maybe.default false)))
+ (maybe.else false)))
(_.cover [/.lift]
(and (|> (/.refinement predicate modulus)
(maybe\map (/.lift (n.+ modulus)))
maybe\join
(maybe\map (|>> /.value (n.= (n.+ modulus modulus))))
- (maybe.default false))
+ (maybe.else false))
(|> (/.refinement predicate modulus)
(maybe\map (/.lift (n.+ (inc modulus))))
maybe\join
(maybe\map (|>> /.value (n.= (n.+ modulus (inc modulus)))))
- (maybe.default false)
+ (maybe.else false)
not)))
(_.cover [/.only]
(let [expected (list.only predicate raws)
diff --git a/stdlib/source/test/lux/world/console.lux b/stdlib/source/test/lux/world/console.lux
index c007b3ea8..5a815c294 100644
--- a/stdlib/source/test/lux/world/console.lux
+++ b/stdlib/source/test/lux/world/console.lux
@@ -62,7 +62,7 @@
(do io.monad
[?_ (/.write_line expected console)
?actual (\ console read_line [])]
- (in (<| (try.default false)
+ (in (<| (try.else false)
(do try.monad
[_ ?_
actual ?actual]
diff --git a/stdlib/source/test/lux/world/file/watch.lux b/stdlib/source/test/lux/world/file/watch.lux
index 7d09023cf..88af80fdf 100644
--- a/stdlib/source/test/lux/world/file/watch.lux
+++ b/stdlib/source/test/lux/world/file/watch.lux
@@ -182,7 +182,7 @@
after_modification!
after_deletion!)))]
(_.cover' [/.mock /.polling]
- (try.default false verdict)))))
+ (try.else false verdict)))))
(do random.monad
[directory (random.ascii/alpha 5)
#let [/ "/"
diff --git a/stdlib/source/test/lux/world/net/http/client.lux b/stdlib/source/test/lux/world/net/http/client.lux
index 1979003f0..8a74d3e21 100644
--- a/stdlib/source/test/lux/world/net/http/client.lux
+++ b/stdlib/source/test/lux/world/net/http/client.lux
@@ -74,7 +74,7 @@
[product.right (\ utf8.codec decode)]
[(\ nat.decimal decode)]
[(nat.= <expected>) in])
- (try.default false)))]
+ (try.else false)))]
[/.post on_post]
[/.get on_get]
diff --git a/stdlib/source/test/lux/world/program.lux b/stdlib/source/test/lux/world/program.lux
index 6760865e7..9940220ac 100644
--- a/stdlib/source/test/lux/world/program.lux
+++ b/stdlib/source/test/lux/world/program.lux
@@ -64,7 +64,7 @@
(|> environment
(dictionary.get key)
(maybe\map (text\= value))
- (maybe.default false)))))))))))
+ (maybe.else false)))))))))))
(_.cover [/.unknown_environment_variable]
(let [program (/.mock environment home directory)]
(|> unknown
diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux
index 4008c4c5a..ecea6d8b9 100644
--- a/stdlib/source/test/lux/world/shell.lux
+++ b/stdlib/source/test/lux/world/shell.lux
@@ -124,5 +124,5 @@
destroyed!
(i.= exit await))))]
(_.cover' [/.Shell]
- (try.default false verdict)))))
+ (try.else false verdict)))))
)))