aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2020-07-01 22:28:36 -0400
committerEduardo Julian2020-07-01 22:28:36 -0400
commit7853d890ac72cd96851caedadd8525404705286c (patch)
tree7bf7d484b0830a7dec16be914beb5817a89ec072
parent23ad698f1ad87f9e9838c1e7df1809991c6a1d18 (diff)
Moved all spec(ifications) from under "test/" to under "spec/".
-rw-r--r--commands.md24
-rw-r--r--lux-jvm/project.clj2
-rw-r--r--stdlib/source/spec/lux/abstract/apply.lux73
-rw-r--r--stdlib/source/spec/lux/abstract/codec.lux26
-rw-r--r--stdlib/source/spec/lux/abstract/enum.lux26
-rw-r--r--stdlib/source/spec/lux/abstract/equivalence.lux23
-rw-r--r--stdlib/source/spec/lux/abstract/fold.lux22
-rw-r--r--stdlib/source/spec/lux/abstract/functor.lux62
-rw-r--r--stdlib/source/spec/lux/abstract/interval.lux22
-rw-r--r--stdlib/source/spec/lux/abstract/monad.lux57
-rw-r--r--stdlib/source/spec/lux/abstract/monoid.lux31
-rw-r--r--stdlib/source/spec/lux/abstract/order.lux27
-rw-r--r--stdlib/source/test/lux/abstract/apply.lux66
-rw-r--r--stdlib/source/test/lux/abstract/codec.lux16
-rw-r--r--stdlib/source/test/lux/abstract/enum.lux30
-rw-r--r--stdlib/source/test/lux/abstract/equivalence.lux18
-rw-r--r--stdlib/source/test/lux/abstract/fold.lux13
-rw-r--r--stdlib/source/test/lux/abstract/functor.lux50
-rw-r--r--stdlib/source/test/lux/abstract/interval.lux16
-rw-r--r--stdlib/source/test/lux/abstract/monad.lux49
-rw-r--r--stdlib/source/test/lux/abstract/monad/free.lux2
-rw-r--r--stdlib/source/test/lux/abstract/monoid.lux22
-rw-r--r--stdlib/source/test/lux/abstract/order.lux26
-rw-r--r--stdlib/source/test/lux/abstract/predicate.lux11
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/promise.lux2
-rw-r--r--stdlib/source/test/lux/control/concurrency/stm.lux2
-rw-r--r--stdlib/source/test/lux/control/continuation.lux2
-rw-r--r--stdlib/source/test/lux/control/function.lux10
-rw-r--r--stdlib/source/test/lux/control/function/mixin.lux2
-rw-r--r--stdlib/source/test/lux/control/io.lux2
-rw-r--r--stdlib/source/test/lux/control/parser.lux2
-rw-r--r--stdlib/source/test/lux/control/reader.lux2
-rw-r--r--stdlib/source/test/lux/control/region.lux2
-rw-r--r--stdlib/source/test/lux/control/security/policy.lux2
-rw-r--r--stdlib/source/test/lux/control/state.lux2
-rw-r--r--stdlib/source/test/lux/control/thread.lux2
-rw-r--r--stdlib/source/test/lux/control/try.lux2
-rw-r--r--stdlib/source/test/lux/control/writer.lux2
-rw-r--r--stdlib/source/test/lux/data/binary.lux2
-rw-r--r--stdlib/source/test/lux/data/bit.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/stack.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux2
-rw-r--r--stdlib/source/test/lux/data/color.lux2
-rw-r--r--stdlib/source/test/lux/data/format/json.lux2
-rw-r--r--stdlib/source/test/lux/data/format/xml.lux2
-rw-r--r--stdlib/source/test/lux/data/identity.lux2
-rw-r--r--stdlib/source/test/lux/data/lazy.lux2
-rw-r--r--stdlib/source/test/lux/data/maybe.lux2
-rw-r--r--stdlib/source/test/lux/data/name.lux2
-rw-r--r--stdlib/source/test/lux/data/number/complex.lux2
-rw-r--r--stdlib/source/test/lux/data/number/frac.lux2
-rw-r--r--stdlib/source/test/lux/data/number/i16.lux2
-rw-r--r--stdlib/source/test/lux/data/number/i32.lux2
-rw-r--r--stdlib/source/test/lux/data/number/i64.lux2
-rw-r--r--stdlib/source/test/lux/data/number/i8.lux2
-rw-r--r--stdlib/source/test/lux/data/number/int.lux2
-rw-r--r--stdlib/source/test/lux/data/number/nat.lux2
-rw-r--r--stdlib/source/test/lux/data/number/ratio.lux2
-rw-r--r--stdlib/source/test/lux/data/number/rev.lux2
-rw-r--r--stdlib/source/test/lux/data/text.lux2
-rw-r--r--stdlib/source/test/lux/macro/poly/json.lux2
-rw-r--r--stdlib/source/test/lux/time/date.lux2
-rw-r--r--stdlib/source/test/lux/time/day.lux2
-rw-r--r--stdlib/source/test/lux/time/duration.lux2
-rw-r--r--stdlib/source/test/lux/time/instant.lux2
-rw-r--r--stdlib/source/test/lux/time/month.lux2
76 files changed, 474 insertions, 352 deletions
diff --git a/commands.md b/commands.md
index bdcd22d38..7068c73d6 100644
--- a/commands.md
+++ b/commands.md
@@ -11,14 +11,15 @@ cd ~/lux/ && find . -name '*.lux' | xargs wc -l
```
cd ~/lux/luxc/ && lein clean && \
cd ~/lux/stdlib/ && lein clean && \
-cd ~/lux/new-luxc/ && lein clean && \
+cd ~/lux/lux-jvm/ && lein clean && \
cd ~/lux/lux-js/ && lein clean && \
cd ~/lux/lux-python/ && lein clean && \
cd ~/lux/lux-lua/ && lein clean && \
cd ~/lux/lux-ruby/ && lein clean && \
cd ~/lux/lux-php/ && lein clean && \
cd ~/lux/lux-cl/ && lein clean && \
-cd ~/lux/lux-scheme/ && lein clean
+cd ~/lux/lux-scheme/ && lein clean && \
+cd ~/lux/lux-r/ && lein clean
```
---
@@ -70,7 +71,16 @@ cd ~/lux/stdlib/ && lein with-profile bibliotheca lux auto test
```
cd ~/lux/stdlib/ && lein install
+
cd ~/lux/stdlib/ && mvn install:install-file -Dfile=target/library.tar -DgroupId=com.github.luxlang -DartifactId=stdlib -Dversion=0.6.0-SNAPSHOT -Dpackaging=tar
+
+cd ~/lux/stdlib/ && mvn deploy:deploy-file \
+-Durl=https://<username>:<password>@oss.sonatype.org/content/repositories/snapshots/ \
+-Dfile=target/library.tar \
+-DgroupId=com.github.luxlang \
+-DartifactId=stdlib \
+-Dversion=0.6.0-SNAPSHOT \
+-Dpackaging=tar
```
## Generate documentation
@@ -340,7 +350,15 @@ cd ~/lux/stdlib/target/ && java -jar program.jar
## Deploy
```
-mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm -Dversion=0.6.0-SNAPSHOT -Dpackaging=jar
+cd ~/lux/lux-jvm/ && mvn install:install-file -Dfile=target/program.jar -DgroupId=com.github.luxlang -DartifactId=lux-jvm -Dversion=0.6.0-SNAPSHOT -Dpackaging=jar
+
+cd ~/lux/lux-jvm/ && mvn deploy:deploy-file \
+-Durl=https://<username>:<password>@oss.sonatype.org/content/repositories/snapshots/ \
+-Dfile=target/program.jar \
+-DgroupId=com.github.luxlang \
+-DartifactId=lux-jvm \
+-Dversion=0.6.0-SNAPSHOT \
+-Dpackaging=jar
```
# Compiler trial
diff --git a/lux-jvm/project.clj b/lux-jvm/project.clj
index dbff84a85..301740923 100644
--- a/lux-jvm/project.clj
+++ b/lux-jvm/project.clj
@@ -22,7 +22,7 @@
:dependencies [[com.github.luxlang/luxc-jvm ~version]
[com.github.luxlang/stdlib ~version]
- ;; JVM Bytecode
+ ;; JVM Bytecode (TODO: Remove ASAP)
[org.ow2.asm/asm-all "5.0.3"]]
:manifest {"lux" ~version}
diff --git a/stdlib/source/spec/lux/abstract/apply.lux b/stdlib/source/spec/lux/abstract/apply.lux
new file mode 100644
index 000000000..4220de34c
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/apply.lux
@@ -0,0 +1,73 @@
+(.module:
+ [lux #*
+ [abstract
+ [monad (#+ do)]]
+ [data
+ [number
+ ["n" nat]]]
+ [control
+ ["." function]]
+ [math
+ ["." random]]
+ ["_" test (#+ Test)]]
+ {1
+ ["." / (#+ Apply)]}
+ [//
+ [functor (#+ Injection Comparison)]])
+
+(def: (identity injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
+ (do {@ random.monad}
+ [sample (:: @ map injection random.nat)]
+ (_.test "Identity."
+ ((comparison n.=)
+ (_@apply (injection function.identity) sample)
+ sample))))
+
+(def: (homomorphism injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
+ (do {@ random.monad}
+ [sample random.nat
+ increase (:: @ map n.+ random.nat)]
+ (_.test "Homomorphism."
+ ((comparison n.=)
+ (_@apply (injection increase) (injection sample))
+ (injection (increase sample))))))
+
+(def: (interchange injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
+ (do {@ random.monad}
+ [sample random.nat
+ increase (:: @ map n.+ random.nat)]
+ (_.test "Interchange."
+ ((comparison n.=)
+ (_@apply (injection increase) (injection sample))
+ (_@apply (injection (function (_ f) (f sample))) (injection increase))))))
+
+(def: (composition injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
+ (do {@ random.monad}
+ [sample random.nat
+ increase (:: @ map n.+ random.nat)
+ decrease (:: @ map n.- random.nat)]
+ (_.test "Composition."
+ ((comparison n.=)
+ (_$ _@apply
+ (injection function.compose)
+ (injection increase)
+ (injection decrease)
+ (injection sample))
+ ($_ _@apply
+ (injection increase)
+ (injection decrease)
+ (injection sample))))))
+
+(def: #export (spec injection comparison apply)
+ (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
+ (_.with-cover [/.Apply]
+ ($_ _.and
+ (..identity injection comparison apply)
+ (..homomorphism injection comparison apply)
+ (..interchange injection comparison apply)
+ (..composition injection comparison apply)
+ )))
diff --git a/stdlib/source/spec/lux/abstract/codec.lux b/stdlib/source/spec/lux/abstract/codec.lux
new file mode 100644
index 000000000..ece213c31
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/codec.lux
@@ -0,0 +1,26 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [control
+ ["." try]]
+ [math
+ ["." random (#+ Random)]]]
+ {1
+ ["." /
+ [//
+ [equivalence (#+ Equivalence)]]]})
+
+(def: #export (spec (^open "/@.") (^open "/@.") generator)
+ (All [m a] (-> (Equivalence a) (/.Codec m a) (Random a) Test))
+ (do random.monad
+ [expected generator]
+ (_.with-cover [/.Codec]
+ (_.test "Isomorphism."
+ (case (|> expected /@encode /@decode)
+ (#try.Success actual)
+ (/@= expected actual)
+
+ (#try.Failure _)
+ false)))))
diff --git a/stdlib/source/spec/lux/abstract/enum.lux b/stdlib/source/spec/lux/abstract/enum.lux
new file mode 100644
index 000000000..198d3da50
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/enum.lux
@@ -0,0 +1,26 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [math
+ ["." random (#+ Random)]]]
+ {1
+ ["." /]})
+
+(def: #export (spec (^open "/@.") gen-sample)
+ (All [a] (-> (/.Enum a) (Random a) Test))
+ (do random.monad
+ [sample gen-sample]
+ (<| (_.with-cover [/.Enum])
+ ($_ _.and
+ (_.test "Successor and predecessor are inverse functions."
+ (and (/@= (|> sample /@succ /@pred)
+ sample)
+ (/@= (|> sample /@pred /@succ)
+ sample)
+ (not (/@= (/@succ sample)
+ sample))
+ (not (/@= (/@pred sample)
+ sample))))
+ ))))
diff --git a/stdlib/source/spec/lux/abstract/equivalence.lux b/stdlib/source/spec/lux/abstract/equivalence.lux
new file mode 100644
index 000000000..b511ba176
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/equivalence.lux
@@ -0,0 +1,23 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [math
+ ["." random (#+ Random)]]]
+ {1
+ ["." / (#+ Equivalence)]})
+
+(def: #export (spec (^open "_@.") generator)
+ (All [a] (-> (Equivalence a) (Random a) Test))
+ (do random.monad
+ [left generator
+ right generator]
+ (<| (_.with-cover [/.Equivalence])
+ ($_ _.and
+ (_.test "Reflexivity."
+ (_@= left left))
+ (_.test "Symmetry."
+ (if (_@= left right)
+ (_@= right left)
+ (not (_@= right left))))))))
diff --git a/stdlib/source/spec/lux/abstract/fold.lux b/stdlib/source/spec/lux/abstract/fold.lux
new file mode 100644
index 000000000..71377f991
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/fold.lux
@@ -0,0 +1,22 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [data
+ [number
+ ["n" nat]]]
+ [math
+ ["." random]]]
+ [//
+ [functor (#+ Injection Comparison)]]
+ {1 ["." /]})
+
+(def: #export (spec injection comparison (^open "/@."))
+ (All [f] (-> (Injection f) (Comparison f) (/.Fold f) Test))
+ (do random.monad
+ [subject random.nat
+ parameter random.nat]
+ (_.cover [/.Fold]
+ (n.= (/@fold n.+ parameter (injection subject))
+ (n.+ parameter subject)))))
diff --git a/stdlib/source/spec/lux/abstract/functor.lux b/stdlib/source/spec/lux/abstract/functor.lux
new file mode 100644
index 000000000..2cb086b7a
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/functor.lux
@@ -0,0 +1,62 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [equivalence (#+ Equivalence)]
+ [monad (#+ do)]]
+ [control
+ ["." function]]
+ [data
+ [number
+ ["n" nat]]]
+ [math
+ ["." random]]]
+ {1
+ ["." / (#+ Functor)]})
+
+(type: #export (Injection f)
+ (All [a] (-> a (f a))))
+
+(type: #export (Comparison f)
+ (All [a]
+ (-> (Equivalence a)
+ (Equivalence (f a)))))
+
+(def: (identity injection comparison (^open "/@."))
+ (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
+ (do {@ random.monad}
+ [sample (:: @ map injection random.nat)]
+ (_.test "Identity."
+ ((comparison n.=)
+ (/@map function.identity sample)
+ sample))))
+
+(def: (homomorphism injection comparison (^open "/@."))
+ (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
+ (do {@ random.monad}
+ [sample random.nat
+ increase (:: @ map n.+ random.nat)]
+ (_.test "Homomorphism."
+ ((comparison n.=)
+ (/@map increase (injection sample))
+ (injection (increase sample))))))
+
+(def: (composition injection comparison (^open "/@."))
+ (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
+ (do {@ random.monad}
+ [sample (:: @ map injection random.nat)
+ increase (:: @ map n.+ random.nat)
+ decrease (:: @ map n.- random.nat)]
+ (_.test "Composition."
+ ((comparison n.=)
+ (|> sample (/@map increase) (/@map decrease))
+ (|> sample (/@map (|>> increase decrease)))))))
+
+(def: #export (spec injection comparison functor)
+ (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
+ (<| (_.with-cover [/.Functor])
+ ($_ _.and
+ (..identity injection comparison functor)
+ (..homomorphism injection comparison functor)
+ (..composition injection comparison functor)
+ )))
diff --git a/stdlib/source/spec/lux/abstract/interval.lux b/stdlib/source/spec/lux/abstract/interval.lux
new file mode 100644
index 000000000..1541f1cee
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/interval.lux
@@ -0,0 +1,22 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]
+ ["." order]]
+ [math
+ ["." random (#+ Random)]]]
+ {1
+ ["." /]})
+
+(def: #export (spec (^open "/@.") gen-sample)
+ (All [a] (-> (/.Interval a) (Random a) Test))
+ (<| (_.with-cover [/.Interval])
+ (do random.monad
+ [sample gen-sample]
+ ($_ _.and
+ (_.test "No value is bigger than the top."
+ (/@< /@top sample))
+ (_.test "No value is smaller than the bottom."
+ (order.> /@&order /@bottom sample))
+ ))))
diff --git a/stdlib/source/spec/lux/abstract/monad.lux b/stdlib/source/spec/lux/abstract/monad.lux
new file mode 100644
index 000000000..d2eac535f
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/monad.lux
@@ -0,0 +1,57 @@
+(.module:
+ [lux #*
+ [data
+ [number
+ ["n" nat]]]
+ [math
+ ["." random]]
+ ["_" test (#+ Test)]]
+ {1
+ ["." / (#+ Monad do)]}
+ [//
+ [functor (#+ Injection Comparison)]])
+
+(def: (left-identity injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
+ (do {@ random.monad}
+ [sample random.nat
+ morphism (:: @ map (function (_ diff)
+ (|>> (n.+ diff) _@wrap))
+ random.nat)]
+ (_.test "Left identity."
+ ((comparison n.=)
+ (|> (injection sample) (_@map morphism) _@join)
+ (morphism sample)))))
+
+(def: (right-identity injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
+ (do random.monad
+ [sample random.nat]
+ (_.test "Right identity."
+ ((comparison n.=)
+ (|> (injection sample) (_@map _@wrap) _@join)
+ (injection sample)))))
+
+(def: (associativity injection comparison (^open "_@."))
+ (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
+ (do {@ random.monad}
+ [sample random.nat
+ increase (:: @ map (function (_ diff)
+ (|>> (n.+ diff) _@wrap))
+ random.nat)
+ decrease (:: @ map (function (_ diff)
+ (|>> (n.- diff) _@wrap))
+ random.nat)]
+ (_.test "Associativity."
+ ((comparison n.=)
+ (|> (injection sample) (_@map increase) _@join (_@map decrease) _@join)
+ (|> (injection sample) (_@map (|>> increase (_@map decrease) _@join)) _@join)))))
+
+(def: #export (spec injection comparison monad)
+ (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
+ (<| (_.with-cover [/.Monad])
+ ($_ _.and
+ (..left-identity injection comparison monad)
+ (..right-identity injection comparison monad)
+ (..associativity injection comparison monad)
+ )))
diff --git a/stdlib/source/spec/lux/abstract/monoid.lux b/stdlib/source/spec/lux/abstract/monoid.lux
new file mode 100644
index 000000000..eca057360
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/monoid.lux
@@ -0,0 +1,31 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [math
+ ["." random (#+ Random)]]]
+ {1
+ ["." /
+ [//
+ [equivalence (#+ Equivalence)]]]})
+
+(def: #export (spec (^open "/@.") (^open "/@.") gen-sample)
+ (All [a] (-> (Equivalence a) (/.Monoid a) (Random a) Test))
+ (do random.monad
+ [sample gen-sample
+ left gen-sample
+ mid gen-sample
+ right gen-sample]
+ (<| (_.with-cover [/.Monoid])
+ ($_ _.and
+ (_.test "Left identity."
+ (/@= sample
+ (/@compose /@identity sample)))
+ (_.test "Right identity."
+ (/@= sample
+ (/@compose sample /@identity)))
+ (_.test "Associativity."
+ (/@= (/@compose left (/@compose mid right))
+ (/@compose (/@compose left mid) right)))
+ ))))
diff --git a/stdlib/source/spec/lux/abstract/order.lux b/stdlib/source/spec/lux/abstract/order.lux
new file mode 100644
index 000000000..4cdb5689a
--- /dev/null
+++ b/stdlib/source/spec/lux/abstract/order.lux
@@ -0,0 +1,27 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [math
+ ["." random (#+ Random)]]]
+ {1
+ ["." /]})
+
+(def: #export (spec (^open "/@.") generator)
+ (All [a] (-> (/.Order a) (Random a) Test))
+ (<| (_.with-cover [/.Order])
+ (do random.monad
+ [parameter generator
+ subject generator])
+ ($_ _.and
+ (_.test "Values are either ordered, or they are equal. All options are mutually exclusive."
+ (cond (/@< parameter subject)
+ (not (or (/@< subject parameter)
+ (/@= parameter subject)))
+
+ (/@< subject parameter)
+ (not (/@= parameter subject))
+
+ ## else
+ (/@= parameter subject))))))
diff --git a/stdlib/source/test/lux/abstract/apply.lux b/stdlib/source/test/lux/abstract/apply.lux
index eb8fd4e52..998c0b91c 100644
--- a/stdlib/source/test/lux/abstract/apply.lux
+++ b/stdlib/source/test/lux/abstract/apply.lux
@@ -1,78 +1,18 @@
(.module:
[lux #*
- [abstract/monad (#+ do)]
+ [abstract
+ [monad (#+ do)]]
[data
["." maybe]
[number
["n" nat]]
[collection
["." list]]]
- [control
- ["." function]]
[math
["." random]]
["_" test (#+ Test)]]
{1
- ["." / (#+ Apply)]}
- [//
- [functor (#+ Injection Comparison)]])
-
-(def: (identity injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {@ random.monad}
- [sample (:: @ map injection random.nat)]
- (_.test "Identity."
- ((comparison n.=)
- (_@apply (injection function.identity) sample)
- sample))))
-
-(def: (homomorphism injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {@ random.monad}
- [sample random.nat
- increase (:: @ map n.+ random.nat)]
- (_.test "Homomorphism."
- ((comparison n.=)
- (_@apply (injection increase) (injection sample))
- (injection (increase sample))))))
-
-(def: (interchange injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {@ random.monad}
- [sample random.nat
- increase (:: @ map n.+ random.nat)]
- (_.test "Interchange."
- ((comparison n.=)
- (_@apply (injection increase) (injection sample))
- (_@apply (injection (function (_ f) (f sample))) (injection increase))))))
-
-(def: (composition injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
- (do {@ random.monad}
- [sample random.nat
- increase (:: @ map n.+ random.nat)
- decrease (:: @ map n.- random.nat)]
- (_.test "Composition."
- ((comparison n.=)
- (_$ _@apply
- (injection function.compose)
- (injection increase)
- (injection decrease)
- (injection sample))
- ($_ _@apply
- (injection increase)
- (injection decrease)
- (injection sample))))))
-
-(def: #export (spec injection comparison apply)
- (All [f] (-> (Injection f) (Comparison f) (Apply f) Test))
- (_.with-cover [/.Apply]
- ($_ _.and
- (..identity injection comparison apply)
- (..homomorphism injection comparison apply)
- (..interchange injection comparison apply)
- (..composition injection comparison apply)
- )))
+ ["." / (#+ Apply)]})
(def: #export test
Test
diff --git a/stdlib/source/test/lux/abstract/codec.lux b/stdlib/source/test/lux/abstract/codec.lux
index 3bb35f659..3d7a22bc6 100644
--- a/stdlib/source/test/lux/abstract/codec.lux
+++ b/stdlib/source/test/lux/abstract/codec.lux
@@ -1,7 +1,8 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [abstract/monad (#+ do)]
+ [abstract
+ [monad (#+ do)]]
[control
["." try]]
[data
@@ -43,16 +44,3 @@
(#try.Failure error)
false)))))
-
-(def: #export (spec (^open "/@.") (^open "/@.") generator)
- (All [m a] (-> (Equivalence a) (Codec m a) (Random a) Test))
- (do random.monad
- [expected generator]
- (_.with-cover [/.Codec]
- (_.test "Isomorphism."
- (case (|> expected /@encode /@decode)
- (#try.Success actual)
- (/@= expected actual)
-
- (#try.Failure _)
- false)))))
diff --git a/stdlib/source/test/lux/abstract/enum.lux b/stdlib/source/test/lux/abstract/enum.lux
index b6a490358..c020ec211 100644
--- a/stdlib/source/test/lux/abstract/enum.lux
+++ b/stdlib/source/test/lux/abstract/enum.lux
@@ -1,5 +1,8 @@
(.module:
[lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
[data
["." product]
["." maybe ("#@." functor)]
@@ -7,18 +10,16 @@
["n" nat]]
[collection
["." list ("#@." fold)]]]
- ["_" test (#+ Test)]
- [abstract/monad (#+ do)]
[math
- ["r" random (#+ Random)]]]
+ ["." random (#+ Random)]]]
{1
- ["." / (#+ Enum)]})
+ ["." /]})
(def: #export test
Test
(let [limit (: (Random Nat)
- (:: r.monad map (n.% 20) r.nat))]
- (do r.monad
+ (:: random.monad map (n.% 20) random.nat))]
+ (do random.monad
[start limit
end limit
#let [[start end] (if (n.< end start)
@@ -48,20 +49,3 @@
expected-end?
every-element-is-a-successor?)))
)))))
-
-(def: #export (spec (^open "/@.") gen-sample)
- (All [a] (-> (Enum a) (Random a) Test))
- (do r.monad
- [sample gen-sample]
- (<| (_.with-cover [/.Enum])
- ($_ _.and
- (_.test "Successor and predecessor are inverse functions."
- (and (/@= (|> sample /@succ /@pred)
- sample)
- (/@= (|> sample /@pred /@succ)
- sample)
- (not (/@= (/@succ sample)
- sample))
- (not (/@= (/@pred sample)
- sample))))
- ))))
diff --git a/stdlib/source/test/lux/abstract/equivalence.lux b/stdlib/source/test/lux/abstract/equivalence.lux
index d79803e31..ee097034f 100644
--- a/stdlib/source/test/lux/abstract/equivalence.lux
+++ b/stdlib/source/test/lux/abstract/equivalence.lux
@@ -6,7 +6,7 @@
{[0 #spec]
[/
[functor
- ["." contravariant]]]}]
+ ["$." contravariant]]]}]
[data
["." bit ("#@." equivalence)]
[number
@@ -38,7 +38,7 @@
(<| (_.covering /._)
($_ _.and
(_.with-cover [/.functor]
- (contravariant.spec equivalence n.equivalence /.functor))
+ ($contravariant.spec equivalence n.equivalence /.functor))
(_.cover [/.sum]
(let [equivalence (/.sum n.equivalence i.equivalence)]
(and (bit@= (:: n.equivalence = leftN leftN)
@@ -76,17 +76,3 @@
(not (:: equivalence = (list sample sample) (list sample)))
(not (:: equivalence = (list sample sample) (list different different))))))
))))
-
-(def: #export (spec (^open "_@.") generator)
- (All [a] (-> (Equivalence a) (Random a) Test))
- (do random.monad
- [left generator
- right generator]
- (<| (_.with-cover [/.Equivalence])
- ($_ _.and
- (_.test "Reflexivity."
- (_@= left left))
- (_.test "Symmetry."
- (if (_@= left right)
- (_@= right left)
- (not (_@= right left))))))))
diff --git a/stdlib/source/test/lux/abstract/fold.lux b/stdlib/source/test/lux/abstract/fold.lux
index e954a0a38..b2939f8c7 100644
--- a/stdlib/source/test/lux/abstract/fold.lux
+++ b/stdlib/source/test/lux/abstract/fold.lux
@@ -6,26 +6,13 @@
[data
[number
["n" nat]]
- [text
- ["%" format (#+ format)]]
[collection
["." list]]]
[math
["." random]]]
- [//
- [functor (#+ Injection Comparison)]]
{1
["." / (#+ Fold)]})
-(def: #export (spec injection comparison (^open "/@."))
- (All [f] (-> (Injection f) (Comparison f) (Fold f) Test))
- (do random.monad
- [subject random.nat
- parameter random.nat]
- (_.cover [/.Fold]
- (n.= (/@fold n.+ parameter (injection subject))
- (n.+ parameter subject)))))
-
(def: #export test
Test
(do random.monad
diff --git a/stdlib/source/test/lux/abstract/functor.lux b/stdlib/source/test/lux/abstract/functor.lux
index faef439c6..a900f9fd9 100644
--- a/stdlib/source/test/lux/abstract/functor.lux
+++ b/stdlib/source/test/lux/abstract/functor.lux
@@ -2,10 +2,7 @@
[lux #*
["_" test (#+ Test)]
[abstract
- [equivalence (#+ Equivalence)]
[monad (#+ do)]]
- [control
- ["." function]]
[data
["." maybe]
[number
@@ -17,53 +14,6 @@
{1
["." / (#+ Functor)]})
-(type: #export (Injection f)
- (All [a] (-> a (f a))))
-
-(type: #export (Comparison f)
- (All [a]
- (-> (Equivalence a)
- (Equivalence (f a)))))
-
-(def: (identity injection comparison (^open "/@."))
- (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
- (do {@ random.monad}
- [sample (:: @ map injection random.nat)]
- (_.test "Identity."
- ((comparison n.=)
- (/@map function.identity sample)
- sample))))
-
-(def: (homomorphism injection comparison (^open "/@."))
- (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
- (do {@ random.monad}
- [sample random.nat
- increase (:: @ map n.+ random.nat)]
- (_.test "Homomorphism."
- ((comparison n.=)
- (/@map increase (injection sample))
- (injection (increase sample))))))
-
-(def: (composition injection comparison (^open "/@."))
- (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
- (do {@ random.monad}
- [sample (:: @ map injection random.nat)
- increase (:: @ map n.+ random.nat)
- decrease (:: @ map n.- random.nat)]
- (_.test "Composition."
- ((comparison n.=)
- (|> sample (/@map increase) (/@map decrease))
- (|> sample (/@map (|>> increase decrease)))))))
-
-(def: #export (spec injection comparison functor)
- (All [f] (-> (Injection f) (Comparison f) (Functor f) Test))
- (<| (_.with-cover [/.Functor])
- ($_ _.and
- (..identity injection comparison functor)
- (..homomorphism injection comparison functor)
- (..composition injection comparison functor)
- )))
-
(def: #export test
Test
(do random.monad
diff --git a/stdlib/source/test/lux/abstract/interval.lux b/stdlib/source/test/lux/abstract/interval.lux
index d57dfb5d2..dcfa85e73 100644
--- a/stdlib/source/test/lux/abstract/interval.lux
+++ b/stdlib/source/test/lux/abstract/interval.lux
@@ -1,10 +1,10 @@
(.module:
[lux #*
["_" test (#+ Test)]
- [abstract/monad (#+ do)]
[abstract
+ [monad (#+ do)]
["." order]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[control
@@ -266,15 +266,3 @@
(_.with-cover [/.overlaps?]
..overlap)
)))
-
-(def: #export (spec (^open "/@.") gen-sample)
- (All [a] (-> (Interval a) (Random a) Test))
- (<| (_.with-cover [/.Interval])
- (do random.monad
- [sample gen-sample]
- ($_ _.and
- (_.test "No value is bigger than the top."
- (/@< /@top sample))
- (_.test "No value is smaller than the bottom."
- (order.> /@&order /@bottom sample))
- ))))
diff --git a/stdlib/source/test/lux/abstract/monad.lux b/stdlib/source/test/lux/abstract/monad.lux
index cc504777c..61ee28f0e 100644
--- a/stdlib/source/test/lux/abstract/monad.lux
+++ b/stdlib/source/test/lux/abstract/monad.lux
@@ -10,54 +10,7 @@
["." random]]
["_" test (#+ Test)]]
{1
- ["." / (#+ Monad do)]}
- [//
- [functor (#+ Injection Comparison)]])
-
-(def: (left-identity injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
- (do {@ random.monad}
- [sample random.nat
- morphism (:: @ map (function (_ diff)
- (|>> (n.+ diff) _@wrap))
- random.nat)]
- (_.test "Left identity."
- ((comparison n.=)
- (|> (injection sample) (_@map morphism) _@join)
- (morphism sample)))))
-
-(def: (right-identity injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
- (do random.monad
- [sample random.nat]
- (_.test "Right identity."
- ((comparison n.=)
- (|> (injection sample) (_@map _@wrap) _@join)
- (injection sample)))))
-
-(def: (associativity injection comparison (^open "_@."))
- (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
- (do {@ random.monad}
- [sample random.nat
- increase (:: @ map (function (_ diff)
- (|>> (n.+ diff) _@wrap))
- random.nat)
- decrease (:: @ map (function (_ diff)
- (|>> (n.- diff) _@wrap))
- random.nat)]
- (_.test "Associativity."
- ((comparison n.=)
- (|> (injection sample) (_@map increase) _@join (_@map decrease) _@join)
- (|> (injection sample) (_@map (|>> increase (_@map decrease) _@join)) _@join)))))
-
-(def: #export (spec injection comparison monad)
- (All [f] (-> (Injection f) (Comparison f) (Monad f) Test))
- (<| (_.with-cover [/.Monad])
- ($_ _.and
- (..left-identity injection comparison monad)
- (..right-identity injection comparison monad)
- (..associativity injection comparison monad)
- )))
+ ["." / (#+ Monad do)]})
(def: #export test
Test
diff --git a/stdlib/source/test/lux/abstract/monad/free.lux b/stdlib/source/test/lux/abstract/monad/free.lux
index 7241dc8b9..366948cdb 100644
--- a/stdlib/source/test/lux/abstract/monad/free.lux
+++ b/stdlib/source/test/lux/abstract/monad/free.lux
@@ -5,7 +5,7 @@
[functor (#+ Functor)]
[apply (#+ Apply)]
[monad (#+ Monad do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/abstract/monoid.lux b/stdlib/source/test/lux/abstract/monoid.lux
index e1271ed2f..e987e8fb3 100644
--- a/stdlib/source/test/lux/abstract/monoid.lux
+++ b/stdlib/source/test/lux/abstract/monoid.lux
@@ -3,8 +3,6 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]]
- [control
- ["." function]]
[data
[number
["." nat]
@@ -16,26 +14,6 @@
[//
[equivalence (#+ Equivalence)]]]})
-(def: #export (spec (^open "/@.") (^open "/@.") gen-sample)
- (All [a] (-> (Equivalence a) (/.Monoid a) (Random a) Test))
- (do random.monad
- [sample gen-sample
- left gen-sample
- mid gen-sample
- right gen-sample]
- (<| (_.with-cover [/.Monoid])
- ($_ _.and
- (_.test "Left identity."
- (/@= sample
- (/@compose /@identity sample)))
- (_.test "Right identity."
- (/@= sample
- (/@compose sample /@identity)))
- (_.test "Associativity."
- (/@= (/@compose left (/@compose mid right))
- (/@compose (/@compose left mid) right)))
- ))))
-
(def: #export test
Test
(do random.monad
diff --git a/stdlib/source/test/lux/abstract/order.lux b/stdlib/source/test/lux/abstract/order.lux
index dff849034..d0bbab29b 100644
--- a/stdlib/source/test/lux/abstract/order.lux
+++ b/stdlib/source/test/lux/abstract/order.lux
@@ -6,7 +6,7 @@
{[0 #spec]
[/
[functor
- ["." contravariant]]]}]
+ ["$." contravariant]]]}]
[data
["." bit ("#@." equivalence)]
[number
@@ -14,7 +14,7 @@
[math
["." random (#+ Random)]]]
{1
- ["." / (#+ Order)
+ ["." /
[//
[equivalence (#+ Equivalence)]]]})
@@ -24,7 +24,7 @@
(do random.monad
[left random.nat
right (|> random.nat (random.filter (|>> (n.= left) not)))
- #let [equivalence (: (Equivalence (Order Nat))
+ #let [equivalence (: (Equivalence (/.Order Nat))
(structure
(def: (= leftO rightO)
(and (bit@= (:: leftO < left left)
@@ -35,7 +35,7 @@
(:: rightO < left right))))))]])
($_ _.and
(_.with-cover [/.functor]
- (contravariant.spec equivalence n.order /.functor))
+ ($contravariant.spec equivalence n.order /.functor))
(_.cover [/.Choice /.min /.max]
(n.< (/.max n.order left right)
(/.min n.order left right)))
@@ -53,21 +53,3 @@
(bit@= (/.> n.order left right)
(/.>= n.order left right))))
)))
-
-(def: #export (spec (^open "/@.") generator)
- (All [a] (-> (Order a) (Random a) Test))
- (<| (_.with-cover [/.Order])
- (do random.monad
- [parameter generator
- subject generator])
- ($_ _.and
- (_.test "Values are either ordered, or they are equal. All options are mutually exclusive."
- (cond (/@< parameter subject)
- (not (or (/@< subject parameter)
- (/@= parameter subject)))
-
- (/@< subject parameter)
- (not (/@= parameter subject))
-
- ## else
- (/@= parameter subject))))))
diff --git a/stdlib/source/test/lux/abstract/predicate.lux b/stdlib/source/test/lux/abstract/predicate.lux
index 1a0d457db..ab101ea76 100644
--- a/stdlib/source/test/lux/abstract/predicate.lux
+++ b/stdlib/source/test/lux/abstract/predicate.lux
@@ -6,8 +6,9 @@
[monad (#+ do)]
{[0 #spec]
[/
+ ["$." monoid]
[functor
- ["." contravariant]]]}]
+ ["$." contravariant]]]}]
[control
["." function]]
[data
@@ -18,8 +19,6 @@
["." list]]]
[math
["." random (#+ Random)]]]
- ["." // #_
- ["#." monoid]]
{1
["." /]})
@@ -43,16 +42,16 @@
(_.with-cover [/.Predicate])
($_ _.and
(_.with-cover [/.functor]
- (contravariant.spec equivalence (multiple? 2) /.functor))
+ ($contravariant.spec equivalence (multiple? 2) /.functor))
(let [generator (: (Random (/.Predicate Nat))
(|> random.nat
(random.filter (|>> (n.= 0) not))
(:: @ map multiple?)))]
($_ _.and
(_.with-cover [/.union]
- (//monoid.spec equivalence /.union generator))
+ ($monoid.spec equivalence /.union generator))
(_.with-cover [/.intersection]
- (//monoid.spec equivalence /.intersection generator))))
+ ($monoid.spec equivalence /.intersection generator))))
(_.cover [/.none]
(bit@= false (/.none sample)))
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 77c024d33..776d84ae5 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index 2eb43c596..2495223b5 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/concurrency/stm.lux b/stdlib/source/test/lux/control/concurrency/stm.lux
index 628aedfaf..040d97924 100644
--- a/stdlib/source/test/lux/control/concurrency/stm.lux
+++ b/stdlib/source/test/lux/control/concurrency/stm.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
["." monad (#+ Monad do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/continuation.lux b/stdlib/source/test/lux/control/continuation.lux
index 95aa5ec7a..0b0538745 100644
--- a/stdlib/source/test/lux/control/continuation.lux
+++ b/stdlib/source/test/lux/control/continuation.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/function.lux b/stdlib/source/test/lux/control/function.lux
index 5244ad60b..145e466c0 100644
--- a/stdlib/source/test/lux/control/function.lux
+++ b/stdlib/source/test/lux/control/function.lux
@@ -2,7 +2,10 @@
[lux #*
[abstract
[equivalence (#+ Equivalence)]
- [monad (#+ do)]]
+ [monad (#+ do)]
+ {[0 #spec]
+ [/
+ ["$." monoid]]}]
[data
["." name]
[number
@@ -12,9 +15,6 @@
[math
["." random (#+ Random)]]
["_" test (#+ Test)]]
- ["." /// #_
- [abstract
- ["#." monoid]]]
{1
["." /]})
@@ -35,7 +35,7 @@
(right extra)))))
generator (: (Random (-> Nat Nat))
(:: @ map n.- random.nat))]
- (///monoid.spec equivalence /.monoid generator))
+ ($monoid.spec equivalence /.monoid generator))
(_.test (%.name (name-of /.identity))
(n.= expected
diff --git a/stdlib/source/test/lux/control/function/mixin.lux b/stdlib/source/test/lux/control/function/mixin.lux
index b9f2e766f..23704362d 100644
--- a/stdlib/source/test/lux/control/function/mixin.lux
+++ b/stdlib/source/test/lux/control/function/mixin.lux
@@ -5,7 +5,7 @@
[equivalence (#+ Equivalence)]
[predicate (#+ Predicate)]
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." monoid]]}]
[control
diff --git a/stdlib/source/test/lux/control/io.lux b/stdlib/source/test/lux/control/io.lux
index a0e5f7d4b..32bf5f4fc 100644
--- a/stdlib/source/test/lux/control/io.lux
+++ b/stdlib/source/test/lux/control/io.lux
@@ -5,7 +5,7 @@
["r" math/random]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/parser.lux b/stdlib/source/test/lux/control/parser.lux
index 3c6501afe..701d49741 100644
--- a/stdlib/source/test/lux/control/parser.lux
+++ b/stdlib/source/test/lux/control/parser.lux
@@ -4,7 +4,7 @@
[abstract
[monad (#+ do)]
[equivalence (#+ Equivalence)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/reader.lux b/stdlib/source/test/lux/control/reader.lux
index 4ad1e2a45..29a21d045 100644
--- a/stdlib/source/test/lux/control/reader.lux
+++ b/stdlib/source/test/lux/control/reader.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index b65590437..d0c9eef40 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -6,7 +6,7 @@
[functor (#+ Functor)]
[apply (#+ Apply)]
["." monad (#+ Monad do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/security/policy.lux b/stdlib/source/test/lux/control/security/policy.lux
index 6aebf504b..d193cc159 100644
--- a/stdlib/source/test/lux/control/security/policy.lux
+++ b/stdlib/source/test/lux/control/security/policy.lux
@@ -5,7 +5,7 @@
[equivalence (#+)]
[hash (#+ Hash)]
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/state.lux b/stdlib/source/test/lux/control/state.lux
index 2475692ff..b2a4fba96 100644
--- a/stdlib/source/test/lux/control/state.lux
+++ b/stdlib/source/test/lux/control/state.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/thread.lux b/stdlib/source/test/lux/control/thread.lux
index 49e397d21..aac2059f8 100644
--- a/stdlib/source/test/lux/control/thread.lux
+++ b/stdlib/source/test/lux/control/thread.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/try.lux b/stdlib/source/test/lux/control/try.lux
index 997a810ba..246beeeab 100644
--- a/stdlib/source/test/lux/control/try.lux
+++ b/stdlib/source/test/lux/control/try.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do Monad)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/control/writer.lux b/stdlib/source/test/lux/control/writer.lux
index 09dd2aef5..30150dc43 100644
--- a/stdlib/source/test/lux/control/writer.lux
+++ b/stdlib/source/test/lux/control/writer.lux
@@ -5,7 +5,7 @@
[equivalence (#+ Equivalence)]
[monoid (#+ Monoid)]
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 915260f35..508a2c1af 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -5,7 +5,7 @@
["_" test (#+ Test)]
[abstract
["." monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[control
diff --git a/stdlib/source/test/lux/data/bit.lux b/stdlib/source/test/lux/data/bit.lux
index 7dda82016..6f281818d 100644
--- a/stdlib/source/test/lux/data/bit.lux
+++ b/stdlib/source/test/lux/data/bit.lux
@@ -5,7 +5,7 @@
["r" math/random]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." monoid]
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index 5ba6f453f..63366a81d 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do Monad)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." monoid]
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index 60b939645..59d7e3443 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -5,7 +5,7 @@
[abstract
[monad (#+ do)]
["." predicate]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[data
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 55b569a31..fca670802 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -5,7 +5,7 @@
[abstract
[monad (#+ do)]
["eq" equivalence]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." functor (#+ Injection)]]}]
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index f0d7c8222..32d73290f 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -6,7 +6,7 @@
[monad (#+ do)]
[equivalence (#+ Equivalence)]
[order (#+ Order)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[data
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index faa3dfda3..a49a71e38 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." monoid]
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index a636e7164..9605a50b1 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." functor (#+ Injection)]]}]
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 1c7a5878a..1a9cfd383 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." monoid]
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index d742352ec..993082e79 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." monoid]]}]
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 45f73fd27..867fa4308 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -5,7 +5,7 @@
[abstract
[monad (#+ do)]
[order (#+ Order)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[data
diff --git a/stdlib/source/test/lux/data/collection/stack.lux b/stdlib/source/test/lux/data/collection/stack.lux
index a71b128a8..a8a2ceeeb 100644
--- a/stdlib/source/test/lux/data/collection/stack.lux
+++ b/stdlib/source/test/lux/data/collection/stack.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." functor (#+ Injection)]]}]
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 862c5a973..37dd216b2 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." fold]
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index 79e771ce9..a7b5c0088 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[data
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index ded118074..548dbebdd 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -6,7 +6,7 @@
codec
[monad (#+ do Monad)]
[equivalence (#+ Equivalence)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." codec]]}]
diff --git a/stdlib/source/test/lux/data/format/xml.lux b/stdlib/source/test/lux/data/format/xml.lux
index 47c16f72d..4c86781c0 100644
--- a/stdlib/source/test/lux/data/format/xml.lux
+++ b/stdlib/source/test/lux/data/format/xml.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ Monad do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." codec]]}]
diff --git a/stdlib/source/test/lux/data/identity.lux b/stdlib/source/test/lux/data/identity.lux
index cd9f480fa..65d7d1a48 100644
--- a/stdlib/source/test/lux/data/identity.lux
+++ b/stdlib/source/test/lux/data/identity.lux
@@ -6,7 +6,7 @@
[functor (#+)]
comonad
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/data/lazy.lux b/stdlib/source/test/lux/data/lazy.lux
index a52326bef..b31953a9f 100644
--- a/stdlib/source/test/lux/data/lazy.lux
+++ b/stdlib/source/test/lux/data/lazy.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." functor (#+ Injection Comparison)]
["$." apply]
diff --git a/stdlib/source/test/lux/data/maybe.lux b/stdlib/source/test/lux/data/maybe.lux
index 18d2f4248..a10e0154e 100644
--- a/stdlib/source/test/lux/data/maybe.lux
+++ b/stdlib/source/test/lux/data/maybe.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." functor]
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index 57eed0237..f2741c7d0 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -3,7 +3,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." codec]]}]
diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/data/number/complex.lux
index c7131575d..330361792 100644
--- a/stdlib/source/test/lux/data/number/complex.lux
+++ b/stdlib/source/test/lux/data/number/complex.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/data/number/frac.lux b/stdlib/source/test/lux/data/number/frac.lux
index 7afefb76d..ab6ceaa52 100644
--- a/stdlib/source/test/lux/data/number/frac.lux
+++ b/stdlib/source/test/lux/data/number/frac.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/data/number/i16.lux b/stdlib/source/test/lux/data/number/i16.lux
index c90b17dc3..a00a26e9e 100644
--- a/stdlib/source/test/lux/data/number/i16.lux
+++ b/stdlib/source/test/lux/data/number/i16.lux
@@ -6,7 +6,7 @@
["%" text/format (#+ format)]]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[math
diff --git a/stdlib/source/test/lux/data/number/i32.lux b/stdlib/source/test/lux/data/number/i32.lux
index eb643c9d3..d126e5b03 100644
--- a/stdlib/source/test/lux/data/number/i32.lux
+++ b/stdlib/source/test/lux/data/number/i32.lux
@@ -6,7 +6,7 @@
["%" text/format (#+ format)]]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[math
diff --git a/stdlib/source/test/lux/data/number/i64.lux b/stdlib/source/test/lux/data/number/i64.lux
index 4305bf461..390861169 100644
--- a/stdlib/source/test/lux/data/number/i64.lux
+++ b/stdlib/source/test/lux/data/number/i64.lux
@@ -8,7 +8,7 @@
["i" int]]]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." monoid]]}]
diff --git a/stdlib/source/test/lux/data/number/i8.lux b/stdlib/source/test/lux/data/number/i8.lux
index 7cd4a5149..aac5f063a 100644
--- a/stdlib/source/test/lux/data/number/i8.lux
+++ b/stdlib/source/test/lux/data/number/i8.lux
@@ -6,7 +6,7 @@
["%" text/format (#+ format)]]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]]}]
[math
diff --git a/stdlib/source/test/lux/data/number/int.lux b/stdlib/source/test/lux/data/number/int.lux
index c9491c913..680def4f5 100644
--- a/stdlib/source/test/lux/data/number/int.lux
+++ b/stdlib/source/test/lux/data/number/int.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/data/number/nat.lux b/stdlib/source/test/lux/data/number/nat.lux
index 2a96ef9d5..e07f584b1 100644
--- a/stdlib/source/test/lux/data/number/nat.lux
+++ b/stdlib/source/test/lux/data/number/nat.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/data/number/ratio.lux b/stdlib/source/test/lux/data/number/ratio.lux
index fa3d6a01e..788638fcf 100644
--- a/stdlib/source/test/lux/data/number/ratio.lux
+++ b/stdlib/source/test/lux/data/number/ratio.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/data/number/rev.lux b/stdlib/source/test/lux/data/number/rev.lux
index b84943a14..dfb484fc8 100644
--- a/stdlib/source/test/lux/data/number/rev.lux
+++ b/stdlib/source/test/lux/data/number/rev.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index c10d7a67e..a1a0ec7b1 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do Monad)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]]}]
diff --git a/stdlib/source/test/lux/macro/poly/json.lux b/stdlib/source/test/lux/macro/poly/json.lux
index ae7c62655..5e0bcfbd4 100644
--- a/stdlib/source/test/lux/macro/poly/json.lux
+++ b/stdlib/source/test/lux/macro/poly/json.lux
@@ -8,7 +8,7 @@
[equivalence (#+ Equivalence)
{[0 #poly]
["poly/equivalence" /]}]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." codec]]}]
diff --git a/stdlib/source/test/lux/time/date.lux b/stdlib/source/test/lux/time/date.lux
index 325a5f3f3..6ca543cf9 100644
--- a/stdlib/source/test/lux/time/date.lux
+++ b/stdlib/source/test/lux/time/date.lux
@@ -5,7 +5,7 @@
["_" test (#+ Test)]
[abstract
["." monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/time/day.lux b/stdlib/source/test/lux/time/day.lux
index ce57fc282..a654b069c 100644
--- a/stdlib/source/test/lux/time/day.lux
+++ b/stdlib/source/test/lux/time/day.lux
@@ -3,7 +3,7 @@
["%" data/text/format (#+ format)]
["_" test (#+ Test)]
[abstract
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/time/duration.lux b/stdlib/source/test/lux/time/duration.lux
index 12c4b41ba..a08019366 100644
--- a/stdlib/source/test/lux/time/duration.lux
+++ b/stdlib/source/test/lux/time/duration.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/time/instant.lux b/stdlib/source/test/lux/time/instant.lux
index 484aecb5a..f2e44cead 100644
--- a/stdlib/source/test/lux/time/instant.lux
+++ b/stdlib/source/test/lux/time/instant.lux
@@ -4,7 +4,7 @@
["_" test (#+ Test)]
[abstract
[monad (#+ do Monad)]
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]
diff --git a/stdlib/source/test/lux/time/month.lux b/stdlib/source/test/lux/time/month.lux
index 2c4c1c34f..180bdb604 100644
--- a/stdlib/source/test/lux/time/month.lux
+++ b/stdlib/source/test/lux/time/month.lux
@@ -3,7 +3,7 @@
["%" data/text/format (#+ format)]
["_" test (#+ Test)]
[abstract
- {[0 #test]
+ {[0 #spec]
[/
["$." equivalence]
["$." order]