aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/aedifex/artifact/extension.lux6
-rw-r--r--stdlib/source/test/aedifex/artifact/type.lux6
-rw-r--r--stdlib/source/test/aedifex/cache.lux6
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux6
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux6
-rw-r--r--stdlib/source/test/aedifex/command/deploy.lux11
-rw-r--r--stdlib/source/test/aedifex/hash.lux6
-rw-r--r--stdlib/source/test/aedifex/metadata/artifact.lux2
-rw-r--r--stdlib/source/test/aedifex/metadata/snapshot.lux2
-rw-r--r--stdlib/source/test/aedifex/package.lux6
-rw-r--r--stdlib/source/test/aedifex/parser.lux6
-rw-r--r--stdlib/source/test/aedifex/profile.lux11
-rw-r--r--stdlib/source/test/aedifex/project.lux8
-rw-r--r--stdlib/source/test/lux/abstract/apply.lux6
-rw-r--r--stdlib/source/test/lux/abstract/comonad.lux6
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux6
-rw-r--r--stdlib/source/test/lux/abstract/equivalence.lux8
-rw-r--r--stdlib/source/test/lux/abstract/fold.lux6
-rw-r--r--stdlib/source/test/lux/abstract/functor.lux6
-rw-r--r--stdlib/source/test/lux/abstract/interval.lux6
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux8
-rw-r--r--stdlib/source/test/lux/abstract/monoid.lux7
-rw-r--r--stdlib/source/test/lux/abstract/order.lux8
-rw-r--r--stdlib/source/test/lux/abstract/predicate.lux6
-rw-r--r--stdlib/source/test/lux/control/concatenative.lux14
-rw-r--r--stdlib/source/test/lux/control/concurrency/actor.lux6
-rw-r--r--stdlib/source/test/lux/control/concurrency/atom.lux7
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux8
-rw-r--r--stdlib/source/test/lux/control/concurrency/promise.lux9
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux10
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux6
-rw-r--r--stdlib/source/test/lux/control/concurrency/thread.lux9
-rw-r--r--stdlib/source/test/lux/control/continuation.lux6
-rw-r--r--stdlib/source/test/lux/control/exception.lux8
-rw-r--r--stdlib/source/test/lux/control/function.lux8
-rw-r--r--stdlib/source/test/lux/control/function/contract.lux3
-rw-r--r--stdlib/source/test/lux/control/function/memo.lux12
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux6
-rw-r--r--stdlib/source/test/lux/control/io.lux5
-rw-r--r--stdlib/source/test/lux/control/parser.lux10
-rw-r--r--stdlib/source/test/lux/control/parser/analysis.lux10
-rw-r--r--stdlib/source/test/lux/control/parser/binary.lux16
-rw-r--r--stdlib/source/test/lux/control/parser/cli.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/code.lux12
-rw-r--r--stdlib/source/test/lux/control/parser/environment.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/json.lux8
-rw-r--r--stdlib/source/test/lux/control/parser/synthesis.lux16
-rw-r--r--stdlib/source/test/lux/control/parser/text.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/tree.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/type.lux6
-rw-r--r--stdlib/source/test/lux/control/parser/xml.lux10
-rw-r--r--stdlib/source/test/lux/control/pipe.lux6
-rw-r--r--stdlib/source/test/lux/control/reader.lux7
-rw-r--r--stdlib/source/test/lux/control/region.lux8
-rw-r--r--stdlib/source/test/lux/control/remember.lux2
-rw-r--r--stdlib/source/test/lux/control/security/capability.lux7
-rw-r--r--stdlib/source/test/lux/control/security/policy.lux8
-rw-r--r--stdlib/source/test/lux/control/state.lux10
-rw-r--r--stdlib/source/test/lux/control/thread.lux7
-rw-r--r--stdlib/source/test/lux/control/try.lux10
-rw-r--r--stdlib/source/test/lux/control/writer.lux9
-rw-r--r--stdlib/source/test/lux/data.lux2
-rw-r--r--stdlib/source/test/lux/data/binary.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux9
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux7
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux7
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/stack.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux6
-rw-r--r--stdlib/source/test/lux/data/color.lux12
-rw-r--r--stdlib/source/test/lux/data/color/named.lux6
-rw-r--r--stdlib/source/test/lux/data/format/json.lux8
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux8
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux6
-rw-r--r--stdlib/source/test/lux/data/lazy.lux7
-rw-r--r--stdlib/source/test/lux/data/maybe.lux98
-rw-r--r--stdlib/source/test/lux/data/name.lux6
-rw-r--r--stdlib/source/test/lux/data/product.lux7
-rw-r--r--stdlib/source/test/lux/data/sum.lux8
-rw-r--r--stdlib/source/test/lux/data/text.lux6
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux8
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux6
-rw-r--r--stdlib/source/test/lux/data/text/format.lux14
-rw-r--r--stdlib/source/test/lux/data/text/regex.lux14
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux6
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux6
-rw-r--r--stdlib/source/test/lux/host.js.lux6
-rw-r--r--stdlib/source/test/lux/host.jvm.lux6
-rw-r--r--stdlib/source/test/lux/host.old.lux6
-rw-r--r--stdlib/source/test/lux/locale/language.lux6
-rw-r--r--stdlib/source/test/lux/locale/territory.lux6
-rw-r--r--stdlib/source/test/lux/macro/code.lux8
-rw-r--r--stdlib/source/test/lux/macro/poly/equivalence.lux12
-rw-r--r--stdlib/source/test/lux/macro/poly/json.lux12
-rw-r--r--stdlib/source/test/lux/macro/syntax.lux11
-rw-r--r--stdlib/source/test/lux/macro/syntax/common.lux30
-rw-r--r--stdlib/source/test/lux/macro/syntax/common/declaration.lux47
-rw-r--r--stdlib/source/test/lux/macro/template.lux6
-rw-r--r--stdlib/source/test/lux/math.lux30
-rw-r--r--stdlib/source/test/lux/math/infix.lux8
-rw-r--r--stdlib/source/test/lux/math/logic/continuous.lux123
-rw-r--r--stdlib/source/test/lux/math/logic/fuzzy.lux14
-rw-r--r--stdlib/source/test/lux/math/modular.lux8
-rw-r--r--stdlib/source/test/lux/math/modulus.lux7
-rw-r--r--stdlib/source/test/lux/math/number.lux (renamed from stdlib/source/test/lux/data/number.lux)14
-rw-r--r--stdlib/source/test/lux/math/number/complex.lux (renamed from stdlib/source/test/lux/data/number/complex.lux)11
-rw-r--r--stdlib/source/test/lux/math/number/frac.lux (renamed from stdlib/source/test/lux/data/number/frac.lux)0
-rw-r--r--stdlib/source/test/lux/math/number/i16.lux (renamed from stdlib/source/test/lux/data/number/i16.lux)4
-rw-r--r--stdlib/source/test/lux/math/number/i32.lux (renamed from stdlib/source/test/lux/data/number/i32.lux)4
-rw-r--r--stdlib/source/test/lux/math/number/i64.lux (renamed from stdlib/source/test/lux/data/number/i64.lux)10
-rw-r--r--stdlib/source/test/lux/math/number/i8.lux (renamed from stdlib/source/test/lux/data/number/i8.lux)4
-rw-r--r--stdlib/source/test/lux/math/number/int.lux (renamed from stdlib/source/test/lux/data/number/int.lux)8
-rw-r--r--stdlib/source/test/lux/math/number/nat.lux (renamed from stdlib/source/test/lux/data/number/nat.lux)8
-rw-r--r--stdlib/source/test/lux/math/number/ratio.lux (renamed from stdlib/source/test/lux/data/number/ratio.lux)8
-rw-r--r--stdlib/source/test/lux/math/number/rev.lux (renamed from stdlib/source/test/lux/data/number/rev.lux)12
-rw-r--r--stdlib/source/test/lux/meta.lux8
-rw-r--r--stdlib/source/test/lux/meta/annotation.lux17
-rw-r--r--stdlib/source/test/lux/target/jvm.lux14
-rw-r--r--stdlib/source/test/lux/time/duration.lux7
-rw-r--r--stdlib/source/test/lux/time/instant.lux8
-rw-r--r--stdlib/source/test/lux/type.lux116
-rw-r--r--stdlib/source/test/lux/type/check.lux75
-rw-r--r--stdlib/source/test/lux/type/dynamic.lux8
-rw-r--r--stdlib/source/test/lux/type/implicit.lux6
-rw-r--r--stdlib/source/test/lux/type/resource.lux3
-rw-r--r--stdlib/source/test/lux/world/file.lux83
-rw-r--r--stdlib/source/test/lux/world/shell.lux8
138 files changed, 840 insertions, 751 deletions
diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux
index 2a3f3f564..5d2491d28 100644
--- a/stdlib/source/test/aedifex/artifact/extension.lux
+++ b/stdlib/source/test/aedifex/artifact/extension.lux
@@ -5,13 +5,13 @@
[monad (#+ do)]]
[data
["." text ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." set]
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{#program
["." /
["/#" // #_
diff --git a/stdlib/source/test/aedifex/artifact/type.lux b/stdlib/source/test/aedifex/artifact/type.lux
index 7f153b2a9..01b581eb3 100644
--- a/stdlib/source/test/aedifex/artifact/type.lux
+++ b/stdlib/source/test/aedifex/artifact/type.lux
@@ -5,13 +5,13 @@
[monad (#+ do)]]
[data
["." text]
- [number
- ["n" nat]]
[collection
["." set]
["." list]]]
[math
- ["." random (#+ Random) ("#\." monad)]]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]]
{#program
["." /]})
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index bc436733b..22a32e43f 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -12,15 +12,15 @@
[data
[binary (#+ Binary)]
["." text]
- [number
- ["n" nat]]
[format
[xml (#+ XML)]]
[collection
["." set]
["." dictionary]]]
[math
- ["." random (#+ Random) ("#\." monad)]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]
[world
["." file]
["." program]]]
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index 817b4db5f..7bac6eb5d 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -15,14 +15,14 @@
[data
["." text
["%" format (#+ format)]]
- [number
- ["n" nat]]
[collection
["." dictionary]
["." set]
["." list ("#\." functor)]]]
[math
- ["." random]]
+ ["." random]
+ [number
+ ["n" nat]]]
[world
[console (#+ Console)]
["." shell (#+ Shell)]
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index c429f34fb..d98473259 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -14,13 +14,13 @@
["." product]
["." text ("#\." equivalence)
["%" format (#+ format)]]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor)]
["." set]]]
[math
- ["." random (#+ Random)]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]
[world
["." file (#+ Path File)]]]
[//
diff --git a/stdlib/source/test/aedifex/command/deploy.lux b/stdlib/source/test/aedifex/command/deploy.lux
index b6cd89469..45d39cffc 100644
--- a/stdlib/source/test/aedifex/command/deploy.lux
+++ b/stdlib/source/test/aedifex/command/deploy.lux
@@ -49,7 +49,8 @@
["#." local]
["#." hash]
["#." repository (#+ Repository)
- [identity (#+ Identity)]]
+ [identity (#+ Identity)]
+ ["#/." remote]]
["#." artifact (#+ Artifact)
["#/." extension]]]]]})
@@ -111,10 +112,10 @@
(export.library fs)
(\ ! map (format.run tar.writer)))
- actual_pom (\ repository download (///repository.uri artifact ///artifact/extension.pom))
- actual_library (\ repository download (///repository.uri artifact ///artifact/extension.lux_library))
- actual_sha-1 (\ repository download (///repository.uri artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
- actual_md5 (\ repository download (///repository.uri artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
+ actual_pom (\ repository download (///repository/remote.uri artifact ///artifact/extension.pom))
+ actual_library (\ repository download (///repository/remote.uri artifact ///artifact/extension.lux_library))
+ actual_sha-1 (\ repository download (///repository/remote.uri artifact (format ///artifact/extension.lux_library ///artifact/extension.sha-1)))
+ actual_md5 (\ repository download (///repository/remote.uri artifact (format ///artifact/extension.lux_library ///artifact/extension.md5)))
#let [deployed_library!
(\ binary.equivalence =
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 502130970..4c057be60 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -12,12 +12,12 @@
["." exception]]
[data
["." binary (#+ Binary)]
- [number
- ["n" nat]]
[text
["%" format (#+ format)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{#program
["." /]}
[test
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux
index 3177c6ff2..6c39546b4 100644
--- a/stdlib/source/test/aedifex/metadata/artifact.lux
+++ b/stdlib/source/test/aedifex/metadata/artifact.lux
@@ -10,7 +10,7 @@
["." try ("#\." functor)]
[parser
["<.>" xml]]]
- [data
+ [math
[number
["n" nat]]]
["." time
diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux
index e9e42be9a..c1725f55a 100644
--- a/stdlib/source/test/aedifex/metadata/snapshot.lux
+++ b/stdlib/source/test/aedifex/metadata/snapshot.lux
@@ -10,7 +10,7 @@
["." try ("#\." functor)]
[parser
["<.>" xml]]]
- [data
+ [math
[number
["n" nat]]]
["." time
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index 7562547df..960a75f21 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -10,11 +10,11 @@
[data
["." text]
[collection
- ["." set (#+ Set)]]
+ ["." set (#+ Set)]]]
+ [math
+ ["." random (#+ Random)]
[number
["n" nat]]]
- [math
- ["." random (#+ Random)]]
[world
["." file]]]
[//
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index 1eb62b75d..0a13acb32 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -11,14 +11,14 @@
["<c>" code]]]
[data
["." text]
- [number
- ["n" nat]]
[collection
["." set (#+ Set)]
["." dictionary (#+ Dictionary)]
["." list ("#\." functor)]]]
[math
- ["." random (#+ Random)]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]
[macro
["." code]]]
[//
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index 9316fae66..ea03a1e92 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -15,22 +15,23 @@
["." cli]]]
[data
["." text]
- [number
- ["n" nat]]
[collection
["." set (#+ Set)]
["." dictionary (#+ Dictionary)]]]
[math
- ["." random (#+ Random) ("#\." monad)]]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]]
[//
["@." artifact]
["@." dependency]]
{#program
["." /
["/#" // #_
- [repository (#+ Address)]
["#." dependency (#+ Dependency)]
- ["#." format]]]})
+ ["#." format]
+ [repository
+ [remote (#+ Address)]]]]})
(def: distribution
(Random /.Distribution)
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index cec9c0cae..5e26b63de 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -12,11 +12,11 @@
["." exception]]
[data
["." product]
- ["." text ("#\." equivalence)]
- [number
- ["n" nat]]]
+ ["." text ("#\." equivalence)]]
[math
- ["." random (#+ Random) ("#\." monad)]]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]]
[//
["@." profile]]
{#program
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux
index d56860291..fc67f9830 100644
--- a/stdlib/source/test/lux/abstract/apply.lux
+++ b/stdlib/source/test/lux/abstract/apply.lux
@@ -4,12 +4,12 @@
[monad (#+ do)]]
[data
["." maybe]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random]]
+ ["." random]
+ [number
+ ["n" nat]]]
["_" test (#+ Test)]]
{1
["." / (#+ Apply)]})
diff --git a/stdlib/source/test/lux/abstract/comonad.lux b/stdlib/source/test/lux/abstract/comonad.lux
index 2e63b4eb8..7e59dfc42 100644
--- a/stdlib/source/test/lux/abstract/comonad.lux
+++ b/stdlib/source/test/lux/abstract/comonad.lux
@@ -3,11 +3,11 @@
[abstract
[monad (#+ do)]]
[data
- ["." identity (#+ Identity)]
+ ["." identity (#+ Identity)]]
+ [math
+ ["." random]
[number
["n" nat]]]
- [math
- ["." random]]
["_" test (#+ Test)]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index 4446d958c..1cee8a211 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -6,12 +6,12 @@
[data
["." product]
["." maybe ("#\." functor)]
- [number
- ["n" nat]]
[collection
["." list ("#\." fold)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux
index 3009c289f..cceb75c42 100644
--- a/stdlib/source/test/lux/abstract/equivalence.lux
+++ b/stdlib/source/test/lux/abstract/equivalence.lux
@@ -8,12 +8,12 @@
[functor
["$." contravariant]]]}]
[data
- ["." bit ("#\." equivalence)]
+ ["." bit ("#\." equivalence)]]
+ [math
+ ["." random (#+ Random)]
[number
["n" nat]
- ["i" int]]]
- [math
- ["." random (#+ Random)]]]
+ ["i" int]]]]
{1
["." / (#+ Equivalence)]})
diff --git a/stdlib/source/test/lux/abstract/fold.lux b/stdlib/source/test/lux/abstract/fold.lux
index 66f7a6e48..f4a61fa95 100644
--- a/stdlib/source/test/lux/abstract/fold.lux
+++ b/stdlib/source/test/lux/abstract/fold.lux
@@ -4,12 +4,12 @@
[abstract
[monad (#+ do)]]
[data
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Fold)]})
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index 593400eb5..cd56a2aba 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -5,12 +5,12 @@
[monad (#+ do)]]
[data
["." maybe]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Functor)]})
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index 66d607ab8..ccd5562c8 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -10,13 +10,13 @@
[control
[pipe (#+ case>)]]
[data
- [number
- ["n" nat]]
[collection
["." set]
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Interval) ("\." equivalence)]})
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index 19e5bb342..805e6478f 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -1,14 +1,14 @@
(.module:
[lux #*
+ ["_" test (#+ Test)]
[data
["." identity (#+ Identity)]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor fold)]]]
[math
- ["." random]]
- ["_" test (#+ Test)]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Monad do)]})
diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux
index 2037adeea..81835537b 100644
--- a/stdlib/source/test/lux/abstract/monoid.lux
+++ b/stdlib/source/test/lux/abstract/monoid.lux
@@ -3,12 +3,11 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]]
- [data
+ [math
+ ["." random (#+ Random)]
[number
["." nat]
- ["." int]]]
- [math
- ["." random (#+ Random)]]]
+ ["." int]]]]
{1
["." /
[//
diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux
index f45076a0c..e9121353a 100644
--- a/stdlib/source/test/lux/abstract/order.lux
+++ b/stdlib/source/test/lux/abstract/order.lux
@@ -8,11 +8,11 @@
[functor
["$." contravariant]]]}]
[data
- ["." bit ("#\." equivalence)]
- [number
- ["n" nat]]]
+ ["." bit ("#\." equivalence)]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /
[//
diff --git a/stdlib/source/test/lux/abstract/predicate.lux b/stdlib/source/test/lux/abstract/predicate.lux
index 47875a6c4..be2953aba 100644
--- a/stdlib/source/test/lux/abstract/predicate.lux
+++ b/stdlib/source/test/lux/abstract/predicate.lux
@@ -13,12 +13,12 @@
["." function]]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/concatenative.lux b/stdlib/source/test/lux/control/concatenative.lux
index b01981730..090fd799f 100644
--- a/stdlib/source/test/lux/control/concatenative.lux
+++ b/stdlib/source/test/lux/control/concatenative.lux
@@ -6,18 +6,16 @@
[data
["." sum]
["." name]
- ["." bit ("#\." equivalence)]
+ ["." bit ("#\." equivalence)]]
+ [macro
+ ["." template]]
+ [math
+ ["." random]
[number
["n" nat]
["i" int]
["r" rev]
- ["f" frac]]
- [text
- ["%" format (#+ format)]]]
- [math
- ["." random]]
- [macro
- ["." template]]]
+ ["f" frac]]]]
{1
["." / (#+ word: => ||>)]})
diff --git a/stdlib/source/test/lux/control/concurrency/actor.lux b/stdlib/source/test/lux/control/concurrency/actor.lux
index 7a94c72aa..d983ab382 100644
--- a/stdlib/source/test/lux/control/concurrency/actor.lux
+++ b/stdlib/source/test/lux/control/concurrency/actor.lux
@@ -8,15 +8,15 @@
["." exception (#+ exception:)]
["." io (#+ IO io)]]
[data
- [number
- ["n" nat]]
[text
["%" format (#+ format)]]
[collection
["." list]
["." row (#+ Row)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ actor: message:)
[//
diff --git a/stdlib/source/test/lux/control/concurrency/atom.lux b/stdlib/source/test/lux/control/concurrency/atom.lux
index bdc56521a..c8496c210 100644
--- a/stdlib/source/test/lux/control/concurrency/atom.lux
+++ b/stdlib/source/test/lux/control/concurrency/atom.lux
@@ -5,11 +5,10 @@
[monad (#+ do)]]
[control
["." io]]
- [data
- [number
- ["n" nat]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index d48e1b1ae..2c724fa2a 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -13,15 +13,13 @@
["." exception]
["." io (#+ IO io)]]
[data
- [text
- ["%" format (#+ format)]]
- [number
- ["n" nat]]
[collection
["." list ("#\." fold monoid)]
["." row (#+ Row)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /
[//
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index 18b040acf..7fc3196cd 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -11,15 +11,14 @@
[control
[pipe (#+ case>)]
["." io]]
- [data
- [number
- ["n" nat]
- ["i" int]]]
[time
["." instant]
["." duration]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]
+ ["i" int]]]]
{1
["." /
[//
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index e30a930ac..472e21c7d 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -13,16 +13,16 @@
["." atom (#+ Atom)]]]
[data
["." maybe]
- [number
- ["n" nat]]
["." text ("#\." equivalence)
["%" format (#+ format)]]
[collection
["." list ("#\." functor)]]]
- [type
- ["." refinement]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]
+ [type
+ ["." refinement]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index ade5dd70d..2eec0d207 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -12,12 +12,12 @@
["." io (#+ IO)]]
[data
["." product]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /
[//
diff --git a/stdlib/source/test/lux/control/concurrency/thread.lux b/stdlib/source/test/lux/control/concurrency/thread.lux
index 04da97f17..f1ea184f0 100644
--- a/stdlib/source/test/lux/control/concurrency/thread.lux
+++ b/stdlib/source/test/lux/control/concurrency/thread.lux
@@ -5,15 +5,14 @@
[monad (#+ do)]]
[control
["." io]]
- [data
- [number
- ["n" nat]
- ["i" int]]]
[time
["." instant (#+ Instant)]
["." duration]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]
+ ["i" int]]]]
{1
["." /
[//
diff --git a/stdlib/source/test/lux/control/continuation.lux b/stdlib/source/test/lux/control/continuation.lux
index b22705489..24aadf440 100644
--- a/stdlib/source/test/lux/control/continuation.lux
+++ b/stdlib/source/test/lux/control/continuation.lux
@@ -9,12 +9,12 @@
["$." apply]
["$." monad]]}]
[data
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/exception.lux b/stdlib/source/test/lux/control/exception.lux
index 8f890018c..c65a88fbf 100644
--- a/stdlib/source/test/lux/control/exception.lux
+++ b/stdlib/source/test/lux/control/exception.lux
@@ -1,15 +1,15 @@
(.module:
[lux #*
+ ["_" test (#+ Test)]
[abstract
[monad (#+ do)]]
[data
- [number
- ["n" nat]]
["." text ("#\." equivalence)
["%" format (#+ format)]]]
[math
- ["." random]]
- ["_" test (#+ Test)]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ exception:)
[//
diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux
index c78d4f2e5..f816075f5 100644
--- a/stdlib/source/test/lux/control/function.lux
+++ b/stdlib/source/test/lux/control/function.lux
@@ -1,5 +1,6 @@
(.module:
[lux #*
+ ["_" test (#+ Test)]
[abstract
[equivalence (#+ Equivalence)]
[monad (#+ do)]
@@ -7,12 +8,11 @@
[/
["$." monoid]]}]
[data
- [number
- ["n" nat]]
["." text ("#!." equivalence)]]
[math
- ["." random (#+ Random)]]
- ["_" test (#+ Test)]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]}
["." / #_
diff --git a/stdlib/source/test/lux/control/function/contract.lux b/stdlib/source/test/lux/control/function/contract.lux
index 422c98618..47962d04a 100644
--- a/stdlib/source/test/lux/control/function/contract.lux
+++ b/stdlib/source/test/lux/control/function/contract.lux
@@ -7,8 +7,7 @@
[control
["." try]]
[math
- ["." random]]
- [data
+ ["." random]
[number
["n" nat]]]]
{1
diff --git a/stdlib/source/test/lux/control/function/memo.lux b/stdlib/source/test/lux/control/function/memo.lux
index 8fad40d86..fdf9119f6 100644
--- a/stdlib/source/test/lux/control/function/memo.lux
+++ b/stdlib/source/test/lux/control/function/memo.lux
@@ -6,18 +6,16 @@
[control
["." io (#+ IO)]
["." state (#+ State) ("#\." monad)]]
- [math
- ["." random]]
[data
["." product]
- [text
- ["%" format (#+ format)]]
- [number
- ["n" nat]
- ["." i64]]
[collection
["." dictionary (#+ Dictionary)]
["." list ("#\." functor fold)]]]
+ [math
+ ["." random]
+ [number
+ ["n" nat]
+ ["." i64]]]
[time
["." instant]
["." duration (#+ Duration)]]]
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index 0c343a685..8ca196ba5 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -12,12 +12,12 @@
["." state (#+ State)]]
[data
["." product]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor fold)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/io.lux b/stdlib/source/test/lux/control/io.lux
index 937d73870..30e4656c8 100644
--- a/stdlib/source/test/lux/control/io.lux
+++ b/stdlib/source/test/lux/control/io.lux
@@ -1,8 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random]]
[abstract
[monad (#+ do)]
{[0 #spec]
@@ -10,7 +8,8 @@
["$." functor (#+ Injection Comparison)]
["$." apply]
["$." monad]]}]
- [data
+ [math
+ ["." random]
[number
["n" nat]]]]
{1
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index 6c2f739bb..bf69c8330 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -14,17 +14,17 @@
[parser
["s" code]]]
[data
- [number
- ["n" nat]]
["." text ("#\." equivalence)
["%" format (#+ format)]]
[collection
["." list ("#\." functor)]]]
[math
- ["." random]]
+ ["." random]
+ [number
+ ["n" nat]]]
[macro
- ["." code]
- [syntax (#+ syntax:)]]]
+ [syntax (#+ syntax:)]
+ ["." code]]]
{1
["." / (#+ Parser)]}
["." / #_
diff --git a/stdlib/source/test/lux/control/parser/analysis.lux b/stdlib/source/test/lux/control/parser/analysis.lux
index daf3632d6..8ffc75025 100644
--- a/stdlib/source/test/lux/control/parser/analysis.lux
+++ b/stdlib/source/test/lux/control/parser/analysis.lux
@@ -12,15 +12,15 @@
["." name ("#\." equivalence)]
["." bit ("#\." equivalence)]
["." text ("#\." equivalence)]
+ [collection
+ ["." list]]]
+ [math
+ ["." random (#+ Random)]
[number
["n" nat]
["i" int]
["f" frac]
- ["r" rev]]
- [collection
- ["." list]]]
- [math
- ["." random (#+ Random)]]
+ ["r" rev]]]
[tool
[compiler
[reference (#+ Constant)]
diff --git a/stdlib/source/test/lux/control/parser/binary.lux b/stdlib/source/test/lux/control/parser/binary.lux
index 2a29ba367..bc54ceada 100644
--- a/stdlib/source/test/lux/control/parser/binary.lux
+++ b/stdlib/source/test/lux/control/parser/binary.lux
@@ -1,6 +1,7 @@
(.module:
[lux (#- primitive)
["_" test (#+ Test)]
+ ["." type]
[abstract
[equivalence (#+ Equivalence)]
[predicate (#+ Predicate)]
@@ -21,21 +22,20 @@
["%" format (#+ format)]]
["." format #_
["#" binary]]
- [number
- ["." i64]
- ["n" nat]
- ["." int]
- ["." rev]
- ["." frac]]
[collection
["." list]
["." row]
["." set]]]
[macro
["." code]]
- ["." type]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." i64]
+ ["." int]
+ ["." rev]
+ ["." frac]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/parser/cli.lux b/stdlib/source/test/lux/control/parser/cli.lux
index 60bd3f9fe..41ffb4e23 100644
--- a/stdlib/source/test/lux/control/parser/cli.lux
+++ b/stdlib/source/test/lux/control/parser/cli.lux
@@ -7,13 +7,13 @@
["." try]
["<>" parser]]
[data
- [number
- ["n" nat ("#\." decimal)]]
["." text ("#\." equivalence)]
[collection
["." list]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat ("#\." decimal)]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/parser/code.lux b/stdlib/source/test/lux/control/parser/code.lux
index 71aa8f39d..0a8311fb3 100644
--- a/stdlib/source/test/lux/control/parser/code.lux
+++ b/stdlib/source/test/lux/control/parser/code.lux
@@ -11,17 +11,17 @@
["." bit]
["." name]
["." text]
- [number
- ["." nat]
- ["." int]
- ["." rev]
- ["." frac]]
[collection
["." list]]]
[macro
["." code]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["." nat]
+ ["." int]
+ ["." rev]
+ ["." frac]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/parser/environment.lux b/stdlib/source/test/lux/control/parser/environment.lux
index 117693fe9..6a210f2a0 100644
--- a/stdlib/source/test/lux/control/parser/environment.lux
+++ b/stdlib/source/test/lux/control/parser/environment.lux
@@ -8,12 +8,12 @@
["." exception]]
[data
["." text ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." dictionary]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /
["/#" // ("#\." monad)]]})
diff --git a/stdlib/source/test/lux/control/parser/json.lux b/stdlib/source/test/lux/control/parser/json.lux
index b9d111eff..4d8dc0b8e 100644
--- a/stdlib/source/test/lux/control/parser/json.lux
+++ b/stdlib/source/test/lux/control/parser/json.lux
@@ -12,9 +12,6 @@
["." maybe]
["." bit]
["." text]
- [number
- ["n" nat]
- ["." frac]]
[collection
["." list ("#\." functor)]
["." set]
@@ -23,7 +20,10 @@
[format
["." json]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." frac]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/parser/synthesis.lux b/stdlib/source/test/lux/control/parser/synthesis.lux
index b47f8338c..7916f7217 100644
--- a/stdlib/source/test/lux/control/parser/synthesis.lux
+++ b/stdlib/source/test/lux/control/parser/synthesis.lux
@@ -3,23 +3,23 @@
["_" test (#+ Test)]
[abstract
["." monad (#+ do)]]
- [math
- ["." random (#+ Random)]]
[control
[pipe (#+ case>)]
+ ["<>" parser]
["." try]
- ["." exception]
- ["<>" parser]]
+ ["." exception]]
[data
["." bit]
["." name]
["." text]
- [number
- ["." i64]
- ["n" nat]
- ["." frac]]
[collection
["." list ("#\." functor)]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." i64]
+ ["." frac]]]
[tool
[compiler
[reference (#+)
diff --git a/stdlib/source/test/lux/control/parser/text.lux b/stdlib/source/test/lux/control/parser/text.lux
index 8465393de..dd8ce8ceb 100644
--- a/stdlib/source/test/lux/control/parser/text.lux
+++ b/stdlib/source/test/lux/control/parser/text.lux
@@ -14,15 +14,15 @@
["." unicode #_
["#" set]
["#/." block]]]
- [number (#+ hex)
- ["n" nat]]
[collection
["." set]
["." list ("#\." functor)]
[tree
["." finger]]]]
[math
- ["." random]]
+ ["." random]
+ [number (#+ hex)
+ ["n" nat]]]
[macro
["." code]]]
{1
diff --git a/stdlib/source/test/lux/control/parser/tree.lux b/stdlib/source/test/lux/control/parser/tree.lux
index f4f3da769..5dbe726ea 100644
--- a/stdlib/source/test/lux/control/parser/tree.lux
+++ b/stdlib/source/test/lux/control/parser/tree.lux
@@ -7,13 +7,13 @@
["." try]
["." exception]]
[data
- [number
- ["n" nat]]
[collection
["." tree
["." zipper]]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /
["/#" //]]})
diff --git a/stdlib/source/test/lux/control/parser/type.lux b/stdlib/source/test/lux/control/parser/type.lux
index 47cdac08f..5390498c7 100644
--- a/stdlib/source/test/lux/control/parser/type.lux
+++ b/stdlib/source/test/lux/control/parser/type.lux
@@ -8,12 +8,12 @@
["." exception]]
[data
["." name ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random (#+ Random)]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]
["." type ("#\." equivalence)]]
{1
["." /
diff --git a/stdlib/source/test/lux/control/parser/xml.lux b/stdlib/source/test/lux/control/parser/xml.lux
index 6d6126e8f..a9f71af71 100644
--- a/stdlib/source/test/lux/control/parser/xml.lux
+++ b/stdlib/source/test/lux/control/parser/xml.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
["_" test (#+ Test)]
+ ["." type ("#\." equivalence)]
[abstract
[monad (#+ do)]]
[control
@@ -11,16 +12,15 @@
["." name ("#\." equivalence)]
[format
["." xml]]
- [number
- ["n" nat]]
[collection
["." dictionary]
["." list]]]
- [math
- ["." random (#+ Random)]]
[macro
["." template]]
- ["." type ("#\." equivalence)]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /
["/#" // ("#\." monad)]]})
diff --git a/stdlib/source/test/lux/control/pipe.lux b/stdlib/source/test/lux/control/pipe.lux
index 6a9809c8b..cd57863b7 100644
--- a/stdlib/source/test/lux/control/pipe.lux
+++ b/stdlib/source/test/lux/control/pipe.lux
@@ -5,12 +5,12 @@
[monad (#+ do)]]
[data
["." identity]
- [number
- ["n" nat]]
["." text ("#\." equivalence)
["%" format (#+ format)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/reader.lux b/stdlib/source/test/lux/control/reader.lux
index cd8204b0c..11c8b8855 100644
--- a/stdlib/source/test/lux/control/reader.lux
+++ b/stdlib/source/test/lux/control/reader.lux
@@ -8,11 +8,10 @@
["$." functor (#+ Injection Comparison)]
["$." apply]
["$." monad]]}]
- [data
- [number
- ["n" nat]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Reader)
[//
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index b9389dbdf..1023822ea 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -1,5 +1,6 @@
(.module:
[lux #*
+ [type (#+ :share)]
["_" test (#+ Test)]
[abstract
[equivalence (#+ Equivalence)]
@@ -15,13 +16,12 @@
[control
["." try (#+ Try)]]
[data
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random]]
- [type (#+ :share)]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Region)
[//
diff --git a/stdlib/source/test/lux/control/remember.lux b/stdlib/source/test/lux/control/remember.lux
index 6f1e53122..fb7517237 100644
--- a/stdlib/source/test/lux/control/remember.lux
+++ b/stdlib/source/test/lux/control/remember.lux
@@ -10,11 +10,11 @@
[parser
["<c>" code]]]
[data
- [number (#+ hex)]
["." product]
["." text
["%" format (#+ format)]]]
[math
+ [number (#+ hex)]
["." random (#+ Random) ("#\." monad)]]
[time
["." date (#+ Date)]
diff --git a/stdlib/source/test/lux/control/security/capability.lux b/stdlib/source/test/lux/control/security/capability.lux
index 50a2d04d8..7804cda68 100644
--- a/stdlib/source/test/lux/control/security/capability.lux
+++ b/stdlib/source/test/lux/control/security/capability.lux
@@ -7,11 +7,10 @@
["." io (#+ IO)]
[concurrency
["." promise]]]
- [data
- [number
- ["n" nat]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux
index 55e928d52..9c72304d9 100644
--- a/stdlib/source/test/lux/control/security/policy.lux
+++ b/stdlib/source/test/lux/control/security/policy.lux
@@ -13,11 +13,11 @@
[security
["!" capability]]]
[data
- ["." text ("#\." equivalence)]
- [number
- ["n" nat]]]
+ ["." text ("#\." equivalence)]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Context Privacy Can_Conceal Can_Reveal Privilege Private)]})
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index 4d6772069..a79bfc84c 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -12,13 +12,11 @@
[pipe (#+ let>)]
["." io]]
[data
- ["." product]
- [number
- ["n" nat]]
- [text
- ["%" format (#+ format)]]]
+ ["." product]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ State)]})
diff --git a/stdlib/source/test/lux/control/thread.lux b/stdlib/source/test/lux/control/thread.lux
index cedd55530..5fac55739 100644
--- a/stdlib/source/test/lux/control/thread.lux
+++ b/stdlib/source/test/lux/control/thread.lux
@@ -8,11 +8,10 @@
["$." functor (#+ Injection Comparison)]
["$." apply]
["$." monad]]}]
- [data
- [number
- ["n" nat]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Thread)
[//
diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux
index 9993a3f70..b89246b26 100644
--- a/stdlib/source/test/lux/control/try.lux
+++ b/stdlib/source/test/lux/control/try.lux
@@ -2,7 +2,7 @@
[lux #*
["_" test (#+ Test)]
[abstract
- [monad (#+ do Monad)]
+ [monad (#+ do)]
{[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
@@ -13,11 +13,11 @@
pipe
["." io]]
[data
- ["." text ("#\." equivalence)]
- [number
- ["n" nat]]]
+ ["." text ("#\." equivalence)]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Try)]})
diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux
index d9544def1..843bab32b 100644
--- a/stdlib/source/test/lux/control/writer.lux
+++ b/stdlib/source/test/lux/control/writer.lux
@@ -14,12 +14,11 @@
["." io]]
[data
["." product]
- [number
- ["n" nat]]
- ["." text ("#\." equivalence)
- ["%" format (#+ format)]]]
+ ["." text ("#\." equivalence)]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Writer)]})
diff --git a/stdlib/source/test/lux/data.lux b/stdlib/source/test/lux/data.lux
index 78cae485a..376a7cd3e 100644
--- a/stdlib/source/test/lux/data.lux
+++ b/stdlib/source/test/lux/data.lux
@@ -12,7 +12,6 @@
["#." lazy]
["#." maybe]
["#." name]
- ["#." number]
["#." product]
["#." sum]
["#." color
@@ -53,7 +52,6 @@
/lazy.test
/maybe.test
/name.test
- /number.test
/product.test)
test2 ($_ _.and
/sum.test
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 3d828dbb2..07c02ea09 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -1,8 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random (#+ Random)]]
[abstract
["." monad (#+ do)]
["." enum]
@@ -14,11 +12,13 @@
["." try (#+ Try)]
["." exception (#+ Exception)]]
[data
+ [collection
+ ["." list]]]
+ [math
+ ["." random (#+ Random)]
[number
["." i64]
- ["n" nat]]
- [collection
- ["." list]]]]
+ ["n" nat]]]]
{1
["." / (#+ Binary)]})
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index ab1b1f04c..5cfbe4a7d 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -12,15 +12,14 @@
[data
["." bit]
["." maybe]
- ["." text ("#\." equivalence)
- ["%" format (#+ format)]]
- [number
- ["n" nat]]
+ ["." text ("#\." equivalence)]
[collection
["." list]
["." set]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Array)]})
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index 6e07dc2e6..f4b780864 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -7,11 +7,10 @@
{[0 #spec]
[/
["$." equivalence]]}]
- [data
- [number
- ["n" nat]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Bits)]})
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 0de661e64..92705210b 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -14,12 +14,12 @@
[data
["." product]
["." maybe]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index a44b5c295..778726329 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -12,13 +12,13 @@
["." product]
["." bit ("#\." equivalence)]
["." maybe ("#\." monad)]
- [number
- ["n" nat]]
[collection
["." set]
["." list ("#\." functor)]]]
[math
- ["." random (#+ Random) ("#\." monad)]]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index 753b8db8a..7473aec04 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -10,13 +10,13 @@
["." bit ("#\." equivalence)]
["." maybe ("#\." monad)]
["." text]
- [number
- ["n" nat]]
[collection
["." set]
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index b2d35b1f4..6306f62fc 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -21,13 +21,13 @@
["." product]
["." maybe]
["." text ("#\." equivalence)]
- [number
- ["n" nat]
- ["." int]]
[collection
["." set]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." int]]]]
{1
["." / ("#\." monad)]})
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 3e532a66e..b246f8187 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -9,14 +9,13 @@
["$." functor (#+ Injection)]]}]
[data
["." bit ("#\." equivalence)]
- ["%" text/format (#+ format)]
- [number
- ["n" nat]]
[collection
["." set]
["." list ("#\." monoid)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 19f219378..4e99d2a3a 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -5,11 +5,11 @@
["." monad (#+ do)]]
[data
["." maybe ("#\." functor)]
- ["." bit ("#\." equivalence)]
- [number
- ["n" nat]]]
+ ["." bit ("#\." equivalence)]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Queue)]})
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 13ed9af28..55d9492ff 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -16,13 +16,13 @@
["." exception]]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list ("#\." fold)]
["." set]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." / ("#\." monad)]})
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index b97e1f7d2..013936731 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -10,14 +10,14 @@
["$." functor]
["$." comonad]]}]
[data
- [number
- ["n" nat]]
["." text
["%" format (#+ format)]]
[collection
["." list ("#\." functor)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index a58627cde..6f981af91 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -10,12 +10,12 @@
["$." monoid]]}]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / ("\." equivalence)]})
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 8d6d5aa22..9d9572795 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -10,13 +10,13 @@
["$." equivalence]]}]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." set]
["." list ("#\." fold)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 6c0e75b3d..daf924012 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -9,12 +9,12 @@
["$." equivalence]]}]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random (#+ Random) ("#\." monad)]]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Set)
["." //]]})
diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux
index 8a12c4fab..ae6fbabf6 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -9,11 +9,11 @@
["$." functor (#+ Injection)]]}]
[data
["." maybe]
- ["." bit ("#\." equivalence)]
- [number
- ["n" nat]]]
+ ["." bit ("#\." equivalence)]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 0b7dbbdf8..b7fea5e4f 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -10,12 +10,12 @@
["$." functor]]}]
[data
["." product]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor fold)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Tree)]})
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index f169d8a5d..33b333396 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -6,12 +6,12 @@
[data
["." maybe ("#\." functor)]
["." text ("#\." equivalence monoid)]
- [number
- ["n" nat]]
[collection
["." list ("#\." fold)]]]
[math
- ["." random]]
+ ["." random]
+ [number
+ ["n" nat]]]
[type (#+ :by_example)]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index 419935101..929572a37 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -14,12 +14,12 @@
["." product]
["." maybe ("#\." functor)]
["." text]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
["." //]
{1
["." / (#+ Zipper)
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index c0ea5e699..a8119145b 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -9,17 +9,17 @@
["$." hash]
["$." monoid]]}]
[data
- [number
- ["n" nat]
- ["." int]
- ["f" frac]
- ["r" rev]]
[collection
["." list]]]
[macro
["." template]]
["." math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." int]
+ ["f" frac]
+ ["r" rev]]]]
{1
["." / (#+ Color)]})
diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux
index 062ba560b..9a3fddcaf 100644
--- a/stdlib/source/test/lux/data/color/named.lux
+++ b/stdlib/source/test/lux/data/color/named.lux
@@ -4,15 +4,15 @@
[abstract
[monad (#+ do)]]
[data
- [number
- ["n" nat]]
[collection
["." list]
["." set]]]
[macro
["." template]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /
["/#" //]]})
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 2d38b8988..4f14375d9 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -15,16 +15,16 @@
["." bit]
["." text
["%" format (#+ format)]]
- [number
- ["n" nat]
- ["." frac]]
[collection
["." row]
["." dictionary]
["." set]
["." list ("#\." functor)]]]
[math
- ["." random (#+ Random)]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." frac]]]
[macro
["." syntax (#+ syntax:)]
["." code]]]
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 72024ba29..9d576b93a 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -18,9 +18,6 @@
["." unicode #_
["#" set]
["#/." block]]]
- [number
- ["n" nat]
- ["i" int]]
[collection
["." row]
["." list ("#\." fold)]]
@@ -30,7 +27,10 @@
["." instant (#+ Instant)]
["." duration]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["i" int]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 57958281c..bd3b45216 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -17,13 +17,13 @@
["." maybe]
["." text ("#\." equivalence)
["%" format (#+ format)]]
- [number
- ["n" nat]]
[collection
["." dictionary]
["." list ("#\." functor)]]]
[math
- ["." random (#+ Random) ("#\." monad)]]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ XML)]})
diff --git a/stdlib/source/test/lux/data/lazy.lux b/stdlib/source/test/lux/data/lazy.lux
index ddb24aee8..5900817e4 100644
--- a/stdlib/source/test/lux/data/lazy.lux
+++ b/stdlib/source/test/lux/data/lazy.lux
@@ -9,11 +9,10 @@
["$." apply]
["$." monad]
["$." equivalence]]}]
- [data
- [number
- ["n" nat]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / (#+ Lazy)]})
diff --git a/stdlib/source/test/lux/data/maybe.lux b/stdlib/source/test/lux/data/maybe.lux
index f5e965614..64f9b5ff5 100644
--- a/stdlib/source/test/lux/data/maybe.lux
+++ b/stdlib/source/test/lux/data/maybe.lux
@@ -15,63 +15,63 @@
pipe]
[data
["." text]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / ("#\." monoid monad)]})
(def: #export test
Test
(<| (_.covering /._)
- (_.for [.Maybe]
- ($_ _.and
- (_.for [/.equivalence]
- ($equivalence.spec (/.equivalence n.equivalence) (random.maybe random.nat)))
- (_.for [/.monoid]
- ($monoid.spec (/.equivalence n.equivalence) /.monoid (random.maybe random.nat)))
- (_.for [/.functor]
- ($functor.spec /\wrap /.equivalence /.functor))
- (_.for [/.apply]
- ($apply.spec /\wrap /.equivalence /.apply))
- (_.for [/.monad]
- ($monad.spec /\wrap /.equivalence /.monad))
-
- (do random.monad
- [left random.nat
- right random.nat
- #let [expected (n.+ left right)]]
- (let [lift (/.lift io.monad)]
- (_.cover [/.with /.lift]
- (|> (io.run (do (/.with io.monad)
- [a (lift (io\wrap left))
- b (wrap right)]
- (wrap (n.+ a b))))
- (case> (#.Some actual)
- (n.= expected actual)
+ (_.for [.Maybe])
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec (/.equivalence n.equivalence) (random.maybe random.nat)))
+ (_.for [/.monoid]
+ ($monoid.spec (/.equivalence n.equivalence) /.monoid (random.maybe random.nat)))
+ (_.for [/.functor]
+ ($functor.spec /\wrap /.equivalence /.functor))
+ (_.for [/.apply]
+ ($apply.spec /\wrap /.equivalence /.apply))
+ (_.for [/.monad]
+ ($monad.spec /\wrap /.equivalence /.monad))
+
+ (do random.monad
+ [left random.nat
+ right random.nat
+ #let [expected (n.+ left right)]]
+ (let [lift (/.lift io.monad)]
+ (_.cover [/.with /.lift]
+ (|> (io.run (do (/.with io.monad)
+ [a (lift (io\wrap left))
+ b (wrap right)]
+ (wrap (n.+ a b))))
+ (case> (#.Some actual)
+ (n.= expected actual)
- _
- false)))))
- (do random.monad
- [default random.nat
- value random.nat]
- (_.cover [/.default]
- (and (is? default (/.default default
- #.None))
+ _
+ false)))))
+ (do random.monad
+ [default random.nat
+ value random.nat]
+ (_.cover [/.default]
+ (and (is? default (/.default default
+ #.None))
- (is? value (/.default default
- (#.Some value))))))
- (do random.monad
- [value random.nat]
- (_.cover [/.assume]
- (is? value (/.assume (#.Some value)))))
- (do random.monad
- [value random.nat]
- (_.cover [/.to-list]
- (\ (list.equivalence n.equivalence) =
- (list value)
- (/.to-list (#.Some value)))))
- ))))
+ (is? value (/.default default
+ (#.Some value))))))
+ (do random.monad
+ [value random.nat]
+ (_.cover [/.assume]
+ (is? value (/.assume (#.Some value)))))
+ (do random.monad
+ [value random.nat]
+ (_.cover [/.to-list]
+ (\ (list.equivalence n.equivalence) =
+ (list value)
+ (/.to-list (#.Some value)))))
+ )))
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index 08fd3065e..7912994c3 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -11,11 +11,11 @@
[control
pipe]
[data
- [number
- ["n" nat]]
["." text ("#\." equivalence)]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index 3c61091bb..c33e60dd1 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -6,12 +6,11 @@
{[0 #spec]
[/
["$." equivalence]]}]
- [data
+ [math
+ ["." random]
[number
["n" nat]
- ["i" int]]]
- [math
- ["." random]]]
+ ["i" int]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 7fbf816a1..da108ede8 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -10,13 +10,13 @@
pipe]
[data
["." text]
- [number
- ["n" nat]
- ["i" int]]
[collection
["." list ("#\." functor)]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]
+ ["i" int]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index 4100d5f0d..4308f8e95 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -12,13 +12,13 @@
pipe]
[data
["." maybe]
- [number
- ["n" nat]]
[collection
["." list]
["." set]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]]]]
["." / #_
["#." buffer]
["#." encoding]
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index a12d57fc5..852a3c951 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -5,11 +5,11 @@
[monad (#+ do)]]
[data
["." text ("#\." equivalence)
- ["%" format (#+ format)]]
- [number
- ["n" nat]]]
+ ["%" format (#+ format)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index 2e61159dc..c5b985f50 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -11,15 +11,15 @@
[data
["." maybe]
["." text ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor)]
["." set]]]
[macro
["." template]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index 00df7058a..2aa33d2d4 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -14,12 +14,6 @@
["." text ("#\." equivalence)]
["." bit]
["." name]
- [number
- ["." nat]
- ["." int]
- ["." rev]
- ["." frac]
- ["." ratio]]
[format
["." xml]
["." json]]
@@ -32,7 +26,13 @@
[math
["." random (#+ Random) ("#\." monad)]
["." modulus]
- ["." modular]]
+ ["." modular]
+ [number
+ ["." nat]
+ ["." int]
+ ["." rev]
+ ["." frac]
+ ["." ratio]]]
[macro
["." code]]
[meta
diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux
index 3998f78f7..2cdead181 100644
--- a/stdlib/source/test/lux/data/text/regex.lux
+++ b/stdlib/source/test/lux/data/text/regex.lux
@@ -10,10 +10,10 @@
["<.>" text (#+ Parser)]
["s" code]]]
[data
- [number (#+ hex)]
["." text ("#\." equivalence)
["%" format (#+ format)]]]
[math
+ [number (#+ hex)]
["." random]]
["." meta]
[macro
@@ -53,13 +53,13 @@
(syntax: (should_check pattern regex input)
(meta.with_gensyms [g!message g!_]
- (wrap (list (` (|> (~ input)
- (<text>.run (~ regex))
- (case> (^ (#try.Success (~ pattern)))
- true
+ (wrap (list (` (|> (~ input)
+ (<text>.run (~ regex))
+ (case> (^ (#try.Success (~ pattern)))
+ true
- (~ g!_)
- false)))))))
+ (~ g!_)
+ false)))))))
(def: basics
Test
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index a575b4fc6..316bbe516 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -10,15 +10,15 @@
["$." monoid]]}]
[data
["." text]
- [number (#+ hex)
- ["n" nat]]
[collection
["." set]
["." list]]]
[macro
["." template]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number (#+ hex)
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index e32c08bfd..a219bff51 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -9,12 +9,12 @@
[data
["." product]
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." set ("#\." equivalence)]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
["." / #_
["/#" // #_
["#." block]]]
diff --git a/stdlib/source/test/lux/host.js.lux b/stdlib/source/test/lux/host.js.lux
index f27b9554c..6147ef9b9 100644
--- a/stdlib/source/test/lux/host.js.lux
+++ b/stdlib/source/test/lux/host.js.lux
@@ -1,14 +1,14 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random (#+ Random)]]
[abstract
[monad (#+ do)]]
[control
["." try]]
[data
- ["." text ("#\." equivalence)]
+ ["." text ("#\." equivalence)]]
+ [math
+ ["." random (#+ Random)]
[number
["." nat]
["." frac]]]]
diff --git a/stdlib/source/test/lux/host.jvm.lux b/stdlib/source/test/lux/host.jvm.lux
index 3a55a232d..2532b3075 100644
--- a/stdlib/source/test/lux/host.jvm.lux
+++ b/stdlib/source/test/lux/host.jvm.lux
@@ -4,12 +4,12 @@
[control
pipe]
[data
- ["." text ("#\." equivalence)]
+ ["." text ("#\." equivalence)]]
+ [math
+ ["r" random]
[number
["n" nat]
["i" int]]]
- [math
- ["r" random]]
["_" test (#+ Test)]]
{1
["." / (#+ import: class: interface: object)]})
diff --git a/stdlib/source/test/lux/host.old.lux b/stdlib/source/test/lux/host.old.lux
index c18ef1f1e..b14dac30d 100644
--- a/stdlib/source/test/lux/host.old.lux
+++ b/stdlib/source/test/lux/host.old.lux
@@ -4,12 +4,12 @@
[control
pipe]
[data
- ["." text ("#\." equivalence)]
+ ["." text ("#\." equivalence)]]
+ [math
+ ["r" random]
[number
["n" nat]
["i" int]]]
- [math
- ["r" random]]
["_" test (#+ Test)]]
{1
["." / (#+ import: class: interface: object)]})
diff --git a/stdlib/source/test/lux/locale/language.lux b/stdlib/source/test/lux/locale/language.lux
index 6423b7627..b3bfffc4e 100644
--- a/stdlib/source/test/lux/locale/language.lux
+++ b/stdlib/source/test/lux/locale/language.lux
@@ -10,15 +10,15 @@
[data
["." maybe]
["." text]
- [number
- ["n" nat]]
[collection
["." set (#+ Set)]
["." list ("#\." functor fold)]]]
[macro
["." template]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/locale/territory.lux b/stdlib/source/test/lux/locale/territory.lux
index 86a44cf3a..909b5b68f 100644
--- a/stdlib/source/test/lux/locale/territory.lux
+++ b/stdlib/source/test/lux/locale/territory.lux
@@ -10,15 +10,15 @@
[data
["." maybe]
["." text]
- [number
- ["n" nat]]
[collection
["." set (#+ Set)]
["." list ("#\." functor fold)]]]
[macro
["." template]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux
index cbaa5aee7..1244b84e4 100644
--- a/stdlib/source/test/lux/macro/code.lux
+++ b/stdlib/source/test/lux/macro/code.lux
@@ -1,8 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random (#+ Random) ("#\." monad)]]
[abstract
[monad (#+ do)]
{[0 #spec]
@@ -13,10 +11,12 @@
[data
["." product]
["." text]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor)]]]
+ [math
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]]]
[meta
["." location]]
[tool
diff --git a/stdlib/source/test/lux/macro/poly/equivalence.lux b/stdlib/source/test/lux/macro/poly/equivalence.lux
index 51315ec1e..c1edf6022 100644
--- a/stdlib/source/test/lux/macro/poly/equivalence.lux
+++ b/stdlib/source/test/lux/macro/poly/equivalence.lux
@@ -2,8 +2,6 @@
[lux #*
["%" data/text/format (#+ format)]
["_" test (#+ Test)]
- [math
- ["." random (#+ Random)]]
[abstract
[monad (#+ do)]
[equivalence (#+ Equivalence)
@@ -12,14 +10,16 @@
[data
["." bit]
["." maybe]
- [number
- ["n" nat]
- ["i" int]]
["." text]
[collection
["." list]]]
[macro
- [poly (#+ derived:)]]])
+ [poly (#+ derived:)]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["i" int]]]])
(type: Variant
(#Case0 Bit)
diff --git a/stdlib/source/test/lux/macro/poly/json.lux b/stdlib/source/test/lux/macro/poly/json.lux
index b6b3a29e2..98b955af8 100644
--- a/stdlib/source/test/lux/macro/poly/json.lux
+++ b/stdlib/source/test/lux/macro/poly/json.lux
@@ -4,9 +4,9 @@
[abstract
codec
[monad (#+ do)]
- [equivalence (#+ Equivalence)
+ ["." equivalence (#+ Equivalence)
{[0 #poly]
- ["poly/equivalence" /]}]
+ ["poly/#" /]}]
{[0 #spec]
[/
["$." equivalence]
@@ -22,9 +22,6 @@
["." maybe]
["." text
["%" format (#+ format)]]
- [number
- ["n" nat]
- ["." frac]]
[format
[json (#+)
{[0 #poly]
@@ -38,7 +35,10 @@
[type
["." unit]]
[math
- ["." random (#+ Random)]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["." frac]]]
[time
["ti" instant]
["tda" date]
diff --git a/stdlib/source/test/lux/macro/syntax.lux b/stdlib/source/test/lux/macro/syntax.lux
index 316734d36..c2a1e63a5 100644
--- a/stdlib/source/test/lux/macro/syntax.lux
+++ b/stdlib/source/test/lux/macro/syntax.lux
@@ -2,7 +2,6 @@
[lux #*
["%" data/text/format (#+ format)]
[abstract/monad (#+ do)]
- ["r" math/random (#+ Random)]
["_" test (#+ Test)]
[abstract
[equivalence (#+ Equivalence)]]
@@ -13,14 +12,16 @@
[data
["." bit]
["." name]
- ["." text]
+ ["." text]]
+ [macro
+ ["." code]]
+ [math
+ [random (#+ Random)]
[number
["." nat]
["." int]
["." rev]
- ["." frac]]]
- [macro
- ["." code]]]
+ ["." frac]]]]
{1
["." / (#+ syntax:)]})
diff --git a/stdlib/source/test/lux/macro/syntax/common.lux b/stdlib/source/test/lux/macro/syntax/common.lux
index 769a28439..90a72ca26 100644
--- a/stdlib/source/test/lux/macro/syntax/common.lux
+++ b/stdlib/source/test/lux/macro/syntax/common.lux
@@ -1,8 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random (#+ Random)]]
[abstract
[monad (#+ do)]
[equivalence (#+ Equivalence)]]
@@ -16,12 +14,14 @@
["." bit ("#\." equivalence)]
["." name]
["." text]
- [number
- ["n" nat]]
[collection
["." list]]]
[macro
- ["." code]]]
+ ["." code]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /
["#." reader]
@@ -31,7 +31,8 @@
["." / #_
["#." check]
["#." definition]
- ["#." export]])
+ ["#." export]
+ ["#." declaration]])
(def: annotations_equivalence
(Equivalence /.Annotations)
@@ -96,22 +97,6 @@
(#try.Failure error)
false))))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 3)) random.nat)
- expected (: (Random /.Declaration)
- (random.and ..random_text
- (random.list size ..random_text)))]
- (_.cover [/.Declaration /reader.declaration /writer.declaration]
- (|> expected
- /writer.declaration list
- (<c>.run /reader.declaration)
- (case> (#try.Success actual)
- (let [equivalence (product.equivalence text.equivalence
- (list.equivalence text.equivalence))]
- (\ equivalence = expected actual))
-
- (#try.Failure error)
- false))))
- (do {! random.monad}
[expected (: (Random /.Typed_Input)
(random.and ///code.random
///code.random))]
@@ -129,4 +114,5 @@
/check.test
/definition.test
/export.test
+ /declaration.test
)))
diff --git a/stdlib/source/test/lux/macro/syntax/common/declaration.lux b/stdlib/source/test/lux/macro/syntax/common/declaration.lux
new file mode 100644
index 000000000..a9bc23296
--- /dev/null
+++ b/stdlib/source/test/lux/macro/syntax/common/declaration.lux
@@ -0,0 +1,47 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]
+ {[0 #spec]
+ [/
+ ["$." equivalence]]}]
+ [control
+ ["." try]
+ [parser
+ ["<.>" code]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
+ {1
+ ["." /]})
+
+(def: #export random
+ (Random /.Declaration)
+ (let [word (random.ascii/alpha 10)]
+ ($_ random.and
+ word
+ (do {! random.monad}
+ [size (\ ! map (n.% 10) random.nat)]
+ (random.list size word))
+ )))
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Declaration])
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+
+ (do random.monad
+ [expected ..random]
+ (_.cover [/.write /.parser]
+ (case (<code>.run /.parser
+ (list (/.write expected)))
+ (#try.Failure _)
+ false
+
+ (#try.Success actual)
+ (\ /.equivalence = expected actual)))))))
diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux
index 902e84255..5733f40ad 100644
--- a/stdlib/source/test/lux/macro/template.lux
+++ b/stdlib/source/test/lux/macro/template.lux
@@ -1,13 +1,13 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random (#+ Random)]]
[abstract
[monad (#+ do)]]
[data
[collection
- ["." list]]
+ ["." list]]]
+ [math
+ ["." random (#+ Random)]
[number
["." nat]]]]
{1
diff --git a/stdlib/source/test/lux/math.lux b/stdlib/source/test/lux/math.lux
index d9741e6ad..a8c7c121e 100644
--- a/stdlib/source/test/lux/math.lux
+++ b/stdlib/source/test/lux/math.lux
@@ -2,19 +2,21 @@
[lux #*
["%" data/text/format (#+ format)]
["_" test (#+ Test)]
- ["r" math/random (#+ Random)]
- [abstract/monad (#+ Monad do)]
- [data
+ [abstract
+ [monad (#+ do)]]
+ [math
+ ["." random (#+ Random)]
[number
["n" nat]
- ["." int]
- ["f" frac]]]]
+ ["f" frac]
+ ["." int]]]]
{1
["." /]}
["." / #_
["#." infix]
["#." modulus]
["#." modular]
+ ["#." number]
["#." logic #_
["#/." continuous]
["#/." fuzzy]]])
@@ -36,8 +38,8 @@
(<| (_.context (%.name (name_of /._)))
($_ _.and
(<| (_.context "Trigonometry")
- (do {! r.monad}
- [angle (|> r.safe_frac (\ ! map (f.* /.tau)))]
+ (do {! random.monad}
+ [angle (|> random.safe_frac (\ ! map (f.* /.tau)))]
($_ _.and
(_.test "Sine and arc-sine are inverse functions."
(trigonometric_symmetry /.sin /.asin angle))
@@ -47,8 +49,8 @@
(trigonometric_symmetry /.tan /.atan angle))
)))
(<| (_.context "Rounding")
- (do {! r.monad}
- [sample (|> r.safe_frac (\ ! map (f.* +1000.0)))]
+ (do {! random.monad}
+ [sample (|> random.safe_frac (\ ! map (f.* +1000.0)))]
($_ _.and
(_.test "The ceiling will be an integer value, and will be >= the original."
(let [ceil'd (/.ceil sample)]
@@ -66,13 +68,13 @@
(f.<= +1.0 (f.abs (f.- sample round'd))))))
)))
(<| (_.context "Exponentials and logarithms")
- (do {! r.monad}
- [sample (|> r.safe_frac (\ ! map (f.* +10.0)))]
+ (do {! random.monad}
+ [sample (|> random.safe_frac (\ ! map (f.* +10.0)))]
(_.test "Logarithm is the inverse of exponential."
(|> sample /.exp /.log (within? +0.000000000000001 sample)))))
(<| (_.context "Greatest-Common-Divisor and Least-Common-Multiple")
- (do {! r.monad}
- [#let [gen_nat (|> r.nat (\ ! map (|>> (n.% 1000) (n.max 1))))]
+ (do {! random.monad}
+ [#let [gen_nat (|> random.nat (\ ! map (|>> (n.% 1000) (n.max 1))))]
x gen_nat
y gen_nat]
($_ _.and
@@ -90,7 +92,9 @@
)))
/infix.test
+ /modulus.test
/modular.test
+ /number.test
/logic/continuous.test
/logic/fuzzy.test
)))
diff --git a/stdlib/source/test/lux/math/infix.lux b/stdlib/source/test/lux/math/infix.lux
index f4a3552e9..785285f2d 100644
--- a/stdlib/source/test/lux/math/infix.lux
+++ b/stdlib/source/test/lux/math/infix.lux
@@ -4,12 +4,12 @@
[abstract
[monad (#+ do)]]
[data
- ["." bit ("#\." equivalence)]
+ ["." bit ("#\." equivalence)]]
+ [math
+ ["." random]
[number
["n" nat]
- ["f" frac]]]
- [math
- ["." random]]]
+ ["f" frac]]]]
{1
["." /
["." //]]})
diff --git a/stdlib/source/test/lux/math/logic/continuous.lux b/stdlib/source/test/lux/math/logic/continuous.lux
index dd18ad2d1..e54eccc2e 100644
--- a/stdlib/source/test/lux/math/logic/continuous.lux
+++ b/stdlib/source/test/lux/math/logic/continuous.lux
@@ -1,11 +1,13 @@
(.module:
[lux #*
- ["%" data/text/format (#+ format)]
- [abstract/monad (#+ do)]
["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]
+ {[0 #spec]
+ [/
+ ["$." monoid]]}]
[math
- ["." random]]
- [data
+ ["." random]
[number
["r" rev]]]]
{1
@@ -13,24 +15,101 @@
(def: #export test
Test
- (<| (_.context (%.name (name_of /._)))
+ (<| (_.covering /._)
(do random.monad
[left random.rev
+ mid random.rev
right random.rev]
- ($_ _.and
- (_.test "AND is the minimum."
- (let [result (/.and left right)]
- (and (r.<= left result)
- (r.<= right result))))
- (_.test "OR is the maximum."
- (let [result (/.or left right)]
- (and (r.>= left result)
- (r.>= right result))))
- (_.test "Double negation results in the original value."
- (r.= left (/.not (/.not left))))
- (_.test "Every value is equivalent to itself."
- (and (r.>= left
- (/.= left left))
- (r.>= right
- (/.= right right))))
- ))))
+ (`` ($_ _.and
+ (~~ (template [<monoid>]
+ [(_.for [<monoid>]
+ ($monoid.spec r.= <monoid> random.rev))]
+
+ [/.disjunction]
+ [/.conjunction]
+ ))
+
+ (_.cover [/.true /.false]
+ (let [true=max!
+ (r.= /.false (inc /.true))
+
+ false=min!
+ (r.= /.true (dec /.false))]
+ (and true=max!
+ false=min!)))
+ (_.cover [/.or]
+ (let [identity!
+ (r.= left (/.or /.false left))
+
+ annihilation!
+ (r.= /.true (/.or /.true left))
+
+ idempotence!
+ (r.= left (/.or left left))
+
+ associativity!
+ (r.= ($_ /.or left mid right)
+ (_$ /.or left mid right))]
+ (and identity!
+ annihilation!
+ idempotence!
+ associativity!
+ (let [l|r (/.or left right)]
+ (and (r.>= left l|r)
+ (r.>= right l|r))))))
+ (_.cover [/.and]
+ (let [identity!
+ (r.= left (/.and /.true left))
+
+ annihilation!
+ (r.= /.false (/.and /.false left))
+
+ idempotence!
+ (r.= left (/.and left left))
+
+ associativity!
+ (r.= ($_ /.and left mid right)
+ (_$ /.and left mid right))]
+ (and identity!
+ annihilation!
+ idempotence!
+ associativity!
+ (let [l&r (/.and left right)]
+ (and (r.<= left l&r)
+ (r.<= right l&r))))))
+ (_.cover [/.not]
+ (let [inverses!
+ (and (r.= /.false (/.not /.true))
+ (r.= /.true (/.not /.false)))
+
+ double_negation!
+ (r.= left (/.not (/.not left)))
+
+ de_morgan!
+ (and (r.= (/.not (/.or left right))
+ (/.and (/.not left) (/.not right)))
+ (r.= (/.not (/.and left right))
+ (/.or (/.not left) (/.not right))))]
+ (and inverses!
+ double_negation!
+ de_morgan!)))
+ (_.cover [/.implies]
+ (let [modus_tollens!
+ (r.= (/.implies right left)
+ (/.implies (/.not left) (/.not right)))]
+ (and modus_tollens!)))
+ (_.cover [/.=]
+ (let [trivial!
+ (and (r.= /.true (/.= /.true /.true))
+ (r.= /.true (/.= /.false /.false))
+
+ (r.= /.false (/.= /.true /.false)))
+
+ common!
+ (and (r.>= left
+ (/.= left left))
+ (r.>= right
+ (/.= right right)))]
+ (and trivial!
+ common!)))
+ )))))
diff --git a/stdlib/source/test/lux/math/logic/fuzzy.lux b/stdlib/source/test/lux/math/logic/fuzzy.lux
index 476a40964..6289dd64d 100644
--- a/stdlib/source/test/lux/math/logic/fuzzy.lux
+++ b/stdlib/source/test/lux/math/logic/fuzzy.lux
@@ -1,20 +1,20 @@
(.module:
[lux #*
["%" data/text/format (#+ format)]
+ ["_" test (#+ Test)]
[abstract
[monad (#+ do)]
["." enum]]
- [math
- ["." random (#+ Random)]]
- ["_" test (#+ Test)]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]
- ["r" rev]]
[collection
["." list]
- ["." set]]]]
+ ["." set]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]
+ ["r" rev]]]]
{1
["." / (#+ Fuzzy)
[//
diff --git a/stdlib/source/test/lux/math/modular.lux b/stdlib/source/test/lux/math/modular.lux
index 849159da2..b0c69b814 100644
--- a/stdlib/source/test/lux/math/modular.lux
+++ b/stdlib/source/test/lux/math/modular.lux
@@ -15,11 +15,11 @@
["." exception]]
[data
["." product]
- ["." bit ("#\." equivalence)]
- [number
- ["i" int]]]
+ ["." bit ("#\." equivalence)]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["i" int]]]]
["$." // #_
["#" modulus]]
{1
diff --git a/stdlib/source/test/lux/math/modulus.lux b/stdlib/source/test/lux/math/modulus.lux
index 7fec2db0d..4f3b4a2fb 100644
--- a/stdlib/source/test/lux/math/modulus.lux
+++ b/stdlib/source/test/lux/math/modulus.lux
@@ -1,17 +1,16 @@
(.module:
[lux #*
["_" test (#+ Test)]
+ ["." meta]
[abstract
[monad (#+ do)]]
[control
["." try]
["." exception]]
- [data
+ [math
+ ["." random (#+ Random)]
[number
["i" int]]]
- [math
- ["." random (#+ Random)]]
- ["." meta]
[macro
[syntax (#+ syntax:)]
["." code]]]
diff --git a/stdlib/source/test/lux/data/number.lux b/stdlib/source/test/lux/math/number.lux
index d8e769369..5a897db71 100644
--- a/stdlib/source/test/lux/data/number.lux
+++ b/stdlib/source/test/lux/math/number.lux
@@ -4,15 +4,13 @@
[control
["." try]]
[data
- ["." text
- ["%" format (#+ format)]]
- [number
- ["n" nat]
- ["i" int]
- ["r" rev]
- ["f" frac]]]]
+ ["." text]]]
{1
- ["." /]}
+ ["." /
+ ["n" nat]
+ ["i" int]
+ ["r" rev]
+ ["f" frac]]}
["." / #_
["#." i8]
["#." i16]
diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/math/number/complex.lux
index fc83ddb51..751ec9022 100644
--- a/stdlib/source/test/lux/data/number/complex.lux
+++ b/stdlib/source/test/lux/math/number/complex.lux
@@ -10,17 +10,18 @@
["$." order]
["$." codec]]}]
[data
- [number
- ["n" nat]
- ["." int]
- ["f" frac]]
[collection
["." list ("#\." functor)]]]
["." math
["." random (#+ Random)]]]
{1
- ["." /]})
+ ["." /
+ [//
+ ["n" nat]
+ ["f" frac]
+ ["." int]]]})
+## This margin of error is necessary because floating-point arithmetic is not exact.
(def: margin_of_error
+0.000000001)
diff --git a/stdlib/source/test/lux/data/number/frac.lux b/stdlib/source/test/lux/math/number/frac.lux
index dcaa417ed..dcaa417ed 100644
--- a/stdlib/source/test/lux/data/number/frac.lux
+++ b/stdlib/source/test/lux/math/number/frac.lux
diff --git a/stdlib/source/test/lux/data/number/i16.lux b/stdlib/source/test/lux/math/number/i16.lux
index 1a5009a03..6cf457989 100644
--- a/stdlib/source/test/lux/data/number/i16.lux
+++ b/stdlib/source/test/lux/math/number/i16.lux
@@ -6,14 +6,12 @@
{[0 #spec]
[/
["$." equivalence]]}]
- [data
- [number
- ["i" int]]]
[math
["." random (#+ Random)]]]
{1
["." /
["/#" // #_
+ ["i" int]
["#." i64]]]})
(def: #export random
diff --git a/stdlib/source/test/lux/data/number/i32.lux b/stdlib/source/test/lux/math/number/i32.lux
index fd48509ea..1061cdc1b 100644
--- a/stdlib/source/test/lux/data/number/i32.lux
+++ b/stdlib/source/test/lux/math/number/i32.lux
@@ -6,14 +6,12 @@
{[0 #spec]
[/
["$." equivalence]]}]
- [data
- [number
- ["i" int]]]
[math
["." random (#+ Random)]]]
{1
["." /
["/#" // #_
+ ["i" int]
["#." i64]]]})
(def: #export random
diff --git a/stdlib/source/test/lux/data/number/i64.lux b/stdlib/source/test/lux/math/number/i64.lux
index 45e644ab2..43e240675 100644
--- a/stdlib/source/test/lux/data/number/i64.lux
+++ b/stdlib/source/test/lux/math/number/i64.lux
@@ -2,10 +2,7 @@
[lux #*
["_" test (#+ Test)]
[data
- ["." bit ("#\." equivalence)]
- [number (#+ hex)
- ["n" nat]
- ["i" int]]]
+ ["." bit ("#\." equivalence)]]
[abstract
[monad (#+ do)]
{[0 #spec]
@@ -16,7 +13,10 @@
[math
["." random (#+ Random)]]]
{1
- ["." / ("\." equivalence)]})
+ ["." / ("\." equivalence)
+ [// (#+ hex)
+ ["n" nat]
+ ["i" int]]]})
(def: bit
Test
diff --git a/stdlib/source/test/lux/data/number/i8.lux b/stdlib/source/test/lux/math/number/i8.lux
index 49b6995e8..b0903a903 100644
--- a/stdlib/source/test/lux/data/number/i8.lux
+++ b/stdlib/source/test/lux/math/number/i8.lux
@@ -6,14 +6,12 @@
{[0 #spec]
[/
["$." equivalence]]}]
- [data
- [number
- ["i" int]]]
[math
["." random (#+ Random)]]]
{1
["." /
["/#" // #_
+ ["i" int]
["#." i64]]]})
(def: #export random
diff --git a/stdlib/source/test/lux/data/number/int.lux b/stdlib/source/test/lux/math/number/int.lux
index 24155602b..3d9931ad1 100644
--- a/stdlib/source/test/lux/data/number/int.lux
+++ b/stdlib/source/test/lux/math/number/int.lux
@@ -13,13 +13,13 @@
["$." monoid]
["$." codec]]}]
[data
- ["." bit ("#\." equivalence)]
- [number
- ["f" frac]]]
+ ["." bit ("#\." equivalence)]]
[math
["." random (#+ Random)]]]
{1
- ["." /]})
+ ["." /
+ [//
+ ["f" frac]]]})
(def: signature
Test
diff --git a/stdlib/source/test/lux/data/number/nat.lux b/stdlib/source/test/lux/math/number/nat.lux
index a2d0fd655..3de2970cc 100644
--- a/stdlib/source/test/lux/data/number/nat.lux
+++ b/stdlib/source/test/lux/math/number/nat.lux
@@ -13,13 +13,13 @@
["$." monoid]
["$." codec]]}]
[data
- ["." bit ("#\." equivalence)]
- [number
- ["f" frac]]]
+ ["." bit ("#\." equivalence)]]
[math
["." random]]]
{1
- ["." /]})
+ ["." /
+ [//
+ ["f" frac]]]})
(def: signature
Test
diff --git a/stdlib/source/test/lux/data/number/ratio.lux b/stdlib/source/test/lux/math/number/ratio.lux
index 1e8da2e78..199096dab 100644
--- a/stdlib/source/test/lux/data/number/ratio.lux
+++ b/stdlib/source/test/lux/math/number/ratio.lux
@@ -11,13 +11,13 @@
["$." codec]]}]
[data
["." bit ("#\." equivalence)]
- ["." maybe ("#\." functor)]
- [number
- ["n" nat ("#\." equivalence)]]]
+ ["." maybe ("#\." functor)]]
[math
["." random (#+ Random)]]]
{1
- ["." /]})
+ ["." /
+ [//
+ ["n" nat ("#\." equivalence)]]]})
(def: part
(Random Nat)
diff --git a/stdlib/source/test/lux/data/number/rev.lux b/stdlib/source/test/lux/math/number/rev.lux
index 2e75eb874..5b30741df 100644
--- a/stdlib/source/test/lux/data/number/rev.lux
+++ b/stdlib/source/test/lux/math/number/rev.lux
@@ -13,15 +13,15 @@
["$." monoid]
["$." codec]]}]
[data
- ["." bit ("#\." equivalence)]
- [number (#+ hex)
- ["n" nat]
- ["f" frac]
- ["." i64 ("#\." hash)]]]
+ ["." bit ("#\." equivalence)]]
[math
["." random]]]
{1
- ["." /]})
+ ["." /
+ [// (#+ hex)
+ ["n" nat]
+ ["f" frac]
+ ["." i64 ("#\." hash)]]]})
(def: signature
Test
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 7428cae69..6997d55e3 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -12,13 +12,13 @@
["." try]]
[data
["." text ("#\." equivalence)
- ["%" format (#+ format)]]
- [number
- ["n" nat]]]
+ ["%" format (#+ format)]]]
[meta
["." location]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]}
["." / #_
diff --git a/stdlib/source/test/lux/meta/annotation.lux b/stdlib/source/test/lux/meta/annotation.lux
index 3718b8797..51b33a70b 100644
--- a/stdlib/source/test/lux/meta/annotation.lux
+++ b/stdlib/source/test/lux/meta/annotation.lux
@@ -1,8 +1,6 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [math
- ["." random (#+ Random)]]
[abstract
[monad (#+ do)]]
[control
@@ -11,17 +9,18 @@
["." product]
["." bit]
["." name ("#\." equivalence)]
- ["." text
- ["%" format (#+ format)]]
+ ["." text]
+ [collection
+ ["." list ("#\." functor)]]]
+ [macro
+ ["." code ("#\." equivalence)]]
+ [math
+ ["." random (#+ Random)]
[number
["." nat]
["." int]
["." rev]
- ["." frac]]
- [collection
- ["." list ("#\." functor)]]]
- [macro
- ["." code ("#\." equivalence)]]]
+ ["." frac]]]]
{1
["." /]}
[///
diff --git a/stdlib/source/test/lux/target/jvm.lux b/stdlib/source/test/lux/target/jvm.lux
index 42d4eba11..3a5a79711 100644
--- a/stdlib/source/test/lux/target/jvm.lux
+++ b/stdlib/source/test/lux/target/jvm.lux
@@ -13,12 +13,6 @@
[data
["." maybe]
["." bit ("#\." equivalence)]
- [number
- ["." i32 (#+ I32)]
- ["." i64]
- ["n" nat]
- ["i" int]
- ["f" frac]]
["." text ("#\." equivalence)
["%" format (#+ format)]]
["." format #_
@@ -30,7 +24,13 @@
["." set]
["." list ("#\." functor)]]]
[math
- ["." random (#+ Random) ("#\." monad)]]
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]
+ ["i" int]
+ ["f" frac]
+ ["." i32 (#+ I32)]
+ ["." i64]]]
["_" test (#+ Test)]]
{1
["." / #_
diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux
index 272532324..af9d46014 100644
--- a/stdlib/source/test/lux/time/duration.lux
+++ b/stdlib/source/test/lux/time/duration.lux
@@ -10,12 +10,11 @@
["$." order]
["$." monoid]
["$." codec]]}]
- [data
+ [math
+ ["." random (#+ Random)]
[number
["n" nat]
- ["i" int]]]
- [math
- ["." random (#+ Random)]]]
+ ["i" int]]]]
{1
["." / (#+ Duration)]})
diff --git a/stdlib/source/test/lux/time/instant.lux b/stdlib/source/test/lux/time/instant.lux
index cc2c0a742..65fed1248 100644
--- a/stdlib/source/test/lux/time/instant.lux
+++ b/stdlib/source/test/lux/time/instant.lux
@@ -13,14 +13,14 @@
[control
["." try]]
[data
- ["." text]
+ ["." text]]
+ [math
+ ["." random (#+ Random)]
[number
["i" int]]]
- [math
- ["." random (#+ Random)]]
[time
["@d" duration]
- ["@date" date]]]
+ ["@." date]]]
[//
["_." duration]]
{1
diff --git a/stdlib/source/test/lux/type.lux b/stdlib/source/test/lux/type.lux
index c06b89478..168ed29d1 100644
--- a/stdlib/source/test/lux/type.lux
+++ b/stdlib/source/test/lux/type.lux
@@ -1,17 +1,19 @@
(.module:
[lux (#- type)
["%" data/text/format (#+ format)]
- ["M" abstract/monad (#+ do)]
- ["r" math/random (#+ Random)]
["_" test (#+ Test)]
+ [abstract
+ ["." monad (#+ do)]]
[control
pipe]
[data
["." maybe]
- [number
- ["n" nat]]
[collection
- ["." list]]]]
+ ["." list]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." / ("#\." equivalence)]}
["." / #_
@@ -21,41 +23,41 @@
["#." resource]])
(def: short
- (r.Random Text)
- (do {! r.monad}
- [size (|> r.nat (\ ! map (n.% 10)))]
- (r.unicode size)))
+ (Random Text)
+ (do {! random.monad}
+ [size (|> random.nat (\ ! map (n.% 10)))]
+ (random.unicode size)))
(def: name
- (r.Random Name)
- (r.and ..short ..short))
+ (Random Name)
+ (random.and ..short ..short))
(def: #export random
- (r.Random Type)
- (let [(^open "R\.") r.monad]
- (r.rec (function (_ recur)
- (let [pairG (r.and recur recur)
- idG r.nat
- quantifiedG (r.and (R\wrap (list)) recur)]
- ($_ r.or
- (r.and ..short (R\wrap (list)))
- pairG
- pairG
- pairG
- idG
- idG
- idG
- quantifiedG
- quantifiedG
- pairG
- (r.and ..name recur)
- ))))))
+ (Random Type)
+ (let [(^open "R\.") random.monad]
+ (random.rec (function (_ recur)
+ (let [pairG (random.and recur recur)
+ idG random.nat
+ quantifiedG (random.and (R\wrap (list)) recur)]
+ ($_ random.or
+ (random.and ..short (R\wrap (list)))
+ pairG
+ pairG
+ pairG
+ idG
+ idG
+ idG
+ quantifiedG
+ quantifiedG
+ pairG
+ (random.and ..name recur)
+ ))))))
(def: #export test
Test
(<| (_.context (%.name (name_of /._)))
($_ _.and
- (do r.monad
+ (do random.monad
[sample ..random]
(_.test "Every type is equal to itself."
(\ /.equivalence = sample sample)))
@@ -83,18 +85,18 @@
(\ /.equivalence =
(/.un_name base)
(/.un_name aliased))))))
- (do {! r.monad}
- [size (|> r.nat (\ ! map (n.% 3)))
+ (do {! random.monad}
+ [size (|> random.nat (\ ! map (n.% 3)))
members (|> ..random
- (r.filter (function (_ type)
- (case type
- (^or (#.Sum _) (#.Product _))
- #0
+ (random.filter (function (_ type)
+ (case type
+ (^or (#.Sum _) (#.Product _))
+ #0
- _
- #1)))
+ _
+ #1)))
(list.repeat size)
- (M.seq !))
+ (monad.seq !))
#let [(^open "/\.") /.equivalence
(^open "list\.") (list.equivalence /.equivalence)]]
(`` ($_ _.and
@@ -109,17 +111,17 @@
["tuple" /.tuple /.flatten_tuple Any]
))
)))
- (do {! r.monad}
- [size (|> r.nat (\ ! map (n.% 3)))
- members (M.seq ! (list.repeat size ..random))
+ (do {! random.monad}
+ [size (|> random.nat (\ ! map (n.% 3)))
+ members (monad.seq ! (list.repeat size ..random))
extra (|> ..random
- (r.filter (function (_ type)
- (case type
- (^or (#.Function _) (#.Apply _))
- #0
+ (random.filter (function (_ type)
+ (case type
+ (^or (#.Function _) (#.Apply _))
+ #0
- _
- #1))))
+ _
+ #1))))
#let [(^open "/\.") /.equivalence
(^open "list\.") (list.equivalence /.equivalence)]]
($_ _.and
@@ -132,16 +134,16 @@
(let [[tfunc tparams] (|> extra (/.application members) /.flatten_application)]
(n.= (list.size members) (list.size tparams))))
))
- (do {! r.monad}
- [size (|> r.nat (\ ! map (n.% 3)))
+ (do {! random.monad}
+ [size (|> random.nat (\ ! map (n.% 3)))
extra (|> ..random
- (r.filter (function (_ type)
- (case type
- (^or (#.UnivQ _) (#.ExQ _))
- #0
+ (random.filter (function (_ type)
+ (case type
+ (^or (#.UnivQ _) (#.ExQ _))
+ #0
- _
- #1))))
+ _
+ #1))))
#let [(^open "/\.") /.equivalence]]
(`` ($_ _.and
(~~ (template [<desc> <ctor> <dtor>]
diff --git a/stdlib/source/test/lux/type/check.lux b/stdlib/source/test/lux/type/check.lux
index c41f610dc..45e648b9c 100644
--- a/stdlib/source/test/lux/type/check.lux
+++ b/stdlib/source/test/lux/type/check.lux
@@ -1,7 +1,6 @@
(.module:
[lux (#- type)
["%" data/text/format (#+ format)]
- ["r" math/random (#+ Random)]
["_" test (#+ Test)]
[abstract
["." monad (#+ do)]]
@@ -11,53 +10,55 @@
["." product]
["." maybe]
["." text ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list ("#\." functor)]
["." set]]]
+ [math
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]
["." type ("#\." equivalence)]]
{1
["." /]})
## TODO: Remove the following 3 definitions ASAP. //.type already exists...
(def: short
- (r.Random Text)
- (r.unicode 10))
+ (Random Text)
+ (random.unicode 10))
(def: name
- (r.Random Name)
- (r.and ..short ..short))
+ (Random Name)
+ (random.and ..short ..short))
(def: (type' num_vars)
- (-> Nat (r.Random Type))
- (r.rec
+ (-> Nat (Random Type))
+ (random.rec
(function (_ recur)
- (let [(^open "R\.") r.monad
- pairG (r.and recur recur)
- quantifiedG (r.and (R\wrap (list)) (type' (inc num_vars)))
- random_pair (r.either (r.either (R\map (|>> #.Sum) pairG)
- (R\map (|>> #.Product) pairG))
- (r.either (R\map (|>> #.Function) pairG)
- (R\map (|>> #.Apply) pairG)))
- random_id (let [random_id (r.either (R\map (|>> #.Var) r.nat)
- (R\map (|>> #.Ex) r.nat))]
+ (let [(^open "R\.") random.monad
+ pairG (random.and recur recur)
+ quantifiedG (random.and (R\wrap (list)) (type' (inc num_vars)))
+ random_pair (random.either (random.either (R\map (|>> #.Sum) pairG)
+ (R\map (|>> #.Product) pairG))
+ (random.either (R\map (|>> #.Function) pairG)
+ (R\map (|>> #.Apply) pairG)))
+ random_id (let [random_id (random.either (R\map (|>> #.Var) random.nat)
+ (R\map (|>> #.Ex) random.nat))]
(case num_vars
0 random_id
- _ (r.either (R\map (|>> (n.% num_vars) (n.* 2) inc #.Parameter) r.nat)
- random_id)))
- random_quantified (r.either (R\map (|>> #.UnivQ) quantifiedG)
- (R\map (|>> #.ExQ) quantifiedG))]
- ($_ r.either
- (R\map (|>> #.Primitive) (r.and ..short (R\wrap (list))))
+ _ (random.either (R\map (|>> (n.% num_vars) (n.* 2) inc #.Parameter) random.nat)
+ random_id)))
+ random_quantified (random.either (R\map (|>> #.UnivQ) quantifiedG)
+ (R\map (|>> #.ExQ) quantifiedG))]
+ ($_ random.either
+ (R\map (|>> #.Primitive) (random.and ..short (R\wrap (list))))
random_pair
random_id
random_quantified
- (R\map (|>> #.Named) (r.and ..name (type' 0)))
+ (R\map (|>> #.Named) (random.and ..name (type' 0)))
)))))
(def: type
- (r.Random Type)
+ (Random Type)
(..type' 0))
(def: (valid_type? type)
@@ -106,8 +107,8 @@
Test
(<| (_.context (%.name (name_of /._)))
($_ _.and
- (do r.monad
- [sample (r.filter ..valid_type? ..type)]
+ (do random.monad
+ [sample (random.filter ..valid_type? ..type)]
($_ _.and
(_.test "Any is the super-type of everything."
(/.checks? Any sample))
@@ -145,7 +146,7 @@
(not (/.checks? (#.Function Any Nothing)
(#.Function Nothing Any)))))
)
- (do r.monad
+ (do random.monad
[meta ..type
data ..type]
(_.test "Can type-check type application."
@@ -153,12 +154,12 @@
(type.tuple (list meta data)))
(/.checks? (type.tuple (list meta data))
(|> Ann (#.Apply meta) (#.Apply data))))))
- (do r.monad
- [#let [gen_short (r.ascii 10)]
+ (do random.monad
+ [#let [gen_short (random.ascii 10)]
nameL gen_short
- nameR (|> gen_short (r.filter (|>> (text\= nameL) not)))
+ nameR (|> gen_short (random.filter (|>> (text\= nameL) not)))
paramL ..type
- paramR (r.filter (|>> (/.checks? paramL) not) ..type)]
+ paramR (random.filter (|>> (/.checks? paramL) not) ..type)]
($_ _.and
(_.test "Primitive types match when they have the same name and the same parameters."
(/.checks? (#.Primitive nameL (list paramL))
@@ -198,10 +199,10 @@
_ (/.check var Nothing)]
(/.check .Bit var))))
)
- (do {! r.monad}
- [num_connections (|> r.nat (\ ! map (n.% 100)))
- boundT (|> ..type (r.filter (|>> (case> (#.Var _) #0 _ #1))))
- pick_pcg (r.and r.nat r.nat)]
+ (do {! random.monad}
+ [num_connections (|> random.nat (\ ! map (n.% 100)))
+ boundT (|> ..type (random.filter (|>> (case> (#.Var _) #0 _ #1))))
+ pick_pcg (random.and random.nat random.nat)]
($_ _.and
(_.test "Can create rings of variables."
(type_checks? (do /.monad
diff --git a/stdlib/source/test/lux/type/dynamic.lux b/stdlib/source/test/lux/type/dynamic.lux
index 4cb4e5093..fadc98ca7 100644
--- a/stdlib/source/test/lux/type/dynamic.lux
+++ b/stdlib/source/test/lux/type/dynamic.lux
@@ -2,11 +2,11 @@
[lux #*
["%" data/text/format (#+ format)]
[abstract/monad (#+ do)]
- ["r" math/random (#+ Random)]
["_" test (#+ Test)]
[control
["." try]]
- [data
+ [math
+ ["." random (#+ Random)]
[number
["n" nat]]]]
{1
@@ -15,8 +15,8 @@
(def: #export test
Test
(<| (_.context (%.name (name_of /._)))
- (do r.monad
- [expected r.nat
+ (do random.monad
+ [expected random.nat
#let [value (:dynamic expected)]]
($_ _.and
(_.test "Can check dynamic values."
diff --git a/stdlib/source/test/lux/type/implicit.lux b/stdlib/source/test/lux/type/implicit.lux
index f78637b1b..4978a9b3a 100644
--- a/stdlib/source/test/lux/type/implicit.lux
+++ b/stdlib/source/test/lux/type/implicit.lux
@@ -9,12 +9,12 @@
["." enum]]
[data
["." bit ("#\." equivalence)]
- [number
- ["n" nat]]
[collection
["." list]]]
[math
- ["." random (#+ Random)]]]
+ ["." random (#+ Random)]
+ [number
+ ["n" nat]]]]
{1
["." /]})
diff --git a/stdlib/source/test/lux/type/resource.lux b/stdlib/source/test/lux/type/resource.lux
index 7f84dcd2b..54150772e 100644
--- a/stdlib/source/test/lux/type/resource.lux
+++ b/stdlib/source/test/lux/type/resource.lux
@@ -1,14 +1,13 @@
(.module:
[lux #*
["%" data/text/format (#+ format)]
- ["r" math/random (#+ Random)]
["_" test (#+ Test)]
[abstract
[monad
[indexed (#+ do)]]]
[control
["." io]]
- [data
+ [math
[number
["n" nat]]]]
{1
diff --git a/stdlib/source/test/lux/world/file.lux b/stdlib/source/test/lux/world/file.lux
index 173bd7586..b59202972 100644
--- a/stdlib/source/test/lux/world/file.lux
+++ b/stdlib/source/test/lux/world/file.lux
@@ -1,7 +1,6 @@
(.module:
[lux #*
["%" data/text/format (#+ format)]
- ["r" math/random (#+ Random) ("#\." monad)]
["_" test (#+ Test)]
[abstract/monad (#+ do)]
[control
@@ -14,11 +13,13 @@
[data
["." binary (#+ Binary)]
["." text]
- [number
- ["n" nat]
- ["i" int]]
[collection
["." list]]]
+ [math
+ ["." random (#+ Random) ("#\." monad)]
+ [number
+ ["n" nat]
+ ["i" int]]]
[time
["." instant]
["." duration]]]
@@ -36,49 +37,51 @@
(def: (creation_and_deletion number)
(-> Nat Test)
- (r\wrap (do promise.monad
- [#let [path (format "temp_file_" (%.nat number))]
- result (promise.future
- (do (try.with io.monad)
- [#let [check_existence! (: (IO (Try Bit))
- (try.lift io.monad (/.exists? io.monad /.default path)))]
- pre! check_existence!
- file (!.use (\ /.default create_file) path)
- post! check_existence!
- _ (!.use (\ file delete) [])
- remains? check_existence!]
- (wrap (and (not pre!)
- post!
- (not remains?)))))]
- (_.assert "Can create/delete files."
- (try.default #0 result)))))
+ (random\wrap
+ (do promise.monad
+ [#let [path (format "temp_file_" (%.nat number))]
+ result (promise.future
+ (do (try.with io.monad)
+ [#let [check_existence! (: (IO (Try Bit))
+ (try.lift io.monad (/.exists? io.monad /.default path)))]
+ pre! check_existence!
+ file (!.use (\ /.default create_file) path)
+ post! check_existence!
+ _ (!.use (\ file delete) [])
+ remains? check_existence!]
+ (wrap (and (not pre!)
+ post!
+ (not remains?)))))]
+ (_.assert "Can create/delete files."
+ (try.default #0 result)))))
(def: (read_and_write number data)
(-> Nat Binary Test)
- (r\wrap (do promise.monad
- [#let [path (format "temp_file_" (%.nat number))]
- result (promise.future
- (do (try.with io.monad)
- [file (!.use (\ /.default create_file) path)
- _ (!.use (\ file over_write) data)
- content (!.use (\ file content) [])
- _ (!.use (\ file delete) [])]
- (wrap (\ binary.equivalence = data content))))]
- (_.assert "Can write/read files."
- (try.default #0 result)))))
+ (random\wrap
+ (do promise.monad
+ [#let [path (format "temp_file_" (%.nat number))]
+ result (promise.future
+ (do (try.with io.monad)
+ [file (!.use (\ /.default create_file) path)
+ _ (!.use (\ file over_write) data)
+ content (!.use (\ file content) [])
+ _ (!.use (\ file delete) [])]
+ (wrap (\ binary.equivalence = data content))))]
+ (_.assert "Can write/read files."
+ (try.default #0 result)))))
(def: #export test
Test
(<| (_.context (%.name (name_of /._)))
- (do {! r.monad}
- [file_size (|> r.nat (\ ! map (|>> (n.% 100) (n.max 10))))
+ (do {! random.monad}
+ [file_size (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
dataL (_binary.random file_size)
dataR (_binary.random file_size)
- new_modified (|> r.int (\ ! map (|>> i.abs
- (i.% +10,000,000,000,000)
- truncate_millis
- duration.from_millis
- instant.absolute)))]
+ new_modified (|> random.int (\ ! map (|>> i.abs
+ (i.% +10,000,000,000,000)
+ truncate_millis
+ duration.from_millis
+ instant.absolute)))]
($_ _.and
## (..creation_and_deletion 0)
## (..read_and_write 1 dataL)
@@ -152,12 +155,12 @@
## [dir (!.use (\ /.default create_directory) dir_path)
## pre_files (!.use (\ dir files) [])
## pre_directories (!.use (\ dir directories) [])
-
+
## file (!.use (\ /.default create_file) (format dir_path "/" file_path))
## inner_dir (!.use (\ /.default create_directory) (format dir_path "/" inner_dir_path))
## post_files (!.use (\ dir files) [])
## post_directories (!.use (\ dir directories) [])
-
+
## _ (!.use (\ file delete) [])
## _ (!.use (\ inner_dir discard) [])
## _ (!.use (\ dir discard) [])]
diff --git a/stdlib/source/test/lux/world/shell.lux b/stdlib/source/test/lux/world/shell.lux
index 1dbe5dcd5..a336de350 100644
--- a/stdlib/source/test/lux/world/shell.lux
+++ b/stdlib/source/test/lux/world/shell.lux
@@ -16,13 +16,13 @@
["." environment (#+ Environment)]]]
[data
["." text ("#\." equivalence)]
- [number
- ["n" nat]
- ["i" int]]
[collection
["." list]]]
[math
- ["." random]]]
+ ["." random]
+ [number
+ ["n" nat]
+ ["i" int]]]]
{1
["." /
[//